SQLite getRow data changing

2021-02-28 Thread Neodim
Hello everybody! I have just started to use Nim Sqlite library. It works fine but I faced that it changes data type upon getting rows from DB. For instance this sample program: import db_sqlite let db = open("mytest.db", "", "", "") db.exec(sql"DROP TABLE IF EXISTS my_

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

2021-02-28 Thread michy
Petr Kobalicek is very responsive, when it comes to discussions about his approaches. He is an enthusiast and optimization freak and loves to share his experiences.

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

2021-02-28 Thread treeform
I find that blend2d's jit-compilation kind of wearied. Program knows what its going to blend and how its going to blend compile time, why jit? I don't understand. But I want to understand. I feel like the big wins going to be on the GPU side, but we have not achieved them yet.

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

2021-02-28 Thread michy
Comparisons show huge differences in speed between blend2d and cairo, at least for most examples: So _still a bit slower than blend2d " does not really harm. But *slower than Cairo_ is a different thing and asks for optimizations. Speed in b2d is mainly due

SSL/TLS certifictae issues with Nim 1.4.4?

2021-02-28 Thread treeform
I think shipping the cacert.pam next to the two ssl*.dlls and reading it from there is the best option. When user distributes their windows .exe they already have to copy the ssl*.dlls what's an extra cacert.pam file? It does not look like nim 1.4.4 ships with cacert.pam nor does it read it from

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

2021-02-28 Thread treeform
Yes I have looked at blend2d (I did not find a nim wrapper thought). It looks pretty cool. I really like the C++ and C api variants. And yes it claims speed. I want to know how they do it so that we can replicated that in pixie. We are still a little bit slower then the blend2d, skia, cairo but

Nim can be so difficult to understand

2021-02-28 Thread alexeypetrushin
A side comment... I find using `new Xxx` extremely confusing, error prone and inconvenient, and try to avoid it as much as possible. The `Xxx()` constructor feels much better, and it would do implicit `new` call. And you don't need to change the code if later you would decide to change the obje

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

2021-02-28 Thread michy
Great stuff! BTW: Are you aware of the blend2d-project? / I think he is the absolute winner when it comes to benchmarking.

Nim can be so difficult to understand

2021-02-28 Thread HJarausch
Thanks, as well.

Nim can be so difficult to understand

2021-02-28 Thread inventormatt
if you create a a matrix theta and set both m.Theta and MU.Theta to that same matrix then both of those variables will contain references to the same matrix like this

Nim can be so difficult to understand

2021-02-28 Thread Recruit_main707
Matrix[T] is already a ref: type Matrix[T] = ref object # reference to an object data : seq[T] MX1[T] = object Theta : ref Matrix[T] # reference to a reference to an object MX2[T] = object Theta : Matrix[T] # (implicit) reference to an object

Nim can be so difficult to understand

2021-02-28 Thread HJarausch
Thanks for the corrected code.

Nim can be so difficult to understand

2021-02-28 Thread HJarausch
Thanks! But if I define `Theta : Matrix[T]` how can I have `MU.Theta` be the same object as `M.Theta`

Nim can be so difficult to understand

2021-02-28 Thread inventormatt
and here is a nim playground of the corrected code

Nim can be so difficult to understand

2021-02-28 Thread inventormatt
Your Matrix is already a reb object so for your theta attribute it wants a ref object of a ref object. if you change the ref matrix to a regular matrix it should then work the way you want it

Nim can be so difficult to understand

2021-02-28 Thread HJarausch
I'd like to create two objects hold a ref to the same _Matrix_ , what am I missing? Many thanks for a hint! type Matrix[T] = ref object data : seq[T] MX[T] = object Theta : ref Matrix[T] MXU[T] = object Theta : ref Matrix[T]