Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Nick Sabalausky
A little write-up I just did on something I thought was pretty cool: Combine Coroutines and Input Ranges for Dead-Simple D Iteration https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Rory McGuire
Fibers are basically just execution stacks like greenlets from python so I would imagine you can clone/copy them. Nice write up, I think it will help people get more fibre in their D diet. :) On Tue, May 1, 2012 at 10:27 AM, Nick Sabalausky < seewebsitetocontac...@semitwist.com> wrote: > A littl

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Jacob Carlborg
On 2012-05-01 10:27, Nick Sabalausky wrote: A little write-up I just did on something I thought was pretty cool: Combine Coroutines and Input Ranges for Dead-Simple D Iteration https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration Coo

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Robert Clipsham
On 01/05/2012 09:27, Nick Sabalausky wrote: A little write-up I just did on something I thought was pretty cool: Combine Coroutines and Input Ranges for Dead-Simple D Iteration https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration Thi

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Adam D. Ruppe
You might find this interesting too... string yield(string what) { return `if(auto result = dg(`~what~`)) return result;`; } int opApply(int delegate(ref uint) dg) { for (int i = 0; i < array.length; i++) mixin(yield("array[i]")); return 0; } The litt

Visual D 0.3.32 maintenance release

2012-05-01 Thread Rainer Schuetze
Hi, A new version of Visual D has just been released. It does not include major new features, but it addresses a number of issues and improvements. A reduced list of changes: 2012-05-01 Version 0.3.32 * new version of cv2pdb with better handling of unicode characters in path names and bet

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread jerro
On Tuesday, 1 May 2012 at 08:26:45 UTC, Nick Sabalausky wrote: A little write-up I just did on something I thought was pretty cool: Combine Coroutines and Input Ranges for Dead-Simple D Iteration https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Nick Sabalausky
"jerro" wrote in message news:sxfngaqnhwxqookrv...@forum.dlang.org... > On Tuesday, 1 May 2012 at 08:26:45 UTC, Nick Sabalausky wrote: >> A little write-up I just did on something I thought was pretty cool: >> >> Combine Coroutines and Input Ranges for Dead-Simple D Iteration >> https://www.semit

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Sean Kelly
On May 1, 2012, at 1:50 PM, Nick Sabalausky wrote: > "jerro" wrote in message > news:sxfngaqnhwxqookrv...@forum.dlang.org... >> On Tuesday, 1 May 2012 at 08:26:45 UTC, Nick Sabalausky wrote: >>> A little write-up I just did on something I thought was pretty cool: >>> >>> Combine Coroutines and

Re: Introducing vibe.d!

2012-05-01 Thread Sönke Ludwig
Am 29.04.2012 08:13, schrieb bls: Great job. Thanks Soenke et al; - Built-in support for MongoDB and Redis databases MySQL. Like other folks here I need a SQL db, At least for MyQL 5.1 there is a socket based solution from Steve Teale. https://github.com/britseye/mysqln Means no licence troub

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread jerro
On Tuesday, 1 May 2012 at 20:49:48 UTC, Nick Sabalausky wrote: "jerro" wrote in message news:sxfngaqnhwxqookrv...@forum.dlang.org... On Tuesday, 1 May 2012 at 08:26:45 UTC, Nick Sabalausky wrote: A little write-up I just did on something I thought was pretty cool: Combine Coroutines and Inpu

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread jerro
Compared to normal iteration schemes, yes. It may be comparable to opApply in terms of performance though. If you're curious, look at the Fiber context switching code (starting at switchIn and switchOut). It's much slower than opApply. This loop takes 70s on my machine: foreach(el; visitor

Re: Introducing vibe.d!

2012-05-01 Thread Matt Peterson
On Tuesday, 1 May 2012 at 21:46:42 UTC, Sönke Ludwig wrote: I made a post with Steve Teale's MySQL driver as an example: http://vibed.org/blog/posts/writing-native-db-drivers There were some hidden gotchas, but I hope the current port doesn't break anything from the original code. The table i

Re: Combine Coroutines and Input Ranges for Dead-Simple D Iteration

2012-05-01 Thread Nick Sabalausky
"jerro" wrote in message news:qpipqzzdbpkoxtzvh...@forum.dlang.org... >> Compared to normal iteration schemes, yes. It may be comparable to >> opApply in terms of performance though. If you're curious, look at the >> Fiber context switching code (starting at switchIn and switchOut). > > It's

Re: Introducing vibe.d!

2012-05-01 Thread Brad Anderson
On Tue, May 1, 2012 at 5:04 PM, Matt Peterson wrote: > On Tuesday, 1 May 2012 at 21:46:42 UTC, Sönke Ludwig wrote: > >> I made a post with Steve Teale's MySQL driver as an example: >> http://vibed.org/blog/posts/**writing-native-db-drivers >>

Re: Visual D 0.3.32 maintenance release

2012-05-01 Thread Jakob Ovrum
On Tuesday, 1 May 2012 at 16:46:36 UTC, Rainer Schuetze wrote: * goto definition: if executed on an import statement, now searching file through import paths Thanks, I remember trying this before, good to know it now does the intuitive thing :)