On Monday, 1 August 2016 at 00:27:27 UTC, Sean Campbell wrote:
On Sunday, 31 July 2016 at 23:36:54 UTC, Cassio Butrico wrote:
[...]
There was changes made to core.sys.windows so it defaults to
unicode.
Try dmd winsamp gdi32.lib winsamp.def -version=ANSI
or change all of the xxxA functions
On Sunday, 31 July 2016 at 23:36:54 UTC, Cassio Butrico wrote:
in C:\d\dmd2\samples\d winsamp.d dont compiler.
dmd winsamp gdi32.lib winsamp.def
winsamp.d(53): Error: function
core.sys.windows.winuser.LoadIconA (void*, const(char)*) is not
callable using argument types (typeof(null), wchar*)
in C:\d\dmd2\samples\d winsamp.d dont compiler.
dmd winsamp gdi32.lib winsamp.def
winsamp.d(53): Error: function core.sys.windows.winuser.LoadIconA
(void*, const(char)*) is not callable using argument types
(typeof(null), wchar*)
winsamp.d(54): Error: function
On Sunday, 31 July 2016 at 22:38:59 UTC, Seb wrote:
Consider this short program:
void main()
{
alias S = float;
S s1 = 0x1.24c92ep+5;
S s2 = -0x1.1c71c8p+0;
[...]
It's an anoying feature.
The reason this is not implemented in dmd is that pow does not
map to a simple cpu
Consider this short program:
void main()
{
alias S = float;
S s1 = 0x1.24c92ep+5;
S s2 = -0x1.1c71c8p+0;
import std.math : std_pow = pow;
import core.stdc.stdio : printf;
import core.stdc.math: powf;
printf("std: %a\n", std_pow(s1, s2));
printf("pow: %a\n", s1
That's a really informative response. Thank you!
Am 31.07.2016 um 23:46 schrieb Seb:
> On Sunday, 31 July 2016 at 21:31:52 UTC, Darren wrote:
>> Hey, all.
>>
>> I'm pretty much a programming novice, so I hope you can bear with me.
>> Does anyone know how I can change an int into a char equivalent?
>>
>> e.g.
>> int i = 5;
>> dchar value;
>>
On 07/31/2016 11:31 PM, Darren wrote:
If I try and cast it to dchar, I get messed up output,
Because it gives you a dchar with the numeric value 5 which is some
control character.
and I'm not sure
how to use toChars (if that can accomplish this).
value = i.toChars.front;
toChars
On Sunday, 31 July 2016 at 21:31:52 UTC, Darren wrote:
Hey, all.
I'm pretty much a programming novice, so I hope you can bear
with me. Does anyone know how I can change an int into a char
equivalent?
e.g.
int i = 5;
dchar value;
?
assert(value == '5');
If I try and cast it to dchar, I
Hey, all.
I'm pretty much a programming novice, so I hope you can bear with
me. Does anyone know how I can change an int into a char
equivalent?
e.g.
int i = 5;
dchar value;
?
assert(value == '5');
If I try and cast it to dchar, I get messed up output, and I'm
not sure how to use
On 07/31/2016 08:43 PM, Rufus Smith wrote:
e.g., I have a nogc container and a remove(T obj). I can't search for
obj and remove it because opEquals is not marked nogc. So I need an
alternative that is somewhat robust.
Jonathan M Davis has already mentioned his plans to templatize
On Sunday, 31 July 2016 at 17:01:32 UTC, Seb wrote:
On Sunday, 31 July 2016 at 16:55:52 UTC, Seb wrote:
On Sunday, 31 July 2016 at 16:48:52 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 16:08:49 UTC, Seb wrote:
On Sunday, 31 July 2016 at 15:30:46 UTC, Thalamus wrote:
[...]
How about
On Sunday, 31 July 2016 at 17:48:48 UTC, BLM768 wrote:
writeln(n1.hashOf == n2.hashOf); // false = BAD!
Ok, yeah that is bad.
Next question: what's the fastest hashing implementation that
will provide the least collisions? Is there a hash implementation
that's perfered for AAs?
On Monday, 25 July 2016 at 12:24:53 UTC, Steven Schveighoffer
wrote:
On 7/23/16 5:44 PM, Rufus Smith wrote:
[...]
Again, I want to stress that Object.opEquals has been around
since early D1 days, @nogc is only a few years old, it was not
a wrong decision. @nogc cannot be added without
On Saturday, 23 July 2016 at 13:18:03 UTC, Rufus Smith wrote:
Trying to compare a *ptr value with a value in nogc code
results in the error:
Error: @nogc function '...' cannot call non-@nogc function
'object.opEquals'
Shouldn't object opEquals be marked?
So, I need to compare two
On Sunday, 31 July 2016 at 10:11:46 UTC, LaTeigne wrote:
On Saturday, 30 July 2016 at 12:24:55 UTC, ketmar wrote:
On Saturday, 30 July 2016 at 12:18:08 UTC, LaTeigne wrote:
it you think that you know the things better than somebody who
actually *lived* there in those times... well, keep
On Saturday, 30 July 2016 at 22:52:23 UTC, bachmeier wrote:
On Saturday, 30 July 2016 at 12:30:55 UTC, LaTeigne wrote:
On Saturday, 30 July 2016 at 12:24:55 UTC, ketmar wrote:
On Saturday, 30 July 2016 at 12:18:08 UTC, LaTeigne wrote:
it you think that you know the things better than somebody
On Sunday, 31 July 2016 at 16:39:59 UTC, Jack Stouffer wrote:
But D provides a default toHash for every type if it's not
defined. I was wondering why not just rely on that version.
If two objects are equal, their hashes must also be equal.
Consider this example:
struct Nullable(T) {
bool
On Sunday, 31 July 2016 at 16:55:52 UTC, Seb wrote:
On Sunday, 31 July 2016 at 16:48:52 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 16:08:49 UTC, Seb wrote:
On Sunday, 31 July 2016 at 15:30:46 UTC, Thalamus wrote:
[...]
How about setting the source path directly? With a recent
enough
On Sunday, 31 July 2016 at 16:48:52 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 16:08:49 UTC, Seb wrote:
On Sunday, 31 July 2016 at 15:30:46 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 14:03:49 UTC, Thalamus wrote:
[...]
After a couple more hours today, I found a couple of
On Sunday, 31 July 2016 at 16:08:49 UTC, Seb wrote:
On Sunday, 31 July 2016 at 15:30:46 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 14:03:49 UTC, Thalamus wrote:
[...]
After a couple more hours today, I found a couple of
solutions. Neither is satisfactory.
[...]
How about setting
On Sunday, 31 July 2016 at 15:30:15 UTC, LaTeigne wrote:
On Sunday, 31 July 2016 at 15:21:01 UTC, Jack Stouffer wrote:
Is it really a problem? What are the pitfalls of defining one
but not the other?
iirc usage in an AA requires both.
But D provides a default toHash for every type if it's
On Sunday, 31 July 2016 at 15:30:46 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 14:03:49 UTC, Thalamus wrote:
[...]
After a couple more hours today, I found a couple of solutions.
Neither is satisfactory.
[...]
How about setting the source path directly? With a recent enough
dmd
On Sunday, 31 July 2016 at 14:03:49 UTC, Thalamus wrote:
On Sunday, 31 July 2016 at 10:05:04 UTC, Basile B. wrote:
On Sunday, 31 July 2016 at 08:29:47 UTC, Basile B. wrote:
On Sunday, 31 July 2016 at 01:10:40 UTC, Thalamus wrote:
Any idea what I'm doing wrong?
Yes, what's going wrong is
On Sunday, 31 July 2016 at 15:21:01 UTC, Jack Stouffer wrote:
Is it really a problem? What are the pitfalls of defining one
but not the other?
iirc usage in an AA requires both.
Is it really a problem? What are the pitfalls of defining one but
not the other?
On Sunday, 31 July 2016 at 05:41:55 UTC, AntonSotov wrote:
2 Seb
Thank you!
is (T: typeof (null)) - very comfortable
An example of Seb's warning:
What happens if you have:
string s = null;
MyFunc(s);
I'm guessing it doesn't do what you want. But it isn't clear what
you want - null is a
On Sunday, 31 July 2016 at 10:05:04 UTC, Basile B. wrote:
On Sunday, 31 July 2016 at 08:29:47 UTC, Basile B. wrote:
On Sunday, 31 July 2016 at 01:10:40 UTC, Thalamus wrote:
Any idea what I'm doing wrong?
Yes, what's going wrong is quite
actually you said that the LST is well generated but
On Sunday, 31 July 2016 at 04:51:13 UTC, bachmeier wrote:
But this would be our own subreddit. I don't disagree if you're
talking about r/programming.
Oh, the people are terrible, but the platform is worse - I don't
like the tree view nor the voting system. It makes it really hard
to follow
On 7/30/16 5:21 PM, Q. Schroll wrote:
On Friday, 29 July 2016 at 19:24:59 UTC, Steven Schveighoffer wrote:
On 7/29/16 3:00 PM, Q. Schroll wrote:
Cases to consider: Arrays and AAs with const(T) Elements, where T is a
value or a reference type respectively.
[snip]
Questions:
(1) Why do I have
On Saturday, 30 July 2016 at 12:24:55 UTC, ketmar wrote:
On Saturday, 30 July 2016 at 12:18:08 UTC, LaTeigne wrote:
it you think that you know the things better than somebody who
actually *lived* there in those times... well, keep thinking
that. also, don't forget to teach physics to
Currently, the function Base64.decode for decoding char[] to ubyte[] has
an in contract, that should ensure that the supplied buffer is large
enough. However, it uses the function decodeLength, which does not give
the accurate decodeLength, but instead an upper bound (decodeLength can
be up to 2
On Sunday, 31 July 2016 at 08:29:47 UTC, Basile B. wrote:
On Sunday, 31 July 2016 at 01:10:40 UTC, Thalamus wrote:
Any idea what I'm doing wrong?
Yes, what's going wrong is quite
actually you said that the LST is well generated but empty so my
previous answer is wrong, also i was focused
On Sunday, 31 July 2016 at 08:29:10 UTC, ketmar wrote:
On Sunday, 31 July 2016 at 08:00:02 UTC, cc wrote:
socket sets usually updated after call to `select()`. you have
to recreate the sets before each call.
Ah that works, thanks.
On Sunday, 31 July 2016 at 01:10:40 UTC, Thalamus wrote:
I'm running into a problem where when I specify -cov in the DMD
compiler command, the coverage LST files are generated, but
they're all empty. Has anyone else run into this before? My
command line is:
dmd -m64 -gc -debug -w -wi -cov -X
On Sunday, 31 July 2016 at 08:00:02 UTC, cc wrote:
socket sets usually updated after call to `select()`. you have to
recreate the sets before each call.
On Sunday, 31 July 2016 at 03:04:27 UTC, Gorge Jingale wrote:
I like to build structures using template mixins because one
can pick and choose functionality at compile time, but still
have a relationship between different types.
It would be really nice if one could sort of test if a template
Socket server = new TcpSocket();
server.setOption(SocketOptionLevel.SOCKET,
SocketOption.REUSEADDR, true);
server.bind(new InternetAddress(8000));
server.listen(8);
auto set = new SocketSet();
set.add(server);
auto sel = Socket.select(set,
38 matches
Mail list logo