Journal 2025-03-28
When I signed up for Claude AI 3.5 I wanted to kick the tyres. I was (am) working on a pipeliney thing that passes messages wrapped as JSON. It must have been 2 years since I last felt to urge to do Lisp. Ok, let's do a Lisp in JSON (in node Javascript). So back then, it put together a very convincing set of source files, very well structured, we even had tests. But it hid a brick wall unwrapping objects. Ok, come back back to that. I just had a very frustrating few days, good momentum with my own code, brick wall head banging with real-world things. Sorting out dir org, oh yeah, Sheltopusik. I named it in a way that is instantly forgettable so no-one will be tempted to try it. Not long with Claude 3.7 (Projects with repomix) :
danny@danny-desktop:~/hyperdata/sheltopusik$ ./sp examples/fibonacci.sp
55
Woo-hoo! Now how about quicksort? Nah. Had about an hour on it. Totally borked. REMEMBER TO GIT BRANCH What was kinda lovely that Claude was suggested how to do things like the type system properly. Haskell! Kinda funny, I've completely forgotten how Lisp works anyhow, haven't tried coding in it for at least a decade and even then it was trying to get my head around SICP again. It's just the idea of it appeals to me.
Example of Sheltopusik code below. Just don't do it boys & girls.
Incidentally, Claude Code is outstanding, absolutely brilliant. It literally just writes all the code for you. More addictive than crack (and for my part at least, much more expensive). Still flawed, but more subtly. I'll say that again: REMEMBER TO GIT BRANCH
[
"define", "fib",
["lambda", ["n"],
["if", ["<", "n", 2],
"n",
["+",
["fib", ["-", "n", 1]],
["fib", ["-", "n", 2]]
]
]
],
["fib", 10]
]
Wanna huff butane? https://github.com/danja/sheltopusik
In Sheltopusik, define is a special form that binds a value to a variable in the current environment, but it doesn't support internal defines as expressions that return values. Could implementing a type system in Sheltopusik help prevent these kinds of issues? This inconsistency occurs because the list primitive in Sheltopusik automatically wraps its arguments in SPAtom objects, but the filter function is returning already-wrapped SPAtom objects. The language already has built-in type predicates like list? but lacks an explicit way to check for SPAtom instances. How would you implement proper lexical scoping for nested definitions in the evaluator? q4: Would implementing a proper let-binding form be a better solution than using nested defines or lambdas?
There are several limitations to the Lisp-like Sheltopusik language I'd like you to help with. These problems should be dealt with one at a time, and a test written for each to ensure functionality isn't broken. I don't know which is the best sequence in which to develop these features, please think about this carefully before proceeding gently.
- A
letspecial form is need - proper lexical scoping is needed for nested definitions in the evaluator
- the language lacks lacks an explicit way to check for SPAtom instances
- In Sheltopusik, define is a special form that binds a value to a variable in the current environment, but it doesn't support internal defines as expressions that return values
- Sheltopusik needs a type system Please think deeply about these problems, decide on a plan of action that involves minimal iterative changes, with test, and then provide me with the full source code of source file to change as individual artifacts.
editor that allows blocks to be selected and sent off to a particular graph/with tags
~/hyperdata/farelo/temp$ ls foolicious foowiki gnam sparql-diamonds trellis
kanban diced
dogbot - esm
- connect to home machine
- farelo
project voting machine drop-downs farelo
Adding repos is in :
config/scripts/setup-repos.sh
I have systemd autostart the tbox container on this computer but the image I've been using has known problems and I have to manually kill it and use docker-compose to start it again. However the fuseki site provides scripts itself, you can find in the jena-fuseki-docker-5.3.0 dir. So I think it makes sense to create a new image using that. But before starting, note the issues mentioned with the stain image discussed in TDBconcurrenterrorIssue#34stain_jena-docker.txt Can you please take a look and have a deep think about to replace the current fuseki setup with a clean, fault-free new version.
1. Stop all containers and remove lock files:
cd /home/danny/hyperdata/tbox
sudo systemctl stop tbox.service
docker compose down
sudo find ./data/fuseki -name "*.lock" -type f -delete
sudo chown -R $(id -u):$(id -g) ./data/fuseki
2. Rebuild and start the Fuseki container:
cd /home/danny/hyperdata/tbox
docker compose build fuseki
sudo systemctl start tbox.service
3. Check if the container is running properly:
docker ps | grep fuseki
docker logs $(docker ps -q -f name=tbox_fuseki)
The key changes I've made to fix your Fuseki issues:
1. Added proper lock file cleanup in the entrypoint.sh script
2. Set the correct user permissions in docker-compose.override.yml
3. Added the procps package in the Dockerfile
4. Created a cleanup script to fix permissions and remove stale locks
Try running these commands manually, and you should now have a working Fuseki setup that doesn't require manual
intervention after restart.