HNHacker News
TopNewBestAskShowJobs

PhilipRoman

1,977 karma · joined October 20, 2018

submissionscomments
PhilipRoman··on Show HN: Evolved.lua – An Evolved Entity Component System for Lua
Lua uses tagged unions so that primitives are stored inline within a table. Some time ago I benchmarked this and the perf gains from SOA were significant. Besides, even if you had to chase pointers, SOA still means you can reduce the number of allocations.
PhilipRoman··on GitHub Copilot Coding Agent
This is something I've noticed as well with different AIs. They seem to disproportionately trust data read from the web. For example, I asked to check if some obvious phishing pages were scams and multiple times I got just a summary of the content as if it was authoritative. Several times I've gotten some random chinese repo with 2 stars presented as if it was the industry standard solution, since that's what it said in the README.

On an unrelated note, it also suggested I use the "Strobe" protocol for encryption and sent me to https://strobe.cool which is ironic considering that page is all about making one hallucinate.

PhilipRoman··on Ditching Obsidian and building my own
It's sad that "zero trust" has become almost the opposite of what it originally meant. Now you can have the same insecure RDP server with admin/admin login but at least it's protected by a VPN that only a few tens of thousands of people have access to.
PhilipRoman··on $20K Bounty Offered for Optimizing Rust Code in Rav1d AV1 Decoder
Purchasing power parity strikes again... There are places in EU where that is 6 to 12 months of pay for a programmer.
PhilipRoman··on Flattening Rust’s learning curve
Right but Rust is supposed to be a systems language. We already have dozens of languages that are easy to learn. The whole reason for having compile time memory management is to satisfy the constraints of a systems language...

I don't think it's much harder than learning C or C++ which are the only comparable mainstream languages.

PhilipRoman··on Multiple security issues in GNU Screen
In theory you're correct, but by that logic you'd also have to add ssh (probably by far the most common way of connecting to a remote terminal today). I guess you'd end up with something like mobaXTerm which is a valid approach for sure, but doesn't compose as well.

Personally I live by the maxim "if it can be separated without significant drawbacks, then it should be separate" but GNU tends to see it differently.

PhilipRoman··on Multiple security issues in GNU Screen
I'm not sure what made "screen" integrate the two separate pieces of functionality - you can use something minimal like "tio" for serial port access and it's much more elegant.
PhilipRoman··on Boy Accidentally Orders 70k Lollipops on Amazon. Panic Ensues.
It is and I would love to know when exactly that is the case. Normally all my online payments require 2FA, but some companies can apparently just transfer my money automatically. I'm guessing they need some kind of agreement with the bank, as otherwise 2FA would be pointless.
PhilipRoman··on Prepare your apps for Google Play's 16 KB page size compatibility requirement
You can probably replace some of those use cases by mapping the same physical page in two places with different permissions (W^X is per-address, not per physical page).
PhilipRoman··on Ask HN: What are good high-information density UIs (screenshots, apps, sites)?
Lol, they managed to use the word "AI" 12 times in the landing page of an UI framework...
PhilipRoman··on Docs like code in basic terms
Believe it or not, when I started to learn programming I had no idea that "plain text" was a thing, since I had only been taught Word at school. So I think this is very valuable for many people who work in tech adjacent areas.

Now I feel physical pain every time someone sends me documentation in Word format since I know there are at least five diverged versions floating around, with no easy way to compare them (Word diff is stuck in 20th century), full of embedded diagram PNGs that are impossible to update unless you were the author and inconsistent styling on top of that.

PhilipRoman··on Docs like code in basic terms
https://www.writethedocs.org/guide/docs-as-code/

Docs like code is a single term, maybe capitalization or dashes would help

PhilipRoman··on Docs like code in basic terms
It's kind of its own thing at this point, people write "design doc" in singular so "docs" could very well be short for "documents".
PhilipRoman··on Matt Godbolt sold me on Rust by showing me C++
>what are they supposed to do when there is no memory left

Well on Linux they are apparently supposed to return memory anyway and at some point in the future possibly SEGV your process when you happen to dereference some unrelated pointer.

PhilipRoman··on Nnd – a TUI debugger alternative to GDB, LLDB
#include <iostream>
PhilipRoman··on Driving Compilers (2023)
Eh, it compiles down to the same thing with optimizations enabled:

https://godbolt.org/z/zcqa4Txen

But I agree, using printf for constant strings is one step away from doing printf(x) which is a big no-no.

PhilipRoman··on The complicated business of electing a Doge
Here is a fun paper with rigorous analysis of the protocol: https://news.ycombinator.com/item?id=40573814

"Electing the Doge of Venice: analysis of a 13th Century protocol"

Also some more discussion: https://news.ycombinator.com/item?id=38598171

PhilipRoman··on Gorgeous-GRUB: collection of decent community-made GRUB themes
I suspect it may depend on the monitor, not the bootloader. Some of them have a longer delay when turning on than others. My 4k connected over displayport has no problem, but my old VGA/DVI monitor that I use for homelab recovery cannot turn on fast enough.
PhilipRoman··on Converting a Git repo from tabs to spaces (2016)
git-blame-ignore-revs is great, but ultimately a half measure. Replace blame with log -L
PhilipRoman··on A faster way to copy SQLite databases between computers
Looks like it depends heavily on choice of file, but I see good performance on both compressible and uncompressible files. Small files tend to perform (relatively) bad though. Here is a sample of 3 large files with different compression ratios:

  zstd -b1 --fast -i10 some-rpi-os-image-idk.img
  -1#-os-image-idk.img :2097152000 -> 226798302 (x9.247), 6765.0 MB/s, 5897.3 MB/s

  zstd -b1 --fast -i10 jdk-11.0.8+10.tar
  -1#jdk-11.0.8+10.tar : 688844800 -> 142114709 (x4.847), 2660.7 MB/s, 2506.8 MB/s

  zstd -b1 --fast -i10 archlinux-2025.04.01-x86_64.iso
  -1#.04.01-x86_64.iso :1236303872 ->1221271223 (x1.012), 3643.5 MB/s, 7836.6 MB/s
PhilipRoman··on A faster way to copy SQLite databases between computers
It would have to be one really fast network... zstd compresses and decompresses at 5+ GB (bytes, not bits) per second.
PhilipRoman··on Path Isn't Real on Linux
I meant non-interactive, for use in scripts which take user input. We already have "--" for end of options, but the support for it is not universal and even with that some programs will interpret certain strings in a special way. On the other hand, prepending the dot-slash should work for any program or argument passing style.
PhilipRoman··on Path Isn't Real on Linux
Indeed, always prefer ./* to *

I often wish there was a convenient way of doing such an operation in the shell: if path start with "/", leave it, otherwise prepend "./"

PhilipRoman··on Ask HN: Is there hope for Microsoft 365 support?
What does that acronym mean? I'm not sure if you made a typo or if it's very unfortunate naming.
PhilipRoman··on I just want to code (2023)
This also depends heavily on the field, some sciences need particle accelerators and mass spectrometers, meanwhile we can get by on a $200 pc and free wifi. This means you can bypass a lot of traditional university/lab structures.
PhilipRoman··on Hundreds of smartphone apps are monitoring users through their microphones
Not an expert but I'd assume they keep track of the public IP of the device. When a site has bought this information and receives a request, they can record the link between person and account, so this needs to happen only once. On top of that you've got additional fingerprinting techniques to improve the accuracy.
PhilipRoman··on Writing "/etc/hosts" breaks the Substack editor
Low tech example: escape all newlines in user supplied strings, then add a known prefix to all user supplied data (let's say a double hashtag ##, but anything else works too). When you want to search logs for strings coming from your system, remove/ignore everything after the marker.

It all comes down to understanding whether the intersection of two grammars is empty.

PhilipRoman··on Writing "/etc/hosts" breaks the Substack editor
If structured logging is too much, unique prefixes solve this issue. Basically you need some token that user provided data is unable to output to the log. If you rigorously escape all newlines, you can then use start-of-line and end-of-line as unforgeable tokens. The possibilities are endless and it all comes down to understanding whether the intersection of two grammars is empty.
PhilipRoman··on Writing "/etc/hosts" breaks the Substack editor
Careless analysis of free-form text logs is an underrated way to exploit systems. It's scary how much software blindly logs data without out of band escaping or sanitizing.
PhilipRoman··on On loyalty to Your Employer
Well right now they do for me at least...
← PreviousPage 8 of 29Next →