HNHacker News
TopNewBestAskShowJobs

xorvoid

1,177 karma · joined June 14, 2021

https://www.xorvoid.com
submissionscomments
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Thanks for the kind words. But if you’re looking for fancy data-structures, you won’t find them. Haha. It’s just a single object type (sum-type/tagged-union) and lots of cons cells. In other words, just a minimalist Lisp.
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Happy to discuss. Email address can be found on my website.
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
I thought of that. But then you’re making the semantics complicated. Say you really did want a (a) closure. Now you can’t have one, and you have to resort to more tricky wrapping. Not worth it.
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Ha. Well I meant “add those operations to the C interpreter”, which would be like 4 lines of code.
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Subtly different. Originally I didn’t have ^a, but you do in-fact need it. ^a means “push with no evaluation” and (a) means “build a closure” that computes a”.

If you push, pop, push, pop, push repeatedly you’ll be wrapping the value in lots of closures. The value is no longer a value too. You’d have to “force” it to get back the value.

Semantically quite different. If you’re going all Turing tarpit, could you survive without “^a”? Maybe. But you’d be suffering for sure.

xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Addition can be implemented as:

(0 swap - -) $+

Division is much harder, but doable also. Generally Forsp in the camp of minimalist languages so minimizing the number of primitives seemed more interesting.

If you want to play around yourself, it’s trivial to add those operations.

xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
Also thanks for sharing; looks interesting. I’ll read this when I have time and re-comment then. Off the bat: Forsp variables are definitely not linear.
xorvoid··on Forsp: A Forth+Lisp Hybrid Lambda Calculus Language
A friend mentioned RPL, but that didn’t seem to even have first-class functions… unless I’m mistaken?
xorvoid··on He Lost $36B in a Week. Now Bill Hwang Is Fighting to Avoid Prison
Why does the intersection of “being into Jesus” and “being into money” always seem so correlated with “fraudster”?
xorvoid··on U-M finds students with alphabetically lower-ranked names receive lower grades
We graded similarly, incidentally, when I was at U-of-M (lol). I don’t think we ever sorted by name so I don’t know if we’d have a bias effect by name unless it’s an implicit bias towards lexicographical esthetics. I won’t deny that grading fatigue can have subjective effects. I always thought we did a pretty fair and objective job. I taught Computer Architecture and we we developed answer keys and grading scales before grading a single test. Of course assigning partial credit always ended up being pretty subjective. Typically though people would error in the same ways and so those would be subjectively identical. I never thought names factored into this much but, to be fair, no one ever collected data…

Finally, I guess I’ll admit that I’m probably very biased because my initials as A.B. and I’ve always gotten excellent grades, so… maybe maybe maybe

xorvoid··on It's cutting calories–not intermittent fasting–that drops weight
I think it’s about finding a strategy that works for you. Ultimately it’s about the calorie deficit but you need to find strategies that make you comfortable with the deficit. A one size fits all solution never works.

I lost a lot of weight and found that two things: (1) I’m allowed to eat any amount of healthy things: no limit, (2) exercise acts as a junk food craving suppressor for me.

I tried intermittent fasting years later and it led me directly to binge eating. Might work for some people (awesome) but doesn’t works for me.

xorvoid··on If Inheritance is so bad, why does everyone use it?
Depends what language you're using and what polymorphism features it has...

C - You don't use inheritance because it literal has none, but you can handroll dynamic dispatch (interface style Abstract Base Classes)

Rust - Also doesn't have it and people seem perfectly happy with generics, sum-types, and `dyn Trait`

xorvoid··on When teaching computer architecture, why are universities using obscure CPUs?
I agree that x86 is a terrible choice, but I think there might be middle-ground found in a simplified RISC-V or ARM.
xorvoid··on Oxide and Friends Podcast – Discovering the XZ Backdoor with Andres Freund [video]
Excellent interview. Great contrast to the NYT article they start talking about. Evidence that we really need more tech experts that get into journalism and have the capability to conduct quality interviews. Bryan Cantrill is a good interviewer and asks good questions.
xorvoid··on It's not what the world needs right now
You don’t have to like the protagonist to enjoy the story. Who said the protagonist had to be the “good guy”. And he makes no claims to be.
xorvoid··on The xz sshd backdoor rabbithole goes quite a bit deeper
Maybe I’m just being naive or too trusting, but this is sort of what I think when folks are getting worried about other backdoors like this in the wild.

Is it that they just got unlucky to get caught, or is this type of attack just too hard to pull off in practice?

I’d like to think the later. But, we really don’t know.

xorvoid··on LLM4Decompile: Decompiling Binary Code with LLM
Could you expand on how this metric would be practically defined?

The problem isn’t lifting to C code, but rather “good C code”. For example you can do a 1-to-1 translation on each assembly instruction to C code that will do the same Machine state changes. This is not usually why you want, as it comes with a lot of extra cruft. When people think “decompiler” they think of n output that looks like what they would personal write. But that’s very Ill-defined. And, personally idk how one would define such a thing.

xorvoid··on LLM4Decompile: Decompiling Binary Code with LLM
As someone who is actively developing a decompiler to reverse engineer old DOS 8086 video games, I'd have a hard time trusting an LLM to do this correctly. My standard is accurate semantics lifting from Machine Code to C. Reversing assembly to C is very delicate. There are many patterns that tend to usually map to obvious C constructs... except when they don't. And that assumes the original source was C. Once you bump into routines that were hand-coded assembly and break every established rule in the calling conventions, all bets are off. I'm somewhat convinced that decompilation cannot be made fully-automatic. Instead a good decompiler is just a lever-arm on the manual work a reverser would otherwise be doing. Corollary: I'm also somewhat convinced that only the decompiler's developers can really use it most effectively because they know where the "bodies are buried" and where different heuristics and assumptions were made. Decompilers are compilers with all the usual engineering challenges, plus a hard inference problem tacked on top.

All that said, I'm not a pessimist on this idea. I think it has pretty great promise as a technique for general reversing security analysis where the reversing is done mostly for "discovery" and "understanding" rather than for perfect semantic lifting to a high-level language. In that world, you can afford to develop "hypotheses" and then drill down to validate if you think you've discovered something big.

Compiling and testing the resulting decompilation is a great idea. I do that as well. The limitation here is TEST SUITE. Some random binary doesn't typically come with a high-coverage test suite, so you have to develop your own acceptance criterion as you go along. In other words: write tests for a function whose computation you don't understand (ha). I suppose a form of static-analysis / symbolic-computation might be handy here (I haven't explored that). Here you're also beset with challenges of specifying which machine state changes are important and which are superfluous (e.g. is it okay if the x86 FLAGS register isn't modified in the decompiled version, probably yes, but sometimes no).

In my case I don't have access to the original compiler and even if I did, I'm not sure I could convince it to reproduce the same code. Maybe this is more feasible for more modern binaries where you can assume GCC, Clang, MSVC, or ICC.

At any rate: crazy hard, crazy fun problem. I'm sure LLMs have a role somewhere, but I'm not sure exactly where: the future will tell. My guess is some kind of "copilot" / "assistant" type role rather than directly making the decisions.

(If this is your kind of thing... I'll be writing more about it on my blog soonish...)

xorvoid··on What's worked in Computer Science: 1999 vs. 2015 (2015)
Fancy Type Systems is indeed vague, but I’d disagree with No in 2024. They are slowly winning. Definitely a Maybe to a Yes. E.g. Rust is hugely popular/successful and has brought a much more sophisticated type system to system programming.
xorvoid··on Nobody ever gets credit for fixing problems that never happened (2001) [pdf]
The corollary (if you’re cynical) is that you get Massive Credit for waiting to deploy a solution until the problem becomes a Major Crisis. That is, there’s a big incentive to to prepare the solution preemptively but not deploy.
xorvoid··on Nvidia's "Grace" Arm CPU holds its own against x86 for HPC
Disingenuous article. Compared against Intel Skylake which was launched in 2015 and discontinued in 2019. Not a fair comparison.

There might be a desire to compare to an existing cluster machine. So, hardware might be dated. Fair.

But, it’s very disingenuous to write an article and title it this way.

xorvoid··on 4B If Statements
Even better if it built-on-install by executing another script to generate everything (naturally using %) New nerd game: enshitification inverse golf.
xorvoid··on Reflecting on 18 Years at Google
Around 2008 when I was starting college, I was really excited about Google and wanted to work there. By 2013 I began to feel like they weren’t the same anymore and no longer interested me. By 2023, I can say that Not pursuing a job at Google was my best career decision. You can go watch old Google Tech Talks circa 2010 and they’re fabulous. I can’t imagine them putting out that kind of content these days. It’s rather sad, I bet 2005 Google was a remarkable place that’s now lost to time
xorvoid··on A C Compiler that fits in the 512 byte boot sector of an x86 machine
Somebody with a fine taste in fall beverages gets it! Lol
xorvoid··on Implication for C++ [pdf]
I thought there were calls to simplify C++? This feels like the opposite direction. I've programmed in C++ for >20 years now and I can't think of a single moment where I would have wanted this feature.
xorvoid··on Candle: Torch Replacement in Rust
Neat. This is the library I’ve been waiting to see. Rust has some nice potential but big parts of the ecosystem are missing. Now let’s see if it actually gets traction.
xorvoid··on How many registers does an x86-64 CPU have? (2020)
“In all modes except for long mode, each segment register holds a selector, which indexes into either the GDT or LDT. That yields a segment descriptor which, among other things, supplies the base address and extent of the segment.”

A tad inaccurate. In 16-bit real mode the segment registers are used directly in the addressing scheme by specifying the 64kb segment (16-byte aligned) that we’re working in.

xorvoid··on Ask HN: I am interested in reading about techniques HFT firms use
That’s a hard question to answer. The question is far too broad.

HFT is a combination of lots of things: low-level computer architecture knowledge, hardware engineering, computer networking, numerical computing, machine learning, super-computing, market simulation, market microstructure knowledge, risk management, financing, psychology/game-theory, etc etc.

Usually no one person is in expert in all of those areas. Usually, a firm is successful because they put together a world class team with all of those skillsets AND they’re willing to invest heavily in the right things.

And even then, it’s so competitive that you can still fail. It’s quite challenging to get everything right. There are far more ways to fail than to succeed.

I’d suggest you pick some sub-area you’re interested and focus heavily on that.

xorvoid··on Excellence is a habit, but so is failure
I’m continually struck by how brave Andreas is for talking about his addiction problems out in public. In most every interview he leads with it when he could just easily say a vague: “I found myself with a lot of free time”.

Addiction can come with a LOT of shame baggage. To embrace vulnerability over it is quite substantial. Thank you Andreas for being a positive example for the world! Keep up the great work!

xorvoid··on Ask HN: Could you share your personal blog here?
https://www.xorvoid.com

I write quirky computer science articles. Usually based on some crazy project often at the intersection of computers and math. Currently working on a series that builds Finite Fields up from scratch step-by-step (haven’t published that yet)

← PreviousPage 4 of 6Next →