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
number :: 0x[0-9a-fA-F]+ | |
0b[01]+ | |
0[0-7]+ | |
[0-9]+ | |
<number> ^ <number> := number { |base, exponent| | |
result := 0 | |
$exponent times { | |
result := $result * base |
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) + (int) | |
(string) + (int) | |
are completely different patterns | |
]-- | |
(int) + (int) := { |a, b| | |
-- code here | |
} |
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) + (int) := int { |int a, int b| | |
if ${$a within 1 and 10}: | |
-- ... | |
else: | |
next | |
} | |
(int) + (int) := int { |int a, int b| | |
if ${$a within 11 and 20}: | |
-- ... |
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
define #factorial | |
if [= n 0] | |
return 1 | |
else | |
* n [factorial [- n 1]] |
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
// dependent typing theory. | |
null print(string s) external | |
string readFile(string pathName) external | |
null printWithReq(string s : s.length > 50) { | |
print(s) | |
} |
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
display: | |
stdout {0} io.create | |
stdout <<1 input | |
stdout io.write | |
stdout {"\n"} io.write | |
void << stdout |
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
require 'rubygems' | |
require 'nokogiri' | |
InkscapePath = 'C:\Program Files\Inkscape\inkscapec.exe' | |
InputFile = ARGV.shift | |
if InputFile.nil? | |
abort "No input file specified." | |
end |
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
-- Since all primitives are immutable, we use this if we want a mutable list. (like Erlang) | |
proc DynamicList: items -- this declares 'items' as being a variable shared among all of the invokers, but fixed to this instance | |
items = {} | |
loop | |
select self -- receive from 'self' and do a switch | |
:add | |
item = self -- = combined with a channel (in this case, self, which is used to communicate with the invoker) receives | |
items = list.join items {item} -- a space means to send, therefore, we can send things to list.join and receive all on one line | |
self true true -- send true and true to the invoker (first true: we understood the message, second true: it ran successfully) | |
kill list.join -- kill the process, kill all of its subprocesses, free memory. not necessary at end of program, things are automatically collected at the end. |
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
require 'formula' | |
class Cairo <Formula | |
url 'http://cairographics.org/snapshots/cairo-1.9.6.tar.gz' | |
homepage 'http://cairographics.org/' | |
md5 '796dc87c4e78245e8c92debf6a65d63d' | |
# depends_on 'cmake' | |
depends_on 'pixman' |
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
DevBook devyn (~/Projects/shoes master⚡): bin/main | |
dyld: Symbol not found: __cg_jpeg_resync_to_restart | |
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib | |
Expected in: /Users/devyn/Projects/shoes/deps/lib/libjpeg.62.dylib | |
in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib | |
zsh: trace trap bin/main |