Reading a file line by line at compile time

2019-08-09 Thread jyapayne
Is there a way to read a file line by line at compile time? My use case is that I want to process an input file and produce Nim code via macros, but have no trace of the input file in the resulting binary. Basically, I just want to iterate over the lines and throw them away after the VM has

Re: How to add a symbol to represent the infinity (∞)

2019-08-09 Thread LeuGim
@cblake \- thank you for commenting! I didn't like that exactness for `inf(0)` too, but wanted to respond with that before this thread gets into oblivion. I put there a new version, which is [YetMoreFun](https://github.com/Leu-Gim/Nim-modules/blob/master/yetmorefun.nim) and more in line with

Server-sent events in Jester

2019-08-09 Thread konradmb
I'm trying to do [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) in Jester. What I have now is this: router index: get "/time": let data = "retry: 3000\n" & "data: {time: \'" &

[RFC] Project Picasso - A multithreading runtime for Nim

2019-08-09 Thread mratsim
> _" Good artists borrow, great artists steal." \-- Pablo Picasso_ I have put together a document that lay out the various blocks needed for an efficient multithreading runtime. You can have a (long) read here:

Re: What text editor are you using for Nim?

2019-08-09 Thread Neil_H
Probably because there is not a windows version :-)

Re: How to add a symbol to represent the infinity (∞)

2019-08-09 Thread cblake
@LeuGim \- nicely done & interesting approach! I'm not sure I would have embued `inf(0)|Infinite(0)` with as precise semantics in your `for 3 .. inf(0): ...` construction. Infinity is more a process than a number. For `∞ - ∞ ~ inf(0)` to act like zero the two limiting processes have to

Re: Using a generic type in 'raises' pragma's argument

2019-08-09 Thread thenjip
Thanks for the reply. > For now just drop the {.raises.} annotation, the compiler can compute this on > its own. Yes, it works indeed, thanks a lot. I originally intended to make a lazy version of raiseException like this: import std/sugar proc raiseException* [E: