3 ms·
On the last advent-of-code I thought, that I should give Lua a try. But geez, on windows I really had a rough start. First and foremost there is no easy guide
by zubspace 6y ago
On the last advent-of-code I thought, that I should give Lua a try. But geez, on windows I really had a rough start.
First and foremost there is no easy guide how to even get started. Do you need MSYS2? TDM-GCC? Should I use WSL? Are there any precombiled binaries? Is there an editor?
Then by sheer luck I found the ZeroBrane Editor [1] and was quite excited. Simple installation, everything included, autocomplete and debugging! Awesome.
The first thing I had to do was trimming a string. Oh Boy! [2] I mean really.. As a beginner, this completely wrecked me. I have a task to do, why should I worry about which Trim implementation is best?
Switched to Nim (which I had not used before either) and never looked back.
[1] https://studio.zerobrane.com/ https://studio.zerobrane.com/
[2] http://lua-users.org/wiki/StringTrim http://lua-users.org/wiki/StringTrim
- severak_cz 6y agoThat string trim problem is easily solved - just copy&paste one of these functions to your code.