Show newer

I'm increasingly thinking that my thesis for this year's AoC adventure is that Zig is a perfectly pleasant low-level language that's hamstrung by adopting C's memory management system

Zig day 4 was actually pretty pleasant. The core language is pretty solid, and they’ve figured out ways to make handling errors and optional returns way more ergonomic than a lot of languages while still forcing you to deal with them, which is really good.

One small annoyance is the relatively close adherence to C syntax makes all the deviations hard to remember and seem out of place. Counterintuitively, if the base syntax was more different I think it’d be easier to remember.

There are a few things in the language that are really nice so far, but a whole lot of things where the language just doesn't tell you you've done something wrong until a totally different part of your code explodes with a cryptic error message.

Show thread

Similarly, eventually I realized that a problem I was having was that my ArrayLists were being allocated on the stack. Okay, I can sort of see how that makes sense, even though you have to hand them an allocator. Not that the error messages helped.

Can you allocate an ArrayList on the heap via something like `new std.ArrayList(u32)(...)`? Of course not. As far as I can tell, the best you can do is

var ptr = try alloc.create(std.ArrayList(u32));
ptr.* = std.ArrayList(u32).init(alloc);

Show thread

Alright, it's day 3 of Advent of Code and I'm about to throw Zig out the window. Its basic behavior around pointers is stupendously underspecified and its compiler errors are terrible.

As an example, if you do `var a = &std.ArrayList(u32).init(al)`, what type would you expect a to have? If you said "pointer to ArrayList", wrong! It's a pointer to const ArrayList. Why is it const? I have no idea.

I don't want a lot for Christmas
There is just one thing I need
I don't care about the presents
Underneath the Christmas tree
I just want my breakfast yums
Ice box has my nice cold plums
Make my wish come true
Oh look there's a note here from you

this is such a good debugging story ("Rust std fs slower than Python!? No, it's hardware!”) xuanwo.io/2023/04-rust-std-fs-

I wrote up a blog post for how we’re taking advantage of TypeScript to make developing our APIs easier and less error-prone, check it out!

cord.com/blog/leveling-up-apis

In truth, it’s more complicated than that, since I also wrongly think that Bret Victor did the wat talk, so the thing I actually think is, “They put the wat guy on the OpenAI board?”

Show thread

I can’t remember the difference between Bret Victor and Bret Taylor, which leads to a lot of, “wait, they put the programming paradigms guy on the OpenAI board? I guess that makes some weird kind of sense.”

BRITISH TEA TRANSLATION GUIDE

"Cup of tea?" = A valued friend has arrived. Let's welcome them in.

"Spot of tea?" = A foreign guest has arrived. Hyper-English Mary Poppins mode activated.

"Pot of tea?" = The in-laws have arrived. I would very much like to impress them.

"...tea?" = I find this situation awkward. Let's do literally anything else.

"Cuppa?" = I don't know you. This is a veiled threat.

"Fancy a cuppa?" = You are smokin hot. Would you care for some intercourse?

"I'll make some tea." = There has been a death in the family or national tragedy.

Speaking of which, I need to pick a language to learn for Advent of Code this year!

Every year, I do all the problems in a language I've never used before. Last year was Crystal, the year before was Common Lisp.

Anyone have any favorites that I should consider?

This is my favorite time of the year. Diwali, Thanksgiving, Christmas, Advent of Code. The darkness hasn't yet become crushing, and the lights are still sparkly.

The @gbhnews podcast series on Boston's Big Dig finished today. Even if you think you know the story of the Big Dig, this podcast tells it in a level of detail I haven't seen before, with a focus on the human stories behind its construction. It's well worth a listen, especially if you're interested in how #infrastructure is built in the US.

wgbh.org/podcasts/the-big-dig
youtube.com/playlist?list=PLMQ

Parenting sometimes seems like sorcery. We got Ms. 4 a new winter coat, she picked it out herself, a nice pink one.

She’s refused to put it on for the past week.

This morning, after I made her put it on because it was cold, I said that she looked like a “big pink cutie”, and that incantation was enough to transmute it into a beloved object. She’ll wear it every day now.

Experiments aren't expressions of customer desire:

billjings.com/posts/title/expe

Not so technical, but... I have seen this opinion expressed a lot, and I think it's incredibly harmful.

It's in the nature of the work we do that we get to decide more about what our customers get to do than they do. But it's important not to lie to ourselves about when we are and aren't doing this.

Just walked past a house in a coastal Italian town with an “Obama ‘08” sticker on the door

My daughter: "Everyone's so amazed that every snowflake's different, but no one cares that every potato is different."

Show older
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!