Some of Nim's convention needs to change in order for it to succeed

2023-07-22 Thread Mark_Howser
There's an awful lot to like about NIM. It has a few issues that would make experienced developers hesitant to adopt it. I will list them in order from most to least problematic, followed by a brief rationale for each: 1. Lack of block delimiters such as braces, or begin/end. 2. Object layou

Another Pythonish Compiled Language: Lobster

2023-07-22 Thread alexeypetrushin
> It not compiled it JIT It doesn't matter. Lobster performs full code analysis, statically. So it doesn't matter how exactly it run, as JIT or Compile-to-C. As in both cases, the infer and code analysis happens before. My point was about type infer. The argument Nim has against the type infer

converter not working unless I explicitly use it

2023-07-22 Thread morturo
I have a converter, from `proc(Request, string)` to `proc(Request)`, but the compiler refuses to accept it unless I explicitly call it. The code below works fine, but if I remove `.toRequestHandler()` it won't compile. What am I doing wrong? import mummy, mummy/routers pro

Wishlist: Ideal UI library for Nim

2023-07-22 Thread markus_gritsch
For Python I prefer Lona over NiceGUI:

Concepts in Nim v2

2023-07-22 Thread TKD
My misunderstanding! I fixed this now. It should indeed be 'Die' as the sample parameter.

Concepts in Nim v2

2023-07-22 Thread Calonger
You need use Die to make Die Distribution. You not define sample on Die , you define sample for Distribution , which infinite recursive ( define sample for type with sample defined )

Concepts in Nim v2

2023-07-22 Thread TKD
Yes, it is defining a distribution as something that can be sampled. In the old form of 'concepts', this would be an infinite recursion as has been explained to me already in some other thread but my understanding is that in this new, unfinished form of 'concepts', `procs` with a `Self` paramete

Another Pythonish Compiled Language: Lobster

2023-07-22 Thread Calonger
It not compiled it JIT ... Implementation > Choose between running directly using the convenient JIT, or compilation to > C++ for extra speed.

Concepts in Nim v2

2023-07-22 Thread TKD
Then, there is no need for the concept if I use 'Die'. See my reply to sls1005.

Concepts in Nim v2

2023-07-22 Thread Calonger
`` Die[float] = object `` mean what ?? Float is not generic parameter ! func sample(d: Distribution): float = rand(1..d.sides) This infinite recursive definition ! Distribution not concrete type ! Need use Die !

Another Pythonish Compiled Language: Lobster

2023-07-22 Thread alexeypetrushin
As far as I understand, one reason Nim doesn't have powerful type inference (like it can't infer backward) is compilation speed. Lobster has very powerful type inference and its compile time, almost instant, see [video about it](https://www.youtube.com/watch?v=uuPeBKdnBOI). When in Nim even for

Concepts in Nim v2

2023-07-22 Thread sls1005
It's like saying "`sample` takes a `Distribution`, which could be anything that can be given to `sample`."

Concepts in Nim v2

2023-07-22 Thread TKD
Is 'concepts' is being polished/refurbished as a major feature in v2 - I hope it is. I am assuming the code below is a known problem; compilation is slow and nothing is produced as output. This is on devel 1.9.5. type Distribution = concept proc sample(d: Self): float

Wishlist: Ideal UI library for Nim

2023-07-22 Thread domogled
Thanks. Nimqt is a very nice deck, but I didn't find them in