On Sunday, 25 October 2020 at 12:02:10 UTC, Ali Çehreli wrote:
On 10/25/20 4:30 AM, frame wrote:
Is there a possibility to write templated code / custom trait
pattern with usage like a delegate?
I have a try-catch block with different types and don't want
to repeat myself in every method agai
On 10/25/20 12:29 PM, IGotD- wrote:
What I discovered is that remove doesn't really remove size number of
bytes but also removed entire multibyte characters and consider that one
step. The result was of course that I got out of bounds exceptions as it
went past the end.
This is the infamous
I have a part in my code that use remove
buffer.remove(tuple(0, size));
with
char[] buffer
What I discovered is that remove doesn't really remove size
number of bytes but also removed entire multibyte characters and
consider that one step. The result was of course that I got out
of bounds e
On Friday, 23 October 2020 at 16:42:00 UTC, data pulverizer wrote:
Hi all,
the `import` function allows a file to be read at compile time,
which opens up great opportunities for (mostly binary) file IO,
where data types can be coded into files - the user doesn't
need to know data types ahead
On Sunday, 25 October 2020 at 12:16:36 UTC, Jacob Carlborg wrote:
On 2020-10-23 18:42, data pulverizer wrote:
For me it's not make-or-break, it just something very useful
and I think has clear use case. Please let me know if there
are aspects or alternatives I am missing.
You could always ha
On Sunday, 25 October 2020 at 12:16:36 UTC, Jacob Carlborg wrote:
On 2020-10-23 18:42, data pulverizer wrote:
You could always have the build tool split up the file in
multiple smaller files and read one of the smaller files with
the import expression.
Thanks. My current solution is to have a
On 2020-10-20 02:16, Ali Çehreli wrote:
Everything works at least on Linux. Is this kosher, or am I using some
internal knowledge?
Yes, you're using some internal knowledge. You cannot assume it works on
any other platform or architecture. In theory, the D compiler could
choose to change the
On 2020-10-23 18:42, data pulverizer wrote:
For me it's not make-or-break, it just something very useful and I think
has clear use case. Please let me know if there are aspects or
alternatives I am missing.
You could always have the build tool split up the file in multiple
smaller files and
On 10/25/20 4:30 AM, frame wrote:
Is there a possibility to write templated code / custom trait pattern
with usage like a delegate?
I have a try-catch block with different types and don't want to repeat
myself in every method again. It's always the same, just what's tried
changes, eg.:
pseu
On Sunday, 25 October 2020 at 10:03:44 UTC, Ali Çehreli wrote:
Is it really safe? Imagine a multi-threaded environment where
another D function is executed that triggers a GC collection
right before the printf.
Does the GC see that local variable 'name' that is on the C
side? What I don't k
Is there a possibility to write templated code / custom trait
pattern with usage like a delegate?
I have a try-catch block with different types and don't want to
repeat myself in every method again. It's always the same, just
what's tried changes, eg.:
pseudo code:
template myStuff(mixin co
On 10/25/20 3:19 AM, rikki cattermole wrote:
On 25/10/2020 11:03 PM, Ali Çehreli wrote:
Does the GC see that local variable 'name' that is on the C side? What
I don't know is whether the GC is aware only of the stack frames of D
functions or the entire thread, which would include the C caller's
On 25/10/2020 11:03 PM, Ali Çehreli wrote:
Does the GC see that local variable 'name' that is on the C side? What I
don't know is whether the GC is aware only of the stack frames of D
functions or the entire thread, which would include the C caller's 'name'.
The thread stack frame that is regi
toStringz documentation is clear on why, when, and how to extend the
lifetime of a D string:
https://dlang.org/phobos/std_string.html#.toStringz
Assume foo is a D library function that passes a "string" result to e.g. C:
extern(C)
void foo(ref const(char) * name) {
name = format!"file%s.tx
On Sunday, 25 October 2020 at 06:05:27 UTC, Vino wrote:
Hi All,
Currently we are testing various json module such as
"std.json, std_data_json, vibe.data.json and asdf", the below
code works perfectely while use "std_data_json or
vibe.data.json" but not working as expected when we use "asd
On Sunday, 25 October 2020 at 06:05:27 UTC, Vino wrote:
Hi All,
Currently we are testing various json module such as
"std.json, std_data_json, vibe.data.json and asdf", the below
code works perfectely while use "std_data_json or
vibe.data.json" but not working as expected when we use "asd
On Sunday, 25 October 2020 at 06:05:27 UTC, Vino wrote:
Hi All,
Currently we are testing various json module such as
"std.json, std_data_json, vibe.data.json and asdf", the below
code works perfectely while use "std_data_json or
vibe.data.json" but not working as expected when we use "asd
17 matches
Mail list logo