Re: Crystal

2013-03-21 Thread Steven Schveighoffer
On Wed, 20 Mar 2013 13:32:50 -0400, Russel Winder rus...@winder.org.uk wrote: PS http://www.digitalmars.com/d/archives/digitalmars/D/announce/ appears to stop in 2012-12 http://forum.dlang.org/group/digitalmars.D.announce Don't use that other thing any more. -Steve

Re: DUB 0.9.11 released

2013-03-21 Thread 1100110
On 03/18/2013 05:51 AM, Jordi Sayol wrote: Al 17/03/13 23:29, En/na 1100110 ha escrit: On 03/17/2013 04:05 PM, Jordi Sayol wrote: Al 17/03/13 21:41, En/na Russel Winder ha escrit: On Sun, 2013-03-17 at 20:00 +0100, Jordi Sayol wrote: Al 17/03/13 19:22, En/na Russel Winder ha escrit: […] I

Re: Proposal for Deimos documentation

2013-03-21 Thread 1100110
On 03/20/2013 05:04 PM, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos. Besides comments to

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-21 Thread Jonathan M Davis
On Monday, March 18, 2013 00:19:03 Peter Williams wrote: So my question is Why are the arguments to opEquals and opCmp (for Objects) not declared in or const?. By the way, this is post where it was officially decided that we'd be working on removing opCmp, opEquals, toHash, and toString from

Re: Proposal for Deimos documentation

2013-03-21 Thread 1100110
On 03/20/2013 05:04 PM, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos. Besides comments to

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-21 Thread deadalnix
On Wednesday, 20 March 2013 at 04:39:14 UTC, Jonathan M Davis wrote: On Tuesday, March 19, 2013 20:51:28 Stewart Gordon wrote: But the question still remains: How do we implement this change without causing mass disruption? It might be the case that programmers just need to remove

Re: What's missing from Phobos for Orbit (package manager)

2013-03-21 Thread Jacob Carlborg
On 2013-03-20 23:17, Graham Fawcett wrote: But present and blank aren't opposites in English. isNonBlank or isNotBlank are opposites of isBlank, but isPresent would be the opposite of isAbsent. It seems almost meaningless in the context of a string predicate --- If I saw it in code, I would

Re: What's missing from Phobos for Orbit (package manager)

2013-03-21 Thread Jacob Carlborg
On 2013-03-20 21:18, Simen Kjaeraas wrote: I say do the review, make things faster afterwards. There'll always be stuff you can do better, and it's not really harder to do after a review. Plus, that will get it into Phobos faster. Sorry about necroing the thread, btw. My mail client ferked up

Re: Why are opEquals/opCmp arguments not in or const for Objects?

2013-03-21 Thread Jonathan M Davis
On Thursday, March 21, 2013 08:29:28 deadalnix wrote: Wouldn't that trigger bunch of false warning on legitimate overloaded opSomething ? I'm not sure that overriding a deprecated function triggers a deprecation warning, but regardless, for opEquals and opCmp, that wouldn't be a problem,

Re: seg fault due to a ref parameter with default value

2013-03-21 Thread Rob T
http://d.puremagic.com/issues/show_bug.cgi?id=9773

Re: Can we get rid of non-raw write?

2013-03-21 Thread Paulo Pinto
On Thursday, 21 March 2013 at 05:01:06 UTC, Kagamin wrote: On Wednesday, 20 March 2013 at 14:34:21 UTC, Nick Sabalausky wrote: Since *at least* as far back as XP, Windows has handled \n newlines perfectly fine. The command line displays them properly, .BAT scripts handle them properly, every

Re: Online D course on coursera/udacity/etc?

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 02:52, Alan wrote: I really wanted to use GtkD for example (I know it is an extension for the language, not part of it), but the only tutorials I could find with good examples were for C, C++, C#, Python, etc. For someone like me who does not have much experience writing a GUI,

Re: Can we get rid of non-raw write?

2013-03-21 Thread Jacob Carlborg
On 2013-03-20 22:08, Nick Sabalausky wrote: I doubt there's a bugzilla entry for this since it is, unfortunately, the intended behavior. I didn't want to go posting a 'zilla issue for it before discussing here because I figured that might just end up INVALID or WONTFIX. If you make it an

Re: Can we get rid of non-raw write?

2013-03-21 Thread Jacob Carlborg
On 2013-03-20 23:00, Graham Fawcett wrote: Is anyone still using MacOS earlier than version 10 (OSX)? Mac OS 9 was discontinued in 2002. On OSX, there's certainly no problem with Unix line endings. But I guess if we include ancient Windows support as an option, then ancient Mac support should

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 11:00, Jacob Carlborg wrote: I would say that each #include should have _at least_ one corresponding import. Then there could be additional imports as well. Sure, there could be unnecessary includes but that's not very likely. Forgot to say, I usually just remove all includes

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 07:59, 1100110 wrote: In particular, Replace C's include Each #include needs to have a corresponding import path.to.header; That has certainly not been my experience. Often one D import will map to a couple of c includes. I would suggest amending that statement.

Re: Optlink is on github? No, it's just a mean joke from Walter!

2013-03-21 Thread Denis Shelomovskij
19.03.2013 2:34, Denis Shelomovskij пишет: 1. DM C++ compiler source is required to build Optlink. 2. C++ compiler is not open-source. 3. You can not build Optlink. 4. Walter isn't going to change anything It works now! Thanks be to God! Optlink Issue 7139 now looks like this (with Optlink

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-20 23:04, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos. Besides comments to improve

Re: The new std.process is ready for review

2013-03-21 Thread Vladimir Panteleev
On Wednesday, 20 March 2013 at 22:46:58 UTC, Lars T. Kyllingstad wrote: Sorry for the delay, but I've pushed a new version now. There are still a few things I haven't done wrt. documentation* and unittests**, but the changes to the API and internals should be in place. Since (IIRC) all

Re: Proposal for Deimos documentation

2013-03-21 Thread 1100110
On 03/21/2013 05:00 AM, Jacob Carlborg wrote: On 2013-03-21 07:59, 1100110 wrote: In particular, Replace C's include Each #include needs to have a corresponding import path.to.header; That has certainly not been my experience. Often one D import will map to a couple of c includes. I

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 13:01, 1100110 wrote: Oh, we aren't on the same page. Here, I'm curious as to how you would translate these into D. #include stdbool.h #include stdarg.h/* we need va_list */ #include stddef.h/* we want wchar_t */ Right, that's a good point. You still need stddef if you

Re: What's missing from Phobos for Orbit (package manager)

2013-03-21 Thread Graham Fawcett
On Thursday, 21 March 2013 at 07:39:53 UTC, Jacob Carlborg wrote: On 2013-03-20 23:17, Graham Fawcett wrote: But present and blank aren't opposites in English. isNonBlank or isNotBlank are opposites of isBlank, but isPresent would be the opposite of isAbsent. It seems almost meaningless in

Re: Proposal for Deimos documentation

2013-03-21 Thread 1100110
On 03/21/2013 07:09 AM, Jacob Carlborg wrote: On 2013-03-21 13:01, 1100110 wrote: Oh, we aren't on the same page. Here, I'm curious as to how you would translate these into D. #include stdbool.h #include stdarg.h /* we need va_list */ #include stddef.h /* we want wchar_t */ Right, that's a

Re: Proposal for Deimos documentation

2013-03-21 Thread Craig Dillabaugh
On Wednesday, 20 March 2013 at 22:04:50 UTC, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos.

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
1100110 wrote: On 03/20/2013 05:04 PM, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos.

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
1100110 wrote: On 03/20/2013 05:04 PM, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos.

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
Jens Mueller wrote: 1100110 wrote: On 03/20/2013 05:04 PM, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
Jacob Carlborg wrote: On 2013-03-20 23:04, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos.

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
Craig Dillabaugh wrote: On Wednesday, 20 March 2013 at 22:04:50 UTC, Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more

Re: Can we get rid of non-raw write?

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 10:41:35 +0100 Jacob Carlborg d...@me.com wrote: On 2013-03-20 22:08, Nick Sabalausky wrote: I doubt there's a bugzilla entry for this since it is, unfortunately, the intended behavior. I didn't want to go posting a 'zilla issue for it before discussing here because I

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 14:53, 1100110 wrote: That does sound vaguely familiar... Yes, it's size is 16 on Windows and 32 on Linux and OSX. My bad, dchar then. (with wchar for Windows) Or just use wchar_t and it will work correctly, I assume. -- /Jacob Carlborg

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 15:35, Jens Mueller wrote: My bad. The sentence does not belong there. It belongs to Tag the library version. Though I'm not sure how to do this yet. Will fix. Thanks. Perhaps we could create list that maps C defines to D versions. Example, for Mac OS X the __APPLE__ define is

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
Jacob Carlborg wrote: On 2013-03-21 15:35, Jens Mueller wrote: My bad. The sentence does not belong there. It belongs to Tag the library version. Though I'm not sure how to do this yet. Will fix. Thanks. Perhaps we could create list that maps C defines to D versions. Example, for Mac OS

Re: Proposal for Deimos documentation

2013-03-21 Thread 1100110
On 03/21/2013 10:25 AM, Jacob Carlborg wrote: On 2013-03-21 14:53, 1100110 wrote: That does sound vaguely familiar... Yes, it's size is 16 on Windows and 32 on Linux and OSX. My bad, dchar then. (with wchar for Windows) Or just use wchar_t and it will work correctly, I assume. Ok, you

Re: The new std.process is ready for review

2013-03-21 Thread H. S. Teoh
On Thu, Mar 21, 2013 at 12:08:00PM +0100, Vladimir Panteleev wrote: On Wednesday, 20 March 2013 at 22:46:58 UTC, Lars T. Kyllingstad wrote: Sorry for the delay, but I've pushed a new version now. There are still a few things I haven't done wrt. documentation* and unittests**, but the changes

Re: Can we get rid of non-raw write?

2013-03-21 Thread Dmitry Olshansky
21-Mar-2013 09:01, Kagamin пишет: On Wednesday, 20 March 2013 at 14:34:21 UTC, Nick Sabalausky wrote: Since *at least* as far back as XP, Windows has handled \n newlines perfectly fine. The command line displays them properly, .BAT scripts handle them properly, every code editor in existence

Re: The new std.process is ready for review

2013-03-21 Thread 1100110
On 03/21/2013 11:35 AM, H. S. Teoh wrote: On Thu, Mar 21, 2013 at 12:08:00PM +0100, Vladimir Panteleev wrote: On Wednesday, 20 March 2013 at 22:46:58 UTC, Lars T. Kyllingstad wrote: Sorry for the delay, but I've pushed a new version now. There are still a few things I haven't done wrt.

Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
Suppose you create a range: struct MyRange{...} Now you have to unittest it. And there's a lot of ways a range implementation can go wrong. There's a fair amount of things to test. And they all, ideally, need to be done for *every* range type created. But, ranges are all supposed to conform to a

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Jonathan M Davis
On Thursday, March 21, 2013 13:08:58 Nick Sabalausky wrote: Suppose you create a range: struct MyRange{...} Now you have to unittest it. And there's a lot of ways a range implementation can go wrong. There's a fair amount of things to test. And they all, ideally, need to be done for *every*

Re: The new std.process is ready for review

2013-03-21 Thread Lars T. Kyllingstad
On Thursday, 21 March 2013 at 16:37:38 UTC, H. S. Teoh wrote: On Thu, Mar 21, 2013 at 12:08:00PM +0100, Vladimir Panteleev wrote: Since (IIRC) all issues regarding incompatibility with std.process have been resolved, how about renaming the module to std.process? This way it'll also be easier

Re: Proposal for Deimos documentation

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 16:40, Jens Mueller wrote: That would be very helpful. But these are not portable in C, right? Anyway I should add a link to D versioning and some example. No, they are vendor and platform specific. But they are reliable. -- /Jacob Carlborg

Re: The new std.process is ready for review

2013-03-21 Thread H. S. Teoh
On Thu, Mar 21, 2013 at 06:32:59PM +0100, Lars T. Kyllingstad wrote: On Thursday, 21 March 2013 at 16:37:38 UTC, H. S. Teoh wrote: On Thu, Mar 21, 2013 at 12:08:00PM +0100, Vladimir Panteleev wrote: Since (IIRC) all issues regarding incompatibility with std.process have been resolved, how

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 13:29:35 -0400 Jonathan M Davis jmdavisp...@gmx.com wrote: But I don't know how you'd automate testing behavior when the exact behavior of the range is very much dependent on the range itself. I don't think that's true at all. Granted, you can't automate testing of the

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 13:48:54 -0400 Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: - Calling popFront doesn't throw unless range is empty. - Calling popFront on an empty range throws a RangeError. Actually, I'm not certain about those two, but I know they're true if you just

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Dmitry Olshansky
21-Mar-2013 21:48, Nick Sabalausky пишет: On Thu, 21 Mar 2013 13:29:35 -0400 Jonathan M Davis jmdavisp...@gmx.com wrote: But I don't know how you'd automate testing behavior when the exact behavior of the range is very much dependent on the range itself. I don't think that's true at all.

Re: Feasible Idea?: Range Tester

2013-03-21 Thread H. S. Teoh
On Thu, Mar 21, 2013 at 01:48:54PM -0400, Nick Sabalausky wrote: On Thu, 21 Mar 2013 13:29:35 -0400 Jonathan M Davis jmdavisp...@gmx.com wrote: But I don't know how you'd automate testing behavior when the exact behavior of the range is very much dependent on the range itself. I don't

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Jonathan M Davis
On Thursday, March 21, 2013 13:52:12 Nick Sabalausky wrote: On Thu, 21 Mar 2013 13:48:54 -0400 Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: - Calling popFront doesn't throw unless range is empty. - Calling popFront on an empty range throws a RangeError. Actually, I'm not

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Jonathan M Davis
On Thursday, March 21, 2013 13:48:54 Nick Sabalausky wrote: On Thu, 21 Mar 2013 13:29:35 -0400 Jonathan M Davis jmdavisp...@gmx.com wrote: But I don't know how you'd automate testing behavior when the exact behavior of the range is very much dependent on the range itself. I don't

this is almost a workaround for the lack of named parameters

2013-03-21 Thread J
#!/usr/bin/rdmd void main(string[] arg) { // Observation: I'd like to say: /* auto r = myfunc.call(named) with { z= 2; x = -123; y = 200; } */ // and have it turned into this: with(myfunc) { x = -123; y = 200; z = -20; } auto r = myfunc.call(named); // Q: is there some way to

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread J
// CORRECTION: // and have it turned into this: with(myfunc) { z =2; x = -123; y = 200; } auto r = myfunc.call(named);

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 11:04:31 -0700 H. S. Teoh hst...@quickfur.ath.cx wrote: - Calling popFront and then front returns the next element. How do you know if something is the next element? What if the range is repeat(1)? - If range has length, then 'empty' returns true IFF popFront has

Re: Feasible Idea?: Range Tester

2013-03-21 Thread John Colvin
On Thursday, 21 March 2013 at 18:19:00 UTC, Jonathan M Davis wrote: I could definitely see an argument for adopting the policy of having popFront throw RangeError when the range is empty. - Jonathan M Davis In release mode, assert expressions are removed. This would not be possible for

Re: Feasible Idea?: Range Tester

2013-03-21 Thread monarch_dodra
On Thursday, 21 March 2013 at 17:29:46 UTC, Jonathan M Davis wrote: Hmmm. I've been working on stuff which makes creating ranges to test range- based functions easier, but I've never thought about creating something to test conformance. - Jonathan M Davis One of the things I've been trying

Re: Feasible Idea?: Range Tester

2013-03-21 Thread H. S. Teoh
On Thu, Mar 21, 2013 at 07:52:32PM +0100, monarch_dodra wrote: On Thursday, 21 March 2013 at 17:29:46 UTC, Jonathan M Davis wrote: Hmmm. I've been working on stuff which makes creating ranges to test range- based functions easier, but I've never thought about creating something to test

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread J
/* Similarly but different (here I am instantiating a new struct before the call, rather than re-using a global single struct each time), it would be lovely and elegant to say: */ void main(string[] arg) { /* Elegant: auto r = myfunc() with { z= 2; x = -123; y = 200;

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Philippe Sigaud
- Upon instantiating a new random access range, 'r.front == r[0]', and then after 'r.popFront()', 'r.front == r[1]', etc. This should be relatively easy to check. Is that really the behaviour for RA ranges? I'd say that after calling r.popFront(), then r.front == r[0]. The test could be:

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 19:35, J wrote: Here's another workaround: https://github.com/jacob-carlborg/mambo/blob/master/mambo/util/Reflection.d#L135 -- /Jacob Carlborg

DMD optimization bug?

2013-03-21 Thread Jacob Carlborg
The code below works fine without optimizations. But with optimizations (the -O flag) turned on it segfaults. The behavior with optimizations turned on is a bit different depending on which version of DMD I try and if I compile for 32 or 64bit. DMD 2.062 64bit: Segfault DMD 2.062 32bit:

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread bearophile
Jacob Carlborg: Here's another workaround: https://github.com/jacob-carlborg/mambo/blob/master/mambo/util/Reflection.d#L135 Maybe such two links should go in one page of the D wiki about lack of named parameters workarounds. Eventually D should introduce a syntax for named arguments at the

Re: Feasible Idea?: Range Tester

2013-03-21 Thread jerro
void testForwardRange(R, E)(R range, E[] content) { // Deliberately not contraints, because this *is* a test, after all. // *Or* maybe it just auto-detects range type and leaves it // up to the user to check for isForwardRange!R or whatever. static assert(isForwardRange!R);

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread J
On Thursday, 21 March 2013 at 19:59:01 UTC, Jacob Carlborg wrote: On 2013-03-21 19:35, J wrote: Here's another workaround: https://github.com/jacob-carlborg/mambo/blob/master/mambo/util/Reflection.d#L135 Intriguing, Jacob! I could learn alot about reflection by studying your code. How is

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 20:24:40 +0100 Philippe Sigaud philippe.sig...@gmail.com wrote: - Upon instantiating a new random access range, 'r.front == r[0]', and then after 'r.popFront()', 'r.front == r[1]', etc. This should be relatively easy to check. Is that really the behaviour for RA

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 21:41:52 +0100 jerro a...@a.com wrote: void testForwardRange(R, E)(R range, E[] content) { // Deliberately not contraints, because this *is* a test, after all. // *Or* maybe it just auto-detects range type and leaves it // up to the user to check for

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 21:33, bearophile wrote: Maybe such two links should go in one page of the D wiki about lack of named parameters workarounds. Eventually D should introduce a syntax for named arguments at the call point plus a syntax to deprecate argument names. It's not the most important thing

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 21:42, J wrote: Intriguing, Jacob! I could learn alot about reflection by studying your code. How is it installed? I installing by downloading that single file, and with a quick hack to the Reflection.d top three lines (commenting out the module and imports at the top), I tried

D with experimental features like tuple unpacking

2013-03-21 Thread bearophile
UFCS, plus some tweaks to the standard library like this one (http://d.puremagic.com/issues/show_bug.cgi?id=8755 ) help write D code in a more functional (flow programming, Walter calls it component programming) style. So tuples become more and more useful, and the lack of a syntax to unpack

Re: this is almost a workaround for the lack of named parameters

2013-03-21 Thread bearophile
Jacob Carlborg: What do you think about my suggestion for anonymous structs as named parameters? You show code like: void foo ({ int x, int y } point) { } foo({ y: 5, x: 3 }); D already has two kinds of tuples so I don't want a third kind of tuple. What I want is D to manage better the

What's up with buffered ranges?

2013-03-21 Thread Kagamin
My idea: http://dpaste.dzfl.pl/de19d31a

Re: DMD optimization bug?

2013-03-21 Thread Iain Buclaw
On 21 March 2013 20:29, Jacob Carlborg d...@me.com wrote: The code below works fine without optimizations. But with optimizations (the -O flag) turned on it segfaults. The behavior with optimizations turned on is a bit different depending on which version of DMD I try and if I compile for 32

Re: DMD optimization bug?

2013-03-21 Thread Iain Buclaw
On 21 March 2013 21:46, Iain Buclaw ibuc...@ubuntu.com wrote: On 21 March 2013 20:29, Jacob Carlborg d...@me.com wrote: The code below works fine without optimizations. But with optimizations (the -O flag) turned on it segfaults. The behavior with optimizations turned on is a bit different

Re: D for the JVM

2013-03-21 Thread Kagamin
On Wednesday, 27 February 2013 at 06:57:16 UTC, Russel Winder wrote: The summary is that D on the JVM is like C++ or C on the JVM, a non-starter. Interesting, can java into CTFE and compile-time code generation?

Re: Can we get rid of non-raw write?

2013-03-21 Thread torhu
On 20.03.2013 15:34, Nick Sabalausky wrote: Since *at least* as far back as XP, Windows has handled \n newlines perfectly fine. The command line displays them properly, .BAT scripts handle them properly, every code editor in existence handles them properly. The *only* thing I've found that

Re: Proposal for Deimos documentation

2013-03-21 Thread Jens Mueller
Jens Mueller wrote: Hi, I wrote some guidelines for writing a Deimos interface. It's still very rough but it's a start. I'd like to add it to dlang.org to give contributors better guidance, ultimately hoping to see more contributions to Deimos. Besides comments to improve my poor phrasing

Re: Can we get rid of non-raw write?

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 23:37:06 +0100 torhu no@spam.invalid wrote: You're mixing binary and text mode functions. read() is binary, stdout.write() is text mode. And yes, you are asking for newlines to be messed with, as File.write is documented to write in text mode. But I agree that the

Re: D with experimental features like tuple unpacking

2013-03-21 Thread Rob T
I would like to see tuple syntax and abilities improved. It's been a while since I last tried to use them so I'm not prepared to explain in detail what I'd like to see for improvements, however I can say that when I did try to use them I remember they were much more unwieldy to use and more

Re: DDoc default output (was: What do you use to generate documentation?)

2013-03-21 Thread Andrej Mitrovic
On 3/13/13, H. S. Teoh hst...@quickfur.ath.cx wrote: If you don't want the hassle of hosting the docs on a webserver with separate css stylesheets, etc., you could try the simple macros I wrote for generating nicer-looking ddocs:

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Jonathan M Davis
On Thursday, March 21, 2013 19:46:08 John Colvin wrote: On Thursday, 21 March 2013 at 18:19:00 UTC, Jonathan M Davis wrote: I could definitely see an argument for adopting the policy of having popFront throw RangeError when the range is empty. - Jonathan M Davis In release mode,

Re: Feasible Idea?: Range Tester

2013-03-21 Thread Nick Sabalausky
On Thu, 21 Mar 2013 21:55:10 -0400 Jonathan M Davis jmdavisp...@gmx.com wrote: Anything else would be a change that would have to be discussed, so specifically testing that a conformant range throws a RangeError from popFront when it's empty (as Nick was suggesting) would not be correct at

Re: DDoc default output (was: What do you use to generate documentation?)

2013-03-21 Thread H. S. Teoh
On Fri, Mar 22, 2013 at 02:19:37AM +0100, Andrej Mitrovic wrote: On 3/13/13, H. S. Teoh hst...@quickfur.ath.cx wrote: If you don't want the hassle of hosting the docs on a webserver with separate css stylesheets, etc., you could try the simple macros I wrote for generating nicer-looking

Re: DDoc default output (was: What do you use to generate documentation?)

2013-03-21 Thread Andrej Mitrovic
On 3/22/13, H. S. Teoh hst...@quickfur.ath.cx wrote: Andrei has already filed this some time ago: http://d.puremagic.com/issues/show_bug.cgi?id=9379 Ah now I understand what that's about, thanks.

Re: Can we get rid of non-raw write?

2013-03-21 Thread torhu
On 22.03.2013 00:36, Nick Sabalausky wrote: On Thu, 21 Mar 2013 23:37:06 +0100 torhu no@spam.invalid wrote: You're mixing binary and text mode functions. read() is binary, stdout.write() is text mode. And yes, you are asking for newlines to be messed with, as File.write is documented to

Re: OpenCL bindings

2013-03-21 Thread Jacob Carlborg
On 2013-03-21 04:37, Mike Parker wrote: Because some time ago DMD started shipping with '--export-dynamic' in the config file on Linux to (AFAIK) facilitate generation of exception stack traces. I was using straight function pointers at the time and, as a result, no one could use Derelict on

Re: Lexer in D

2013-03-21 Thread Namespace
On Friday, 15 March 2013 at 08:20:18 UTC, Namespace wrote: So far, my lexer is pure exercise. But my goal is actually to filter variables and functions, to see if they are ever used in the code. I'm almost finished. In my few tests, my little parser detects function, struct and variable

Re: Access Violation in callback from sort

2013-03-21 Thread Stefan
On Wednesday, 2 May 2012 at 15:27:58 UTC, Jabb wrote: import std.algorithm; void main() { uint[string] counts = [ a:4, b:5, c:3, d:1 ]; string[] keys = counts.keys; sort!((a, b) { return counts[a] counts[b]; })(keys); } Did you try string[] keys = counts.keys.dup; ?

static functions associated with enums

2013-03-21 Thread Dan
I have an enum, say: enum AssetCategory { Investment, PrimaryResidence, FamilyProperty, FinancialInstrument } and I have functions that convert to/from strings to be used in Json (via vibe json). The vibe wants to call out to user supplied toJson/fromJson if both functions are

Re: Are there D bindings for Win7's Core Audio anywhere?

2013-03-21 Thread Andrej Mitrovic
On 3/20/13, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: It seems to be COM-based, so it should be usable from D. Apparently there aren't any. Anyway I've ported the basic Core Audio sample to D, which has a slider for the main volume and a mute button:

Re: static functions associated with enums

2013-03-21 Thread Ali Çehreli
On 03/21/2013 01:34 PM, Dan wrote: Json serializeToJson(T)(T value) { ... static if( __traits(compiles, value = T.fromJson(value.toJson())) ){ It looks like fromJson must be a static member function because the condition is written in a way that fromJson is called on the type itself. (I

Re: Access Violation in callback from sort

2013-03-21 Thread Ali Çehreli
On 03/21/2013 01:02 PM, Stefan wrote: On Wednesday, 2 May 2012 at 15:27:58 UTC, Jabb wrote: import std.algorithm; void main() { uint[string] counts = [ a:4, b:5, c:3, d:1 ]; string[] keys = counts.keys; sort!((a, b) { return counts[a] counts[b]; })(keys); } Did you try string[] keys

Re: Access Violation in callback from sort

2013-03-21 Thread Ali Çehreli
On 05/02/2012 08:27 AM, Jabb wrote: Alone this works just fine. But if I add another file called myalgs.d, and put the following in it: //-- module myalgs; import std.algorithm; //-- Then I get the following exception: object.Error: Access Violation I

[Issue 9771] New: Remove toHash from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9771 Summary: Remove toHash from Object Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: druntime

[Issue 9772] New: Remove toString from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9772 Summary: Remove toString from Object Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component:

[Issue 9770] New: Remove opCmp from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9770 Summary: Remove opCmp from Object Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: druntime

[Issue 9769] Remove opEquals from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9769 --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:05:46 PDT --- Related: opCmp: issue# 9770 toHash: issue# 9771 toString: issue# 9772 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ---

[Issue 9770] Remove opCmp from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9770 --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:05:48 PDT --- Related: opEquals: issue# 9769 toHash: issue# 9771 toString: issue# 9772 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email

[Issue 9771] Remove toHash from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9771 --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:05:52 PDT --- Related: opEquals: issue# 9769 opCmp: issue# 9770 toString: issue# 9772 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email

[Issue 9772] Remove toString from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9772 --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:05:55 PDT --- Related: opEquals: issue# 9769 opCmp: issue# 9770 toHash: issue# 9771 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ---

[Issue 9769] Remove opEquals from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9769 Jacob Carlborg d...@me.com changed: What|Removed |Added CC||d...@me.com --- Comment

[Issue 9769] Remove opEquals from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9769 --- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:42:37 PDT --- https://github.com/D-Programming-Language/druntime/pull/459 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 9769] Remove opEquals from Object

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9769 --- Comment #4 from Jonathan M Davis jmdavisp...@gmx.com 2013-03-21 00:45:19 PDT --- Was there a conclusion on how this will affect backwards compatible? No, other than the fact that we'd probably have to keep the functions on opEquals for a

[Issue 9773] New: ref parameter with default value should not compile

2013-03-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9773 Summary: ref parameter with default value should not compile Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

  1   2   >