This file contains hidden or 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
#include <Arduino.h> | |
#include <SPI.h> | |
#define P_MOSI 11 | |
#define P_MISO 12 | |
#define P_SCK 13 | |
#define P_RESET 8 | |
#define P_ERR 9 |
This file contains hidden or 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
local string = require "string" | |
local fmt = string.format | |
local socket = require "socket" | |
local udp = socket.udp() | |
local lua_send = {} | |
local MLEN = 4096 |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct ListNode { | |
struct ListNode *next; | |
void *ptr; | |
} ListNode; | |
void | |
list_node_init(ListNode *ln, ListNode *next, void *with) |
This file contains hidden or 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
;; https://github.com/clojure/clojure-contrib/blob/master/modules/dataflow/src/main/clojure/clojure/contrib/dataflow.clj | |
;; todo | |
;; link dataflows | |
;; no collection toplevel streams | |
;; names that start with * | |
;; toposort finds cycles | |
;; syntax-extensions | |
(load "util.scm") |
This file contains hidden or 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
;; dispatcher is a work in progress haha | |
(define-syntax dispatcher | |
(lambda (x) | |
(syntax-case x (else) | |
((d name (case1 do1 ...) ... ) | |
(with-syntax ( (args (datum->syntax #'d 'args)) ) | |
#'(define (name m . args) | |
(case m | |
(case1 do1 ...) ... | |
(else (error (symbol->string 'name) "bad operation" m))))))))) |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdint.h> | |
#include <math.h> | |
#define nl() printf("\n") | |
#define fl_mark() printf("s/exp /mantissa\n"); | |
#define is_finite(_fl) ((_fl & 0x7F800000) != 0x7F800000) | |
#define is_normalized(_fl) is_finite(~(_fl)) | |
void |
This file contains hidden or 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
// these are equivalent | |
digitalWriteFast(13, HIGH); | |
delay(1); | |
digitalWriteFast(13, LOW); | |
delay(100); | |
// |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// util {{{ | |
typedef int bool; | |
const bool true = (2 == 2); | |
const bool false = (2 != 2); |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
typedef struct { | |
float **audio; | |
int chan_ct; | |
int sample_ct; | |
int sample_rate; | |
} sound; |
This file contains hidden or 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
local string = require"string" | |
local fmt = string.format | |
-- ==&== BOARD ==&== | |
local function new_board() | |
return {{" "," "," "}, | |
{" "," "," "}, | |
{" "," "," "}} | |
end |
NewerOlder