C backend not finding NimMain()

2023-06-07 Thread sls1005
>From the error message: > ISO C99 and later do not support implicit function declarations It's only available when its phototype is decleared.

C backend not finding NimMain()

2023-06-07 Thread Stuffe
It worked, thank you!

Object Variant question

2023-06-07 Thread georgelemon
What about 7 fields instead of 9? :) type Node = object name, op: char val: int case nt: NodeType of BinaryNode: blidx, bridx: Natural of UnaryNode: ulidx: Natural else: discard Run

C backend not finding NimMain()

2023-06-07 Thread Araq
Change the .emit to: {.emit: """ void NimMain(void); NimMain(); """.} Run

FMU library - seg fault

2023-06-07 Thread Araq
Not nearly enough information. Can you link to the full project or to some subset that can be compiled?

tell me the library for windows to download files with a progress bar

2023-06-07 Thread PMunch
I moved it to questions

C backend not finding NimMain()

2023-06-07 Thread PMunch
That is very strange. NimMain is essentially the procedure which starts the garbage collector and initializes global memory, so not only i it very important, but it should always be available. The emit way of calling it is a bit strange though, but it shouldn't fail..

C backend not finding NimMain()

2023-06-07 Thread Stuffe
I have been using [GodotNim](https://github.com/pragmagic/godot-nim) for more than a year now with no issues. A couple of days ago it stopped working with the following error: /Users/stefanlund/.cache/nim/backend_d/@mgodot@s...@sgodotnim.nim.c:5046:6: error: call to undeclared func

FMU library - seg fault

2023-06-07 Thread mantielero
Sorry I wasn't clear. The code is not the same. The old code relied on a `fmuTemplate.h`and a `fmuTemplate.c` that I am trying to port to Nim. >From all the functions and data models that I have ported so far, in this >example the problem is on the `fmi2Instantiate` function. If I use the .c >v

FMU library - seg fault

2023-06-07 Thread Araq
* Compile it with the Nim version that you used 2 years ago. * Run it through `valgrind`. * Read about `NimMain` etc. My bet: Your code was never correct to begin with and a Nim version change exposes the problems.

FMU library - seg fault

2023-06-07 Thread mantielero
I've been off programming Nim for a while. Now I was revisiting and old project and I am hitting a failure I don't know how to address. I am creating a library in Linux: `inc.so` which complies with the FMU standard (I was doing this about 2 years ago). The code compiles fine, but when I pass t

End of function in Nim binary

2023-06-07 Thread hunterbr
Cool ideas, thx a lot !

End of function in Nim binary

2023-06-07 Thread hunterbr
RET doesn't work a) there are many other ways a function could end b) imaging something like: if xyz: return else: ... more code

I want to write a professional website. Which PL should I choose from?

2023-06-07 Thread grd
Hi guys, I am aware that this question is a hard one. Don't say Nim to begin with. I want to know the rationale behind it ;-) I want to limit the choice between Nim, Clojure and Python. The "other first class" languages are --in my opinion-- Go, and after that Rust. The second class is PHP. I

tell me the library for windows to download files with a progress bar

2023-06-07 Thread SpotlightKid
You could have easily found that out for yourself: Just integrate one of into For example: import std/[asyncdispatch, httpclient] import progress const nBy

tell me the library for windows to download files with a progress bar

2023-06-07 Thread juancarlospaco
https://nim-lang.org/docs/terminal.html#progress-bar

tell me the library for windows to download files with a progress bar

2023-06-07 Thread exelotl
For the GUI side of things, you could use [wNim](https://github.com/khchen/wNim) or [IUP](https://github.com/nim-lang/iup).

constructors: from C++ with love

2023-06-07 Thread terrygils
Me neither, I make mistakes all the time. I think most of the Nim team aren’t native speakers also. I would suggest having Copilot check the grammar of PR for documentation (see this RFC: )

tell me the library for windows to download files with a progress bar

2023-06-07 Thread ggibson
There's a PR for `puppy` that adds DL progress info. Working for windows and Linux last I tried, but not osx. Even after looking at a similar Rust lib I have no clue how to interface with the osx side and it needs help. If you're in a pinch you can just compile it for what you need for windows,

tell me the library for windows to download files with a progress bar

2023-06-07 Thread ploxotnuj1
tell me the library for windows to download files with a progress bar

constructors: from C++ with love

2023-06-07 Thread jmgomez
Thanks for pointing them out. Didnt notice them as Im not a native speaker. Will fix them. BTW you could also make a PR to the docs when you see something off :)

constructors: from C++ with love

2023-06-07 Thread terrygils
This is great but 2 grammatical errors can be spotted in the first paragraph of the linked docs: “constructor pragmas has two ways of” -> “… pragma has …” “declare constructors that works similarly to virtual” -> “… constructors that work …”

constructors: from C++ with love

2023-06-07 Thread jmgomez
FYI devel now has support to define C++ constructors. Here are the docs:

DLL crashes - can't figure out why

2023-06-07 Thread Araq
That completely ignores the ongoing costs _for us_ in ensuring the DLL support remains healthy and good. There is nothing wrong with saying "DLLs are a 2nd tier target, we try our best they work but encourage you to use something else, especially when you're new to Nim".

DLL crashes - can't figure out why

2023-06-07 Thread mratsim
> That would only encourage more people to waste days of debugging effort on > their lovely poorly thought out "plugin systems". With great power comes great responsibility and all that jazz. The whole appeal of Nim is to provide people with the power and expressivity to realize what they want.

DLL crashes - can't figure out why

2023-06-07 Thread IvanS
> I think we need a tutorial on DLLs, on the Nim website, even @PMunch article > doesn't mention that. I agree that there needs to be a complete tutorial on dynamic libraries. From A to Z, what we have now kind of stops at W, leaving one in the dark for the remaining X, Y, Z to make it work. J