crosscompiling - SSL

2023-07-17 Thread jtv
IIRC, OpenSSL, at least v3, gets dlopen()'d no matter what you do, which will then attempt to dynamically load things that are already statically linked. We played some low-level games to redirect the loader ourselves. The tech world uses static binaries heavily. It shouldn't so hard to get one

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread xanim
Quite the contrary, actually: there's a lot I could learn from your code! If I do go ahead with the Tkinter for Nim project (need to carve time out in my schedule for this though), would you mind if I ask you occasionally for pointers? I don't shy from hard work, but it'd be nice not to fall dow

Please help me with httpclient on Nim

2023-07-17 Thread enthus1ast
Build the url with the std/uri module, using this: Also parts in an url are explained here:

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread thindil
Interesting feeling. :) Personally, I see Nim as Ada 2.0. It solves some issues which I had with Ada, mostly related to dynamic containers and portability. From the second side, I miss the ability to set arbitrary start index for sequences in Nim. :) But generally I'm happy. After some initial p

HTTP Help

2023-07-17 Thread zanderfh
I've been stuck on this for ages. In Python's request module, there is a: params = {"data" : "moreData"} requests.get(url, headers, params) How do I accomplish the params part in Nim, I've tried all sorts of things and I just can't get it to work. Thanks

HTTPclient

2023-07-17 Thread zanderfh
I've been stuck on this for ages. In Python's request module, there is a: params = {"data" : "moreData"} requests.get(url, headers, params) How do I accomplish the params part in Nim, I've tried all sorts of things and I just can't get it to work and I am not sure how to accomplish it

Please help me with httpclient on Nim

2023-07-17 Thread zanderfh
I've been stuck on this for ages. In Python's request module, there is a: params = {"data" : "moreData"} requests.get(url, headers, params) How do I accomplish the params part in Nim, I've tried all sorts of things and I just can't get it to work. Thanks

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread giaco
just out of curiosity, how does it feel for you converting an Ada project to Nim?

PODS: Easy to read and type text format for serialization and config files.

2023-07-17 Thread Pixeye
Hi, thanks for the feedback and yeah, I agree with you that it's not something world awaits XD But, it's interesting work and good exercise to say the least. I learned a lot from that. Currently, I didn't thought about embedded single quotes nor binary data type, though I did tree model nodes f

Passing closures as C callbacks with cleanup functions

2023-07-17 Thread thisismyusername
I'm new here and I've tried searching for this but can't seem to find it. I'm writing nim code that interacts with a callback based C library, think functions like: void do_the_thing(... args ..., void* cb_arg, callback_func_t cb, destroy_func_t cleanup) { ... } Run

GUI-LIB nip - button callback and object data

2023-07-17 Thread JeysonFlores
First of all, `cb_btn(self: PIhanlde, md: Mydata)` the procedure has two arguments but in the invocation `cb_btn(md)` only has one. So that's something you may check out. Secondly, what you are doing in the `btn.action = cb_btn(md)` line is invoking the function and the result of the function i

Nlftk : FLTK for Nim : how do you associate a callback to a button?

2023-07-17 Thread catswhiskers
Update. used sed to work round the problem. Now got to solve "could not import: Fl_JPEG_ImageNew"

Nlftk : FLTK for Nim : how do you associate a callback to a button?

2023-07-17 Thread catswhiskers
It might do but ... there is a corruption in fltk_main.nim I can't get round, so I can't point your const fltk to the correct library. Neither from the git clone of this file nor by saving the "raw" file directly to fltk_main.nim solves the corruption. It does though compile which is encouraging

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread thindil
The game is my pet project, which I started a couple of years ago to learn a different language, Ada. :) When I meet Nim I decided to rewrite the whole project to Nim. For fun, and to see how much work will be needed for it. That work is currently under way. And that is the reason why the code i

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread xanim
I'm always shortening imports in Python (`import tkinter as tk`) so one gets used to thinking of both as the same! Thanks for pointing it out. I checked out your project, and played it a bit. The core logic of the entire game is built in Nim, but you are relying on Tk directly for the game's UI?

Quantum Leaps framework implementation /Miro Samek/

2023-07-17 Thread planetis
> And I very much want to create (or re-use if one already exists) a DSL for > hierarchical state machines (HSM). A very primitive macro:

PODS: Easy to read and type text format for serialization and config files.

2023-07-17 Thread SpotlightKid
Interesting. Is there some sort of specification for the format? For example, from the examples, it looks like it distinguishes between (named)tuples and dictionaries/hashes/tables/whatever-you-call-them? How do you have strings with embedded single quotes? Is there a binary data type or base64

Wrapping Tkinter GUI in Nim?

2023-07-17 Thread SpotlightKid
While Tkinter interfaces are ok on Windows and maybe macOS (I don't really know), they are IMHO horrible on Linux systems. They have non-standard keyboard bindings, look like they're from the 90s, and just lack many things you expect from a modern desktop UI framework. My advice would be to loo

Quantum Leaps framework implementation /Miro Samek/

2023-07-17 Thread elcritch
It'd be really cool to see something similar for Nim! Especially if it could embed logic proofs or invariants like Ada. Note that it'd be possible to use Nim async to create a similar style setup too. Async functions are turned into iterator functions which are simple state machines storing the