Re: getch() vs Cyrillic on Windows.

2019-04-06 Thread Araq
A `char` cannot hold a cyrillic letter, that's what the runtime is trying to tell you.

Re: getch() vs Cyrillic on Windows.

2019-04-06 Thread Aiesha_Nazarothi
Yes, Araq. Neither can Windows' console (before Win10, at least), since it all ASCII. ...Except it works with cyrillic letter, of course.

Re: Is there a 2D game framework recently updated for Nim ?

2019-04-06 Thread SolitudeSF
> 1a. I find the lack of built-in hash tables in Nim a disadvantage. [https://nim-lang.org/docs/tables.html](https://nim-lang.org/docs/tables.html) eh? the docs for stable version are here [https://nim-lang.org/documentation.html](https://nim-lang.org/documentation.html) > 3\. Also the Nim's S

Re: Owned refs

2019-04-06 Thread Chris660
It looks like cone (which I stumbled upon just today) has some similar ideas when it comes to flexible memory management: [http://cone.jondgoodwin.com/memory.html](http://cone.jondgoodwin.com/memory.html) According to that the link above there are three types of allocator: * **own** \- single

Re: Is there a 2D game framework recently updated for Nim ?

2019-04-06 Thread Tomek
TL;DR: It's not that hard to develop custom framework for simple 2D games in Nim. Well, I'm new to Nim, and to game programming (and game frameworks / libraries), yet two weeks ago I had been working on some old game remake for a month. (Then I had to stop with this pet-project of mine, since I

Re: Nim vs V language

2019-04-06 Thread Tomek
> Lack of significant whitespace improves readability and maintainability of > large code bases (...) Unless somebody provides a good research on this topic, I dare to say, that it is total BS. BTW, many people complain about syntax with significant whitespace, and still use whitespace to inde

Re: Why Nim so inconsistent?

2019-04-06 Thread cdunn2001
Also note the command-line utility, `nimpretty`, which will not fix upper/lower case but will at least make your indentation consistent, similar to `gofmt`.

Re: Running Selector on device file in linux. How to get file descriptor (int fd) from file object?

2019-04-06 Thread cblake
You're welcome, and I'm very glad you didn't give up so quickly! FWIW, I was not sure it was a problem with that version of Nim -- only that when I changed the type environment enough to compile your code that it worked for me on a devel version. In the future, providing more whole code context

Re: Running Selector on device file in linux. How to get file descriptor (int fd) from file object?

2019-04-06 Thread mp035
So after reading "Nim in Action" I decided to have another go and managed to get everything to work. For anyone looking for an example of using selectors on a raw posix file, please take a look at my github respository for driving TEMPer USB thermometers from Nim (on linux). [https://github.com

Re: getch() vs Cyrillic on Windows.

2019-04-06 Thread Araq
`getch` returns a `char` and so it cannot work with Unicode. Surprise, surprise!

Re: getch() vs Cyrillic on Windows.

2019-04-06 Thread mratsim
I'm pretty sure unicode was broken in all kind of ways in 2004, terminal or not.

Re: getch() vs Cyrillic on Windows.

2019-04-06 Thread Aiesha_Nazarothi
> Hi! No need to get aggressive :-) Yes, sure. Except... * Except this is my second project using and second time I utterly regret touching it. * Except I use "obscure" languages my whole life (Forth, Boo, Rebol, CoffeeScript, PureBasic) and never yet had so much problems with simple tasks.