On Wednesday, 6 July 2016 at 09:48:59 UTC, Lodovico Giaretta
wrote:
Nice work.
Personally, I'd do it this way: http://pastebin.com/38n0fEtF
This way:
- instead of 4 pointers (2 per delegate), the wrapper only
contains 1 pointer;
- once written, it only requires one line per property to be
On Tuesday, 5 July 2016 at 18:16:31 UTC, Charles Hixson wrote:
What I'm looking for is the opposite of the "FromUnixTime"
function.
i often use
long toNsUnixTime(SysTime t)
{
return (t.stdTime - 621_355_968_000_000_000L)*100;
}
as a helper. any chance that something like this can be put
On Wednesday, 6 July 2016 at 08:39:03 UTC, chmike wrote:
On Tuesday, 5 July 2016 at 20:38:53 UTC, Eugene Wissner wrote:
On Tuesday, 5 July 2016 at 08:24:43 UTC, O/N/S wrote:
Hi ("Grüss Gott")
I like the asynchronous events in Javascript.
Is something similar possible in D?
Found Dragos
In case you missed it
https://blog.twitch.tv/gos-march-to-low-latency-gc-a6fa96f06eb7#.emwja62y1
On Wed, Jul 06, 2016 at 10:19:19AM -0700, Charles Hixson via
Digitalmars-d-learn wrote:
[...]
> The same time needs to be used for two different purposes (or I have
> to keep two separate times). One time is used during a particular run
> of the program to compare when two different things
On Wednesday, 6 July 2016 at 14:57:08 UTC, chmike wrote:
On Wednesday, 6 July 2016 at 11:33:53 UTC, Eugene Wissner wrote:
The only reason libev was choosen is that it is the simplest
implementation I know about. A few C files. I had an
educational purpose: I wanted to see how an event loop
On 07/06/2016 10:32 AM, H. S. Teoh via Digitalmars-d-learn wrote:
On Wed, Jul 06, 2016 at 10:19:19AM -0700, Charles Hixson via
Digitalmars-d-learn wrote:
[...]
The same time needs to be used for two different purposes (or I have
to keep two separate times). One time is used during a
In case you want a compile error if no arguments are specified,
you can use something like this:
void foo()() { static assert(0); }
void foo(int[] ints...) { assert(ints); }
void main()
{
foo(1, 2, 3);
foo();
}
I'd like to do something like this but it doesn't seem to be
legal -
void test(int[] ints...) if(ints.length){
// stuff
}
Not being able to specify this interferes with how I'd like to
define my method overloads. What's the best way to achieve what
I'm looking for?
I'm trying to implement a feistel cipher that'll give the same
results regardless of the endianness of the machine it runs on.
To make the cipher I need to split a 64bit value into two 32bit
values, mess with them, and then put them back together. I can
think of a few ways to split a 64bit
On Wednesday, 6 July 2016 at 19:50:11 UTC, pineapple wrote:
I'd like to do something like this but it doesn't seem to be
legal -
void test(int[] ints...) if(ints.length){
// stuff
}
Not being able to specify this interferes with how I'd like to
define my method overloads.
On Wednesday, 6 July 2016 at 21:44:37 UTC, BitGuy wrote:
I'm trying to implement a feistel cipher that'll give the same
results regardless of the endianness of the machine it runs on.
To make the cipher I need to split a 64bit value into two 32bit
values, mess with them, and then put them back
On Wednesday, 6 July 2016 at 10:25:44 UTC, zodd wrote:
Thank you for a great example! D's power still surprises me a
lot.
just be careful to not carry wrapper around for too long, so it
won't outlive it's parent.
p.s. or this (abomination, i know!). ripped out of one of my
monkeycoding
On Wednesday, 6 July 2016 at 21:44:37 UTC, BitGuy wrote:
I'm trying to implement a feistel cipher that'll give the same
results regardless of the endianness of the machine it runs on.
To make the cipher I need to split a 64bit value into two 32bit
values, mess with them, and then put them back
On Wednesday, 6 July 2016 at 16:58:45 UTC, chmike wrote:
In case you missed it
https://blog.twitch.tv/gos-march-to-low-latency-gc-a6fa96f06eb7#.emwja62y1
This should have been posted in General.
On Wednesday, 6 July 2016 at 11:33:53 UTC, Eugene Wissner wrote:
The only reason libev was choosen is that it is the simplest
implementation I know about. A few C files. I had an
educational purpose: I wanted to see how an event loop works on
low level. Asyncio was for me no-go, since I've
On Wednesday, 6 July 2016 at 14:55:51 UTC, Jonathan M Davis wrote:
auto st = SysTime.fromISOExtString("2011-03-02T15:30:00+01:00");
That's perfect. I didn't notice that static method. My fault!
On 07/05/2016 05:23 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Tuesday, July 05, 2016 12:51:54 Charles Hixson via Digitalmars-d-learn
wrote:
On 07/05/2016 11:43 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Tuesday, July 05, 2016 11:16:31 Charles Hixson via
On Wednesday, 6 July 2016 at 15:38:00 UTC, Andrea Fontana wrote:
On Wednesday, 6 July 2016 at 14:55:51 UTC, Jonathan M Davis
wrote:
auto st =
SysTime.fromISOExtString("2011-03-02T15:30:00+01:00");
That's perfect. I didn't notice that static method. My fault!
Also, if you need to parse other
On Wednesday, July 06, 2016 19:50:11 pineapple via Digitalmars-d-learn wrote:
> I'd like to do something like this but it doesn't seem to be
> legal -
>
> void test(int[] ints...) if(ints.length){
> // stuff
> }
>
> Not being able to specify this interferes with how I'd like to
On Wednesday, July 06, 2016 14:15:22 Andrea Fontana via Digitalmars-d-learn
wrote:
> Ok, I have a string like:
> 2011-03-02T15:30:00+01:00
>
> I need to convert it in a SysTime object.
>
> My problem is that from documentation I can't understand how to
> set +01:00 timezone on systime. I guess
Ok, I have a string like:
2011-03-02T15:30:00+01:00
I need to convert it in a SysTime object.
My problem is that from documentation I can't understand how to
set +01:00 timezone on systime. I guess I'm missing something...
Andrea
On Wednesday, 6 July 2016 at 14:15:22 UTC, Andrea Fontana wrote:
My problem is that from documentation I can't understand how to
set +01:00 timezone on systime. I guess I'm missing something...
As far as I know, you can't do that.
Quote from the documentation:
"""
Unlike DateTime, the time
On Wednesday, 6 July 2016 at 14:19:56 UTC, Dejan Lekic wrote:
On Wednesday, 6 July 2016 at 14:15:22 UTC, Andrea Fontana wrote:
My problem is that from documentation I can't understand how
to set +01:00 timezone on systime. I guess I'm missing
something...
As far as I know, you can't do that.
On 06/07/2016 8:39 PM, chmike wrote:
On Tuesday, 5 July 2016 at 20:38:53 UTC, Eugene Wissner wrote:
On Tuesday, 5 July 2016 at 08:24:43 UTC, O/N/S wrote:
Hi ("Grüss Gott")
I like the asynchronous events in Javascript.
Is something similar possible in D?
Found Dragos Carp's asynchronous
So, I've created a simple wrapper template to achieve what I
want. It reminds me of the C++ - a bunch of additional code to
solve a simple problem (which shouldn't be an issue at all). I'm
a newbie in D thus I could do something wrong or nonoptimal.
Please, criticize my code:
On Tuesday, 5 July 2016 at 20:38:53 UTC, Eugene Wissner wrote:
On Tuesday, 5 July 2016 at 08:24:43 UTC, O/N/S wrote:
Hi ("Grüss Gott")
I like the asynchronous events in Javascript.
Is something similar possible in D?
Found Dragos Carp's asynchronous library
On Wednesday, 6 July 2016 at 05:51:04 UTC, Ola Fosheim Grøstad
wrote:
Maybe you could give me an useful example in D that does not
involve «static if» or «string mixins» that would be difficult
to represent in C++?
anything involving templates. c++ template syntax is awful.
On Wednesday, 6 July 2016 at 09:08:11 UTC, zodd wrote:
So, I've created a simple wrapper template to achieve what I
want. It reminds me of the C++ - a bunch of additional code to
solve a simple problem (which shouldn't be an issue at all).
I'm a newbie in D thus I could do something wrong or
29 matches
Mail list logo