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
int led_pin = 2; | |
#define PERIOD (100) | |
void setup() { | |
pinMode(led_pin, OUTPUT); | |
Serial.begin(9600); | |
} | |
void writeMorse(char *code) { | |
int i = 0; |
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
# 5 minutes Lisp in Python | |
# Pepijn de Vos <http://pepijndevos.nl> | |
# | |
# Inspired by 30 minutes Lisp in Ruby | |
# http://gist.github.com/562017 | |
# | |
# This Lisp does not read or parse anything at all. | |
# A generator and a Decorator are abused to run sexps. | |
# | |
# Usage: |
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
module SXP | |
module Grammar extend Parallax::Grammar | |
LPAREN = char('(') | |
RPAREN = char(')') | |
INTEGER = term(/^([+-]?\d+)/) { |s| s.to_i } | |
STRING = term(/^"([^"]+)"/) { |s| s } | |
SYMBOL = term(/^([\w\d_-]+)/) { |s| s.to_sym } | |
Atom = INTEGER | STRING | SYMBOL | |
List = LPAREN << +Atom >> RPAREN |