Re: concurrency Update request

2010-05-17 Thread Nick B
Sean Kelly wrote: Nick B Wrote: Andrei Alexandrescu wrote: Sean is the author of it, so he can provide the details. My understanding is that it is a complete or near-complete implementation of the artifacts described in the book. Andrei - thanks for this update. Sean - are you able to add

LLVM backend for GHC

2010-05-17 Thread bearophile
LLVM as back-end for a Haskell compiler: http://blog.llvm.org/2010/05/glasgow-haskell-compiler-and-llvm.html So LLVM developers are probably open for changes, for example for patches for LLVM that implement custom calling conventions used by D, etc. Bye, bearophile

Re: complement to $

2010-05-17 Thread Kagamin
bearophile Wrote: > Another example are range bounds, you can omit them, or exactly the same, > they can be None: > > a = ['a', 'b', 'c', 'd'] > >>> assert a[None : 2] == ['a', 'b'] > >>> assert a[ : 2] == ['a', 'b'] > >>> assert a[0 : 2] == ['a', 'b'] > >>> idx = None > >>> assert a[idx : 2] ==

Re: complement to $

2010-05-17 Thread bearophile
Kagamin: > half of a slice: a[None+len(a) : None] Python is strictly typed, so you can't sum None with an int. Bye, bearophile

Re: complement to $

2010-05-17 Thread Steven Schveighoffer
On Sat, 15 May 2010 01:07:50 -0400, Walter Bright wrote: Steven Schveighoffer wrote: On Fri, 14 May 2010 13:33:57 -0400, Walter Bright wrote: Steven Schveighoffer wrote: So how does this look: coll[^..$]; no Do you have specific objections, or does it just look horrendous

Re: complement to $

2010-05-17 Thread Steven Schveighoffer
On Sun, 16 May 2010 02:24:55 -0400, Don wrote: Steven Schveighoffer wrote: Currently, D supports the special symbol $ to mean the end of a container/range. However, there is no analogous symbol to mean "beginning of a container/range". For arrays, there is none necessary, 0 is always the

Re: Does D suck?

2010-05-17 Thread dsimcha
== Quote from GirlProgrammer (angelinast...@hairdressers.com)'s article > If D doesn't suck, and is better than C++ why am I not using it? Indeed, > why isn't hardly anyone using it? Same reasons why people use any old, crufty legacy technology: Inertia and a lack of maturity in the successor te

Re: News Reader for iPod?

2010-05-17 Thread Jason House
Walter Bright Wrote: > I tried the web interface with an iPod, it's unusable. Anyone know of an iPod > app that functions well as a decent newsgroup reader? I use http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=digitalmars.D on my iPhone.

need clarification: will typedef, C struct initialization, etc. go or not?

2010-05-17 Thread Trass3r
There have been lots of discussions about removing language parts. I don't want this thread to become yet another one. I just want to know if (and when) these features will be removed or not. Especially typedef, which I found quite useful lately. C-style struct initialization and complex types hav

Re: News Reader for iPod?

2010-05-17 Thread Michel Fortin
On 2010-05-17 00:50:09 -0400, Walter Bright said: I tried the web interface with an iPod, it's unusable. Anyone know of an iPod app that functions well as a decent newsgroup reader? NewsTap looks good. I just played with it 5 minutes though, and with the lite version which is limited to one

Re: complement to $

2010-05-17 Thread Kagamin
bearophile Wrote: > Kagamin: > > half of a slice: a[None+len(a) : None] I meant, Python is not a silver bullet and its abstraction of first and last indexes leaks (you like it, don't you?)

Re: need clarification: will typedef, C struct initialization, etc. go or not?

2010-05-17 Thread Kagamin
And this should go into docs.

Re: complement to $

2010-05-17 Thread Kagamin
KennyTM~ Wrote: > > If it's ordered, then why doesn't [0..15] make sense to get the first 15 > > elements? > > auto a = new OrderedDict!(int, string); > a[-3] = "negative three"; > a[-1] = "negative one"; > a[0] = "zero"; > a[3] = "three"; > a[4] = "four"; > assert(a[0] == "zero"); > return a[0..

Re: complement to $

2010-05-17 Thread Ellery Newcomer
On 05/14/2010 08:20 AM, Steven Schveighoffer wrote: Currently, D supports the special symbol $ to mean the end of a container/range. However, there is no analogous symbol to mean "beginning of a container/range". For arrays, there is none necessary, 0 is always the first element. But not all con

Re: complement to $

2010-05-17 Thread Steven Schveighoffer
On Mon, 17 May 2010 11:02:05 -0400, Ellery Newcomer wrote: On 05/14/2010 08:20 AM, Steven Schveighoffer wrote: Currently, D supports the special symbol $ to mean the end of a container/range. However, there is no analogous symbol to mean "beginning of a container/range". For arrays, there i

Re: std.gregorian contribution

2010-05-17 Thread Tomek Sowiński
negerns wrote: > Also, I have introduced a unjoin() function as a helper function. It > splits a string into an array of lines using the specified array of > characters as delimiters. I am not sure if there is already an existing > function that does the same but I could not find it. For lack of

Re: Misc questions:- licensing, VC++ IDE compatible, GPGPU, LTCG,

2010-05-17 Thread bearophile
> if you look at the asm written in video decoders you can see that it's many > times faster than the asm produced from C by the best compilers. Right today I have found an interesting blog post that shows an example of what advanced compilers aren't able to do yet: http://virtualdub.org/blog/piv

Re: std.gregorian contribution

2010-05-17 Thread negerns
On 5/18/2010 1:03 AM, Tomek Sowiński wrote: negerns wrote: Also, I have introduced a unjoin() function as a helper function. It splits a string into an array of lines using the specified array of characters as delimiters. I am not sure if there is already an existing function that does the sa

Re: std.gregorian contribution

2010-05-17 Thread Andrei Alexandrescu
On 05/17/2010 12:32 PM, negerns wrote: On 5/18/2010 1:03 AM, Tomek Sowiński wrote: negerns wrote: Also, I have introduced a unjoin() function as a helper function. It splits a string into an array of lines using the specified array of characters as delimiters. I am not sure if there is already

Re: News Reader for iPod?

2010-05-17 Thread Walter Bright
Michel Fortin wrote: On 2010-05-17 00:50:09 -0400, Walter Bright said: I tried the web interface with an iPod, it's unusable. Anyone know of an iPod app that functions well as a decent newsgroup reader? NewsTap looks good. I just played with it 5 minutes though, and with the lite version w

Re: News Reader for iPod?

2010-05-17 Thread Walter Bright
Jason House wrote: Walter Bright Wrote: I tried the web interface with an iPod, it's unusable. Anyone know of an iPod app that functions well as a decent newsgroup reader? I use http://www.digitalmars.com/webnews/newsgroups.php?search_txt=&group=digitalmars.D on my iPhone. Ack, I found th

Re: std.gregorian contribution

2010-05-17 Thread Simen kjaeraas
Andrei Alexandrescu wrote: I have two unrelated suggestions about unjoin. First, you may want to follow the model set by splitter() instead of split() when defining unjoin(). This is because split() allocates memory whereas splitter splits lazily so it doesn't need to. If you do want spl

Re: Misc questions:- licensing, VC++ IDE compatible, GPGPU, LTCG,

2010-05-17 Thread Bernard Helyer
On 18/05/10 05:06, bearophile wrote: if you look at the asm written in video decoders you can see that it's many times faster than the asm produced from C by the best compilers. Right today I have found an interesting blog post that shows an example of what advanced compilers aren't able to do

Re: envy for "Writing Go Packages"

2010-05-17 Thread Nick Sabalausky
"Sean Kelly" wrote in message news:1012172047295742031.093272sean-invisibleduck@news.digitalmars.com... > BCS wrote: >> Hello BCS, >> >> > Hello Walter, >> > >> BCS wrote: >> >> >>> My program imports lib A and B. Lib A imports lib C and asks >> > > > > > for >> >>> version "X". Lib B import

Re: complement to $

2010-05-17 Thread Ellery Newcomer
On 05/17/2010 10:15 AM, Steven Schveighoffer wrote: On Mon, 17 May 2010 11:02:05 -0400, Ellery Newcomer wrote: Does your collections library allow for code like coll[coll.begin + 1 .. coll.end] No. begin and end return cursors, which are essentially non-movable pointers. The only collectio

Alternative typeof syntax

2010-05-17 Thread bearophile
What do you think about the the syntax x.typeof instead of typeof(x) ? There are situations where you will need to parenthesize anyway, for example: import std.stdio; void main() { int x = 1; float y = 1.5; writeln(typeid(typeof(x + y))); } You have to write: (x + y).typeof But i

Re: std.gregorian contribution

2010-05-17 Thread Pelle
On 05/17/2010 08:00 PM, Simen kjaeraas wrote: D could use a set type, and this is a very nice way to specify these different parameters. votes = -~votes; I agree, and I find a set type to be generally very useful. :)

Re: std.gregorian contribution

2010-05-17 Thread Philippe Sigaud
On Mon, May 17, 2010 at 19:44, Andrei Alexandrescu < seewebsiteforem...@erdani.org> wrote: > > First, you may want to follow the model set by splitter() instead of > split() when defining unjoin(). This is because split() allocates memory > whereas splitter splits lazily so it doesn't need to. If

Re: std.gregorian contribution

2010-05-17 Thread Steven Schveighoffer
On Mon, 17 May 2010 14:00:41 -0400, Simen kjaeraas wrote: Andrei Alexandrescu wrote: I have two unrelated suggestions about unjoin. First, you may want to follow the model set by splitter() instead of split() when defining unjoin(). This is because split() allocates memory whereas spl

Re: std.gregorian contribution

2010-05-17 Thread Andrei Alexandrescu
On 05/17/2010 03:16 PM, Steven Schveighoffer wrote: Comparing splitByOneOf(str, "; ")) to splitter(str, set(';', ' ')), I see one major difference here -- "; " is a literal, set(';', ' ') is not. I would expect that 'set' as a generic set type would implement it's guts as some sort of tree/hash,

Re: std.gregorian contribution

2010-05-17 Thread Steven Schveighoffer
On Mon, 17 May 2010 17:01:22 -0400, Andrei Alexandrescu wrote: On 05/17/2010 03:16 PM, Steven Schveighoffer wrote: Comparing splitByOneOf(str, "; ")) to splitter(str, set(';', ' ')), I see one major difference here -- "; " is a literal, set(';', ' ') is not. I would expect that 'set' as

Re: Misc questions:- licensing, VC++ IDE compatible, GPGPU, LTCG, QT, SDL

2010-05-17 Thread Jérôme M. Berger
Leandro Lucarella wrote: > "Jérôme M. Berger", el 16 de mayo a las 22:50 me escribiste: >> Robert Clipsham wrote: >>> LDC and GDC have no such >>> restrictions, you can include them as long as you don't modify the >>> source, and if you do then you distribute the source as well as the >>> binaries.

Re: Does D suck?

2010-05-17 Thread GirlProgrammer
BCS wrote: > Hello GirlProgrammer, > >> If D doesn't suck, and is better than C++ why am I not using it? >> Indeed, why isn't hardly anyone using it? >> > > Because qunatity of D libraries sucks and because the D tool chains > suck and because the D infrastructure sucks and because all the rest > o

Re: Does D suck?

2010-05-17 Thread GirlProgrammer
dsimcha wrote: > == Quote from GirlProgrammer (angelinast...@hairdressers.com)'s > article >> If D doesn't suck, and is better than C++ why am I not using it? >> Indeed, why isn't hardly anyone using it? > > Same reasons why people use any old, crufty legacy technology: > Inertia and a lack of matu

Re: Does D suck?

2010-05-17 Thread Mike Farnsworth
GirlProgrammer Wrote: > BCS wrote: > > Hello GirlProgrammer, > > > >> If D doesn't suck, and is better than C++ why am I not using it? > >> Indeed, why isn't hardly anyone using it? > >> > > > > Because qunatity of D libraries sucks and because the D tool chains > > suck and because the D infrastr

Re: News Reader for iPod?

2010-05-17 Thread Jason House
Walter Bright Wrote: > Jason House wrote: > > Walter Bright Wrote: > > > >> I tried the web interface with an iPod, it's unusable. Anyone know of an > >> iPod > >> app that functions well as a decent newsgroup reader? > > > > I use > > http://www.digitalmars.com/webnews/newsgroups.php?search_

Re: Does D suck?

2010-05-17 Thread GirlProgrammer
Mike Farnsworth wrote: > GirlProgrammer Wrote: > >> BCS wrote: >>> Hello GirlProgrammer, >>> If D doesn't suck, and is better than C++ why am I not using it? Indeed, why isn't hardly anyone using it? >>> >>> Because qunatity of D libraries sucks and because the D tool chains >>> suck

Re: Does D suck?

2010-05-17 Thread BCS
Hello GirlProgrammer, "And Moses led the people into the desolation of the wilderness, where they dwindled for 40 years". "And Moses was told to go wait in the desolation of the wilderness until the current generation dies of old age and is replaced by the next." Seems a more apt way to say

Re: Does D suck?

2010-05-17 Thread BCS
Hello GirlProgrammer, For TWENTY YEARS??? Early adopters?? Something is awry. 9 years: http://www.digitalmars.com/d/1.0/changelog1.html#new001 And 1.0 was only about 3 years ago: http://www.digitalmars.com/d/1.0/changelog.html#new1_001 -- ... <

Re: Alternative typeof syntax

2010-05-17 Thread Nick Sabalausky
"bearophile" wrote in message news:hss6b6$ae...@digitalmars.com... > What do you think about the the syntax x.typeof instead of typeof(x) ? > There are situations where you will need to parenthesize anyway, for > example: > > import std.stdio; > void main() { >int x = 1; >float y = 1

Please, don't feed the troll (was "Does D Suck?")

2010-05-17 Thread Bernard Helyer
On 17/05/10 17:17, GirlProgrammer wrote: If D doesn't suck, and is better than C++ why am I not using it? Indeed, why isn't hardly anyone using it? I imagine you get some dull pleasure from posting essentially the same message to the NG every few months or so (this is almost certainly the per

Re: Does D suck?

2010-05-17 Thread GirlProgrammer
BCS wrote: > Hello GirlProgrammer, > >> For TWENTY YEARS??? Early adopters?? Something is awry. > > 9 years: > http://www.digitalmars.com/d/1.0/changelog1.html#new001 > > And 1.0 was only about 3 years ago: > http://www.digitalmars.com/d/1.0/changelog.html#new1_001 I remember D discussion back in

Re: News Reader for iPod?

2010-05-17 Thread Sean Kelly
Walter Bright wrote: > I tried the web interface with an iPod, it's unusable. Anyone know of > an iPod app that functions well as a decent newsgroup reader? > NewsTap. I'm using it right now :-)

Re: Please, don't feed the troll (was "Does D Suck?")

2010-05-17 Thread superdan
== Quote from Bernard Helyer (b.hel...@gmail.com)'s article > On 17/05/10 17:17, GirlProgrammer wrote: > > If D doesn't suck, and is better than C++ why am I not using it? Indeed, > > why isn't hardly anyone using it? > I imagine you get some dull pleasure from posting essentially the same > messag

Samples directory

2010-05-17 Thread Brad Roberts
Would anyone be interested in taking on the task of looking at the existing samples and modernizing them? Some should likely be junked as not terribly educational examples. Likely more should be added to illustrate other best practices. They can be found here: http://www.dsource.org/projects/