HNHacker News
TopNewBestAskShowJobs

smcameron

1,988 karma · joined December 1, 2014

Author of Word War vi, Space Nerds in Space, and gaseous-giganticus
submissionscomments
smcameron··on Pricing Changes for GitHub Actions
Control, Alt, Delete.
smcameron··on How can I read the standard output of an already-running process?
Can't you just read from /proc/pid/fd/0 ?
smcameron··on Using LLMs at Oxide
I found it funny that in a sentence that mentions "those who can recognize an LLM’s reveals", a few words later, there's an em-dash. I've often used em-dashes myself, so I find it a bit annoying that use of em-dashes is widely considered to be an AI tell.
smcameron··on Stacked Diffs with git rebase —onto
For me, the answer is stgit. https://stacked-git.github.io/
smcameron··on McDonald's is losing its low-income customers
> When you are a single person, the math changes.

No, you just have to cook meals that freeze well and learn to use your freezer.

smcameron··on The fate of "small" open source
In the U.S., anything machine generated is uncopyrightable.

Why would you put uncopyrightable code into your codebase?

smcameron··on At the end you use `git bisect`
and sccs
smcameron··on Stdlib: A library of frameworks, templates, and guides for technical leadership
stdlib already means something else. Don't you know when you pick a name, you need to pick something with zero google hits?
smcameron··on The Theatre of Pull Requests and Code Review
> I've got an internal alarm that starts to go off somewhere around 72 hours.

Nah, in my experience, if you've got good commit hygiene you can often merge even ancient commits.

Here's a pretty hefty commit I merged five years after it was originally written, converting a ~100k line codebase from GTK to SDL2, written in 2015, committed in 2020, with tons of development in between, with "10 files changed, 777 insertions(+), 804 deletions(-)"

https://github.com/smcameron/space-nerds-in-space/commit/4ab...

I was expecting it to be a bit of a nightmare, but it really wasn't bad at all.

smcameron··on The Theatre of Pull Requests and Code Review
> - “every commit must compile” - again, unnecessary overzealousness.

So you're the one breaking git bisect all the time. Grrrr.

Use stgit and make decent commits instead of rolling in the dirt like an animal.

smcameron··on Escapee pregnancy test frogs colonised Wales for 50 years (2019)
> there is apparently an old expression "the rabbit died" in English

This shows up in the Aerosmith song, "Sweet Emotion"

smcameron··on Everything from 1991 Radio Shack ad I now do with my phone (2014)
Can't mention a Bob Carver designed amp without also mentioning the amplifier challenge: https://www.stereophile.com/content/carver-challenge-0
smcameron··on Show HN: Dlg – Zero-cost printf-style debugging for Go
> printf debugging isn't without its annoyances, namely removing the print statements once you're done.

Use something like stacked git[1], and then it's just one "stg pop" and poof, they're gone.

[1] https://stacked-git.github.io/

smcameron··on Anthropic tightens usage limits for Claude Code without telling users
COGS == cost of goods sold?
smcameron··on Linux Reaches 5% Desktop Market Share in USA
You sure about that math? If there are 2 linux users and 8 windows users, then that's 20% linux, 80% windows. If one windows user quits using computers, then that's 2 linux users (out of 9 total) and 7 windows users (out of 9 total), or 22% linux and 77% windows users.
smcameron··on C3 solved memory lifetimes with scopes
Seems overly simplistic and doesn't seem to cover extremely common cases such as a thread allocating some memory then putting it into a queue to be consumed by other threads which then eventually free the memory, or any allocation lifetime that isn't simply the scope of the enclosing block.
smcameron··on Bcachefs may be headed out of the kernel
No, every gpu vendor out there would prefer proprietary drivers and with a stable ABI, they could do it, and would do, there is no question about it.

I worked for HP on storage drivers for a decade or so, and had their been a stable ABI, HP would have shipped proprietary storage drivers for everything. Even without a stable ABI, they shipped proprietary drivers at considerable effort, compiling for myriad different distro kernels. It was a nightmare, and good thing too, or there wouldn't be any open source drivers.

smcameron··on The provenance memory model for C
Ugh. Are unicode variable names allowed in C now? That's horrific.
smcameron··on A Lisp adventure on the calm waters of the dead C (2021)
There's an upside to C's limitations. Several times I've seen expressed the notion that "every big Lisp project uses its own dialect of Lisp". This is less true in C, I think, because it doesn't have the power (ignoring preprocessor abuse, which does happen, see Bourne shell source[1]). C++ has a bit more power, and there we see projects tend to use their own subset of C++.

In both Lisp, and C++, taking some isolated snippet from a codebase, you can't quite really be sure what it's doing without reading the rest of the program because of what might be called the "excessive" power of the languages.

In C, it is much more likely that you can look at an isolated snippet of code from some codebase and be reasonably sure about what it is doing, and be able to extract this snippet more or less as-is, and re-use it in some other, unrelated code base. At least, this has been my experience, ymmv.

[1] https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh

smcameron··on I fought in Ukraine and here's why FPV drones kind of suck
> If this type of pre-aborted mission is included in the total, the success rate drops to between 20 and 30 percent. On the face of it, this success rate is bad ...

I disagree with this premise. I suspect that 20 to 30% success rate is not at all bad, but rather excellent. Compare to artillery with shells costing a few thousand each on the low end, to $100k+ for more advanced rounds, with 100s or 1000s fired per casualty.

smcameron··on Occurences of swearing in the Linux kernel source code over time
What if you're writing swear word censoring/detecting software? Or maybe something less draconian, like your space game that has a Zork like parser, and needs to know that if the user says, "set the f'ing warp drive to f'ing max", that it should set the warp drive to max and not worry about the swear words.
smcameron··on Cray versus Raspberry Pi
And you can 3D print a Cray YMP case for your Raspberry Pi: https://www.thingiverse.com/thing:6947303
smcameron··on The Sky's the limit: AI automation on Mac
Oh, weird, I was just thinking of Memory Shift[1] earlier this morning, hadn't thought of it in probably 30 years, and now that switcher article mentions it.

[1]https://www.atarimagazines.com/creative/v9n12/82_MemoryShift...

smcameron··on There should be no Computer Art (1971)
So, here is some computer created art ("art"?): https://imgur.com/x4eR2HQ I have many many more like it. https://imgur.com/tCYhZEy

I wrote the program that creates that. When I wrote it, my goal was to make a procedurally generated gas giant planet of some sort, but I didn't even know if what I was attempting would work (and for a period of about a month, it didn't work). I had/have only rudimentary control over the output. I can control the colors that go into it. I can control, to some degree, the scale of the "swirliness", but not the details of the swirliness. I can control how long I let the "swirliness" progress, and a few other things. But, I never know ahead of time how it's going to come out, and it's hard to escape the obvious fact that the computer has done nearly all of the work, and I only gave it the vaguest of directions in terms of aesthetics, although I did give it very specific instructions about how to do everything it did, those instructions were so complicated and so many, that I had next to no idea what specific output those instructions might produce, except in the most general terms. When I run the program, there's an anticipation ... "oooh, I hope this one comes out good!" but I don't know ahead of time whether it will or not.

smcameron··on Working with Git Patches in Apple Mail (2023)
Because the codebase you're working on is on github?

And I think you may underestimate the power of stgit. You can manage thousands of patches concurrently, no problem. If you're a maintainer getting patches from loads of people all the time, this is valuable. stgit has it's origins in quilt, which in turn has its origins in Andrew Morton's patch scripts[1], and I know for a fact that Andrew Morton actually managed thousands of patches at a time for years in his work on the linux kernel, because I once sent him a patch against those scripts, and he complained it was slow because I used an O(n^2) algorithm, which worked fine with a handful of patches, and I asked him how many patches he had, and he told me a number that was multiple thousands, so this isn't a hypothetical example.

[1] https://lwn.net/Articles/13518/

smcameron··on Beware of Fast-Math
One thing I did not see mentioned in the article, or in these comments (according to ctrl-f anyway) is the use of feenableexcept()[1] to track down the source of NaNs in your code.

    feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
will cause your code to get a SIGFPE whenever a NaN crawls out from under a rock. Of course it doesn't work with fast-math enabled, but if you're unknowingly getting NaNs without fast-math enabled, you obviously need to fix those before even trying fast-math, and they can be hard to find, and feenableexcept() makes finding them a lot easier.

[1] https://linux.die.net/man/3/feenableexcept

smcameron··on Working with Git Patches in Apple Mail (2023)
It means that if you do "patch -p1 --dry-run < some.patch", and it complains that it doesn't apply, wiggle can sometimes apply it anyway, and also, if you do "patch -p1 < some.patch", and it partially applies but with rejected hunks, wiggle can try to apply the rejected hunks.
smcameron··on Planetfall
Along similar lines is "Here Dragons Abound", a blog about procedural generation of fantasy maps, though it hasn't been updated in awhile. https://heredragonsabound.blogspot.com/
smcameron··on Working with Git Patches in Apple Mail (2023)
If you work with git and patches a lot, stgit is worth a look.

https://stacked-git.github.io

smcameron··on Working with Git Patches in Apple Mail (2023)
There's also Neil Brown's "wiggle" program for applying patches that don't apply.

https://github.com/neilbrown/wiggle

although on debian based systems I think you can just "apt install wiggle"

← PreviousPage 2 of 18Next →