HNHacker News
TopNewBestAskShowJobs

phs2501

1,017 karma · joined July 2, 2014

submissionscomments
phs2501··on Improving Firefox stability on Windows by retrying failed memory allocation
I think one of the main reason overcommit is a thing on Linux (certainly one of the things one runs into if one turns it off) is dealing with the weirdness of fork()/exec(). For a moment there in between the two calls you _technically_ have double the RSS allocated - so spawning processes with fork()/exec() from a process with very large RSS is dicey if you don't want to technically overcommit the memory. Since 99.9% of the time very little of that memory is touched/COW'd before the exec() letting it overcommit rather than dying when a 4GB process tries to spawn a new child just because you don't have another spare 4GB of ram sitting around "just in case" is seen as a reasonable tradeoff.

(Modulo vfork() and spawn() of course which are different and arguably better solutions to this issue.)

phs2501··on Python Asyncio
Not sure how that's different than Python asyncio's "run blocking stuff with `run_in_executor`, the result (future) of which integrates into the async event loop?
phs2501··on Why would anyone need JavaScript generator functions?
Will the compiler check that you have an exhaustive set of keys in your definition of `shapeToDrawFn`? (Not a rhetorical question, I don't know.)
phs2501··on Tell HN: YouTube's web UI just got even worse
To be fair everything being complained about in this thread is pretty clearly broken stuff.

And for design, I'm actually harsh over stuff like the new "top comment" box that, when clicked on, /completely removes the normal comment interface/, shrinks the video, and moves the comments to a new and otherwise-completely-unseen comment interface to the right side of the video. Which is bizarre, inexplicable user experience and a fair amount worse than simply being a weird color.

phs2501··on Tell HN: YouTube's web UI just got even worse
I've seen the new "read more" button sometimes actually completely be invisible... it'll come back if I force a re-layout (i.e. resizing the browser).

But yeah the new design is pretty awful. No idea what they were thinking.

phs2501··on Tell HN: YouTube's web UI just got even worse
Yep. On Firefox, haven't tried on other browsers. At this point I just hit "back, back, forward" without thinking about it when I see it happen.
phs2501··on A History of Lua (2001)
Yep, pretty much.

I wound up writing a thing for this years ago that worked pretty well for the use cases I had at the time, but it was pretty complicated (implementation wise) and had some potential conflicts with other FFI-written stuff that imported "almost but not quite correct" stdlib definitions - since my thing would always import the exact definitions from the system header files.

Still, it was fun and I thought it worked reasonably well for what it was.

https://github.com/bdowning/lj-cdefdb

phs2501··on Why BART uses a nonstandard broad gauge
BART had regular rail profile and non-tapered wheels, so flange squeal (and wear) was apparently a real issue. I'm not sure why they decided on this, since it runs counter to normal railway practice. This article has a story but I wonder if it wasn't just more NIH.

https://sf.streetsblog.org/2018/06/08/bart-makes-headway-aga...

phs2501··on Notes on structured concurrency, or: Go statement considered harmful (2018)
The nursery concept is being added to core Python 3.11 asyncio as the `TaskGroup`.
phs2501··on Why your next home computer should be an old Xeon workstation (2019)
Or overall less noise, especially in smaller cases where you can't fit an extremely large (read: large fan) direct attached air cooler. Larger fans mean more cooling per dB.

Also, water coolers have a lot more thermal mass (because, water), which means that the fan noise that remains can be less annoying as it doesn't ramp up and down as fast with CPU usage, assuming you're driving your fan curve from water temp and not CPU temp.

So it's not fair to say they're just about "showing off" IMHO. There's actual quality of life benefits if you care about noise.

phs2501··on WorldWideWeb.app
From the title I'd assumed this was referring to the original web browser (https://en.wikipedia.org/wiki/WorldWideWeb), which of course would have been `WorldWideWeb.app` as well.
phs2501··on Littlefs – A little fail-safe filesystem designed for microcontrollers
I think the GP was commenting on the lack of specification of eMMC wear leveling, not Littlefs.
phs2501··on Image that contains the code that generated it
It would be exactly a quine, you'd just ram the generated source code through the image generation algorithm rather than printing to stdout. So yes, the existence of quines means that it must be possible. It'd probably be about twice as long, though, based on the typical shape of C/C++ quines.
phs2501··on James Webb is fully deployed
Actually you can't rotate the telescope; they managed orientation even through the launch because if some of the science instruments get pointed towards the sun for too long they'll be destroyed. Now that it's deployed it's even more important that the cold side stays cold.
phs2501··on Apple Neural Engine Internal: From ML Algorithm to HW Registers
Overzealous "protection" filtering presumably (guessing from the Blackhat name). Happens on corporate VPNs too. We can't have nice things.
phs2501··on Write an SQL query builder in 150 lines of Python
This is my middle-ground solution for Python: https://github.com/bdowning/sql-athame

Still fundamentally manipulating SQL text (which is a feature as I don't want to learn a full DSL), but it handles wrangling embedded placeholders while you're composing stuff and some other common compositional tasks. It's worked well for me anyway but I'm under no illusions it'd be right for everyone.

Not an original concept regardless; my original version of this was in Node: https://github.com/bdowning/sql-assassin, but a few years after I wrote that (and mostly didn't use it) I found https://github.com/gajus/slonik which was very similar and much more fleshed-out; I rolled _some_ of its concepts and patterns into sql-athame.

phs2501··on General Fusion to build demonstration plant in UK
I think one of the advantages of the General Fusion approach is that both what the heat gets transferred to and what bears most of the neutron flux (and hence gets irradiated) is the liquid metal, which is presumably easily replaced (and could presumably even be done incrementally while the reactor is live, since it's going to be flowing through a heat exchanger anyway)?
phs2501··on Digital Needle: Ripping vinyl records with a scanner (2013)
Early 78RPM records only played for a few minutes per side, the grooves were very widely spaced.
phs2501··on What’s Wrong With The Honeywell Humidifier
I know it's not an option for a lot of people but a simple bypass flow-through humidifier attached to forced-air central heating is pretty hard to beat:

* The only "active" element is a solenoid water valve.

* Since water flows through once and then out a drain there's no standing water to grow mold (at the cost of extra water usage; mine is 3 gallons per hour though the humidifier is rarely on 100% of the time).

* Maintenance is a new water panel yearly (about $20) and some cleaning, again yearly.

* You need smart controls or to regularly adjust a manual humidistat to not over-humidify your house based on outdoor temperature, though this is exactly the same as with "portable" humidifiers.

phs2501··on Firefox 84.0
IIRC (it's been many years) after many loops that animation started desyncing in the real Flash player too. It wasn't terribly noticeable after only a few loops, but the fact that it happened made me think that the audio loop was completely async from the animation.
phs2501··on Hacking Ethernet out of Fibre Channel cards
I was going to say that I thought token ring MAUs handled disconnected stations but then I read this (including the "setup aid" with an included battery) and now I'm not sure any more:

https://en.wikipedia.org/wiki/Media_access_unit

(un)fortunately I didn't experience this period of network history first hand. :)

phs2501··on "Rust does not have a stable ABI"
Except that shares all the same ABI issues as shared libraries. If they wouldn't link at runtime they won't link at package-install-time either.
phs2501··on Valtan: Common Lisp to JavaScript Compiler
If I recall correctly they typically involve manipulating the execution stack; that's not something you can do in JS obviously.
phs2501··on FCC will require phone carriers to authenticate calls by June 2021 [pdf]
Good to know; I admit I haven't looked at the technical side of this. Mostly I was just providing my "legit" use case for wanting to spoof numbers since I think a lot of times most people don't realize they exist.
phs2501··on FCC will require phone carriers to authenticate calls by June 2021 [pdf]
The issue is when I have a automated answering system (asterisk, for a museum). It rattles off some prerecorded info, possibly with prompting. To talk to a human, I need to forward the caller (I.e. call and set up a voice bridge since the caller is already connected to me) to one of our volunteers, which will be to their cell phone (we are a railway museum and we don't have a staffed office on weekdays). I want to forward the call with the original caller's phone as the caller ID so that if they miss the call our volunteer can call back easily rather than trying some awful game of tag via calling back the PBX.
phs2501··on Why ZFS is not good at growing and reshaping pools, or shrinking them
What's funny is now ZFS is used on SSDs, where that kind of rewriting is constantly happening behind the scenes (even if you're not writing it's constantly doing housekeeping for degraded blocks, especially on modern denser flash).
phs2501··on Sonos's “recycle mode” intentionally bricks devices so they can't be reused
Except it's not... You need to filter down to below the new Nyquist frequency first or you will add tons of aliasing.
phs2501··on Sonos's “recycle mode” intentionally bricks devices so they can't be reused
Assuming you're talking about pitch shifting without changing speed, that warbling doesn't have anything to do with the quality of the source sample. It's just how the pitch shifting algorithm works.
phs2501··on More Intuitive Calculator Arithmetic (2018)
Yeah, they just lack exposure to systems that do:

  :; sbcl
  This is SBCL 1.5.5, an implementation of ANSI Common Lisp.
  ...
  * (/ 1 3)
  1/3
phs2501··on Perl is dying
Calling Perl (released 1987) "one of the first" programming languages is an extremely revisionist view of history to put it lightly.
← PreviousPage 2 of 7Next →