Parser Combinator Dynamic Dispatch, Object Variants and Inheritance

2022-09-05 Thread xigoi
In the example with variants, `Node(kind: op, leftOp: left.value[0], rightOp: right.value[0])], "")` is valid only if `op` is `nkAdd` or `nkSub`. However, Nim doesn't know if that's the case. You can solve it by using a `case` statement/expression: case op of nkAdd, nkSub:

Parser Combinator Dynamic Dispatch, Object Variants and Inheritance

2022-09-05 Thread xigoi
By the way, welcome to the happy world of Nim! It's nice to have you here. Parser combinators are a great choice for a starter project.

Parser Combinator Dynamic Dispatch, Object Variants and Inheritance

2022-09-05 Thread CircArgs
Hello Everyone, Nim Noob here. I am having a blast learning Nim and my effort to do so has centered around trying to port something similar to Python's Parsy to Nim. You can find my implementation here: Everything is functional, however I'm having some diff

Nim playground inaccessible

2022-09-05 Thread dlesnoff
Thank you for the reboot ! Sorry in advance for the salve of question coming next ;) Next time, may I mp/ping you directly on Discord server ? Does it happens often ? Is it worth to find an alternative solution ? Do you think Docker could be replaced by a more adapted container? Is it better to

NimConf 2022 - registrations

2022-09-05 Thread kobi
Maybe it's too big of an idea to do, but here is my suggestion: Show how easy it is to code in Nim, all kinds of usual, everyday tasks that a dev is likely to need. It may also expose where we fail.

Dr. Chaos released!

2022-09-05 Thread planetis
v0.1.5 of Dr. Chaos released! This update includes a performance boost for Nim devel, various bugs fixed and a new feature, overloaded `default` can be used. As well as two new examples, fuzzing a [matrix](https://github.com/status-im/nim-drchaos/blob/master/examples/fuzz_matrix.nim) and [HTML

effectively read buffered data until http body boundary?

2022-09-05 Thread bung
currently I use simple rude way, it will take o(m * n) time.

Custom header values inside multi-part form ?

2022-09-05 Thread void09
Alright so constructing the http body by hand is not possible if you want to post a file, cause big files will take some time to load in memory, and eat that memory. I managed to implement a dirty hack in httpclient to insert my headers when building it. MultipartEntry* = object

Unspecified generics in type fields

2022-09-05 Thread shirleyquirk
I disagree with your statement that > the type myObject compiles Sure, if it's not instantiated, code compiles, but > try to use it and you get one error or another. If anything, that's the > design decision, that types don't get fully checked until they're > instantiated.

Why Svelte is far superior than React (Karax)

2022-09-05 Thread alexeypetrushin
> What does svelte differently? Both React and Svelte are reactive. They differ how they provide reactivity. React does it by framework, and you had to adhere to some code patterns required by that framework. Svelte provides it by the language itself (compiler) so you don't have to write boiler

`Opt` support in nim-results

2022-09-05 Thread arnetheduck
`results.Result[T, E]` is a type for representing the outcome of some computation or an error - what `E` is depends on the desired granularity of error information: depending on requirements, it can be a simple type like an `enum` or a `string`, or a dynamic type like a `ref object` that gives i

Math library for renderers and GUIs

2022-09-05 Thread icedquinn
this has been a little idle while i read other things. looking to swing back around and get the unit tests done for the basic linear algebra code so at least that is done. it should be technically usable (but not simd optimized) at that point.

This Month with Nim: June and July 2022

2022-09-05 Thread miran
Here are some projects our community did in past months: If you want to include your project for the next month (it doesn't have to be a new project), follow the instructions [here](https://github.com/beef331/website/issues/new?ass

NimConf 2022 - registrations

2022-09-05 Thread Araq
Fine, I'll do it. I was still looking for a topic.

Why Svelte is far superior than React (Karax)

2022-09-05 Thread Araq
Karax is not React. And ideally the choice for the technology you use is not based on Internet memes. But hey, to each his own.

Why Svelte is far superior than React (Karax)

2022-09-05 Thread enthus1ast
What does svelte differently?

Custom header values inside multi-part form ?

2022-09-05 Thread enthus1ast
It seems that this is currently not possible with the current api. What you can do however is to construct the correct http body by hand. You should also open an incident on github.