Re: Help in compiling nim on android termux

2017-03-31 Thread Araq
You need to patch `osproc.nim`, probably line const useProcessAuxSpawn = declared(posix_spawn) and not defined(useFork) and not defined(useClone) and not defined(linux) I'm not sure how wise it is to map Andriod to Linux, preferably that should

Re: Cello: a library of string algoritms using succinct data structures

2017-03-31 Thread mashingan
I thought of [this](http://libcello.org/) after glance the thread title

Re: Help in compiling nim on android termux

2017-03-31 Thread stisa
@NastyRigger : This is just a guess, and I can't test it, but you could try changing `sigtimedwait` into `__rt_sigtimedwait` . Looks like `sigtimedwait` is present in `signal.h` starting from android api 23. @Araq : I could try making a PR, I'm guessing the part in `nim.cfg` should go in a `@if

Re: Cello: a library of string algoritms using succinct data structures

2017-03-31 Thread Krux02
I just looked over the introduction you just posted. I am not really into string algorithms, I rather avoid all string operations in my applications except string format for output. Therefore I can already see that this library is not for me, but still it would be nice to read one or two sentenc

Cello: a library of string algoritms using succinct data structures

2017-03-31 Thread andrea
I am releasing [Cello](https://unicredit.github.io/cello/), a library of string algoritms using succinct data structures. It should appear shortly on Nimble. For now it implements walevet trees, FM indices, the Burrow-Wheeler transform, suffix arrays and a little more. Check out the README for

Re: Procedure which returns procedure

2017-03-31 Thread dmitrys99
Thank you, @flyx, it works exactly as I need!

Re: Help in compiling nim on android termux

2017-03-31 Thread NastyRigger
@Araq Look at the screenshot, the original issue is still there. Could you suggest a workaround?

Re: Procedure which returns procedure

2017-03-31 Thread flyx
Try: proc pprint[T1](ann: string): (proc(t0: T1): T1) = return proc(val: T1): T1 = return val echo pprint[int]("test")(42)

Re: Help in compiling nim on android termux

2017-03-31 Thread Araq
In config/nim.cfg add passL=" -landroid-glob " and define:termux In lib/posix/posix.nim : line 283: when defined(macosx) or defined(termux): and on line 1623: when not defined(macosx) and not defined(termux) ( you just need to add the termux part ) In lib/pure/osproc.nim "bin/sh" ->

Re: Procedure which returns procedure

2017-03-31 Thread dmitrys99
proc pprint(ann: string): (proc[T1](t0: T1): T1) = return proc(val: T1) = return val pprint("test") returner.nim(1, 32) Error: ')' expected # proc pprint(ann: string): (proc(t0: T1): T1) = return proc(val) = retu

Re: Introducing Nimoy: A minimal experimental actor library

2017-03-31 Thread carterza
Very interested to see where this goes. Basically what andrea and dom said, once it's matured a bit.

Re: Help in compiling nim on android termux

2017-03-31 Thread NastyRigger
Ok, so here's the automated version of the 32-bit termux Nim bootstrap part (also fixing the **64-bit kernel/32-bit userspace** scenario) that reproduces the OP's error during the final link: apt install clang apt install git apt install libandroid-glob && apt install liband

Re: Procedure which returns procedure

2017-03-31 Thread Araq
proc pprint(annotation: string): (proc(t0: T1): T1) = # ... some usage of annotation parameter .. Parenthesis help.

Re: Introducing Nimoy: A minimal experimental actor library

2017-03-31 Thread andrea
That's great, I hope this becomes a viable alternative to handle multithreaded applications in Nim!

Re: Introducing Nimoy: A minimal experimental actor library

2017-03-31 Thread evacchi
I think it's too early right now, it really is a handful of lines of code; but I probably will if there is enough interest. RIght now, actors run on a thread pool (not Nim's _threadpool_) that can be configured. The execution strategy and migration of an actor across threads is pretty dumb, bu

Re: Alternative comment syntax

2017-03-31 Thread flyx
@hcorion This is Neo2 (it states that itself) and it is an image for printing and gluing on the keys. Therefore, there are multiple meta-key images to choose from.

Procedure which returns procedure

2017-03-31 Thread dmitrys99
Hello, guys! Nim can use anonymous procedures in procedures like map(), filter() and other. Is it possible to have procedural return and if yes, how this should be formatted syntactically? Something like this: proc pprint(annotation: string): proc(t0: T1): T1 = # ... some u

Re: Help in compiling nim on android termux

2017-03-31 Thread stisa
Just removed termux and reinstalled from scratch ( I can only test on my phone, android 7 ), here are my steps: apt install git apt install clang git clone https://github.com/nim-lang/Nim cd Nim && git clone https://github.com/nim-lang/csources apt install libandroid