dtb trinity
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…

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

I think reverse(1) would be fine.

An arbitrary delimiter list (e.g. `out hello world

trinity commented on pull request bonsai/harakit#50 2024-02-08 16:38:57 -07:00
Add hru(1)

Why 1 and not a sysexit?

trinity commented on issue bonsai/harakit#19 2024-02-07 07:26:27 -07:00
ASV in Bonsai

Relevant: https://github.com/SixArm/usv

They seem to believe they have monopolized Unicode Separated Values:

The USV project aims to become a free open source IANA standard, much like the…

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

division

trinity approved bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

I've suggested minor fixes but the code looks alright.

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

It's less in accord with IEEE 754 and more that we are applying IEEE 754 (or, more specifically, Rust is - and even then, it's the processor itself I think that is doing the floating point operations). I would say "Due to IEEE 754 (the IEEE Standard for Floating Point Arithmetic) limitations, rounding errors may occur. And not "in line" with the standard but simply "that can be represented".

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

I don't like the use of the Unicode apostrophe here because it could mess with literal text lookups. Nobody likes a No occurrences of "doesn't" because of fancy rune voodoo.

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

"either from given arguments, or, in their absence, standard input" - right now you have "parse" twice in there which feels weird.

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

I believe the past tense of "output" is "output" - also, I'm having a hard time understanding what you're trying to convey here - shouldn't rpn print the last number on the stack? It sounds like it prints the last result of any algebraic operations but ignores further given numbers.

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:05:32 -07:00
rpn(1)

"If arguments are passed to rpn" reads cleaner to me but I can't put my finger on why.

trinity commented on pull request bonsai/harakit#36 2024-02-07 07:02:11 -07:00
rpn(1)

I think ** should be allowed, it's a common name for the operation.