This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- uxnbot.lua 2022-10-20 21:33:58.783691604 -0400 | |
+++ uxnrepl.lua 2022-10-20 21:33:14.229193549 -0400 | |
@@ -1201,6 +1201,12 @@ | |
end | |
end | |
local chat = require('chat') | |
+print('uxnrepl (ctrl-d to quit)') | |
+io.write('> ') | |
+io.flush() | |
for l in io.stdin:lines() do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( main method for testing ) | |
|0100 | |
#1234 #0001 ;testcases JSR2 | |
#0000 #0431 ;testcases JSR2 | |
#0039 #0003 ;testcases JSR2 | |
#9321 #ffff ;testcases JSR2 | |
#ffff #9321 ;testcases JSR2 | |
#ffff #ffff ;testcases JSR2 | |
#7654 #8000 ;testcases JSR2 | |
#8000 #0001 ;testcases JSR2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; tal-mode.el | |
;; | |
;; by d_m | |
;; use rx for regular expressions | |
(require 'rx) | |
;; set up a mode hook (currently unused) | |
(defvar tal-mode-hook nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( grep.tal ) | |
( ) | |
( by d_m ) | |
( print a character to STDOUT ) | |
%emit { #18 DEO } | |
( the first argument to grep is the regex ) | |
( arguments are passed on STDIN, so we just ) | |
( assume the first "line" is the argument ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( maze.tal ) | |
( ) | |
( mazes generated by randomized depth-first search ) | |
( press any key to generate a new maze ) | |
( ) | |
( generator uses a simple 16-bit xorshift RNG ) | |
( based on http://b2d-f9r.blogspot.com/2010/08/16-bit-xorshift-rng-now-with-more.html ) | |
%DEBUG { #ff #0e DEO } | |
%<<5 { #50 SFT2 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( rng.tal ) | |
( simple 16-bit xorshift RNG ) | |
( based on http://b2d-f9r.blogspot.com/2010/08/16-bit-xorshift-rng-now-with-more.html ) | |
%<<5 { #50 SFT2 } | |
%>>1 { #01 SFT2 } | |
%>>3 { #03 SFT2 } | |
%RTN { JMP2r } | |
%EMIT { #18 DEO } | |
%DIGIT { #00 SWP ;digits ADD2 LDA EMIT } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cats.parse | |
package examples | |
import cats.implicits._ | |
import Parser.{char, charWhere, charsWhile, string1} | |
object Csv { | |
def mkString(p: Parser1[Char]): Parser[String] = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# by Erik Osheim | |
# | |
# STEPS TO USE | |
# | |
# 0. install deps | |
# - pip install requests | |
# | |
# 1. generate personal access token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COLLECTION 0 1 5 10 50 100 500 1000 | |
Array[Int] 16 24 40 56 216 416 2016 4016 | |
immutable.BitSet 24 24 24 24 24 32 96 160 | |
immutable.IntMap[Int] 16 40 328 688 3568 7168 35968 71968 | |
immutable.List[Int] 16 56 216 416 2016 4016 20016 40016 | |
immutable.Map[Int,Int] 16 40 304 720 4856 9680 53504 111760 | |
immutable.Queue[Int] 40 80 240 440 2040 4040 20040 40040 | |
immutable.Set[Int] 16 32 264 480 3016 5840 27696 57952 | |
immutable.SortedMap[Int,Int] 40 88 280 520 2440 4840 30008 62008 | |
immutable.SortedSet[Int] 40 104 296 536 2456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# simple streaming from the command line: | |
# | |
# ./cast.sh send *.mp3 # stream some files | |
# | |
# ./cast.sh recv # listen to the stream | |
# | |
# currently hardcodes localhost port 9999. | |
# |
NewerOlder