parseint not defined for char.

2022-03-28 Thread Araq
Nah, read Sedgewick first. ;-) > But I still don't know what static type I should use to replace strings > (pre-defined arrays of characters ?). type Filename = distinct string Displayname = distinct string Option = enum ... Options = set[Option]

Did nimc become faster?

2022-03-28 Thread Yardanico
I haven't followed new commits in the Nim repo lately, but I think I haven't seen any PRs that result in big changes to compile times except maybe which might help you a lot if you have macros-heavy code.

parseint not defined for char.

2022-03-28 Thread cagyul
Thank you for your comments. I have just read Harper and it helps in understanding the theoretical side of the matter. But I still don't know what static type I should use to replace strings (pre-defined arrays of characters ?). I have Sedwick (Pascal examples) and will re-consult it but only af

How to do runtime constant in forward ?

2022-03-28 Thread Yardanico
If you want to change the variable after the definition, it has to be `var`: var n: int proc m: int = result = 1 n = m() Run

How to do runtime constant in forward ?

2022-03-28 Thread mardiyah
How do we do runtime constant in forward definition/declaration by any way around (tried hard not work on using let) n :int proc m : int = let i=1 i n=m() Run error for this or for other varied ones, Error: 'let' symbol requires an

Tetronimia: a version of *that* game for your terminal

2022-03-28 Thread tmsa04
Although it generally works my terminal goes peculiar after it finishes and I have to close that tab.

Newbie questions about Nim, Python, XCB

2022-03-28 Thread ynfle
You could also run nim and call python with nimpy

Did nimc become faster?

2022-03-28 Thread Hlaaftana
Your stable branch Nim compiler binaries may only be compiled with `-d:release` while devel compiler might be compiled with `-d:danger`/`--gc:orc` etc. Beyond that I don't know what change could have caused a performance increase, though I feel like I may have come across it recently trying out

Did nimc become faster?

2022-03-28 Thread Arrrrrx2
Devel branch user here. I noticed that the compilation process became noticeable faster. In some tests this has become x2 as fast. Have programmed much in nim since december tho. Is my impression wrong?

Newbie questions about Nim, Python, XCB

2022-03-28 Thread miran
> any advice on how to optimize Vim for Nim development would be also > appreciated. Switch to Neovim and use [this plugin](https://github.com/alaviss/nim.nvim).

Newbie questions about Nim, Python, XCB

2022-03-28 Thread auxym
With regards to GUI libraries: my understanding is the gintro, the GTK wrapper, is pretty mature. On the less mature side, but probably still functional, there is wxnim, nimqml and nimx. If you want to call nim code from python, consider using genny:

Tetronimia: a version of *that* game for your terminal

2022-03-28 Thread Zoom
Tetronimia is now available to users of Arch and its derivative GNU/Linux distros through aur: (you can vote there ;) ) Thanks to our community chat on IRC/Matrix/Discord for figuring out the proper way to make the `PKGBUILD` for the package.

my TUI designer.

2022-03-28 Thread JPLRouge
There was no TUI like Tvision or Delphi, ncurse is fine, it doesn't offer a designer, but it doesn't save windows, it's not all written in nim. I wanted it to be UTF8, describe the masks, generate the structured code, save the masks to resume if needed. work in a terminal, or in a program compil

Newbie questions about Nim, Python, XCB

2022-03-28 Thread noxnivi
Good day, I recently hit Nim, by accident, to be honest. I was thinking about using Rust, but found the syntax way too complex for my free time to be enough to understand it in a reasonable period of time. Don't know exactly how Nim came out on a search, so I started to read about it (while doc

parseint not defined for char.

2022-03-28 Thread cblake
> you don't start learning to read with the Bible I don't really disagree, but would add that I think this phrasing speaks to the modern age of perfectly tailored educational content which has us all somewhat spoiled, culminating in "programming by StackOverflow copy-paste". Specifically, the G

dynamic shared libs

2022-03-28 Thread Hlaaftana
There is [std/dynlib](https://nim-lang.org/docs/dynlib.html) but it doesn't seem to have a way of listing all symbols in a library.

dynamic shared libs

2022-03-28 Thread FabienPRI
Hi, It is 3 times I wrote a nim web server with basic functions: * render pages, load the static part in a file, then replace some variables with dynamic content * trigger some function that the user asks when clicking some buttons on the web page or submitting form I'd like to do the we

parseint not defined for char.

2022-03-28 Thread cagyul
"As your programs grow bigger, avoid the string datatype. string indicates a lack of structure, it's effectively dynamically typed code. Use the static type system to the best of your abilities." Another example of a simple sentence that, as an amateur (beginner) programmer will have me scratch

parseint not defined for char.

2022-03-28 Thread Araq
> Also, Java. I have some of the earlier editions where the code examples are in Pascal. :-)

parseint not defined for char.

2022-03-28 Thread Zoom
> Let me give you some advice about how to learn programming: > > 1. Read books about algorithms. I can recommend anything written by > Sedgewick. > Wow, you have high standards. Sedwick's "Algorithms" is an important and required book for anyone doing programming, but I wouldn't suggest it

parseint not defined for char.

2022-03-28 Thread Araq
> All great points (although I'm not entirely sure what you have against PEGs), For beginners PEGs are much like regexes: 1. "Language in a language" problem: The syntax is not like Nim's and you would be learning two languages at the same time. 2. Either not powerful enough to do any real p

parseint not defined for char.

2022-03-28 Thread Stefan_Salewski
> Again if nim is not meant for beginners please advertise as such and not let > poor fools Have you already asked Google about a Nim beginner book, and maybe considered reading it? There is a section about "Integer to string conversion" which explains a lot. It is not parseInt(), but the oppos

parseint not defined for char.

2022-03-28 Thread PMunch
All great points (although I'm not entirely sure what you have against PEGs), but even as an experienced programmer both in Nim and other languages I do sometimes want to just have the fish handed to me. Having a `parseInt` overload for char which just does the `ord` trick Yardanico showed (mayb

parseint not defined for char.

2022-03-28 Thread Araq
Let me give you some advice about how to learn programming: 1. Read books about algorithms. I can recommend anything written by Sedgewick. 2. Program "find substring" in the language you want to learn. Don't avoid this exercise because the language's library already offers it -- the point is

parseint not defined for char.

2022-03-28 Thread enthus1ast
Imho it does not hurt to add it either