off-topic

jyn 2025-11-11T20:07:28.326599Z

i wrote another blog post https://jyn.dev/the-terminal-of-the-future/

4
jyn 2025-11-12T15:23:28.617009Z

whoaaaa

jyn 2025-11-12T15:23:36.503909Z

now i want to rebuild that based on bb

jyn 2025-11-12T15:30:04.101259Z

i wonder if there’s a way to do interop between a graal native binary and rust

jyn 2025-11-12T15:30:22.756709Z

i’d want to write the job control in rust and the business logic in clojure

jyn 2025-11-12T15:32:24.286209Z

yesss beautiful

jyn 2025-11-12T15:42:58.459239Z

i wonder if i could build something like flower for shells, where you can plug in the language syntax without having to recompile the core library

jyn 2025-11-12T15:53:05.479669Z

hm i don't think data readers would work here because they require the syntax tree to be a valid clojure form

jyn 2025-11-12T15:55:55.671049Z

maybe it could dispatch based off the subshell operator, so (+ 1 2) is clojure and py(1 + 2) is a python interpreter, something like that

2025-11-12T16:08:36.885039Z

Maybe @kloud (author of closh) is still interested in this idea

2025-11-12T18:06:55.660479Z

Re: Closh: At the time I had some proof-of-concept graal native binary support based on SCI (interpreter from babashka). Nowadays, one could probably make it hosted on babashka directly, create pods for rebel-readline/jline, there is already pod for sqlite (for civilized storage of history), etc. I am also contemplating Closh 2. If Jank matures and is able to deliver on the promise I think it could be possible to implement a proper shell on top of it (using interop for low-level syscalls for proper process groups, setting up pipes and descriptors, without worrying about clashing with JVM internals).

πŸ‘ 1
2025-11-12T18:10:57.629469Z

Regarding the article it inspired me and got me thinking. I can see multiple angles of attack: 1. What shell interaction ala Clojure REPL could look like? Basically considering what Clojure REPL is to typing code into interpreters on CLI (primitive REPLs like python, irb). Imagining what REPL-based shell sending commands to eval from editor could be compared to primitive typing commands into shell process in terminal. I will probably try some experiments in Neovim. 2. If we have REPL-based shell interaction, what if we upgrade it to REBL (read-eval-browse loop). I am a fan of Portal implementation of the REBL paradigm. What if we could have a natural workflow to eval a command and send the output as data to Portal window for browsing/visualization? 3. Building on the idea of Closh 2 on Jank, once libghostty comes out (the rendering engine of the Ghostty terminal packaged as a library, we could use it via interop), we could flip the terminal-shell paradigm around. Instead of a shell process running inside a terminal, we could have a single process with both shell (process management) and terminal (rendering) responsibilities. For rendering the VT100 component would be just one viewer for legacy CLIs/TUIs among different kinds of viewers for other kinds of data. For inspiration https://terminal.click/ has shown that it is viable for a terminal to take on shell responsibilities. We could try something similar, but with a lisp/clojure goodness at the core.

gtrak 2025-11-12T19:15:26.954439Z

I've done a lot with Clojure->Rust and uniffi, probably the same with graal

gtrak 2025-11-12T19:16:32.003719Z

It works great but we're all scared of it https://mozilla.github.io/uniffi-rs/latest/ Uses JNA You could probably use the new FFM API but I haven't tried yet, since some of our internal users are still using java8

gtrak 2025-11-12T19:18:56.719289Z

We also have rust calling back into clojure the same, you can do JVM foreign impls of rust traits

gtrak 2025-11-12T19:23:51.313709Z

If you want to try uniffi and not use their built-in kotlin code generator, you can probably use this: https://crates.io/crates/uniffi-bindgen-java

gtrak 2025-11-12T19:26:34.624569Z

I don't think I could have learned enough JNI in any reasonable amount of time to make it work without breaking and have confidence in shipping rust to other teams' JVMs. Uniffi just works.

gtrak 2025-11-12T19:37:14.079979Z

This allowed me to ship a multi-arch jar from one CI run: https://github.com/rust-cross/cargo-zigbuild

gtrak 2025-11-12T19:46:49.959209Z

We even have rust logging to telemere, but I haven't gone as far as hooking up rust tracing to the java otel SDK. Seems possible ?.

gtrak 2025-11-12T20:03:37.606209Z

I don't quite understand why this problem needs a JVM to fix it, except we like sci here? I like it, too.

gtrak 2025-11-12T20:07:02.969319Z

you could do dataflow tracking with something like this in rust: https://github.com/salsa-rs/salsa or https://github.com/janestreet/incremental in ocaml

gtrak 2025-11-12T20:17:32.140059Z

I'm not sure I get it. I think Nix covers initial state, DBs cover incremental updates with transactional semantics, and you'd have to start fresh to unify all the things, and somehow account for I/O with the rest of the world.

gtrak 2025-11-12T20:20:26.518129Z

Eg, unikernels are a kind of limited immutable OS state, and I'm not sure there's any value in building those up from imperative operations?

jyn 2025-11-13T01:53:54.764859Z

well the value is that people can transition incrementally instead of all-at-once

jyn 2025-11-13T01:54:05.872539Z

it's much easier to convince people to run a CLI tool than to install an experimental OS

βž• 1
jyn 2025-11-13T01:55:14.062369Z

this is kinda related to https://becca.ooo/blog/vertical-integration/, like yes of course things are easier if you control the whole stack, but this is open source, so we don't

jyn 2025-11-13T01:55:39.147279Z

doomed to rewrite the same primitives over and over unless someone finds a way to expose a composable general-purpose API

gtrak 2025-11-13T03:08:43.081099Z

reminds me of jane st's thing https://blog.janestreet.com/putting-the-i-back-in-ide-towards-a-github-explorer/

jyn 2025-11-13T03:09:49.546419Z

yeah

jyn 2025-11-13T03:09:58.861569Z

vertical integration is nice actually!

gtrak 2025-11-13T03:10:15.881789Z

they picked a stack to control for sure

jyn 2025-11-13T03:10:22.741559Z

lol

gtrak 2025-11-13T03:11:15.921389Z

> We no longer release the code of Iron, and do not expect that will change. It was never possible to run outside of Jane Street, and is not plausible that it ever will, due to dependencies on many aspects of our internal environment.

gtrak 2025-11-13T03:12:29.916949Z

I'm not sure this idea is compatible with open-source reality

jyn 2025-11-13T03:13:44.584219Z

yeah

gtrak 2025-11-13T03:13:55.478009Z

> integrations between a code forge, build system, deploy system, CI, and code editor. oof, I worked at a startup that used Phabricator, which was one really motivated php dev, and it fizzled out

jyn 2025-11-13T03:14:06.282259Z

well, you have to be clever

jyn 2025-11-13T03:14:23.509739Z

your integration can't be "we spend a bunch of engineer labor on each forge we support"

jyn 2025-11-13T03:14:50.587999Z

the whole thing i'm trying to do in these posts is talk about how to avoid spending that labor

gtrak 2025-11-13T03:18:44.778549Z

The problem is a real vertically-integrated solution needs to be easy enough for people just starting out, or it won't get used. That means it needs to be familiar and simple.

gtrak 2025-11-13T03:18:59.990009Z

eg, python taking over the world

jyn 2025-11-13T03:19:11.077789Z

i actually don't care if it's familiar and simple

jyn 2025-11-13T03:19:20.980419Z

i care much more if it's easy to adopt incrementally

jyn 2025-11-13T03:19:24.113679Z

jj does this really well

jyn 2025-11-13T03:19:37.843859Z

jj is unfamiliar and not particularly simple, but you can use it for a single one-off command, so there's a low switching cost

jyn 2025-11-13T03:20:24.989989Z

if people don't want to try jj because they don't want to spend time on devtools, that's fine, but i don't see that as a fault in the tool

gtrak 2025-11-13T03:21:22.019669Z

is git good enough? There was a time before git existing when everything else was really terrible.

jyn 2025-11-13T03:21:58.097569Z

i think you're pointing at a worse-is-better thing, git works "well enough" so people don't switch? i don't know what to tell you, a bunch of my friends are switching to jj

1
gtrak 2025-11-13T03:22:00.995659Z

people worked around the rough edges and it got a little better and took over the world

jyn 2025-11-13T03:22:04.277909Z

it's not mainstream yet and that's fine

jyn 2025-11-13T03:22:44.401459Z

git is actually an interesting case because when it breaks people are afraid to try things and ask for help

jyn 2025-11-13T03:23:01.447399Z

for most devtools people just put up with things being broken, so you never hear about the brokenness

gtrak 2025-11-13T03:24:54.236109Z

Yeah, I don't know how to beat 'worse it better', but maybe someone does πŸ˜„

jyn 2025-11-13T03:25:04.533619Z

i think jj is doing a good job!

jyn 2025-11-13T03:25:21.893779Z

it doesn't need to take over the world to be a success

jyn 2025-11-13T03:25:27.058519Z

that's a feature, not a bug

gtrak 2025-11-13T03:29:03.371529Z

It looks like a nice design, but I got good enough with git 10 years ago, and as long as magit stays viable I'm not sure it's easy to beat.

jyn 2025-11-13T03:29:54.722329Z

i am not trying to convince you personally to switch to jj πŸ˜„ just to point to it as a model of the kind of adoption model i think works well

gtrak 2025-11-13T03:30:07.242999Z

sure, just saying there has to be incremental value for different kinds of users and I don't quite see it for my case

gtrak 2025-11-13T03:30:52.772769Z

I like this and wish everyone else I work with would do it, maybe that's valuable: https://github.com/jj-vcs/jj?tab=readme-ov-file#automatic-rebase

gtrak 2025-11-13T03:32:06.668339Z

specifically I mean using git without merge commits, squashing and rebasing, and stacked diffs is a good thing, in my opinion. If the tool makes it easier, then it doesn't have to be just my opinion.

jyn 2025-11-13T03:32:46.039519Z

so, the thing i'm trying to point to is that jj is designed so that you don't have to care if the other people at your work use it

jyn 2025-11-13T03:32:55.313889Z

it uses a normal git repo as the data layer

jyn 2025-11-13T03:35:07.020909Z

that's what i mean by "incremental adoption"

gtrak 2025-11-13T03:36:18.694909Z

Yeah, I understand the interop piece.

πŸ‘ 1
gtrak 2025-11-13T03:36:40.839449Z

I also used git-svn back in the day

gtrak 2025-11-13T03:37:30.308959Z

git could track renames, and svn couldn't, and that was useful for what I was trying to do

gtrak 2025-11-13T03:38:28.391539Z

'embrace, extend, extinguish'

jyn 2025-11-13T03:38:51.169439Z

heh

jyn 2025-11-13T03:38:53.103599Z

kinda, yeah

jyn 2025-11-13T03:39:01.520069Z

that but for PTYs

2025-11-11T21:19:39.236999Z

funny how your proposed solution is basically nrepl for the terminal, but with transactional semantics

2025-11-11T21:20:01.098259Z

it's a compelling idea

jyn 2025-11-11T23:09:17.474239Z

yes!

jyn 2025-11-11T23:09:30.259509Z

and even more than that, i want to treat repl sessions as data

jyn 2025-11-11T23:09:45.376249Z

i want asciicinema, but i can edit and transform it at runtime, i want a pluggable terminal frontend

jyn 2025-11-11T23:10:04.165349Z

like ... imagine if you could hook up the equivalent of https://github.com/bhauman/rebel-readline to your terminal

jyn 2025-11-11T23:10:18.452049Z

you can write a bunch of plugins that work on the line editing, that aren't tied to the shell

jyn 2025-11-11T23:54:02.370759Z

omg omg omg someone built the transactional semantics already https://patrick.sirref.org/shelter/index.xml

😍 2
2025-11-11T23:54:28.575629Z

that's sick

2025-11-11T23:55:00.598609Z

powershell did the right thing to deal with objects, not strings, but that's never caught on

jyn 2025-11-11T23:59:38.359789Z

nushell picked up on it!

πŸ‘€ 1
jyn 2025-11-11T23:59:51.666019Z

i don't think i've shared https://jyn.dev/you-are-in-a-box/ yet

2025-11-12T00:21:30.649769Z

i had no idea nushell did that, that's cool

2025-11-12T07:46:52.442849Z

For related work in clojure there is also this discontinued project https://github.com/dundalek/closh it was initiated before babashka saw the light. it was a crossover between a terminal and a repl