How doeas NIM differ from Mojo programming language?

2023-06-13 Thread ElegantBeef
No one has pointed out the real differences. Nim is more efficient, its 25% fewer characters. That's faster!

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread oyster
I hope mojo will not be a language like vlang

Platonic: core math concepts

2023-06-13 Thread elcritch
Nice! That makes sense, especially for end users. Ideally there’d be a few possible levels of coding style. Dynamic is an overloaded name, so I just made them the standard top module names, ie “platonic/vector” is the non-static concept. I did remove the generic number type from the concepts. O

good real life apps

2023-06-13 Thread EfimFichman
It's great that Nim has a usable stdlib and can produce small binaries, which are essential for real-life applications.

good real life apps

2023-06-13 Thread EduardBakers
Learning a new language like Nim sounds like a great way to kick off thenew year. As for real-life apps written in Nim, I haven't personally come across many, but I'm sure there are some out there.

procs: forward declaration

2023-06-13 Thread Araq
In the implementing module use `include requirements` and inside `requirements.nim` have the forward declarations.

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread elcritch
> Why is the marketing always targeted at A.I.? Because that's where the VC money is at? It's best to think of what drives VC's: FOMO and not looking bad. AI is all the rage and Lattner is a definitely an "IBM name" at this point. To be fair, the state of AI programming seems subpar.

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread SpotlightKid
> Either way I end up with an executable i.e. Main and a resource file, > Resource.rcc (after compiling the original .qrc file). So what. Just stick it next to your executable on windows (the nimqml example shows you how to get the path), or... > I don't see much sense in having the executable

procs: forward declaration

2023-06-13 Thread xigoi
Why not just take the procedure as a parameter? proc myLibFunction(userDefinedFunction: proc(value: int)) = # … Run

procs: forward declaration

2023-06-13 Thread mantielero
I think the answer is no, but anyway: is it posible to forward declare procedures expecting the user of the library to implement those forward declared procedures? * `mylib.nim`: proc userDefinedFunction(value:int) proc mylibFunction() = ... userDefinedFunc

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread Araq
> I don't see much sense in having the executable in /usr/bin and having the > GUI somewhere else i.e. /etc/Main, or /opt/Main or anywhere else. And I don't see the point in an UI app being in /usr/bin, but then I don't see the point in /usr/bin to begin with (distributing a single app over mult

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread arnetheduck
Here's one way to do it with `staticExec`:

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread noxnivi_
Good day, Thanks all for your replies. @SpotlightKid, I had already been there, and tried the examples provided, also in the nimqml-apps repository that uses a different approach. Either way I end up with an executable i.e. Main and a resource file, Resource.rcc (after compiling the original .q

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread geohuz
Or you can look at the ELK layout engine: , which is based on , use the 'layered algorithm'. I think mermaid is using ELK as its core layout engine.

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread SpotlightKid
The Qt Resource System: Nim example:

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread termer
Mojo is a direct competitor to Python it seems (or at least it's marketed that way), whereas Nim is its own thing. Read nim-lang.org's homepage to get an idea of what the lang focuses on.

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread termer
You can read files to consts at compile time, and I think someone wrote a library to do the same with an entire directory, but I can't remember the name. I don't know whether NimQML supports feeding resources with strings, though

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread matkuki
https://github.com/xmonader/nimassets

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread Araq
On Windows you could use resources and a resource compiler to accomplish this and I've tinkered with a similar mechanism on Linux and got it to work. However, you should really figure out how to deploy applications on your OS of choice that can consist of more than one file.

NimQML> How to pack resource files or gui files in compiled package

2023-06-13 Thread noxnivi_
Good day, I'm working on a Nim + QML panel for Linux, and been through the examples available in the nimqml github page as well as the nimqml-apps repositry, also in Github. The prototype application builds successfully and runs without issues other than being still a pre-alpha and lots of thin

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread dlesnoff
What is the issue?

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread Araq
Ideally Atlas would output a graph representation that is not only useful for GraphViz. Maybe in JSON and then some external tool would render that in the browser.

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread Araq
I had no idea you're all so good at graphs. Anybody who wants to improve ?

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread PMunch
Throwing my hat into the ring, the simple code: import strutils var nodeName = "a" lastIndent = 0 parents: seq[string] echo "digraph {" for line in test.splitLines: if parents.len == 0: echo nodeName, "[label=\"", line.strip, "\",

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread federico3
Compared to Nim, Mojo is less mature and not open source yet. However it is designed to be backward-compatible with Python and allow progressive typing and performance improvements. This allows reusing the existing (massive) amount of Python libraries and tools.

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread dlesnoff
Why is the marketing always targeted at A.I.? > Mojo 🔥 — a new programming language for all AI developers. Too bad. I am a HPC researcher so probably not for me ;) Yes, Mojo is a white-space significant language. It introduces let and var statements. It has simple algebraic data types with `enu

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread Angluca
For non-programmers, the same , It's all words

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread Vindaar
Haha, (going by your github profile) they will be once you get to the end of that PhD. ;) On a serious note though, I'm glad it was helpful. It wasn't particularly complicated for me as I've written similar code enough times already. > Do you have a patreon? Nope, I don't. :) > Luckily, I did

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread auxym
Serious answer: You can actually download and use the Nim compiler. It is mature and will hit 2.0 soon. Nim is open-source. Mojo appears to use manual memory management with borrow checking, like Rust, whereas Nim has fully automatic, yet deterministic, memory management via ARC (

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread SolitudeSF
nim devs dont have a fire emoji fetish, so that seems like a win.

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread dlesnoff
@pietroppeter Mermaid.js has a very similar syntax to GraphViz, we need to handle ids and escape quotes, but is pretty nice (and has an editor!). Thanks for the proposal! @PMunch Thanks for spotting the error! Of course, an `Empty` Node can not have a Child. I could put them in another color. T

End of function in Nim binary

2023-06-13 Thread patla8640
I have to script a disasm to find this out, which is a bit ugly... anyway thx.

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread Yardanico
Already discussed in . And it's Nim, not NIM (it's NOT an abbreviation!!!)

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread giaco
if you look from far enough yeah, they are programming languages if you actually look better, you'll find apples and oranges

How doeas NIM differ from Mojo programming language?

2023-06-13 Thread giga84
It seems the same to me.

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread Vindaar
It made for a fun morning coffee problem to write an AST to TikZ macro. :) Note that I use `latexdsl` to directly compile the thing (and I made a local change to allow handing a custom template. By default it uses this

Is there any utility to output a graphical representation of a Nim Abstract Syntax Tree?

2023-06-13 Thread PMunch
I really like the output you have here, reminds me a bit of the graphs npeg can create. You seem to have a slight bug though, the `Empty` child of the `ObjectTy` should be a sibling to `OfInherit` and `RecList`, not their parent. Not sure why finding the sibling relationships are so hard, isn't

Why is the posix package so "low level"?

2023-06-13 Thread grd
Aha, I understand. It is only a matter of no RTFM ;-)

Why is the posix package so "low level"?

2023-06-13 Thread mratsim
> Why is the posix package so "low level"? Just like winlean for Windows: is raw. Then `std/os`, `asyncdispatch` or external libraries like Chronos can build on top with zero overhead and no imposed choices.

Why is the posix package so "low level"?

2023-06-13 Thread Yardanico
The std/os module has all the procedures that are reasonably cross platform. For example instead of `listdir` in POSIX you'd use walkDir or walkDirRec from std/os.

Why is the posix package so "low level"?

2023-06-13 Thread grd
Hi, this question is about three questions ;-) With "low level" I mean that the package contains lots of cstring parameters, and a lot more, such as UID and GID parameters. You need to convert your strings and other parameters constantly. And why are features such as chown and listdir not packa

FMU library - fmi2FreeInstance

2023-06-13 Thread mantielero
Well, I fixed it with: proc fmi2FreeInstance*(comp: ModelInstanceRef) = `=destroy`(comp[]) GC_fullCollect() Run I hope this helps others. Valgrind says: ==716751== ==716751== HEAP SUMMARY: ==716751== in use at exit: 0 bytes in