HNHacker News
TopNewBestAskShowJobs

x-yl

79 karma · joined October 5, 2023

submissionscomments
x-yl··on I am giving up on VM Gaming
> GPU sharing with docker and VMs

This should work without needing a reboot. You do have to bind the vfio driver at boot, but the archwiki gives a script to unbind vfio and load the Nvidia driver: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Bi...

Which anecdotally worked fine on my RTX3050.

I did give up as well though, all of this is just too much of a faff. Hopefully Intel continues to make strides with their discrete graphics. They are the only manufacturer without DRM blocking this feature which the hardware can obviously do.

x-yl··on GitHub and the crime against software
Through the magic of Claude, here is what the two hundred and eleven javascript files that GitHub loads on accessing an empty repo with just .md files (https://github.com/github-samples/.github):

  ┌─────────────────┬───────┬────────────┬────────────┐
  │    Category     │ Files │ Total Size │ Total Time │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Copilot         │    32 │   1,749 KB │   1,141 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ GraphQL / Relay │     4 │   1,629 KB │     190 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Primer Design   │     4 │   1,617 KB │     329 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Highlighting    │     4 │   1,048 KB │     414 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Code View       │    14 │     966 KB │   1,226 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ React Core      │     6 │     692 KB │     446 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ UI Components   │    26 │     674 KB │   1,541 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ SVG             │     2 │     634 KB │      51 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Code Editor     │     9 │     615 KB │     366 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Vendored        │    17 │     608 KB │     986 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Issues          │    13 │     589 KB │     504 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Markdown        │     8 │     321 KB │     198 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Runtime         │    12 │     263 KB │     807 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ HTML Parsing    │     2 │     235 KB │     152 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Navigation      │    11 │     230 KB │     362 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Web Components  │     7 │     229 KB │     540 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Comments        │     4 │     131 KB │     146 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Analytics       │     5 │     103 KB │     348 ms │
  ├─────────────────┼───────┼────────────┼────────────┤
  │ Other           │    32 │     484 KB │    2099 ms │
  └─────────────────┴───────┴────────────┴────────────┘

Times given for a 150 Mbps WiFi connection.

Some personal highlights:

- Syntax Highlighting for every obscure language under the sun. Seems like the language analysis they do the repository does nothing.

- Shipping the editor on pages where there is no editor

- Shipping Copilot prompts. Incredible. { prompt:\"Analyze the test coverage of this codebase. Identify areas with missing or insufficient tests and add comprehensive test cases to improve coverage.\" }

- Just a javascript file with a massive 500K SVG.

- I don't really know anything about GraphQL & Relay. But 1.4 megabytes of generated ASTs?

- Shipping Protobuf, YAML, Lodash (hashing, unicode, collections), Typebox, GSAP and Framer

x-yl··on Migrating from Go to Rust
In my experience LLMs (I speak mainly of Claude Code & Cursor) write very poor quality Rust.

They treat it like it's JavaScript, falling back to using String/&str needlessly instead of making new types. They do ugly `static Mutex<Refcell<` a-la global JS variables for info sharing instead of working out the lifetimes to do it properly. It loves making functions infallible and then panic-ing within them and certainly I wouldn't use them for unsafe at all - they hallucinate safety comments which are in fact, totally unsound.

Of course these are all surmountable with an experienced developer to regularly step in and unfuck the code, but forcing them into 'harder' territory where every problem is not solved by a .clone() and an Arc<Mutex<>> means they will spend minutes 'thinking' about basic lifetime issues until I step in and add the missing `move` in a closure.

x-yl··on Gorilla: A fast, scalable, in-memory time series database (2016)
The simplicity of Gorilla is attractive but for better compression ratios without too much extra compute I'd instead recommend Sprintz: https://github.com/dblalock/sprintz.

The downside is that (a) Sprintz requires the data to be quantised to fixed point integers, usually fine if the data is coming out of a sensor of some sort and (b) the Huffman coding step of Sprintz requires dynamic memory allocation, whilst Gorilla is almost trivially implemented without it.

Also see Chimp, which proposes some small tweaks to Gorilla to improve its performance: https://dl.acm.org/doi/abs/10.14778/3551793.3551852

x-yl··on Artificial egg hatched 26 healthy chickens
It says at the bottom:

> This story is based on original reporting by Christina Larson for National Geographic. Read the full feature on National Geographic

https://www.nationalgeographic.com/science/article/artificia...

x-yl··on Wren: A classy little scripting language
An optional challenge gives an implementation of arrays for jlox at least: https://github.com/munificent/craftinginterpreters/blob/4a84...
x-yl··on Black hole merger challenges our understanding of black hole formation
An observer falling into the black hole would not observe any distortion in time. They would simply fall in, under the influence of gravity. From the perspective of a far-away observer it would look as if time is slowing down as the photons would take increasingly longer to escape. At the event horizon the photons would effectively be held in place. Eventually though, the last photon will have escaped and you will just observe a slightly larger black hole.

So the merger definitely happens from the point of view of the black holes. We might observe odd artifacts but they would eventually fade away.

x-yl··on Understanding Memory Management, Part 5: Fighting with Rust
Are you suggesting Rust should automatically insert the borrow annotation because it is able to see that a borrow is sufficient? That would be quite unintuitive and make it ambiguous whether a for loop is borrowing or consuming the iterator without reviewing the body. I'd strongly argue that it should unambiguously do either one or the other and not try and read the author's mind.
x-yl··on “Most promising signs yet” of alien life on a planet beyond our Solar System
I think you have misread the abstract. The 'low statistical significance' was a [prior work](https://iopscience.iop.org/article/10.3847/2041-8213/acf577). This paper has increased the significance to 3-sigmas which is on the lower end but still quite significant.
x-yl··on HMD Key – A lightweight, affordable smartphone
I imagine the usage limit is on flash write cycles to prevent premature failure of the storage, not on how much storage space is used
x-yl··on Kim Dotcom's extradition to the U.S. given green light by New Zealand
I take it it's in reference to the convictions of those inciting violence on social media following the recent far-right riots in England.

https://www.theguardian.com/politics/article/2024/aug/09/two...

I suppose in a way advocating for arson and hate crimes is an "illegal meme"..

x-yl··on Show HN: LLM-aided OCR – Correcting Tesseract OCR errors with LLMs
I'm curious if a multimodal model would be better at the OCR step than tesseract? Probably would increase the cost but I wonder if that would be offset by needing less post processing.
x-yl··on Anyone can access deleted and private repository data on GitHub
This behaviour is also important for ergonomic submodules. The .gitmodules file lists the upstream repo as the origin. So, if you're modifying an upstream project in a submodule and push changes to a fork, it's important that the SHA that git tracks is still reachable through the upstream link.

Ultimately I don't think it's feasible to break this behaviour and the most we can hope for is a big red warning when something counterintuitive happens.

x-yl··on XZ backdoor: "It's RCE, not auth bypass, and gated/unreplayable."
Can I ask for why it wouldn't have been discovered if the obvious delay wasn't present? Wouldn't anyone profiling a running sshd (which I have to imagine someone out there is doing) see it spending all its crypto time in liblzma?
x-yl··on Dropbox has hidden third party AI settings, not disabled them
Huh?

> What information is shared with third-party partners?

> Your files within Dropbox are sent to a third-party AI only when you chose to interact with AI powered features. For example, when you ask a question about a file.

[0]: https://help.dropbox.com/view-edit/privacy-settings-dropbox-...

x-yl··on This year in Servo: over 1000 pull requests and beyond
Andreas is incredible but that's an overstatement.

  $ git log --format="%an %s" | grep -E "Browser|LibWeb|Ladybird|LibJS" | wc -l
  15524
  $ git log --format="%an %s" | grep -E "Browser|LibWeb|Ladybird|LibJS" | grep "Andreas Kling" | wc -l
  4249
  $ calc 4249/15524
  ~0.28530018036588508116
Still a monumental feat but don't downplay the community that's rallied behind him.
x-yl··on Create a shortcut for even lower phone brightness
SoundAssistant on Samsung devices lets you do this as well. It gives you per-app sliders which stack with the main slider allowing you to go below 1% -- or whatever number rounds to "off" on your headphones.