Weird import issue

2021-08-10 Thread alexeypetrushin
> So there's no way for plot.nim to know about your json hook. Actually, no it doesn't make sense. The JSON conversion stuff defined in `std/json` I define json hook in other modules. And yet `std/json` somehow knows about those hooks. So why this case is different?

Is 'await' a keyword?

2021-08-10 Thread ynfle
Would you be willing to PR a change?

wNim - Nim's Windows GUI Framework

2021-08-10 Thread ynfle
Try,

how to convert .h file to nim module

2021-08-10 Thread Araq
> GuiLite.h is c++ file and says that it compiles by msvc but nim compiles by > mingw compiler and also msvc is very heavy. That doesn't matter much, c2nim supports C++ via the `--cpp` command line option and Nim can use MSVC via `--cc:vcc`. > Private question:- Are you creator of nim? Yes.

invalid type: 'seq[int] or iterator (): int{.closure.}' in this context

2021-08-10 Thread HJarausch
Thanks, that solved it.

invalid type: 'seq[int] or iterator (): int{.closure.}' in this context

2021-08-10 Thread treeform
You might need to update Pixie. Older versions don't have newContext. @ingo, thank you for using Pixie this looks great!

pixie to direct read a seq[uint32]

2021-08-10 Thread treeform
ColorRGBX is the same size as uint32 - 4 bytes r, g, b, x (premultiplied alpha). So this cast is actually correct: image.data = cast[seq[ColorRGBX]](m.image) Run You might have to call toPremultipliedAlpha() after from pixie/internal if your image has alpha.

constructor which will be called immediately after var call.

2021-08-10 Thread chaemon
Thanks! The proc init= is exactly what I want.

wNim - Nim's Windows GUI Framework

2021-08-10 Thread Kalbhairab
sir i am new to nim and dont know too much about converting c++ to nim. It there any tutorial in nim.

invalid type: 'seq[int] or iterator (): int{.closure.}' in this context

2021-08-10 Thread ingo
vmath and pixie are the only external dependencies. I just cleared out the nimcache directory and compiled and ran it without problems `nim c curve.nim` (win10, nim 1.4.8 amd64).

wNim - Nim's Windows GUI Framework

2021-08-10 Thread kcvinu
It's quite easy to work with win32 API in Nim. You can use CreateWindowEx function for creating a window. But you need to use few other win api functions for that. Like GetModuleHandle, RegisterWindowEx, LoadIcon, LoadCursor, CreateSolidBrush, ShowWindow, UpdateWindow, GetMessage, TranslateMessa

Is 'await' a keyword?

2021-08-10 Thread dom96
It's not formally a keyword in the compiler. So yeah, those docs are misleading.

how to convert .h file to nim module

2021-08-10 Thread Kalbhairab
GuiLite.h is c++ file and says that it compiles by msvc but nim compiles by mingw compiler and also msvc is very heavy. Private question:- Are you creator of nim?

wNim - Nim's Windows GUI Framework

2021-08-10 Thread Kalbhairab
sir please write what you know in english because people will come to help you if there are mistakes. Please make tutorial from basic concept how to start building library including calling win32 api

invalid type: 'seq[int] or iterator (): int{.closure.}' in this context

2021-08-10 Thread HJarausch
I've tried to compile your curve.nim - the name 'newContext' is undefined. Is there another 'import' necessary? Thanks Helmut

Is 'await' a keyword?

2021-08-10 Thread user71383
It is not listed in the manual as keyword but asyncdispatch and asyncmacro state: The 'await' keyword is also defined here for technical reasons. (Generic symbol lookup prepass.) Just a minor issue but confusing.

Nim is just so great, works first try

2021-08-10 Thread rforcen
totally agree! after porting a few k'lines of c++/rust code the coding experience is very pleasant, resulting code is clear and fast!

complaining about nim popularity.

2021-08-10 Thread timothee
> the main thing is no direct android/ ios support as people use language which > have direct support for mobile development. please help with CI on those platforms, refs > Bad documentation not true anymore, but things can always be improved; plea

pixie to direct read a seq[uint32]

2021-08-10 Thread rforcen
this is used when you load an image file from memory: import pixie const imageIcon = "icon.png".staticRead let image = imageIcon.decodeImage # do something w/image... Run

pixie to direct read a seq[uint32]

2021-08-10 Thread ElegantBeef
Pixie has a [`decodeImage`](https://nimdocs.com/treeform/pixie/pixie.html#decodeImage) procedure which takes a `seq[byte]` assuming its a file format stored in memory. Otherwise the setting the data directly seems to be the best.

pixie to direct read a seq[uint32]

2021-08-10 Thread rforcen
having a seq[uint32] how can i directly create a pixie image ? i'm currently using a double for loop w/setRgbaUnsafe cast: for i in 0..