Wrapper for GSL - GNU Scientific Library

2021-02-25 Thread YesDrX
Hi, I just wrote an wrapper for GSL - GNU Scientific Library (all modules). GSL: /

Show Nim: Pixie, a fast 2D vector graphics library we are excited to share!

2021-02-25 Thread mikebelanger
cool! I'll definitely want to play around with this. If I may ask, what is the even bigger project that this is part of?

Show Nim: Pixie, a fast 2D vector graphics library we are excited to share!

2021-02-25 Thread treeform
Hey all, @guzba and I have been working on a 2D graphics library for an even bigger project we're working on. It's taken us some time so we're excited to have a version 1.0! Pixie is a 2D graphics library similar to [Cairo](https://www.cairographics.org/) and [Skia](https://skia.org) written e

Nim Design Patterns?

2021-02-25 Thread shirleyquirk
no it cant, you need to specify a type or use the template style [like in this answer](https://forum.nim-lang.org/t/7553#47926)

Nim Design Patterns?

2021-02-25 Thread alexeypetrushin
I tried, but it's not working, if it's changed to `proc` Nim can't infer the `o` type in the `alex.map((o) => o.id)`. [playground](https://play.nim-lang.org/#ix=2QPA) import sugar, sequtils type Marine = object id: string Building = object

onnxruntime C Api wrapped for nim

2021-02-25 Thread YesDrX
Hi, I just wrapped onnxruntime C Api for nim.

Async stack traces referring to macros

2021-02-25 Thread Araq
Hard to say but you can put `echo` statements into your program to see the last thing that completed successfully. :-)

Nim Design Patterns?

2021-02-25 Thread xigoi
You can do that, but then you need to pass a function, not a block. And then it doesn't even need to be a template.

Need help on getting notifcation message from postgresql

2021-02-25 Thread geohuz
@enthus1ast thanks for the reply! I tried hard to read documentation on nim asyncdispatch and related documentation on postgresql, and come up with the following solution, it did work, but I'm not a experienced dev on system programming, I really need you help to review it: import

Async stack traces referring to macros

2021-02-25 Thread benob
Is there a way to resolve where a macro was called in an async stack trace? Here is an example: nim /home/ubuntu/gemini/mine/gemini_server.nim(113) gemini_server /opt/nim/lib/pure/asyncdispatch.nim(1935) waitFor /opt/nim/lib/pure/asyncdispatch.nim(1627) poll /opt/nim

Need help on getting notifcation message from postgresql

2021-02-25 Thread enthus1ast
i've done it like this, i was not able to get the notice receiver or the notice processor callback to work, but polling worked for my use case to i tried not so hard. import db_postgres import postgres let db = open("", "", "", "") import os db.exec(sql("LISTEN

how to convert @[1..5] to @[1.0,2.0,3.0,4.0,5.0]?

2021-02-25 Thread Clonk
There is (IMO) an easier to read syntax with sugar : import sequtils import sugar var xx = toSeq(1..5).map(x => x.float) Run