No new posts available
dpc's avatar
(Professional)1d#

My latest Unix tooling abuse/creation.

I’m defining a alias command for Jujutsu:

parent-add = ["util", "exec", "--", "bash", "-c", '''
set -euo pipefail

source <(
nix run nixpkgs#argc -- --argc-eval /dev/stdin "$@" << EOF
# @option -r=@     Commit to modify
# @option -d       Parent to add
# @arg parent      Parent to add (positional version)
EOF
)

commit=${argc_r}
new_parent=${argc_d:-${argc_parent:-}}

if [ -z ${commit:-} ]; then
  >&2 echo "Must provide a commit to rebase"
  exit 1
fi

if [ -z ${new_parent:-} ]; then
  >&2 echo "Must provide a new parent"
  exit 1
fi

jj rebase -s "${commit}" -d "${commit}-" -d "${new_parent}"
''', ""]

which is like an shell script wrapped in a toml config file. Since the alias is executed as bash -c <...> it does not have an usable $0. So I’m using a heredoc passed via /dev/stdin 🤷 .

This works:

> jj parent-remove -h
USAGE: stdin [OPTIONS] [PARENT]

ARGS:
  [PARENT]  Parent to remove (positional version)

OPTIONS:
  -r <R>         Commit to modify [default: @]
  -d <D>         Parent to remove
  -h,  -help     Print help
  -V,  -version  Print version
dpc's avatar
(Professional)1d#

Software design is like origami. You start with an empty and unconstrained state, and every move (fold) gives you more features which makes new moves possible and some other impossible. So the game is to find a long sequence of folds that gives you the most desirable shape somewhere in the exponential and infinite space of all possible combination of moves. And that’s very hard and often requires going back and taking an alternative route, while the real world pressure swould prefer you to always keep folding whatever you have further…

dpc's avatar
(Personal)4d#

The lack of newline in:

# Header
- Item
- Item

triggers my OCD.

dpc's avatar
(Professional)14d#

What if we had:

io fn foo() {

}

in Rust, just like async fn. This would mean the function can block. Compiler could warn when it is called from async code. Initially it would be a lint, but down the line it could be switched to enforce that only io functions can call other io functions.

dpc's avatar
(Personal)25d#

Load “Płoną góry, płoną lasy by Czerwone Gitary”: https://youtube.com/watch?v=QFTL8w2vV5A

Vishalxl's avatar
27d#

dpc, one question about searching for a node or id on Iroh/rostra:

So my id here is rsut5j319xfrsr8ud3rgua8nmxm6kegcjjggijc6te5ein4tyjw8my

I understand its some ed25xx public key, which is some 64 bit number.

Using just this id, anyone can find this ‘user’ on the Iroh network, if I understand this correctly.

Then, my question is, lets say I only had the first 32 bits of this id, would I be able to find this user or endpoint on the Iroh/rostra network?

dpc's avatar
(Professional)27d#

If there was some dictionary/index somewhere, maybe. But I didn’t think the discovery methods implement anything like this. I also didn’t know if there any way to “browse” all known ids and I hope the answer is “no”.

👍️
dpc's avatar
(Professional)27d#

Load “Building Software is Sisiphean Work”: https://youtu.be/V__EcgUl1bs?si=XoiD1KeGuduP_9Xu

💯

Vishalxl's avatar
28d#

So does that account follow anyone? What’s shown ultimately?

dpc's avatar
(Personal)28d#

I’m planning to manage it and always have it follow people. As for what it shows, it’s easy to check!

dpc's avatar
10/21/2025#

This has a potential for being the funniest way to visualize failure modes of vibe coding.

dpc's avatar
(Personal)10/29/2025#

Ooops. Wrong thread somehow… :D . UX fail?

dpc's avatar
(Personal)10/29/2025#