(This is a copy of a [Reddit thread I posted 
yesterday](https://www.reddit.com/r/nim/comments/73dssr/advent_of_nim/))

* * *

I'm a complete beginner in Nim, and I've been trying to learn the basics by 
solving [Advent of Code](http://adventofcode.com/2016) tasks.

I have previous Python experience and [my Python 
solutions](https://github.com/narimiran/advent_of_code_2016) for AoC were my 
guidelines for solving these tasks.

The things I like in Nim:

  * speed (most of the time, at least one order of magnitude faster than Python)
  * "user-friendly" syntax (it was easy to translate some Python parts to Nim)
  * helpful [tutorial](https://nim-lang.org/docs/tut1.html)
  * helpful community at IRC channel (if you guys are reading this - thank you 
for all your answers to my (sometimes quite stupid/basic) questions)



* * *

[My Nim solutions](https://github.com/narimiran/advent_of_nim_2016)

The thing I noticed - in tasks [Day 
07](https://github.com/narimiran/advent_of_nim_2016/blob/master/day07.nim) and 
[Day 
09](https://github.com/narimiran/advent_of_nim_2016/blob/master/day09.nim), 
where I use nre module, the speedup compared to Python is much smaller than 
usual. Is this the expected behaviour? Or can I do something to improve Nim 
speed there?

But the main reason why I'm posting this (after only 10 tasks) is because I 
would really like, before I continue with these tasks, if somebody more 
experienced would take some time to go through my solutions and to 
correct/improve my Nim.

If something can be done more idiomatically, if I should use different data 
types, if I didn't use some useful module/function, if there's a better and/or 
faster way to do some things - please let me know.

Thank you in advance! 

Reply via email to