Run the following
curl -fsSL https://claude.ai/install.sh | bash
git clone https://github.com/gavrielc/nanoclaw.git
cd nanoclaw
claude "/setup"
bailing out if any user input is necessary
| ind = -> | |
| out = [] | |
| for line in it / \\n | |
| # line.replace /[^\s]+( [^\s]+)*/g (w,_,at)-> | |
| line.replace /[^\s]+/g (w,at)-> # actually just iterate | |
| out.push [at,w] | |
| # | |
| out | |
| ren = -> | |
| cur = 0 |
| /* | |
| - `»` and `«` to delimit indent/outdent tokens | |
| - two text areas side by side, one with »«, one without | |
| - edits to indent editor update the brackets, edits to bracket editor update indents in both to match brackets | |
| */ | |
| mnt = document.body.querySelector('div') | |
| mnt && mnt.remove() | |
| document.body.appendChild(mnt = document.createElement('div')) | |
| out.innerText=''; (new Date)+"\n"+document.body.outerHTML | |
| mnt.innerHTML = ` |
| #!/usr/bin/env lsc | |
| {stdin, stdout} = process | |
| stdout.write "\x1b[?25l" | |
| stdin.on \data -> stdout.write "\x1b[?25h"; process.exit 0 | |
| require! \osc-js | |
| a = new oscJs plugin:new osc-js.DatagramPlugin | |
| a.open port:2222 host:0 | |
| v = -> "█"*(it*8) + " ▏▎▍▌▋▊▉█"[0.^.(it*64%8)] | |
| n=1 | |
| a.on "*" ({address:[...,a], args:[h]}) -> |
| // Adapted from https://fabiensanglard.net/rayTracing_back_of_business_card/ | |
| #include <stdlib.h> // card > aek.ppm | |
| #include <stdio.h> | |
| #include <math.h> | |
| #include <time.h> | |
| typedef int i;typedef float f;struct v{ | |
| f x,y,z;v operator+(v r){return v(x+r.x | |
| ,y+r.y,z+r.z);}v operator*(v r){return | |
| v(x*r.x,y*r.y,z*r.z);}v operator*(f r){return | |
| v(x*r,y*r,z*r);}f operator%(v r){return |
| #![feature(const_panic)] | |
| #![feature(const_in_array_repeat_expressions)] | |
| #![feature(array_map)] | |
| #![feature(untagged_unions,min_const_generics)] | |
| use std::convert::{TryInto,TryFrom}; | |
| use std::mem; | |
| use core::fmt; | |
| use core::fmt::{Debug}; |
| trait Person { | |
| fn greeting(&self) -> StateOfMind; | |
| fn name(&self) -> &'static str; | |
| } | |
| struct Ixi { } | |
| struct Katie { } | |
| #[derive(Debug)] | |
| enum StateOfMind { |
| // On every page, run | |
| links=[...document.querySelectorAll('p a')].map(x=>x.outerHTML); | |
| page=[`<link rel="self" href=${document.location}/>`, ...links].join("\n"); | |
| localStorage.setItem("oh-links", | |
| (localStorage.getItem("oh-links") || "") + "\n\n" + page | |
| ) | |
| //Then copy out one final | |
| localStorage.getItem("oh-links") | |
| //and paste it into https://claude.ai/public/artifacts/bbb54583-0310-49d5-b3fe-54a87054b5ac |
Run the following
curl -fsSL https://claude.ai/install.sh | bash
git clone https://github.com/gavrielc/nanoclaw.git
cd nanoclaw
claude "/setup"
bailing out if any user input is necessary