HNHacker News
TopNewBestAskShowJobs

burntsushi

15,550 karma · joined August 18, 2012

https://github.com/BurntSushi

https://burntsushi.net

[ my public key: https://keybase.io/burntsushi; my proof: https://keybase.io/burntsushi/sigs/F85E7EUozUtRvdv1a8NpNW8HBSSJ4cK9bhTgqDAslZA ]

submissionscomments
burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
That is an interesting take that I hadn't thought of. Thank you for that perspective.

I actually haven't been able to get the ED notes from that first ER visit yet. They are in a different system than Brigham and Women's, which made it super easy to read notes in their app.

burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
Honestly I think just a heap of patience while I catch up with a couple months of doing essentially zero work. That would be the best.
burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
I'm very lucky to have had that connection. I didn't even know I had it until it was there. So I'm lucky on another level there too.

I was put on a low dose of an anti-psychotic. I am in fact still on it. We just haven't gotten to tapering off of it yet. (Other medications have taken higher priority.) Tapering off all of my medications, which is the goal, will take quite some time.

In the moment, I very much welcomed the anti-psychotic. I would do anything to fix what was wrong with me. The problem is that the front-line treatment for anti-NMDA receptor encephalitis (IVIG and steroids) takes a minute to kick in. Moreover, you don't have the diagnosis until later. There was a point in time, before the positive CSF antibody test but after the abnormal MRIs, where multiple sclerosis was a possible diagnosis.

In any case, once I got out of the psychiatric hospital and into Brigham and Women's, an MRI is indeed what I had right away. And that's when the brain lesion was found. But! Not all cases of anti-NMDA receptor encephalitis have an abnormal MRI. Susannah Cahalan, for example, had two normal MRIs. Brain inflammation was only detected indirectly at first because of the "clock test"[1]. And they later did a biopsy on her brain to confirm.

In retrospect, yes. I think I could have done a better job of advocating for myself on my first ER visit and demanded to see a neurologist. But I didn't know what I didn't know, unfortunately.

[1]: https://www.encephalitis.info/news/brain-on-fire-susannahs-r...

burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
Ooof, really sorry to hear that. I'm glad she ultimately got the treatment she needed.

In my case, the misdiagnosis up front was entirely reasonable. (EDIT: Well, maybe not. See below.) The generalized anxiety disorder diagnosis from my PCP made a lot of sense given what was happening. I hadn't had delusions yet at that point. It was... a mixture of panic attacks, night sweats, jaw pain and a greatly increased level of anxiety compared to my baseline.

My PCP did run a bevy of tests (chest x-ray, and took tons of blood) to try and rule out anything biological.

Given what was known at the time, I think my PCP did the right thing. And when my symptoms really escalated (delusions, suicidal ideation, falling and hitting my head), my PCP suggested going to an ER. And that's what we did.

I think it was the ER that really dropped the ball. Given the sudden onset of everything, the fact that they didn't get me in front of a neurologist is, in retrospect, really quite baffling. That's when I went to a psychiatric hospital, where I spent 3 nights.

I only got out of that hospital due to total luck. My neighbor was old college buddies with a neurosurgeon. (We had no idea about it. It just came up randomly when my neighbor was dropping my son off at home for us.) That was the critical connection because he ended up talking to the neurology department at Brigham and Women's, then talked to the psychiatric hospital and was the one who facilitated my transfer.

My wife tried to do it on her own but they wouldn't allow it because I had been medically cleared. She had to give 3 days notice to pull me out. Or otherwise, by default, I would see a neurologist after 2 weeks. According to the psychiatric facility.

I really don't know if I would have made it that long. The encephalitis wouldn't have killed me in that span of time, but I was in an extremely dark place.

I'm also really lucky that this is an autoimmune disorder that has a pretty objective diagnostic criteria: a positive antibody test in your cerebral spinal fluid. You "just: need to have your spine tapped to get that though. Fun times.

burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
There is actually haha. I've always hated sushi. And sushi is now on my shortlist to try again. I can't wait.

(My handle comes from graffiti I found on the booth of a hot dog stand in Worcester MA called Coney Island[1]. I thought it was a cute oxymoron and adopted it on a silly whim. I only later learned that some sushi is indeed cooked.)

[1]: https://coneyislandlunch.com/

burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
Thank you. <3

There were lots of reasons that went into me posting this.

First and foremost is that this is a disease of chaos that is prone to misdiagnosis. I want to shout this from the roof tops to spread awareness. I don't have a ton of reach, but I have some, and I want to use it to amplify things like this.

Second is that I'm somewhat naturally open about these sorts of things.

Third is I feel a responsibility to my projects and users.

Fourthly is that it's just practically useful to have a link to send to someone when I reference this time period in my life. :-)

> very new diagnosis

Yes! Discovered in 2007. Wild.

> so if you are reading this burntsushi, thanks for being open about something deeply personal, I hope I would have had the courage to do so myself.

<3 <3 <3

burntsushi··on I was recently diagnosed with anti-NMDA receptor encephalitis
Thank you. <3

It's been a trip. The worst thing that has happened, but also the best. It has definitely given me a new perspective on life, that's for sure.

My favorite side effect is that I now love all foods. Prior to this, I was a rather picky eater. Now I love everything!

burntsushi··on Domain expertise has always been the real moat
I have been thinking about this sort of progression too. One thing I wonder about is network effects. Are they even important? Now, for sure. Will they be so in a year? I don't know. I'm thinking about tooling centralizing on common primitives. Like, for my own situation, does it matter that everyone is using the same libraries?

If AI becomes the interface, then we will a layer of abstraction above programming languages themselves. Which is kind of wild.

(I don't pretend this is a novel idea. I'm just not that plugged into AI discourse.)

burntsushi··on Bttf is a command line datetime Swiss army knife
That's a complaint against how time zones are themselves named and organized. See https://ftp.iana.org/tz/tzdb-2022b/theory.html for all the gory details.

Using +4 or +5 explicitly instead of a time zone when DST is relevant is bad juju. Then your arithmetic can become silently wrong in subtle ways when it cross a DST boundary.

burntsushi··on Announcing Rust 1.96
(I am on the Rust libs-api team. I say "we" below, but I didn't do any of the amazing new range type work.)

> Why replace the already existing std::range in-place with the new version

We didn't. `std::range` is new. The existing range types have always been in `std::ops`. They have to stay there because we don't have a way of resolving paths in an edition dependent way.

See: https://rust-lang.github.io/rfcs/3550-new-range.html#new-pat...

> The other day there was some talking about Go's stdlib around here, and I truly believe they got it much better thought out.

I used Go for over a decade and loved every minute of it.

As someone with significant API design experience in both Go and Rust, Go has it way easier. I don't want to go into a big long diatribe about it, but the space in which Rust operates means that getting APIs correct in a way that lasts forever is harder. To a first approximation, this is a result of project goals (hand wavy: being able to write code while thinking about "what I want the CPU to do") and expressive power provided by the language.

Go added generics after I mostly stopped using it, but even with that, there are considerable differences in expressive power that translate directly into more complex APIs.

Plus, Rust started with Cargo. Go didn't get "proper" package management until much later. The promise (and one that it has fulfilled ten-fold) was precisely that Rust's standard library could be "small" and gaps could be filled by ecosystem crates that can use semver incompatible changes to evolve when necessary.

(My intent is for the above to be mostly descriptive. I'm not trying to cast shade on Go here. The Rust and Go projects have different goals that they optimize for. To be prescriptive: Go does an excellent job of optimizing for their goals IMO. And also, IMO, to be frank, I would consider this a feature of Go that it has over Rust. Having batteries in std is great. I'd love to have more. It's just fucking hard in the Rust world. That's not to minimize and say Go has it easy... But, well, okay. I'll stop hedging here. Lol.)

burntsushi··on Bttf is a command line datetime Swiss army knife
Quite plausible. I built most of it in May 2025 (1 year ago) before I even looked at LLMs for coding, and announced it in Oct 2025[1]. I started it principally as a mechanism to dog-food Jiff[2]. Jiff has not been obsoleted by LLMs and is exactly the sort of thing an LLM would add as a dependency to a Rust project. This ended up being an extremely useful exercise because it did lead to some Jiff improvements.

Fun fact: ripgrep started as something to dog-food the regex crate (with a focus on performance). I didn't originally build it to release to end users funnily enough. To be clear, I'm not implying bttf will follow the same path. I honestly probably agree with you at this point. I wouldn't have 1 year ago though.

[1]: https://news.ycombinator.com/item?id=45608547

[2]: https://github.com/BurntSushi/jiff

burntsushi··on Bttf is a command line datetime Swiss army knife
Maybe. But it's longer and already taken on crates.io.
burntsushi··on Bttf is a command line datetime Swiss army knife
Oh neat! TIL about `git last-modified`. That looks like a fun one to explore. Thank you.
burntsushi··on Bttf is a command line datetime Swiss army knife
Yeah totally right. I just don't know enough about git to figure it out. But a sibling commenter helped a lot.

And yeah perf probably doesn't matter much. But, like, running my approach on the Rust compile repo takes at least minute on my beefly (if a little dated) machine. But lukasgelbmann's approach only takes about 11 seconds. That's a big improvement.

Yeah though, perf here may not matter much. It's just an example use of bttf that is less than instant. (And it's not really bttf. It's my examples access pattern of git.)

burntsushi··on Bttf is a command line datetime Swiss army knife
Oh interesting! That is indeed quite a bit faster.

I'll have to noodle on this one. `bttf tag exec` works with arbitrary commands that can print any kind of date. But your approach require a different access pattern. I can either specialize the use case in bttf (blech) or I can figure out how to generalize your approach.

I think the key issue here is probably that it isn't line oriented. bttf composes well, but only when you have a one-to-one relationship between date and data. (Or a many-to-one is also supported, but it's many dates to one datum, not one date to many datums.) So maybe that relational model is worth figuring out how to streamline. Then I think this use case would work better.

Also, thank you! This is exactly the kind of reply I was hoping for! :D

burntsushi··on Bttf is a command line datetime Swiss army knife
ripgrep is a required dependency of codex when installing it via brew on macOS. So you should at least not see it if you fall into that scenario. :-)
burntsushi··on Bttf is a command line datetime Swiss army knife
I did. I always do. I just missed this one. Or if I saw it, it didn't register for me and felt like it was just an old archaic tool. Which... is probably still true, but I under-estimated its mindshare. Just an honest unknown unknown.
burntsushi··on Bttf is a command line datetime Swiss army knife
My decisions about naming aren't limited or prescribed by what is in a standard or not. :-)
burntsushi··on Bttf is a command line datetime Swiss army knife
I've renamed the project to bttf :-)
burntsushi··on Bttf is a command line datetime Swiss army knife
Oh yes definitely. Was always the plan. I was honestly just hoping someone would publish a crate to do that for me.

To be clear, I don't mean publishing a crate to read an environment variable. Of course. I mean a crate that converts a POSIX locale into a Unicode locale.

I guess there's probably a 20% solution that gets 80% of the way there. e.g.,

    $ BTTF_LOCALE="$(echo $LANG | sed 's/_/-/' | sed 's/\..*//')" bttf
    Thu, May 28, 2026, 11:46:21 AM EDT
If Biff just did that as a stop-gap until the full solution lands, I bet it would work in lots of cases.
burntsushi··on Bttf is a command line datetime Swiss army knife
Back to the Future jokes never get old. I love it.

I still want one of those hover boards!

burntsushi··on Bttf is a command line datetime Swiss army knife
@dang - Could you update the post title please to say "bttf" instead of "Biff"? Thank you!
burntsushi··on Bttf is a command line datetime Swiss army knife
You win the naming contest. The project has been renamed: https://github.com/BurntSushi/bttf/pull/14
burntsushi··on Bttf is a command line datetime Swiss army knife
Yeah this was before my time. I never did email from a terminal. Which probably explains why I was okay with naming it Biff.

In any case, I've renamed the project to bttf: https://github.com/BurntSushi/bttf/pull/14

burntsushi··on Bttf is a command line datetime Swiss army knife
Yes!!! To spell it out (with the new biff -> bttf name):

    $ bttf time seq monthly -w 2-tue -u 1y | bttf time fmt -f '%c'
    Tue, Jun 9, 2026, 11:15:11 AM EDT
    Tue, Jul 14, 2026, 11:15:11 AM EDT
    Tue, Aug 11, 2026, 11:15:11 AM EDT
    Tue, Sep 8, 2026, 11:15:11 AM EDT
    Tue, Oct 13, 2026, 11:15:11 AM EDT
    Tue, Nov 10, 2026, 11:15:11 AM EST
    Tue, Dec 8, 2026, 11:15:11 AM EST
    Tue, Jan 12, 2027, 11:15:11 AM EST
    Tue, Feb 9, 2027, 11:15:11 AM EST
    Tue, Mar 9, 2027, 11:15:11 AM EST
    Tue, Apr 13, 2027, 11:15:11 AM EDT
    Tue, May 11, 2027, 11:15:11 AM EDT
More examples here: https://github.com/BurntSushi/biff/blob/master/GUIDE.md#date...

Implementing the RFC 5545 recurrence rules was quite a lot of fun: https://github.com/BurntSushi/biff/blob/4c75d5cf6e09310e74ca...

I'm quite proud of it, because if you look at the implementation, it's almost entirely about dealing with the specification rules. All of the datetime bullshit (including handling time zones) is all deferred to Jiff.

Plus, the tests are nearly 4,000 lines. While the implementation is 2,000 lines.

burntsushi··on Bttf is a command line datetime Swiss army knife
Oh nice thank you!
burntsushi··on Bttf is a command line datetime Swiss army knife
I like this
burntsushi··on Bttf is a command line datetime Swiss army knife
I honestly don't know. Which is... Not Great.
burntsushi··on Bttf is a command line datetime Swiss army knife
That's... not terrible. Biff isn't exactly popular (yet?), so a name change isn't out of the question. Both of those names (and `biff`) are already taken on crates.io. Which is maybe not a huge problem. IDK. Naming is hard.
burntsushi··on Bttf is a command line datetime Swiss army knife
Yes! dateutils is great! I have a comparison about it here: https://github.com/BurntSushi/biff/blob/master/COMPARISON.md...

The comparison with GNU date is also likely informative.

← PreviousPage 2 of 34Next →