nested enum

2016-08-24 Thread Illuminati via Digitalmars-d-learn
How can I create nested enum like structures? instead of Enum.X_Y I would like to access like Enum.X.Y Yet I want it to behave exactly as an enum. I just want to not use _ as .'s are better as they express more clearly what I want.

Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
Does D have a non-gc based associative array? If not, what would be a good way to go about creating one?

Re: nested enum

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 01:37:05 UTC, Mike Parker wrote: On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote: How can I create nested enum like structures? instead of Enum.X_Y I would like to access like Enum.X.Y Yet I want it to behave exactly as an enum. I just want to no

Re: Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:11:32 UTC, Laeeth Isharc wrote: On Thursday, 25 August 2016 at 18:14:42 UTC, Illuminati wrote: Does D have a non-gc based associative array? If not, what would be a good way to go about creating one? See EMSI containers in code.dlang.org Thanks.

Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary cache-sizes? Anyone up for the challenge?

Re: Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:42:42 UTC, Illuminati wrote: http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary cache-size

Proper concurrent nearly lock free efficient nogc storage structures?

2016-08-26 Thread Illuminati via Digitalmars-d-learn
Does D have any such thing? I'm having to recreate the wheel here and it isn't fun ;/ Getting in the way of real work ;/ Surely you would think that with the power D has such things would exist by now?

Re: Proper concurrent nearly lock free efficient nogc storage structures?

2016-08-26 Thread Illuminati via Digitalmars-d-learn
On Friday, 26 August 2016 at 23:44:53 UTC, Cauterite wrote: On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote: Does D have any such thing? I'm having to recreate the wheel here and it isn't fun ;/ Getting in the way of real work ;/ @nogc is such a new language feature that you can't

Re: Proper concurrent nearly lock free efficient nogc storage structures?

2016-08-27 Thread Illuminati via Digitalmars-d-learn
On Saturday, 27 August 2016 at 13:12:42 UTC, ZombineDev wrote: On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote: Does D have any such thing? I'm having to recreate the wheel here and it isn't fun ;/ Getting in the way of real work ;/ Surely you would think that with the power D has

Re: Proper concurrent nearly lock free efficient nogc storage structures?

2016-08-27 Thread Illuminati via Digitalmars-d-learn
On Saturday, 27 August 2016 at 17:27:19 UTC, Dicebot wrote: On Friday, 26 August 2016 at 23:38:02 UTC, Illuminati wrote: Does D have any such thing? I'm having to recreate the wheel here and it isn't fun ;/ Getting in the way of real work ;/ Surely you would think that with the power D has su

InterlockedIncrement, InterlockedCompareExchange, etc

2016-08-28 Thread Illuminati via Digitalmars-d-learn
What are the D equivalents to these types of functions? I do not see anything in core.atomic that can accomplish this. I have tried to include core.sys.windows.winbase but still get linker errors(I've also directly tried importing kernel32 using various methods and still nothing). Regardless,

Re: InterlockedIncrement, InterlockedCompareExchange, etc

2016-08-28 Thread Illuminati via Digitalmars-d-learn
On Sunday, 28 August 2016 at 20:38:30 UTC, Lodovico Giaretta wrote: On Sunday, 28 August 2016 at 19:53:51 UTC, Illuminati wrote: What are the D equivalents to these types of functions? I do not see anything in core.atomic that can accomplish this. I have tried to include core.sys.windows.winba

Hash table element existence check

2016-09-02 Thread Illuminati via Digitalmars-d-learn
I am trying to create a hash table and would like an efficient way to be able to know if an element exists to test for collisions. I could keep a bitarray, but wasting around 12% space. I could use pointers(null check) to elements but this creates fragmentation. It is not terrible, just curio

Re: Hash table element existence check

2016-09-03 Thread Illuminati via Digitalmars-d-learn
On Friday, 2 September 2016 at 19:48:30 UTC, Steven Schveighoffer wrote: On 9/2/16 3:38 PM, Illuminati wrote: I am trying to create a hash table and would like an efficient way to be able to know if an element exists to test for collisions. You mean you are writing your own hash table, or you

Re: Hash table element existence check

2016-09-03 Thread Illuminati via Digitalmars-d-learn
On Saturday, 3 September 2016 at 07:44:28 UTC, Cauterite wrote: On Friday, 2 September 2016 at 19:38:34 UTC, Illuminati wrote: I am trying to create a hash table and would like an efficient way to be able to know if an element exists to test for collisions. Just do a regular lookup on the has

Re: Hash table element existence check

2016-09-03 Thread Illuminati via Digitalmars-d-learn
On Saturday, 3 September 2016 at 09:43:04 UTC, Basile B. wrote: On Friday, 2 September 2016 at 19:38:34 UTC, Illuminati wrote: I am trying to create a hash table and would like an efficient way to be able to know if an element exists to test for collisions. I could keep a bitarray, but wastin

Re: How compiler detects forward reference errors

2016-09-04 Thread Illuminati via Digitalmars-d-learn
On Sunday, 4 September 2016 at 19:15:15 UTC, Igor wrote: On Saturday, 3 September 2016 at 14:13:27 UTC, Lodovico Giaretta wrote: On Saturday, 3 September 2016 at 14:06:06 UTC, Igor wrote: Can anyone explain in plain English how does compiler process and detect a "test.d(6) Error: forward refere

Re: Hash table element existence check

2016-09-04 Thread Illuminati via Digitalmars-d-learn
On Saturday, 3 September 2016 at 14:07:27 UTC, Cauterite wrote: On Saturday, 3 September 2016 at 12:33:26 UTC, Illuminati wrote: On Saturday, 3 September 2016 at 07:44:28 UTC, Cauterite wrote: On Friday, 2 September 2016 at 19:38:34 UTC, Illuminati wrote: I am trying to create a hash table and

Re: Unicode function name? ∩

2016-09-05 Thread Illuminati via Digitalmars-d-learn
On Monday, 29 August 2016 at 12:53:26 UTC, Jesper Tholstrup wrote: On Sunday, 28 August 2016 at 05:21:03 UTC, Tofu Ninja wrote: Are unicode function names not supported in dmd? bool ∩(A, B)(A a, B b){ return intersect(a, b); } Error: character 0x2229 is not a valid token Personally, I

Re: Unicode function name? ∩

2016-09-06 Thread Illuminati via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 13:41:22 UTC, Jesper Tholstrup wrote: On Tuesday, 6 September 2016 at 02:22:50 UTC, Illuminati wrote: It's concise and has a very specific meaning. Well, only if we can agree on what the symbols mean. I'm not sure that every symbol is concise and specific acros

Re: Unicode function name? ∩

2016-09-06 Thread Illuminati via Digitalmars-d-learn
On Tuesday, 6 September 2016 at 19:58:11 UTC, Jesper Tholstrup wrote: On Tuesday, 6 September 2016 at 18:46:52 UTC, Illuminati wrote: [...] You are somewhat of topic here. [...] A lot of code is written by non-mathematicians and has to be maintained by non-mathematicians. Mathematicians w

Re: Unicode function name? ∩

2016-09-07 Thread Illuminati via Digitalmars-d-learn
On Wednesday, 7 September 2016 at 07:39:53 UTC, Jesper Tholstrup wrote: On Tuesday, 6 September 2016 at 20:26:01 UTC, Illuminati wrote: Ok, continue your game I see you are quite involved with it. For what it's worth I was actually trying to learn something. I apologize if I contributed