Re: Help with parallelizing a loop

2017-11-03 Thread mikra
sync() simply waits till all your spawned threads are finished. If you call spawn n-times on the same proc it´s almost the same as parallel except that parallel does some additionally checks for you. Also you don't need to collect the FLowVars and check manually with ^ (on each FlowVar) (or use

compile time code execution problem

2017-11-03 Thread jzakiya
I want to execute the code below at compile time to initialize the global variables shown - modpg, rescnt, residues, ep. proc genPGparameters(prime: int): tuple = echo("generating parameters for P", prime) let primes = [2, 3, 5, 7, 11, 13, 17, 19, 23] var modpg = 1

Re: Nimrod for web and mobile

2017-11-03 Thread henric
Hey, look at the article Node.js vs Ruby on Rails - [https://www.cleveroad.com/blog/node-js-vs-ruby-on-rails--the-power-behind-technologies](https://www.cleveroad.com/blog/node-js-vs-ruby-on-rails--the-power-behind-technologies) Guess you will like it

Re: NimAWS - a noobs modest attempt at an AWS SDK

2017-11-03 Thread andrea
You have replied to an invisible post, I guess it needs to be approved by moderators

Re: Help with parallelizing a loop

2017-11-03 Thread jlp765
Good call. [The doco](https://nim-lang.org/docs/manual.html#parallel-spawn-parallel-statement) doesn't use the `sync()`

Re: NimAWS - a noobs modest attempt at an AWS SDK

2017-11-03 Thread yglukhov
Good job! I would suggest renaming "nimaws" to "aws" because "nim" is kinda redundant here =). Also move the /s3_*.nim files to samples or smth.

Re: Help with parallelizing a loop

2017-11-03 Thread Stefan_Salewski
Indeed Jack, I think sync() is nonsense when parallel statement is used.

Re: Help with parallelizing a loop

2017-11-03 Thread jackmott
what does the call to sync() do?

NimAWS - a noobs modest attempt at an AWS SDK

2017-11-03 Thread gooseus
Hello all, I'm new here and to the language, though I've been hanging around the Gitter for a couple weeks. In my attempt to learn and create something useful I made [https://github.com/Gooseus/nimaws](https://github.com/Gooseus/nimaws) It has a useable (not at all perfect) Signaturev4 request

Re: Help with parallelizing a loop

2017-11-03 Thread jlp765
from [this post](https://forum.nim-lang.org/t/3257/2) convert something like the following to suit your specific usage var LoopSz = faces.len res: array[LoopSz, int] parallel: for i in 0..LoopSz-1: spawn whateverNeedsDoingInParallel(...,