Recent submissions

Comment · 1 year ago
(author here)

It's exactly this - I do regret using "db" a bit now after reading all of the comments here, as it's taken away focus from the main point. But yes, the post had to fit on a single page, and I needed to pick something that most engineers would be familiar with.

Comment · 1 year ago
(author here)

This is actually closer to the way the first draft of this article was written. Unfortunately, some readability was lost to make it fit on a single page. 100% agree that a statement like this is harder to reason about and should be broken up into multiple statements or chained to be on multiple lines.

Comment · 1 year ago
Which book is being read in that screenshot? Looks interesting. I did a few searches based on the text and couldn't find it.
Comment · 2 years ago
I still have a Dell Latitude D820 kicking around at home with the same display specs. I threw in a 256gb SSD, 4GB of RAM, and might have upgraded the CPU (can't remember exactly). According to what I can find online, it retailed for $2290 USD ($3500 today adjusting for inflation). I'm assuming you are talking about the non-business line Dell had back then (Inspiron?) if it was inexpensive.

I'm always surprised by how circular technology can seem, even hardware. Obviously display technology has gotten a lot better over the years (IPS/OLED, lower power consumption, higher max brightness) but the fact that I'd be perfectly happy with a laptop with a 16:10 1920x1200 display today (almost 20 years later) is funny to me.

Comment · 3 years ago
Honestly - CLI apps that need to run on multiple platforms. I once built a version of https://github.com/lovebrew/lovebrew (back when it was written in Nim) using Cosmopolitan 2, and I got back a single binary that ran on all major operating systems.

This greatly reduces the time GitHub actions would need to run, as you just build and release for one OS. As others have mentioned, this does not really work for native GUI apps, that isn't supported by Cosmopolitan as far as I know. But for small CLI tools it works great!

Comment · 4 years ago
https://github.com/yglukhov/nimpy gives very, very solid access to the Python ecosystem from Nim - I've copied code from Python docs and have had it work with hardly any changes. Hopefully that's a good enough excuse to try Nim out for a personal project!
Comment · 4 years ago
This is a really fantastic resource for learning programming with Nim. I've started recommending it to folks that are newer to programming that want to try Nim out for various reasons. The only downside is that it is written by a non-native english speaker, so some of the phrasing feels awkward at times. Of course, that's a non issue for this kind of technical material, it's very understandable and useful! You can also view the source of this material here: https://github.com/StefanSalewski/NimProgrammingBook

For folks that are more experienced and learn by doing, the two resources I would recommend are https://nim-by-example.github.io/ and https://xmonader.github.io/nimdays/. The first is a solid overview of the basic language, while the second is a bunch of example projects. Other good resources if anyone is interested:

Nim in Action (book)

https://narimiran.github.io/nim-basics/

https://scripter.co/notes/nim

The official Nim tutorial: https://nim-lang.org/docs/tut1.html

Nim also had a devroom at FOSDEM this year! You can find it at https://fosdem.org/2022/schedule/track/nim_programming_langu....

My favorite talks were on Polymorph (a really fast compile time ECS), Pararules (a super cool implementation of a rules engine) and Nim Metaprogramming in the real world (very useful lesser known patterns for using Nim's capabilities in a variety of projects).

Comment · 4 years ago
Yeah, that must be a Safari thing. I pulled out my Nexus 5 (circa 2013) and everything feels instant. I don't have any working iOS devices lying around to test on unfortunately.
Comment · 4 years ago
Sorry for that (and thanks to all the folks that pointed out the word matching code was wrong). I've pushed an updated version, it's 63 lines now.

Turns out, HN finds and reports bugs much faster than family and friends :)

Comment · 4 years ago
Looks like they doubled the size by accident, in the network debugger the first is a 302 that resolves to the actual file. It shows 84kb twice because of that.
Comment · 4 years ago
Yep, I have the wrong meta tag I believe:

        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
That should fix it, I'll push a new version after fixing the word matching issue others have pointed out. I underestimated Wordle's complexity :)
Comment · 4 years ago
Yup, exactly. I've considered adding a bloom filter check for words but I've accomplished what I wanted to try out. Maybe if I'm ever interested in the future!

It'd be very easy to check against just a list of words, but that'd require more storage and be slower than a bloom filter.

Comment · 4 years ago
Oh wow, I never noticed that myself. I'll fix it once I'm at my computer, thanks for pointing it out! The fix will probably be something like

    if letter not in (.bg-warning in first .guess).innerText then add .bg-warning
Haven't tested as I'm on my phone, but seems like a simple enough fix.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton