Tutorial for nim pixie graphics?

2022-12-20 Thread geohuz
I'm wondering if Pixie can be used as the base of ploting/charting library like ggplotnim, someone may come up with a general animation/morping lib based on pixie.

Tutorial for nim pixie graphics?

2022-12-20 Thread treeform
Pixie is just a vector graphics library it does not do clicks or open windows. But we did write boxy and windy which you can use together with pixie to make games and other interactive things: And there is also slappy for

Looking for resources about more complex generics, comptime type construction, etc.

2022-12-20 Thread ElegantBeef
Technically by association does track this, but no clue if there is a concrete issue for it.

Splat operator implementation with macros

2022-12-20 Thread Hlaaftana
That is fixed in devel

Splat operator implementation with macros

2022-12-20 Thread ElegantBeef
Oh yay, that means we now have the best code linter.

Looking for resources about more complex generics, comptime type construction, etc.

2022-12-20 Thread auxym
I also hit this issue recently. Do you know if there is a github issue already tracking this?

Splat operator implementation with macros

2022-12-20 Thread ElegantBeef
Well they 'work' on typed ast. They dont even respect `{.noRewrite.}`.

Neovim users, how are you setting up Nim?

2022-12-20 Thread radsoc
After watching this video I decided to set up Neovim for Nim on my laptop. And here is my nim-gruvbox fork of TJ DeVries' kickstart.nvim You only have to copy this file into ~/.config/nvim (after

Splat operator implementation with macros

2022-12-20 Thread Hlaaftana
Term rewriting macros work on checked AST IIRC

converting C++ typedef to nim-lang

2022-12-20 Thread nospher
About C int to a pointer i only following the code :c. About cint/cfloat THANKS fixed <33

converting C++ typedef to nim-lang

2022-12-20 Thread sls1005
Try using `cint`/`cfloat` instead of `int`/`float`. Their sizes are usually not the same, which is easily to cause bugs. Also I cannot understand why to cast a C int into a pointer.

Tutorial for nim pixie graphics?

2022-12-20 Thread pietroppeter
> Can pixie react to clicks on a figure no, not by itself. for that I would use p5nim: examples of implementation of tic tac toe in p5js that could be ported to p5nim: * *

Splat operator implementation with macros

2022-12-20 Thread MichalMarsalek
Is it not possible with some term rewriting macros?

Advent of Nim 2022

2022-12-20 Thread bg
You may already be aware of this, but if you don't want to use symbols, you can make a `max=` proc in nim: proc `max=`*(a: var int, b: int) = a = max(a,b) var x = 5 let y = 7 x.max= y assert x == 7 Run

Tutorial for nim pixie graphics?

2022-12-20 Thread alexeypetrushin
Can pixie react to clicks on a figure? Like when you draw image with lots of stars, and when someone clicks on specific star the event handler is triggered?

solution to the problem "could not load: SDL2.dll (bad format; library may be wrong architecture)"

2022-12-20 Thread MordorCat
since a link to google drive is not welcome here. I'll post a link to the github

solution to the problem "could not load: SDL2.dll (bad format; library may be wrong architecture)"

2022-12-20 Thread MordorCat
I found the necessary libraries for x64 on github and uploaded them to Google drive so that they are in one place. And by replacing the built-in libraries with new ones, all the problems disappeared. Tested on nimx. I have posted a link to Google drive here so that others don't have to search

solution to the problem "could not load: SDL2.dll (bad format; library may be wrong architecture)"

2022-12-20 Thread PMunch
Please try to avoid having people download random files to help you. Library may be wrong architecture is probably a 32/64-bit issue.

solution to the problem "could not load: SDL2.dll (bad format; library may be wrong architecture)"

2022-12-20 Thread MordorCat
I think many have faced a similar problem. and I know how to fix it. 1. download the files from the link . there I collected the necessary dlls. 2. Replace files in nim/bin with previously downloaded

Advent of Nim 2022

2022-12-20 Thread fxn
I have not been able to solve #19 yet, but I founded it to be perfect for arrays indexed by an enum. The code reads really nice, reads with problem names, but allows for genericity when you need it.

Proposed method of defining models with Nim code in Nexus

2022-12-20 Thread jasonfi
In this approach you generate the foreign keys from the YAML definitions. Everything is defined in YAML first. However I would like to eventually write a tool to reverse engineer an existing schema into YAML.

Tutorial for nim pixie graphics?

2022-12-20 Thread pietroppeter
and as far as example goes, this is the most complex thing I did with pixie (likely not good style, iirc I was mixing the two styles of api available in pixie): reproducing a wordle-like logo (for an Italian version of wordle) with pixie (that

Tutorial for nim pixie graphics?

2022-12-20 Thread pietroppeter
btw, I think readme of (old repo for subset of font functionalities now in pixie) contains still useful stuff for fonts and typography that, last time I checked was not yet ported to pixie or pixiebook. probably it could be useful to port it in one of

Proposed method of defining models with Nim code in Nexus

2022-12-20 Thread Araq
Nevertheless you too could parse the SQL model instead of coming up with a YAML equivalent for foreign key constraints. ;-)

Splat operator implementation with macros

2022-12-20 Thread yglukhov
However something like this should be possible to implement: someCall() ... scalarParam ..* tupleParam # expands to someCall(scalarParam, tupleParam[0], tupleParam[1]) Run

Nimwave - build TUIs for the terminal, web, and desktop

2022-12-20 Thread miran
For the uninitiated: @sekao's most successful project (at least by the number of Github stars):

Proposed method of defining models with Nim code in Nexus

2022-12-20 Thread jasonfi
Ormin is interesting, but I prefer the Nexus method of using generated procs and types. I think it's a good thing to have many different ORM libraries for people to choose from.

Looking for resources about more complex generics, comptime type construction, etc.

2022-12-20 Thread ElegantBeef
Yea statics have some bugs, so that's why it's so inconsistent. I believe the crux of the issue here is that when the VM runs code it does not return `static T` but instead `T` which means it fails on attempt to use with `static T`. There is a similar issue with field access on static objects

Looking for resources about more complex generics, comptime type construction, etc.

2022-12-20 Thread fsh
I am taking from this that learning Nim generics/static[x] is about exploring and investigating? Here's one such exploration: # Setup: I have some macro that takes a static[int] import std/macros macro foo*(d: static[int]): untyped = newLit(d) # And a type that

Looking for resources about more complex generics, comptime type construction, etc.

2022-12-20 Thread fsh
& another exploration: type FooType = enum ftA, ftB Foo[N: static[int]] = object typ: FooType # first guess: doesn't work! # # Test1[X: static[Foo]] = object # when X.typ == ftA: # Error: undeclared field: 'typ' for type

Proposed method of defining models with Nim code in Nexus

2022-12-20 Thread Araq
In Ormin I parse the SQL model at compile-time. And I don't generate Nim types for the model at all, instead Ormin focusses on providing the tools to generate prepared statements that are type-checked against the model. This way you don't have to materialize a complete Nim object of all fields