Why do I get table implementation instead of the table during compile time?

2019-09-11 Thread moigagoo
Hi! In Norm, I'm parsing type section at compile time and generate the db schema from it. Currently, a seq[SqlQuery] is generated with code like this: proc genTableSchema(dbObjRepr: ObjRepr, dbObjReprs: openArray[ObjRepr]): SqlQuery = ## Generate table schema for an object

Re: Confusion on implicit integer conversion.

2019-09-11 Thread Araq
IMO it's just a system.nim bug caused by misunderstandings about how generic parameters work.

How to use file system watcher (fsmonitor) in Nim?

2019-09-11 Thread jiyinyiyong
I want to watch files changes too. Do we have a better solution now? I want to run on OS X.

Led Ufo Lights Manufacturers Share The Advantages Of High-Power Floodlights

2019-09-11 Thread Cpcbeta
Today, Led Ufo Lights manufacturers come to share the advantages of high-power floodlights: The color is gorgeous, the monochromaticity is good, the light is soft, the power is low, the life is long, and the illumination time is up to 50,000 hours. Moreover, the LED floodlight lamp body is

Rosencrantz: a DSL to write web servers

2019-09-11 Thread liseki
@andrea Great job on Rosencrantz; the DSL is so succinct! I was wondering how do you (or envision to) support handlers that need to add something more to the context? For example a handler that does authentication may want to add the user or user id to the context for handlers downstream to

Re: Rosencrantz: a DSL to write web servers

2019-09-11 Thread andrea
Since handlers are nested, you should be able to see outer variables in the inner handlers. For instance something like scope do: let user = getUserData() return someHandler[ someOtherHanderl[ ok(user) ] ] Run I

Re: Rosencrantz: a DSL to write web servers

2019-09-11 Thread liseki
You are right a generic context is perhaps too much complexity for the use case. I'm just starting on an app and I'll see if I find any interesting abstractions around authentication. Thank you very much! On a broader view, as a Nim web toolkit developer, do you see the need for a unified

Re: Confusion on implicit integer conversion.

2019-09-11 Thread mp035
@Araq Should I raise an issue? Also would you be able to elaborate on 'how generic parameters work'?

Re: Confusion on implicit integer conversion.

2019-09-11 Thread Araq
Yeah, file an issue. They work like in C++ or other languages, the first usage binds the type to the type variable other usages check for consistency with the bound type. As mratsim already explained: > The signature of the proc is proc +[T: SomeInteger](x, y: T): T T is bound to > uint32 in

Re: How to use file system watcher (fsmonitor) in Nim?

2019-09-11 Thread Vindaar
Apparently there's now a wrapper for libfswatch: [https://github.com/FedericoCeratto/nim-fswatch](https://github.com/FedericoCeratto/nim-fswatch) While no help to you, maybe it's interesting for someone else reading this. I ported over fsmonitor to modern asyncdispatch in February, since I

Re: Compiling fails with --gc:refc and --opt:speed

2019-09-11 Thread ThomasTJdev
Well, it does look like, that it is the out of memory, which kills the compiling - stats below. Any suggestion to a solution or tips to find the responsible code part? Time - PID - CPU - MEM 17:23:35 - 3899 - 100,0 - 08,0 17:23:40 - 3899 - 99,80 - 08,0 17:23:45 -