Start with a jj repo. Create a workspace, make some commits, then squash them down:
$ jj workspace add --name bar ../bar
$ cd ../bar
| -- ABOUTME: AppleScript to set up Ghostty terminal with custom split layout | |
| -- ABOUTME: Creates left column full height, right column with two vertical splits | |
| on makeNewWindow() | |
| if application "Ghostty" is running then | |
| tell application "System Events" | |
| set visible of application process "Ghostty" to true | |
| delay 0.1 | |
| end tell | |
| end if |
| // Written by claude-3-5-sonnet-20241022, based on https://github.com/paulsmith/aoc2024/blob/main/03/solution.zig | |
| const std = @import("std"); | |
| const startsWith = std.mem.startsWith; | |
| const input = @embedFile("input.txt"); | |
| const OpType = enum { | |
| mul, | |
| do_op, | |
| dont_op, |
| package bufscan | |
| type GoToken struct { | |
| Pos token.Pos | |
| Tok token.Token | |
| Lit string | |
| } | |
| type BufGoScanner struct { | |
| scan *scanner.Scanner |
| /** | |
| * 8x8 monochrome bitmap fonts for rendering | |
| * Author: Daniel Hepper <daniel@hepper.net> | |
| * | |
| * License: Public Domain | |
| * | |
| * Based on: | |
| * // Summary: font8x8.h | |
| * // 8x8 monochrome bitmap fonts for rendering | |
| * // |
| enum Kind { | |
| File, | |
| Directory, | |
| } | |
| struct Entry { | |
| name: String, | |
| kind: Kind, | |
| size: usize, | |
| parent: Option<usize>, |
aka generic guidelines
It's late 2021, and Go is about to add "generics" (i.e., type parameters for types and functions) to upcoming release version 1.18.
Here is some guidance for Go programmers, cribbed from a talk by Ian Lance Taylor.
| The quick brown fox jumps over the lazy dog. |
| paul@pumpkin:/tmp/SQLite-cf538e27$ python3.7 -c 'import sqlite3; print(sqlite3.connect(":memory").execute("select sqlite_version()").fetchone())' | |
| ('3.27.2',) | |
| paul@pumpkin:/tmp/SQLite-cf538e27$ ldd /usr/lib/python3.7/lib-dynload/_sqlite3.cpython-37m-x86_64-linux-gnu.so | |
| linux-vdso.so.1 (0x00007ffff752e000) | |
| libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f89e005b000) | |
| libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f89e003a000) | |
| libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f89dfe79000) | |
| libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f89dfcf6000) | |
| libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f89dfcf1000) | |
| /lib64/ld-linux-x86-64.so.2 (0x00007f89e01da000) |