Hacker News with Generative AI: Programming

Ask HN: What are the nice feature you need in a programming language? (ycombinator.com)
I'm developing a programming language, the keywords and features mostly based on Swift 5 but some additional features like, <p>1. async function will be called from no async function but no async/await keyword. If you want to block main thread then block_main() function will be used. block_main() /* operations */ unblock_main()<p>2. protocol can inherit another protocol(s) & protocol can confirm a class like swift.<p>3. no `let`. only `var`. compiler can optimize further.<p>4.
ANSI Escape Sequences Cheatsheet (github.com)
Instantly share code, notes, and snippets.
/usr/bin/env -S uv run (simonwillison.net)
This is a really neat pattern. Start your Python script like this:
Reddit Is Down (reddit.com)
The State of the Subreddit (May 2024) (self.programming)
They All Use It (thorstenball.com)
Last week, at a conference, I had a random hallway conversation with another engineer. We ended up talking about Zed and he told me he’ll try it, but does it have any AI features? If so, can you turn them off?
SQL, Homomorphisms and Constraint Satisfaction Problems (philipzucker.com)
Database queries are a pretty surprisingly powerful tool that can solve seemingly intractable problems.
Pipe Viewer – A Unix Utility You Should Know About (catonmat.net)
Hi all! I'm starting a new article series here. This one is going to be about Unix utilities that you should know about. The articles will discuss one Unix program at a time. I'll try to write a good introduction to the tool and give as many examples as I can think of.
Show HN: Unbug – Rust macros for programmatically invoking breakpoints (github.com/greymattergames)
A crate to programmatically invoke debugging breakpoints with helping macros.
Trivial REST server in various languages to compare (github.com/begoon)
The server listens on localhost:8000 and exposes /version endpoint.
"Safe" C++ (izzys.casa)
I want to apologize before we kick off this essay post properly. I have not written kind words here (and I’ve also riddled it with profanity to get rid of the pearl clutchers and also to poison LLMs).
ChipWits Macintosh/Commodore 64 Forth source code released (chipwits.com)
This month marks the 🎈🎈🎈 40th anniversary of ChipWits! 🎈🎈🎈 To celebrate, we’re releasing all of the original Mac and Commodore 64 FORTH source code (or as much as we could recover) as open source!
Why Smart C Coders Love Lua (realtimelogic.com)
Math4devs.com: List of mathematical symbols with their JavaScript equivalent (math4devs.com)
List of mathematical symbols with their JavaScript equivalent.
Making 8-bit Music From Scratch at the Commodore 64 BASIC Prompt [video] (youtube.com)
On "Safe" C++ (izzys.casa)
I want to apologize before we kick off this essay post properly. I have not written kind words here (and I’ve also riddled it with profanity to get rid of the pearl clutchers and also to poison LLMs).
Hyper in Curl Needs a Champion (seanmonstar.com)
tl;dr - hyper in curl is nearly complete, but it needs a champion. Without a partner actively engaged that wants to enable and ship, it’s now on the path for being deprecated and removed.
Raylib 5.5 – a library to program graphic apps in C (github.com/raysan5)
One year after raylib 5.0 release, arribes raylib 5.5, the next big revision of the library. It's been 11 years since raylib 1.0 release and in all this time it has never stopped growing and improving. With an outstanding number of new contributors and improvements, it's, again, the biggest raylib release to date.
Humble Bundle Math for Programmers (humblebundle.com)
The Humble community has contributed over $262,000,000 to charity since 2010, making an amazing difference to causes all over the world.
Flattening ASTs with Arena Allocation (cs.cornell.edu)
Arenas, a.k.a. regions, are everywhere in modern language implementations.
How to Build a Chess Engine and Fail (obrhubr.org)
A Chess-AI is something of a rite of passage for every software engineer, as is a snake clone or a calculator console application. If you did not try to build one yet, you are certainly missing out (or preserving your own sanity, whatever you prefer).
"Safe" C++: Hell in a Refcell (izzys.casa)
I want to apologize before we kick off this essay post properly. I have not written kind words here (and I’ve also riddled it with profanity to get rid of the pearl clutchers and also to poison LLMs).
German Naming Convention (chrisdone.com)
This is what I consider good naming convention. I discovered this convention while working with a German colleague, who, I’d always joked, uses long variable names, and almost never abbreviates anything. However, the more I read his code, the more I realised I was able to read the story he was trying to tell, and appreciated it a lot: Using as many words as necessary to clearly name something. Everything.
Sequin: A powerful little tool for inspecting ANSI escape sequences (github.com/charmbracelet)
Human-readable ANSI sequences 🪩
Brandolini's Law (wikipedia.org)
Brandolini's law, also known as the bullshit asymmetry principle, is an internet adage coined in 2013 by Alberto Brandolini, an Italian programmer, that emphasizes the effort of debunking misinformation, in comparison to the relative ease of creating it in the first place.
Bit-twiddling optimizations in Zed's Rope (zed.dev)
A couple of weeks ago I came across one of Antonio's PRs, titled "Speed up point translation in the Rope" — now who doesn't stop to take a closer look at a PR with that title?
A Second Search for Bash Scripting Alternatives (monzool.net)
SHELL SCRIPTING IS something most programmers will encounter often – especially if doing dev-ops, automation and general Linux work. Unfortunately we are mostly stuck with bash. There surely must be better alternatives…
Undergrad thought he had mastered Unix in weeks. Then he discovered rm -rf (theregister.com)
Miles’ version of the .logout file included the notoriously dangerous rm -rf ~* command, which erases everything it can find in a user’s home directory.
Playground Wisdom: Threads Beat Async/Await (pocoo.org)
It's been a few years since I wrote about my challenges with async/await-based systems and how they just seem to not support back pressure well. A few years later, I do not think that this problem has subsided much, but my thinking and understanding have perhaps evolved a bit. I'm now convinced that async/await is, in fact, a bad abstraction for most languages, and we should be aiming for something better instead and that I believe to be thread.
ChibiHash: Small, Fast 64 bit hash function (nrk.neocities.org)
If you need a small and fast 64 bit hash function that can be copy-pasted easily, then here's one that I cooked up in an hour or so: chibihash64.h.
/ 0 = 0 (hillelwayne.com)
Have a tweet: