HNHacker News
TopNewBestAskShowJobs

nemetroid

3,896 karma · joined June 7, 2010

Currently employed by a mid-size company.
submissionscomments
nemetroid··on Frying Eggs and Air Quality Tests
By "western", do you mean American?
nemetroid··on Models of European metro stations
Same in Gothenburg. There's a single underground station, with the platform in the middle, so the trams need to cross over. Another underground station is planned, but it will have the tracks in the middle instead.
nemetroid··on Many hard LeetCode problems are easy constraint problems
Maybe some preprocessing, maybe column generation, depends on the problem.
nemetroid··on Default musl allocator considered harmful to performance
GCC 12 is available for RHEL 7.
nemetroid··on The issue of anti-cheat on Linux (2024)
> So not really a problem with Genshin's anticheat (indeed, users who had never played the game or even heard about it would be affected), but a problem with how antivirus providers dealt with it.

The distinction doesn't really matter. The claim wasn't that the ransomware authors exploited deficiencies in the anticheat design, just that the anticheat was used to install the ransomware, which it was.

nemetroid··on Dev Compass – Programming Philosophy Quiz
I can't find it, but believe Joe Armstrong said something along those lines (but I think his number was ten).
nemetroid··on The Article in the Most Languages
I'm sure someone did.
nemetroid··on The Turkish İ Problem and Why You Should Care (2012)
Case insensitivity is a code smell?
nemetroid··on Git Changesets
From the "detailed explanation" document (my emphasis):

> When organising the release of packages, you may end up wanting to group several changes together written by different people and/or over a relatively large period of time. The best time to capture this information is when submitting a PR (when it is fresh in your mind), not when you eventually go to batch and release these changes.

> Git is a bad place to store this information, as it discourages writing detailed change descriptions - you want to allow people to provide as much documentation for the change as they want.

How does Git discourage writing detailed change descriptions? Is this a Github thing, i.e. the web UI workflows discourage it? I use Git a lot but barely use Github.

https://github.com/changesets/changesets/blob/main/docs/deta...

nemetroid··on Show HN: Remote-Controlled IKEA Deathstar Lamp
Looking at the Ikea US website, the Simrishamn and PS 2014 seem to have similar solutions: a plate that screws into an electrical box and provides a hook (the lowest common international denominator).

What do you do if you want to move a ceiling light a bit to the side? Do you install an entire new electrical box?

nemetroid··on Show HN: Remote-Controlled IKEA Deathstar Lamp
Never seen a light fixture that screws into the ceiling.
nemetroid··on The Value of Differences: Jennifer Lindsay on Noticing Translation
A book with that title would surely be very different indeed.
nemetroid··on Python’s new t-strings
Sure, and the safe() function proposed upthread might also just be doing logging.
nemetroid··on Getting Forked by Microsoft
All this uncertainty is caused by Microsoft's copyright infringement.
nemetroid··on Python’s new t-strings
Your "old" db.execute (which presumably accepts a regular old string) would not accept a t-string, because it's not a string. In the original example, it's a new db.execute.
nemetroid··on Self-contained Python scripts with uv
Between future statements and other imports, then?
nemetroid··on A Guide to Undefined Behavior in C and C++ (2010)
Ending your string literal with \n is much easier than using std::endl.
nemetroid··on Gleam, Coming from Erlang
> See Python files, which are closed when the file handle is collected (ie. when all variables holding it go out of scope)

That's a CPython implementation detail.

https://docs.python.org/3/reference/datamodel.html

> Do not depend on immediate finalization of objects when they become unreachable (so you should always close files explicitly).

nemetroid··on Roc rewrites the compiler in Zig
I don't think it's the point of the comment I replied to, no.
nemetroid··on Roc rewrites the compiler in Zig
By that definition, a C++ program with heavy usage of std::shared_ptr has GC.
nemetroid··on C stdlib isn't threadsafe and even safe Rust didn't save us
> we're going to ship symbols after this, no reason to over-optimize

You might want to look into debuginfod.

nemetroid··on The Ribbon Microphone
I don't have this particular issue, but instead the text size is hilariously huge. The CSS contains this fragment:

  @media (min-resolution: 1.5dppx) {
   :root {
    font-size: 2.4rem;
   }
  }
My 27 inch 4k monitor comes in at a device pixel ratio of ~1.58, triggering this (presumably) phone-targeted style.
nemetroid··on I've acquired a new superpower
Looking uncrossed at the images in the article on my phone, I can easily achieve the effect uninterrupted between fully stretched arms and about half that.
nemetroid··on Rules for writing software tutorials
I think many of these rules are good, but that there's a too strong focus on ensuring that shell snippets are copy-pasteable without inspection. This comes at the detriment of other considerations, and I think some of the advice goes too far.

Especially so when it comes to the different package names on different Debian versions: what originally was a oneliner is now fifteen lines long with six different branches. What should the reader do if the copy-pasted code fails? How do they know which part failed? What is an "/etc/os-release"? Yes, the happy path becomes simpler, but the reader will struggle to recover from any errors.

nemetroid··on Borrow Checking, RC, GC, and Eleven Other Memory Safety Approaches
The part where the article limits itself to general techniques eludes me.
nemetroid··on How types make hard problems easy
This is how we introduced and work with clang-tidy. We enabled everything we eventually want to have, then individually disabled currently failing checks. Every once in a while, someone fixes an item and removes it from the exclusion list. The list is currently at about half the length we started out with.
nemetroid··on Borrow Checking, RC, GC, and Eleven Other Memory Safety Approaches
No mention of RCU?
nemetroid··on Show HN: ImPlot3D – A 3D Plotting Library for Dear ImGui
The linked code is including math.h (transitively), but using the std-namespaced functions provided by cmath. That seems like a bug, but presumably works on at least one platform.
nemetroid··on A visual proof that a^2 – b^2 = (a + b)(a – b)
The entire proof is trivial.
nemetroid··on Move semantics in Rust, C++, and Hylo
The same is true of Rust. I have no idea why the author decided to print addresses only for C++ and not for Rust.

  // (1)
  struct Person {
      name: String,
      age: u8,
  }
  
  fn show(person: Person) {
      println!("Person record is at address  {:p}", &person);
      println!("{} is {} years old", person.name, person.age);
  }
  
  fn main() {
      let p = Person { name: "Dave".to_string(), age: 42 }; // (2)
      println!("Person record is at address  {:p}", &p);
      show(p); // (3)
  }
Its output is:

  Person record is at address  0x7ffcfb2b4e40
  Person record is at address  0x7ffcfb2b4ec0
  Dave is 42 years old
← PreviousPage 2 of 34Next →