Re: Persistent list

2015-11-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 16 November 2015 at 14:08:23 UTC, Atila Neves wrote: You described immutable, not const. If one thread has a const reference, it's entirely possible another thread has a mutable reference. Are you sure that this is a well defined situation? What is the point of having "const" if

[Issue 15344] New: m32mscoff switch missing from documentation.

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15344 Issue ID: 15344 Summary: m32mscoff switch missing from documentation. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Daniel Kozak via Digitalmars-d-announce
On Monday, 16 November 2015 at 16:04:09 UTC, David Gileadi wrote: On 11/16/15 8:57 AM, Andrea Fontana wrote: So November is the dmd month and nobody knows. It would make more sense for it to have been D-cember. Not in all languages :) czech november - Listopa-D D-ecember - prosinec So

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Andrea Fontana via Digitalmars-d-announce
On Monday, 16 November 2015 at 15:20:51 UTC, Andrei Alexandrescu wrote: http://erdani.com/d/downloads.daily.png There have been 1677 dmd downloads per day (net after discounting Travis CI) on average over the past 28 days (i.e. four weeks ending Sunday, November 15). That's a new all-times

Re: Invalid foreach aggregate

2015-11-16 Thread Marc Schütz via Digitalmars-d-learn
On Monday, 16 November 2015 at 16:44:27 UTC, Chris wrote: Updating my code from 2.067.1 to 2.069.1 (I skipped 2.068, because I was too busy). I get this error: invalid foreach aggregate, define opApply(), range primitives, or use .tupleof for code like foreach (ref it;

Re: Any D IDE on Mac OSX with debugging support?

2015-11-16 Thread Vadim Lopatin via Digitalmars-d-learn
On Monday, 16 November 2015 at 08:15:36 UTC, Jacob Carlborg wrote: On 2015-11-16 08:48, Rikki Cattermole wrote: On recent versions of OSX, Apple has by default made it so that all applications must be signed by default. You can disable this behavior through system settings and security. I

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Rory McGuire via Digitalmars-d-announce
I'm loving this momentum. Think I've been watching / using D since around 2001 and its never had this much momentum. Something I've noticed over the last year or two is that other developers are more accepting of the fact that I'm that guy that likes D, and they actually ask constructive

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 08:18:55 UTC, Jonathan M Davis wrote: And actually, this gives me an interesting thought. Does making casting away const and mutating defined behavior give us a way to fix our postblit problem? I could see an argument that postblits should be completely

Re: opDispatch and compile time parameters

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/14/15 12:18 AM, Jakob Ovrum wrote: On Saturday, 14 November 2015 at 04:10:59 UTC, Steven Schveighoffer wrote: Is it me, or is this a bug? struct Foo { template opDispatch(string s) { // if you uncomment this, it compiles //void opDispatch() {} void opDispatch(T...)()

Re: on structs by reference

2015-11-16 Thread Alex via Digitalmars-d-learn
On Monday, 16 November 2015 at 07:51:53 UTC, Ali Çehreli wrote: import std.stdio; /* This is the storage to the slices that objects will share. * * (Surprisingly, creating a slice dynamically is not possible due * to syntax issues: new int[N] means "allocates N ints and make * a slice

And in the (quasi-)comedy section…

2015-11-16 Thread Russel Winder via Digitalmars-d
A quote from @SarcasticRover: New studies show that Mars' moon Phobos is slowly breaking up under pressure… but really, who isn't? Life is hard. -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip:

D compiler daily downloads at an all-time high

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
http://erdani.com/d/downloads.daily.png There have been 1677 dmd downloads per day (net after discounting Travis CI) on average over the past 28 days (i.e. four weeks ending Sunday, November 15). That's a new all-times high ever since we started measuring on January 02, 2013. The previous

Re: Epoch time + msecs

2015-11-16 Thread Kagamin via Digitalmars-d-learn
On Monday, 16 November 2015 at 14:21:02 UTC, Ola Fosheim Grøstad wrote: No, to get a period of 2^19937 you need 19937 bits or 2-3 KiB… ;) This computes out of context :) but...

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/14/15 10:44 AM, Andrei Alexandrescu wrote: That doesn't work for me with my unittests, I get: I'm such an idiot, I depended on dpaste to run the unit test, but forgot to check the unit test button. So technically, my updated version *parses* correctly :) Looking in more depth...

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread David Gileadi via Digitalmars-d-announce
On 11/16/15 8:57 AM, Andrea Fontana wrote: So November is the dmd month and nobody knows. It would make more sense for it to have been D-cember.

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/14/15 3:42 AM, Dmitry Olshansky wrote: On 14-Nov-2015 02:10, Andrei Alexandrescu wrote: * Lines 141-152: I couldn't make tail() work with inout. Generally I'm very unhappy about inout. I don't know how to use it. Everything I read about it is extremely complicated compared to its power.

[Issue 15292] [REG2.068.0] Segmentation fault with self-referencing struct / inout / alias this

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15292 --- Comment #2 from Kenji Hara --- (In reply to Vladimir Panteleev from comment #1) > Reduced: > > test.d > struct NullableRef(T) > { > inout(T) get() inout > { > assert(false); > } > >

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/15/15 2:09 PM, Andrei Alexandrescu wrote: On 11/13/2015 06:10 PM, Andrei Alexandrescu wrote: [snip] Thanks all for the feedback. I've uploaded an updated version to http://dpaste.dzfl.pl/52a3013efe34. It doesn't use "inout", but doesn't duplicate code either; instead, it relies on private

Re: Invalid foreach aggregate

2015-11-16 Thread Chris via Digitalmars-d-learn
On Monday, 16 November 2015 at 16:49:19 UTC, Marc Schütz wrote: On Monday, 16 November 2015 at 16:44:27 UTC, Chris wrote: Updating my code from 2.067.1 to 2.069.1 (I skipped 2.068, because I was too busy). I get this error: invalid foreach aggregate, define opApply(), range primitives, or

Re: Linker error from dub?

2015-11-16 Thread Stiff via Digitalmars-d-learn
On Thursday, 12 November 2015 at 06:11:37 UTC, BBasile wrote: On Thursday, 12 November 2015 at 06:03:49 UTC, BBasile wrote: It worked fine because it was not used, not parsed, not linked. Maybe just the functions declarations was parsed to solve the symbols in the program, but since none was

Re: Any D IDE on Mac OSX with debugging support?

2015-11-16 Thread Vadim Lopatin via Digitalmars-d-learn
On Monday, 16 November 2015 at 07:48:31 UTC, Rikki Cattermole wrote: On 16/11/15 7:45 PM, Vadim Lopatin wrote: Hello, Is there any IDE which allows debugging D apps on OSX? I'm trying Mono-D, but getting error "Debugger operation failed A syntax error in expression, near

Invalid foreach aggregate

2015-11-16 Thread Chris via Digitalmars-d-learn
Updating my code from 2.067.1 to 2.069.1 (I skipped 2.068, because I was too busy). I get this error: invalid foreach aggregate, define opApply(), range primitives, or use .tupleof for code like foreach (ref it; myArray.doSomething) {} Probably not the best idea anyway. What's the best

Re: Style guide is very inconsistent

2015-11-16 Thread maik klein via Digitalmars-d
On Monday, 16 November 2015 at 14:26:41 UTC, Jonathan M Davis wrote: On Monday, 16 November 2015 at 14:09:45 UTC, maik klein wrote: [...] Per the style guide, = Eponymous Templates [...] Okay thanks, but I am still not sure about my example. I am pretty sure that at least "any"

Re: Persistent list

2015-11-16 Thread Marc Schütz via Digitalmars-d
On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote: Yah, I agree with that argument. Probably @mutable is a more principled way to go about things. Glad to here that. I think the current transitive const system is really good and shouldn't be watered down beyond necessity.

Re: All functions COMDAT on OSX

2015-11-16 Thread bitwise via Digitalmars-d
On Monday, 16 November 2015 at 08:15:39 UTC, Walter Bright wrote: On 11/15/2015 8:44 PM, bitwise wrote: https://issues.dlang.org/show_bug.cgi?id=15342 DMD emits all functions as COMDAT on OSX. I'm guessing this was originally a workaround of some kind...does anybody know the story? Thanks,

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 08:51 AM, Marc Schütz wrote: On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote: Yah, I agree with that argument. Probably @mutable is a more principled way to go about things. Glad to here that. I think the current transitive const system is really good and

Re: Persistent list

2015-11-16 Thread Marc Schütz via Digitalmars-d
On Sunday, 15 November 2015 at 20:23:58 UTC, Dicebot wrote: On Friday, 13 November 2015 at 23:10:04 UTC, Andrei Alexandrescu wrote: I created a simple persistent list with reference counting and custom allocation at http://dpaste.dzfl.pl/0981640c2835. There is also another thing I wanted to

[Issue 15343] New: The compiler performs insufficient analysis to check if a structure is actually nested

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15343 Issue ID: 15343 Summary: The compiler performs insufficient analysis to check if a structure is actually nested Product: D Version: D2 Hardware: All OS: All

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 14:08:23 UTC, Atila Neves wrote: You described immutable, not const. If one thread has a const reference, it's entirely possible another thread has a mutable reference. Only if it's shared, or you've screwed up with casting and ended up with an object which is

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 14:45:35 UTC, Andrei Alexandrescu wrote: On 11/16/2015 08:51 AM, Marc Schütz wrote: On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote: Yah, I agree with that argument. Probably @mutable is a more principled way to go about things. Glad to

Re: Andrei's Quora comments on Reddit: "D has no vision. Go is out of its depth. Rust skipped leg day."

2015-11-16 Thread Elvis Zhou via Digitalmars-d-announce
On Thursday, 12 November 2015 at 11:55:18 UTC, Namal wrote: On Wednesday, 11 November 2015 at 19:51:45 UTC, Ali Çehreli wrote: On 11/11/2015 06:42 AM, Namal wrote: someone was saying that it is possible to call c++ standard library from D. Is there an example how to do this? Here is the

Re: RFC in Comparison between Rust, D and Go

2015-11-16 Thread Jacob Carlborg via Digitalmars-d
On 2015-11-14 07:31, Sergey Korshunoff via Digitalmars-d wrote: PS: you just say that C is not suitable for the system programming Well, he is the creator of D ;) -- /Jacob Carlborg

Re: Epoch time + msecs

2015-11-16 Thread Kagamin via Digitalmars-d-learn
On Monday, 16 November 2015 at 10:47:36 UTC, Marc Schütz wrote: Hmmm... why is `unpredictableSeed` only a `uint`? Surely most PRNGs have more than 32 bits of internal state? Maybe it's only worth 32 random bits? There's a rangified example too:

[Issue 15305] std.manip.bitfields generate bogous code

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15305 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8e452d8dd484866a6be2c3c180a664ee57b16905 [Issue 15305]

Re: Persistent list

2015-11-16 Thread Atila Neves via Digitalmars-d
On Monday, 16 November 2015 at 09:42:43 UTC, Ola Fosheim Grøstad wrote: On Monday, 16 November 2015 at 09:04:33 UTC, Joseph Cassman wrote: [...] The D designers might want to look at Pony lang's capability system, which has been proven sound. It has 6 different aliasing capabilites that

Style guide is very inconsistent

2015-11-16 Thread maik klein via Digitalmars-d
I am a very new D user and I almost always try to mirror the "official" style guide if one is available. http://dlang.org/dstyle.html I have written the following function template Contains(C...){ template Any(T...){ import std.meta: anySatisfy; static if(T.length == 0){ enum

Re: Style guide is very inconsistent

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 14:09:45 UTC, maik klein wrote: Why are the variadics written in lower case? Per the style guide, = Eponymous Templates Templates which have the same name as a symbol within that template (and instantiations of that template are therefore replaced with

[Issue 15334] OS X core.time ticksPerSecond calculation is incorrect

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15334 Steven Schveighoffer changed: What|Removed |Added CC|

Re: Epoch time + msecs

2015-11-16 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Monday, 16 November 2015 at 13:34:41 UTC, Kagamin wrote: On Monday, 16 November 2015 at 10:47:36 UTC, Marc Schütz wrote: Hmmm... why is `unpredictableSeed` only a `uint`? Surely most PRNGs have more than 32 bits of internal state? Maybe it's only worth 32 random bits? There's a rangified

Re: DConf 2016 Early Bird Registration Open

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
In social media: https://twitter.com/D_Programming/status/666306169380536322 https://www.facebook.com/dlang.org/posts/1169994593014220 https://www.reddit.com/r/programming/comments/3t1iu9/dconf_2016_early_bird_registration_open/ Please spread the news. See you at DConf! Andrei

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 11:03 AM, Steven Schveighoffer wrote: On 11/14/15 10:44 AM, Andrei Alexandrescu wrote: That doesn't work for me with my unittests, I get: I'm such an idiot, I depended on dpaste to run the unit test, but forgot to check the unit test button. So technically, my updated version

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 11:03 AM, Steven Schveighoffer wrote: On 11/14/15 10:44 AM, Andrei Alexandrescu wrote: That doesn't work for me with my unittests, I get: I'm such an idiot, I depended on dpaste to run the unit test, but forgot to check the unit test button. So technically, my updated version

Re: Style guide is very inconsistent

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 16:42:57 UTC, maik klein wrote: On Monday, 16 November 2015 at 14:26:41 UTC, Jonathan M Davis wrote: On Monday, 16 November 2015 at 14:09:45 UTC, maik klein wrote: [...] Per the style guide, = Eponymous Templates [...] Okay thanks, but I am still not

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread ixid via Digitalmars-d-announce
On Monday, 16 November 2015 at 15:20:51 UTC, Andrei Alexandrescu wrote: That's a new all-times high ever since we started measuring on January 02, 2013. The previous record, 1630 average daily downloads, was established in the four weeks ending November 17, 2014. Andrei That looks more

Re: Wanted: Review manager for std.experimental.range.ndslice

2015-11-16 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 16 November 2015 at 09:56:57 UTC, Andrea Fontana wrote: On Monday, 16 November 2015 at 03:05:03 UTC, Ilya Yaroshenko wrote: Hello, Review manager for N-dimensional ranges is wanted Docs (see PR for latest version):

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Saurabh Das via Digitalmars-d-announce
On Monday, 16 November 2015 at 15:20:51 UTC, Andrei Alexandrescu wrote: http://erdani.com/d/downloads.daily.png There have been 1677 dmd downloads per day (net after discounting Travis CI) on average over the past 28 days (i.e. four weeks ending Sunday, November 15). That's a new all-times

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Daniel Kozak via Digitalmars-d-announce
On Monday, 16 November 2015 at 17:49:34 UTC, ixid wrote: On Monday, 16 November 2015 at 15:20:51 UTC, Andrei Alexandrescu wrote: That's a new all-times high ever since we started measuring on January 02, 2013. The previous record, 1630 average daily downloads, was established in the four weeks

Re: All functions COMDAT on OSX

2015-11-16 Thread Marc Schütz via Digitalmars-d
On Monday, 16 November 2015 at 14:37:33 UTC, bitwise wrote: On Monday, 16 November 2015 at 08:15:39 UTC, Walter Bright wrote: On 11/15/2015 8:44 PM, bitwise wrote: https://issues.dlang.org/show_bug.cgi?id=15342 DMD emits all functions as COMDAT on OSX. I'm guessing this was originally a

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/15/15 9:54 AM, Andrei Alexandrescu wrote: On 11/15/2015 09:34 AM, Dicebot wrote: On Sunday, 15 November 2015 at 14:23:05 UTC, Jonathan M Davis wrote: As I mentioned, he's okay with changing the language to make the casts well defined. -- Andrei Well, that's a big change, since it

DConf 2016 Early Bird Registration Open

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
http://dconf.org/2016/registration.html The DConf 2016 registration is now open. Early bird registration is $250, regular registration (after we publish the schedule on Feb 29) is $400. Those of you who cannot attend are welcome to figure as individual sponsors for $50. We are in the

Re: D compiler daily downloads at an all-time high

2015-11-16 Thread Joakim via Digitalmars-d-announce
On Monday, 16 November 2015 at 15:20:51 UTC, Andrei Alexandrescu wrote: http://erdani.com/d/downloads.daily.png There have been 1677 dmd downloads per day (net after discounting Travis CI) on average over the past 28 days (i.e. four weeks ending Sunday, November 15). That's a new all-times

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 11:58 AM, Steven Schveighoffer wrote: On 11/15/15 2:09 PM, Andrei Alexandrescu wrote: On 11/13/2015 06:10 PM, Andrei Alexandrescu wrote: [snip] Thanks all for the feedback. I've uploaded an updated version to http://dpaste.dzfl.pl/52a3013efe34. It doesn't use "inout", but doesn't

[Issue 15335] getSymbolsByUDA fails if type has private members

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15335 bb.t...@gmx.com changed: What|Removed |Added CC||bb.t...@gmx.com --- Comment #1 from

Re: All functions COMDAT on OSX

2015-11-16 Thread bitwise via Digitalmars-d
On Monday, 16 November 2015 at 17:09:05 UTC, Marc Schütz wrote: On Monday, 16 November 2015 at 14:37:33 UTC, bitwise wrote: On Monday, 16 November 2015 at 08:15:39 UTC, Walter Bright wrote: On 11/15/2015 8:44 PM, bitwise wrote: https://issues.dlang.org/show_bug.cgi?id=15342 DMD emits all

Re: Invalid foreach aggregate

2015-11-16 Thread opla via Digitalmars-d-learn
On Monday, 16 November 2015 at 16:55:29 UTC, Chris wrote: On Monday, 16 November 2015 at 16:49:19 UTC, Marc Schütz wrote: On Monday, 16 November 2015 at 16:44:27 UTC, Chris wrote: Updating my code from 2.067.1 to 2.069.1 (I skipped 2.068, because I was too busy). I get this error: invalid

[Issue 15345] New: Assembler highlighting done wrong

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15345 Issue ID: 15345 Summary: Assembler highlighting done wrong Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: minor Priority: P1

[Issue 15346] New: Calling interface methods on out contracts causes segfaults

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15346 Issue ID: 15346 Summary: Calling interface methods on out contracts causes segfaults Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 12:42 PM, Steven Schveighoffer wrote: On 11/16/15 12:35 PM, Steven Schveighoffer wrote: I'm afraid without a working example, I can't figure out what's *supposed* to work with inout/const. Update, saw your other note. Working now, trying to figure out how to do this correctly

[Issue 15334] [REG 2.069] OS X core.time ticksPerSecond calculation is incorrect

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15334 Steven Schveighoffer changed: What|Removed |Added Summary|OS X core.time |[REG 2.069] OS X

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 1:37 PM, Andrei Alexandrescu wrote: On 11/16/2015 12:51 PM, Steven Schveighoffer wrote: List tail() const I'd like tail to be qualifier-idempotent, i.e. return const for const and non-const for non-const. -- Andrei Why? const(int)[] isn't const, why should List!(const(int))

Re: DConf 2016 Early Bird Registration Open

2015-11-16 Thread Daniel Kozak via Digitalmars-d-announce
On Monday, 16 November 2015 at 17:18:04 UTC, Andrei Alexandrescu wrote: http://dconf.org/2016/registration.html The DConf 2016 registration is now open. Early bird registration is $250, regular registration (after we publish the schedule on Feb 29) is $400. Those of you who cannot attend

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 11:58 AM, Lionello Lunesu wrote: On 16/11/15 22:45, Andrei Alexandrescu wrote: On 11/16/2015 08:51 AM, Marc Schütz wrote: On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote: Yah, I agree with that argument. Probably @mutable is a more principled way to go

[Issue 15334] OS X core.time ticksPerSecond calculation is incorrect

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15334 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/fdad9f502dc3a5cac0bac0cfa7d55fc4b7c273b5 Merge pull request

[Issue 15334] OS X core.time ticksPerSecond calculation is incorrect

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15334 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Persistent list

2015-11-16 Thread Dmitry Olshansky via Digitalmars-d
On 16-Nov-2015 19:44, Steven Schveighoffer wrote: On 11/14/15 3:42 AM, Dmitry Olshansky wrote: On 14-Nov-2015 02:10, Andrei Alexandrescu wrote: * Lines 141-152: I couldn't make tail() work with inout. Generally I'm very unhappy about inout. I don't know how to use it. Everything I read about

Re: Style guide is very inconsistent

2015-11-16 Thread maik klein via Digitalmars-d
On Monday, 16 November 2015 at 17:47:10 UTC, Jonathan M Davis wrote: [...] Thanks for going into so much detail.

Re: Invalid foreach aggregate

2015-11-16 Thread Chris via Digitalmars-d-learn
On Monday, 16 November 2015 at 17:57:53 UTC, opla wrote: On Monday, 16 November 2015 at 16:55:29 UTC, Chris wrote: On Monday, 16 November 2015 at 16:49:19 UTC, Marc Schütz wrote: On Monday, 16 November 2015 at 16:44:27 UTC, Chris wrote: Updating my code from 2.067.1 to 2.069.1 (I skipped

writef format specifier error message

2015-11-16 Thread ric maicle via Digitalmars-d-learn
I accidentally typed an extra asterisk in the format specifier. I know that it is wrong but the error isn't clear about what and where the error is. import std.stdio; void main() { writef("%*10s", 100); } and I got the following error message(s): $ dmd -run writef.d

Re: Persistent list

2015-11-16 Thread Timon Gehr via Digitalmars-d
On 11/16/2015 07:37 PM, Andrei Alexandrescu wrote: On 11/16/2015 12:51 PM, Steven Schveighoffer wrote: List tail() const I'd like tail to be qualifier-idempotent, i.e. return const for const and non-const for non-const. -- Andrei "Qualifier-idempotent" would rather mean that taking the

Re: And in the (quasi-)comedy section…

2015-11-16 Thread Marc Schütz via Digitalmars-d
On Monday, 16 November 2015 at 14:33:26 UTC, Russel Winder wrote: A quote from @SarcasticRover: New studies show that Mars' moon Phobos is slowly breaking up under pressure… but really, who isn't? Life is hard. You know, I saw this piece of news, but refrained from making a comment here.

Re: Persistent list

2015-11-16 Thread Lionello Lunesu via Digitalmars-d
On 16/11/15 22:45, Andrei Alexandrescu wrote: On 11/16/2015 08:51 AM, Marc Schütz wrote: On Monday, 16 November 2015 at 02:26:29 UTC, Andrei Alexandrescu wrote: Yah, I agree with that argument. Probably @mutable is a more principled way to go about things. Glad to here that. I think the

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 1:15 PM, Dmitry Olshansky wrote: On 16-Nov-2015 19:44, Steven Schveighoffer wrote: On 11/14/15 3:42 AM, Dmitry Olshansky wrote: On 14-Nov-2015 02:10, Andrei Alexandrescu wrote: * Lines 141-152: I couldn't make tail() work with inout. Generally I'm very unhappy about inout. I

Re: DConf 2016 Early Bird Registration Open

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 11/16/2015 12:31 PM, Daniel Kozak wrote: On Monday, 16 November 2015 at 17:18:04 UTC, Andrei Alexandrescu wrote: http://dconf.org/2016/registration.html The DConf 2016 registration is now open. Early bird registration is $250, regular registration (after we publish the schedule on Feb 29)

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 12:35 PM, Steven Schveighoffer wrote: I'm afraid without a working example, I can't figure out what's *supposed* to work with inout/const. Update, saw your other note. Working now, trying to figure out how to do this correctly without any duplication (or wrapping). -Steve

Re: Bitfield bug

2015-11-16 Thread deadalnix via Digitalmars-d
On Monday, 16 November 2015 at 11:20:48 UTC, Lionello Lunesu wrote: On 16/11/15 18:05, deadalnix wrote: https://issues.dlang.org/show_bug.cgi?id=15305 Any taker ? I don't think this is that hard to fix, and this is really bad. https://github.com/D-Programming-Language/phobos/pull/3815 <3

Re: Tonight: Introduction to D at Codeaholics (HK)

2015-11-16 Thread Walter Bright via Digitalmars-d-announce
On 11/11/2015 9:37 AM, Adam D. Ruppe wrote: On Wednesday, 11 November 2015 at 17:30:07 UTC, Lionello Lunesu wrote: as being a semantic difference, with no difference in memory layout. One can be indexed meaningfully, the other can't.) Eh, indexing char[] is meaningful, you just need to know

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 12:51 PM, Steven Schveighoffer wrote: List tail() const I'd like tail to be qualifier-idempotent, i.e. return const for const and non-const for non-const. -- Andrei

Re: writef format specifier error message

2015-11-16 Thread Ali Çehreli via Digitalmars-d-learn
On 11/16/2015 10:56 AM, ric maicle wrote: I accidentally typed an extra asterisk in the format specifier. I know that it is wrong but the error isn't clear about what and where the error is. import std.stdio; void main() { writef("%*10s", 100); } and I got the following error message(s): $

Re: DWT fails to build with DMD 2.069.1

2015-11-16 Thread Jacob Carlborg via Digitalmars-d-dwt
On 2015-11-11 17:17, Mike James wrote: Hi. Is there an updated release of DWT for 2.069? There seems to be a deprecation problem... Should be working now (at least on Windows). -- /Jacob Carlborg

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 04:36 PM, Steven Schveighoffer wrote: We can and should fix this. I'll file an issue if none has been filed. That's great! -- Andrei

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 21:25:52 UTC, Timon Gehr wrote: On 11/16/2015 10:18 PM, Jonathan M Davis wrote: I don't know of any way to templatize a member function on the type of the this pointer/reference, but maybe there's a template feature with which I'm not familiar enough. Indeed

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 04:18 PM, Jonathan M Davis wrote: When you can templatize the function on the type that would otherwise be inout, then there really isn't any reason to use inout. But what do you do when you're dealing with a member function - especially on a class? I don't know of any way to

Looking for a language to hang my hat on.

2015-11-16 Thread Dan via Digitalmars-d-learn
I am a very new c++ programmer, having just learned the language this year. A few months ago I completed a course on Coursera that dealt with the security aspect of c (which I don't know, but it is similar enough): https://class.coursera.org/softwaresec-008 The course highlighted just how

Re: Our template emission strategy is broken

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 09:05:16 UTC, Marco Leise wrote: Am Wed, 11 Nov 2015 14:23:15 + schrieb Martin Nowak : Think of that for a moment, no package manager allows you to have cycles in your dependencies. There are package managers that allow packages to mutually

Re: And in the (quasi-)comedy section…

2015-11-16 Thread bitwise via Digitalmars-d
On Monday, 16 November 2015 at 17:05:14 UTC, Marc Schütz wrote: On Monday, 16 November 2015 at 14:33:26 UTC, Russel Winder wrote: A quote from @SarcasticRover: New studies show that Mars' moon Phobos is slowly breaking up under pressure… but really, who isn't? Life is hard. You know, I saw

Re: Persistent list

2015-11-16 Thread Timon Gehr via Digitalmars-d
On 11/16/2015 10:18 PM, Jonathan M Davis wrote: I don't know of any way to templatize a member function on the type of the this pointer/reference, but maybe there's a template feature with which I'm not familiar enough. Indeed there is. class C{ void foo(this T)(){ pragma(msg, T); } }

Re: Wanted: Review manager for std.experimental.range.ndslice

2015-11-16 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 16 November 2015 at 21:01:03 UTC, Jack Stouffer wrote: On Monday, 16 November 2015 at 20:12:37 UTC, Ilya wrote: It is very close draft: http://wiki.dlang.org/Review/Process I volunteer then, if you'll have me. Great! Thank you :)

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 21:36:41 UTC, Steven Schveighoffer wrote: I just did the naive thing and slapped inout on your functions. This is what I got: persistent_list2.d(146): Error: cannot implicitly convert expression (( List!(immutable(int)) __slList1681 = List(null, null); ,

[Issue 15347] New: error message for converting return value with ctor/dtor is horrible

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15347 Issue ID: 15347 Summary: error message for converting return value with ctor/dtor is horrible Product: D Version: D2 Hardware: All OS: All Status:

Re: Persistent list

2015-11-16 Thread Jonathan M Davis via Digitalmars-d
On Monday, 16 November 2015 at 21:47:07 UTC, Andrei Alexandrescu wrote: On 11/16/2015 04:18 PM, Jonathan M Davis wrote: When you can templatize the function on the type that would otherwise be inout, then there really isn't any reason to use inout. But what do you do when you're dealing with a

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 3:48 PM, Andrei Alexandrescu wrote: I think the main problem is the difficulty of getting from "I want to make this method work with mutable and nonconst data" to "I have a working solution using inout". Again, it's not that hard. I have had little trouble with using it instead

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 5:02 PM, Jonathan M Davis wrote: On Monday, 16 November 2015 at 21:47:07 UTC, Andrei Alexandrescu wrote: On 11/16/2015 04:18 PM, Jonathan M Davis wrote: When you can templatize the function on the type that would otherwise be inout, then there really isn't any reason to use inout.

Re: Persistent list

2015-11-16 Thread Observer via Digitalmars-d
On Monday, 16 November 2015 at 16:58:24 UTC, Lionello Lunesu wrote: If it's RC we want, then @mutable is an axe when what we need is a scalpel. The non-observability comes from the fact the refcount is changed when the caller has lost its (const) reference and constness is a moot point.

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 05:02 PM, Jonathan M Davis wrote: It's just that you use inout instead of const. How is that worse? The short answer is my perception is inout is too complicated for what it does. -- Andrei

[Issue 15305] std.manip.bitfields generate bogous code

2015-11-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15305 David Nadlinger changed: What|Removed |Added Status|NEW |RESOLVED

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 05:30 PM, Steven Schveighoffer wrote: I'll reiterate what I said elsewhere: inout is better, safer, and easier to maintain than the template solution. Do you have a working solution in dpaste? No change to the return types please. -- Andrei

Formal Review of std.range.ndslice

2015-11-16 Thread Jack Stouffer via Digitalmars-d
This is the start of the two week formal review for the proposed std.range.ndslice. This new addition to the standard library would add the ability to create and manipulate multi-dimensional random access ranges in a way that will be very familiar to those of you who use numpy. This has the

Re: Persistent list

2015-11-16 Thread Steven Schveighoffer via Digitalmars-d
On 11/16/15 4:49 PM, Andrei Alexandrescu wrote: On 11/16/2015 04:36 PM, Steven Schveighoffer wrote: We can and should fix this. I'll file an issue if none has been filed. That's great! -- Andrei https://issues.dlang.org/show_bug.cgi?id=15347 Note that the trigger is the ctor and dtor of

Formal Review of std.range.ndslice

2015-11-16 Thread Jack Stouffer via Digitalmars-d-announce
http://forum.dlang.org/post/uesnmkgniumswfclw...@forum.dlang.org

Re: Persistent list

2015-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2015 03:38 PM, Steven Schveighoffer wrote: On 11/16/15 2:37 PM, Andrei Alexandrescu wrote: On 11/16/2015 01:55 PM, Steven Schveighoffer wrote: On 11/16/15 1:37 PM, Andrei Alexandrescu wrote: On 11/16/2015 12:51 PM, Steven Schveighoffer wrote: List tail() const I'd like tail

  1   2   >