Exception not being caught?

2016-07-28 Thread everlast
For some reason this is not catching the exception and crashing with a "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" proc select_all(): Future[seq[Table[string, string]]] {.async.} = var dbC: DbColumns = @[] var data = newSeq[Table[string, string]]()

Re: get the most local symbol from `bindSym`

2016-07-28 Thread Araq
Yes and please create a PR that documents this behaviour. And add your snippet as a test case.

Re: get the most local symbol from `bindSym`

2016-07-28 Thread jxy
Ok. With the following code import macros var a = 0 block: var a = "block" block: var a = true block: var a = 0.0 macro m: stmt = let s = bindsym"a" for n in s: echo n.gettypeinst.lisprepr res

Re: get the most local symbol from `bindSym`

2016-07-28 Thread Araq
First (at index 0) position is the most local one. I think.

get the most local symbol from `bindSym`

2016-07-28 Thread jxy
bindSym always returns all the symbols, local and larger scopes, for a variable. If I have import macros var a = 0 block: var a = "block" macro m: stmt = let s = bindsym"a" echo s.lisprepr result = newstmtlist() m() I get

Build and run your Nim files with a Docker container

2016-07-28 Thread guitmz
Hello there :) I'd like to share my (work in progress) Docker container that allow us to build/run our Nim programs. It's very new and has a lot room for improvement so any feedback will be nice! You can check it at: [https://github.com/guitmz/nim-builder](https://github.com/guitmz/nim-builder

Re: What's the Best Way to Start a Server, Receive Data, Stop the Server, and Return the Data?

2016-07-28 Thread dom96
> Thanks for the suggestion, but I'd rather not do it this way, because the API > will suffer. When I call getAccessCode from an external module, I'm expecting > to get the access code in return, not a Future that should be awaited on. So, > one way or the other, I need a regular function return

Re: db_mysql return column name as well?

2016-07-28 Thread OderWat
Well, the fields of the table are not the same as the fields of the result of a query! AFAIK the "higher level" wrapper can't do what you want. I once played around with it and wrote something like this: import strutils, os # NOTE: Some versions of the nim library have the

Re: What's the Best Way to Start a Server, Receive Data, Stop the Server, and Return the Data?

2016-07-28 Thread ephja
> Could you please elaborate a bit on that? I don't mind doing something like > waitFor acceptRequest. Is there a ready-to-use proc for that, or do you mean > I should implement it by reading from socket? My example relies on a future, and [waitFor](https://github.com/nim-lang/Nim/blob/master/l

Re: Failed to install c2nim

2016-07-28 Thread takaomag
Successfully installed c2nim by nim **devel**. Thank you so much!

Re: Document breaking changes in advance

2016-07-28 Thread andrea
@federico I think that creating a sandbox and letting package mantainers decide which code to execute is the way to go. I don't get how `nimble install` is catching any errors. All the libraries I have written (memo, csvtools, rosencrantz, linalg, spills, teafiles, emmy, nimblas, nimcl, patty)

Re: Failed to install c2nim

2016-07-28 Thread Araq
Install nim from `devel` and it should work. Eventually these pointless renamings in the stdlib stop and we'll have a round experience.

Re: Opengl vertices

2016-07-28 Thread flyx
The OpenGL wrapper provides a `GLvectorf3` type, why don't you use that? Also, you should show more of your code for us to see what you are actually doing.

Re: Convert seq into tuple

2016-07-28 Thread flyx
> I hope I'm wrong and there is an elegant way to define a large tuple. What do you need a tuple this size for? Your problem is likely that you use the wrong tool for the job. The need to write var myTuple: tuple[a00,a01,a02,a03,a05 ... a98,a99: int] roots from the nature of t

What the NFL'ersus

2016-07-28 Thread dougmartin
What the NFL'ersus Brand-new Concussion Numbers Don'capital t Reply | Little league involving Denial: The NFL'azines Concussion Problems | FRONTLINE | PBS CINCINNATI Branden Oliver Jersey, Also - SEPTEMBER Fourteen: Vontaze Burfict #55 with the Cincinnati Bengals walks over field sustained the c

David Cut wraps up Arizona hockey

2016-07-28 Thread dougmartin
David Cut wraps up Arizona hockey coaching workers together with Phil Haig | Hookem.internet Bevo BeatWelcome to Bevo Defeat, the particular American-Statesman’s Longhorn athletics information blog site. Get pleasure from totally free along with unrestricted access. New Colorado NCAA college ho

Re: What's the Best Way to Start a Server, Receive Data, Stop the Server, and Return the Data?

2016-07-28 Thread moigagoo
> Is it actually supposed to be a server rather than a client? It's supposed to be both: receive a request, send a request to another host, and receive the response. > You can of course not use async, In fact, that would be the thing I need. I don't mind blocking while waiting for responses. B

Re: Convert seq into tuple

2016-07-28 Thread mora
The compiler needs to know the size of the tuple in compile time. I can imagine a code such that the following works: var myTuple = fillTuple(5, @[1, 2, 3, 4, 5]) where `5` is known at compile time (it can be a `const`).

Re: Convert seq into tuple

2016-07-28 Thread ivanitto
Thanks Flyx, your solution solves the task, but still unlikely able to generate (target) tuple of arbitrary size: for example, how would you write code to convert seq/array which consists out of 100 (or 1000 or 10M elements) ? You would have to write something like: var myTuple: t

Re: db_mysql return column name as well?

2016-07-28 Thread jlp765
`instantRows` iterator calls `setColumnInfo()` so (untested code :) ) where `theDb` is your dbConn object and `myTestTbl` is the table being queried, and using count(*) to return only one result so that the column representation is not printed for multiple rows var dbC: DbColumns

Failed to install c2nim

2016-07-28 Thread takaomag
Hi! I tried to install Nim, nimble and c2nim as follows. But installing c2nim faild. Please tell me if I make mistake. * Install Nim. No problem. $ git clone -b master git://github.com/nim-lang/Nim.git && \ cd Nim && \ git clone --depth 1 git://github.com/nim-lang/csour

Opengl vertices

2016-07-28 Thread Kerp
First let me say if this is not a bug my apologies. But i think in my noobish experience it is. I think i traced my problem to it in nim. The strange behavior i get with my opengl vertices and i'm fairly certain after trying the same sorta thing in c++ and nim is that a vertice of 0,0,0 for x,y

db_mysql return column name as well?

2016-07-28 Thread everlast
Instead of returning just the row/s is there a way to return column_name:column_value pairs?

Re: Concept[T] design question

2016-07-28 Thread Araq
You need to add a prepass to concepts that performs basic symbol lookups for `T` and `is` at least. Right now a locally overwritten `is` operator influences the matching process. Unacceptable. :)