Skip to content

Instantly share code, notes, and snippets.

View jayrbolton's full-sized avatar
🍕

Jay R Bolton jayrbolton

🍕
View GitHub Profile
@jayrbolton
jayrbolton / word_count.omi
Last active August 14, 2019 01:31
Asynchronously count words from from stdin and print formatted results to stdout
import @/table
export word_count
main
# Channel of words
| words <- !split_to_channel /\s/ stdin
# Hash table of word mapped to count
| word_counts <- !word_count words
$ iterate line <- !format word_counts
@jayrbolton
jayrbolton / gfu-diff.diff
Created February 12, 2020 18:16
GenomeFileUtil prod vs current diff
diff --git a/GenomeFileUtil.spec b/GenomeFileUtil.spec
index 9c8c209..d2cb40c 100644
--- a/GenomeFileUtil.spec
+++ b/GenomeFileUtil.spec
@@ -19,18 +19,18 @@ module GenomeFileUtil {
typedef mapping<string, string> usermeta;
- /*
+ /*
@jayrbolton
jayrbolton / drum-lang.md
Created April 10, 2020 20:53
Esoteric drumming and programming
  • Like a drum machine, you have a memory bank of patterns, where each pattern is a function definition
  • You invent a rhythm to signify a function name
    • While your functions's rhythm is playing in a loop, you can edit the function body
    • Add certain sounds and/or rhythms in a sequence to add commands, such as variable assignment or function application
    • To add a nested lexical scope, such as a while loop or a conditional, you loop a "keyword rhythm"
      • For example, there may be a special "if-condition" rhythm. While the if-condition rhythm is playing, you are editing the inside of its block. At this point, both the function body and if-condition rhythms will be looping in the background
  • When you execute a function, all the sounds and rhythms are played back in execution order at any speed you wanta
  • Keywords, commands, and functions are differentiated by rhythm, sound, and/or tone
# Right turn directions
TURN_DIR = {
'u': 'r',
'r': 'd',
'd': 'l',
'l': 'u',
}
# Right turn coordinate math
TURN_FN = {
@jayrbolton
jayrbolton / readme.txt
Created May 20, 2020 06:10
Elements (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created May 20, 2020 06:25
Elements (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created May 20, 2020 18:42
Elements (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / readme.txt
Created May 22, 2020 19:33
Elements (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@jayrbolton
jayrbolton / openrpc-kbase.md
Last active May 27, 2020 16:43
OpenRPC proposal for KBase

This uses the architectural proposal format found here: https://github.com/CMSgov/easi-app/blob/master/docs/adr/index.md

OpenRPC Adoption Proposal

Proposal to adopt the OpenRPC standard across KBase services and (eventually) apps.

OpenRPC defines a JSON-RPC 2.0 API along with JSON-Schema draft07 schemas for the parameter and result content.

There exists some JS tooling for OpenRPC, but not for Python. We would need a library similar to jsonrpcbase that is able to read an OpenRPC document to generate a set of validated methods while staying transport layer agnostic.

@jayrbolton
jayrbolton / readme.txt
Created May 27, 2020 16:20
Untitled PuzzleScript Script
Play this game by pasting the script in http://www.puzzlescript.net/editor.html