Suggestion to improve proc type infer, and some complains

2023-07-03 Thread xigoi
You should use `on_click do():` instead of `on_click do:`. The latter is a different syntactic construct. (This should be fixed since it's confusing, but unfortunately that would require breaking backward compatibility.)

Suggestion to improve proc type infer, and some complains

2023-07-03 Thread alexeypetrushin
This should work: type Event = object proc on_click(fn: proc()) = discard proc on_click(fn: proc(e: Event)) = discard on_click => echo e on_click proc = echo e on_click do: echo e on_click (e) => echo e on_click proc (e) = echo e on_clic

Nim Sucession Plan

2023-07-03 Thread Calonger
If one suceed should be put together not umprompted rant about SJW

Ferus -- a tiny web engine written in Nim

2023-07-03 Thread alexeypetrushin
That's an interesting project to stress-test Nim. Just some ideas: Would be interesting to have echo "Hi" You can test Fersu Compatibility with randomly generated HTML & CSS, take screenshot in Ferus and Chrome, and compare images.

Suggestion to improve proc type infer, and some complains

2023-07-03 Thread Calonger
What is suggestion ?

Borrow pragma with multiple args?

2023-07-03 Thread brainproxy
The manual [indicates](https://nim-lang.org/docs/manual.html#types-distinct-type):

Borrow pragma with multiple args?

2023-07-03 Thread alexeypetrushin
Why this doesn't work? [play](https://play.nim-lang.org/#ix=4zHC) type Dollar* {.borrow: `+`, `-`.} = distinct int Run

Ferus -- a tiny web engine written in Nim

2023-07-03 Thread jasonfi
If it could be used as a lightweight Electron replacement I'd be interested. Especially if the browser engine can be shared among multiple runtimes.

Nim Sucession Plan

2023-07-03 Thread pyloor
couldn't say it better. in the early days as we old grumpy humans where young there was only tech and no one cares about master and slave replicas or master branches. it's a shame what the tech has become in some edges of the internet. thanks for standing aganst this. i stand with you.

Suggestion to improve proc type infer, and some complains

2023-07-03 Thread alexeypetrushin
I think procs could be improved, have better type infer. And to my understanding it shouldn't harm the compilation time and don't require reverse-type infer. Let's consider analogy, imagine that `let a = 1` wouldn't work and you had to use something like: import std/var_sugar # a

Ferus -- a tiny web engine written in Nim

2023-07-03 Thread elcritch
That's super nifty! Checkout my [cssgrid](https://github.com/elcritch/cssgrid) implementation. It's designed to be pluggable via a generic "rect/box" type you provide.

GUI app with nim

2023-07-03 Thread termer
I agree with @SpotlightKid, using imgui-type UIs suck. Textboxes don't work right, keybinds are missing, and in the Nim ImGui project demo, there was no unicode support.

Nim Sucession Plan

2023-07-03 Thread mildred
Thank you for standing in the shitstorm that the technological field has become, hopefully not everywhere. I stand with you.

Nim Sucession Plan

2023-07-03 Thread AraqIsBased
I registered specifically to say that Araq is - as the kids these days say - "based as fuck". Thank you Araq, Nim will stand out in my brain for a long long time as "that language with a based leader who gave a big middle finger to diversity mafia". Cheers, here's to the end of the clownery.

GUI app with nim

2023-07-03 Thread gentius
That demo looks quite nice actually, and the widgets could serve most use cases just fine. Since their resurgence, have such immediate mode guis gotten any better as far as not redrawing when not in use, etc.?

Fame and fortune for Nim?

2023-07-03 Thread elcritch
Note that this appears to be open to individuals too:

GUI app with nim

2023-07-03 Thread SpotlightKid
> Nobody told about ImGui experience. Does it work in practice with Nim? >From a user's POV I can only say, imgui-based UIs are usually the most >ugly^H^H^Hnattractive and cumbersome to use around. Whoever chose that tiny, >fugly default font needs to get _[redacted]_!

Can I create a thread with gc-UNsafe procedure?

2023-07-03 Thread xwlt
Hi, I'm new to Nim, sorry if that's a stupid question. I need to create a thread in which I will invoke some GUI library(to display an image). When I envelop this code(to open window) inside a procedure I find out that it's gc-unsafe, which is the case for majority of libs out there: * NiGui

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

2023-07-03 Thread termer
Nimflatulenceationstancialisms

Nim Sucession Plan

2023-07-03 Thread Aragusuku
Andreas, despite the extremely whiny and vocal groups that permeate the environment as a shadow, I must let you know that we are with you.

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

2023-07-03 Thread v3ss0n
Nimrod .. ?

GUI app with nim

2023-07-03 Thread foxoman
`Nobody told about ImGui experience. Does it work in practice with Nim?` * This Dev created a very good templates and demos on using imgui with nim * *

Ferus -- a tiny web engine written in Nim

2023-07-03 Thread nrk
Always great to see more browser engines in development. I've been working on a similar project for a while, and only recently released it; maybe you will find it interesting. Though our end goals are different (I target terminals), and my approach is in large part "NIH for fun", so it's more o

reading a PNG at compile time

2023-07-03 Thread mantielero
I'd like to read a PNG file at compile time. Do we have any library that can do that?

Ferus -- a tiny web engine written in Nim

2023-07-03 Thread xTrayambak
Hello everyone, I've been working on a tiny web engine (if you can call it that), called Ferus. It did get mentioned in the Nim Blog's May&April update, but at that time it didn't even have proper layout. Now, a few weeks after that, we've added a ton of new stuff. Ferus is designed to be anti-m

realloc and self referencing array problem

2023-07-03 Thread PMunch
Sure, the point is that you need to keep your references pointing to something which won't move. As you've discovered realloc can move everything in your sequence, so to avoid this you can store references to your objects in your sequence instead of your actual objects. But if you want them to l

Is it possible to write Linux kernel modules in Nim without having to "hack" the Nim compiler?

2023-07-03 Thread r3c
Like gc:arc can replace kalloc?

Fame and fortune for Nim?

2023-07-03 Thread SpotlightKid
BTW, the application deadline is in 3 days.

realloc and self referencing array problem

2023-07-03 Thread r3c
"allocate chunks at a time or something" Its the same thing as linked list of arrays, but from different angle :P

realloc and self referencing array problem

2023-07-03 Thread PMunch
The easiest would simply be to store the references in the sequence to begin with. The order would be kept by the sequence, and you're free to link to each object as you see fit. Of course this might hurt cache locality, so if that's of concern I guess you'd need to allocate chunks at a time or

realloc and self referencing array problem

2023-07-03 Thread r3c
When you expand an array/tree where each member has a pointer to other member, but realloc sometimes copy the old data and the pointers are gone. What im doing now is instead of pointers im using indexes, but its not enough flexible if you want to go up/down to parent/child trees. Other solution

Twitter Clone in 60 lines of Nim

2023-07-03 Thread alexeypetrushin
Unbelievable... I gave ChatGPT Twitter Example code, and asked "Given this Twitter Clone in Nim using Mono Web Framework, can you write tick tac toe?" ChatGPT knows nothing about Mono, yet it [created Tick Tack Toe example](https://gist.github.com/al6x/a39fa938e9394719b3094a77fa50a54b), and it

Fame and fortune for Nim?

2023-07-03 Thread PMunch
If only we had someone assigned to do this kind of stuff. Some kind of foundation which worked towards getting funds and such. But alas..

Fame and fortune for Nim?

2023-07-03 Thread mratsim
That reminds me that I met the Nlnet Foundation at FOSDEM and I think Nim would be an interesting project for them, see what they support:

Twitter Clone in 60 lines of Nim

2023-07-03 Thread carterza
Ah okay neat! In that case it'd be nice to have this plugged into one of the existing libraries / frameworks that handles some of the tasks I mentioned above. I very much like the fact that you decoupled the library from all of these separate concerns. Again, kudos on the library and thank you f

Fame and fortune for Nim?

2023-07-03 Thread alexeypetrushin
I think it's worth to apply, Nim definitely has potential to pass the review, and it's EU based.

Twitter Clone in 60 lines of Nim

2023-07-03 Thread alexeypetrushin
Hmm, do you mean that I mentioned `--threads:off` in readme, in examples? I used single-threaded server and async, to keep things simple and avoid possible unexpected surprises with multicore. Mono itself is not tied nether to async nor to single-thread.

Twitter Clone in 60 lines of Nim

2023-07-03 Thread carterza
Thanks for the detailed response. I think everything but the reply to #4 makes sense and cuts down on scope. The user isn't going to be able to fix the fact that you have a single threaded http server handling all requests. If the server is overburdened- there's nothing the user can do, and it's

Twitter Clone in 60 lines of Nim

2023-07-03 Thread alexeypetrushin
Thanks, I used Phoenix couple of years ago, didn't knew LiveView has those things. 1. Websockets - Mono framework is just one function `session.process(events: seq[InEvent]): seq[OutEvent]` it doesn't know about network. It's the job of the Transport Layer how those In/Out events going to be

Twitter Clone in 60 lines of Nim

2023-07-03 Thread gentius
LiveView like tech seems to me to be making the best compromises for a lot of use cases, so I think this is promissing. 1. If you are still in the early design phase, I would suggest maybe not getting into the 'template game' yourself and just making use of that module from karax. Or which

Fame and fortune for Nim?

2023-07-03 Thread blackmius
finally, the opportunity for paid nim jobs...