Cheerp 3.0? C++ to WASM compiler

2023-03-14 Thread Araq
It's not only POSIX calls, there is also a lack of multi-threading etc.

Nim ORC example benchmark

2023-03-14 Thread alexeypetrushin
In the ORC example benchmark from the [Post about ORC](https://nim-lang.org/blog/2020/12/08/introducing-orc.html) the request doesn't use sessions. I wonder how this example would look like, when request would need a) create sessions on demand b) Read/write to sessions made of complex GC data s

How to reproduce the release build of Nim?

2023-03-14 Thread PMunch
Something like this?

Cheerp 3.0? C++ to WASM compiler

2023-03-14 Thread giaco
the point is not which source language, but how to convert POSIX calls to WASM. If I got it correctly here, there's no much difference between Emscripten and Cheers on this matter.

Example of simple parser?

2023-03-14 Thread alexeypetrushin
Thanks, I'm glad that I asked, as I didn't knew about many these projects, and there are couple that do what I want. P.S. The Book - Crafting Interpreters, by Robert Nystrom, seems to be a very interesting, unfortunately it's 600 pages long, so that's for some distant future when have more tim

Wish to use nim to take a screenshot of my desktop background

2023-03-14 Thread SerjEpatoff

Example of simple parser?

2023-03-14 Thread Yardanico
That looks kinda similar to

Example of simple parser?

2023-03-14 Thread SerjEpatoff
Rather interesting parser generator that emits C/C++: **Ragel state machines can not only recognize byte sequences as regular expression machines do, but can also execute code at arbitrary points in the recognition of a regular language. Code embedding i

Make Nim docker images official?

2023-03-14 Thread elcritch
This would be great! @moigagoo I could help with setting up Github Actions for building the images. Looks like you only have one dockerfile setup? I'd also suggest making them proper multi-arch images too -- a lot of devs run M1/M2 macs now. I did it here for [Nesper dockerbuilds](https://gith

Cheerp 3.0? C++ to WASM compiler

2023-03-14 Thread elcritch
Cheerp 3.0 has been up on HackerNews all day. It looks like it could be a good compiler target for Nim to web assembly without Emscripten. Has anyone tried it with Nim?

Cheerp 3.0? C++ to WASM compiler

2023-03-14 Thread ElegantBeef
Worth noting `clang` is another way to compile to Wasm without using Emscripten.

Cheerp 3.0? C++ to WASM compiler

2023-03-14 Thread elcritch
Link:

How to reproduce the release build of Nim?

2023-03-14 Thread jackhftang
I have an 3-yr old private Nim project that is still able to reproduce binary-equal build and run. Here is the dockerfile I use in CI. FROM nimlang/nim:1.2.6 as build # docker image prune --filter label=stage=builder LABEL stage=build WORKDIR /mnt # cop

How to reproduce the release build of Nim?

2023-03-14 Thread SerjEpatoff
Yep, it is a musl-libc bug. It makes too many rigid assumptions on Linux VFS layout. For example it assumes hosts and services locations are hardcoded to /etc/hosts and /etc/services!

Wish to use nim to take a screenshot of my desktop background

2023-03-14 Thread Naterlarsen
I've been looking for a module to help me take a screenshot of my desktop(entire screen). I haven't been able to find anything but I am sure that it exists. Any information or line or snippet would be very helpful. I just want to take a screenshot of my computer and then save it as an image (png

How to reproduce the release build of Nim?

2023-03-14 Thread SerjEpatoff
> this would be really cool; i've always had the itch to switch to clear Just tried it couple of days ago. Performance is awesome: Ryzen 9 laptop works like a jet engine under this distro. Also successfully resurrected old Chinese Atom netbook from Aliexpress just for fun. CL works better than m

How to reproduce the release build of Nim?

2023-03-14 Thread SerjEpatoff
Reproduced. Stack trace: $ path/to/fresh/static-musl-linked/nimsuggest --log --epc --v2 any_src.nim nimsuggest.nim(387) replEpc nimsuggest.nim(313) connectToNextFreePort nim-1.6.12/lib/pure/net.nim(1023) bindAddr nim-1.6.12/lib/pure/nativesockets.nim(308) getAddrInfo

Can I type a parameter as supporting `$`?

2023-03-14 Thread Clonk
Nim concept predates C++20 Concept

How to reproduce the release build of Nim?

2023-03-14 Thread SerjEpatoff
Thank you for pointing to the proper build script. Can you also provide not only the recipe, but also the environment used for building release artifact? OS/docker image, host Nim compiler, gcc version, OpenSSL version, libc version.

Make Nim docker images official?

2023-03-14 Thread jpalomaki
I have never published an official image myself, but having read some of the linked documentation, I think its a matter of: 1. Get upstream approval for doing this (i.e. nim-lang maintainers agreeing to publish an official image) 2. Figuring out who's going to maintain the images going forwa

Make Nim docker images official?

2023-03-14 Thread Araq
What do we need to do in order to make it "official"?

Export C library components when using `--app:lib`

2023-03-14 Thread elcritch
I'm curious how to get Nim to build and export C library components. I've got some `.exportc.` procs but also want to export some C library functions imported using `.compile.` or `.importc.`. Suggestions? I've tried a couple of routes the other day but couldn't get the right combination.

How to reproduce the release build of Nim?

2023-03-14 Thread Araq
Like this ? But for debugging nimsuggest almost any build of nimsuggest should do.

How to reproduce the release build of Nim?

2023-03-14 Thread noah
this would be really cool; i've always had the itch to switch to clear

Get equivalent code with expanded templates/macros

2023-03-14 Thread Hlaaftana
`var a {.noinit.}: int` after turning into "typed" AST simplifies into `var a: int` where `a` is a symbol object with the `noinit` information embedded. However this is changed in the [development version](https://github.com/nim-lang/Nim/commit/de4b0346bdafab6c38b77d430d0e83f95da0582c) where th

Can I type a parameter as supporting `$`?

2023-03-14 Thread SuaveSteve
Thank you very much for answers. So concepts are Nim's way of structural typing? They seem influenced by C++20's concepts.

Get equivalent code with expanded templates/macros

2023-03-14 Thread jj2299
I'm trying to save an equivalent version of a Nim program, but with expanded templates and macros: macro parseFile(s:static[string]) = let file = staticRead(s) result = parseStmt(file) macro expand(body: typed) = writeFile("newProg.nim", body.repr)

How to reproduce the release build of Nim?

2023-03-14 Thread SerjEpatoff
I want to reproduce the release build of Nim compiler+ accompanying tooling utilities to byte-by-byte match binary artifacts provided by choosenim. Can someone tell me how to do it? Reason: nimsuggest provided by choosenim crashes under Intel Clear Linux. This distro is ultra-optimized (

Advanced Compilers: Self-Guided Online Course

2023-03-14 Thread Lantos
nice find

why use nim over c#?

2023-03-14 Thread grd
> I would have to disagree, OOP is very useful. ... I have to disagree with that. Modules are much better than OOP. OOP only complicates things more than necessary. If you work in a big team, the first thing that you do is to create a structure in where people can work in different areas. Somet

Tim Noakes Keto Gummies- Do Quick Start Tim Noakes Keto GummiesWork Or Scam

2023-03-14 Thread AimScholz
Tim Noakes Keto Gummies Are Qualified To Soften Fat With next to no Battle: No Activity, No Eating routine (Get in shape Normally with the Flavors) Individuals battling with being overweight and medical problems connected with corpulence are obtain wanted results from Tim Noakes keto chewy candi

Trying to understand: is it better if IndexDefect is CatchableError or not

2023-03-14 Thread inv2004
Hello, It is continue of the and After digging of the some code I found that IndexError was always inherited from Defect. Probably it is my personal problem that it was unexpected, that is why I want to clarify it for me:

Can I type a parameter as supporting `$`?

2023-03-14 Thread PMunch
Another option, if you don't want to mess around with concepts, is to simply do something like this: proc doThing(x: string) = echo x template doThing(x: untyped): untyped = doThing($x) Run What this does is basically say that `doThing` only accepts a string, but

why use nim over c#?

2023-03-14 Thread kobi
I would have to disagree, OOP is very useful. designing with interfaces and classes or structs, encapsulates your data in one object, which is very useful for avoiding complexity down the road. The myriad design pattern, yes, they are confusing and sometimes lead to more confusion. But you can c

Can I type a parameter as supporting `$`?

2023-03-14 Thread Clonk
Concept are a good solution. You can also use `when compiles` with generic or templates : type Stringable = object NonStringable = object proc `$`(s: NonStringable) {.error: "NonStringable type is non stringable".} proc `$`(s: Stringable) : string =

Why does Nim compiler allways depends on another's language compiler?

2023-03-14 Thread rel
Is Odin moving from LLVM to C? (C-Odin or Codin)

Advanced Compilers: Self-Guided Online Course

2023-03-14 Thread Araq
Interesting material.