Re: Another SQLite3 wrapper

2010-11-16 Thread Alexey Khmara
Thanks for the reply, Russel! Ok, I'll add unit tests and some example. As for support for other databases, it's complex enough task to design good common database layer, while I currently need only SQLite. Apart from that, there are very few types in SQLite, and these tipes map into D's intenal

Re: Another SQLite3 wrapper

2010-11-16 Thread Alexey Khmara
From user side it's not hard to make it simple. Differences could be minimized, plugins added etc. I'll try to add MySQL, and if it's possible to implement common interface, I'll do it. But I'm not sure that it will be easy. 2010/11/16 Diego Cano Lagneaux d.cano.lagne...@gmail.com: [ ... ] In

Re: Utah Valley University teaches D (using TDPL)

2010-11-16 Thread Sean Kelly
bearophile Wrote: He also gives a quite useful unittest that the student implementation must pass, this is a good usage of unittests. The unit test ends like this: ... writeln(unit test passed); } Indeed, a person needs feedback that the unittests have run (and have succeed), I

Re: The D Scripting Language

2010-11-16 Thread Per Ångström
On 2010-11-16 01:10, Daniel Murphy wrote: I think allowing the second expression in the ternary operator to be omitted would be a better fit for D, and provide the same function. ie. auto x = a ? a : b; auto x = a ? : b; Personally I had '|||' in mind, but I'm OK with '?:'. I think it should

Re: DDMD not update£¬why£ ¿

2010-11-16 Thread Trass3r
Why do not you update it? GDC has been updated to dmd2.049 . Why don't you contribute? It's a lot of work.

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread spir
On Mon, 15 Nov 2010 12:32:07 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday 15 November 2010 11:44:11 spir wrote: On Mon, 15 Nov 2010 09:45:26 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, November 15, 2010 06:00:33 Manfred_Nowak wrote: Jonathan M Davis

Re: DDMD not update£¬why£¿

2010-11-16 Thread dennis luehring
Am 16.11.2010 03:33, schrieb DOLIVE: Why do not you update it? GDC has been updated to dmd2.049 . please, please - learn a little bit more english all your posts are just sounding like commands

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread bearophile
spir: (and bug-prone, because sometimes the absence of a fields seems not caught, for any reason), so I add fields to the top type. What do you mean? Do you have an example? (Adding fields to the top type doesn't look like a good idea, generally). Bye, bearophile

Re: DDMD not update��why��

2010-11-16 Thread Iain Buclaw
== Quote from dennis luehring (dl.so...@gmx.net)'s article Am 16.11.2010 03:33, schrieb DOLIVE: Why do not you update it? GDC has been updated to dmd2.049 . please, please - learn a little bit more english pour qui?

Re: The D Scripting Language

2010-11-16 Thread spir
On Tue, 16 Nov 2010 09:44:06 +0100 Per Ångström d-n...@autark.se wrote: On 2010-11-16 01:10, Daniel Murphy wrote: I think allowing the second expression in the ternary operator to be omitted would be a better fit for D, and provide the same function. ie. auto x = a ? a : b; auto x =

Re: DDMD not update£¬why£¿

2010-11-16 Thread DOLIVE
dennis luehring дµ½: Am 16.11.2010 03:33, schrieb DOLIVE: Why do not you update it? GDC has been updated to dmd2.049 . please, please - learn a little bit more english all your posts are just sounding like commands haha... : )

Re: DDMD not update£¬why£¿

2010-11-16 Thread DOLIVE
dennis luehring дµ½: Am 16.11.2010 03:33, schrieb DOLIVE: Why do not you update it? GDC has been updated to dmd2.049 . please, please - learn a little bit more english all your posts are just sounding like commands haha... sory ! : )

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread spir
On Tue, 16 Nov 2010 05:37:52 -0500 bearophile bearophileh...@lycos.com wrote: spir: (and bug-prone, because sometimes the absence of a fields seems not caught, for any reason), so I add fields to the top type. What do you mean? Do you have an example? (Adding fields to the top type

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread spir
On Tue, 16 Nov 2010 05:37:52 -0500 bearophile bearophileh...@lycos.com wrote: spir: (and bug-prone, because sometimes the absence of a fields seems not caught, for any reason), so I add fields to the top type. What do you mean? Do you have an example? (Adding fields to the top type

Re: RFC, ensureHeaped

2010-11-16 Thread Steven Schveighoffer
On Mon, 15 Nov 2010 17:02:27 -0500, bearophile bearophileh...@lycos.com wrote: Steven Schveighoffer: To have the language continually working against that goal is going to great for inexperienced programmers but hell for people trying to squeeze performance out of it. The experienced

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread Dmitry Olshansky
On 16.11.2010 14:40, spir wrote: On Tue, 16 Nov 2010 05:37:52 -0500 bearophilebearophileh...@lycos.com wrote: spir: (and bug-prone, because sometimes the absence of a fields seems not caught, for any reason), so I add fields to the top type. What do you mean? Do you have an example?

Re: The D Scripting Language

2010-11-16 Thread Leandro Lucarella
Daniel Murphy, el 16 de noviembre a las 10:10 me escribiste: Per �ngstr�m d-n...@autark.se wrote in message news:ibr8bs$22m...@digitalmars.com... return s || default; I think allowing the second expression in the ternary operator to be omitted would be a better fit for D, and provide

Re: Type-safe channels (Re: One year of Go)

2010-11-16 Thread Sean Kelly
Graham Fawcett Wrote: On Fri, 12 Nov 2010 18:15:15 -0500, Sean Kelly wrote: To be honest, I haven't spent much time with Go because my cursory exposure to the language hasn't shown it to solve the problems I care about better than the languages I currently use. I think Go is in the

Re: Compiler optimization breaks multi-threaded code

2010-11-16 Thread Sean Kelly
Kagamin s...@here.lot wrote: Sean Kelly Wrote: shared uint cnt; void atomicInc ( ) { uint o; while ( !cas( cnt, o, o + 1 ) ) o = cnt; } is compiled with dmd -O to something like: shared uint cnt; void atomicInc ( ) { while ( !cas( cnt, cnt, cnt + 1 ) ) { } } What a mess. DMD

std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
I'm trying to use remove() from std.algorithm to remove item from an array and when I tried to use SwapStrategy.unstable (as I don't need to maintain order of items in array and I want to optimize where ever I can) I came to surprising results. In the example below one would expect that item at

Re: The D Scripting Language

2010-11-16 Thread Alexey Khmara
Script mode (actually - simple wrapper) would be better: It could do simple parsing of script, bringing all import clauses to the beginning and add some default imports (like std.stdio). It seems that all code below imports can be wrapped into main declaration. So for writeln(hello, world!); we

modulus and array.length

2010-11-16 Thread David Osborne
Hi, I've noticed that the modulus operator acts differently when the divisor is the length of an array and the dividend is negative. For instance, this code: import std.stdio; const int x = 4; void main(){ int[x] arr = [0, 1, 2, 3]; writeln(Using arr.length); for(int i = -3; i = 0;

assert(false) with -unittest

2010-11-16 Thread Jens Mueller
Hi, assert(false) should generate the hlt instruction in release mode. I.e. assert.d: void hlt() { assert(false); } $ dmd -release -c assert.d $ obj2asm assert.o | grep -w hlt works. But $ dmd -unittest -release -c assert.d $ obj2asm assert.o | grep -w hlt fails. Can't one have hlt

Re: The D Scripting Language

2010-11-16 Thread Adam Ruppe
Script mode (actually - simple wrapper) would be better: It could do simple parsing of script, bringing all import clauses to the beginning and add some default imports (like std.stdio). It seems that all code below imports can be wrapped into main declaration. My rund.d program does this.

DMD Automatic Dependency Linking

2010-11-16 Thread Travis
DMD currently follows a fairly standard compiler methodology: - Compile a bunch of source files into binary objects (to generate .o). - Act as a front end to an archiver (to generate .a). - Act as a front end to a linker (to generate final binary). This makes integration with most build systems

Re: assert(false) with -unittest

2010-11-16 Thread dsimcha
== Quote from Jens Mueller (jens.k.muel...@gmx.de)'s article Hi, assert(false) should generate the hlt instruction in release mode. I.e. assert.d: void hlt() { assert(false); } $ dmd -release -c assert.d $ obj2asm assert.o | grep -w hlt works. But $ dmd -unittest -release -c

Re: assert(false) with -unittest

2010-11-16 Thread Jens Mueller
dsimcha wrote: == Quote from Jens Mueller (jens.k.muel...@gmx.de)'s article Hi, assert(false) should generate the hlt instruction in release mode. I.e. assert.d: void hlt() { assert(false); } $ dmd -release -c assert.d $ obj2asm assert.o | grep -w hlt works. But $ dmd

Re: modulus and array.length

2010-11-16 Thread Jens Mueller
Hi, I've noticed that the modulus operator acts differently when the divisor is the length of an array and the dividend is negative. For instance, this code: import std.stdio; const int x = 4; void main(){ int[x] arr = [0, 1, 2, 3]; writeln(Using arr.length); for(int i =

Re: RFC, ensureHeaped

2010-11-16 Thread bearophile
Steven Schveighoffer: The experienced programmers may write scope int[] a..., and have no heap allocations. This is a good idea. This isn't what I thought spir was saying, I thought he wanted the function to always allocate. I have also suggested that when scope is not present, DMD

Re: RFC, ensureHeaped

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 4:40 AM, Steven Schveighoffer wrote: On Mon, 15 Nov 2010 17:02:27 -0500, bearophile bearophileh...@lycos.com wrote: I have even suggested a transitive @noheap annotation, similar to @nothrow, that makes sure a function contains no heap allocations and doesn't call other things that

Re: std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 4:24 AM, Aleksandar Ružičić wrote: I'm trying to use remove() from std.algorithm to remove item from an array and when I tried to use SwapStrategy.unstable (as I don't need to maintain order of items in array and I want to optimize where ever I can) I came to surprising results. In

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steve Teale
Andrei Alexandrescu Wrote: I am sorry for the inadvertent change, it wasn't meant to change semantics of existing code. I'm not sure whether one of my unrelated 64-bit changes messed things up. You may want to file a bug report. There are a number of good reasons for which I was

Re: modulus and array.length

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 10:55:24 -0500, David Osborne krendilbo...@gmail.com wrote: Hi, I've noticed that the modulus operator acts differently when the divisor is the length of an array and the dividend is negative. For instance, this code: import std.stdio; const int x = 4; void main(){

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale steve.te...@britseyeview.com wrote: Andrei, Maybe it is time that the structure of the standard library became more generalized. At the moment we have std... and core... Perhaps we need another branch in the hierarchy, like ranges... Then

Re: RFC, ensureHeaped

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:04:32 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 4:40 AM, Steven Schveighoffer wrote: On Mon, 15 Nov 2010 17:02:27 -0500, bearophile bearophileh...@lycos.com wrote: I have even suggested a transitive @noheap annotation, similar to

std.socket and std.socketstream

2010-11-16 Thread Steve Teale
Users who consider using these two modules in conjunction should beware of clashes. I used std.socketstream in a micro-server context to read the individual lines of an http request. After that I reverted to socket level to keep the connection open for some time so that the client could

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steve Teale
Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale steve.te...@britseyeview.com wrote: Andrei, Maybe it is time that the structure of the standard library became more generalized. At the moment we have std... and core... Perhaps we need another branch

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread sybrandy
On 11/16/2010 01:30 PM, Steven Schveighoffer wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale steve.te...@britseyeview.com wrote: Andrei, Maybe it is time that the structure of the standard library became more generalized. At the moment we have std... and core... Perhaps we need

Re: DMD Automatic Dependency Linking

2010-11-16 Thread Matthias Pleh
Am 16.11.2010 18:38, schrieb Travis: The one thing I have been wondering however is why doesn't DMD have a flag for easy project building which compiles dependencies in a single command. [...] Thanks, tbone Have you tried 'rdmd' ?

std.date

2010-11-16 Thread Steve Teale
I have moaned several times about the fact that this module does not have a method for creating a date from the system clock. It provides a parse method to convert a string in a limited number of formats. In the course of doing that, it calls the OS primitive to get the time zone offset. So

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:46:48 -0500, Steve Teale steve.te...@britseyeview.com wrote: Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale steve.te...@britseyeview.com wrote: Andrei, Maybe it is time that the structure of the standard library became more

Re: RFC, ensureHeaped

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 10:31:43 Steven Schveighoffer wrote: On Tue, 16 Nov 2010 13:04:32 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 4:40 AM, Steven Schveighoffer wrote: On Mon, 15 Nov 2010 17:02:27 -0500, bearophile bearophileh...@lycos.com

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 10:16 AM, Steve Teale wrote: Andrei Alexandrescu Wrote: I am sorry for the inadvertent change, it wasn't meant to change semantics of existing code. I'm not sure whether one of my unrelated 64-bit changes messed things up. You may want to file a bug report. There are a number of

Re: std.date

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 14:11:05 -0500, Steve Teale steve.te...@britseyeview.com wrote: I have moaned several times about the fact that this module does not have a method for creating a date from the system clock. It provides a parse method to convert a string in a limited number of formats.

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steve Teale
Steven Schveighoffer Wrote: I'm guessing you are referring to php's pcre vs posix regex? I think posix is marked as deprecated... Steve, No. I just meant that the library that comes with PHP seems happy to provide different ways of doing the same thing, as in for example, CURL,

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 10:30:03 Steven Schveighoffer wrote: The standard library should not have something to please everyone. If there is 5 different styles to do the same thing, it will be a failure. Agreed. Ideally, the standard library would be very uniform in approach. That makes

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 10:46 AM, Steve Teale wrote: Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale steve.te...@britseyeview.com wrote: Andrei, Maybe it is time that the structure of the standard library became more generalized. At the moment we have std... and core...

Re: std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
No problem, just to isolate the code and to confirm it's not something to other parts of my code (but I'm pretty sure it's not). On Tue, Nov 16, 2010 at 7:03 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 4:24 AM, Aleksandar Ružičić wrote: I'm trying to use remove()

Re: std.date

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 11:11:05 Steve Teale wrote: I have moaned several times about the fact that this module does not have a method for creating a date from the system clock. It provides a parse method to convert a string in a limited number of formats. In the course of doing that,

Re: std.algorithm.remove using SwapStrategy.unstable doesn't works

2010-11-16 Thread Aleksandar Ružičić
filed as Issue #5224 - http://d.puremagic.com/issues/show_bug.cgi?id=5224 regards, Aleksandar 2010/11/16 Aleksandar Ružičić ruzicic.aleksan...@gmail.com: No problem, just to isolate the code and to confirm it's not something to other parts of my code (but I'm pretty sure it's not). On Tue,

Re: Function, signatures and tuples

2010-11-16 Thread Pelle Månsson
On 11/13/2010 11:43 AM, Russel Winder wrote: On Sat, 2010-11-13 at 08:18 +, Iain Buclaw wrote: [ . . . ] import std.typecons; ? Hummm... I thought I had put that in but clearly I had not :-(( OK so that explains the bulk of the problems on this code, I knew it was something stupid on my

Re: RFC, ensureHeaped

2010-11-16 Thread bearophile
Jonathan M Davis: Pure is hard enough to deal with (especially since it we probably have made it the default, but it's too late for that now). Weakly pure on default isn't good for a language that is supposed to b e somewhat compatible with C syntax, I think it breaks too many C functions.

std.container.BinaryHeap + refCounted = WTF???

2010-11-16 Thread dsimcha
I'm trying to use BinaryHeap in a multithreaded programming using std.parallelism/parallelfuture. I kept getting ridiculous segfaults and stuff, and when I looked into it in a debugger, I realized the crashes had to do with reference counting, probably caused by this line in BinaryHeap:

Re: std.date

2010-11-16 Thread Kagamin
Steve Teale Wrote: It also strikes me as odd that it does not include a table of leap seconds. As it stands, some of its methods could return values that were out by a year for up to four or five seconds on January 1 2011. I'm no expert on UTC, Gregorian Calendar and such, so I could well

Re: RFC, ensureHeaped

2010-11-16 Thread Jonathan M Davis
On Tuesday 16 November 2010 12:37:10 bearophile wrote: Jonathan M Davis: Pure is hard enough to deal with (especially since it we probably have made it the default, but it's too late for that now). Weakly pure on default isn't good for a language that is supposed to b e somewhat

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread spir
On Tue, 16 Nov 2010 11:24:02 -0800 Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday, November 16, 2010 10:30:03 Steven Schveighoffer wrote: The standard library should not have something to please everyone. If there is 5 different styles to do the same thing, it will be a failure.

Re: assert(false) with -unittest

2010-11-16 Thread bearophile
dsimcha: I think this is correct. The -unittest switch implicitly turns on asserts, and as far as I can tell makes the -release switch ignored. This means that assert(false) is no longer special and works just like a regular assert as per TDPL. Is this a problem in practice? If so,

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread bearophile
Steve Teale: The current system, where modules of the library can get arbitrarily deprecated and at some point removed because they are unfashionable, is very unfriendly. We are in the initial phase of Phobos develpment, so frequent large changes are expected. Surely one year from now

Re: modulus and array.length

2010-11-16 Thread Jérôme M. Berger
David Osborne wrote: Using arr.length -3 mod 3 = 1 -- this should be 0 -2 mod 3 = 2 -- this should be 1 -1 mod 3 = 0 -- this should be 2 0 mod 3 = 0 Like others have said, this is due to the fact that when one operand is unsigned (here the length), then all operands get casted to

Re: std.container.BinaryHeap + refCounted = WTF???

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 12:47 PM, dsimcha wrote: I'm trying to use BinaryHeap in a multithreaded programming using std.parallelism/parallelfuture. I kept getting ridiculous segfaults and stuff, and when I looked into it in a debugger, I realized the crashes had to do with reference counting, probably

Re: modulus and array.length

2010-11-16 Thread Kagamin
Jérôme M. Berger Wrote: -3 mod 3 = 0 -2 mod 3 = -2 -1 mod 3 = -1 0 mod 3 = 0 Note that from a strictly mathematical point of view, this result is valid: for all x and all n, x-(x%n) is a multiple of n. It's rather (x/n)+(x%n)==x

Re: The D Scripting Language

2010-11-16 Thread Alexey Khmara
I really think that it would be good to ship something like this with dmd and promote it default D script handler. May be, parsing must be more complicated (I'm not sure that all features will work inside main()), but as D is easy for parsing I see no big problems.Of cource, we can add more

Re: modulus and array.length

2010-11-16 Thread Jérôme M. Berger
Kagamin wrote: Jérôme M. Berger Wrote: -3 mod 3 = 0 -2 mod 3 = -2 -1 mod 3 = -1 0 mod 3 = 0 Note that from a strictly mathematical point of view, this result is valid: for all x and all n, x-(x%n) is a multiple of n. It's rather (x/n)+(x%n)==x That is (part of) the

Re: Compiler optimization breaks multi-threaded code

2010-11-16 Thread stephan
Am 16.11.2010 18:09, schrieb Sean Kelly: cas() contains an asm block. Though I guess in this case the compiler isn't actually optimizing across it. Does atomic!+=(cnt, 1) work correctly? I know the issue with shared would still have to be fixed, but that code uses asm for the load as well, so

Re: modulus and array.length

2010-11-16 Thread bearophile
J. M. Berger: (bearophile probably has a bug report for it ;) ) Yup, bug 3843. Bye, bearophile

Re: std.container.BinaryHeap + refCounted = WTF???

2010-11-16 Thread Michel Fortin
On 2010-11-16 15:47:07 -0500, dsimcha dsim...@yahoo.com said: I'm trying to use BinaryHeap in a multithreaded programming using std.parallelism/parallelfuture. I kept getting ridiculous segfaults and stuff, and when I looked into it in a debugger, I realized the crashes had to do with

Re: modulus and array.length

2010-11-16 Thread David Osborne
Thanks for the info, everyone. I guess I'll just have to be more careful what I use modulus with :) ~Dave

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 03:40:24 spir wrote: On Tue, 16 Nov 2010 05:37:52 -0500 bearophile bearophileh...@lycos.com wrote: spir: (and bug-prone, because sometimes the absence of a fields seems not caught, for any reason), so I add fields to the top type. What do you mean? Do

Re: std.date

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 13:00:17 Kagamin wrote: Steve Teale Wrote: It also strikes me as odd that it does not include a table of leap seconds. As it stands, some of its methods could return values that were out by a year for up to four or five seconds on January 1 2011. I'm no

Re: RFC, ensureHeaped

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 16:04:18 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday 16 November 2010 12:37:10 bearophile wrote: Jonathan M Davis: Pure is hard enough to deal with (especially since it we probably have made it the default, but it's too late for that now). Weakly pure

Re: Compiler optimization breaks multi-threaded code

2010-11-16 Thread Sean Kelly
stephan Wrote: Am 16.11.2010 18:09, schrieb Sean Kelly: cas() contains an asm block. Though I guess in this case the compiler isn't actually optimizing across it. Does atomic!+=(cnt, 1) work correctly? I know the issue with shared would still have to be fixed, but that code uses asm for

Re: std.regexp vs std.regex [Re: RegExp.find() now crippled]

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 14:24:32 -0500, Steve Teale steve.te...@britseyeview.com wrote: Steven Schveighoffer Wrote: I'm guessing you are referring to php's pcre vs posix regex? I think posix is marked as deprecated... Steve, No. I just meant that the library that comes with PHP seems

Re: std.date

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 20:17:53 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: (DST is one of the stupidest ideas even IMHO; I don't even want to _think_ about how many bugs it's created) No, the stupidest idea was to *change* DST a few years ago. That had absolutely no purpose, I can't

In praise of Go discussion on ycombinator

2010-11-16 Thread Andrei Alexandrescu
http://news.ycombinator.com/item?id=1912728 Andrei

Re: std.container.BinaryHeap + refCounted = WTF???

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 15:47:07 -0500, dsimcha dsim...@yahoo.com wrote: I'm trying to use BinaryHeap in a multithreaded programming using std.parallelism/parallelfuture. I kept getting ridiculous segfaults and stuff, and when I looked into it in a debugger, I realized the crashes had to do

Another Go vs Python vs D thread

2010-11-16 Thread Walter Bright
http://news.ycombinator.com/item?id=1912728

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Steven Schveighoffer
On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://news.ycombinator.com/item?id=1912728 Andrei I like go because every single feature go has is the best ever! yawn... -Steve

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://news.ycombinator.com/item?id=1912728 Andrei I like go because every single feature go has is the best ever! yawn... -Steve I'm curious

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Steven Schveighoffer
On Wed, 17 Nov 2010 00:24:50 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: http://news.ycombinator.com/item?id=1912728 Andrei I

Re: std.date

2010-11-16 Thread Jonathan M Davis
On Tuesday 16 November 2010 21:08:48 Steven Schveighoffer wrote: On Tue, 16 Nov 2010 20:17:53 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: (DST is one of the stupidest ideas even IMHO; I don't even want to _think_ about how many bugs it's created) No, the stupidest idea was to

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 9:58 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:24:50 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Rainer Deyke
On 11/16/2010 22:24, Andrei Alexandrescu wrote: I'm curious what the response to my example will be. So far I got one that doesn't even address it. I really don't see the problem with requiring that '{' goes on the same line as 'if'. It's something you learn once and never forget because it is

Re: RFC, ensureHeaped

2010-11-16 Thread Rainer Deyke
On 11/16/2010 21:53, Steven Schveighoffer wrote: It makes me think that this is going to be extremely confusing for a while, because people are so used to pure being equated with a functional language, so when they see a function is pure but takes mutable data, they will be scratching their

Re: RFC, ensureHeaped

2010-11-16 Thread Jonathan M Davis
On Tuesday 16 November 2010 20:53:04 Steven Schveighoffer wrote: On Tue, 16 Nov 2010 16:04:18 -0500, Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday 16 November 2010 12:37:10 bearophile wrote: Jonathan M Davis: Pure is hard enough to deal with (especially since it we probably

Re: RFC, ensureHeaped

2010-11-16 Thread Jonathan M Davis
On Tuesday 16 November 2010 23:03:05 Rainer Deyke wrote: On 11/16/2010 21:53, Steven Schveighoffer wrote: It makes me think that this is going to be extremely confusing for a while, because people are so used to pure being equated with a functional language, so when they see a function is

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Jonathan M Davis
On Tuesday 16 November 2010 22:55:42 Rainer Deyke wrote: On 11/16/2010 22:24, Andrei Alexandrescu wrote: I'm curious what the response to my example will be. So far I got one that doesn't even address it. I really don't see the problem with requiring that '{' goes on the same line as

Re: std.date

2010-11-16 Thread Kagamin
Jonathan M Davis Wrote: Honestly, leap seconds are complete stupidity with regards to computers. They just complicate things. I think, it's ok, computers work with nominal time and synchronize with world as needed. Hardly you can catch a bug with leap seconds.

Re: In praise of Go discussion on ycombinator

2010-11-16 Thread Jay Byrd
On Wed, 17 Nov 2010 00:58:28 -0500, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:24:50 -0500, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu

Re: explore current scope, or other hack

2010-11-16 Thread spir
On Mon, 15 Nov 2010 21:35:19 +0100 Simen kjaeraas simen.kja...@gmail.com wrote: spir denis.s...@gmail.com wrote: On Mon, 15 Nov 2010 12:44:24 -0500 bearophile bearophileh...@lycos.com wrote: spir: 1. name objects automatically I need some objects to know their name (as field on

Re: effect of a label on following block

2010-11-16 Thread Nick Voronin
On Mon, 15 Nov 2010 19:34:46 +0300, Ellery Newcomer ellery-newco...@utulsa.edu wrote: My gut feeling is that the if statement's behavior is wrong and the while statement's is correct, but it could go either way. I agree, I think case with 'when' works as specs say. No need for a rationale

[Issue 2954] [tdpl] Appalling bug in associative arrays (D2 only)

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2954 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch CC|

[Issue 4414] ICE(cgcs.c) Taking item of static array returned by function

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4414 Per �ngstr�m d-bugzi...@autark.se changed: What|Removed |Added CC||d-bugzi...@autark.se

[Issue 2828] Typedef'ed template struct incorrectly recognized as an inner struct

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2828 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5221] New: entity.c: Merge Walter's list with Thomas'

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5221 Summary: entity.c: Merge Walter's list with Thomas' Product: D Version: D1 D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 5221] entity.c: Merge Walter's list with Thomas'

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5221 --- Comment #1 from Iain Buclaw ibuc...@ubuntu.com 2010-11-16 05:45:59 PST --- Random examples of tests that fail on DMD: static assert('\check;'==10003); static assert('\lsim;'==8818); static assert('\numero;'==8470); static

[Issue 5221] entity.c: Merge Walter's list with Thomas'

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5221 --- Comment #2 from Iain Buclaw ibuc...@ubuntu.com 2010-11-16 06:07:53 PST --- (From update of attachment 815) diff -ur src.orig/entity.c src/entity.c --- src.orig/entity.c2010-03-31 01:26:18.0 +0100 +++ src/entity.c2010-11-16

[Issue 5222] New: label prepending block in 'ThenStatement' breaks creating new scope

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5222 Summary: label prepending block in 'ThenStatement' breaks creating new scope Product: D Version: D1 D2 Platform: x86 OS/Version: Windows Status: NEW

[Issue 5223] New: [qtd] Cannot use default value with function parameter of struct type

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5223 Summary: [qtd] Cannot use default value with function parameter of struct type Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW

[Issue 5223] [qtd] Cannot use default value with function parameter of struct type

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5223 --- Comment #1 from Max Samukha samu...@voliacable.com 2010-11-16 09:48:10 PST --- Even simpler test-case: struct S { this(int x) { } void foo(S s = S(42)) { } } void main() { S s; s.foo(); // error } Error:

[Issue 5224] New: std.algorithm.remove!(SwapStrategy.unstable) doesn't work

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5224 Summary: std.algorithm.remove!(SwapStrategy.unstable) doesn't work Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity:

  1   2   >