HackerTrans
TopNewTrendsCommentsPastAskShowJobs

CodeBrad

no profile record

Submissions

Go's race detector has a mutex blind spot

doublefree.dev
2 points·by CodeBrad·12 miesięcy temu·0 comments

Advent of Code on the Nintendo DS

sailor.li
2 points·by CodeBrad·2 lata temu·0 comments

comments

CodeBrad
·9 miesięcy temu·discuss
This was one of my favorite talks from RustConf this year! The distinction between cancel safety and cancel correctness is really helpful.

Glad to see it converted to a blog post. Talks are great, but blogs are much easier to share and reference.
CodeBrad
·12 miesięcy temu·discuss
> which are optimized to be readable to humans and writable by AI

How might a language optimized for AI look different than a language optimized for humans?
CodeBrad
·12 miesięcy temu·discuss
I may be biased, as I definitely love more than 50% of Rust, but Go also does not protect against logical races, deadlocks, etc.

I have heard positive things about the loom crate[1] for detecting races in general, but I have not used it much myself.

But in general I agree, writing correct (and readable) concurrent and/or parallel programs is hard. No language has "solved" the problem completely.

[1]: https://crates.io/crates/loom
CodeBrad
·12 miesięcy temu·discuss
I think Claude Code also already has the option to provide an API key directly for usage based pricing.

I'm a fan of having both a subscription and a usage based plan available. The subscription is effectively a built in spending limit. If I regularly hit it and need more value, I can switch to an API key for unlimited usage.

The downside is you are potentially paying for something you don't use, but that is the same for all subscription services.
CodeBrad
·2 lata temu·discuss
It is! Although they are being used in a really weird and not normal way here.

I found "The Little Book of Rust Macros"[1] to be a really good resource for getting started with Rust's declarative macros.

[1]: https://veykril.github.io/tlborm/
CodeBrad
·2 lata temu·discuss
Technically, because the bubble sort is implemented at compile time the program is infinitely faster.

The answer is produced as a compiler error and so there is zero runtime at all.
CodeBrad
·2 lata temu·discuss
Hey! I wrote this. The python being barely legible is my own fault, as the one who wrote it.

The whole post is written to be a little ridiculous, but I must not have gotten that across =(

I agree with you. In real life, python is absolutely a better choice than trying to write a Rust macro to produce the result as a compiler error.

I added a footnote to the end of the referenced paragraph to say that python is great.