Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread jasonfi
The fix discussed looks like something used by httpbeast and not httpbeast itself. If so, is there going to be an update to Jester?

Upcoming standard library changes

2022-12-02 Thread Hlaaftana
The intention was to keep the modules in the standard library for a while with a warning saying "this module is deprecated, use the nimble package instead", but they were removed due to what I think might have been a technical reason. The system module splits are really hard to warn about with N

Advent of Nim 2022

2022-12-02 Thread bg
It is really clever! Nim is so flexible that the input can be interpreted as valid Nim code and run! That said, I don't prefer that approach in my own solutions. When I clean up my solutions I tend to want to make them run faster, and for those purposes I consider baking the input into the exec

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread guzba
> I'll have to look through your epoll setup! I ended up having success with Nim's [std/selectors](https://nim-lang.org/docs/selectors.html) package so the main socket IO loop uses that. I am happy this low-level library was available. > What are you using to send data between the IO thread and

Nimsugest Goes out of control

2022-12-02 Thread elcritch
You might also try deleting your Nim, Nimble, ~/.nim, and ~nimble/ directories and do fresh reinstalls. In an empty Nim file nimsuggest shouldn't act up too much, but sometimes the nimble libraries or caches get messed up and cause nimsuggest to die a lot. Theres also timeout options for nimsug

Looking for a pair programming partner / coach

2022-12-02 Thread void09
A coach is exactly what I have been hoping for ever since I restarted my programming hobby with nim (previously pascal). Have 3 awesome projects in mind, but currently working on a simple cli torrent client (and associated lib), which nim ecosystem is missing, and also a good scope for learning:

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread elcritch
I'll have to look through your epoll setup! I did a of work with them and I'm curious how you set them up. What are you using to send data between the IO thread and workers? Just the threading channels or something else?

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread Araq
> I will not claim Mummy is DoS-proof by any means, that'd be nuts without > extensive evidence to back it up, but I have been mindful in my choices to > not leave obvious weak points. I did audit asynchttpserver fwiw and I will happily audit Mummy too. I'm not an expert on these things but I h

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread guzba
Thanks very much, happy to hear Mummy might work well for your future stuff. I will not claim Mummy is DoS-proof by any means, that'd be nuts without extensive evidence to back it up, but I have been mindful in my choices to not leave obvious weak points. To your question about a header limit a

Basic window graphics library?

2022-12-02 Thread treeform
You can also look at boxy: Here is also a youtube vide about what makes boxy great: A ton of examples on how to use it here: To get a simple pixel array goin

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread sekao
I am really hyped about this, man. I naturally went the same direction, selectors + threadpool, for the custom http server I made for my BBS (a weird juxtaposition of terms!). I knew that threads wouldn't be a limitation for me, and I wanted to write simple blocking code. The websockets support

Advent of Nim 2022

2022-12-02 Thread pietroppeter
There was a fix made in May to allow moderators to edit posts but I guess it is not in production: Admins should always be able to edit posts, even not their own, from what I can tell (it would be nice to have somewhere accessible a ref to version

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread guzba
Quick update re: HttpBeast. [Dom was able to help me determine the cause of the unexpected performance](https://github.com/dom96/httpbeast/issues/84#issuecomment-1335402276) and correct the benchmark. Now HttpBeast performs excellently in the benchmark as well!

Advent of Nim 2022

2022-12-02 Thread Zoom
> I feel like compared to last year, not many people are posting their Nim > solutions to the megathread. Maybe reasonable and forward-thinking people are just steadily leaving Reddit ;) Here's my repo for this year, although, I don't think I'll stick to updating it for long due to other commit

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread ducdetronquito
Ok I was far from it x) By the way, the link to the [API reference](https://nimdocs.com/guzba/mummy/mummy.html) in the README returns an HTTP 404

Advent of Nim 2022

2022-12-02 Thread firq
I'll post my solutions at

Advent of Nim 2022

2022-12-02 Thread pietroppeter
indeed, when I posted my solution yesterday I found only two other people. haven't yet the chance to post mine today... unfortunately also the website that was able to show you all solutions in megathread by language is not active anymore:

Advent of Nim 2022

2022-12-02 Thread MichalMarsalek
Hmm, I feel like compared to last year, not many people are posting their Nim solutions to the megathread.

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread guzba
> Where does the name come from? Mummy as in (hence the "ancient ways of threads" line). We'll be adding some kind of little graphic to the repo before long here.

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread guzba
Nothing bad, a Mummy server won't even notice. No worker thread ever waits on socket IO (neither reading or writing) and this is an important part of Mummy's design. The IO thread that uses epoll / etc will just slowly eat the bytes with essentially 0 load on the server in the same fundamental w

Nimsugest Goes out of control

2022-12-02 Thread archnim
Hello world. I use the Latest version of the Nim plugin for vscode (by Nimsaem). I work with nim V1.6.8 (Current stable release) Through choosenim. I use `htop` to follow the resource consumption on my computer. As soon as I open a Nim file in vs code, even an empy file, Nimsuggest begins to use

Nimsugest Goes out of control

2022-12-02 Thread doofenstein
Unfortunately that's known behaviour for nimsuggest (in fact it used to be worse). If you haven't already setting up a project file, do that. If that doesn't bring any improvement, I fear it's time to say adieu nimsuggest, it's not the most reliable tool in the world (the addon has an option to

Upcoming standard library changes

2022-12-02 Thread archnim
> No further changes are planned for the time being, it's time to release v2. Woah ! @Araq do you really mean that V2 will be released within few days ? 😃🥲

Advent of Nim 2022

2022-12-02 Thread miran
Since my second post here is "too old and can no longer be edited", here are our repos: * @al1ranger: * @auxym: * @bg: * @ElegantBeef:

Advent of Nim 2022

2022-12-02 Thread shirleyquirk
i think i saw PMunch use this hack last? year, today's problem looked like a nail for that particular hammer, so:

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread ducdetronquito
Wow looks incredibly cool, I will try it for sure during christmas holidays ! I don't know if you planned to, but it would be great if you do a video with Andre to explain your work :)

Upcoming standard library changes

2022-12-02 Thread giaco
Thanks for the info. Will we get hints/warnings during the transition period?

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread giaco
What happens if I open `maxThreads` slow http connections sending 1 byte every second down the tcp socket?

Show Nim: Mummy, a new HTTP + WebSocket server that returns to the ancient ways of threads

2022-12-02 Thread jasonfi
Looks like a good option. It would be interesting to benchmark lexim against Jester's URL parser, at least for this specific task.

Advent of Nim 2022

2022-12-02 Thread fxn
Solutions for day 2: Trying to be idiomatic: * All procs are `func` to indicate they are pure functions. * Usage of an enum for the shapes which results in type safety and much improved readability, because `Rock` obviously beta