HNHacker News
TopNewBestAskShowJobs

onei

1,018 karma · joined April 27, 2019

submissionscomments
onei··on Seed – A Rust front-end framework for creating fast and reliable web apps
In Rust, no clue because I've never tried. However, I did find a hot reload of WASM compiled from C++ [1]. If they're not equivalent, I would imagine it's a matter of ecosystem maturity rather than it being impossible.

Realistically, hot reload is going to be something like inotify(7) hooked into a compiler and whatever it takes to reload seamlessly. If it's been solved in one general purpose language, it's likely to be possible in another.

[1] https://visualstudiomagazine.com/articles/2021/07/29/cpp-hot...

onei··on Seed – A Rust front-end framework for creating fast and reliable web apps
> ClojureScript is a compiler for Clojure that targets JavaScript. [1]

If ClojureScript is compiled, why can't WASM be the same?

[1] https://clojurescript.org/

onei··on The Linux Experiments YouTube channel has been terminated
There's a difference between trials and it being suitable for public use though, right? It is undeniably a horse dewormer, and has had some use on humans, but not as a covid treatment.

For me, it's about preventing people that aren't medical professionals from self-medicating with a potentially harmful substance. Plus there's been some less than stellar suggestions of covid treatments in the past ranging from dubious to lethal. If it turns out to be safe, then doctors will no doubt prescribe it as necessary.

onei··on How Discord Stores Billions of Messages (2017)
Why is memory allocation via syscalls bad? I get it for embedded (which was mentioned above so perhaps that's what this targets), but I kind of assumed malloc was a syscall underneath on an actual OS and that was fine.
onei··on Rustdoc résumé
For hiring software devs, I don't care about soft skills on a CV. If I'm concerned, I'll pull that thread in an interview. I'd much rather see those traits demonstrated rather than claim you have them and fall short of my expectations.

Recently, I've also seen people put progress bars for soft skills on a CV, as if they're close to mastering the skill or at least levelling up. It normally takes up a lot of space and is virtually meaningless.

onei··on India is leading IPv6 migration with 61.67% adoption
When using NAT, you're revealing the IP address of your router. I don't know about you, but I don't have so many devices running on my home network that would drown out what I'm doing.

With NAT, you can still receive DoS attacks, still have your game networking exploited, and still be geolocated. The only remotely security-related benefit is that instead of your ports being exposed to the wild internet, they're exposed to your router which is more of a side-effect rather than an actual benefit. Its not a reason to not bother having a firewall.

onei··on Discord Launches Threads
I genuinely hadn't realised you could resize threads to be wider and found it really annoying how narrow they were. I don't think I'd noticed any visual cues you could resize them either (assuming the cues exist).
onei··on Bringing supply chain security features to the Go community
There's a GitHub provider for Terraform [1]. I tried it out on a GitHub Enterprise instance last year and found it a little awkward because they didn't have support for the latest GH APIs and the version before was missing a bunch of features. When I looked recently, they seemed to have got past that.

The principle is broadly the same as other Terraform workflows: import existing config and update it when you need to. You can manage repo permissions, people and teams, all centrally and in code. Super useful for tracking changes (the GH audit logs are a bit lacking in my experience) and identifying discrepancies between the expected and actual configurations.

[1] https://registry.terraform.io/providers/integrations/github/...

onei··on The four noisy horsemen of Perl hate
The main one I use regularly with this 'feature' is a shell. I'd imagine it's where Perl got the idea from.

In reality, function arguments are an abstraction. You push your arguments onto a stack and read them off that stack. It's just that so many modern languages have that abstraction that we forget how it works underneath.

onei··on Is Rust Used Safely by Software Developers?
The title is a little misleading, and the results are at a glance a little alarming. If you base your definition of safe on whether you or your dependencies use unsafe anywhere, then obviously you're going to find something of concern. However, if you measure the safety of your code line by line, then the results are much better. Similarly, there's a balance to be found when assuming unsafe code is unsound.

The question is ultimately a reminder to check your dependencies to make sure they're active and take reasonable steps for validating unsafe code.

onei··on Ask HN: Language-agnostic concepts a Backend Engineer should know?
The implementation is, but the concept is transferable. Pretty much the same for most concepts in programming.
onei··on Is education no longer the ‘great equalizer’?
I struggle to believe that intelligence is fundamentally limited, but I often wonder if the child brain is super susceptible to negative effects based on their environment. Anecdotally, if your parents did not do well in school, and you were born into relative poverty, chances are you aren't going to be an Oxford professor. But if your parents are well educated professionals, it's more likely you're going to follow in their footsteps.

I think education is the great equaliser, but it needs to be nourished early and often or you quickly lose out.

onei··on Australia opposes Great Barrier Reef ′in danger′ listing
I would have thought this could be sold as protecting the livelihoods of the people that rely on tourism. It's not as if tourists will come to visit the former Great Barrier Reef when it's dead and gone. No one wants to go on holiday to feel sad and depressed that the world destroyed a natural wonder.
onei··on A reference counting bug which leads to local privilege escalation in io_uring
From [1]

> MariaDB includes test cases for all fixed bugs.

It's not something I've practiced much myself, but writing a test case to reproduce the bug and then fix the bug seems like a more reasonable form of TDD in my head.

I've seen it once when reporting a bug to another team I worked alongside, where I was stress testing a new feature and found said bug. Instead of having to run the stress test, they wrote a unit test to reproduce it at a much smaller scale and then had a much smaller feedback loop to ensure it worked after they fixed it.

[1] https://mariadb.com/kb/en/mariadb-vs-mysql-features/

onei··on Git for Computer Scientists (2010)
Erase from the repo, a little non-standard, but fine. Being asked to remove it from all developer machines sounds like someone misunderstood how version control works. Was that a real life example you hit?
onei··on Containers are tents
Pretty sure this is what tini[1] is for, and there's supervisord[2] for more complex use cases, e.g. running multiple processes. Neither are a full replacement for traditional systemd, which I heard you can technically run in a container these days, but I've never seen anyone try.

[1] https://github.com/krallin/tini

[2] https://github.com/Supervisor/supervisor

onei··on Sublime Text 4
I can see personal licenses get the 3 years worth of updates that you've mentioned elsewhere in the comments here. However, business licenses get 1 year of use before it expires, but I can't tell if that includes upgrades from ST3 to ST4. Can you clarify what the status is for that?
onei··on How corporations buy and food made with prison labor
I guess I should be less surprised that the US has the highest incarceration rate in the world with incentives like that.
onei··on Modern Javascript: Everything you missed over the last 10 years (2020)
Perhaps I'm overthinking things and HTML does this naturally, but is there something for rendering that is what Swagger/OpenAPI is to APIs? Some way of specifying HTML that can be both rendered (and read back for inputs) by multiple implementations.
onei··on Ransomware gang threatens release of Washington D.C. police records
This is why the background checks exist though, right? The police clearly got the job regardless of what was in the check so either we're suggesting the police as an entity are fundamentally corrupt and either didn't care/wanted these compromised people to serve or they didn't feel they were compromised.

If anything, that this stuff is on the background check makes me feel more comfortable. It means that whatever happened has been owned up to which makes you somewhat difficult to blackmail.

onei··on Ransomware gang threatens release of Washington D.C. police records
Locking up people for doing exactly what you're doing is pure hypocrisy, no arguments there. But unless I misread the article, these were background checks of police. They were also background checks of serving police which hopefully infers something about how bad the incidents were. It didn't say whether they were from last week, last year, or last decade. I'm all for transparency, but this is sensationalism with so few details available.
onei··on Ransomware gang threatens release of Washington D.C. police records
Does drug use and poor financial decisions, regardless of age, context, and scale, make you a fundamentally bad police officer? I'm not sure that's a bandwagon I can blindly jump on.
onei··on Ursula Le Guin Books
I read a Wizard of Earthsea as a kid, and looking back 2 things stood out to me.

First is the diversity of the characters. It's not all white people, although I recall some TV/film adaptions were not particularly faithful to that much to Le Guin's disappointment.

The other is a phrase that I still use to this day: "tired is stupid". Particularly when I've been debugging something for many hours, late into the evening, I find that some rest and coming back to it later is almost always the solution to my problem. Turns out PEBKAC does not just apply to lusers.

onei··on Go proposal: new package to provide generic slice functions
Is that because Rust is an expression language? As much as I like Rust, I do find that returning variables from conditionals or match expressions can feel a little jarring (especially when you combine the two). In other places though, it really shines and just requires a little discipline.
onei··on A theory of how developers seek information
I remember helping a friend on a uni project we were writing in C. Of course, a C compiler very rarely output an actual error, just a bunch of warnings. My friend saw the warnings, figured "they're not errors, so they're ok to ignore for now" and kept scrolling to find their code flat out didn't work. When I pointed out the warning were actually errors and we went through and fixed them all, it magically started working.

I think debugging is a hard-won skill that comes from fixing your own mistakes and having the patience to trawl though logs for hints.

onei··on Tiny Container Challenge: Building a 6kB Containerized HTTP Server
There's downsides to statically linking, particularly around what to do when vulnerabilities are found in your dependencies. If you use Debian for example, you can scan packages to detect versions with known vulnerabilities and rebuild the container to upgrade them if it's a static binary, that moves the detection into scanning your dependencies. In modern GitHub (other VCS hosts are available with similar features) this is relatively easy assuming you depend exclusively on things in your language of choice. Outside of that it gets harder and more awkward. That said, using a distro's image also means you may have a bunch of false positives in your scans, who it's a matter of taste imo.
onei··on Tiny Container Challenge: Building a 6kB Containerized HTTP Server
Go binaries that are statically linked work great in scratch images. If you or your dependencies start dynamically linking against libraries then they don't so much, but that's relatively unusual in my experience.
onei··on Tiny Container Challenge: Building a 6kB Containerized HTTP Server
If you imagine a container as a tarball, then scratch is an empty tarball. Each time you copy a file or set of files into the container during the build, you get a new tarball or layer. Some base containers provided by OS vendors, e.g. CentOS, Debian, are a single layer with the entire OS filesystem inside including tooling, libraries etc.

Scratch has no tooling or libraries or anything. It's empty. You typically add a binary into it and then just run that binary, but due to the lack of libraries, it just be statically compiled. So in answer to your question, you can run statically compiled C. You can't run Java due to the lack of JVM which I believe has its on set of filesystem dependencies, but I'm not a Java dev, so I'm not entirely sure.

onei··on Discord ends deal talks with Microsoft
Having just migrated from Zulip to Slack, I find Slack's threading model really bad. Discord is a little better, but still fragmented over time in a busy channel. Zulip has the best implementation I've seen for putting semi-related topics together without getting drowned out.

Surprisingly, Slack's sales seem unaware of Zulip from what I heard from some colleagues so I doubt Slack is going to steal Zulip's (much better) threading model any time soon.

onei··on First C compiler ported to GCC
The very first B compiler was written in BCPL by Ken Thompson. B later became self-hosting, i.e. the BCPL compiler compiled the B compiler, but this had another set of challenges due to the extreme memory constraints. It was an iterative process where a new feature was added such that it pushed the memory limit and then the compiler was rewritten to use the new feature to bring the memory usage down.

C was heavily inspired by B and I suspect written in B aswell. Alternatively, BCPL was extremely portable as it compiled to OCode (what we'd recognise today as bytecode) so that might have been another option. The assignment operators of =+ are straight from B and later changed to += due to Dennis Ritchie's personal taste.

← PreviousPage 4 of 9Next →