On Monday, January 6, 2020 8:52:01 AM MST Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 1/6/20 5:07 AM, WebFreak001 wrote:
> > I was wondering, how are you supposed to use std.file : read in @safe
> > code when it returns a void[] but you want to get all bytes in the file?
> >
> > Is vo
06.01.2020 22:48, Steven Schveighoffer пишет:
I think his question is, why shouldn't this work? e.g., this works:
Ah, indeed. Sorry for noise.
On 1/6/20 2:33 PM, drug wrote:
06.01.2020 20:08, Per Nordlöw пишет:
alias A = Algebraic!(long, string);
A x;
x = 42;
That's because you try to assign int, not long. This works:
alias A = Algebraic!(long, string);
A x;
x = 42L;
I think his question is, why shouldn't this work? e.g.
06.01.2020 20:08, Per Nordlöw пишет:
alias A = Algebraic!(long, string);
A x;
x = 42;
That's because you try to assign int, not long. This works:
alias A = Algebraic!(long, string);
A x;
x = 42L;
Is there a reason why
alias A = Algebraic!(long, string);
A x;
x = 42;
doesn't implicitly convert `42` to `long` and stores it in `x`?
On 1/6/20 5:07 AM, WebFreak001 wrote:
Or should void[]
actually be castable to ubyte[] in @safe code?
No, because you can implicitly cast anything to void[], including
pointer arrays.
Possibly const(ubyte[]).
-Steve
On 1/6/20 5:07 AM, WebFreak001 wrote:
I was wondering, how are you supposed to use std.file : read in @safe
code when it returns a void[] but you want to get all bytes in the file?
Is void[] really the correct type it should be returning instead of
ubyte[] when it just reads a (binary) file to
On Monday, 6 January 2020 at 00:03:06 UTC, Temtaime wrote:
https://ideone.com/tvpreP
That's cool! Thank you very much!
I think the suggestion of angel would be most fitting for my
case. As angel said, the using the C code for D would be a
relatively small refactor.
if you want to send like a synthetic arrow keystroke, well,
things get ugly again, it will need to send the right series of
bytes based on what te
On Sunday, 5 January 2020 at 13:52:27 UTC, JN wrote:
On Sunday, 5 January 2020 at 13:33:35 UTC, Marcone wrote:
[snip]
By the way, have you managed to add the res file into the
binary? My understanding is that the res file should be added
into the exe file by the rc command before it can be
On Monday, 6 January 2020 at 08:39:19 UTC, Robert M. Münch wrote:
On 2020-01-05 04:18:34 +, H. S. Teoh said:
At a minimum, I think we should file a bug report to
investigate whether
Grapheme.opSlice can be implemented differently, such that we
avoid this
obscure referential behaviour that
On Monday, 6 January 2020 at 10:07:37 UTC, WebFreak001 wrote:
I was wondering, how are you supposed to use std.file : read in
@safe code when it returns a void[] but you want to get all
bytes in the file?
Is void[] really the correct type it should be returning
instead of ubyte[] when it just
I would say it should return a ubyte[].
On Monday, 6 January 2020 at 10:07:37 UTC, WebFreak001 wrote:
Or should void[] actually be castable to ubyte[] in @safe code?
Definitely not with the current semantics, since a void[] can
alias pointers in @safe code.
See: https://issues.dlang.org/show
As mentioned on the dustmite website [1] I copied the folder std
from Phobos in a separate folder and renamed it to mystd. The I
changed all occurences of std by mystd in all files.
That works most of the time, but sometimes I get hundreds of
linker errors I do not understand:
$> dmd -main -
I was wondering, how are you supposed to use std.file : read in
@safe code when it returns a void[] but you want to get all bytes
in the file?
Is void[] really the correct type it should be returning instead
of ubyte[] when it just reads a (binary) file to memory? Or
should void[] actually be
On 2020-01-05 04:18:34 +, H. S. Teoh said:
At a minimum, I think we should file a bug report to investigate whether
Grapheme.opSlice can be implemented differently, such that we avoid this
obscure referential behaviour that makes it hard to work with in complex
code. I'm not sure if this is
16 matches
Mail list logo