Re: Seqlang - Compiled Python Language

2020-01-21 Thread ducktape
After digging into it more, it very much seems like a DSL and the benchmarks are sketchy at best. But some of the ideas are super cool, possibly just because I live in high level land and hadn't heard of things like prefetch.

Re: Seqlang - Compiled Python Language

2020-01-21 Thread ducktape
The paper is a good read: [https://dl.acm.org/doi/10.1145/3360551](https://dl.acm.org/doi/10.1145/3360551)

How do I raise an error?

2020-01-21 Thread blippy
I'm trying to throw an error. I tried raise newOSError(13, "Unknown opcode:" ) Run but I'm getting Error: type mismatch: got but expected one of: proc newOSError(errorCode: OSErrorCode; additionalInfo = ""): owned(ref OSError) first type

Seqlang - Compiled Python Language

2020-01-21 Thread ducktape
Curious what the thoughts are on this: [https://github.com/seq-lang/seq](https://github.com/seq-lang/seq) [https://seq-lang.org/index.html](https://seq-lang.org/index.html)# I'm not sure what it provides over nim other than 1. maybe compiling pure python programs, and 2. builtin python

Re: How do I raise an error?

2020-01-21 Thread blippy
Ah, OK, I figured it out: raise newException(OSError, "Unkown opcode") Run

Re: Seqlang - Compiled Python Language

2020-01-21 Thread zetashift
It looks nice, seems a bit early to give a full review about it. Nim does have better C interop, but I seqlang might be handy as a DSL-ish thing? Especially since Nim can be a "big" language for starting bioinformatics.

Re: Is this a minor --gc:arg issue?

2020-01-21 Thread Araq
Either way the checking is incomplete, with --gc:arc you can compile `new(x, final)` and then afterwards `new(x)` won't be detected as an error.

How to split stderr/stdout of a subprocess?

2020-01-21 Thread akavel
Can I spawn a subprocess in such a way, that its stderr is redirected to parent proc's stderr, whereas stdout can be read normally? Alternatively: after I run startProcess, can I somehow detect which of outputStream vs. errorStream has some pending data I can read? Or, are there non-blocking

Re: How to upload large files efficiently and quickly with Jester?

2020-01-21 Thread mashingan
> it seems there is a offset error in the code (files are not identically but > shifted by some bytes at certain offsets) This is quite tricky to find out, TBH. I tried running it on windows and debian (in virtual box) and using chromium and firefox (both on windows) and it gave the correct

Re: How to split stderr/stdout of a subprocess?

2020-01-21 Thread mashingan
perhaps like this #include int main() { fprintf(stdout, "This is from hello to stdout\n"); fprintf(stderr, "This is from hello to stderr\n"); return 0; } Run and our nim file import os, osproc, selectors when

Will --gc:arc address finalizers for closure iterator variables?

2020-01-21 Thread spip
When a closure iterator does not complete, for instance because the client code decided to break the loop, the iterator variables and resources are still living in the closure context in case the iterator is resumed later. When the iterator is no more in scope and GC kicks on, memory allocated

Re: How to split stderr/stdout of a subprocess?

2020-01-21 Thread akavel
Thanks! I didn't check the Linux version yet, but the Windows one doesn't seem to really do what I need: specifically, if I print from a Nim file like this: # q_outerr.nim import os stdout.writeLine "some stdout" stderr.writeLine "some stderr" stderr.writeLine

Re: Discord server improvements

2020-01-21 Thread exelotl
Hey, can we make this happen? I use Discord a lot and would love to see the Nim server expanded. I feel like the community is big enough now for it work.

Re: Will --gc:arc address finalizers for closure iterator variables?

2020-01-21 Thread Araq
Good question. If these resources are freed in a destructor they should be freed when the iterator's closure is freed.