aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NOTES49
-rw-r--r--README (renamed from notes.txt)45
-rw-r--r--TODO2
3 files changed, 66 insertions, 30 deletions
diff --git a/NOTES b/NOTES
new file mode 100644
index 0000000..f49dfe5
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,49 @@
+
+opcodes
+ note: no unary, increment, decrement
+ arthithmetic: + - * / %
+ bitwise: l r & | ^ ~
+ "<<" is l, ">>" is r
+ all are atoms or binary operators, so recursive compilation to a forth-like?
+ order of ops:
+ ~
+ * / %
+ + -
+ << >>
+ &
+ ^
+ |
+
+final console interface:
+ #hashtag (exact) -> searches identica for tunes
+ @username (exact) -> parses identica feed for tunes
+ _1234... -> plays track from memory
+ expression -> compiles and plays expression
+ [else] -> searches greedily for a valid expression; if not found, ignores
+
+bytetros?
+
+
+
+void proc_token()
+
+int[32] itable
+struct { node* car, nlist* cdr } nlist
+tlist* tcons(token*, )
+
+struct { } token
+token[140] ttable
+struct { char type, int* iptr, int * } node
+ntable[140]
+int h2i(char*)
+
+
+s-exp method:
+tokenize: glom numbers
+preparse: match parens, return s-expr
+parse: turn into prefix notation
+validate: check against rules
+compile: optionally remove trivial identities ("~~") and evaluate static expressions
+
+general method:
+grammar parser, returns ast
diff --git a/notes.txt b/README
index 102da5a..fa407af 100644
--- a/notes.txt
+++ b/README
@@ -1,40 +1,24 @@
-opcodes
- note: no unary, increment, decrement
- arthithmetic: + - * / %
- bitwise: l r & | ^ ~
- "<<" is l, ">>" is r
- all are atoms or binary operators, so recursive compilation to a forth-like?
- order of ops:
- ~
- * / %
- + -
- << >>
- &
- ^
- |
+ _ _ _
+ | |__ _ _| |_ ___| |_ _ _ _ __ ___ ___
+ | '_ \| | | | __/ _ \ __| | | | '_ \ / _ \/ __|
+ | |_) | |_| | || __/ |_| |_| | | | | __/\__ \
+ |_.__/ \__, |\__\___|\__|\__,_|_| |_|\___||___/
+ |___/
-final console interface:
- #hashtag (exact) -> searches identica for tunes
- @username (exact) -> parses identica feed for tunes
- _1234... -> plays track from memory
- expression -> compiles and plays expression
- [else] -> searches greedily for a valid expression; if not found, ignores
-called "bytebeat". related to softsynths, demoscene. other buzzwords: Algostep,
-googlecore, "shortcode compos",
+players for bytebeat music.
-bytetros?
+### Example Tunes
-original (to me):
-echo "main(i){for(i=0;;i++)putchar((i*(i>>8|i>>9)&46&i>>8)^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay
+the original (to me):
-favorite:
- (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1
+ echo "main(i){for(i=0;;i++)putchar((i*(i>>8|i>>9)&46&i>>8)^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay
-from http://countercomplex.blogspot.de/2011/10/algorithmic-symphonies-from-one-line-of.html
+my favorite (thus far):
+ (t*9&t>>4|t*5&t>>7|t*3&t/1024)-1
- main(t){for(t=0;;t++)putchar(t*(((t>>12)|(t>>8))&(63&(t>>4))));}
+### References
projects:
http://wurstcaptures.untergrund.net/music/
@@ -42,7 +26,7 @@ projects:
http://hackaday.com/2011/11/01/annoy-your-sound-guy-even-more/ (Noiseplug HaD)
https://github.com/erlehmann/libglitch
opcodes: http://paste.ubuntu.com/733764/
- http://0xa.kuri.mu/2011/10/09/bitop-videos/
+ HTTP://0Xa.kuri.mu/2011/10/09/bitop-videos/
GlitchMachine: http://www.umlautllama.com/w2/?action=view&page=GlitchMachine
listings:
@@ -64,3 +48,4 @@ similar:
http://yaxu.org/haskell-hack/
http://sunsite.univie.ac.at/Mozart/dice/
http://music.columbia.edu/~douglas/strange_things/?p=78
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..f9c12bf
--- /dev/null
+++ b/TODO
@@ -0,0 +1,2 @@
+- handle negative numbers
+- use libc tokenization?