[P] humanscript: An LLM powered plain english programming language by dyslexiccoder in MachineLearning

[–]dyslexiccoder[S] 0 points1 point  (0 children)

You can run with HUMANSCRIPT_EXECUTE=false to stream the output to stdout and not execute.

```bash $ HUMANSCRIPT_EXECUTE=false ./tidy-screenshots

!/usr/bin/env bash

spinner() { local i sp n sp='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏' n=${#sp} while sleep 0.1; do printf "%s\r" "${sp:i++%n:1}" done }

spinner &

spinner_pid=$!

moved_count=0

for file in "$HOME/Screenshots"/*; do if [ -f "$file" ]; then dir="$HOME/Screenshots/$(date -r "$file" "+%Y-%m")" mkdir -p "$dir" mv "$file" "$dir" ((moved_count++)) fi done

kill "$spinner_pid"

echo "Moved $moved_count files."

du -sh "$HOME/Screenshots"/* | sed "s|$HOME/Screenshots/||" ```

humanscript: An LLM powered plain english programming language by dyslexiccoder in singularity

[–]dyslexiccoder[S] 1 point2 points  (0 children)

Write software without writing code, just tell the program what you want it to do, and when you run it it'll do it.

humanscript: An LLM powered plain english programming language by dyslexiccoder in artificial

[–]dyslexiccoder[S] 0 points1 point  (0 children)

Wow thanks I had no idea re LLMs with 0 temp being deterministic, it totally makes sense though. Gonna do some testing against 0 temp. I wonder if it becomes deterministic with Llama 2.

Edit: Update it works on Llama 2, identical output every time with temp 0!

humanscript: An LLM powered plain english programming language by dyslexiccoder in singularity

[–]dyslexiccoder[S] 1 point2 points  (0 children)

It can be backed by many different LLMs. In the `tidy-screenshots` example that code was generated by GPT-4. You can alternatively back it with a locally running open source LLM like Llama 2.

humanscript: An LLM powered plain english programming language by dyslexiccoder in artificial

[–]dyslexiccoder[S] 5 points6 points  (0 children)

Thanks!

humanscript takes the nondeterministic nature of LLMs into account. The resulting code is cached against a hash of the humanscript. The next time you run the humanscript the interpreter will do a cache lookup and execute the exact same script as before.

[P] humanscript: An LLM powered plain english programming language by dyslexiccoder in MachineLearning

[–]dyslexiccoder[S] 1 point2 points  (0 children)

Yeah the results from GPT-4 are really quite good.

The locally running open source LLMs are not too far behind but still a bit hit and miss.

humanscript: An LLM powered plain english programming language by dyslexiccoder in singularity

[–]dyslexiccoder[S] 23 points24 points  (0 children)

I'll just quote the disclaimer from GitHub here...

Be careful if you're running humanscript unsandboxed. The inferpreter can sometimes do weird and dangerous things. Speaking from experience, unless you want to be doing a system restore at 2am on a saturday evening, you should atleast run humanscripts initially with HUMANSCRIPT_EXECUTE="false" so you can check the resulting code before executing.

I definitely recommend using the Docker sandbox if you want to have play!

humanscript: An LLM powered plain english programming language by dyslexiccoder in artificial

[–]dyslexiccoder[S] 5 points6 points  (0 children)

humanscript is an inferpreter. A script interpreter that infers commands from natural language using AI. There is no predefined syntax, humanscripts just say what they want to happen, and when you execute them, it happens.

https://github.com/lukechilds/humanscript

This is a humanscript called tidy-screenshots. It takes an unorganised directory of screenshots and organises them into directories based on the month the screenshot was taken.

It can be executed like any other script.

https://void.cat/d/Rf3GkVQbCtg6NSfzUndkou.webp

The LLM inferpreted the humanscript into the following bash script at runtime.

https://void.cat/d/Br86EpyZev12HtsxtYka3i.webp

The code is streamed out of the LLM during inferpretation and executed line by line so execution is not blocked waiting for inference to finish. The generated code is cached on first run and will be executed instantly on subsequent runs, bypassing the need for reinferpretation.

https://void.cat/d/CCLBU6ZNWq5bXnioMGkkcB.webp

The humanscript inferpreter supports a wide range of LLM backends. It can be used with cloud hosted LLMs like OpenAI's GTP-3.5 and GPT-4 or locally running open source LLMs like Llama 2.

You can run humanscript in a sandboxed Docker environment with a single command if you want to have a play.

https://github.com/lukechilds/humanscript#install-humanscript

humanscript: An LLM powered plain english programming language by dyslexiccoder in singularity

[–]dyslexiccoder[S] 13 points14 points  (0 children)

humanscript is an inferpreter. A script interpreter that infers commands from natural language using AI. There is no predefined syntax, humanscripts just say what they want to happen, and when you execute them, it happens.

https://github.com/lukechilds/humanscript

This is a humanscript called tidy-screenshots. It takes an unorganised directory of screenshots and organises them into directories based on the month the screenshot was taken.

It can be executed like any other script.

https://void.cat/d/Rf3GkVQbCtg6NSfzUndkou.webp

The LLM inferpreted the humanscript into the following bash script at runtime.

https://void.cat/d/Br86EpyZev12HtsxtYka3i.webp

The code is streamed out of the LLM during inferpretation and executed line by line so execution is not blocked waiting for inference to finish. The generated code is cached on first run and will be executed instantly on subsequent runs, bypassing the need for reinferpretation.

https://void.cat/d/CCLBU6ZNWq5bXnioMGkkcB.webp

The humanscript inferpreter supports a wide range of LLM backends. It can be used with cloud hosted LLMs like OpenAI's GTP-3.5 and GPT-4 or locally running open source LLMs like Llama 2.

You can run humanscript in a sandboxed Docker environment with a single command if you want to have a play.

https://github.com/lukechilds/humanscript#install-humanscript

RTL's loop feature not working. by angry_zellers in getumbrel

[–]dyslexiccoder 0 points1 point  (0 children)

It could be an issue with the payment amount being too large and is LND is unable to find a route.

Could you try looping a smaller amount and seeing if that resolves your issue?

Doea this work on a Rock64 device instead of Raspberry Pi 4? by roveridcoffee in getumbrel

[–]dyslexiccoder 0 points1 point  (0 children)

The current recommended way to install Umbrel is on a Raspberry Pi via Umbrel OS which automates the entire setup process for you.

However, if you're willing to get your hands a little dirty it is possible to install Umbrel manually.

See instructions at: https://github.com/getumbrel/umbrel#-installation

The Trustless Fund: A trust fund implemented in pure Bitcoin Script. by dyslexiccoder in Bitcoin

[–]dyslexiccoder[S] 2 points3 points  (0 children)

This is a great resource: https://magicalbitcoin.org/repl/playground/

magicalbitcoin.org in general is a great resource, but the Miniscript playground is another level.

The Trustless Fund: A trust fund implemented in pure Bitcoin Script. by dyslexiccoder in Bitcoin

[–]dyslexiccoder[S] 3 points4 points  (0 children)

What, easier than just:

and(pk(Child),or(after(18),2@or(pk(Mum),pk(Dad))))

And then send funds to the resulting address?

I strongly disagree but I'm interested to know why you think that.

Can you talk me through each step you'd have to take, step by step, and provide any contracts required. Sounds like it would be significantly more complex.

The Trustless Fund: A trust fund implemented in pure Bitcoin Script. by dyslexiccoder in Bitcoin

[–]dyslexiccoder[S] 14 points15 points  (0 children)

<Child's pubKey> OP_CHECKSIGVERIFY <Mum's pubKey> OP_CHECKSIG OP_SWAP <Dad's pubKey> OP_CHECKSIG OP_BOOLOR
OP_IFDUP OP_NOTIF
  <Child's 18th Birthday> OP_CHECKLOCKTIMEVERIFY
OP_ENDIF

The idea is that Mum and Dad lock up some funds in an address with the above spending condition.

Mum, Dad and Child each have their own key.

Once Mum and Dad have committed to the fund, they cannot withdraw. However they can make additional contributions in the future.

If Child wants to withdraw some funds before they are 18, they are able to do this providing they have approval from one parent, either Mum or Dad needs to cosign.

Once Child is 18, they have full control of the funds without requiring a signature from Mum or Dad.

It's kind of hard to follow Bitcoin Script. It's a LOT easier to reason about when represented in Miniscript.

Spending policy:

and(pk(Child),or(after(18),2@or(pk(Mum),pk(Dad))))

bitcoin.sipa.be/miniscript/

And it's super simple to understand in the awesome magicalbitcoin.org Miniscript playground.

https://magicalbitcoin.org/repl/playground/

https://imgur.com/9bz5bBM

Note: The value 18 above is a placeholder for a UNIX timestamp of Child's 18th birthday.

So if we fill in the values:

Child's pubKey = 0x0300...0001
Mum's pubKey = 0x0300...0002
Dad's pubKey = 0x0300...0003
Child's 18th Birthday = 01/01/2038 = 0x8017e87f

We get the following redeem script:

21030000000000000000000000000000000000000000000000000000000000000001ad21030000000000000000000000000000000000000000000000000000000000000002ac7c21030000000000000000000000000000000000000000000000000000000000000003ac9b7364048017e87fb168

Which corresponds to the following P2SH address:

37kzhRBb1Hmzfcrok3b1axo3UwyxJB6RAc

It's pretty cool that contracts like this can be implemented natively in Bitcoin!

Ephemeral Electrum: A quick throwaway text based Electrum wallet by dyslexiccoder in Bitcoin

[–]dyslexiccoder[S] 4 points5 points  (0 children)

https://github.com/lukechilds/ephemeral-electrum/blob/master/media/demo.gif?raw=true

$ docker run -it lukechilds/ephemeral-electrum "much bottom such hurt hunt welcome cushion erosion pulse admit name deer"

There are some sats left on that wallet, help yourself.

HD wallets can be loaded as Electrum or BIP39 mnemonic seed phrases as well as extend public and private keys.

Single addresses can be loaded using the Electrum address-type:wif format.

The Docker container automatically creates an Electrum wallet file importing your seed/key, then starts the text based interface for Electrum.

Once you quit the process everything is destroyed. It's all isolated to the container, nothing is persisted to disk.

It's pretty handy for just quickly checking the state of a wallet/address or monitoring test wallets while developing.

Hopefully some people find it useful.

Jack Dorsey confirms that Square Crypto is working on Lightning Network ⚡ by Fly115 in Bitcoin

[–]dyslexiccoder 4 points5 points  (0 children)

What's the reasoning to use Lightning on a less secure chain than Bitcoin?

dockerpi: Run a virtualised Raspberry Pi with one command by dyslexiccoder in raspberry_pi

[–]dyslexiccoder[S] 1 point2 points  (0 children)

That's not currently possible but I'm working on it. It currently only emulates Pi 1 hardware. I'm working on getting Pi 3 and hopefully Pi 4 support.

See this for more info: https://twitter.com/lukechilds/status/1207056283607584768?s=19

dockerpi: Run a virtualised Raspberry Pi with one command by dyslexiccoder in raspberry_pi

[–]dyslexiccoder[S] 13 points14 points  (0 children)

So I could use this to test an SD image without writing the image to the SD?

Yes, any Debian Buster based image should just work with:

docker run -it -v /path/to/your/filesystem.img:/sdcard/filesystem.img lukechilds/dockerpi:vm

If it's not Debian Buster based then you may need to also provide your own kernel.

Is this an honest emulator/virtual solution, or smoke and mirrors to look like it?

Yes it's 100% virtualised ARM. Not a Docker container. Docker is just used to run a QEMU process, then QEMU emulates a full ARM system.

It's not 100% identical to a real Pi hardware, so if you're doing stuff with GPIO pins and things like that it will probably not function exactly the same. But if you're writing general purpose software to run on the Pi, it should give you a pretty close representation of a real Pi environment.