On Monday, 1 August 2022 at 04:24:41 UTC, ikelaiah wrote:
Hi,
I've written a cli tool to merge JSON files (containing JSON
array) in the current folder as a single JSON file.
My algorithm:
1. Create a string to store the output JSON array as a string,
2. read each file
3. read each object
Hi,
I've written a cli tool to merge JSON files (containing JSON
array) in the current folder as a single JSON file.
My algorithm:
1. Create a string to store the output JSON array as a string,
2. read each file
3. read each object in JSON array from input file
4. append the string
On Sunday, 31 July 2022 at 19:25:51 UTC, Hipreme wrote:
I wish to generate some functions using mixin template and I
wish to check if the current class already has an specific
overload with parameters (A, B).
What I'm currently trying is doing `__traits(getOverloads, T,
"foo")`, and then
On Sunday, 31 July 2022 at 10:55:58 UTC, TheZipCreator wrote:
So I'm making an interpreter for my custom scripting language
and I want to allow users to write libraries in languages other
than said scripting language (for efficiency). For example, you
should be able to write a mathematics
Hi dlang lovers,
I recently wanted to improve how I work with coverage data (locally).
For that I came up with a small program, that can be either called after
a `dub test --coverage` or that can be automatically executed after the
unittest with `postRunCommands "$DUB run lst2errormessages"`
I wish to generate some functions using mixin template and I wish
to check if the current class already has an specific overload
with parameters (A, B).
What I'm currently trying is doing `__traits(getOverloads, T,
"foo")`, and then checking if its type are equal. But it seems
hackish, and I
On Sunday, 31 July 2022 at 17:03:59 UTC, Salih Dincer wrote:
On Sunday, 31 July 2022 at 15:01:21 UTC, pascal111 wrote:
I don't know how "assert" works, if you explained it I'll be
able to get the idea of your suggestion to apply the
appropriate changes on my code.
**// This code runs
On Sunday, 31 July 2022 at 15:01:21 UTC, pascal111 wrote:
I don't know how "assert" works, if you explained it I'll be
able to get the idea of your suggestion to apply the
appropriate changes on my code.
**// This code runs forever:**
```d
string str;
assert(str is null);
str =
On Sunday, 31 July 2022 at 14:52:03 UTC, FeepingCreature wrote:
Note sure if I'm misunderstanding, but: D does not copy strings
on value passing, because they're inherently reference types.
You can think of a string (or any array) as a `struct { size_t
length; T* ptr; }` combined with a bunch
On Sunday, 31 July 2022 at 07:43:06 UTC, Salih Dincer wrote:
On Sunday, 31 July 2022 at 00:58:47 UTC, pascal111 wrote:
Another version of the program:
https://github.com/pascal111-fra/D/blob/main/proj04.d
I have a few more suggestions for you; Among them the first is
on the following
On Sunday, 31 July 2022 at 07:43:06 UTC, Salih Dincer wrote:
Why are you using const for strings? After all, they are
protected by immutable. Moreover, since you do not use refs,
copies are taken in every function and also you have created
extra copy for results.
Note sure if I'm
So I'm making an interpreter for my custom scripting language and
I want to allow users to write libraries in languages other than
said scripting language (for efficiency). For example, you should
be able to write a mathematics library in D, compile it, then
write a simple wrapper in my
On Sunday, 31 July 2022 at 00:58:47 UTC, pascal111 wrote:
Another version of the program:
https://github.com/pascal111-fra/D/blob/main/proj04.d
I have a few more suggestions for you; Among them the first is on
the following sample:
```d
auto sentence_x = "she has six oxen";
auto
13 matches
Mail list logo