Skip to content

Instantly share code, notes, and snippets.

@bbarker
bbarker / thunk_pitfall_examples.md
Created April 29, 2026 11:06
Examples of discarded thunks
      anyxchange.streaming.prepareListingModerationPipeline
        pipeline klog tables adminStash adminEmails moderationServiceOpt =
        do
          use DlqFailureStage DlqUnknownStage
          use Failure message
          listingDlqTbl = DeploymentTables.listingModerationDlqTable tables
          processEvent lid event =
            (ListingId lidText) = lid
@bbarker
bbarker / work-prompt-unison.md
Last active April 28, 2026 15:25
Unison Work Prompt (Steering) file

Architecture and Style

Strive to write functional-style, maintainable code, while keeping an eye on performance. Avoid anything unsafe.

CRITICAL: Always force thunked function calls with (). If a function returns '{g} a, calling it without () silently discards the unevaluated thunk — causing data loss with no type error or runtime crash. E.g. _ = createAlert ... link does nothing; _ = createAlert ... link () works.

@bbarker
bbarker / ucm_squash_log.txt
Created November 19, 2025 12:48
Missing history after squash
```
anyxchange/routes_squash_2> switch anyxchange/main
anyxchange/main> merge anyxchange/routes_squash_2
I couldn't automatically merge anyxchange/routes_squash_2 into anyxchange/main. However, I've
added the definitions that need attention to the top of
/home/bbarker/workspace/unison-scratch/anyxchange/scratch-claude-cleaned2.u.
When you're done, you can run
@bbarker
bbarker / bluesky_analyze.nu
Created October 13, 2025 23:10
Retrieve posts for a bluesky account - useful for checking if a bot, etc. Written in Nu (nushell)
#!/usr/bin/env nu
# Bluesky Reply Post Fetcher for Nushell
# No authentication required for public posts
# Run with: nu script.nu
let handle = 'amy1017-99.bsky.social'
let api_base = 'https://public.api.bsky.app/xrpc'
print $"\n🔍 Analyzing account: ($handle)\n"
print "Fetching posts...\n"
@bbarker
bbarker / claude-code
Created March 2, 2025 01:19
deno-claude
#!/usr/bin/env bash
export GOOGLE_SDK_NODE_LOGGING=1
exec deno run --allow-read --allow-net --no-config \
--unstable-node-globals --unstable-bare-node-builtins \
--allow-sys --allow-env \
--allow-write="$HOME/.claude" \
--allow-read="$HOME/.cache/deno,$HOME/.claude,$(pwd)" \
--lock /home/bbarker/.deno/bin/.claude-code.lock.json \
@bbarker
bbarker / rebase_squash.sh
Created November 22, 2024 14:05
A script to quickly squash together commits in your current branch
#!/usr/bin/env bash
# Function to check if we're in a Git repository
check_git_repo() {
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
echo "Error: Not in a Git repository."
exit 1
fi
}
@bbarker
bbarker / upgrade_blog_ok.txt
Created November 21, 2024 23:53
upgrade blog ok
bblog-entries/main> project.create test-blog-upgrade
🎉 I've created the project test-blog-upgrade.
I'll now fetch the latest version of the base Unison library...
🎨 Type `ui` to explore this project's code in your browser.
🔭 Discover libraries at https://share.unison-lang.org
@bbarker
bbarker / OI_packaging_discussion.md
Last active November 12, 2023 18:31
OI packaging discussion 11/12/2023
  • https://repology.org/
    • doesn’t notify maintainers
    • provides a view of which packages are out of date
      • Till has a prototype that will bump versions “the forge” / activity pub
  • Docs - priority is to guide new people into the process of contributing in various ways process
  • OminoOS uses a patched version of illumos, including patches for linux branded zones
    • These apparently did not meet the requirements of getting upstreamed to illumos
  • Two diverging versions of IPS (with OI and OmniOS), but only two directories are a problem.
    • Dependency trees wouldn’t resolve
  • Rust version is on the backburner - as it was figured out what the slow issue was in IPS
@bbarker
bbarker / build.sbt
Created February 13, 2022 15:34
JitPack Resolvers in SBT
resolvers ++= Seq(
"jitpack.io" at "https://jitpack.io/",
),
@bbarker
bbarker / build.sbt
Created February 13, 2022 15:33
Jitpack dependency in SBT
"io.github.bbarker" %% "zio-diffx" % "0.0.4" % Test