HNHacker News
TopNewBestAskShowJobs

thomasballinger

190 karma · joined December 12, 2011

ballingt.com, me@ballingt.com, @ballingt
submissionscomments
thomasballinger··on Cloudflare Sandbox SDK
Codex remote environments seem to do this, we had to add support (via two lines of code) for these proxy environment variables to our CLI to support talking to GitHub from these environments.
thomasballinger··on WASM 2.0
There's a change history in the spec at https://webassembly.github.io/spec/core/appendix/changes.htm... and I see a 3.0 branch with updates for 3 https://github.com/WebAssembly/spec/blob/1e8f1dad8ca35ef3941...
thomasballinger··on HYTRADBOI 2025 Conference Postmortem
My favorite talk (although I haven't gotten through them all yet) was Alex Miller's Enough with all the Raft https://www.hytradboi.com/2025/2016d6c4-b08d-40b3-af2f-67926...
thomasballinger··on How Convex Works
HTTP handlers for requests can be defined, many Convex apps define these to handle webhook notifications and some apps consist primarily of these endpoints or app-specific REST APIs. (I work at Convex)

Edit: simultaneous post with my manager

thomasballinger··on Substack is (not) now powered by Ghost
I figure compilation is a big tent and this counts, but imagine

--rename-properties WARNING: renaming properties requires deeper analysis, considered compilation in the US

thomasballinger··on Zaplib post-mortem
I so appreciate these being public, see also Steve's Compose readme[1] and post-mortem[2].

I got to sit in for a day during prototyping for user 2 and was impressed but intimidated: reinventing the web stack is a lot of work! The team won me over though. If you have the chance to pair program with JP I highly recommend it, and I expect to be impressed by this team again in the future.

[1]https://github.com/compose-run/client [2]https://composerun.notion.site/Jan-2022-17761ede06f94e2abc42...

thomasballinger··on Mess with DNS
Note that this sentence was about browser-based integration tests. Browser automation has come a long way, but even on very frontend-fluent teams I've been on we had a few flakey tests, and browser-based integration tests are sometimes flakey in ways that are difficult and tedious to debug! Not understanding why doesn't necessarily indicate any lack of understanding of DNS.

But maybe it increases the odds of a "Let's understand Playwright!" post in the future!

thomasballinger··on Endless Sky: an open source space trading and combat game
A nice surprise to see this here! I did a web port of this game with Emscripten which much help from janisozaur: https://play-endless-web.com

There's an outdated post about what was hard about the port at http://ballingt.com/porting-endless-sky/ – with Emscripten as good as it is, it really wasn't bad!

thomasballinger··on Unfork: The Inverse of Fork(2)
Here's another implementation of what's described above, it forks on each invocation of readline to provide undo for interactive interpreters. https://github.com/thomasballinger/rlundo
thomasballinger··on Dozens of scientific journals have vanished from the internet
A related project is fatcat.wiki
thomasballinger··on Minecraft Education Edition Worlds Available for Free
Minecraft Education Edition provides in-game coding tools for Python, JavaScript, and a MakeCode-style visual block editor! This would be a great activity to do with some children I know.

But it's only available for Office 365 Education accounts, which is a product it seems I can't purchase as an individual.

Are there any educational institutions that I can pay to give me a accounts I could use for this? Or does anyone know what's involved in spinning up your own educational institution that Microsoft will sell Office 365 for education to?

thomasballinger··on What’s wrong with computational notebooks?
I've played with prototypes of this by calling fork on IPython to take snapshots of interpreter state https://github.com/thomasballinger/rlundo/blob/master/readme... but if you can't serialize state fully, rerunning from the top (bpython's approach) can work, or rerunning as a dependency dag shows is necessary (my current employer Observable's approach) works nicely.
thomasballinger··on Float Toy
rreusser made a more generic version inspired by Float Toy: https://observablehq.com/@rreusser/binary-input
thomasballinger··on Build Your Own WebAssembly Compiler
Here's Colin's blog post with code and diagrams inline: https://blog.scottlogic.com/2019/05/17/webassembly-compiler....

I found Colin's posts real helpful when writing some WebAssembly by hand for the first few days of Advent of Code: https://observablehq.com/collection/@ballingt/advent-of-wasm

thomasballinger··on How to Grow Software Architecture out of Jupyter Notebooks
Less powerful but more automatic: I added a reload modules key to bpython (F6) for this and an auto reload which reruns the repl session each time an imported module changes (F5)
thomasballinger··on How to Grow Software Architecture out of Jupyter Notebooks
If anyone wants to walk through these ideas more slowly I write about them in http://ballingt.com/interactive-interpreter-undo and implement this in https://github.com/thomasballinger/rlundo but as you say, eventually decided I had to implement an interpreter for which serialization of state was more efficient and all external resources had amenable interfaces http://dalsegno.ballingt.com/
thomasballinger··on D compilation is too slow and I am forking the compiler
The Jupyter models is hard for this, but if you only allow in-order execution (like a repl, say IPython whose kernel is used in Jupyter) you could do something like this.

We tried plugging in the rlundo tool https://github.com/thomasballinger/rlundo to IPython, it works ok, see http://ballingt.com/interactive-interpreter-undo/ for the long story.

I wanted something like this for live programming and felt like I needed to write my own interpreter because the behavior you need is so different: http://dalsegno.ballingt.com

thomasballinger··on Using LD_PRELOAD to cheat, inject features and investigate programs (2013)
Here's an idea that I like (so much that I wrote an implementation): use LD_PRELOAD to swap out readline with version that forks on each input. Kill the forked child process and you have undo! https://github.com/thomasballinger/rlundo post: http://ballingt.com/interactive-interpreter-undo/#hacking-fo...
thomasballinger··on Ink: React for interactive command-line apps
(just to emphasize, I think parent understands this)

The render function here can be stateful, React vdom-style: diff with previous output, efficiently update output based on the perf characteristics of a terminal. But it's an entirely separate domain, which is great for the developer.

thomasballinger··on Ink: React for interactive command-line apps
One optimization that's not hard to do for terminal output is a line cache: if a row is the same, don't render it. The rendering logic is probably already operating on lines, so this doesn't require the fancy diffing; but diffing a flat grid seems easier anyway vs the dom tree. For context, (I suspect parent already understands this) this is analogous to the vdom optimizations (not shouldComponentUpdate optimizations) possible with React. Except the algorithm is more straightforward: for each character on the grid, is the content the same since the previous render?

This library looks real neat, a declarative TUI with an api already familiar to many developers. I've thought this would be a neat thing to exist since I started using React after having written a similar declarative, redraw-only-as-necessary terminal rendering library for bpython (http://ballingt.com/bpython-curtsies/).

In it (http://curtsies.readthedocs.io/en/latest/) the only rendering optimization was a line cache. For the specific use case of an interactive interpreter this worked pretty well: once a line is changing, it's probably changing a lot. But you could go further using the output of diffing of arrays of terminal text.

edit: whoa https://github.com/Yomguithereal/react-blessed looks awesome for this

thomasballinger··on A Javascript journey with only six characters
I've hacked on this interpreter some, it's pretty nice to read! It implements a very limited subset of JavaScript, something like ES3.

I'd be really interested to hear about other similar implementations of JavaScript in JavaScript. I stopped working on https://github.com/thomasballinger/hotswapping-js-interp#js-... partially because copying the state of the interpreter was relatively slow. I'd be interested in implementations that would handle this better by using a more bytecode-like VM or immutable data structures.

thomasballinger··on AWS Shell – An integrated shell for working with the AWS CLI
Indeed it does, https://github.com/awslabs/aws-shell/blob/master/setup.py#L1...

Python Prompt Toolkit is pretty stellar, enough so to motivated writing a command line interface in Python instead of another language in my opinion.

thomasballinger··on Autocomplete as an interface
Great point, particularly relevant to autocompletion: IPython magics are tab completable and therefore more discoverable than bpython special keys. Real quick, they're emacs-style readline keys but with ctrl-r for undo. F1-F10 do things too.

Docs for shortcut keys, for anyone F1 doesn't work for: http://docs.bpython-interpreter.org/configuration.html#keybo...

The F1 issue with GNOME terminal is frustrating, I agree a cheatsheet-style help page on the site would be good. I've been meaning to do this for a while and might finally get time to work through backlog next week :)

thomasballinger··on Autocomplete as an interface
I feel similarly about autocomplete (particularly the "best way to learn Python" bit) and suggest Python users looking for autocompletion similar to zsh at the command line pip install bpython (which I work on).

See https://github.com/bpython/bpython for source, http://ballingt.com/bpython-curtsies for some (old) gifs.

More generally, build your own tools like this with the excellent Python Prompt Toolkit! (https://github.com/jonathanslenders/python-prompt-toolkit)

thomasballinger··on A string of unexpected lengths
How do you find this in practice? I mention this in the 3rd footnote of the post, but didn't have much to say about it because I haven't used it myself. The one person I've talked about this says it's rather awkward right now because Swift doesn't provide great tools for working with these objects.
thomasballinger··on Python REPL with syntax highlighting, autocomplete and multiline editing
Basically it's great, and matches up well with bpython: I wrote up some comparisons at http://ballingt.com/2014/09/30/prompt-toolkit.html (bpython-curtsies author here)
thomasballinger··on Peter Norvig and eight others are Hacker School residents
Another facilitator here - I'm two weeks behind in responding to emails asking for feedback after being rejected, but I'm getting to them soon, and appreciate that folks are asking.
thomasballinger··on The Hacker School Experience
Would you send a note to admissions@hackerschool.com with the email you used on that application so we can sort that out? We certainly don't mean to ignore any applications, and if you didn't hear back by the date stated on the app when you applied, I'm sorry about that and I would like to figure out what happened.
thomasballinger··on Show HN: My afternoon project - Pink Noise mp3.
I get exactly this with white noise, subtle chime sounds on a pentatonic scale. It made me want to do the realtime frequency analysis to see if I wasn't imagining it.
thomasballinger··on Hacker School: Summer 2012 Applications Open + Etsy Scholarships
I don't think it's a stretch though to call this "need-based aid for women" as Nick does in the post. The term is often used in this way by traditional educational institutions.

I felt very fortunate to have the money lying around to take three months off of work to attend Hacker School, and I imagine there is a large pool of entirely qualified candidates who are financially unable to make this work (several of them posted on HN last time around). If we assume happening to have the money socked away and being a passionate hacker are a bit independent, then this need-based aid for women will increase the number of entirely qualified women who are able to attend. This is the right, least-artificial way to "[encourage] the community of women programmers to apply to Hacker School on their own," as is possible for an organization that doesn't happen to run a k-12 educational program or other major institutional social change agent.

Although 5k for three months will modify the incentive structure, it's less than the average American income for that period, and your living expenses are going to increase if you're moving to NYC unless you're coming from Paris or similar. The only expected changes in the applicant pool are qualities I don't give a lick about, having to do with educational loans, having a job that can be done remotely for a few days a week, having money saved up, or personal financial conservatism (willingness to spend money on an unknown 3-month commitment). From what I've observed, Nick, Dave and Sonali are 100% about maintaining the excellent quality of people in their program, and I trust they will ensure that financial aid for women in no way undermines that.

This hopefully will "artificially inflate" (what wouldn't be artificial? just waiting until the problem is solved by someone else?) the number of women applying, some of whom will be accepted and hopefully become better hackers, contributing in a small way to fixing the problem. Should more drastic steps be taken at a primary / secondary / college education level to attempt to "organically" grow the community of women programmers? Sure, and I'll continue to vote for elected officials who say they'll try to fix this as I always have, but in the meantime the Etsy scholarships are trying to make concrete progress growing that community right now.

Page 1 of 2Next →