HNHacker News
TopNewBestAskShowJobs

ekimekim

2,338 karma · joined November 9, 2012

Programmer, gamer, chaser of random interests. github: https://github.com/ekimekim
submissionscomments
ekimekim··on GitHub Actions as a time-sharing supercomputer
You are mistaken. From https://hub.docker.com/_/docker:

    What is Docker in Docker?
    Although running Docker inside Docker is generally not recommended, there are some legitimate use cases, such as development of Docker itself.
    ...If you are still convinced that you need Docker-in-Docker and not just access to a container's host Docker server, then read on.
This makes it pretty clear that it's a different copy of the docker daemon (which eg. allows you to test changes to docker itself) and specifically says it's different from "just access to a container's host Docker server".
ekimekim··on Ask HN: Who wants to be hired? (January 2024)

    Location: physically Australia but can work any time zone (US preferred)
    Remote: Yes
    Willing to relocate: No
    Email: hn@ekime.kim
Infrastructure/Platform/SRE/DevOps engineer with 10+ years experience. Container management, IaC, CI/CD, observability, database management, etc. Previous experience with python, golang, typescript, but should easily be able to pick up whatever is in use.
ekimekim··on Ask HN: Who wants to be hired? (December 2023)

    Location: physically Australia but can work any time zone (US preferred)
    Remote: Yes
    Willing to relocate: No
    Email: hn@ekime.kim
Infrastructure/Platform/SRE/DevOps engineer with 10+ years experience. Container management, IaC, CI/CD, observability, database management, etc. Previous experience with python, golang, typescript, but should easily be able to pick up whatever is in use.
ekimekim··on System76's Lemur Pro Laptop Is Just a Nice Linux Laptop
Chiming in with my customer support experience: My battery started to inflate after a bit over a year. I did some research and knew their warranty didn't cover this, but I contacted support anyway for help with finding a replacement.

They weren't able to ship me a replacement battery due to international shipping restrictions but were very helpful by giving me the part number to look for and linking to their very good docs on how to do a battery replacement yourself. In the end I was able to have them ship a replacement battery to a friend with a US address, and doing the actual replacement was very easy.

ekimekim··on System76's Lemur Pro Laptop Is Just a Nice Linux Laptop
I've had the complete opposite experience (I replaced their Pop OS with Arch Linux). With light usage I get about 10 hours, if I'm playing games or something then yeah it drops a bit but not that much. It easily lasts the duration of an intercontinental plane flight which is my primary use-case.

Maybe it's because I don't actually use it all that much, so my battery hasn't had many cycles put on it. I only use my laptop for travel, normally I have a desktop. That's why I went for a small, highly portable model.

ekimekim··on Burkey Belser, designer of the nutrition facts label, has died
My bigger issue is when drinks advertise "less sugar" but include these things, and I have no clue until I take a drink then have to throw the rest away because it tastes disgusting.
ekimekim··on Berlin Review: LAN Party
Yeah on Firefox on desktop (with uBO) scrolling doesn't work, and Reader Mode didn't have any of the content, so I just closed the tab. There's plenty of less user-hostile websites to read.
ekimekim··on Brute-forcing a macOS user’s real name from a browser using mDNS
And none of this helps you if the server in question isn't actually a HTTP server, but something else (that only ever expected to be exposed on localhost). Depending on the exact syntax it expects, it's plausible that a HTTP request (even a CORS request) might be misinterpreted to do something nefarious.
ekimekim··on Breaking java.lang.String
As sibling comments point out, mutexes aren't needed here. But to answer your direct question, Rust's type system enforces the use of mutexes to access protected values (if you're using the stdlib Mutex implementation) by only allowing access to protected values through a MutexGuard object which is created by locking the mutex. The borrow checker enforces you can't access the MutexGuard concurrently, so therefore you can't access the protected value concurrently.
ekimekim··on Firefox address bar
Yep you can. I have mine configured so that it will only search when I use one of the search prefixes. So to search on google I type "g example.com", and this is unambiguous with actually wanting to go to example.com.
ekimekim··on Minecraft Wiki considers move away from Fandom to new platform
No, because Fandom would revert the disclaimer.
ekimekim··on Hypersonic missiles are misunderstood
We cannot not allow a Space Laser Gap!
ekimekim··on UUIDs are obsolete in the age of Docker
As the article points out, this is only an issue with UUIDv1. They claim "However, it is what most applications use." but I have no idea how true this is. I was under the impression that the vast majority of UUID generators were v4 by default. For example:

Postgres only offers random uuid generation (https://www.postgresql.org/docs/15/functions-uuid.html).

The `uuidgen` CLI tool, at least for modern versions (I have not checked historically), says (from https://man7.org/linux/man-pages/man1/uuidgen.1.html): "By default uuidgen will generate a random-based UUID if a high-quality random number generator is present." (later it lists /dev/random as such a generator, present on almost all systems)

What's an example of a system that generates v1 uuids by default?

ekimekim··on Just Simply – Stop saying how simple things are in our docs
The long-standing convention here, particularly for command line usage, is that:

- String literals should be in lowercase (because by convention commands, argument names, etc should always be in all-lowercase, eg. "git cherry-pick" not "git cherryPick" or "git CHERRY-PICK")

- Metavariables (stuff the user should fill in) should be in ALL-CAPS.

- Not as strictly adhered to but still useful, [optional part] and {repeatable part}.

So eg. your example might look like:

    $ bin/rails generate scaffold --user=NAME --email=LOGIN
and an example usage would then be:

    $ bin/rails generate scaffold --user=ekimekim --email=ekimekim@example.com
As far as I'm concerned, for documenting command usage, there is no excuse not to use this scheme.
ekimekim··on The weird world of Windows file paths
> NODE"accountname password"::device:[directory.subdirectory]filename.type;ver

Interesting. When you think about it, that doesn't look all that different from:

scheme://user:password@host:port/directory/filename.type?key=value&key=value#fragment

which is arguably the most common kind of "file path" in use today.

ekimekim··on SpaceX Starship rocket explodes minutes after launch from Texas
Well the problem here is that the front didn't fall off.
ekimekim··on Why did Prolog lose steam? (2010)
Using a template to render out text that is then interpreted as something else (YAML in this case) is always fraught with quoting issues, complex workarounds, and for YAML specifically indentation issues.

You see the same thing with the C preprocessor - there's a very good reason that basically no language since has copied that design, and it's infamous for being full of footguns.

A far simpler and more manageable solution is to generate the same data structure (the final manifest) in a language which can actually represent those data structures directly. That might be a dedicated language like Cue or Jsonnet, or it could just be a general purpose programming language. You can generate the data structure using whatever tools you like, and then render it to JSON or YAML to be consumed by whatever tool is uploading it to kubernetes (kubectl apply, helm, etc).

ekimekim··on Spanish climber emerges after 500 days in cave
I've been on a 28h day for about a decade now. It's completely changed my life. I used to be tired all the time and end up napping during the day, sleeping through lectures, etc. Only to get home and be unable to sleep until the early hours of the morning. Now I can get a good night's sleep every "night" (I aim for 8 hours every 28, in practice I get to bed a little early and sleep in, so it's more like 9 on average) and don't get tired until the last 4 hours or so before bedtime.

Besides the big one, some other positives:

- Lack of a single time zone means I can participate in international work/online communities regardless of location

- Jet lag is mostly not a thing, since my schedule is independent of where the sun is

- Plenty of quiet time while everyone else is asleep. I live in a very safe area and love going on 2am walks in the park with the entire thing all to myself.

And some negatives:

- My social life suffers a lot. I can only attend events if they happen to fall on a day of the week where I'm awake at that time. Right now this is mitigated somewhat because I'm living in Australia but working at US working hours, which means my weekend schedule lines up with "local time". So I tend to see local friends mostly on weekends.

- Requires flexible working hours, as it's not possible to be awake from 9-5 for 5 days in a row no matter what start point you pick for your schedule. From my coworkers perspective, I come in early on mondays (ending around their midday) and late on fridays (starting around their midday).

- At larger companies where they may want to do a "follow the sun" on call rotation (so you're only on call during your waking hours), I don't fit in anywhere because my waking hours aren't always the same.

- During winter, the lack of sunlight (since you're sleeping through it half the time) can get to you after a while.

- Anything that you're meant to do "daily" you either need to stretch to doing every 28hr instead, or have some complex accounting to do to ensure you do it once per 24h period (I mostly opt for the former).

(edited for formatting)

ekimekim··on PL/Rust 1.0: now a trusted language for Postgres
A large number of unsoundness bugs only work if you have access to the stdlib, because they're flaws in stdlib types and functions that use `unsafe` internally, and are supposed to present a safe interface around it.

If you a) don't have access to unsafe, and b) don't have access to the stdlib that lets you do powerful things without unsafe, then you're very limited in what you can do.

https://smallcultfollowing.com/babysteps/blog/2016/10/02/obs... discusses this further. Conceptually, you can think of "entirely Safe Rust" to be a very limited language, which you then progressively add "capabilites" to by exposing safe interfaces implemented with unsafe code. For example, Vec and Box (which require unsafe) grant safe code the ability to do heap allocations.

It's true that this is not designed as a security boundary. As I note in my comment above, the PL/Rust devs also make that clear. That doesn't mean it has no value as part of a defence in depth strategy.

ekimekim··on PL/Rust 1.0: now a trusted language for Postgres
Normally yes, but it looks like the trusted PL/Rust being discussed here is limited to some subset of Rust. They specifically note that `unsafe` code is not allowed, which means you can't (for example) implement your own syscalls or construct a pointer into postgres internals memory.

However, they make it clear that this is not intended to be your only defence against an attacker:

> Note that this is done on a best-effort basis, and does not provide a strong level of security — it's not a sandbox, and as such, it's likely that a skilled hostile attacker who is sufficiently motivated could find ways around it

ekimekim··on Tesla workers shared ‘intimate’ car camera images, ex-employees allege
From the article:

> In its customer privacy notice, Tesla explains that if a customer agrees to share data, “your vehicle may collect the data and make it available to Tesla for analysis. This analysis helps Tesla improve its products, features, and diagnose problems quicker.” It also states that the data may include “short video clips or images”, but is not linked to a customer’s account or vehicle identification number, “and does not identify you personally”.

So it sounds like this was an opt-in data sharing option, but likely of the kind that everyone just clicks through without reading, consent but not informed consent. Unfortunately that isn't a Tesla-specific problem either, but it does seem that the reason they're not taking measures like encrypting camera data as you describe is that it was intentional that the company have access to this data - of course from there it's practically inevitable that bored employees would abuse it like this.

ekimekim··on Your "simulation" might not need state
> You can also see a connection to a version control system like Git. Instead of keeping snapshots of all the contents of the repository after each commit, one can keep only the initial repository state and changes in each commit.

Not to invalidate your point, but this is a common misconception with git. Yes, many git commands will treat a commit as a diff compared to its parent(s), but the actual commit object is storing the full state of the tree. This still works out to be fairly efficient because if a file is identical between two commits, it is only stored once, and both commits point at the same stored file.

ekimekim··on My Hardest Bug Ever (2013)
I encountered a similar issue once. The first indication something was wrong was weird corruption issues across a variety of services in our kubernetes cluster. In particular I focussed in on a service that took gzipped messages from a queue, which was reporting that some messages could not be decompressed.

First I confirmed that I could pull the corrupt message from the queue and it was in fact corrupt - so the problem was not in the consumer (which was throwing the error) or (probably) the queue, but rather the producer which created the compressed message.

On a hunch, I took a corrupted message (about 64KB in total) and wrote a quick program that took each bit of the message and tried the decompress operation with that bit flipped. Sure enough, there was one bit at offset 13000 or so which, if flipped, made the message decompress and at least visually appear intact.

Anyway, it turned out to be a single node with a hardware issue of some kind - rather than diagnose it fully we ended up just replacing the node. Repairing all the corrupted stuff that services on that node sent out was a much bigger concern.

ekimekim··on Zig's multi-sequence for loops
With bounds checks: game crashes, meaningless error message given to the user.

Without bounds checks: I join a multiplayer lobby, and the next thing I know my computer is part of a botnet.

This isn't an imaginary fear, it has happened many times. Some examples from a brief search: https://gridinsoft.com/blogs/rce-vulnerability-in-gta-online... https://www.polygon.com/22898895/dark-souls-pvp-exploit-mult... https://security.gerhardt.link/RCE-in-Factorio/

I am not claiming all of these would've been prevented by bounds checking arrays, or even memory safety in general. The point is that security is not optional just because it's a game.

ekimekim··on Git commands you probably do not need
I occasionally use empty commits to leave notes to myself that I want to be shown when I go to clean up my history (generally with rebase -i) and get it ready for review. It works well as rebase -i will default to commenting out empty commits, thus drawing attention to them.
ekimekim··on The strange case of Britain’s demise
It's simply ranked choice voting (aka IRV) for the house. "Two-party preferred" is a system used by polls and news to try to convey how they think the runoff voting will play out, by picking the two candidates most likely to come first and second and showing their expected final tally.
ekimekim··on Firebase's Firestore Is Down
Can confirm here. The backend admin API appears to be working, but the frontend SDK is not.

According to reports this is only affecting us-central1.

Edit: Their status page is finally updated: https://status.cloud.google.com/incidents/w7D5XGtVfMGcdcg4Zz...

ekimekim··on Vasa's sister ship Äpplet found
There are two important reasons to not disturb historical wrecks:

* In many cases the Baltic can do a better job of preservation than we can on the surface. It's survived 300 years down there, it's more likely to survive the next 300 if left in the same environment rather than introducing new effects. Put another way, anything that DOESN'T get preserved well in that environment is already gone anyway.

* It keeps the artifacts in their "context" - the place they were originally. You never know what new information may come to light later, and something seemingly insignifigant about the wreck site may prove to be important later. If you remove the wreck from the site, it's much much harder to link back all the artifacts to the place they came from.

ekimekim··on For the love of god, stop using CPU limits on Kubernetes (updated)
The argument against this is consistency. Without a limit set, you are only guarenteed up to your request's worth of cpu, but you will often be allowed to have more. This can create a false sense of security, as your application is working fine (even though it occasionally exceeds its request). Until one day, when a neighbor happens to get thirsty, and your application suddenly breaks. Limits front-load the brokenness so that it happens immediately instead of randomly.
ekimekim··on GitHub Actions Pitfalls
I've hit problems where YAML generated by one implementation will hit parsing quirks in another implementation. Now my advice is: If you have something that consumes YAML, generate JSON and feed it that instead. YAML is defined to be a superset of JSON, and every implementation should be able to handle it fine.

For those interested, the problem was with the string "08". At least at the time, the pyYAML generator I was using would render it as 08 (without quotes), which is not parsable as a number because the leading 0 indicates the number is in octal, but 8 isn't a valid octal digit. Since it wasn't parsable as a number, it should default to being treated as a string. However the golang parser disagreed and instead raised an error because "8" was not a valid octal digit.

← PreviousPage 3 of 20Next →