Re: [RFC] Project Picasso - A multithreading runtime for Nim

2019-08-21 Thread GordonBGood
@Araq: **Regarding the `channels` and `threads` libraries use with `newruntime`...** > No, I mean they are currently "submodules" of system.nim but there is no > reason for that, it should be a separate, explicit import. As I said before, I can see the sense of making these separate modules

Re: Nim vs. Python & Groovy (string splitting): Why is string splitting so slow in Nim?

2019-08-21 Thread markebbert
Thanks @jyapayne. I think we (i.e., you) are really close. The first character of each line that exceeds the buffer was getting cut off (or maybe if the prior line exceeded buffer?). Looks like we're off by one at the same spot. I believe: buffer.add data[pos+1 ..< pos+bufSize]

Re: Nim vs. Python & Groovy (string splitting): Why is string splitting so slow in Nim?

2019-08-21 Thread jyapayne
@markebbert, yes you are right! That should be if data[last] == '\l': buffer.add data[pos+1 ..< pos+bufSize] else: buffer.add data[pos ..< pos+bufSize] pos += bufSize Run Which will account for the buffer increase. So the code now for the `lines`

Re: typedesc with subtype won't compile when returning objects

2019-08-21 Thread GordonBGood
@vitreo: As to your use in example three, the difference (and the reason for the bug, if bug it is) may be the more complex inheritance in returning an object. One can get the effect of specifying that "SomeObject[T]" must contain a type of "SomeNumber" by the following code, which might be

Is it possible to tune C output to be truly human readable?

2019-08-21 Thread dponyatov
As I understand, Nim produces C code just to be used as an interface with backend compiler. Is it theoretically possible to tune code generation to make the generated code be accepted at code review in teams allows only C/C++ as a programming language for development? I mean, that some

Re: Ebnf Lexer and Parser generator in nim

2019-08-21 Thread dponyatov
As I read, Nim has seamless with any C libraries and code, so for the lexer, you can use Ragel, it produces readable and compact code with -G2 option (I use it on low-end microcontrollers for command parsing). The more interesting question is Nim able to do backtracking to implement DCG

Message Passing Programming (async over actors model)

2019-08-21 Thread dponyatov
Good day What tools or maybe libraries is Nim has for async messaging in a feel of Smalltalk and actors model?

Re: how to run single test among all tests?

2019-08-21 Thread juancarlospaco
[https://nim-lang.github.io/Nim/unittest.html#JUnitOutputFormatter](https://nim-lang.github.io/Nim/unittest.html#JUnitOutputFormatter) Then use a tool to view the junit in all kinds of crazy ways, its like a standard-ish thing, you will find all kinds of tool to process and visualize these.

Re: how to run single test among all tests?

2019-08-21 Thread kaushalmodi
> Can I turn off all the hints? In your test directory, you can create a `config.nims` and put this in there for all the hints that you want to hide: hint("Processing", false) # Do not print the "Hint: .. [Processing]" messages when compiling Run

how to run single test among all tests?

2019-08-21 Thread jiyinyiyong
I use nimbile test for testing. It's like there are 2 problems I encounter, 1. I have many test and I want to read logs from only 1 of them. How can I focus to the specific one? 2. After I splitted tests into multiple files, I see lots of hints printed from compilation. Can I turn off all

typedesc with subtype won't compile when returning objects

2019-08-21 Thread vitreo12
Hello everyone, I was wondering if I just found a bug or if there is something wrong with the following code: #ex1 proc test1(T : typedesc[SomeNumber] = typedesc[float]) : T = echo "type is " & $T return T(0) #works echo test1(int) #ex2

FOSDEM 2020 Newer languages developer room

2019-08-21 Thread PMunch
Hi everyone. For the past couple of years Nim has had some presence at FOSDEM, and this year we want to things a bit further. The original idea was to apply for a Nim developer room, but fearing that it would be too niche to get accepted, I propose the idea of creating a joint effort "Newer

Re: Nim vs. Python & Groovy (string splitting): Why is string splitting so slow in Nim?

2019-08-21 Thread cblake
For what it's worth, and for completeness if Windows portability even matters in this case (as @markebbert mentioned, these science things are often one time deals), this works but is 6x slower (405 sec aka 6min 45sec) than the `popen`/`mSlices` variant: import strutils, osproc,

Re: I gonna drop two packages

2019-08-21 Thread miran
> Maybe someone wants take care? If nobody else replies by the end of the day or so, I can take them.

Re: Introducing Norm: a Nim ORM

2019-08-21 Thread moigagoo
Keeping you updated on Norm progress. * bool fields can be stored without custom parser or formatter. In SQLite, they are stored as 1 and 0, in PostgreSQL native BOOLEAN type is used. * times.DateTime fields are now also supported out of the box! In SQLite, they are stored as epoch