~smlavine

~smlavine/zm-devel

Last active 6 days ago

~smlavine/zm-announce

Last active 6 days ago

~smlavine/onclick-announce

Last active a month ago

~smlavine/onclick-devel

Last active 5 months ago

~smlavine/colat-devel

Last active 10 months ago

~smlavine/colat-announce

Last active 10 months ago

~smlavine/err-announce

Last active 1 year, 5 months ago

~smlavine/bf-announce

Last active 1 year, 7 months ago

~smlavine/bf-devel

Last active 1 year, 7 months ago

~smlavine/globalregularexpressionprint-devel

Last active 1 year, 7 months ago
View more

Recent activity

Re: [PATCH modal] Print final result when running with -q 18 days ago

From Sebastian LaVine to ~rabbits/public-inbox

-1 -- if the user selects `-q`, I think they should only see output that
is explicitly from the program with `?:`.

If this patch is to be added, though, then it should at least be
modified to print the final result to stderr so that it can be filtered
away on the command line.

[PATCH modal] Remove ?<, ?> I/O aliases 18 days ago

From Sebastian LaVine to ~rabbits/public-inbox

Neat, but I don't think these will catch on ultimately. And we
definitely don't need two identical registers each for I/O.
---
 src/modal.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modal.c b/src/modal.c
index 3fd2094..5ec3139 100644
--- a/src/modal.c
+++ b/src/modal.c
@@ -111,10 +111,12 @@ write_reg(char r, char *reg)
{
	char c, *cap = walk(reg);
	switch(r) {
[message trimmed]

[PATCH modal] Add arbitrary byte '\xHH' output escape sequence 19 days ago

From Sebastian LaVine to ~rabbits/public-inbox

---
 src/modal.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/modal.c b/src/modal.c
index e4f5b6f..8016af9 100644
--- a/src/modal.c
+++ b/src/modal.c
@@ -13,6 +13,17 @@ static char bank_a[0x4000], *src_ = bank_a;
static char bank_b[0x4000], *dst_ = bank_b;
static char *regs[0x100];

static const int hex[128] = {
	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*00*/
[message trimmed]

[PATCH modal] Re-add stderr usage 20 days ago

From Sebastian LaVine to ~rabbits/public-inbox

This commit spiritually reverts 392e05d.

With debug messages and interpreter state sent to stderr and the actual
output of the program sent to stdout, it is easier to read both
independently. For instance, one can redirect stdout or stderr to
another terminal window to keep an eye on both outputs independently:

        bin/modal examples/hello.modal >/dev/pts/5
---
 src/modal.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/modal.c b/src/modal.c
index e9b54fe..fe3767e 100644
[message trimmed]

[PATCH modal] Replace quit message with EOF message 22 days ago

From Sebastian LaVine to ~rabbits/public-inbox

There's just something *nicer* about saying a REPL can be implemented in
5 lines of code than in 6, you know?
---
 examples/repl.modal | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/examples/repl.modal b/examples/repl.modal
index 2f2b8d6..65543e3 100644
--- a/examples/repl.modal
+++ b/examples/repl.modal
@@ -1,10 +1,9 @@
?(?-) (This is a fully functional Modal REPL.)

<> (EOF wait stdin) ((Bye.\n) print)
[message trimmed]

[PATCH modal] Replace io_repl.modal with an actual Modal REPL 25 days ago

From Sebastian LaVine to ~rabbits/public-inbox

---
 examples/io_repl.modal | 11 -----------
 examples/repl.modal    |  9 +++++++++
 2 files changed, 9 insertions(+), 11 deletions(-)
 delete mode 100644 examples/io_repl.modal
 create mode 100644 examples/repl.modal

diff --git a/examples/io_repl.modal b/examples/io_repl.modal
deleted file mode 100644
index 5e96b63..0000000
--- a/examples/io_repl.modal
@@ -1,11 +0,0 @@
?(?-) (This example demonstrates how to keep the runtime active between prompts.)
[message trimmed]

[PATCH modal] Add secondary output control 26 days ago

From Sebastian LaVine to ~rabbits/public-inbox

This adds a second argument and some switches for writing the current
state of the interpreter to the provided file. 

The slow -s option waits for a newline before continuing on to the next
rewrite.

The separator -p option clarifies different states when viewing output
in a file.

The clear -t option is neat if you want to visualize the output
(combined with the -s option) in a terminal window. This can be done
by providing the terminal as the secondary output file (ex. /dev/pts/3).

---
[message trimmed]

[PATCH modal 2/2] Add colors.modal 26 days ago

From Sebastian LaVine to ~rabbits/public-inbox

Demonstrates some fun that can be had through \e.
---
 examples/colors.modal | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 examples/colors.modal

diff --git a/examples/colors.modal b/examples/colors.modal
new file mode 100644
index 0000000..f9b599f
--- /dev/null
+++ b/examples/colors.modal
@@ -0,0 +1,20 @@
<> ( Color iiiii ?x) (Color M iiiii ?x)
<> ( Color ?x ((?A ?a) (?B ?b) (?C ?c) (?D ?d) (?E ?e) Nl) )
[message trimmed]

[PATCH modal 1/2] Add ESC escape sequence 26 days ago

From Sebastian LaVine to ~rabbits/public-inbox

---
See 2/2 for some fun that can be had. A simpler example: we can now
clear the terminal screen with `?(?: ?:) \ec`.
 src/modal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modal.c b/src/modal.c
index 38d9cae..158f82b 100644
--- a/src/modal.c
+++ b/src/modal.c
@@ -83,6 +83,7 @@ put_reg(char r, char *reg)
				switch(*reg++) {
				case 't': putc(0x09, stdout); break;
				case 'n': putc(0x0a, stdout); break;
[message trimmed]

onclick v1.0.4 released a month ago

From Sebastian LaVine to ~smlavine/onclick-announce

This is a minor update that adds error messages (as oppose to aborts) on
os::exec errors.

onclick is a small utility that runs a command every time the terminal
is clicked.

More information about the project can be found at
<https://sr.ht/~smlavine/onclick>.

Subscribe to the announcement list by sending an email to
<~smlavine/onclick-announce+subscribe@lists.sr.ht>.

master$ git shortlog 1.0.3..
Sebastian LaVine (3):