Re: Short article on std.parallism

2011-06-08 Thread Robert Jacques
On Tue, 31 May 2011 02:21:13 -0400, Andrej Mitrovic wrote: Why doesn't Appender overload opCatAssign? It would be almost trivial to replace usage of existing arrays with Appender, instead of having to replace all calls with var.put(). I've submitted a patch for an improved appender implementa

Re: Short article on std.parallism

2011-05-31 Thread Steven Schveighoffer
On Tue, 31 May 2011 02:21:13 -0400, Andrej Mitrovic wrote: Why doesn't Appender overload opCatAssign? It would be almost trivial to replace usage of existing arrays with Appender, instead of having to replace all calls with var.put(). It should, there might already be an enhancement filed f

Re: Short article on std.parallism

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 23:21, Andrej Mitrovic wrote: > Why doesn't Appender overload opCatAssign? It would be almost trivial > to replace usage of existing arrays with Appender, instead of having > to replace all calls with var.put(). > > And why doesn't it overload toString? You can't print its contents t

Re: Short article on std.parallism

2011-05-30 Thread Andrej Mitrovic
Why doesn't Appender overload opCatAssign? It would be almost trivial to replace usage of existing arrays with Appender, instead of having to replace all calls with var.put(). And why doesn't it overload toString? You can't print its contents to stdout like you can with slices. And why can't you

Re: Short article on std.parallism

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 22:52, Andrej Mitrovic wrote: > On 5/30/11, Vladimir Panteleev wrote: > > On Mon, 30 May 2011 04:18:14 +0300, Jeremy Wright > > > > > > wrote: > >> I implemented bucket sort in D to demonstrate how easy it is to use > >> std.parallelism. I welcome any feedback. > > > > One thing:

Re: Short article on std.parallism

2011-05-30 Thread Andrej Mitrovic
On 5/30/11, Vladimir Panteleev wrote: > On Mon, 30 May 2011 04:18:14 +0300, Jeremy Wright > wrote: > >> I implemented bucket sort in D to demonstrate how easy it is to use >> std.parallelism. I welcome any feedback. > > One thing: I would suggest to avoid using ~= in a tight loop, as it is > rat

Re: Short article on std.parallism

2011-05-30 Thread Vladimir Panteleev
On Mon, 30 May 2011 04:18:14 +0300, Jeremy Wright wrote: I implemented bucket sort in D to demonstrate how easy it is to use std.parallelism. I welcome any feedback. One thing: I would suggest to avoid using ~= in a tight loop, as it is rather slow. Using std.array.appender for the firs

Re: Short article on std.parallism

2011-05-30 Thread Jeremy Wright
Wow! Thank you for your feedback. I'll work through your comments. I appreciate you all taking the time to read my article. Jeremy Wright "Jeremy Wright" wrote in message news:irurgr$1g65$1...@digitalmars.com... I implemented bucket sort in D to demonstrate how easy it is to use std.paralleli

Re: Short article on std.parallism

2011-05-30 Thread Jeremy Wright
Wow! Thank you for your feedback. I'll work through your comments. I appreciate you all taking the time to read my article. Jeremy Wright "Jeremy Wright" wrote in message news:irurgr$1g65$1...@digitalmars.com... I implemented bucket sort in D to demonstrate how easy it is to use std.paralleli

Re: Short article on std.parallism

2011-05-30 Thread Graham Fawcett
On Sun, 29 May 2011 18:18:14 -0700, Jeremy Wright wrote: > I implemented bucket sort in D to demonstrate how easy it is to use > std.parallelism. I welcome any feedback. > > http://www.codestrokes.com/archives/116 Haven't read it yet, but: "like many faucets" --> "like many facets" Best, Gr

Re: Short article on std.parallism

2011-05-30 Thread Johann MacDonagh
On 5/29/2011 9:18 PM, Jeremy Wright wrote: I implemented bucket sort in D to demonstrate how easy it is to use std.parallelism. I welcome any feedback. http://www.codestrokes.com/archives/116 Jeremy Wright Nice. Just a few nit-picks: 1. End of first paragraph: "makes writing parallel code, c

Re: Short article on std.parallism

2011-05-30 Thread Lars T. Kyllingstad
On Sun, 29 May 2011 18:18:14 -0700, Jeremy Wright wrote: > I implemented bucket sort in D to demonstrate how easy it is to use > std.parallelism. I welcome any feedback. > > http://www.codestrokes.com/archives/116 Nice article. :) A tip to make the code even more terse: You can replace taskPo

Re: Short article on std.parallism

2011-05-29 Thread Andrej Mitrovic
Very cool article. :) Btw, you can omit 'auto' when you use 'immutable' declarations.

Short article on std.parallism

2011-05-29 Thread Jeremy Wright
I implemented bucket sort in D to demonstrate how easy it is to use std.parallelism. I welcome any feedback. http://www.codestrokes.com/archives/116 Jeremy Wright