HNHacker News
TopNewBestAskShowJobs

PhilipRoman

1,984 karma · joined October 20, 2018

submissionscomments
PhilipRoman··on Show HN: I've updated my Linux System Call website and API
I think the number is mostly meaningless even if we ignore whether they're distinct or not. Consider ioctl() - it's a single syscall but if I remember correctly the number of subcommands is in the thousands.
PhilipRoman··on Show HN: I've updated my Linux System Call website and API
I wouldn't call any of them similar, except for 'pread' maybe. Each one has a lot of subtle semantics. Either way, it's syscall.tbl that determines whether they are distinct syscalls, not the author's page
PhilipRoman··on Trials and Tribulations of Native Lua Compilation
1) You can use interpreted version for rapid development and switch to compiled for release

2) You may like Lua as a language and want to use it for general purpose programming, not necessarily embedding into host program

I will say though that the performance aspect has to be taken with a grain of salt, "native compilation" is not a meaningful improvement if every source line translates to multiple branches or vtable lookups. From my experience plain conversion of Lua to C (assuming you faithfully follow the specification, including coroutines, metatables, etc.) produces equal or slower code with rare exceptions for numerical loops. If it wasn't all AI generated I'd maybe spend time understanding this project.

PhilipRoman··on No portable way to detect string-to-float conversion errors in standard C
Maybe that wasn't the best example since you cannot even cast to a function pointer within standard C (but you can in POSIX). If you consider POSIX as portable then writing your own dlopen is pretty simple and you don't even need to be aware of calling conventions, though there are some architecture specific things in the ELF format. But either way it will not integrate well with mechanisms that people expect to work like LD_* environment variables, /etc/ld.so.conf and so on. So I still think it matches the "possible but will not integrate with rest of the system"
PhilipRoman··on A Modern Web App in C
Emitting strings is fine, it's the parsing that sucks.
PhilipRoman··on No portable way to detect string-to-float conversion errors in standard C
Case in point: echo y | LANG=lv_LV.UTF-8 grep '[a-z]'
PhilipRoman··on No portable way to detect string-to-float conversion errors in standard C
I would say there are 3 broad classes of libc functions

1) functions that you cannot implement in portable C - syscalls, signals, ABI specific things like longjmp and setcontext

2) functions that you could implement by yourself in portable C, but they are expected to play nice with the rest of the system - a lot of POSIX user stuff, dns management, dlopen, all the nsswitch mess. Can't think of any standard C examples because of the extreme portability requirements of C. Maybe the locale stuff, although it's usefulness is dubious.

3) functions that are there for convenience and sometimes compiler special-casing, like math, str*, <db.h> stuff that was thankfully removed from glibc

Most of #3 should be ignored. #2 is optional, especially if your software is for end users and not packaged by a distro. Sometimes it's safer to ship your own MDNS implementation for example rather than hope that the distro has sane defaults.

PhilipRoman··on Ask HN: What do you run on a $5 VPS that's worth keeping online 24/7?
I'm curious why do you need manual intervention after a power cut. Isn't configuring bios enough for this?
PhilipRoman··on A third way of using Linux
another comment on a different HN thread pointed out a similar issue. Now I'm wondering if backdrop-filter can be used correctly at all or should just be avoided entirely
PhilipRoman··on Git 3.0's upcoming SHA-256 default will be a costly mistake
GitHub could make it the default for new repositories created via web UI and devs who don't touch the CLI probably wouldn't even notice
PhilipRoman··on In an $80 motel room, a discovery to shed light on the origins of life
I'm in the process of building one myself. Take what I'm saying with a massive grain of salt, but I believe you basically need three things - objective, tube lens and a camera module.

If I were you, I would probably buy a normal microscope that supports a microscope camera attachment, instead of specifically looking for USB microscope. There is a lot of misleading marketing around USB microscopes, a lot of them are literally just doing digital zooming in (I have a 30€ "1000x" microscope from Amazon which is nice for soldering and such things, but these fake microscopes appear even at higher price ranges). Treat anything >1000x for light-based microscopes as a red flag.

PhilipRoman··on Why isn't mutable a subtype of immutable, or vice versa?
In C, const can also answer B, but only in non-pointer contexts.
PhilipRoman··on CCC invites all model citizens to 40C3
The doc won't point it out explicitly and I apologize if my explanation offends anybody, but the intention is basically leftist, state-friendly bitcoin. The authors took a look at the anarchy of real cryptocurrencies and realized they don't actually like anarchy, so instead they want to make something "wholesome" that governments would be willing to go along with (since they can tax it).

They are funded by EU and banks in an attempt to claw back some market share from cryptocurrencies which are slowly getting banned.

PhilipRoman··on Scaling Golang CI by Replacing actions/setup-go
The way caches are managed in CI is bonkers (at least in GitLab, but GitHub probably does the same). I guess it's built to conveniently work with the simplest of projects. I had to reimplement the mechanism by hand just to get basic things working, like not downloading the entire cache when only a few entries will be used for each build
PhilipRoman··on Base84 deserves a place in file names
and for programs that don't respect this convention ./--file
PhilipRoman··on A Design Space Exploration of Async/Await
I'd say Java's virtual threads are also a parallelism construct (at least in the performance sense, not logical guarantees), since they're scheduled on a pool.
PhilipRoman··on A Design Space Exploration of Async/Await
Just to nitpick, it's a 8MB-sized mapping, not 8MB of RAM.
PhilipRoman··on Trusting-Trust Attack against an Entire Linux Distribution
Write a subleq interpreter with a magnet and a steady hand? (Hopefully the magnet is not compromised)
PhilipRoman··on There's No Limit to How Bad Code Can Get
I can believe that... We've had logging macros break because line numbers no longer fit in an u16

I would love a TV show like "Hell's kitchen" except it's code bases and development processes.

PhilipRoman··on JIT Compiling Code in 5μs
W^X is typically per mapping, not per memory page and does not interfere with JIT compilation.
PhilipRoman··on Wi-Fi 8 is the first wireless upgrade in years that isn't chasing speed
"per band" is also hilarious, as if you could get that kind of data rate in 2.4GHz
PhilipRoman··on WhatCable: Know what your USB-C cable can do
Am I missing something? For practical use you only care if it carries a certain amount of packets per second without excessive retries, not whether it preserves the waveform exactly.
PhilipRoman··on Why does Opus 5 feel worse to work with?
I even saw it using the -bearing suffix in other cases, like describing a function responsible for 802.11 radar detection as "radar-bearing"
PhilipRoman··on Kinney Drugs pulls back AI phone assistant after hundreds of customer complaints
This is an underappreciated point when people talk about AI/chat integrations. If they put a claude-level model behind it, I'm sure it could resolve 99% of the situations faster and better than a human could, or at least realize its limitations when it can't. But of course that is too expensive so they often use extremely weak models that are literally worse than a good incremental full text search box.
PhilipRoman··on Incentives are for losers
On the other hand, there are vastly fewer rich people than poor, so for many things it doesn't matter if they can pay the fine. If only millionaires were littering, the streets would be quite clean.
PhilipRoman··on libexpat now funded by the City of Munich for up to 6 months
It's very difficult to do it smoothly with no downtime, but all it takes is one emergency for the existing workflows to be thrown out. Companies suffer emergencies and data losses all the time and nothing ever actually happens, they get over it.
PhilipRoman··on Run Kimi K3 using 29 GB of RAM at 0.50 tok/s
It still has much better latency than modern NVMEs and much, much better write endurance (probably not critical for AI workloads)
PhilipRoman··on The C ``Clockwise/Spiral Rule''
I think the only significant mistake was having both prefix and postfix operators for types. If they all neatly sat on one side there would be no problem.
PhilipRoman··on PyPI Blog: Releases now reject new files after 14 days
There seems to be a severe lack of hash pinning in "modern" software ecosystems. We figured out how to do it 20+ years ago with Git bringing hash addressed storage to the masses. Coming from a different background it was very surprising for me to see things like docker images, packages and github actions being updated at the whim of upstream registry. I much prefer the philosophy where builds are fully offline and predictable, even if not fully reproducible.
PhilipRoman··on Map of the world's great castles and fortresses
Probably something on your end, it is using a normal letsencrypt cert
Page 1 of 29Next →