Error when downloading with +

2014-11-26 Thread RuZzz via Digitalmars-d-learn
Hi ppl! When dub builds the project, he tries to load the http://code.dlang.org/packages/libevent/2.0.1+2.0.16.zip file, and dub gives out this error: Running DUB build dub build @ /mnt/hdd2_3/ftp/workspace_eclipse/axt-d-base-application The following changes will

Re: Reducing Pegged ASTs

2014-11-26 Thread Nordlöw
On Wednesday, 26 November 2014 at 06:09:12 UTC, Philippe Sigaud via Digitalmars-d-learn wrote: IIRC there is a free function in Pegged that does it. What's the name of this function? I did not automate it, because every time I cut down severely a parse tree, I later regret it because I lost

Re: Uninitialized object hangs without warning.

2014-11-26 Thread bearophile via Digitalmars-d-learn
Bear Cherian: Class MyClass{ this(){} void someFunction(){ //body } } And in my app I had something like MyClass classObject; classObject.someFunction(); When I compile, no warnings or errors. If you compile that code (with lowercase Class) with -O the

Re: Error when downloading with +

2014-11-26 Thread Suliman via Digitalmars-d-learn
This is an issue with your version of dub with a buggy url encoding method. Download the latest at code.dlang.org http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/22266/

Cache Building of Pegged-Generated Parsers in a DUB Project

2014-11-26 Thread Nordlöw
I want to cache parsers generated by Pegged grammars in a DUB project by writing the generated parser strings to files. Is it possible to add this build logic somewhere in DUB or do I have to resort to SCons for this?

Re: Error when downloading with +

2014-11-26 Thread RuZzz via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 10:01:32 UTC, Suliman wrote: This is an issue with your version of dub with a buggy url encoding method. Download the latest at code.dlang.org http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/22266/ thanks, up-dating to version 0.9.22

Re: Cache Building of Pegged-Generated Parsers in a DUB Project

2014-11-26 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 10:26:05 UTC, Nordlöw wrote: I want to cache parsers generated by Pegged grammars in a DUB project by writing the generated parser strings to files. Is it possible to add this build logic somewhere in DUB or do I have to resort to SCons for this?

Re: Cache Building of Pegged-Generated Parsers in a DUB Project

2014-11-26 Thread Nordlöw
On Wednesday, 26 November 2014 at 12:09:34 UTC, Stefan Koch wrote: preBuildCommand in check if the files are there if not generate them if yes do nothing Thanks! Documented here http://code.dlang.org/package-format by searching for preBuildCommands

const class

2014-11-26 Thread Oleg via Digitalmars-d-learn
Hello. I can't find siple way to realization this behavior: [code] class A { A parent; void someFunc() const { } void parentCall() const { const(A) cur = this; while( cur ) { cur.someFunc(); cur = cur.parent; } } } [/code] error: cannot modify const

Re: Cache Building of Pegged-Generated Parsers in a DUB Project

2014-11-26 Thread Nordlöw
On Wednesday, 26 November 2014 at 12:09:34 UTC, Stefan Koch wrote: On Wednesday, 26 November 2014 at 10:26:05 UTC, Nordlöw wrote: I want to cache parsers generated by Pegged grammars in a DUB project by writing the generated parser strings to files. Is it possible to add this build logic

Re: const class

2014-11-26 Thread bearophile via Digitalmars-d-learn
Oleg: how create variable that store const object and can be changed to other const object? Take a look at std.typecons.Rebindable/std.typecons.rebindable. Read all Phobos documentation, it helps. Bye, bearophile

Re: windows linker error

2014-11-26 Thread Joakim via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 04:10:08 UTC, Vlad Levenfeld wrote: I'm compiling the latest build from github. (I normally stay up to date with the current builds on 64bit Debian and everything works more or less without a hitch there, but now I need to get some of my tools working in a

Re: Uninitialized object hangs without warning.

2014-11-26 Thread Bear Cherian via Digitalmars-d-learn
On Wednesday, 26 November 2014 at 09:38:11 UTC, bearophile wrote: Bear Cherian: Class MyClass{ this(){} void someFunction(){ //body } } And in my app I had something like MyClass classObject; classObject.someFunction(); When I compile, no warnings or errors. If

Compile-Time Memoization of Pegged-Generated Parser

2014-11-26 Thread Nordlöw
I have working logic for automatic memoization of Pegged-generated parsers from Peg grammars here https://github.com/nordlow/justd/blob/master/firstPegged/source/app.d Now I wonder if this logic could be modularized in some way making it more easy to use (and not so verbose). The key

Re: Compile-Time Memoization of Pegged-Generated Parser

2014-11-26 Thread Nordlöw
On Wednesday, 26 November 2014 at 22:31:04 UTC, Nordlöw wrote: source/app.d(63): Error: no identifier for declarator fileWrites source/app.d(63): Error: Declaration expected, not '~=' source/app.d(64): Error: no identifier for declarator fileWrites source/app.d(64): Error: Declaration expected,

Array toHash()

2014-11-26 Thread David Held via Digitalmars-d-learn
I have a class which contains an int[] and some other stuff. I want to use my class as the key for an AA, so I am overriding toHash(). But the int[] is the only part which should produce the hash code. I know that int[].toHash() is defined somehow, because I can put int[] directly into an

Re: Casting in Safe D

2014-11-26 Thread David Held via Digitalmars-d-learn
On 11/23/2014 3:12 PM, anonymous wrote: [...] And even pointer dereferencing is @safe. Invalid ones will fail with a segfault at run time: void foo(int* a) @safe {*a = 13;} Hmm...throwing an exception is a well-defined behavior, but is segfaulting a well-defined behavior of correct D

Re: Array toHash()

2014-11-26 Thread Ali Çehreli via Digitalmars-d-learn
On 11/26/2014 04:25 PM, David Held wrote: class Foo { override size_t toHash() @trusted pure const nothrow { // error: no property 'toHash' for type 'int[]' return importantStuff.toHash(); } The getHash() member function of the particular TypeInfo

Still not D standard yet ?

2014-11-26 Thread Ledd via Digitalmars-d-learn
I would like to know if something has changed in the plans for the future of D, because I really think it needs some kind of formalization and standardization to be a good investment, especially for medium/large/commercial projects . Thanks.