HNHacker News
TopNewBestAskShowJobs

erhaetherth

305 karma · joined May 11, 2023

submissionscomments
erhaetherth··on What Kind of Asynchronous Is Right for You?
We have this problem at my work. Some components listen for events, but where did they come from? I have no idea, I didn't write the entire stack, and there isn't an easy way to trace it. Similarly, if I send an event (and this may be JS/DOM specific), who is going to catch it, and are they going to prevent it from bubbling up to other listeners (potentially breaking them)?
erhaetherth··on Hexyl: A command-line hex viewer with colorized output
> how would I have figured out what the code does without an LLM

Start by find-and-replacing those #defines. You can iteratively deobfuscate things by hand. It's PITA and takes time, but it's doable.

If you hit a roadblock, run it in a VM.

erhaetherth··on Show HN: 77 Year old launches SaaS platform today. Seeks feedback
It wasn't cool then either.
erhaetherth··on The next generation of serverless
I don't understand why we need a 'custom kernel'. Have your serverless server give you the specs for whatever the heck they want to run and compile against that. Why do we need a new kernel?
erhaetherth··on The next generation of serverless
Is WebAssembly even fundamentally different from Java/JVM or C#/CLR? I like WebAssembly but I don't think it brings anything new except that it can kind of run in a browser, but so could Java and C# for a brief period of time.
erhaetherth··on 11 years of hosting a SaaS
I've been on unmanaged MySQL for ~8 years now. Considered switching to managed but I'm not seeing any performance or stability issues, so I guess I'll just keep this train going until it craps out on me, then restore a backup onto a managed service, say sorry for the downtime, and that'll be that.
erhaetherth··on 11 years of hosting a SaaS
> Not that it matters, but there definitely is a tendency in our industry to 'look down' on frontenders as not real engineers and thus not consider them for leadership positions.

I think that's funny because there some to be a ton of backenders that can't do frontend at all. And then they want to look down on FE when they can't do it themselves? It's not just basic HTML and CSS if you're building a complex app.

I do both (FE & BE) so... I've seen it all and enjoy it all. Not sure one is easier than the other.

erhaetherth··on Just Use jQuery
For simple, mostly-static pages, go right ahead. For dynamic pages with a lot of interactions... jQuery doesn't scale so well.
erhaetherth··on Ask HN: How can a BE/infra developer handle the FE side of personal projects?
Skimmed past most of what you wrote, but noticed this

``` import {Datatable} from 'third-party-ui-kit' ```

I don't know what "third-party-ui-kit" you had in mind, but that looks an awful lot like the lib I wrote. Basically very similar to datatables.net but written from scratch from React but accepts the same backend API (so you don't have to rewrite your server responses). Only 583 lines of code to recreate. It's got sorting and everything, even the shift-click multi-sort.

erhaetherth··on Ask HN: How can a BE/infra developer handle the FE side of personal projects?
I've never tried it, but apparently some bindings exist, e.g. https://github.com/rustwasm/wasm-bindgen

So you can either try manipulating the DOM w/ some bindings or draw to canvas.

erhaetherth··on In praise of blowing up your life
Fwiw, sometimes they follow through.
erhaetherth··on In praise of blowing up your life
Atheists are "different" now? Did not know. Maybe it depends on the state.
erhaetherth··on In praise of blowing up your life
> you don’t pay until check out

surely that doesn't apply to extended stays? don't they want some money like... after 2 weeks or a month or something? what prevents people from sleep-and-dashing? i guess that's why they have a CC on file but they don't know if it'll go through.

erhaetherth··on A simple hash table in C
Curious why concurrent reads would ever be an issue. As long as there are no writes during those reads... everything should be stable, no?
erhaetherth··on Anti-Personas
You have to buy the book ;) It also has no explanations, examples, or context.
erhaetherth··on Is React Having an Angular.js Moment?
Not quite.

1. They can potentially be downloaded and parsed in parallel

2. They can be invalidated independently, meaning on your next visit you may only need to re-DL the 1MB blob instead of the whole thing

3. Not every page will need all 3 blobs, you might only need the 2MB blob to load the homepage which means it'll load a little bit quicker. Then you can either load the next blob on the next click, or start downloading it in the background so the next click is nearly instant

4. You can do this not just between pages, but progressively within a single page. Render part of the UI, wait for the 2nd blob, then render the components that need that bit.

erhaetherth··on Windows 11 calls a zip file a 'postcode file' in UK English
182 meters tall? Dayum.
erhaetherth··on Windows 11 calls a zip file a 'postcode file' in UK English
No, Americans only know brand names because #capitalism.
erhaetherth··on Windows 11 calls a zip file a 'postcode file' in UK English
That's exceptionally lazy. When coding, unless the false positive rate is exceptionally low, I just find (without replace) and go through them by hand. How many "flat"s can there be in 1 book? C'mon. You might have to read 20 sentences, oh no.
erhaetherth··on C++ Implementation of StableDiffusion
Fwiw it's not impossible to package all this junk up in Docker. I did it recently. You have to run Docker w/ a whole bunch of flags though, like `--gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -p 7860:7860`. And the GPU isn't available during build time unless you do some hacks. But you can build the CUDA junk into the docker image along with Python and all the libs. Combine that with a .bat or .sh to contain the giant `docker run` command and you have a half-OK solution. Aside from having to start docker before being able to run it.
erhaetherth··on Is React Having an Angular.js Moment?
Ejs is very much string-based.
erhaetherth··on Is React Having an Angular.js Moment?
In webpack, if you use a simple dynamic `import()`, it will compile all the files that it might possibly match. Then in PHP I just pass down the name of the script I want to load plus a bit of server-side data and render it. You can fiddle with the webpack settings about how aggressively it will code split or re-use libs. I recommend throwing all the vendor/3rd party party stuff/rarely changing libs into a single package and set a long TTL. Then the first time a user visits it can download all that junk and from then on they only have to re-download the bits that you change. For me, I might change a few pages a week. For my day job, we deploy once a day, M-Th, so even then if a user visits 100 pages in a day, they only pay for the JS on the first click of the day, and only the parts that have changed for the most part.
erhaetherth··on I went down the rabbit hole of buying GitHub Stars, so you won't have to
I occasionally ponder if I should send many small changes at the company I work for. Not because I'm not a real boy but because every so often my manager will be impressed by my commit count. Not that I'm trying to inflate it (I just try really hard to avoid meetings so I can write code which I actually enjoy), but...sure seems like it encourages the wrong behavior.
erhaetherth··on Zig is hard but worth it
Makes me so sad that I can't just code up a parser and have a useable language. I have a lot of ideas, but heck, just syntax highlighting is... I don't know where to begin. And auto-completions. I need a tool that does 90% of that like PegJS or other parser-generators do for the parsing part. Don't see why a parser-generator can't also spit out an LSP. And if it knows what tokens are valid next, it should be able to generate completion suggestions. And if you have an AST, you can probably format the code half decently. And then I imagine it's possible to have a semi-universal package manager, I don't know why we need one per language, really. Aren't they all "put some code in some predefined location, and resolve these dependencies with semver please"? Maybe some extra junk for precompiled deps but still.
erhaetherth··on Zig is hard but worth it
I think JS was somehow salvaged after all that time. The event loop paradigm is lovely.
erhaetherth··on Zig is hard but worth it
> easy things seem easy primarily because they are familiar

This is also why I struggle to answer the question "is it hard". Is it hard to build a web-app? No. But I've been building web-apps for 20 years. Will you find it hard (if you've never programmed before)? I don't know, if you want to build one this weekend, sure. If you have the patience to spend a few years learning first, then no.

erhaetherth··on Automatic emergency braking should become mandatory, feds say
> somehow universally implemented across manufacturers... maybe.

They'd need to be implemented and then turned off for 15 years until 99% of the old cars are off the road and then flipped on simultaneously for every car.

If a car suddenly breaks then the car behind it better be able to suddenly break too.

erhaetherth··on Own-goal football (2022)
Seems quite logical. I break out the egg-timer in board games when people are dilly-dallying.
erhaetherth··on Breaking SHA256: length extension attacks in practice
What do you mean "outside the context the tokens were handed out in"?

And isn't this the same as stealing a cookie or something?

erhaetherth··on Breaking SHA256: length extension attacks in practice
Does this really work? Any arbitrary fixed-length prefix?

I always just serialize the inputs with JSON or something. Any weirdness an attacker might try would just be escaped so they'll never be able to match the original input.

← PreviousPage 6 of 7Next →