On Friday, 15 March 2024 at 20:36:56 UTC, rkompass wrote:
I'm quite new to D yet. But I have some acquaintance with
Python.
Therefore, together with templates the discovery of the Variant
type was inspiring me to the following:
I wanted to explore if it's possible to do sort of
type-agnostic
On Friday, 15 March 2024 at 17:15:56 UTC, monkyyy wrote:
On Friday, 15 March 2024 at 09:03:25 UTC, rkompass wrote:
@Monkyyy: I adopted your solution, it is perfect.
I only have one problem left:
The foreach loop with associative arrays has two cases:
`foreach(key, val; arr)` and `foreach(x;
On Thursday, 14 March 2024 at 23:19:37 UTC, Inkrementator wrote:
I am trying to derive a struct from another. I want to modify
each field such that type of it goes from some T to Nullable!T,
preserving all fieldnames and UDAs.
This is trivially easy if your types are visible at module level,
On Friday, 15 March 2024 at 18:04:25 UTC, Inkrementator wrote:
You'll have to either fix the old vibe-d version, or fork
msgpack-rpc to work with current vibe-d, whatever is more
appropriate and easier.
I'm trying to fix it with the latest vibe-d 0.10.0, now the new
error:
```
On Friday, 15 March 2024 at 18:04:25 UTC, Inkrementator wrote:
On Friday, 15 March 2024 at 17:48:26 UTC, mw wrote:
```
$ dub build
Could not resolve configuration for package demo
```
Trying to build your dependency msgpack-rpc, it spits out
```
Warning The sub configuration directive
OK, looks something wrong with dub / or vibe-d 0.10.0
https://github.com/msgpack-rpc/msgpack-rpc-d/blob/master/examples/with_http_server/dub.sdl#L5
with
```
dependency "vibe-d" version="~>0.7.25"
```
`dub build` can at least starts.
But
```
dependency "vibe-d" version="~>0.10.0"
```
```
$
On Friday, 15 March 2024 at 17:48:26 UTC, mw wrote:
```
$ dub build
Could not resolve configuration for package demo
```
Trying to build your dependency msgpack-rpc, it spits out
```
Warning The sub configuration directive "vibe-d" ->
[libevent] references a configuration that does not
Very simple thing from https://dub.pm/getting-started/first-steps/
After I add dependencies, it cannot build:
```
$ cat dub.json
{
"authors": [
"mw"
],
"copyright": "Copyright © 2024, mw",
"description": "msgpack-rpc-d demo.",
"license":
On Tuesday, 12 March 2024 at 05:38:03 UTC, Liam McGillivray wrote:
I am in need of a data type for holding direction information;
one of 8 directions on a single axis. They are named in terms
of compass directions. If D had a 4-bit datatype, I would just
use this and do `+=2` whenever I want
On Friday, 15 March 2024 at 09:03:25 UTC, rkompass wrote:
@Monkyyy: I adopted your solution, it is perfect.
I only have one problem left:
The foreach loop with associative arrays has two cases:
`foreach(key, val; arr)` and `foreach(x; arr)`.
In the second case only the values are iterated.
@Monkyyy: I adopted your solution, it is perfect.
I only have one problem left:
The foreach loop with associative arrays has two cases:
`foreach(key, val; arr)` and `foreach(x; arr)`.
In the second case only the values are iterated.
With the present solution the iteration delivers (key, val)
11 matches
Mail list logo