Skip to content

Instantly share code, notes, and snippets.

View crcx's full-sized avatar

Charles Childers crcx

View GitHub Profile
Starting program: /usr/home/crc/src/rune/a.out
Program received signal SIGBUS, Bus error.
0x00000008008debbd in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
(gdb) backtrace
#0 0x00000008008debbd in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#1 0x00000008008d868f in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#2 0x00000008008d9767 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#3 0x00000008008c0baf in _malloc_thread_cleanup () from /lib/libc.so.7
#4 0x00000008008e1bba in malloc () from /lib/libc.so.7
Starting program: /usr/home/crc/src/rune/a.out
Program received signal SIGBUS, Bus error.
0x00000008008debbd in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
(gdb) backtrace
#0 0x00000008008debbd in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#1 0x00000008008d868f in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#2 0x00000008008d9767 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#3 0x00000008008c0baf in _malloc_thread_cleanup () from /lib/libc.so.7
#4 0x00000008008e1bba in malloc () from /lib/libc.so.7
: choose
i listlist
r choice:false
r choice:true
i line....
d 0
i liadfeca
r choice:false
i re......
Implement `choose`, a conditional combinator which will execute one of
two functions, depending on the state of a flag. We take advantage of
a little hack here. Store the pointers into a jump table with two
fields, and use the flag as the index. Default to the *false* entry,
since a *true* flag is -1.
~~~
: choice:true
d 0
crc@primary:/usr/home/crc$ $ openssl s_client -connect umbrellix.net:105
CONNECTED(00000003)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = www.umbrellix.net
verify return:1
---
Certificate chain
root@primary:/usr/home/crc-pkgsrc/pkgsrc/lang/forth-retro # /usr/pkg/bin/bmake
=> Bootstrap dependency digest>=20010302: NOT found
=> Verifying reinstall for ../../pkgtools/digest
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/pkg/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Installing for digest-20160304
=> Generating pre-install file lists
/bin/sh ./mkinstalldirs /usr/home/crc-pkgsrc/pkgsrc/pkgtools/digest/work/.destdir/usr/pkg/bin
/usr/bin/install -c -s -o root -g wheel -m 755 digest /usr/home/crc-pkgsrc/pkgsrc/pkgtools/digest/work/.destdir/usr/pkg/bin/digest
root@primary:/home/crc-pkgsrc/pkgsrc/lang/forth-retro # make
=> Bootstrap dependency digest>=20010302: NOT found
=> Verifying reinstall for ../../pkgtools/digest
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/pkg/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
===> Creating toolchain wrappers for digest-20160304
ERROR: gcc2>=2.95 is not installed; can't buildlink files.
*** Error code 1
@crcx
crcx / tuporo.md
Last active September 28, 2017 18:51
tūporo is a gopher-based block storage system for retro

#!/usr/bin/env rre

tūporo: a gopher-based block store for retro

Overview

Traditional Forths often provided simple editors oriented around blocks. A standard block is a single unit of text, with 16 lines of 64 symbols per line, or 1024 characters. While far less common now, blocks are still useful, and RETRO has had some support for them in most of its

@crcx
crcx / gist:4e0acfda5645908f8da2d5200df838ba
Created September 2, 2017 02:55
IOS Gopher bookmarket
- add a bookmark to any page
- edit the bookmark
- make the URL:
javascript:window.open('gopher://bridge.forthworks.com/bridge/web2text%7C%7C'+location.href);
- change title to "Open in Gopher"
- enjoy
@crcx
crcx / e.md
Created August 24, 2017 14:15
'evaluate' a string for RETRO 12

The standard interfaces have their own approaches to getting and dealing with user input. Sometimes though it'd be nicer to have a way of evaluating code from within RETRO itself. This provides an evaluate word.

{{

First, create a buffer for the string to be evaluated. This is sized