lvgl - callback issues

2023-07-01 Thread mantielero
I finally used for the example: let btn_event_cb = block: var cnt = 0 (proc (e:ptr lv_event_t) {.cdecl.} = let code = lv_event_get_code(e) let btn = cast[ptr lv_obj_t](lv_event_get_target(e)) if code == LV_EVENT_CLICKED: echo now().utc,

lvgl - callback issues

2023-07-01 Thread sls1005
There's a pragma named [global](https://nim-lang.org/docs/manual.html#pragmas-global-pragma) which might be useful. As for > I also tried this format (more familiar to me): You cannot use it, because a `{.cdecl.}` can't be a `{.closure.}`. They conflict not only at high-level (each proc can h

lvgl - callback issues

2023-07-01 Thread Araq
Well C doesn't have closures so `.cdecl` cannot support it either. Usually a `void* env` parameter is used in C so that you can pass user data to callbacks. But in this library's `event.h` it's declared as: typedef void (*lv_event_cb_t)(lv_event_t * e); /***

Twitter Clone in 60 lines of Nim

2023-07-01 Thread kobi
Looks like a joy to code in.

lvgl - callback issues

2023-07-01 Thread mantielero
It looks like the issue was with the timing in the loop.

lvgl - callback issues

2023-07-01 Thread mantielero
In the thread about the wishlist for UI, @JazzPlayer mentioned LVGL. I wasn't aware about this library so I went to [LVGL.io](https://lvgl.io/) and it catched my attention. It can work embedded (for example with ESP32), but you can also make it work in Linux and even on the web as shown [here](

Discounted rates for "Nim in Action" and "Mastering Nim"?

2023-07-01 Thread basilajith
Aah, I think I need a US postal address to join. I'm not residing in the US bro.

Why is a Nim enthusiast/programmer called a "Nimmer"?

2023-07-01 Thread basilajith
You'll be pressurized to change it to "Nimmains"...haha!

Discounted rates for "Nim in Action" and "Mastering Nim"?

2023-07-01 Thread basilajith
Wow! Never knew this existed. I'll try to swap through this and let you know. Thanks @noah!

nimiSlides 🛷 Create beautiful slideshows in Nim 👑

2023-07-01 Thread basilajith
Great job! @hugogranstrom, this is genius.

Nim Sucession Plan

2023-07-01 Thread Yardanico
Worth noting that most ad-blockers will still block tracking, even Plausible, so those numbers aren't too representative (since most experienced computer users - programmers - tend to always use ad blockers)

Wishlist: Ideal UI library for Nim

2023-07-01 Thread bobd
Although this might cause shrieks of horror, I've come to love using CSS over the past couple of years. I still use Object Pascal for building desktop UIs (with Nim for number-crunching), but with a twist - I'm gradually migrating the components I use to HTML/CSS-based versions using this:

Nim Sucession Plan

2023-07-01 Thread dlesnoff
> I did not answer this survey, though I use SO a lot. It needed quite some time to fill it up. I do not remember the exact participation of Nim users among the participants of Re

Why is a Nim enthusiast/programmer called a "Nimmer"?

2023-07-01 Thread dlesnoff
@termer Please, just stay cool or go coding.