Can't get column names with instantRows when using db_posgres

2017-02-10 Thread durandu
Hello, I'm trying to get the column names from a table using the following code: import db_postgres ... for row in db.instantRows(sql"SELECT first_name, last_name, id, age FROM test_table"): echo "Row has ", len(row), " columns" # Row has 4 columns

Re: Remarks on standard library file functions (system, sysio)

2017-02-10 Thread BossHogg
> Nor should it, EOF is only raised if the proc interface was so poor it > couldn't signal it in any other way. That's not very regular, but as long as the documentation clearly states it, I guess it's OK. > > NB: I don't know what target Nim aims at (C89? C99? POSIX? the same ones > > with ex

Re: Chocolatey Package for Nim?

2017-02-10 Thread Kryptonius
I second the request to get NIM package de-orphaned for Arch...

Re: New library for random variables

2017-02-10 Thread smitty
A single call, as in: g = gaussian(mu = 7, sigma = 1).filter((x: float) => x > 4).filter((x: float) => x < 10)

Re: New library for random variables

2017-02-10 Thread smitty
Interesting library! I just want to confirm that I'm using it correctly. Say I want to sample a normally distributed integer between 4 and 10, is the following feasible: import alea, future import random/urandom, random/mersenne var rng = wrap(initMersenneTwister(urando

Re: New library for random variables

2017-02-10 Thread andrea
It should work like this, yes. By the way, you can directly set `mu = 7` and skip the map, as well as do both filters in a single call

Re: Trouble with reading from stdin

2017-02-10 Thread def_pri_pub
Is it something related to stdin's default buffer size? Default is around 4096 character IIRC.

Re: Wannabe-Official Nim Images for Docker

2017-02-10 Thread dom96
Awesome! Thank you for maintaining this. Will need to look into using it for my travis tests

Re: Wannabe-Official Nim Images for Docker

2017-02-10 Thread moigagoo
I'd like to share some old news about the official Docker images for Nim: * Versions older than 0.13.0 have been removed because we could not ensure Nimble installation on them. * The default base is now Ubuntu. Debian and Alpine flavors are also available. * Dockerfiles are generated auto

Re: [RFC]: What's wrong with me or with httpclient :-)

2017-02-10 Thread andrea
Same for me on Ubuntu 16.04: 40 seconds vs 0!

Re: Trouble with reading from stdin

2017-02-10 Thread perturbation2
I think it's running into a problem when the line length is greater than BufSize - in your example above, the equation is a little > 4000 chars long, and [readAllBuffer](https://github.com/nim-lang/Nim/blob/master/lib/system/sysio.nim#L171) is ultimately what's called. I don't see obvious bugs

Re: [RFC]: What's wrong with me or with httpclient :-)

2017-02-10 Thread vega
Interesting. I got the results above on Ububtu 16.04. Rechecked on Windows 8. The problem is that SyncClient test is so slow only on linux! And it's faster then DeprecatedAPI on windows. Debugging shows that it hangs for some time here: [https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpc

Re: [RFC]: What's wrong with me or with httpclient :-)

2017-02-10 Thread jlp765
on win7 64 and `Nim Compiler Version 0.16.1 (2017-02-09) [Windows: amd64]` `TEST[SyncClient]: Processed 1000 requests in 1 seconds!` or 0 seconds

Re: Can we use that tactic for nim ? Python 3.6 + japronto becomes the fastest webframework in the world

2017-02-10 Thread v3ss0n
Wow HTTP Pipe-lining have serious tons of bugs.. HTTP2 is not trending yet right?

Re: Can we use that tactic for nim ? Python 3.6 + japronto becomes the fastest webframework in the world

2017-02-10 Thread v3ss0n
Wow HTTP Pipe-lining have serious tons of bugs.. HTTP2 is not trending yet right?

Re: Can we use that tactic for nim ? Python 3.6 + japronto becomes the fastest webframework in the world

2017-02-10 Thread v3ss0n
> When the library is as you said "almost entirely written in C" one should be > able to just port the wrapper to Nim, and Nim will have the same performance. Yes , thats what i want to mean.

Re: Can we use that tactic for nim ? Python 3.6 + japronto becomes the fastest webframework in the world

2017-02-10 Thread v3ss0n
> Nobody uses such parameters for wrk except author of japronto... can you elaborate a bit?