Re: [Phoronix] Merging In The GNU D Language Compiler To GCC

2011-10-05 Thread Jacob Carlborg
On 2011-10-05 05:50, Iain Buclaw wrote: My worst kept secret is out. http://www.phoronix.com/scan.php?page=news_itempx=OTk2NA This is great news. -- /Jacob Carlborg

Re: [Phoronix] Merging In The GNU D Language Compiler To GCC

2011-10-05 Thread dsimcha
On 10/4/2011 11:50 PM, Iain Buclaw wrote: My worst kept secret is out. http://www.phoronix.com/scan.php?page=news_itempx=OTk2NA Awesome! Two things, though: 1. When will this actually happen? Is GCC 4.7 going to have GDC in it? 2. How will the impedance mismatch between DMD Front End's

Re: [Phoronix] Merging In The GNU D Language Compiler To GCC

2011-10-05 Thread Robert McGinley
Why not just write a redirect rule from the old D pages to the new ones? On Oct 4, 2011, at 11:55 PM, Jonathan M Davis wrote: On Wednesday, October 05, 2011 03:50:35 Iain Buclaw wrote: My worst kept secret is out. http://www.phoronix.com/scan.php?page=news_itempx=OTk2NA *Sigh* They gave

Re: [Phoronix] Merging In The GNU D Language Compiler To GCC

2011-10-05 Thread Nick Sabalausky
dsimcha dsim...@yahoo.com wrote in message news:j6hkec$7lb$1...@digitalmars.com... 2. How will the impedance mismatch between DMD Front End's fast release cycle and GCC's slower release cycle be handled? I'm definitely not going to use the official version of GDC packaged with my Linux

Re: [Phoronix] Merging In The GNU D Language Compiler To GCC

2011-10-05 Thread Andrej Mitrovic
Maybe if this was posted on Reddit it would get some vocal support and give the GNU guys reassurance that D is a sought-after language. Anyway this is great news! Congrats to Iain Buclaw and anyone else who helped.

Garbage collection book

2011-10-05 Thread Andrei Alexandrescu
http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorithms/dp/1420082795/ref=sr_1_1?s=booksie=UTF8qid=1317790242sr=1-1 I heard it's good. Andrei

Re: Thread local and memory allocation

2011-10-05 Thread bearophile
deadalnix: This is why the type system is made for isn't it ? Casts are often the points where type systems fail :-) Bye, bearophile

Re: Thread local and memory allocation

2011-10-05 Thread Robert Jacques
On Tue, 04 Oct 2011 23:55:19 -0400, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Oct 4, 2011 at 8:59 PM, Robert Jacques sandf...@jhu.edu wrote: On Tue, 04 Oct 2011 10:54:58 -0400, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Oct 4, 2011 at 3:52 AM, Walter Bright

Re: Garbage collection book

2011-10-05 Thread Walter Bright
On 10/4/2011 11:06 PM, Andrei Alexandrescu wrote: http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorithms/dp/1420082795/ref=sr_1_1?s=booksie=UTF8qid=1317790242sr=1-1 I heard it's good. I have the older version: http://www.amazon.com/exec/obidos/ASIN/0471941484/classicempire

Re: Thread local and memory allocation

2011-10-05 Thread Robert Jacques
On Tue, 04 Oct 2011 23:56:52 -0400, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Oct 4, 2011 at 10:55 PM, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Oct 4, 2011 at 8:59 PM, Robert Jacques sandf...@jhu.edu wrote: On Tue, 04 Oct 2011 10:54:58 -0400, Andrew Wiley

Re: std.getopt suggestion

2011-10-05 Thread Jacob Carlborg
On 2011-10-04 21:39, Andrei Alexandrescu wrote: On 10/4/11 12:46 PM, Jacob Carlborg wrote: On 2011-10-04 17:48, Andrei Alexandrescu wrote: On 10/04/11 09:09, Jacob Carlborg wrote: On 2011-10-04 13:21, Regan Heath wrote: In this particular case, because these std,.getopt options are global

Re: Request for pre-review: std.serialization/orange

2011-10-05 Thread Jacob Carlborg
On 2011-10-05 03:49, Robert Jacques wrote: On Tue, 04 Oct 2011 12:54:27 -0400, Jacob Carlborg d...@me.com wrote: On 2011-10-04 17:14, Robert Jacques wrote: I'm sorry, you're right. In my mind b extended to the end of the a array, for some reason. However, if you do define b to extend to the

Re: Thoughts on function names containing arbitrary symbols

2011-10-05 Thread Jacob Carlborg
On 2011-10-05 04:40, Andrew Wiley wrote: On Tue, Oct 4, 2011 at 9:08 AM, Jacob Carlborgd...@me.com wrote: On 2011-10-04 12:37, Kagamin wrote: Jacob Carlborg Wrote: What are the thoughts around here on function names containing arbitrary symbols, like in Scala. Example: void ::: (int a) {}

Re: Thoughts on function names containing arbitrary symbols

2011-10-05 Thread Walter Bright
On 10/4/2011 2:46 AM, Jacob Carlborg wrote: What are the thoughts around here on function names containing arbitrary symbols, like in Scala. Example: void ::: (int a) {} This, in effect, means user defined tokens. The lexing pass will then become intertwined with semantic analysis. While

Thoughts on improving operators

2011-10-05 Thread Gor Gyolchanyan
I agree. But there's something that can be done to help make the operators even more usable. Example: named foreach loops over objects: struct TestStruct { public: this(string text) { _text = text.dup; } int opApply(string name : text)(int delegate(ref dchar) dg) { int

Re: Names with trailing question mark

2011-10-05 Thread bearophile
I vaguely like the idea of using a trailing question mark in predicate names. Thank you to all the people that have answered. I don't like to write isFoo, I'd like to write foo?, but after the discussions I presume this idea will not see the light in D :-| Bye, bearophile

Re: Names with trailing question mark

2011-10-05 Thread Gor Gyolchanyan
Read my thread about thoughts on improving the operators. Your idea might see the light after all :-) On Wed, Oct 5, 2011 at 2:42 PM, bearophile bearophileh...@lycos.com wrote: I vaguely like the idea of using a trailing question mark in predicate names. Thank you to all the people that have

Re: Thoughts on improving operators

2011-10-05 Thread Vladimir Panteleev
On Wed, 05 Oct 2011 13:26:26 +0300, Gor Gyolchanyan gor.f.gyolchan...@gmail.com wrote: Example: named foreach loops over objects: You can achieve almost exactly this by iterating over a delegate (define a method with the same signature as opApply). The only change at the call site is

Re: Thoughts on improving operators

2011-10-05 Thread Gor Gyolchanyan
I didn't know that was possible! Thanks! But the case with the ternary operator is the most interesting one. On Wed, Oct 5, 2011 at 2:54 PM, Vladimir Panteleev vladi...@thecybershadow.net wrote: On Wed, 05 Oct 2011 13:26:26 +0300, Gor Gyolchanyan gor.f.gyolchan...@gmail.com wrote: Example:

Re: Thoughts on improving operators

2011-10-05 Thread Christophe
Gor Gyolchanyan , dans le message (digitalmars.D:146100), a écrit : I agree. But there's something that can be done to help make the operators even more usable. Example: named foreach loops over objects: struct TestStruct { public: this(string text) { _text = text.dup; } int

Re: Thoughts on improving operators

2011-10-05 Thread Gor Gyolchanyan
The whole point was to put the question mark to a better use. I mean, it's used in the ternary operator exclusively. It's such a waste of a token. The question mark logically belongs to bools (which goes good with the ternary operator), but the bools are much more ofter worked with in the form of

Re: Exchange of possible interest :o)

2011-10-05 Thread deadalnix
Le 05/10/2011 05:38, Andrei Alexandrescu a écrit : On 10/4/11 9:50 PM, Caligo wrote: On Tue, Oct 4, 2011 at 5:53 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org mailto:seewebsiteforem...@erdani.org wrote: http://gcc.gnu.org/ml/gcc/__2011-10/msg00037.html

Re: std.getopt suggestion

2011-10-05 Thread Regan Heath
On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/4/11 12:46 PM, Jacob Carlborg wrote: On 2011-10-04 17:48, Andrei Alexandrescu wrote: On 10/04/11 09:09, Jacob Carlborg wrote: On 2011-10-04 13:21, Regan Heath wrote: In this particular case,

Re: std.getopt suggestion

2011-10-05 Thread Steven Schveighoffer
On Wed, 05 Oct 2011 07:53:25 -0400, Regan Heath re...@netmail.co.nz wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/4/11 12:46 PM, Jacob Carlborg wrote: On 2011-10-04 17:48, Andrei Alexandrescu wrote: On 10/04/11 09:09, Jacob

Re: Thread local and memory allocation

2011-10-05 Thread deadalnix
Le 04/10/2011 20:30, Walter Bright a écrit : On 10/4/2011 2:32 AM, deadalnix wrote: With casts to immutable, it is perfectly correct if you, the user, ensure that there are no other mutable references to the same data. It's just that the compiler itself cannot make this guarantee, hence it's

Re: std.getopt suggestion

2011-10-05 Thread Jens Mueller
Christophe wrote: Andrei Alexandrescu , dans le message (digitalmars.D:146070), a écrit : On 10/4/11 2:39 PM, Andrei Alexandrescu wrote: On 10/4/11 12:05 PM, Christophe wrote: Andrej Mitrovic , dans le message (digitalmars.D:146060), a écrit : I'm don't often use getopt just for the fact

Re: Exchange of possible interest :o)

2011-10-05 Thread Jens Mueller
Andrei Alexandrescu wrote: http://gcc.gnu.org/ml/gcc/2011-10/msg00037.html Andrei This would be awesome. I hope it works out. What a great move. Jens

Re: std.getopt suggestion

2011-10-05 Thread Christophe
Jens Mueller , dans le message (digitalmars.D:146111), a écrit : Christophe wrote: Andrei Alexandrescu , dans le message (digitalmars.D:146070), a écrit : On 10/4/11 2:39 PM, Andrei Alexandrescu wrote: On 10/4/11 12:05 PM, Christophe wrote: Andrej Mitrovic , dans le message

Re: std.getopt suggestion

2011-10-05 Thread Jens Mueller
Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146111), a écrit : Christophe wrote: Andrei Alexandrescu , dans le message (digitalmars.D:146070), a écrit : On 10/4/11 2:39 PM, Andrei Alexandrescu wrote: On 10/4/11 12:05 PM, Christophe wrote: Andrej Mitrovic , dans le

Re: Exchange of possible interest :o)

2011-10-05 Thread Sean Kelly
So the next step is a manhunt for Dave F. Or a rewrite of the parts he contributed? Sent from my iPhone On Oct 4, 2011, at 3:53 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://gcc.gnu.org/ml/gcc/2011-10/msg00037.html Andrei

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/5/11 6:53 AM, Regan Heath wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Did it ever prevent you from getting anything done with it? That's not the question we should be asking. The question we should be asking is, will anyone ever

Re: std.getopt suggestion

2011-10-05 Thread Jonathan M Davis
On Wednesday, October 05, 2011 16:24:32 Jens Mueller wrote: However, the current way to parametrise getopt is to change the character for options ('-'), and I belive the string for long option is twice the character for short option (--). I don't think this makes great sense. We could

Re: std.getopt suggestion

2011-10-05 Thread Christophe
Jens Mueller , dans le message (digitalmars.D:146114), a écrit : Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146111), a écrit : Christophe wrote: Andrei Alexandrescu , dans le message (digitalmars.D:146070), a écrit : On 10/4/11 2:39 PM, Andrei Alexandrescu wrote:

Re: std.getopt suggestion

2011-10-05 Thread Christophe
At last you say something I can agree with in this thread.

Re: std.getopt suggestion

2011-10-05 Thread Regan Heath
On Wed, 05 Oct 2011 16:03:11 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/5/11 6:53 AM, Regan Heath wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Did it ever prevent you from getting anything done with it?

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/5/11 10:27 AM, Regan Heath wrote: I understand the issue, and the point you're making below, and I agree completely. At the same time, this particular change being as simple as it is, and as obviously beneficial as I hope I have managed to show, would have taken less time to simply change

Re: std.getopt suggestion

2011-10-05 Thread Andrej Mitrovic
The reality is apps use many different sorts of argument passing styles. Saying that one or the other is wrong is silly. Here's some various flavors: Firefox: firefox.exe -safe-mode www.mozilla.com Scite: SciTE -import c:\os\web_work SciTEDoc.html AVG: avgscanx.exe /comp /qt /priority=high /pwdw

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/5/11 10:12 AM, Christophe wrote: One think I don't know regarding getopt, and that I didn't find in the documentation (maybe because I didn't look close enough after having found that -o output was not supported), is if the arguments are sorted like in the c getopt, and how to get the

Re: std.getopt suggestion

2011-10-05 Thread Jens Mueller
Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146114), a écrit : Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146111), a écrit : Christophe wrote: Andrei Alexandrescu , dans le message (digitalmars.D:146070), a écrit : On 10/4/11 2:39 PM, Andrei

Re: Garbage collection book

2011-10-05 Thread Masahiro Nakagawa
On Wed, 05 Oct 2011 15:06:35 +0900, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorithms/dp/1420082795/ref=sr_1_1?s=booksie=UTF8qid=1317790242sr=1-1 I heard it's good. Narihiro Nakamura (a.k.a author of japanese

Re: std.getopt suggestion

2011-10-05 Thread Christophe
Jens Mueller , dans le message (digitalmars.D:146124), a écrit : Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146114), a écrit : Christophe wrote: Jens Mueller , dans le message (digitalmars.D:146111), a écrit : Christophe wrote: Andrei Alexandrescu , dans le message

Re: std.getopt suggestion

2011-10-05 Thread Christophe
Andrei Alexandrescu , dans le message (digitalmars.D:146123), a écrit : On 10/5/11 10:12 AM, Christophe wrote: One think I don't know regarding getopt, and that I didn't find in the documentation (maybe because I didn't look close enough after having found that -o output was not supported), is

Re: Thread local and memory allocation

2011-10-05 Thread Sean Kelly
Maybe the correct approach is simply to try and eliminate the mutex protecting GC operations so allocations can be performed concurrently by multiple threads? Sent from my iPhone On Oct 4, 2011, at 8:55 PM, Andrew Wiley wiley.andre...@gmail.com wrote: On Tue, Oct 4, 2011 at 8:59 PM, Robert

Re: Thread local and memory allocation

2011-10-05 Thread Walter Bright
On 10/5/2011 6:25 AM, deadalnix wrote: I see two solutions to deal with this : Something allocated on a Thread local heap can be seen from other threads, and this is safe as long as a reference is kept in the allocating thread. So, if you cast something TL and mutable as immutable, you have to

Re: Garbage collection book

2011-10-05 Thread Sean Kelly
On Oct 4, 2011, at 11:14 PM, Walter Bright wrote: On 10/4/2011 11:06 PM, Andrei Alexandrescu wrote: http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorithms/dp/1420082795/ref=sr_1_1?s=booksie=UTF8qid=1317790242sr=1-1 I heard it's good. I have the older version:

Re: Exchange of possible interest :o)

2011-10-05 Thread Jerry
Sean Kelly s...@invisibleduck.org writes: So the next step is a manhunt for Dave F. Or a rewrite of the parts he contributed? How difficult is it to identify and rewrite the parts he contributed?

Re: Garbage collection book

2011-10-05 Thread Walter Bright
On 10/5/2011 11:46 AM, Sean Kelly wrote: On Oct 4, 2011, at 11:14 PM, Walter Bright wrote: On 10/4/2011 11:06 PM, Andrei Alexandrescu wrote: http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorithms/dp/1420082795/ref=sr_1_1?s=booksie=UTF8qid=1317790242sr=1-1 I heard it's

Re: Garbage collection book

2011-10-05 Thread Jonathan M Davis
On Wednesday, October 05, 2011 12:21:53 Walter Bright wrote: On 10/5/2011 11:46 AM, Sean Kelly wrote: On Oct 4, 2011, at 11:14 PM, Walter Bright wrote: On 10/4/2011 11:06 PM, Andrei Alexandrescu wrote: http://www.amazon.com/Garbage-Collection-Handbook-Management-Algorit

Re: Thoughts on function names containing arbitrary symbols

2011-10-05 Thread Jacob Carlborg
On 2011-10-05 09:54, Walter Bright wrote: On 10/4/2011 2:46 AM, Jacob Carlborg wrote: What are the thoughts around here on function names containing arbitrary symbols, like in Scala. Example: void ::: (int a) {} This, in effect, means user defined tokens. The lexing pass will then become

Re: std.getopt suggestion

2011-10-05 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.23.1317827712.28623.digitalmar...@puremagic.com... On Wednesday, October 05, 2011 16:24:32 Jens Mueller wrote: However, the current way to parametrise getopt is to change the character for options ('-'), and I belive the

Re: std.getopt suggestion

2011-10-05 Thread Nick Sabalausky
Christophe trav...@phare.normalesup.org wrote in message news:j6ho92$gtr$1...@digitalmars.com... Well, too much parametrization is wrong. But the posix way has to be supported, and it includes -o output (which is much more helpful than -ooutput for readability and for auto-completion in the

Re: Garbage collection book

2011-10-05 Thread Walter Bright
On 10/5/2011 12:31 PM, Jonathan M Davis wrote: And D's GC can use all of the help that it can get. It's not that bad. For one thing, it's reliable.

Re: Exchange of possible interest :o)

2011-10-05 Thread maarten van damme
great news, will certainly help d a bit forward but will it be for d1 or d2?

Re: Thoughts on function names containing arbitrary symbols

2011-10-05 Thread Walter Bright
On 10/5/2011 12:54 PM, Jacob Carlborg wrote: Does Scala have the same problem? I don't know enough about Scala to answer.

Re: Exchange of possible interest :o)

2011-10-05 Thread Peter Alexander
On 5/10/11 9:41 PM, maarten van damme wrote: great news, will certainly help d a bit forward but will it be for d1 or d2? GDC is both I believe.

Re: std.getopt suggestion

2011-10-05 Thread Nick Sabalausky
Jens Mueller jens.k.muel...@gmx.de wrote in message news:mailman.21.1317824685.28623.digitalmar...@puremagic.com... I think we have failed, if a significant number of users rather write their own command line parsing than using the built-in one. I suspect that what often happens is what

Re: std.getopt suggestion

2011-10-05 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:j6hrko$ni3$1...@digitalmars.com... On 10/5/11 6:53 AM, Regan Heath wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Did it ever prevent you from getting anything done

Re: std.getopt suggestion

2011-10-05 Thread Jens Mueller
Nick Sabalausky wrote: Jens Mueller jens.k.muel...@gmx.de wrote in message news:mailman.21.1317824685.28623.digitalmar...@puremagic.com... I think we have failed, if a significant number of users rather write their own command line parsing than using the built-in one. I suspect that what

Re: Thoughts on improving operators

2011-10-05 Thread kennytm
Gor Gyolchanyan gor.f.gyolchan...@gmail.com wrote: The whole point was to put the question mark to a better use. I mean, it's used in the ternary operator exclusively. It's such a waste of a token. The question mark logically belongs to bools (which goes good with the ternary operator), but

Re: std.getopt suggestion

2011-10-05 Thread kennytm
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 10/5/11 6:53 AM, Regan Heath wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Did it ever prevent you from getting anything done with it? That's not the question we should be

Re: Garbage collection book

2011-10-05 Thread Jonathan M Davis
On Wednesday, October 05, 2011 13:39 Walter Bright wrote: On 10/5/2011 12:31 PM, Jonathan M Davis wrote: And D's GC can use all of the help that it can get. It's not that bad. For one thing, it's reliable. Regardless of how good or bad it is, it needs all the help that it can get. The GC

Re: Exchange of possible interest :o)

2011-10-05 Thread Iain Buclaw
== Quote from Sean Kelly (s...@invisibleduck.org)'s article So the next step is a manhunt for Dave F. Or a rewrite of the parts he contr ibuted? Sent from my iPhone On Oct 4, 2011, at 3:53 PM, Andrei Alexandrescu SeeWebsiteForEmail@erdani.o rg wrote:

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/05/11 16:37, kennytm wrote: I don't buy this. You make it sounds like the community cannot contribute with more than 1 focus concurrently. The fact is that, the GCC integration, making wrappers of C library and switching to non-global in std.getopt are done in parallel by different

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/05/11 16:25, Nick Sabalausky wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message news:j6hrko$ni3$1...@digitalmars.com... On 10/5/11 6:53 AM, Regan Heath wrote: On Tue, 04 Oct 2011 20:39:42 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Did it ever

DMD license and server installations

2011-10-05 Thread Marco Leise
I am part of a team that organizes a programming contest that supports multiple programming languages. Since there are multiple servers that need to be set up, someone in the team placed all source packages for the supported languages on our main server, ignorantly assuming that no license

Re: std.getopt suggestion

2011-10-05 Thread Adam Ruppe
Andrei wrote: We don't kind of have a MySQL library. We just don't have one. Actually, we have three or four. Maybe more. There aren't any in phobos, but they are still fairly easy to find. (Or hell to just wrap C takes less than an hour.)

Re: std.getopt suggestion

2011-10-05 Thread Andrei Alexandrescu
On 10/05/11 17:53, Adam Ruppe wrote: Andrei wrote: We don't kind of have a MySQL library. We just don't have one. Actually, we have three or four. Maybe more. There aren't any in phobos, but they are still fairly easy to find. Well that wasn't the best example, but you know what I mean.

Re: DMD license and server installations

2011-10-05 Thread Walter Bright
On 10/5/2011 3:48 PM, Marco Leise wrote: I am part of a team that organizes a programming contest that supports multiple programming languages. Since there are multiple servers that need to be set up, someone in the team placed all source packages for the supported languages on our main server,

Re: std.getopt suggestion

2011-10-05 Thread Adam Ruppe
Andrei wrote: link to a few There's mine: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff see database.d and mysql.d for mysql. Also some code for postgres and sqlite in there own modules. Piotr Szturmaj's is postgres only, but generally vastly superior to

Re: operator overloading and templates

2011-10-05 Thread Steven Schveighoffer
On Tue, 04 Oct 2011 12:24:52 -0400, jimmy zsu0...@yahoo.com.tw wrote: Hi, I have the following code. struct Foo(int DIM) { Foo!(DIM) opBinary(string op) (Foo!(DIM) rhs) if (op == + || op == -) { return Foo!(DIM)(); } } unittest {

check for running process

2011-10-05 Thread Dsmith
In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system call or getenv(), how might isRunning() be adapted to check if a program is running? Ideally: isrunning(program_name);

Re: Simple I know, but could use some help compiling with make

2011-10-05 Thread Ola Ost
I had exactly this problem too, I asked on the Derelict forums: http://www.dsource.org/forums/viewtopic.php?t=5856sid=8ebff671fafec3bd8962ddfceaf99eb8 At the moment I've resolved this by building Derelict with make, first a normal full build, then a second run using the cleandi target, which

Re: check for running process

2011-10-05 Thread Steven Schveighoffer
On Wed, 05 Oct 2011 10:38:58 -0400, Dsmith dsm...@nomail.com wrote: In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system call or getenv(), how might isRunning() be adapted to check if a program is running?

Re: check for running process

2011-10-05 Thread Regan Heath
On Wed, 05 Oct 2011 16:05:02 +0100, Steven Schveighoffer schvei...@yahoo.com wrote: On Wed, 05 Oct 2011 10:38:58 -0400, Dsmith dsm...@nomail.com wrote: In the core.thread library, there is a method isRunning() which takes a thread. To make code more portable, rather than use a system

Re: check for running process

2011-10-05 Thread Kagamin
Steven Schveighoffer Wrote: It's just the getting of the pid based on the name is not straightforward. There's an open standard for this: http://en.wikipedia.org/wiki/Common_Information_Model_%28computing%29

Implicit cast to immutable

2011-10-05 Thread bearophile
Do you know why this program doesn't compile (with DMD 2.056head)? immutable(int[]) foo(in int[] x) pure { return new int[1]; } void main() {} It gives: test.d(2): Error: cannot implicitly convert expression (new int[](1u)) of type int[] to immutable(int[]) This program instead compiles

Re: Implicit cast to immutable

2011-10-05 Thread Andrej Mitrovic
Maybe: immutable(int[]) foo(in int[] x) pure { return new immutable(int[1]); } void main() {} Or does this have something to do with implicit casts to immutable for pure functions? I'm only vaguely familiar with pure..

Re: Implicit cast to immutable

2011-10-05 Thread bearophile
Andrej Mitrovic: Maybe: immutable(int[]) foo(in int[] x) pure { return new immutable(int[1]); } void main() {} I'd like to know why the code in my original post doesn't compile. I suspect it's a DMD bug, but I am not sure. Or does this have something to do with implicit casts to

[Issue 5886] Template this parameter cannot be made implicit, when other parameters are explicitly given

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5886 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6769] New: [CTFE] AA.keys doesn't compile when -inline is used

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6769 Summary: [CTFE] AA.keys doesn't compile when -inline is used Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2

[Issue 3748] inout does not work properly

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3748 --- Comment #7 from Steven Schveighoffer schvei...@yahoo.com 2011-10-05 06:31:35 PDT --- Created an attachment (id=1035) Corrected some errors that were previously hard to detect because inout didn't work uploaded a fixed version of

[Issue 6770] New: inout is allowed on fields

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6770 Summary: inout is allowed on fields Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD

[Issue 3748] inout does not work properly

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3748 --- Comment #8 from Steven Schveighoffer schvei...@yahoo.com 2011-10-05 06:49:38 PDT --- See new bug 6770 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 6771] New: Jagged array and init causing DMD to take a LONG time to compile.

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6771 Summary: Jagged array and init causing DMD to take a LONG time to compile. Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW

[Issue 6770] inout is allowed on fields

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6770 --- Comment #1 from Steven Schveighoffer schvei...@yahoo.com 2011-10-05 08:06:15 PDT --- I should add that this bug is valid only for the (currently unreleased) 2.056 version, 2.055 does not have a valid inout implementation. -- Configure

[Issue 6759] missing initialization in foreach with alias this

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6759 --- Comment #3 from d...@dawgfoto.de 2011-10-05 12:04:09 PDT --- (In reply to comment #1) Your patch was already merged (commit: f53ff46), and it looks correct to me the fixing lack of merging prelude before semantic. But, your sample

[Issue 6772] New: Cannot pass cfloat argument type to a function on x86_64

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6772 Summary: Cannot pass cfloat argument type to a function on x86_64 Product: D Version: D1 D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity:

[Issue 6773] New: inout variable should not be modifiable

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6773 Summary: inout variable should not be modifiable Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal

[Issue 6774] New: Assertion failure: '0' on line 1117 in file 'glue.c'

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6774 Summary: Assertion failure: '0' on line 1117 in file 'glue.c' Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: major Priority: P2

[Issue 6770] inout is allowed on fields

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6770 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||accepts-invalid, patch

[Issue 6773] inout variable should not be modifiable

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6773 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #1

[Issue 3748] inout does not work properly

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3748 --- Comment #9 from Kenji Hara k.hara...@gmail.com 2011-10-05 17:41:38 PDT --- For fixing error8 and error11. https://github.com/D-Programming-Language/dmd/pull/433 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email

[Issue 6769] [CTFE] AA.keys doesn't compile when -inline is used

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6769 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6775] New: [CTFE] foreach over an AA fails

2011-10-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6775 Summary: [CTFE] foreach over an AA fails Product: D Version: D1 D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2