Re: DDT 0.4.0 released (formerly Mmrnmhrm)

2010-11-20 Thread Jordi
On 11/18/2010 03:52 AM, Bruno Medeiros wrote: I'm announcing the release of DDT (D Development Tools) version 0.4.0: http://code.google.com/a/eclipselabs.org/p/ddt/ (There was previously an older inactive project also called DDT, it has been renamed to EclipseD, with the authors permission.)

Re: DDT 0.4.0 released (formerly Mmrnmhrm)

2010-11-20 Thread Fawzi Mohamed
by the way DDT for me is http://www.allinea.com/?page=48 i.e. a distributed debugger On 20-nov-10, at 17:54, Jordi wrote: On 11/18/2010 03:52 AM, Bruno Medeiros wrote: I'm announcing the release of DDT (D Development Tools) version 0.4.0:

Re: DDT 0.4.0 released (formerly Mmrnmhrm)

2010-11-20 Thread Jimmy Cao
Very nice! Although I would really like Issue #17 to be fixed. So that you can write ANSI style code. On Sat, Nov 20, 2010 at 11:43 AM, Fawzi Mohamed fa...@gmx.ch wrote: by the way DDT for me is http://www.allinea.com/?page=48 i.e. a distributed debugger On 20-nov-10, at 17:54, Jordi

Re: DDT 0.4.0 released (formerly Mmrnmhrm)

2010-11-20 Thread Bernard Helyer
Thank you so much for your work. It's really awesome to see advancement for the D eclipse plugins.

Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Andrei Alexandrescu
TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as char[]. Therefore, attempting to use map[line] will fail. The program compiled and did the wrong thing

Re: Looking for champion - std.lang.d.lex

2010-11-20 Thread Matthias Pleh
Am 20.11.2010 00:56, schrieb Michael Stover: so that was 4 months ago - how do things currently stand on that initiative? -Mike On Fri, Nov 19, 2010 at 6:37 PM, Bruno Medeiros brunodomedeiros+s...@com.gmail wrote: On 19/11/2010 22:25, Michael Stover wrote: As for D lexers and

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Fawzi Mohamed
On 19-nov-10, at 23:44, Sean Kelly wrote: Leandro Lucarella Wrote: Sean Kelly, el 19 de noviembre a las 14:59 me escribiste: This should work: void func(string x = __FILE__, T...)(T args); D allows defaulted template arguments to occur before non- defaulted ones. I wasn't aware that

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Lutger Blijdestijn
Andrei Alexandrescu wrote: TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as char[]. Therefore, attempting to use map[line] will fail. The

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Fawzi Mohamed
On 20-nov-10, at 09:07, Andrei Alexandrescu wrote: TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as char[]. Therefore, attempting to use map[line] will

Re: std.algorithm.remove and principle of least astonishment

2010-11-20 Thread spir
On Fri, 19 Nov 2010 22:04:51 -0700 Rainer Deyke rain...@eldwood.com wrote: On 11/19/2010 16:40, Andrei Alexandrescu wrote: On 11/19/10 12:59 PM, Bruno Medeiros wrote: Sorry, what I mean is: so we agree that char[] and wchar[] are special. Unlike *all other arrays*, there are restrictions

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread spir
On Sat, 20 Nov 2010 00:07:57 -0800 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Michel Fortin
On 2010-11-20 03:07:57 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org said: TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as char[].

Logical const

2010-11-20 Thread Peter Alexander
D does not support logical const due to the weak guarantees that it provides. So, without logical const, how are D users supposed to provide lazy evaluation and memoization in their interfaces, given that the interface should *seem* const, e.g. class Matrix { double getDeterminant() const

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tomek Sowiński
Dnia 20-11-2010 o 13:33:29 spir denis.s...@gmail.com napisał(a): I find this proposal really necessary. But aren't there two issues here? * Comparison (for lookup) by value equality should not care about qualifiers (ie compare raw content, here plain array memory areas). * Assignment should

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tomek Sowiński
Andrei Alexandrescu seewebsiteforem...@erdani.org napisał(a): TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so it exposes it as char[]. Therefore, attempting to use

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Jacob Carlborg
On 2010-11-19 19:16, Jonathan M Davis wrote: Updated code: http://is.gd/hqPb2 Okay. As mentioned before, I have helper unit test functions which I use heavily in std.datetime and which are pretty much going to have to either end up as private helper functions in std.datetime or actually get

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread spir
On Sat, 20 Nov 2010 15:22:37 +0100 Tomek Sowiński j...@ask.me wrote: I find this proposal really necessary. But aren't there two issues here? * Comparison (for lookup) by value equality should not care about qualifiers (ie compare raw content, here plain array memory areas). *

Re: Error 42: Symbol Undefined __d_throwc

2010-11-20 Thread Jimmy Cao
I can't reproduce it on Windows 7 with dmd 2.050. On Sat, Nov 20, 2010 at 12:45 AM, Tyro[a.c.edwards] nos...@home.com wrote: The following: import std.regex; void main() { string s = $,; replace(s, regex($,,), ); // Is this possible? If so, what is the propper way to do

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Adam Burton
spir wrote: On Sat, 20 Nov 2010 15:22:37 +0100 Tomek Sowiński j...@ask.me wrote: I find this proposal really necessary. But aren't there two issues here? * Comparison (for lookup) by value equality should not care about qualifiers (ie compare raw content, here plain array memory areas).

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Pelle Månsson
On 11/20/2010 05:09 PM, spir wrote: ??? backdoor and s do not denote the same element. One is a mutable array, the other is immutable. Why should changing backdoor affect s? Whether backdoor and chars denote the same array depends on whether = copies or not dyn arrays. But from immutable

Re: Logical const

2010-11-20 Thread Michel Fortin
On 2010-11-20 09:21:04 -0500, Peter Alexander peter.alexander...@gmail.com said: D does not support logical const due to the weak guarantees that it provides. So, without logical const, how are D users supposed to provide lazy evaluation and memoization in their interfaces, given that the

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Lutger Blijdestijn
I'm not particularly fond of this interface and think that a solution with a delegate / lazy or alias template parameter would be more convenient. However, until we have ast macros I do see the added value in this approach. Some remarks about the api, not a proper review of the code itself: -

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Andrej Mitrovic
What about debug vs release compilation for this new module? We know we have assert for debug mode, and enforce for release mode (except the special assert false case). If I want assertExcThrown to be compiled in release mode it seems I'd need an enforced version of it, possibly called

Re: std.algorithm.remove and principle of least astonishment

2010-11-20 Thread Rainer Deyke
On 11/20/2010 05:12, spir wrote: On Fri, 19 Nov 2010 22:04:51 -0700 Rainer Deyke rain...@eldwood.com wrote: You don't see the advantage of generic types behaving in a generic manner? Do you know how much pain std::vectorbool caused in C++? I asked this before, but I received no answer.

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tomek Sowiński
Dnia 20-11-2010 o 17:09:00 spir denis.s...@gmail.com napisał(a): It's busting the whole const system to smithereens. char[] chars = abc; char[] backdoor = chars; string s = chars; assert (s == abc); backdoor.front = 'k'; assert (s == abc); // fails. not so immutable, huh? ??? backdoor and s

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread spir
On Sat, 20 Nov 2010 21:21:58 +0100 Tomek Sowiński j...@ask.me wrote: Dnia 20-11-2010 o 17:09:00 spir denis.s...@gmail.com napisał(a): It's busting the whole const system to smithereens. char[] chars = abc; char[] backdoor = chars; string s = chars; assert (s == abc);

php strings demo

2010-11-20 Thread Kagamin
See attachment. It's just a thought. Anyone want this in the language? --- string sval=ab128#d; int ival=274; static assert(asdf \{sval} astt35 \{ival} zzf \{uuu} g,d == asdf ab128#d astt35 274 zzf uuu g,d); //(uuu not found) --- php.d Description: Binary data

Re: php strings demo

2010-11-20 Thread Kagamin
Kagamin Wrote: See attachment. It's just a thought. Anyone want this in the language? --- string sval=ab128#d; int ival=274; static assert(asdf \{sval} astt35 \{ival} zzf \{uuu} g,d == asdf ab128#d astt35 274 zzf uuu g,d); //(uuu not found) --- Wrote some unittests today and thought, this

Re: Error 42: Symbol Undefined __d_throwc

2010-11-20 Thread Tyro[a.c.edwards]
On 11/21/2010 1:13 AM, Jimmy Cao wrote: I can't reproduce it on Windows 7 with dmd 2.050. On Sat, Nov 20, 2010 at 12:45 AM, Tyro[a.c.edwards] nos...@home.com mailto:nos...@home.com wrote: The following: import std.regex; void main() { string s = $,;

Re: php strings demo

2010-11-20 Thread Adam D. Ruppe
Kagamin Wrote: Wrote some unittests today and thought, this feature is useful when one wants easy sql statements (in, e.g. unittests). Meh, I find the placeholders to be much better (safer too): db.query(select id from objects where type = ?, typeName); I generally feel the same way about all

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tyro[a.c.edwards]
On 11/20/2010 11:22 PM, Tomek Sowiński wrote: Dnia 20-11-2010 o 13:33:29 spir denis.s...@gmail.com napisał(a): I find this proposal really necessary. But aren't there two issues here? * Comparison (for lookup) by value equality should not care about qualifiers (ie compare raw content, here

Re: php strings demo

2010-11-20 Thread Kagamin
Adam D. Ruppe Wrote: Meh, I find the placeholders to be much better (safer too): db.query(select id from objects where type = ?, typeName); I use it too, but found it hard to maintain/check ordering and meaning of parameters when you edit the query, add or remove parameters.

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tyro[a.c.edwards]
On 11/20/2010 9:39 PM, Michel Fortin wrote: On 2010-11-20 03:07:57 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org said: TDPL has an example that can be reduced as follows: void main() { uint[string] map; foreach (line; stdin.byLine()) { ++map[line]; } } byLine reuses its buffer so

Re: php strings demo

2010-11-20 Thread Kagamin
Adam D. Ruppe Wrote: Meh, I find the placeholders to be much better (safer too): db.query(select id from objects where type = ?, typeName); It's also non-trivial to implement such functionality, since MS (and Oracle, afaik) require named parameters.

Re: std.algorithm.remove and principle of least astonishment

2010-11-20 Thread Andrei Alexandrescu
On 11/20/10 12:32 PM, Rainer Deyke wrote: On 11/20/2010 05:12, spir wrote: On Fri, 19 Nov 2010 22:04:51 -0700 Rainer Deykerain...@eldwood.com wrote: You don't see the advantage of generic types behaving in a generic manner? Do you know how much pain std::vectorbool caused in C++? I asked

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Jonathan M Davis
On Saturday 20 November 2010 08:03:52 Jacob Carlborg wrote: Why don't you use delegates instead of string mixins? For example, assertExcThrown, could take a delegate which calls the function you want to test instead of a string that represents the call. The mixin want be needed as well. Am I

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tomek Sowiński
Tyro[a.c.edwards] nos...@home.com napisał(a): What would be the harm if upon seeing your code the compiler did this: char[] chars = abc.dup; char[] backdoor = chars; string s = chars.idup; assert (s == abc); backdoor.front = 'k'; // [1] assert (s == abc); Slightly magical but works

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Jonathan M Davis
On Saturday 20 November 2010 10:16:55 Lutger Blijdestijn wrote: I'm not particularly fond of this interface and think that a solution with a delegate / lazy or alias template parameter would be more convenient. However, until we have ast macros I do see the added value in this approach.

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Jonathan M Davis
On Saturday 20 November 2010 10:23:36 Andrej Mitrovic wrote: What about debug vs release compilation for this new module? We know we have assert for debug mode, and enforce for release mode (except the special assert false case). If I want assertExcThrown to be compiled in release mode it

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tyro[a.c.edwards]
On 11/21/2010 9:23 AM, Tomek Sowiński wrote: Tyro[a.c.edwards] nos...@home.com napisał(a): What would be the harm if upon seeing your code the compiler did this: char[] chars = abc.dup; char[] backdoor = chars; string s = chars.idup; assert (s == abc); backdoor.front = 'k'; // [1] assert (s ==

Re: Review: A new stab at a potential std.unittests

2010-11-20 Thread Jonathan M Davis
On Saturday 20 November 2010 16:23:32 Jonathan M Davis wrote: The lazy solution sounds pretty good actually. Can anyone think of any real downsides to that? So, it would look something like assertExcThrown(E : Throwable, T)(lazy T, string file = __FILE__, size_t line = __LINE__); Wait. No.

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tomek Sowiński
Dnia 21-11-2010 o 02:02:35 Tyro[a.c.edwards] nos...@home.com napisał(a): The harm is confusion. Now = on arrays always means aliasing, but with your proposal, it may *sometimes* mean dupping. Imagine real-life code with type aliasing and type inference in play, and trying to determine whether

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Tyro[a.c.edwards]
On 11/21/2010 10:39 AM, Tomek Sowiński wrote: Dnia 21-11-2010 o 02:02:35 Tyro[a.c.edwards] nos...@home.com napisał(a): The harm is confusion. Now = on arrays always means aliasing, but with your proposal, it may *sometimes* mean dupping. Imagine real-life code with type aliasing and type

Re: Logical const

2010-11-20 Thread Jordi
On 11/21/2010 02:43 AM, Michel Fortin wrote: On 2010-11-20 09:21:04 -0500, Peter Alexander peter.alexander...@gmail.com said: D does not support logical const due to the weak guarantees that it provides. So, without logical const, how are D users supposed to provide lazy evaluation and

Re: std.algorithm.remove and principle of least astonishment

2010-11-20 Thread Rainer Deyke
On 11/20/2010 16:58, Andrei Alexandrescu wrote: On 11/20/10 12:32 PM, Rainer Deyke wrote: std::vectorbool in C++ is a specialization of std::vector that packs eight booleans into a byte instead of storing each element separately. It doesn't behave exactly like other std::vectors and

Re: Principled method of lookup-or-insert in associative arrays?

2010-11-20 Thread Michel Fortin
On 2010-11-20 18:04:29 -0500, Tyro[a.c.edwards] nos...@home.com said: On 11/20/2010 9:39 PM, Michel Fortin wrote: But didn't you agree with me yesterday in another thread that it's best to make the caller responsible for the idup in cases where you need a string to be immutable? Now you want

Repairing BigInt const

2010-11-20 Thread Matthias Walter
Hi all, as it seems, the current version of BigInt is not capable of const, i.e. BigInt(1) + const(BigInt)(1) does not work. Is there already an effort to fix this or would it make sense if I had taken some time to create a fix for it? I have no idea of all the asm in the x86 specialization but

OT: Planes, Space Crafts and Computer Science

2010-11-20 Thread Manfred_Nowak
Since last month the new field of ultra high reliability is teached at a university in germany: http://www.presse.uni- wuerzburg.de/einblick_archiv/archiv2010/einblick1037/montenegro0/ -manfred

Re: OT: Planes, Space Crafts and Computer Science

2010-11-20 Thread Walter Bright
Manfred_Nowak wrote: Since last month the new field of ultra high reliability is teached at a university in germany: http://www.presse.uni- wuerzburg.de/einblick_archiv/archiv2010/einblick1037/montenegro0/ -manfred It's about time. The techniques are well-known, but since they are not taught

[Issue 4854] Regression(2.047, Mac only) writefln Segmentation fault if no globals

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4854 --- Comment #11 from Jacob Carlborg d...@me.com 2010-11-20 03:14:21 PST --- Created an attachment (id=823) Patch I'm adding my patch here as well so it doesn't get lost. I've created a patch but I'm not completely sure if it solves the

[Issue 5245] New: Interface function TraceInfo.toString is not implemented

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5245 Summary: Interface function TraceInfo.toString is not implemented Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal

[Issue 5245] Interface function TraceInfo.toString is not implemented

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5245 Iain Buclaw ibuc...@ubuntu.com changed: What|Removed |Added CC||ibuc...@ubuntu.com

[Issue 5246] PATCH(s): fix a couple more uninitialised variables

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5246 --- Comment #1 from simon s.d.hamm...@googlemail.com 2010-11-20 09:05:10 PST --- Created an attachment (id=824) PATCH: fix use of uninitialised variable in cod4.c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email

[Issue 5246] PATCH(s): fix a couple more uninitialised variables

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5246 --- Comment #2 from simon s.d.hamm...@googlemail.com 2010-11-20 09:05:44 PST --- Created an attachment (id=825) PATCH: fix use of uninitialised variable in cgelem.c -- Configure issuemail:

[Issue 5219] @noheap annotation

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5219 --- Comment #7 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-20 14:24:31 PST --- (In reply to comment #5) This is not only performance but also behavior. Multithreading, GC and TLS have global consequences, who knows, how

[Issue 2095] covariance w/o typechecks = bugs

2010-11-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2095 --- Comment #23 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-20 14:30:34 PST --- ? extends A[] Interesting. This type implies array is mutable, so you can put objects into it. Java will check at runtime for array type, but in D