Re: UDAs on enum members

2017-08-31 Thread apz28 via Digitalmars-d
On Wednesday, 13 July 2016 at 11:57:21 UTC, Tomer Filiba wrote: It would be really nice if I could put UDAs on enum members as well, e.g., enum MyEnum { @("SOM") SomeMember, @("ANO") AnotherMemberWithAVeryLongName, } I can think of many reasons why that would be desired, but the concr

Working without GC

2017-08-31 Thread solidstate1991 via Digitalmars-d
Here's my ADPCM/etc. codec library: https://github.com/ZILtoid1991/libPCM I have an intent to keep a mostly GC version (where the codecs are still noGC for minimal CPU overhead, so the best of both worlds), I'm planning an embedded version without the file operations, and one that has the fil

Re: UDAs on enum members

2017-08-31 Thread EntangledQuanta via Digitalmars-d
On Sunday, 17 July 2016 at 20:51:42 UTC, Walter Bright wrote: On 7/13/2016 4:57 AM, Tomer Filiba wrote: It would be really nice if I could put UDAs on enum members as well, e.g., enum MyEnum { @("SOM") SomeMember, @("ANO") AnotherMemberWithAVeryLongName, } Not a bad idea. It's been a

Re: Editor recommendations for new users.

2017-08-31 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 31 August 2017 at 23:20:52 UTC, Jerry wrote: On Wednesday, 30 August 2017 at 22:42:40 UTC, Moritz Maxeiner wrote: On Wednesday, 30 August 2017 at 21:30:44 UTC, Jerry wrote: The install requirement is arbitrary, and why 20MB? It just seems like you are trying to advertise that progr

Re: Editor recommendations for new users.

2017-08-31 Thread Jerry via Digitalmars-d
On Wednesday, 30 August 2017 at 22:42:40 UTC, Moritz Maxeiner wrote: On Wednesday, 30 August 2017 at 21:30:44 UTC, Jerry wrote: On Sunday, 27 August 2017 at 18:08:52 UTC, Moritz Maxeiner wrote: The requirements are rather vague, you can interpret it in a number of ways. The sensible interpret

Re: Compiler scalability. Question inspired by OOM errors seen by Crystal language

2017-08-31 Thread Stefan Koch via Digitalmars-d
On Thursday, 31 August 2017 at 17:39:35 UTC, H. S. Teoh wrote: This is just one example off the top of my head; I'm sure there are plenty of others that we can come up with once we break free of the C++ mold of thinking of templates as "copy-n-paste except substitute X with Y". Another exam

Re: Events in D

2017-08-31 Thread bitwise via Digitalmars-d
On Thursday, 31 August 2017 at 19:36:00 UTC, kinke wrote: On Wednesday, 30 August 2017 at 15:35:57 UTC, bitwise wrote: -What if I want an event to lock a shared mutex of the enclosing object, without storing a pointer to that mutex inside the event itself (and every single other event in the o

Interesting performance changes over time in Kostyas benchmarks

2017-08-31 Thread Ryion via Digitalmars-d
Kostya has updated his benchmarks today and moved from: gdc 5.2.0 to 6.3.0 LDC 0.15.2 beta1 to 1.4.0-beta1 (LLVM 4.0.1) https://github.com/kostya/benchmarks/commit/73e0cb0e755f8e45d79fd2083b217d107e1185a9 The results are interesting to see as there over a year and half development between vers

Re: Events in D

2017-08-31 Thread kinke via Digitalmars-d
On Wednesday, 30 August 2017 at 15:35:57 UTC, bitwise wrote: -What if I want an event to lock a shared mutex of the enclosing object, without storing a pointer to that mutex inside the event itself (and every single other event in the object)? -What if I want an event to call a method of the

Re: Compiler scalability. Question inspired by OOM errors seen by Crystal language

2017-08-31 Thread H. S. Teoh via Digitalmars-d
On Thu, Aug 31, 2017 at 04:36:41PM +, Stefan Koch via Digitalmars-d wrote: > On Wednesday, 30 August 2017 at 16:34:13 UTC, H. S. Teoh wrote: > > > > The CTFE problem will be fixed soon, once Stefan Koch finishes his > > newCTFE engine. > > > > Templates are still an area where a lot of improv

Re: Events in D

2017-08-31 Thread bitwise via Digitalmars-d
On Tuesday, 29 August 2017 at 05:10:25 UTC, bitwise wrote: I needed some C# style events, so I rolled my own. The following is my current event implementation. I was able to make it thread safe by including an optional spin-lock. Of course, that extra spinlock has to be included in every sing

Re: Compiler scalability. Question inspired by OOM errors seen by Crystal language

2017-08-31 Thread Stefan Koch via Digitalmars-d
On Wednesday, 30 August 2017 at 16:34:13 UTC, H. S. Teoh wrote: The CTFE problem will be fixed soon, once Stefan Koch finishes his newCTFE engine. Templates are still an area where a lot of improvement can be made. But Stefan has indicated interest in visiting this area in the compiler afte

Re: newCTFE Status August 2017

2017-08-31 Thread Stefan Koch via Digitalmars-d
On Tuesday, 1 August 2017 at 21:27:32 UTC, Stefan Koch wrote: [ ... ] Hi Guys, many stabilty fixed have happened and as a result the new preview-build is green on the auto-tester and project tester. However it might still produce !!invalid code!! if a certain combination of features trigge

Re: Symbols missing, unmangle!

2017-08-31 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 31 August 2017 at 14:51:59 UTC, Mike Wey wrote: On 30-08-17 23:51, Moritz Maxeiner wrote: 2) Try to get demangling of D symbols into upstream of the currently common linkers (GNU linker, gold, lld, etc.) The GNU linker and gold support demangling D symbols, so if you are on linux

Re: Symbols missing, unmangle!

2017-08-31 Thread Mike Wey via Digitalmars-d
On 30-08-17 23:51, Moritz Maxeiner wrote: 2) Try to get demangling of D symbols into upstream of the currently common linkers (GNU linker, gold, lld, etc.) The GNU linker and gold support demangling D symbols, so if you are on linux try adding `-L--demangle=dlang` to the dmd commandline. --

Re: enum pointers or class references limitation

2017-08-31 Thread Ali Çehreli via Digitalmars-d
On 08/31/2017 01:52 AM, Nicholas Wilson wrote: I think Timon is referring to: enum int[] foo = [1,2,3]; auto bar = foo; auto baz = foo; assert(!(bar is baz)); // Passes Even better: enum int[] foo = [1,2,3]; assert(!(foo is foo)); // Passes Ali

Re: getting dcd completions for dub installed modules

2017-08-31 Thread jmh530 via Digitalmars-d
On Thursday, 31 August 2017 at 13:07:22 UTC, user123 wrote: I'm using "Coedit". http://bbasile.github.io/Coedit/features_dcd.html I haven't used it in a while, but I had tried it in the past and thought it was good.

Re: getting dcd completions for dub installed modules

2017-08-31 Thread user123 via Digitalmars-d
On Thursday, 31 August 2017 at 13:05:36 UTC, user123 wrote: On Monday, 28 August 2017 at 12:00:43 UTC, Fra Mecca wrote: On Sunday, 27 August 2017 at 14:33:24 UTC, user123 wrote: On Sunday, 27 August 2017 at 14:26:20 UTC, Fra Mecca wrote: Hi all, I was wondering how do you get dcd-server to imp

Re: getting dcd completions for dub installed modules

2017-08-31 Thread user123 via Digitalmars-d
On Monday, 28 August 2017 at 12:00:43 UTC, Fra Mecca wrote: On Sunday, 27 August 2017 at 14:33:24 UTC, user123 wrote: On Sunday, 27 August 2017 at 14:26:20 UTC, Fra Mecca wrote: Hi all, I was wondering how do you get dcd-server to import packages installed from dub in ~/.dub The most generic

Re: getting dcd completions for dub installed modules

2017-08-31 Thread Atila Neves via Digitalmars-d
On Monday, 28 August 2017 at 12:00:43 UTC, Fra Mecca wrote: On Sunday, 27 August 2017 at 14:33:24 UTC, user123 wrote: On Sunday, 27 August 2017 at 14:26:20 UTC, Fra Mecca wrote: Hi all, I was wondering how do you get dcd-server to import packages installed from dub in ~/.dub The most generic

Re: D Tour is down

2017-08-31 Thread Anonymouse via Digitalmars-d
On Tuesday, 29 August 2017 at 08:37:23 UTC, Petar Kirov [ZombineDev] wrote: Try clearing your browser cache and try again. Yesterday I experienced the same problem, but after I cleared my cache it was gone. Can confirm, Chromium 60 on Windows and something less on Linux. On a related note, wh

Re: enum pointers or class references limitation

2017-08-31 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 31 August 2017 at 08:40:03 UTC, Dmitry Olshansky wrote: On Wednesday, 30 August 2017 at 12:28:10 UTC, Timon Gehr wrote: On 30.08.2017 11:36, Dmitry Olshansky wrote: The subj is not (any longer) supported by compiler. In fact it used to produce wrong code sometimes and now it just

Re: enum pointers or class references limitation

2017-08-31 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 30 August 2017 at 12:28:10 UTC, Timon Gehr wrote: On 30.08.2017 11:36, Dmitry Olshansky wrote: The subj is not (any longer) supported by compiler. In fact it used to produce wrong code sometimes and now it just plainly rejects it. [..] I think the underlying reason why it doe

Re: C++ / Why Iterators Got It All Wrong

2017-08-31 Thread drug via Digitalmars-d
31.08.2017 09:50, Robert M. Münch пишет: On 2017-08-29 13:23:50 +, Steven Schveighoffer said: ... In Phobos, find gives you a range where the first element is the one you searched for, and the last element is the end of the original range. But what if you wanted all the data *up to* the ele