convert func to property box

2021-08-15 Thread Yardanico
I think you're asking for a GUI designer tool integrated with Nim (something similar to Lazarus), and I don't think there are any available at the moment. That said, you can at least have the UI itself designed with tools such as Glade (GTK) if you use the gintro package.

convert func to property box

2021-08-15 Thread Kalbhairab
i want to know a way to convert any function to property editor. I have written it once but no one replied. my point is: if we want to do make gui app and i want to make button. button have many properties like color, on_click, onHover, etc. autocomplete gives us what we need but if we can make

notification show

2021-08-15 Thread Kalbhairab
i am not talking about discord. I am talking about nim forum about notifications

More Nim on more Microcontrollers!? (Arm CMSIS / Zephyr RTOS)

2021-08-15 Thread auxym
So, I've been mulling this over and I'm favoring moving away from the C-like struct-pointers for an eventual nim CMSIS-style API. As stated above, nim does not support the following C facilities (or correct me if I'm wrong): 1. marking object fields volatile 2. marking object fields read-onl

% operator but for OrderedTable

2021-08-15 Thread ElegantBeef
Might make more sense to throw stuff like this in a package for implementation agnostic formatting/interactions, but anywho quickly modified the `strtabs.%` implementation for a completely agnostic solution(well with simple rules). import std/tables type FormatableTable =

weird error message

2021-08-15 Thread Yardanico
Hi, I reproduced and minimized the error you came upon, it boils down to this: var a: seq[cint] var b: seq[int32] echo a echo b Run When compiling that with the C++ backend on the latest Nim one gets a C++ compiler error: CC: convexhull

% operator but for OrderedTable

2021-08-15 Thread Col
I would the use the % operator () but for an OrderedTable rather than a StringTable. Is this possible? As an aside, does the % operator have an actual name? 'percent operator'? If so it should be include

weird error message

2021-08-15 Thread rforcen
hi, thanks for your prompt reply, Nim Compiler Version 1.4.8 [Linux: amd64] Compiled at 2021-07-19 Copyright (c) 2006-2021 by Andreas Rumpf active boot switches: -d:release souce code link: as mentioned before i've just changed cint to in

weird error message

2021-08-15 Thread Yardanico
Can you share some more info? Your Nim version? I'm also assuming you're compiling with the C++ backend, right? Also can you share the full program or try to minimize it before posting?

Nim in CI throws symbol not found error

2021-08-15 Thread holgerschurig
Alpine is meant to be very small. And so it uses musl, not glibc as a C library. And this library doesn't implement __memcpy_chk and __longjmp_chk. So you cannot execute programs meant for a full glibc (or compatible) library on Alpine. Maybe installing alpine-pkg-glibc can help you. Never trie

weird error message

2021-08-15 Thread rforcen
> /home/asd/.cache/nim/convexhull_d/stdlib_system.nim.cpp: In function ‘void > addQuoted__wOoLVA8v8QsIhW1wmcoEBg(NimStringDesc*&, > tySequence__9apztJSmgERYU8fZOjI4pOg*)’:| > ---|--- > /home/asd/.cache/nim/convexhull_d/stdlib_system.nim.cpp:6332:56: error: > cannot convert ‘tySequence__9apz

Nimview - a lightweight UI helper

2021-08-15 Thread konradmb
@marcomq Right now, there is no way to call a JS function from backend to frontend. I've read in README that you've done that intentionally, but is there a way to react to user input started from backend side? If not, would you accept a pull-request for this, if I would come up with a solution?

forward declaration of static arg with macro

2021-08-15 Thread ynfle
This works, although I don't know if it helps you

forward declaration of static arg with macro

2021-08-15 Thread chaemon
I found that the following macro which generates forward declaration and actual declaration of a proc with static arg cannot be compiled with message "Error: cannot instantiate: 'static_arg:type'". I compiled by Nim 1.4.8. It can be compiled by older version of Nim like 1.0.6. It also can be com

Print why assert failed?

2021-08-15 Thread alexeypetrushin
If `assert` provided by other libraries, the `std` should remove `assert` from default import. So it would be possible for import custom `assert` implementation, and not use nonsense like `powAssert`.

Print why assert failed?

2021-08-15 Thread cblake
FWIW, I think the `let a=..; let b=..` is fine if even if it introduces copies. Optimizing seems out of scope for asserts - you really optimize by just not running them. :-) As @jackhftang correctly observed, asserts are not a replacement for logging. Not sure a more capable `binOpAssert` or `p

How do I cast a ptr cuchar to a seq?

2021-08-15 Thread rforcen
work fine in a ffi, thanks

Print why assert failed?

2021-08-15 Thread Hlaaftana
Something you could do is take the expression given to the macro, make temps for each parameter in each call inside it, then print what they were, similar to Groovy's power assert. Then you can get something like: powerAssert foo(a, bar(b, c)) == d * e # assert failed: # a w