Skip to content

Instantly share code, notes, and snippets.

View crcx's full-sized avatar

Charles Childers crcx

View GitHub Profile
#!/usr/bin/env python3
# gen-tags.py
# Generate a ctags compatible tags file for Parable
import fnmatch
import os
def tag(tag, file, line, textmate):
'-' ':' describe
'-' 'nop' describe
'-' 'set-type' describe
'-' 'type?' describe
'-' '+' describe
'-' '-' describe
'-' '*' describe
'-' '/' describe
'-' 'rem' describe
'-' 'floor' describe
@crcx
crcx / -
Created February 23, 2016 01:18 — forked from anonymous/-
BC_NOP = 000
BC_SET_TYPE = 1
BC_GET_TYPE = 2
BC_ADD = 3
BC_SUBTRACT = 4
BC_MULTIPLY = 5
BC_DIVIDE = 6
BC_REMAINDER = 7
BC_FLOOR = 8
BC_POW = 9
@crcx
crcx / ,
Created February 18, 2016 11:30 — forked from anonymous/,
0 'Confidence' var!
[ 'var?' ] {
[ 'Probability' ] ::
[ "s-s" dup first uppercase? [ &Probability increment ] if-true ] 'initial' :
[ "s-s" dup 1 fetch lowercase? [ &Probability increment ] if-true ] 'second' :
[ "s-s" dup lookup-function first remark? [ &Probability increment ] if-false drop ] 'no-comment?' :
[ "s-f" \
0 !Probability \
@crcx
crcx / PaaS.md
Last active February 6, 2016 14:01 — forked from anonymous/gist:54c0b0015ee4e769701c
PaaS API Notes

Requests

/PaaS/0
  • get_pso
  • evaluate
    • source
  • memory_map
  • slice_contents
  • slice
@crcx
crcx / gist:4979875
Last active December 13, 2015 21:48 — forked from anonymous/gist:4979866
"Various Geometric Conversions"
[ #0.0174532925 * ] 'degrees-to-radians' define
'( degrees - radians )\nConvert degrees to radians' 'degrees-to-radians' describe
[ #0.0174532925 / ] 'radians-to-degrees' define
'( radians - degrees )\nConvert radians to degrees' 'radians-to-degrees' describe
[ #3.14159 ] 'pi' define
'( - number )\nConstant; value for PI' 'pi' describe
( 24-jan-2013 : revectoring experiment in retro )
( ------------------------------------------------------- )
( original goal was to capture a newline-delimited string )
( looking in kernel.rx, i found newlines are converted to )
( strings via remap:whitespace, and i decided to attempt )
( revectoring this word to one that does nothing. )
( )
( had I paid a bit more attention, i might have noticed )
( the variable called 'remapping'. the command: )
( )
@crcx
crcx / FORLOOP.rx
Last active December 11, 2015 13:49 — forked from tangentstorm/FORLOOP.rx
## OBERON SYNTAX TO COMPILE:
FOR x := start TO goal BY step DO
block
END;
## StringTemplate ( generating retro code ):
for_stmt(id, beg, end, step, block) ::= <<
( FOR ) <id>
@crcx
crcx / more.rx
Created October 18, 2012 19:45 — forked from lsparrish/more.rx
yet another approach
( useful things )
: dictionary.find/xt ( string:name - xt ) find [ @d->xt ] [ drop #0 ] if ;
: getc:internal ( -c ) &getc 2 + @ do ;
( keymap )
9 variable: prefix:CHAR
create prefix:TABLE 256 allot
( We will lookup the keymap by name, to allow for per-application maps )
@crcx
crcx / gist:3896020
Created October 15, 2012 22:23 — forked from lsparrish/gist:3895813
prefix-based keybindings in retro
needs struct'
with struct'
variables| prefix lastbinding |
'; !prefix
{
1 field .link
1 field .label