HNHacker News
TopNewBestAskShowJobs

jstrieb

3,509 karma · joined October 21, 2016

Programmer • Hacker • Public Interest Technologist

https://jstrieb.github.io

https://github.com/jstrieb

submissionscomments
jstrieb··on How to Talk to Grandma About AI: Language Models as Thespians
I implied that on purpose. I'm generally hesitant to anthropomorphize LLMs, but in this case, I disagree with you that they don't have intention. They were developed to output likely tokens, and tuned such that their big tech developers approve the output. That is their intention. Their one and only intention.

That being said, I completely agree on the agency point. They don't make decisions, and certainly don't "think" like people.

Still, I believe the benefits of the analogy outweigh the potential loss of nuance here.

jstrieb··on An LLM is a lossy encyclopedia
I have been explaining LLMs to friends and family by comparing them to actors. They deliver a performance in-character, and are only factual if it happens to make the performance better.

I just posted a full write up of the idea to HN: https://news.ycombinator.com/item?id=45103597

jstrieb··on Some thoughts on LLMs and software development
Nobody that I'd be using this analogy with is currently using LLMs for tasks that are covered by RLVF. They're asking models for factual information about the real world (Google replacement), or to generate text (write a cover letter), not the type of outputs that are verifiable within formal systems—by definition the type of output that RLVF is intended to improve. The actor analogy is still helpful for providing intuition to non-technical people who don't know how to think about LLMs, but do use them.

Also, unless I am mistaken, RLVF changes the training to make LLMs less likely to hallucinate, but in no way does it make hallucination impossible. Under the hood, the models still work the same way (after training), and the analogy still applies, no?

jstrieb··on Some thoughts on LLMs and software development
I have been explaining this to friends and family by comparing LLMs to actors. They deliver a performance in-character, and are only factual if it happens to make the performance better.

https://jstrieb.github.io/posts/llm-thespians/

jstrieb··on Getting Started with Celtic Coins – Crude and Barbarous, or Just Different?
Even if you don't read the article, and even if (like me) you don't particularly care about coin collecting, you should still scroll to the bottom for the cool photos showing how the designs became more abstract over time.
jstrieb··on Design and evaluation of a parrot-to-parrot video-calling system (2023)
If you liked that story, you should really read the full anthology, called Exhalation. Ted Chiang is a wonderful writer, and there are a lot of great stories in that book. I think my favorite was The Merchant and the Alchemist's Gate.
jstrieb··on Analytic Combinatorics – A Worked Example
Generating functions are definitely strange and unintuitive, but they can be really helpful for combinatorics.

The introduction to generating functions in this well known text on the subject (at the beginning of Chapter 1) might be more helpful than the Wikipedia article linked in the original post:

https://www2.math.upenn.edu/~wilf/gfology2.pdf

From that text:

> Although giving a simple formula for the members of the sequence may be out of the question, we might be able to give a simple formula for the sum of a power series, whose coefficients are the sequence that we’re looking for.

jstrieb··on Show HN: I built a tool to find devs based on code, not LinkedIn titles
Okay I was able to find myself, but only by searching for the exact text in my GitHub bio. Nothing related to any of my repos surfaced my profile.
jstrieb··on Show HN: I built a tool to find devs based on code, not LinkedIn titles
Small feedback: I would like to be able to enter my own profile to see how I will appear on the site. It would also be nice to know what searches my profile would be most likely to pop up for.
jstrieb··on Any program can be a GitHub Actions shell
I've used this in the past to force bash to print every command it runs (using the -x flag) in the Actions workflow. This can be very helpful for debugging.

https://github.com/jstrieb/just.sh/blob/2da1e2a3bfb51d583be0...

jstrieb··on Classical sorting algorithms as a model of morphogenesis (2023)
The last coauthor listed on this preprint is Michael Levin, who has a lot of other cool work.

In particular, this talk of his from NeurIPS 2018 includes fascinating biology research results, as well as musings on the future of biologically-inspired artificial intelligence.

https://youtu.be/RjD1aLm4Thg

HN discussion about the talk: https://news.ycombinator.com/item?id=18736698

jstrieb··on Just: Just a Command Runner
In case you want to run Justfiles in places where you can't install the Just binary (for whatever reason), I wrote a compiler that transforms Justfiles into portable shell scripts that have byte-for-byte identical output in most cases.

https://github.com/jstrieb/just.sh

Previous HN discussion: https://news.ycombinator.com/item?id=38772039

jstrieb··on Gettiers in software engineering (2019)
Relevant (deleted, as far as I can tell) tweet:

> When I talk to Philosophers on zoom my screen background is an exact replica of my actual background just so I can trick them into having a justified true belief that is not actually knowledge.

https://old.reddit.com/r/PhilosophyMemes/comments/gggqkv/get...

jstrieb··on Capstone Disassembler Framework
Capstone is very useful!

Someone (not me) has also cross-compiled Capstone to WebAssembly so it can be used in client-side browser applications.

https://alexaltea.github.io/capstone.js/

I've used this in a couple of projects to support disassembly in static web apps with no back end.

jstrieb··on Pi Pico 2 Extreme Teardown
This is not exactly what you're looking for, but is also pretty interesting: it's a tool for reverse engineering the bits from mask ROM photographs.

https://github.com/travisgoodspeed/maskromtool

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
See this comment for a more in-depth explanation of what I meant by "optimal" for poker chip denominations. Hopefully that clarifies. That comment has a link to the code if it's still not clear enough.

https://news.ycombinator.com/item?id=40576198

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
The only color reordering that happens is to assign the color with the largest quantity of chips to have the lowest chip value.

Once the optimization has happened, you can edit the colors, and the order will be preserved. So if you want to swap it so that white is the lowest valued chip, just edit the color of the lowest valued chip to white.

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
That's a good observation - the UI is a very thin wrapper around the optimizer.

One fix would be changing the minimum number of chips per color under "advanced options > requirements" to 0.

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
Most optimization calls on my laptop happen nearly instantaneously, whereas they can take a few seconds on average on phones. Didn't test super comprehensively.

If you end up wanting to use the version of SCIP compiled to WASM, I have it pre-compiled in the repo here: https://github.com/jstrieb/poker-chipper/tree/fab41bbe8821d0...

To interact with WASM SCIP, I use the CLI with an Emscripten virtual filesystem (as opposed to the C API/FFI): https://github.com/jstrieb/poker-chipper/blob/fab41bbe8821d0...

If you want to compile it yourself, the code and compiler flags I used to do that are documented in a Dockerfile in the repo: https://github.com/jstrieb/poker-chipper/blob/fab41bbe8821d0...

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
The first constraints are the required ones:

    - The sum of (color value * color quantity) for all colors must equal the buy-in
    - For each color, (color quantity * number of players) must be less than the total number of chips of that color
Theoretically any combination adhering to these constraints would be valid, but it wouldn't necessarily be "nice." The main idea behind the "niceness" constraints are to choose denominations that are easy to remember and easy to work with. To that end, there are a number of requirements and soft constraints that nudge the optimizer towards better denominations if it can. For example, a few are:

    - One chip value should be the small blind, and try to minimize the number of chips required to make the big blind
    - Chip values should try to be multiples of a set number ($0.25 by default, tunable in the UI)
    - Chips above $1 should be multiples of $1
    - Chip values should try and be multiples of smaller chip values so that change can be made in as many ways as possible
    - Distribute as many chips as possible so that people have big stacks to play with
The code for all of the constraints is here, and is commented in English for readability:

https://github.com/jstrieb/poker-chipper/blob/fab41bbe8821d0...

jstrieb··on Show HN: Allocate poker chips optimally with mixed-integer nonlinear programming
So far, even on underpowered Android phones I've tested on, the performance has been really good. It's more of a testament to how fast SCIP is than anything else!

Specifically, I haven't been able to find a reasonable set of parameters that cause the optimization to take longer than ~20 seconds on the slowest device I tried.

To get things to be smooth, though, I had to do debouncing and also run optimization in a web worker (separate, non-blocking thread) so the UI doesn't hang. Doing that was its own challenge since web workers don't use the HTTP cache for security reasons (they're supposed to be an isolated context), and it was re-requesting the ~5MB WASM files every time any of the numbers was adjusted. To solve this I used a service worker with a local cache.

Slow performance of web-based Z3 for optimization was one of the main reasons I switched to SCIP. I originally had a version working using a WASM port of Z3, but it just wasn't fast enough to be usable.

jstrieb··on Show HN: Optimally allocate poker chips using constrained optimization
Hey! It works on mobile. Just go to https://jstrieb.github.io/poker-chipper to use it.

It's designed exactly for games with friends, so it should work well. But to be clear: it is for allocating chips to players at the beginning of the game, rather than for thinking about playing optimally during the game.

jstrieb··on Ask HN: Which books/resources to understand modern Assembler?
Not specific to LLVM or JIT, but if you want a visceral intuition for the basics of ARM assembly, I made a free, online game at work (for mobile and desktop) that may help you:

https://ofrak.com/tetris/

I didn't do much ARM before working on the game, but since playing a lot, I'm very quick at reading disassembly, even for instructions not present in the game. It might help you to do the same – the timed game aspect forces you to learn to read the instructions quickly.

The game is like Tetris, but the blocks are ARM assembly instructions. As instructions fall, you can change the operand registers. Locking instructions into the .text section executes them in a CPU emulator running client-side in the browser, so you can immediately see the effects of every action. Your score is stored in memory at the address pointed to by one of the registers, so even though you earn points for each instruction executed without segfaulting, the true goal is to execute instructions that directly change the memory containing the score value.

When I released it a bit less than a year ago, I posted it to Hacker News as a Show HN:

https://news.ycombinator.com/item?id=37083309

jstrieb··on Platform for Architecture-Neutral Dynamic Analysis (PANDA)
One of the original PANDA authors wrote a really interesting companion blog post in 2014 about using it to break Spotify DRM.

https://moyix.blogspot.com/2014/07/breaking-spotify-drm-with...

That post also got a lot of attention on Hacker News.

https://news.ycombinator.com/item?id=7989490

jstrieb··on Under the Microscope: Three Dirty Dwarves
I have done something like this for embedding Easter eggs in websites where a user can just "view source" to see the code. I want someone who looks to know there is an Easter egg, but not know what it does or how to activate it...

Code is AES-GCM encrypted, and the encrypted blob is stored on the web server. The "cheat code" to activate the Easter egg is the decryption key (the passphrase used with a key derivation function, to be precise). Entering the cheat code triggers an attempt to decrypt the blob. If the password is correct and the code decrypts successfully, the decrypted code is run with eval. If the passphrase is incorrect, nothing happens.

Thus, nobody inspecting the code can know what the cheat code is or what it does without breaking the crypto. But someone who knows it can enter it and trigger the magical cheat behavior.

Note that it's important to use authenticated encryption so that the user's browser doesn't try to execute garbled text when decryption fails.

jstrieb··on How is a binary executable organized? Let's explore it (2014)
As I've said in other threads https://news.ycombinator.com/item?id=38847750#38862450, I highly recommend writing an ELF by hand at least once. It's a great exercise to understand the basic parts of an executable. It's also helpful if you want to go the opposite direction of this article - bottom-up instead of top-down.

Lots of other great discussion in various threads on that other HN post.

jstrieb··on Quickemu: Quickly run optimised Windows, macOS and Linux virtual machines
While I agree in general that shell script is not usually fun to read, this particular code is really not bad.

Not sure if this will sway you, but for what it's worth, I did read the bash script before running it, and it's actually very well-structured. Functionality is nicely broken into functions, variables are sensibly named, there are some helpful comments, there is no crazy control flow or indirection, and there is minimal use of esoteric commands. Overall this repo contains some of the most readable shell scripts I've seen.

Reflecting on what these scripts actually do, it makes sense that the code is fairly straightforward. At its core it really just wants to run one command: the one to start QEMU. All of the other code is checking out the local system for whether to set certain arguments to that one command, and maybe downloading some files if necessary.

jstrieb··on GitHub Spam
Are you thinking of @reset?

https://discuss.systems/@adrian/110783401400871208

https://news.ycombinator.com/item?id=36888444

jstrieb··on The best way to get unstuck
Yeah, when I found those reviews, I felt so validated. I had also missed those bits you mention, but even without noting them, I came away with a really negative impression of the book based on its (in my opinion) condescending tone and lack of substance.

I truly had mixed feelings about replying so negatively to your original comment, but I felt it was important to highlight that even though the book is the kick in the ass some people need to get motivated, it can just as easily be an irritating waste of time for others. To each their own, I suppose!

jstrieb··on The best way to get unstuck
At the risk of being overly negative (but in the interest of possibly saving someone else some time), this may be one of the three worst books I've ever read. I am not exaggerating – I keep a list of every book I read, and it's at the bottom.

If all you need is a barely-sensible motivational speech, go for it. Otherwise, don't waste your time.

I don't use goodreads, but went looking for reviews to see if I was crazy, or if I was missing something, or if it really was as terrible as I thought. These selected reviews sum it up better than I could have:

https://www.goodreads.com/review/show/55761871

https://www.goodreads.com/review/show/732294700

https://www.goodreads.com/review/show/735909209

The reviews seem fairly polarized overall, so maybe the book really does help people. At the very least, I encourage you to read some of them before picking up the book.

If the positive reviews seem like they come from people you'd agree with, then by all means, go for it. Otherwise, stay away.

https://www.goodreads.com/book/show/1319.The_War_of_Art

← PreviousPage 2 of 8Next →