HNHacker News
TopNewBestAskShowJobs

SAHChandler

166 karma · joined November 9, 2009

submissionscomments
SAHChandler··on This website is hosted on Bluesky
I'm very hopeful for the possibility of using bluesky for blob data.

A friend and I had considered looking into storing DOOM WADs on bluesky so that "map packs" could be shared in the same way posts are. Follow an account, a list, or a starter pack, and you could theoretically modify GZDoom or some other client to know how to search and view any WADs posted by those accounts. Like how the Steam Workshop works, except it's via bluesky. :D

SAHChandler··on Using SQLite as storage for web server static content
Back in 2011/2012 I worked for a small game development company and at my recommendation we moved all our assets under 100kb into an sqlite3 db, and then made a "pak file" and stored offsets to said files inside the sqlite3 db (and this was done because there was a post-mortem talk given by Richard Hipp where he said in hindsight he'd wish blobs had been treated more like an inode, where they were an offset further into the database and blobs were just appended to the file)

It was hella fast how quickly we could load our assets (this was for a mobile game so only a handful of assets were not in the db). It's been neat seeing people adopt it further.

One aspect someone might also not realize is you can store near infinite metadata alongside your content, so you can always just query the database to find "similar" files. We threw so much metadata into the DB and I think in the end the pak file was 200MB, and the database was something like 20MB. Again, this was a mobile game. I think the worst thing we had happen on the client side was a single double inner join that we couldn't figure out how to reduce due to some server side complexity (we weren't able to implement the server, which was frustrating as the people we worked with were very bad™ at software development so our builds would break out of nowhere when they would change the entire backend spec without alerting us )

We also used a separate sqlite3 database for game replays so you could (post match completion) replay an entire game and see what each opponent was doing during said game. This was super nice for automated testing as well.

SAHChandler··on 500 Python Interpreters
I did open an issue on GitHub with the CPython implementation and it's being looked into. The crash happens for sure in the debug version of Python. However we're seeing valgrind and address sanitizer fire off for the upcoming 3.13 release in release mode when using the C API as I showed in my example. However, this behavior only appears to occur when embedding python directly, not via extending it, into an application. Because of how the (hidden because it is experimental) `_xxsubinterpreters` module works internally, it's extra internal bookkeeping seems to give enough time for the race condition to disappear.
SAHChandler··on 500 Python Interpreters
It might not have been obvious, but I used the currently available Python 3.12.5 release. However upon filing a ticket, and being asked for more testing, we found this issue persists into 3.13 and 3.14 alpha with and without the GIL disabled :(
SAHChandler··on 500 Python Interpreters
In the TV show "The Orville" a character has their matter replicator create "500 cigarettes", but it only created 463 after someone counted them all. This is a meme that's been making the rounds for a few weeks in some circles now.
SAHChandler··on 500 Python Interpreters
It should be a brighter orange closer to what you see on HN's top bar. I've been waffling on the magenta. It works "fine" in low usage. This is the first post where I used it a great deal. I'm gonna be spending some time working with the colors over the weekend, as you're the 5th person to say something to me about it.

It could be worse, however. My last design would flashbang you, even if you used darkreader

SAHChandler··on 500 Python Interpreters
It was entered into the second chance pool[1]. Interim posts were probably not as popular because I accidentally broke my site's CSS briefly that wasn't obvious in the preview deployments, but was present on the actual site. I only noticed about an hour ago

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

SAHChandler··on Why not just do simple C++ RAII in C?
The public vs. private aspect also affects inheritance. structs publicly inherit from base types by default, classes privately inherit from base types.
SAHChandler··on Everything You Never Wanted to Know About CMake
Author of the post here.

The compiler version thing is definitely an issue. That said, if you're worried about having to litter `if/endif` calls all over the place, I recommend you look into CMake's generator expressions.

relative rpath support was added very recently and will be in the CMake 3.14 release. It's a shame it took this long to make it in.

third party libraries can be imported via add_library, and then setting the imported location. This allows, I should note, the ability to link against both static and dynamic libraries.

IXM is being developed to make it easier to do the layout system as well as make the 80% you've mentioned here basically a non-issue, and comes with a fairly decent (in my opinion) default layout. Because it's not even in an alpha state I've not had time to document it.

(Also, I am working on a build system replacement for CMake, which includes a compiler frontend translator so you can solve the cross platform compiler flag issue. CMake is simply being used to "brute"strap the project until it is self hosting)

SAHChandler··on Everything You Never Wanted to Know About CMake
To be fair, CMake's language was first created somewhere back in 1996. It's quite old at this point and is basically in the "sunk cost fallacy" range of existence.
SAHChandler··on Everything You Never Wanted to Know About CMake
I'm always willing to help others pierce the veil of reality from time to time. Hope you enjoyed the post :)
SAHChandler··on Killing the C++ Modules Technical Specification
Forgive me, but I can't think of a single build system where the compiler is run on a source file twice. All of the ones I've seen support either parsing the .d file generated by a compiler, or parse /showIncludes if using MSVC. If you have any examples of build systems doing this, I'd love to see them so I can avoid them.
SAHChandler··on Killing the C++ Modules Technical Specification
That post in particular was a subject of discussion at CppCon for a hot second and is partially why I mentioned the Rust thing. There are other things as well, but I don't want to rake people if it isn't necessary. I pay attention to the Rust subreddit and I see enough misconceptions about C++ and how it works in various comments that it helped reinforce my choice to include that snarky statement. I do understand why so many C++ programmers at CppCon thought that Rust can be dismissed as a fad because of its community's understanding of C++. That said, this sort of parroting about how C++ works and why it is "bad" is everywhere and you can even see it in the comments on this very submission (such as mention of std::variant and implicit conversion to bool. That specific issue is easily remedied but wasn't part of the specification. It's been noted as a defect and will be fixed "soon"?)

I still chuckle when randos make arguments like "C++ can't be parsed with an LALR parser", or "virtual functions are more expensive than function pointers", as if the former is the end of the world, and the latter is a checkmate that will suddenly make my knees week, arms heavy. There's code in my editor, and it's just spaghetti.

SAHChandler··on Killing the C++ Modules Technical Specification
(Hi, author of the article)

The issue is, "how do you find these dependent modules?". As of right now, there is no way to find a module. It is not tied to a location in a subdirectory, nor is the name of a module tied to the file itself. I'm fine if we can get the dependency information, but how can we do that if there is no guarantee for finding the actual dependencies? Leaving these decisions unspecified by the C++ standard is dangerous. Having an important thing such as "how does the name of a module map to the name of the translation unit it contains?" be none of "undefined", "ill-formed", or "implementation defined" is asking for trouble. And to be quite honest, I don't see how running the compiler in a minimal parsing mode (once for each module), followed by running the compiler a second time for its full IFC (or whatever file format is used) and possible object file generation can be a good idea.

SAHChandler··on How I came to love Windows again
> (forced to choose password hint?)

I haven't used Windows 8, but on Windows 7, when creating a user account I was required to create a password hint and could simply enter a space.

SAHChandler··on Learning C with gdb
I believe it was Tenacious-C: http://tenaciousc.com/
SAHChandler··on Zed Shaw, LPTHW, & Learn You An Ruby
The Learn You A Haskell, and Learn You Some Erlang links both point to Learn You Some Erlang. Some folks may become confused. :)
SAHChandler··on Every day I learn something new... and stupid.
With MSVC on x86, you can pass /Qlong-double to the compiler for it to "properly size" the long double type :)
SAHChandler··on Developers blog post: No, I won’t do it. It would not be professional.
Could be worse. 40K~ish for an entry level game programmer. Few exits there as well :P
SAHChandler··on Java Build Systems - a sad state of affairs
If I might make a (self promoting) suggestion, I wrote one specifically for small C/C++/ObjC projects. You can find the most recent release here[1]. Only a few people have used it, but so far the response has been positive.

[1]:http://github.com/sahchandler/bit/tree/CaressofSteel

SAHChandler··on Vim 7.3 released
Try ending the actual process and then relaunching with your browser of choice open as well (I was having the same problem too)
SAHChandler··on The Io Language
I absolutely love Io, and my favorite "feature" of the implementation is the ability to modify scripts in real time and have the changes take place immediately, for better or worse ;)
SAHChandler··on Zed Shaw on C++
I've seen you talk about this on the Io list for a while now, but you never seemed to have posted a link to it. Glad I can finally take a look at it :)
SAHChandler··on John Carmack Archive - Interviews
While it sounds cliche, John Carmack, along with Michael Abrash, are among several people that begat my interest in programming (with a focus towards games of course ;D), at a time when I was still unsure of what I wanted to do in my life.

It's interesting to see the evolution of what was happening at the time in the game development industry, and then correlate that to what I was experiencing at the time as I was growing up, and playing these games.

SAHChandler··on Ask HN: What are you working on?
I'm currently working on a build system. I'm effectively scratching an itch. It's my first serious project, where I actually plan to use it on a regular basis. You can find the repo at http://github.com/sahchandler/buildit :)
SAHChandler··on Ask HN: What are your goals for your startups in 2010?
Start my business in some way shape or form. :D