HNHacker News
TopNewBestAskShowJobs

birdfood

174 karma · joined June 2, 2022

submissionscomments
birdfood··on Advent of Code 2022 is nigh
I felt similar last year. I was trying to do them in Zig and Rust, and it felt like most of the challenge was just writing custom data parsers for poorly formatted data which felt too much like my day job.
birdfood··on I enjoy using the Nim programming language at Reddit
Haven't tried it really only due to a lack of time (and I've played with too many languages in the past 12 months)
birdfood··on Twitter to employees: all office buildings closed, badge access suspended
If twitter were to cease operation today, what is the maximum amount of money Elon can personally recuperate?
birdfood··on I enjoy using the Nim programming language at Reddit
It's cool to read that treeform is using Nim at reddit (and helps explain why he's so prolific!). I see the same question sometimes asked "what is Nim's killer feature", "what is Nim better at than other languages" and the answer given is usually "there is no killer feature, Nim is great at lots of stuff!". But I would argue Nim's killer feature is pragmatism. I think it's the most pragmatic language I've come across.

I love that I feel like I'm writing a cross between a dynamic scripting language and a functional language, but that nothing is off limits. I can still dive into memory management if I want to, yet I'm not forced to deal with a cliff of complexity up front. I'd be happy to choose Nim for command line tools, server code, or games and I can't think of another language where this is the case for me.

I've started writing some small internal tools in Nim for work. The language is approachable for other devs who "aren't into languages" to pick up if needed, but I can also share binaries with them so they can just use the tools without needing to set up an env.

birdfood··on Ask HN: What's the best “higher level Rust” these days?
Bit left field, but I think Haxe is a good "higher level rust".

* It's garbage collected

* Has algebraic types (enums similar to rust's)

* Pattern matching as good as rust's

* Null check strictness can be configured with the compiler

* Package manager

It's somewhat OOP geared though.

birdfood··on Zig is becoming more production-worthy
The end result doesn't look anything like C! Really nice.

Nim almost feels like I'm writing a dynamic scripting language, except that I've worked with a typed python code base and it sucked because typing always felt taped on. With generics in Nim I feel like I'm duck typing, but my ducks are compile time checked!

I'm keen on experimenting with protocol oriented programming and as far as I understand, UFCS provides this really neatly to the language. I really like the idea of being able to define my own types and have them seamlessly work with functionality of other libs (and vice-versa) without needing to resort to a language feature like traits.

birdfood··on Microrobots can brush and floss teeth in a proof-of-concept study
I'm looking forward to the day when we have bio-engineered slugs that feed off the left over food in our mouths while we sleep. If their trails can strengthen enamel all the better!
birdfood··on Zig is becoming more production-worthy
I've been diving into Nim in my free time after experimenting with Zig and Rust. I really appreciate how clearly I can layout business logic in code without needing to qualify what the compiler should do (my biggest issue with rust is all the stuff you need to do to satisfy the borrow checker I feel obfuscates your intention).

Getting to use Nim for your day job sounds like a dream! I'm particularly keen on Nim's UFCS

birdfood··on The Composition over Inheritance Principle (2020)
This was a good, concise explainer. Thanks!

I've worked on a python code base that used a lot of deep, multiple inheritance (using mixins) and it was a nightmare to add or change behaviour, so I know the pain.

I think the design patterns book that I've got the most out of is Game Programming Patterns by Robert Nystrom. While putting all your eggs in one ethos is seems to be in vogue, reading this book was refreshingly _balanced_, highly recommend.

https://gameprogrammingpatterns.com

birdfood··on Why software engineers like woodworking
I make my own surfboards for similar reasons. I tend to only code in my free time if I can't surf, or work on my next board (night time or no surf). Not sure how wood working it toddler friendly though?
birdfood··on Tell HN: I used the same computer since 2007 (with minor upgrades)
I did a size comparison of the 13 mini when I was last in an apple store, and it was like 10mm bigger all around. A small phone by comparison but I like the SE better
birdfood··on Tell HN: I used the same computer since 2007 (with minor upgrades)
My personal machine is the first and only new computer I ever bought: a 2012 Mac book air. I wanted to get a pro but couldn't justify the price. I took it in to get the battery replaced a couple of years ago instead of upgrading, again, I couldn't justify the price. I think I'll probably get the battery replaced again soon as it's started to falter. For the stuff I do in my spare time this machine is totally adequate. I also have the original iPhone SE as my phone which I will probably get refurbished soon instead of getting a new one - all the new phones are too big.

I have a machine given (lent) to me by work though.

birdfood··on Rust Is Hard, Or: The Misery of Mainstream Programming
Good summary, I haven't touched threads but I'd agree with everything else. I'd also add that since the language feels dynamic, I feel like my code is less structured, but I think this might just be because all the boilerplate you have to write in other languages isn't there. So maybe my code is just as unstructured and with nim I can't be fooled by boilerplate into thinking it is.

I've been following the nature of code and making a little 2d platformer at the same time using nim + raylib. Compiling to wasm I found to be even simpler than when doing the same thing with C++. It's really nice being able to compile to native or wasm with a single compiler flag.

birdfood··on Rust Is Hard, Or: The Misery of Mainstream Programming
I've bounced around a few languages this year, looking for a language to use in my spare time for fun / enjoyment / skills growth (I have a similar set of criteria to you). I've looked at rust, swift, haxe, zig, and now nim, and I think I'll be sticking with nim. I like that it's seemingly simple, and takes care of memory management for you, but you still have access to pointers if you want them and can extend the language with its macros. It seems like a language that I'll be able to grow with / pick up complexity as I want it, but by default I'll have concise readable code. What was your take on nim?
← PreviousPage 2 of 2