HNHacker News
TopNewBestAskShowJobs

jlokier

6,144 karma · joined October 23, 2018

Mail: jamie@jlokier.co.uk LinkedIn: https://linkedin.com/in/jlokier

Knowledgable & helpful person, available for hire :-)

I'm looking for more work, ideally on a consulting / freelance / part-time basis.

LinkedIn is better than email to make first contact if you'd like to talk, whether for work or just chat about something you liked here on HN! (I often miss interesting one-off mails among the deluge, and don't check it every day.)

I work 80% time at a funded stealth startup as hands-on tech lead, with zero-knowledge (ZK) cryptography, Bluetooth low energy (BLE), and peer-to-peer distributed systems, linking physical devices as well as the usual web stack. Can't say more, but it is intended to become open source. This a really fun and challenging project, with a great team! (It's not on my LinkedIn - stealth).

With my remaining 20% I am currently available and looking for software dev and/or tech leadership and/or business strategy consulting.

I'm versatile but develop mostly low-level or "system" software in C, C++, Go, Rust and Nim, with Linux as my main OS (but MacOS and Windows also). I have about 30 years professional dev experience over a wide range of systems, from embedded to supercomputers, Linux kernel, database engines, as well as GUIs, the web, and even games. Good at performance optimisation, debugging. Also good math & physics.

I've worked as an Ethereum core dev (EVM), so I know that environment well, especially improving EVM database speed, which is a critical factor! Currently my rabbit holes are ZK cryptography speed optimisation, and a novel fast database engine (neither B-tree nor LSM-tree, but with characteristics of both).

(ZK = zero-knowlege cryptography).

submissionscomments
jlokier··on Apple and Meta go to war over interoperability vs. privacy
WhatsApp on Android has the same behaviour. Most of my conversations show as a bare phone number because I decided not to give it all my contacts.

However, WhatsApp groups show a name, so that's a workaround if you are using WhatsApp with someone you know well: Make a group for the two of you.

When a friend went to install WhatsApp for their iPad, they succeeded!

Then they said it wasn't working properly. Unfortunately that's because app store search brought up misleading third-party WhatsApp apps for the iPad. If you weren't paying attention, it was too easy to think you were installing the official app from WhatsApp. I didn't notice the app was third-party at first either, and I was very surprised to find no app at all from WhatsApp itself on closer inspection, amidst a page of search resulrs all claiming to be it.

jlokier··on The Power Mac 4400
Same here, but processing the entire history of Ethereum instead.
jlokier··on Process Creation in Io_uring
> it seems like linux already has functionality that could make spawning a process a lot more efficient and threadsafe. My idea is basically to use clone or clone3 to create a new process in a new thread group that shares the original processes memory (that is with CLONE_VM but not CLONE_THREAD). And pass a function point to call (instead of returning on the child process) and a heap-allocated stack for the child process to use.

In Linux you can do that with standard system calls, by spawning a thread with pthread_create() then calling vfork() from the thread. vfork() pauses only the parent thread, not the entire parent process, until the vfork child calls execve().The effect is to create a child task which has CLONE_VM but not CLONE_THREAD, which runs concurrently with all the other threads.

jlokier··on Ask HN: What should I do with meet.hn?
Interesting to see more hackers in Europe than the USA.

I wonder if that's representative of the distribution of HN users.

jlokier··on macOS Packaging for Ungoogled-Chromium
I use Firefox as my main browser on a Mac. A lot, every day - I have about 30 Firefox windows open now. But there are a number of things that only work in Chrome or Safari.

So I also use Ungoogled Chromium. I have about 3 Ungoogled Chromium windows open now.

Occasionally a banking, financial service, shopping or video meeting site doesn't work right in Firefox. I've had some site logins just spin forever in Firefox, and work immediately in Chromiun.

For example, for work with one company we use Google video meetings a lot. In theory this works in Firefox, but in practice sometimes the audio doesn't work. The microphone volume gets set to zero, unpredictably. It's flaky enough that I switched to Ungoogled Chromium for those, and decided to use it for all the Google Workspace linked services for that company, as well as AWS, Hetzner etc accounts linked with that company.

Chromium's profiles are good, with clear separation and a reasonable UI. So are Firefox containers, but in different ways.

Firefox automatic per-site container selection doesn't work at all well when you have multiple accounts on the same site, though. It doesn't group container-switching according to working context. So I have a couple of Ungoogled Chromium profiles for work with different companies.

Finally, Chrome renders print-to-PDF better for some use-cases, so I use Ungoogled Chromium to generate invoices and similar documents. Firefox print-to-PDF works, but I could never get ruled lines to be.a good thickness on the printed page. They were always too thick, or invisible. Firefox did better pagination last time tried it, though.

jlokier··on Show HN: Indentation-based syntax for Clojure
> If you print out the parsed representation of this whitespace code, you get back the lisp code (data) also. But this is different to what you fed into the parser.

First, Lisp is not homoiconic by that definition either. If you read "( + 1 2 )" as a Lisp object then print it, you'll get "(+ 1 2)", which is not the same string.

We understand that difference in sexp whitespace to be superficial, and superficial can be technically defined, but it's a difference. If you accept that superficial differences are allowed within the definition of homoiconicity, you can define the difference between indententation syntax and sexp syntax to be superficial too, if you want.

Second, it's not true that what gets printed has to be the Lisp representation. It depends which print function you use. Homiconicity requires the reader and printer match. If you write a different reader, to accept a different syntax, then you need to use the corresponding printer.

If you print_with_new_syntax (a function name I've made up), you get back the original code in its indentation-based form, which makes the pair read_with_new_syntax + print_with_new_syntax homoiconic in the classical Lisp sense.

There may be superficial differences, such as if you put in "baz 1 " and get out "bar 1" (missing a space), or "baz" followed by "1" indented on the next line, but as noted above, Lisp sexps have this characteristic too.

(Then consider "(+ 1 #-t 2 3)" which in a Lisp that supports #- evaluates to 4. Read that and print it, you'll get "(+ 1 3)", which isn't a superficial difference any more.)

jlokier··on Bocker: Docker implemented in around 100 lines of Bash (2015)
That'll handle whitespace in paths, but if you want it to handle all path characters, dirname and mkdir need "--" here too.
jlokier··on FireDucks: Pandas but Faster
Nice insight!
jlokier··on Shift Left Is the Tip of the Iceberg
> Why is it written like that anyway?

Because it's an ARM trademrk, and that's how they want it written:

https://www.arm.com/company/policies/trademarks/arm-trademar...

> (Wikipedia seems to want me to call it "heterogeneous computing", but that doesn't make sense - surely that term should mean running on CPU+GPU at the same time, or multiple different ISAs.)

According to Wikipedia, it means running with different architectures, which doesn't necessarily mean instruction set architectures.

They do actually have different ISAs though. On both Apple Silicon and x86, some vector instructions are only available on the performance cores, so some tasks can only run on the performance cores. The issue is alluded to on Wikipedia:

*> In practice, a big.LITTLE system can be surprisingly inflexible. [...] Another is that the CPUs no longer have equivalent abilities, and matching the right software task to the right CPU becomes more difficult. Most of these problems are being solved by making the electronics and software more flexible.

jlokier··on A computational analysis of potential algorithmic bias on X during the election
I don't read X, but in the last few days I get the impression Youtube Shorts are becoming Elon's personal propaganda machine.

About 1 in 20 shorts in my feed are clips of Elon saying something stupid yet appealing, basically meme videos of Elon-the-saviour, with thousands of thrilled we-love-Elon-he's-brilliant and this-is-much-better-than-corporate-media (spot the irony...) comments below.

The comments seem AI generated or paid for to me because I can't imagine so many people thrilled in such a uniform and bland way, and similar style, with virtually no intelligent responses or discussion about any of the issues. Given the obvious politics and consequences of Elon's policies, I'd expect to see something in the comments if they were real people.

I understand the feed and comment promotion algorithm might promote uniformly similar comments to create a misleading bubble, though.

jlokier··on Linux Syscall Support
Another use-case is when you are writing threaded code that uses the clone() syscall instead of pthreads, usually for something with high performance, unusual clone flags, or a very small stack.

Most libc functions, including the syscall wrappers and all pthreads functions, aren't safe to call in threads created by raw clone(). Anything that reads or writes errno, for example, is not safe.

I've had to do this a couple of times. One a long time ago was an audio mixing real-time thread for a video game, which had to keep the audio device fed with low-latency frames for sound effects. In those days, pthreads wasn't good enough. For talking to the audio device, we had to use the Linux syscall wrapper macros, which have been replaced by nolibc now. More recently, a thread pool for high-performance storage I/O, which ran slightly faster than io_uring, and ran well on older kernels and ones with io_uring disabled for security.

jlokier··on Alonzo Church: Architect of computer intelligence
I felt it simplified the description to not mention they were assembler macros, but in retrospect, that was begging for a correction :-)

The linked page with details was interesting, thanks!

jlokier··on Alonzo Church: Architect of computer intelligence
The names CAR and CDR weren't invented for Lisp or FLPL. They came from assembly language mnemonics on the IBM 704, where the first Lisp interpreter was implemented.

The original Lisp CAR and CDR operations used the machine-level instructions with those names on the IBM 704.

Cons cells were stored in single words of the 36-bit memory and 36/38-bit registers, and the CAR and CDR operations accessed the "address" and "decrement" 15-bit parts of a word, respectively.

jlokier··on How I write code using Cursor
At one company, the CEO said AI tools in general should not be used, due to fear of invalidating a patent application in progress after the lawyer said it must be kept secret except with NDA partners. I explained that locally run LLMs don't upload anything, so those are ok. This is a company that really needs better development velocity, and is buried alive in reports that need writing,

On the other hand, at another company, where the NDAs are stronger and more one-sided, and there's a stronger culture of code silos, "who needs to know" governing read access to individual code repos, even for mundane things like web dashboards, and higher security in general, I expected nobody would be allowed to use these tools, yet I saw people talking about their Copilot and Cursor use openly on the company Slack.

There was someone sitting next to me using Cursor yesterday. I'd consider hiring them, if they're interested, but there's no way they're going to want to join a company that forbids using AI tools that upload code being worked on.

So I don't think companies are particularly consistent about this at the moment.

(Perhaps Apple's Private Cloud Compute service, and whatever equivalents we get from other cloud vendors, will eventuall make a difference to how companies see this stuff. We might also see some interesting developments with fully homomorphic encryption (FHE). That's very slow, but the highly symmetric tensor arithmetic used in ML has potential to work better with FHE than general purpose compute.)

jlokier··on New Mac Mini with M4
The other comments talk about Asahi Linux, which doesn't support the M3 yet. You can also run Linux in a VM on MacOS, and it runs very well.

For some uses you won't get the best performance compared to native Linux. But for a Plex/Kodi server a VM should be great.

(On an x86 Apple laptop I found the power consumption better with a Linux VM on MacOS than with native Linux, so VMs can be quite efficient for some uses. Software builds sometimes run much faster in a Linux VM inside MacOS than natively in MacOS. On the other hand, I found Qemu inside a Linux VM for Android development was extremely slow.)

jlokier··on Fitting a Forth in 512 bytes (2021)
I looked into tiny Forth and Lisp interpreters as the foundation for bootstrapping bigger things.

I expected Forth to be better for this because it seems like a smaller language, minimal even, that would have the smallest interpreter.

Forth feels lower level and simpler. After all, on the face of it, Forth is mostly a flat sequence of tokens and simple commands, run one after another liike assembly language.

Whereas Lisp has obvious tree data structures up front in a prettier syntax, like higher level languages, and you're encouraged to use them. Even lexical scope, closures and macros if you want them. That seemed like it must be bigger and heavier.

But I found the small Forth and Lisp interpreters came out about the same size.

This is backed up by the existence of 512-byte boot sector implementations of both Forth and Lisp.

So I decided for applications needing a tiny interpreter, or for bootstrapping, to not pursue Forth any more for those things, as a tiny Lisp does the job with (in my opinion) better ergonomics and versatility, and negligible cost difference.

jlokier··on The C23 edition of Modern C
> what is wrong with NULL?

This code has a bug, and may even crash on some architectures:

    execlp("echo", "echo", "Hello, world!", NULL);
This code doesn't have the bug:

    execlp("echo", "echo", "Hello, world!", nullptr);
Neither does this:

    execlp("echo", "echo", "Hello, world!", (char *)NULL);
jlokier··on Syncthing Android App Discontinued
I tried Termux and found the application files I wanted to rsync aren't visible in Termux, except maybe by rooting the phone. But I need to use banking and auth apps daily on it, so I assume that isn't an option.
jlokier··on Why does everyone run ancient Postgres versions?
There is a generic way to do it that works with SQLite and other databases, including Postgres. On Linux, take a filesystem or block device coherent snapshot, take your backup of all the SQLite files from the snapshot, then delete the snapshot.

The app or service continues to run without disruption, and the backup is a coherent database image. Perhaps you have other state in addition to the database, or multiple databses. For example cache files. This covers them too, if they are all in the same snapshot.

There are many ways to take a snapshot: ZFS and btrfs offer a filesystem command, and any Linux filesystem, such as ext4, can be snapshotted with LVM or LVM-thin. Well known cloud providers like AWS, GCP, Azure also provide ways to snapshot block devices, through their APIs. However, to ensure a coherent image, it may be necessary to use the Linux `fsfreeze` command around API calls.

The database backup files can have incomplete transactions, but if the files are restored it will be as if the OS was abruptly stopped at the moment of the snapshot. SQLite and other good databases are designed to recover well from this sort of abrupt stop, without corrupting the database. They clean up incomplete transactions on recovery.

jlokier··on Zero-latency SQLite storage in every Durable Object
> Google had to in house everything and probably spearheaded the usage of CRDTs ( this is a guess!)

Fwiw, Google Docs/Sheets etc don't use CRDTs, they use the more server-oriented Operational Transforms (OT). CRDTs were spearheaded by others.

jlokier··on Visual Studio Code is designed to fracture (2022)
The author of software (or generally the copyright holder) is not bound by the terms of their own license, so they can publish the same software and/or later versions under different licenses however they see fit.

This applies equally if their own license is MIT or if it's GPL/copyleft.

(From that point of view, Microsoft would be able to release VSCode as GPL while also shipping binaries under a proprietary license, if they wanted to.)

Things get more complicated when they aren't really the authors because they have merged contributions from other authors, e.g. pull requests. Then what happens depends on the license used by the other authors for their contributions. Sometimes the contribution's license is implied, or legally unclear. To avoid problems, some diligent organisations require contributors to sign or confirm something to make it clearer, before they accept contributions to be merged.

jlokier··on LinkedIn is now using everyone's content to train their AI tool
For me it's because when I was actively looking for a role without Premium, LI started to block me from viewing people's profiles half way through each month, saying I was looking at too many profiles a month for the free tier, so I had to get premium to keep reading.

I had no idea; I didn't think I was reading many and I wasn't doing it systematically, just being curious.

After getting Premium, I could see who viewed my profile and how many views over time, which I felt was useful. It tells me about personalised top jobs, and it sometimes comes up with things I wouldn't have searched for that do seem interesting. Nothing ever came of those as jobs, but I've learned about companies doing interesting things which overlap my skillset as a result.

There's also the ability to send more messages a month to people I'm not connected with, but I write so rarely that's never been an issue.

I'm still on Premium by choice, but I still get the fake message ads, spammer connection requests and promoted ad posts.

In the end, my last 3 jobs were obtained via LinkedIn, the current one was via a LinkedIn social post which caused me to write to the poster, and a field I work in now (zero-knowledge proofs) is because of a conference someone talked about on LinkedIn. Many plausibly good contracts are advertised only as LI social posts, not even as LI jobs. So it's undoubtedly valuable to me for work, and valuable to have parasocial connections on it (to see those posts), even if it is a strange mixture of fake platitudes and real but self-interested posts.

jlokier··on Porting systemd to musl Libc-powered Linux
My Debian 12 VM has been up for 4 days, and Xorg clocked 5 hours of CPU activity in that time, but systemd clocked only 9.5 seconds, and its subsystems each less than that.

So I doubt if systemd and its subsystems are using much energy.

It doesn't seem likely to explain 20 vs 8 hours battery.

jlokier··on Programming Zero Knowledge Proofs: From Zero to Hero
I agree. Exploring this in game worlds came up in a job interview a few years ago :)

ZK proofs are potentially a transformative tool for real-tine distributed systems in general, not just games. They potentially improve laency ("ping"), by changing the communication patterns in a distributed consensus system. That's great for games and other real-time systems.

jlokier··on Programming Zero Knowledge Proofs: From Zero to Hero
For me, the most powerful use of ZKPs is proof of the output of general purpose computations of any kind.

You can run an arbitrarily large, arbitrary long program, and whatever the program outputs, you can make a tiny proof-signature that says "this is the output you'll get if you run this program yourself".

The proof-signatures are relatively small, and you can verify them on small devices in milliseconds.

Another computer can trust the claimed output without having to run the program itself, by verifying the proof-signature.

This scales to arbitrarily large computations, so for example if a supercomputer says "I ran a quadrillion petaflops of your program for 1 year, and the result was the picture attached to this signature", you actually can verify that the picture is correct, quickly and efficiently - without having to trust the supplier.

It's as good as if you re-ran the program yourself (up to cryptography-grade probabilities, which is good enough).

Or if the big computer says "this entire Debian distribution of binary files was indeed compiled with this version of GCC", you can quickly verify that all the binaries are exactly what they should be - without having to trust anyone.

The proof process is rather slow, but it has gotten a lot faster over the last few years, and will continue to.

I was amazed when I learned that it's possible to securely check an arbitrarily large computation's output or result without running it yourself.

It was so counter to my intuition: it seemed like you would have to trust whoever makes the claim, or run it yourself. But you don't!

(So amazed and intrigued that I had to learn how it's done, and now part of my work these days is optimising the proof process.)

jlokier··on Sourcegraph went dark
> I am the Sourcegraph CEO, and we haven't changed anything about our public code search at https://sourcegraph.com/search.

But in this other comment (https://news.ycombinator.com/item?id=41298516), you said you have changed public search in two significant ways:

> We did cull lots of non-GitHub repositories and repositories with less star.

Removing low-star repos (and non-GitHub high-star repos) affects users who are looking for obscure or hard-to-find information that's not found anywhere in "popular" repos. I think most of my searches on GitHub (or via Google) are for things in repos with zero stars.

> If you have repositories you want us to add that are below the star threshold [..]

How would I go about finding which repos to request, if my objective is to search the "long tail" for information? That seems like I would need an automated search engine first, to discover the repos :-)

If I found the repo containing specific, obscure or hard-to-find information I was looking for, what would I gain from writing to SourceGraph asking to add that one repo? By the time I've found the right repo, I've probably found the information I'm going to get from it. Future searches will likely need a different repo, one I don't know about yet. Perhaps that's the nature of long tail searches.

jlokier··on Open source AI is the path forward
My impression is the training data for foundation models isn't that large. It won't fit on your laptop drive, but it will fit comfortably in a few racks of high-density SSDs.
jlokier··on Timeshift: System Restore Tool for Linux
That works if the backup uses a snapshot of the filesystem or a point in time. Then the backup state is equivalent to what you'd get if the server suddenly lost power, which all good ACID databases handle.

The GP is talking about when the backup software reads database files gradually from the live filesystem at the same time as the database is writing the same files. This can result in an inconsistent "sliced" state in the backup, which is different from anything you get if the database crashes or the system crashes or loses power.

The effect is a bit like when "fsync" and write barriers are not used before a server crash, and an inconsistent mix of things end up in the file. Even databases that claim to be append-only and resistant to this form of corruption usually have time windows where they cannot maintain that guarantee, e.g. when recycling old log space if the backup process is too slow.

jlokier··on CrowdStrike Update: Windows Bluescreen and Boot Loops
Because the suppliers of IT systems (eg Microsoft, Crowdstrike) do not agree that they can be used for life-critical purposes

If someone is injured or dies because the hospital has inadequate backup processes in the event of a Windows outage, some or maybe all liability for negligence falls on those who designed the hospital that way, not the IT supplier who didn't agree to it.

jlokier··on Meetup triples subscription price with less than a months notice
I'm surprised your price started that low.

Back in 2019 they were charging me 89.94 USD per 6 months. In 2023 it went up to 108.99 USD.

I'm expecting to be charged 178.99 USD at the next 6 month renewal, from their web page, https://www.meetup.com/blog/new-organizer-pricing-key-improv...

From my point of view it's a big increase, but nowhere near triple.

← PreviousPage 8 of 34Next →