jayshua

Joined 10 years ago

Karma
301
Submissions
114
Member since
Apr 12
[ my public key: https://keybase.io/jayshua; my proof: https://keybase.io/jayshua/sigs/5AAPkDM2ZUE-Y-P3xhrwdUxRs1pPU3srNQupiGvlAUw ]
View on Hacker News

Recent submissions

Comment · 1 year ago
I think it's important to note a couple of things about this.

First, Casey offers refunds on the handmade website for anyone who purchased the pre-order. Second, the pre-orders were primarily purchased by people who wanted to get the in-progress source code of the project, not people who just wanted to get the finished game. I'm not aware of anyone who purchased the pre-order solely to get the finished game itself. (Though it's certainly possible that there were some people.) Whether that makes a difference is up to the reader I suppose, since the original versions of the site didn't say anything about how likely the project was to finish and did state that the pre-order was for both the source-code and the finished game.

Second, the ten-year timeline (I believe the live streams only spanned 8 years) should be taken with the the note that this is live streaming for just one hour per day on weekdays, or for two hours two or three times a week later in the project. There's roughly 1000 hours of video content not including the Q&As at the end of every video. The 1000 hours includes instructional content and white board explanations in addition to the actual coding which was done while explaining the code itself as it was written. (Also, he wrote literally everything from scratch, something which he stated multiple times probably doesn't make sense in a real project.)

Taking into account the non-coding content, and the slower rate of coding while explaining what is being written, I'd estimate somewhere between 2-4 months of actual (40hr/week) work was completed, which includes both a software and a hardware renderer. No idea how accurate that estimate is, but it's definitely far less than 10 years and doesn't seem very indicative that the coding style he was trying to teach is untenable for game projects. (To be clear, it might be untenable. I don't know. I just don't see how the results of the Handmade Hero project specifically are indicative either way.)

Comment · 1 year ago
Could you expand a bit on 'immediate mode design purity'? I've done immediate mode stuff from scratch and my experience had been "just write whatever code you need to get it to work," there hasn't really been an overall architecture guiding it. Never worked with an im library before.
Comment · 1 year ago
This is not actually that difficult if you just want the basics. I have a project that implements just the x11 key & mouse events, and the shared memory extension in 400 lines of Rust. Was worth it for me since it eliminated dependency on libx11 and libc, which removed a dependency on something like 800,000 lines of code across those two libraries. (Determined by a basic cloc on each library source. Actually compiled code for a specific architecture would probably be less than that, but still orders of magnitude more than 400.)
Comment · 2 years ago
Let's say I'm sorting some information about an event occuring in Florida, USA next year. It will be on July 4th at 3:00pm. I store this as an ISO string: "2025-07-04T03:00:00Z-5".

Florida (and the USA as a whole) have been discussing getting rid of the daylight savings change on-and-off for several years.

If that law goes through in December of this year, the date I stored for my event will now be off by an hour because come July 2025 Florida will be on UTC offset -6, not -5.

On the other hand, if I store the date with a fully qualified tz database timezone like this: "2025-07-04 03:00:00 America/New_York" the time will continue to be displayed correctly because the tz database will be updated with the new offset information.

Comment · 2 years ago
Comment · 2 years ago
Not sure if it could be extended here, but I've seen a lock free hash map that supported lock free reallocation by allocating new space and moving each entry one by one, either when the entry is accessed or in a separate thread concurrently. Accessing an entry during the reallocation would check the new region first, and if not found check the old region. Entries in the old region would be marked as moved and once all entries were moved the old allocation could be freed.
Comment · 2 years ago
I read this as mut1 and mut2 both being downgraded to shared references because they aren't used to mutate anymore. I'd imagine that's not what's actually happening though?
Comment · 3 years ago
> anyone know of an IDE/tool that can spell check UI strings without tripping up on variable names

Sublime Text works pretty well for me. I think you need to turn on spell check in the settings (off by default?) Then you can choose which syntax highlighting scopes you want to spell check. I have mine configured to spell check comments and string literals.

Comment · 3 years ago
What does a broken repo look like? What does broken mean here?
Comment · 3 years ago
I use a similar technique for typing all the symbols. If I press f I get f, r gives me r, but if I press f and r at the same time with my left index finger positioned between the two keys I get $. w and s are {, e and d are }.

All the other symbols, parens, etc. are mapped to similar one-finger-two-key shortcuts.

Significantly cut down on finger stretching which used to cause me mild pain.

Comment · 3 years ago
Custom input map with extensive radial menus and layers.
Comment · 3 years ago
Is this just an issue with the way the editor is presenting the LSP feedback to you?
Comment · 3 years ago
I use an android (and iOS I think) app called Xodo. The "reader mode" re-flows the PDF into a screen-width single column like an e-book. The latest update really buried the option in the menus, but it's there somewhere and works pretty well.
Comment · 3 years ago
Most teachers I know vastly prefer to grade on paper rather than digitally. Easier to just circle sections and write comments with a pen than deal with the review features in a document editor. I suppose they could print them out themselves? Or require submission in both digital and paper? But why bother when you can just have the students submit in paper.
Comment · 3 years ago
Usually it's done so that the teacher can tell how long the paper is without counting words. Times New Roman at x pt with 1 inch margins fits a well known average number of words per page. The assignment will usually be "write x number of pages on..."

Using a larger font size or a font that renders larger at the same font size means you can write less content in the same space.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton