HNHacker News
TopNewBestAskShowJobs

johnsoft

436 karma · joined March 2, 2013

https://whatisaphone.com

john@whatisaphone.com

submissionscomments
johnsoft··on Linux, macOS, and Windows running simultaneously on a first gen Core i5
There's a script linked in the post that downloads the installer directly from apple.com. Of course then you have to go through the install process yourself.

https://github.com/foxlet/macOS-Simple-KVM

johnsoft··on Undocumented x86 instructions in Intel CPUs that can modify microcode
Here's how Ford tests its car seats: https://www.theverge.com/tldr/2019/1/11/18178402/ford-robot-...

Should we, as consumers, demand that Ford productize this robot and make it publicly available before we'll buy a Ford car?

johnsoft··on Unironically using Kubernetes for my personal blog
>Once the cluster is stable and you are comfortable bringing it up and tearing it down >K8s wants a docker container registry, you really don't want to run that on your cluster in the beginning, but once your cluster's secure, why not!

I'm betraying my ignorance here, but how does this work? If you're running the registry in your cluster, and you tear down your cluster (and the registry with it), how do you rebuild the cluster without being able to pull images?

johnsoft··on Seagate's Roadmap: The Path to 120 TB Hard Drives
Other issues with larger platters:

- more power usage

- more heat

- more noise

Datacenters in particular are not interested in increasing heat or power usage. 5.25" hard drives used to be common, but were phased out sometime around Y2K.

johnsoft··on A mundane use of dependent types
I would love to see OP's code ported to Rust.
johnsoft··on Where Everything Went Wrong: Error Handling and Error Messages in Rust (2020)
I found a crate that claims to do #1: https://github.com/dtolnay/no-panic

This also looks interesting: https://github.com/Technolution/rustig

johnsoft··on Comparison of Rust async and Linux thread context switch time and memory use
It's about having a consistent measurement baseline. Say you run your benchmark once, then thermal throttling kicks in, then you run it again, and it takes twice as long. Is your code actually slower now? Should I wait until the fan turns off before I run it again? That data is noisy and useless. Take your measurements on a server or desktop with sane thermals and a full-size fan.

If you speed things up by 10% on your server, they'll get 10% faster on your laptop as well.

johnsoft··on “I saw that you spun up an Ubuntu image in Azure”
They are trying to scapegoat the guy. Thankfully, people are not falling for it.
johnsoft··on Rust 1.50
It's not really an enum if you can't enumerate all the values at compile time. Rust enums are not C enums.

I'd represent it like this:

    #[repr(transparent)]
    struct Foo(i32);

    impl Foo {
        const A: Foo = Foo(0);
        const B: Foo = Foo(1);
        const C: Foo = Foo(2);
    }
johnsoft··on Split keyboards and how to build them
I'm in the market for a new chair. Which one did you buy? (Or if you'd rather teach me to fish, how did you decide on one?)
johnsoft··on Rust for Windows
A pointer->reference transformation is not always correct, because in C, arrays are also passed as pointers. Example: https://docs.microsoft.com/en-us/windows/win32/api/winuser/n...
johnsoft··on Termux no longer updated on Google Play
Yikes.

I use f-droid, and I'm lucky enough to be one Android version behind. Can someone who's upgraded let me know what to expect when I upgrade? The blog post mentions that adb still works. Does this mean I'll have to use adb once to install f-droid and have it work normally after that, or will _every_ app need to be installed using adb?

johnsoft··on Uber discovered they’d been defrauded out of 2/3 of their ad spend
So the movie was bad, and people didn't go see it? Doesn't seem related to advertising.

Eminem released his last two albums without even announcing them. Word of mouth got them both to #1 on the charts.

If you tried that same movie experiment with something like Avengers, I bet the results would look a lot closer to Kamikaze than Delgo.

johnsoft··on Rust 1.49.0
By this logic, languages are never "stable" until after they die
johnsoft··on Rust 1.49.0
Expanding a bit on conversions: C#'s `Convert` conflates several different operations.

Examples:

Convert.ToInt32(String) – This is _parsing_. In Rust, use `parse`.

Convert.ToString(Int32) – This is _stringifying_. In Rust, use `to_string`.

Convert.ToInt64(Int32) – This is an _infallible conversion_. In Rust, use `into`.

Convert.ToInt32(Int64) – This is a _fallible conversion_. In Rust, use `try_into`.

In all these cases, Rust gives you more immediate semantic information about the conversion, and in fewer characters too!

johnsoft··on Run More Stuff in Docker
I appreciate the sentiment, but I wouldn't be able to put up with the slow container boot time for regular use. The author mentions this at the bottom. He claims 1sec delay. Last month I benchmarked it on new-ish hardware at 560ms, or 290ms if you disable namespaces (and so disable isolation).

I wanted to also benchmark bocker[1] (docker written in bash) for a baseline comparison, but it no longer runs and I threw in the towel after ~30 mins of tinkering.

Anyways, if you run something like `curl | jq | grep | less` you could be waiting a fair bit for all those containers to start. Package managers are pretty good these days. I think I can trust it to install `jq` properly.

[1]: https://github.com/p8952/bocker

johnsoft··on Dasung just released a 25 inch eInk monitor
That's the one, thanks!
johnsoft··on Dasung just released a 25 inch eInk monitor
>that one guy that made a fake painting by matching light levels to a white wall

Do you happen to have a link to this? I remember reading the original post years ago, but I didn't save it and could never find it again.

johnsoft··on Ask HN: Why does Pinterest dominate Google text search results?
I've seen the same, but with GitHub scrapers. One is called something like HappyGit, another is called GitMemory. And a lot of times Google thinks GitMemory is the original, so the _actual_ original source (GitHub) never even appears. So then I have to go to GitHub and try to find the original myself using snippets of text. Really makes my blood boil.
johnsoft··on Tokio 1.0 – async runtime for Rust
Just curious, did you consider wrapping the existing sync clients with something like spawn_blocking[1]? If so, what tradeoffs did you find?

[1]: https://docs.rs/tokio/1.0.0/tokio/task/fn.spawn_blocking.htm...

johnsoft··on Let's Solve the File Format Problem (2019)
Snark aside, this is obviously not a silver bullet. First reason that comes to mind: if you delete a file on the file system, the disk space can be reclaimed instantly. But if you delete a file in an archive, you must either rewrite the archive (since you can't "move" bytes in a file), or accept that disk space will be wasted.
johnsoft··on A Youtube video downloader written in Go
>What is the authors of youtube-dl's response regarding the takedown?

All I've seen so far is a blurb on the website https://youtube-dl.org/

>Currently our dev repository is taken down due to DMCA takedown notice by RIAA.

>Downloads still work as usual.

johnsoft··on ReactOS
A link to a random blob means nothing if it's not actually in the tree. Here's how that link was faked:

- https://news.ycombinator.com/item?id=10005577

- https://news.ycombinator.com/item?id=21025378

johnsoft··on Rust Starter Kit 2020
I'd suggest once_cell instead of lazy_static. No macros, faster compiles.

https://crates.io/crates/once_cell

johnsoft··on Intel’s 11th Gen Core Tiger Lake SoC Detailed
Just about every product since 2015 has been a lake. I'd guess "lake" is the code word for "just overclock last year's chip and call it a day"
johnsoft··on Single Page Applications using Rust
I think simple, trivial type systems offer simple, trivial correctness. Robust type systems can offer robust correctness (when used to their potential).
johnsoft··on Single Page Applications using Rust
>The borrow-checker in Rust is kind of silly tool to use in the context of a managed language

I suspect a lot people are drawn to Rust more because of its type system and great tooling. I'd be perfectly happy with a version of Rust that swapped out the borrow checker for a GC, but such a language doesn't exist today, and Rust does exist.

johnsoft··on TheirTube – How do the recommended videos look on their Youtube home page?
You might be interested in Invidious. It's a lightweight youtube frontend that runs in the browser.

https://invidio.us/

https://github.com/iv-org/invidious

You can host it yourself or use one of the many public installations: https://github.com/iv-org/invidious/wiki/Invidious-Instances

johnsoft··on Luigi Model found in Mario 64 source code
This leak happened exactly 24 years and 01 month since SM64 was first released :)
johnsoft··on I made a simple geolocation service
Your service has a response time of 20-30ms (from one of my servers, at least). So on top of everything else it's faster than OP too. Great example!
← PreviousPage 2 of 5Next →