Re: problem with declaration grammar?

2009-02-18 Thread jerry quinn
Christopher Wright Wrote: > jerry quinn wrote: > > Hi there, > > > > I'm not sure if I'm missing something, but I'm having trouble seeing that a > > simple declaration will parse correctly with the D grammar. > > > > If we take a declaration statment like: > > > > int x = 3; > > > > we have (

Re: Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-18 Thread Bill Baxter
On Thu, Feb 19, 2009 at 2:35 PM, Andrei Alexandrescu wrote: > I'm almost done rewriting the regular expression engine, and some pretty > interesting things have transpired. > > First, I separated the engine into two parts, one that is the actual regular > expression engine, and the other that is t

Is str ~ regex the root of all evil, or the leaf of all good?

2009-02-18 Thread Andrei Alexandrescu
I'm almost done rewriting the regular expression engine, and some pretty interesting things have transpired. First, I separated the engine into two parts, one that is the actual regular expression engine, and the other that is the state of the match with some particular input. The previous cod

Re: memory-mapped files

2009-02-18 Thread Andrei Alexandrescu
Benji Smith wrote: Andrei Alexandrescu wrote: This all would make perfect sense if the performance was about the same in the two cases. But in fact memory mapping introduced a large *pessimization*. Why? I am supposedly copying less data and doing less Pessimization? What a great word! I've

Re: Memory allocation failed

2009-02-18 Thread Jason House
Walter Bright Wrote: > Jason House wrote: > > Apparently, setting an array length to -1 will cause this issue. It's > > unfortunate to not have a stack trace in the error output, or a functional > > gdb to capture it! I really hope gdb compatiblity will be fixed :( > > What's wrong with gdb?

Re: memory-mapped files

2009-02-18 Thread Benji Smith
Andrei Alexandrescu wrote: This all would make perfect sense if the performance was about the same in the two cases. But in fact memory mapping introduced a large *pessimization*. Why? I am supposedly copying less data and doing less Pessimization? What a great word! I've never heard that bef

Re: problem with declaration grammar?

2009-02-18 Thread Christopher Wright
jerry quinn wrote: Hi there, I'm not sure if I'm missing something, but I'm having trouble seeing that a simple declaration will parse correctly with the D grammar. If we take a declaration statment like: int x = 3; we have (my best guess): DeclarationStatement -> Declaration Declaration ->

core.sync?

2009-02-18 Thread Jason House
Does anybody know when core.sync will be part of the druntime release with D2? It's been in the druntime source for a month. I thought it'd be in the latest release (2.025), but I don't see it :(

Re: default random object?

2009-02-18 Thread Benji Smith
Don wrote: Andrei Alexandrescu wrote: Benji Smith wrote: Benji Smith wrote: Maybe a NumericInterval struct would be a good idea. It could be specialized to any numeric type (float, double, int, etc), it would know its own boundaries, and it'd keep track of whether those boundaries were open

problem with declaration grammar?

2009-02-18 Thread jerry quinn
Hi there, I'm not sure if I'm missing something, but I'm having trouble seeing that a simple declaration will parse correctly with the D grammar. If we take a declaration statment like: int x = 3; we have (my best guess): DeclarationStatement -> Declaration Declaration -> Decl Decl -> BasicTy

Re: OT -- Re: random cover of a range

2009-02-18 Thread Bill Baxter
On Thu, Feb 19, 2009 at 11:08 AM, John Reimer wrote: > Hello Nick, > >> "John Reimer" wrote in message >> news:28b70f8c1460c8cb5f4c18ef2...@news.digitalmars.com... >> >>> So what we have here is a society where people are becoming so used >>> to hearing and saying expletives and profanity that th

Re: OT -- Re: random cover of a range

2009-02-18 Thread John Reimer
Hello Nick, "John Reimer" wrote in message news:28b70f8c1460c8cb5f4c18ef2...@news.digitalmars.com... So what we have here is a society where people are becoming so used to hearing and saying expletives and profanity that they no longer think of their meaning, even though these words retain th

Re: memory-mapped files

2009-02-18 Thread Walter Bright
Andrei Alexandrescu wrote: Nice advice on madvise, didn't know about it. Just in case it might be useful to someone, trying madvise with any of the four possible policies did not yield any noticeable change in timing for my particular test. If you can build 4 windows executables, I can time th

Re: Memory allocation failed

2009-02-18 Thread Walter Bright
Jason House wrote: Apparently, setting an array length to -1 will cause this issue. It's unfortunate to not have a stack trace in the error output, or a functional gdb to capture it! I really hope gdb compatiblity will be fixed :( What's wrong with gdb?

Re: memory-mapped files

2009-02-18 Thread Andrei Alexandrescu
Brad Roberts wrote: bearophile wrote: >> What the heck is going on? When does memory mapping actually help?< You are scanning the file linearly, and the memory window you use is probably very small. In such situation a memory mapping is probably not the best thing. A memory mapping is useful wh

Re: (non)nullable types

2009-02-18 Thread Christopher Wright
Daniel Keep wrote: Christopher Wright wrote: One problem here is static constructors. They're supposed to run in import order, I believe, so if you do this: module A; Object o; static this () { o = new Object; } module B; import A; static this () { writeln(o); } That should be safe. I think.

Re: earthquake changes of std.regexp to come

2009-02-18 Thread Yigal Chripun
Andrei Alexandrescu wrote: dsimcha wrote: == Quote from dsimcha (dsim...@yahoo.com)'s article == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article I'm quite unhappy with the API of std.regexp. It's a chaotic design that provides a hodgepodge of functionality and tries to

Re: OT -- Re: random cover of a range

2009-02-18 Thread Nick Sabalausky
"John Reimer" wrote in message news:28b70f8c1460c8cb5f4c18ef2...@news.digitalmars.com... > > So what we have here is a society where people are becoming so used to > hearing and saying expletives and profanity that they no longer think of > their meaning, even though these words retain their me

Re: earthquake changes of std.regexp to come

2009-02-18 Thread Yigal Chripun
Andrei Alexandrescu wrote: dsimcha wrote: == Quote from dsimcha (dsim...@yahoo.com)'s article == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article I'm quite unhappy with the API of std.regexp. It's a chaotic design that provides a hodgepodge of functionality and tries to

Re: memory-mapped files

2009-02-18 Thread Sean Kelly
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Brad Roberts wrote: > > bearophile wrote: > > >> What the heck is going on? When does memory mapping actually help?< > >> You are scanning the file linearly, and the memory window you use is > >> probably very small. In

Re: OT -- Re: random cover of a range

2009-02-18 Thread Mike Parker
Bill Baxter wrote: On Wed, Feb 18, 2009 at 8:31 AM, Mike Parker wrote: Bill Baxter wrote: The problem I have with the stigma on swearing is that people who find these words objectionable tend to replace them with other words that aren't so objectionable in order to get the same intent across

Re: OT -- Re: random cover of a range

2009-02-18 Thread Mike Parker
Bill Baxter wrote: On Wed, Feb 18, 2009 at 11:10 AM, Nick Sabalausky wrote: "Bill Baxter" wrote in message news:mailman.783.1234919397.22690.digitalmar...@puremagic.com... Unless of course you use those same words to express your dismay at today's lunch options. Then you've robbed those word

Re: OT -- Re: random cover of a range

2009-02-18 Thread Steve Schveighoffer
On Wed, 18 Feb 2009 05:43:06 +, John Reimer wrote: > Hello Steve, > >> On Sun, 15 Feb 2009 17:01:49 +, John Reimer wrote: >> >>> Hello Steve, >>> This is the same kind of attitude, John, that brought about the death of Alan Turing. >>> That's a strong accusation, Steve,

Re: (non)nullable types

2009-02-18 Thread Daniel Keep
Christopher Wright wrote: > One problem here is static constructors. They're supposed to run in > import order, I believe, so if you do this: > > module A; > Object o; > static this () { o = new Object; } > > module B; > import A; > static this () { writeln(o); } > > That should be safe. I thi

Re: (non)nullable types

2009-02-18 Thread Christopher Wright
Christopher Wright wrote: Nick Sabalausky wrote: "Christopher Wright" wrote in message news:gnfgj6$148...@digitalmars.com... One possible change: implicit casting with an assertion that the nullable value is not null. I can tell right now I wouldn't like that. That would make it far too eas

Re: OT -- Re: random cover of a range

2009-02-18 Thread bearophile
John Reimer: > Yes, the mode was completely indelicate however disturbed I was at the time. > I am not at all satisfied with how I carried that one out. Relax, I have a thick pelt. Learn from your errors, and be better next times. Bye, bearophile

Re: memory-mapped files

2009-02-18 Thread Kagamin
May be mm scheme results in more calls to HDD?

Re: OT -- Re: random cover of a range

2009-02-18 Thread Alexander Pánek
Jarrett Billingsley wrote: On Tue, Feb 17, 2009 at 4:59 PM, Alexander Pánek wrote: Jarrett Billingsley Wrote: On Tue, Feb 17, 2009 at 12:04 PM, Daniel de Kok wrote: Shouldn't we talk about D or (Belgian) beer here? :^) There are no parens about it. It's either Belgian or it's not beer.