home.social

#nimlang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #nimlang, aggregated by home.social.

  1. If had been around a bit earlier, it would have solved quite a few of my problems. It looks really nice!

  2. If #nimlang had been around a bit earlier, it would have solved quite a few of my problems. It looks really nice!

  3. I gotta say the nim language docs are rather pleasant :blobcatcoffee:

    Example nim-lang.org/docs/tut1.html

    But then the whole docs page has multiple interesting things to go through:

    nim-lang.org/documentation.html

    A nice experience on the site overall, clear, clean, simple

    Gotchas I've seen so far is that nimble.directory page linked in many places just gives a 502. And yesterday I saw the lsp crashing in gram. Also some editors try to use another lsp binary.

    #programming #nim #nimlang

  4. I gotta say the nim language docs are rather pleasant :blobcatcoffee:

    Example nim-lang.org/docs/tut1.html

    But then the whole docs page has multiple interesting things to go through:

    nim-lang.org/documentation.html

    A nice experience on the site overall, clear, clean, simple

    Gotchas I've seen so far is that nimble.directory page linked in many places just gives a 502. And yesterday I saw the lsp crashing in gram. Also some editors try to use another lsp binary.

    #programming #nim #nimlang

  5. Maybe one way to change the rules is to stop writing code that needs big hardware. The old options were C or C++ for speed and efficiency (which are difficult and dangerous) or Python, Ruby, NodeJS, Perl, PHP for quick and easy coding (but which are fat and slow). But we have better options now, better compromises... #RustLang, #NimLang, #GoLang, #CrystalLang ... the legacy languages have become the tools of the oppressor

  6. Maybe one way to change the rules is to stop writing code that needs big hardware. The old options were C or C++ for speed and efficiency (which are difficult and dangerous) or Python, Ruby, NodeJS, Perl, PHP for quick and easy coding (but which are fat and slow). But we have better options now, better compromises... #RustLang, #NimLang, #GoLang, #CrystalLang ... the legacy languages have become the tools of the oppressor

  7. Added a new learning sample to the #kirpi framework today. This shows that small-scale platformers don’t need heavy physics engines — the collision code is just 20 lines. Enjoy. 🍻

    github.com/erayzesen/kirpi?tab

    #madewithkirpi #gamedev #nim #nimlang #platformer #programming

  8. Added a new learning sample to the #kirpi framework today. This shows that small-scale platformers don’t need heavy physics engines — the collision code is just 20 lines. Enjoy. 🍻

    github.com/erayzesen/kirpi?tab

    #madewithkirpi #gamedev #nim #nimlang #platformer #programming

  9. Advent of Code 2025 - Day 08

    Okay, this one was tough.

    Tried a dozen data structures before settling on circuit IDs + HashTable.

    Accidentally mutated object fields while using them as hash table keys.

    Still have no idea why the puzzle counts already-connected junction boxes, had to look it up on reddit.

    Time to solve:

    Part 1: almost 2 hours
    Part 2: 4 minutes

    Runtime: 364 ms.

    Full solution at Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #nim #nimlang

  10. AoC 2025 - 07 bonus #2

    I'm blind, because I don't know how I didn't see this 50 minutes ago, but here's even smaller version that runs even faster. 13% faster (95 µs -> 86 µs)

    #adventofcode #adventofnim #nim #nimlang

  11. AoC 2025 - 07 bonus

    I've figured out a faster version of algorithm, that doesn't need a second array to add up splitted particles.

    It results in a whopping 22% performance increase! (116 µs -> 95 µs)

    #adventofcode #adventofnim #nim #nimlang

  12. Advent of Code 2025 - Day 07

    Another simple one today.

    The trick here is to keep count of how many particles are in each column, instead of tracking each beam/particle. Even a simple 1d array is enough.

    Runtime: 116 μs

    Full solutions at Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #nim #nimlang

  13. Advent of Code 2025 - Day 06

    I literally looked at part 2 for minutes trying to understand where the numbers come from and how they're related to the example input. I love #AdventOfReadingComprehension

    The next roadblock was the trailing whitespace, that I hate and remove from all my code with Neovim plugin. Here removing it was creating subtle bugs and took me time to find out what was the problem.

    Full solution at Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #nim #nimlang

  14. Advent of Code 2025 - Day 05

    Today we got another easy puzzle. Very straightforward and almost too short.

    #adventofcode #adventofnim #nim #nimlang #aoc #programming

  15. Advent of Code 2025 - Day 05

    Today we got another easy puzzle. Very straightforward and almost too short.

    Full solutions at Codeberg: codeberg.org/janAkali/aoc25-nim

    #adventofcode #adventofnim #nim #nimlang #aoc #programming

  16. Advent of Code 2025 - Day 04

    Today was so easy, that I decided to solve it twice, just for fun. First is a 2D traversal (see image). And then I did a node graph solution in a few minutes (in repo below).

    But it's a bit concerning, because every AoC fan knows that simple puzzle can only mean that tomorrow will be a nightmare 😬 . Good Luck Everyone, we will need it.

    Full solutions at Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #nim #nimlang #programming #aoc #puzzle

  17. Advent of Code 2025 - Day 03

    Part 3 was pretty straightforward, though I had a little trouble with the indexing.
    I expected that part 2 would need dynamic programming, but I just ended up changing a few numbers in part 1, to solve part 2.

    Final version runs in just 240 μs.

    Full solution at Codeberg: [solution.nim](codeberg.org/janAkali/aoc25-ni)

    #adventofcode #adventofnim #aoc #nim #nimlang #programming

  18. Advent of Code 2025 - Day 03

    Day 3 was pretty straightforward, though I had a little trouble with the indexing.
    I expected that part 2 would need dynamic programming, but I just ended up changing a few numbers in part 1, to solve part 2.

    Final version runs in just 240 μs.

    Full solution at Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #aoc #nim #nimlang #programming

  19. Advent of Code 2025 - Day 02

    Easy one today. I've solved Part 1 fast and without problems. Part 2 is pretty forgiving on performance, so regex bruteforce was only a couple seconds in #Nim . But I eventually cleaned it up and did a solution that runs in ~340 ms.

    Full solution is on Codeberg: codeberg.org/janAkali/aoc25-ni

    #adventofcode #adventofnim #aoc #programming #puzzle #nimlang

  20. Advent of Code 2025 - Day 01

    I've spent 40 minutes looking for off-by-one errors in part 2, gave up and rewrote the solution using bruteforce. Now I return to do it properly and turns out I didn't consider what happens when dial is zero.

    Fuck zero. The worst number.

    #adventofcode #adventofnim #nim #nimlang #fuckzero

  21. Wild take: We should make a team to rewrite #YaST from scratch in either #rustlang #ziglang or #nimlang

  22. Wild take: We should make a team to rewrite from scratch in either or