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 wrote: > On Monday 15 November 2010 11:44:11 spir wrote: > > On Mon, 15 Nov 2010 09:45:26 -0800 > > > > Jonathan M Davis wrote: > > > On Monday, November 15, 2010 06:00:33 Manfred_Nowak wrote: > > > > Jonathan M Davis wrote: > > > > > Having p

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 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 = a ?

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 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 doesn't look like

Re: forbid field name conflict in class hierarchy

2010-11-16 Thread spir
On Tue, 16 Nov 2010 05:37:52 -0500 bearophile 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 doesn't look like

Re: RFC, ensureHeaped

2010-11-16 Thread Steven Schveighoffer
On Mon, 15 Nov 2010 17:02:27 -0500, bearophile 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 programmers may write "sc

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 bearophile 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: 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" 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 the s

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 > >

Re: Compiler optimization breaks multi-threaded code

2010-11-16 Thread Sean Kelly
Kagamin 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

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 ind

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!")

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 to

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 doe

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 a

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 -releas

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 > > w

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"); >

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 pre

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 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 perform heap allocations:

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 th

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 co

Re: modulus and array.length

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 10:55:24 -0500, David Osborne 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(){ int[x] arr = [0, 1, 2

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 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 there could be a std.range mo

Re: RFC, ensureHeaped

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:04:32 -0500, Andrei Alexandrescu wrote: On 11/16/10 4:40 AM, Steven Schveighoffer wrote: On Mon, 15 Nov 2010 17:02:27 -0500, bearophile wrote: I have even suggested a transitive @noheap annotation, similar to @nothrow, that makes sure a function contains no heap allo

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-use

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 > 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 hierar

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 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, li

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 wh

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 wrote: Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale wrote: > > Andrei, > > Maybe it is time that the structure of the standard library became more > generalized. At the moment we have std... and core... > > P

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 > > wrote: > > On 11/16/10 4:40 AM, Steven Schveighoffer wrote: > >> On Mon, 15 Nov 2010 17:02:27 -0500, bearophile > >> > >> wrote: > >>> I have even suggested a transit

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 g

Re: std.date

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 14:11:05 -0500, 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.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, DOM

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 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.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 wrote: > On 11/16/10 4:24 AM, Aleksandar Ružičić wrote: >> >> I'm trying to use remove() from std.algorithm to remo

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 th

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ć : > 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, A

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 p

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 function

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: priva

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 we

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 co

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 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. > > Agreed. Ideal

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

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 Ph

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 cas

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 caused

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 comp

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 (

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 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 reference counting, probab

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 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

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 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 on default isn't

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 u

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 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 happy to provide different ways

Re: std.date

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 20:17:53 -0500, Jonathan M Davis 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 even believe we was

"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 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 counti

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 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 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 what the response to my example

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 wrote: On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu wrote: http://news.ycombinator.com/item?id=1912728 Andrei "I like go because every single feature go has is the best e

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 > > 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

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 wrote: On 11/16/10 9:21 PM, Steven Schveighoffer wrote: On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu wrote: http://news.ycombinator.com/item?id=1912728 Andrei "I like go b

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 i

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 > > 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 > >> >

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 functio

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

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 > wrote: > >> On 11/16/10 9:21 PM, Steven Schveighoffer wrote: >>> On Wed, 17 Nov 2010 00:10:54 -0500, Andrei Alexandrescu >>> wrote: >>> http://news.ycombinator.com/it