News for hackers. Stuff that matters.

kris-s

Re:Advent of Swift on Sunday December 14, 2025 @04:32PM (#46267166)
>The string processing is powerful, but inconvenient when you want to do things like indexing by offsets or ranges, due to Unicode semantics. (This is probably a good thing in general.)

This is being too generous to Swift's poorly designed String API. The author gets into it immediately after the quote with an Array<Character> workaround, regex issues, and later Substring pain. It's not a fatal flaw, a language backed by one of the richest companies in the world can have few fatal flaws, but AoC in particular shines a light on it.

I really like Swift as an application/games language but I think it unlikely it can ever escape that domain.

In absolute terms the number of people with deep knowledge here is probably higher than it’s ever been. The ratio has changed, which is what I think he’s actually lamenting here. He mentions civil engineering; one thing I find myself often bringing up is that software engineering is a brand new discipline. The operating domain of softare is immense, maybe infinite. So I’m less curmudgeonly than Jon is here, we’ve got a barely century or so of software experience as a species, there’s gonna be slop.
Re:Getting things done (in small increments) on Monday January 01, 2024 @08:32PM (#38837094)
If they are competing with each other such that neither are getting done are they really priorities?
I would not have been as kind to FF7 as this author was. By any modern measure it is a bad game. The raw story material and the character design is fantastic. But the gameplay. The gameplay is so tedious the author couldn’t even continue without modifying the game.
Re:Learning Jai via Advent of Code on Sunday December 03, 2023 @06:06PM (#38511716)
Seems like Jonathan Blow, the creator of Jai, releases a game every decade or so. I wonder if the plan is to release his next game in a couple of years. Presumably it is written in this new language? Maybe the compiler will be released at the same time under the guise of “hey this is so production ready we have already shipped a game with it.”
My mobile game https://smoldungeon.com doesn't make me any money. Was very fun to make though
Re:Rust concepts I wish I learned earlier on Wednesday January 18, 2023 @11:38AM (#34428999)
The author mentions the following:

    fn add(x: Option<i32>, y: Option<i32>) -> Option<i32> {
        if x.is_none() || y.is_none() {
            return None;
        }
        return Some(x.unwrap() + y.unwrap());
    }
    The above looks kind of clunky because of the none checks it needs to perform, and it also sucks that we have to extract values out of both options and construct a new option out of that. However, we can much better than this thanks to Option’s special properties! Here’s what we could do

    fn add(x: Option<i32>, y: Option<i32>) -> Option<i32> {
        x.zip(y).map(|(a, b)| a+b)
    }
Do folks really prefer the latter example? The first one is so clear to me and the second looks inscrutable.
Re:Promotion of alternative social platforms policy on Sunday December 18, 2022 @01:18PM (#34040648)
Is Elon Musk this century's Howard Hughes?
Re:Isometric Pixel Art on Thursday December 01, 2022 @09:53AM (#33816964)
I wrote a short guide for how I did some of the pixel art in Smol Dungeon. Hopefully I kept it approachable.

https://smoldungeon.com/pixel-art

I think that's how the Hey email service does it.
Re:Goal: Pass all 4259065 tests in sqllogictest in 1 week on Monday October 03, 2022 @02:49PM (#33071966)
What a cool project, I bet they learned a ton doing this.
Re:Speeding up this site by 50x (2014) on Friday June 24, 2022 @01:49PM (#31866524)
I run a few websites on a single Linode, they're quite snappy if you don't do too much. No fancy optimizations required, just keep it vanilla, you can make great websites with just modern HTML, JS, CSS: https://krisshamloo.com

I'm sure it's been posted to HN before, but I love this blog post about it: https://idlewords.com/talks/website_obesity.htm

Re:“Code” 2nd Edition on Friday June 10, 2022 @01:36PM (#31697135)
One of my all-time favorite works of non-fiction. Essential reading for software engineers.
Re:Pixel Art: Common Mistakes (2020) on Saturday June 04, 2022 @01:51PM (#31623249)
I don't know if I would agree that the final scene is more readable - especially the treasure chest. I can't deny it looks much nicer though! I spent a lot of time tweaking the sprites in my game for readability. I touch on it here [1] but maybe I should do a full tutorial with intermediate steps.

https://smoldungeon.com/design

Re:The death of the sit-up on Sunday May 29, 2022 @07:17PM (#31553821)
It's still around in some places, CrossFit gyms still include sit-ups and GHD sit-ups in their programming. But CrossFit and ill-thought movements go hand in hand.
Re:Deep learning is hitting a wall? on Wednesday March 09, 2022 @11:30PM (#30623232)
How many floppies to install Windows 9.93?
Re:Deep learning is hitting a wall? on Wednesday March 09, 2022 @11:17PM (#30623168)
Thanks! Yeah it struggles with periodic functions that are wide. For example it successfully crosses zero with sin(PIxN/5) and delivers reasonable results for sin(PIxN/3). For your specific example you would probably need to provide something like N=1 to N=50.
Re:Deep learning is hitting a wall? on Wednesday March 09, 2022 @10:18PM (#30622873)
how would you describe the pattern of the first one?
Re:Deep learning is hitting a wall? on Wednesday March 09, 2022 @10:08PM (#30622807)
I wrote a little hobbyist AI project [1] with no neural networks at all and was delighted with how good the results were. Definitely think the field is ready to start incorporating some different approaches.

[1] https://littlefish.fish

Feel free to play around with it.

Re:An unsolicited streaming app spec on Tuesday February 15, 2022 @03:48PM (#30352473)
These ideas extend well beyond the realm of streaming apps too - so much of the software I use day to day is shockingly bad. Far, far too much churn driven from ladder-climbing obsessed middle managers who want rewrites and redesigns and engagement to go up up up.
Oh thanks! I'll do that, I do not know anything about SEO.
I made a little dungeon crawler game that I needed to make to prove to myself I could actually ship a complete game, which has been a struggle for me.

https://smoldungeon.com

Re:Simple Dungeon Map Generation on Wednesday January 05, 2022 @03:52PM (#29814775)
He's the Rusty roguelike king, I worked through this awesome book when I was learning Rust.

https://bfnightly.bracketproductions.com

Re:Simple Dungeon Map Generation on Wednesday January 05, 2022 @02:45PM (#29813908)
That's an awesome article, I'll add a link to it.
Re:A system in which soft robots “evolve” to walk or climb on Saturday December 18, 2021 @03:51PM (#29608383)
Fabulous animations, I hope this means we're close to applying these genetic algorithm techniques to soft robots that we can actually build.
Re:Ludum Dare 49 (Game jam) on Friday October 01, 2021 @05:30PM (#28723592)
If you've never tried programming a game I would highly recommend it. There are many aspects that make a game a really interesting challenge: input, rendering, sound, and managing large global mutable state. Ludum Dare is a good excuse to dip your toes in.
This isn't true for me; I have a separate Apple ID for work. I was never explicitly told to use my personal one.

Older »