Re: custom sorting of lists ?

2018-10-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/12/18 4:59 PM, Codifies wrote: On Friday, 12 October 2018 at 20:29:27 UTC, Steven Schveighoffer wrote: On 10/12/18 3:40 PM, Codifies wrote: [...] Unfortunately, I can't find a way to sort a doubly linked list in phobos, so comparisons are somewhat moot. However, if there *were* a

Re: custom sorting of lists ?

2018-10-12 Thread Codifies via Digitalmars-d-learn
On Friday, 12 October 2018 at 20:29:27 UTC, Steven Schveighoffer wrote: On 10/12/18 3:40 PM, Codifies wrote: [...] Unfortunately, I can't find a way to sort a doubly linked list in phobos, so comparisons are somewhat moot. However, if there *were* a sorting routine, generally the

Re: custom sorting of lists ?

2018-10-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/12/18 3:40 PM, Codifies wrote: a while ago I wrote a doubly linked list (in C), which has a compare callback to allow custom sorting for example int cmpNodes(cnode_t* n1, cnode_t* n2) {   mapNode_t* rn1 = (mapNode_t*)(n1->data);   mapNode_t* rn2 = (mapNode_t*)(n2->data);   if (rn1->G

custom sorting of lists ?

2018-10-12 Thread Codifies via Digitalmars-d-learn
a while ago I wrote a doubly linked list (in C), which has a compare callback to allow custom sorting for example int cmpNodes(cnode_t* n1, cnode_t* n2) { mapNode_t* rn1 = (mapNode_t*)(n1->data); mapNode_t* rn2 = (mapNode_t*)(n2->data); if (rn1->G + rn1->H > rn2->G + rn2->H) return 1;

Re: LDC2 -I option results in unresolved externals

2018-10-12 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 12 October 2018 at 07:32:26 UTC, Mike Parker wrote: DMD has the -i option which tells the compiler to automatically compile all imported modules. I don't know if LDC has anything similar. It does, same option.

Re: Has Anyone has this same Issue Please?

2018-10-12 Thread Basile B. via Digitalmars-d-learn
On Thursday, 11 October 2018 at 18:20:56 UTC, Ephrahim wrote: Using this dub.json configuration 0.8.36\eventcore\source\eventcore\drivers\posix\driver.d(145,14): Error: safe function 'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop, LoopTimeoutTimerDriver,

Re: std.regex is fat

2018-10-12 Thread Alex via Digitalmars-d-learn
On Friday, 12 October 2018 at 13:25:33 UTC, Chris Katko wrote: Like, insanely fat. All I wanted was a simple regex. The second include a regex function, my program would no longer compile "out of memory for fork". /usr/bin/time -v reports it went from 150MB of RAM for D, DAllegro, and

std.regex is fat

2018-10-12 Thread Chris Katko via Digitalmars-d-learn
Like, insanely fat. All I wanted was a simple regex. The second include a regex function, my program would no longer compile "out of memory for fork". /usr/bin/time -v reports it went from 150MB of RAM for D, DAllegro, and Allegro5. To over 650MB of RAM, and from 1.5 seconds to >5.5

Re: Using . notation abstractly

2018-10-12 Thread Simen Kjærås via Digitalmars-d-learn
On Friday, 12 October 2018 at 12:43:53 UTC, Paul Backus wrote: On Wednesday, 10 October 2018 at 22:56:14 UTC, James Japherson wrote: The point of all this is because D does not allow nesting of enums which allows for nice use of . to separate hiearchies: enum A { enum B { X, }

Re: Using . notation abstractly

2018-10-12 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 10 October 2018 at 22:56:14 UTC, James Japherson wrote: The point of all this is because D does not allow nesting of enums which allows for nice use of . to separate hiearchies: enum A { enum B { X, } } A.B.X, rather than having to have one large flat enum and do

Re: LDC2 -I option results in unresolved externals

2018-10-12 Thread Mike Parker via Digitalmars-d-learn
On Friday, 12 October 2018 at 06:01:12 UTC, spikespaz wrote: I'm using the latest LDC2 beta, and when running the compiler with -I (Look for imports also in ) it fails with unresolved externals. These are my commands. = $ ldc2

LDC2 -I option results in unresolved externals

2018-10-12 Thread spikespaz via Digitalmars-d-learn
I'm using the latest LDC2 beta, and when running the compiler with -I (Look for imports also in ) it fails with unresolved externals. These are my commands. = $ ldc2 "source\setup.d" -I "source" -J "build\vars" -of "build\bin\setup.exe"