dtb trinity
trinity pushed to scrut-fix at bonsai/harakit 2024-02-16 01:13:57 -07:00
64a1a19bd8 scrut(1): fix buffer overflow in option parsing
trinity approved bonsai/harakit#57 2024-02-14 22:34:34 -07:00
rpn(1): fixed exponentiation
trinity commented on pull request bonsai/harakit#57 2024-02-14 22:34:27 -07:00
rpn(1): fixed exponentiation

Never mind, I looked it up and the HP 41C (basically the gold standard in terms of RPN calculators) is indeed y**x. It looks like Elektronika (which I was referencing, particularly the MK-61…

trinity commented on issue bonsai/harakit#47 2024-02-14 17:41:09 -07:00
conv(1) – convert data

Why would one tool do both character encoding conversion and number base conversion?

trinity commented on pull request bonsai/harakit#57 2024-02-14 17:15:14 -07:00
rpn(1): fixed exponentiation

I figured exponentiating (is that the word?) x to the power of y (Python: x ** y) would be more intuitive for existing RPN users (because this matches the operation on HP and Elektronika…

trinity commented on issue bonsai/harakit#8 2024-02-14 09:40:56 -07:00
qi(1): The qi shell

Goodness... I think that would be a vector implementation. I don't know how to feel about it now.

Our flow control is still up in the air so ignore the weirdness besides let and def:

trinity commented on issue bonsai/harakit#8 2024-02-14 09:30:36 -07:00
qi(1): The qi shell

On second thought def when used without arguments should display variable usages. Here are some examples of its use to help explain it.

First let's set some variables:

; let a b
;…
trinity commented on issue bonsai/harakit#8 2024-02-14 07:26:38 -07:00
qi(1): The qi shell

emma and i were discussing variable assignment and the potential usage of a let term, which is used to define terms. some pseudoishcode snippets from the conversation to elucidate on that a…

trinity commented on issue bonsai/harakit#8 2024-02-14 07:14:48 -07:00
qi(1): The qi shell

Perhaps there should be a way to change which file is used for randomness, in the shell. Like a random_source variable that expands to a file (like /dev/random).

This could potentially be…

trinity commented on issue bonsai/harakit#55 2024-02-14 07:07:56 -07:00
mix(1) – randomly sort inputs

Maybe shuffle?

Then you could do stuff like `for f in /media/audio/*; do scrut -f "$f" && out "$f"; done

trinity commented on issue bonsai/harakit#8 2024-02-12 11:47:22 -07:00
qi(1): The qi shell

Accidentally tapped the button. That thought's incomplete and I'll finish it later.

trinity reopened issue bonsai/harakit#8 2024-02-12 11:46:28 -07:00
qi(1): The qi shell
trinity commented on issue bonsai/harakit#8 2024-02-12 11:46:22 -07:00
qi(1): The qi shell

Alright, this is the continuation of my last comment.

The behavior of the traditional POSIX shell with regards to unquoted variable expansion is useful, sometimes, but usually unwanted and a…

trinity closed issue bonsai/harakit#8 2024-02-12 11:46:22 -07:00
qi(1): The qi shell
trinity commented on issue bonsai/harakit#8 2024-02-12 09:59:45 -07:00
qi(1): The qi shell

I have further thoughts on shell quoting.

When I think of program execution I think of the exec function family in C's <unistd.h>:…

trinity commented on issue bonsai/harakit#8 2024-02-11 13:55:53 -07:00
qi(1): The qi shell

How will variables behave?

POSIX shell doesn't use variable declarations; any variable is the empty string at start (giving test -z its utility).

We could copy that behavior but it sort of…

trinity commented on issue bonsai/harakit#48 2024-02-10 22:26:02 -07:00
flip(1) – reverse data

That seems equivalent functionally to what I figured.

trinity commented on issue bonsai/harakit#8 2024-02-09 07:53:53 -07:00
qi(1): The qi shell

The way POSIX shell does variable assignment is awful.

#!/bin/env -i /bin/sh
# ^^ don't inherit an existing environment

echo "$x" # unassigned (vars are "" by default), so it'll echo…
trinity commented on issue bonsai/harakit#49 2024-02-09 07:39:59 -07:00
docs/scrut.1: write man page for scrut(1)

I'm currently rewriting scrut(1) in Rust - a man page will accompany it. Expect this in a week or two.

trinity commented on issue bonsai/harakit#53 2024-02-09 06:50:21 -07:00
si(1) – SI unit converter

units(1) is a classic tool and one of few that is justifiably large - it has to support hundreds of units and conversions, with locales and upkeep to maintain unit accuracy. It's fairly user-friend…