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
DeadZen> it can be part of zenview too | |
[02:33] <yrashk> erlang+ | |
[02:33] <yrashk> :-P | |
[02:33] <DeadZen> i mean once the changes are clear | |
[02:33] <DeadZen> you're free to add them into the dev environments | |
[02:34] <yrashk> yea | |
[02:36] <DeadZen> i think thats a good idea | |
[02:36] <DeadZen> another thing i think erlang needs | |
[02:36] <DeadZen> is to have the networking stack separate | |
[02:36] <DeadZen> it has 2 parts |
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
#!/bin/sh | |
exec erl -pa apps/*/ebin deps/*/ebin -boot start_sasl \ | |
-sname foobar_dev +K true \ | |
-s alog \ | |
-s foobar \ | |
-config ./priv/fpobar \ | |
-config ./priv/alog |
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
-spec(start/0 :: () -> ok). | |
start() -> | |
application:start(cowboy), | |
ok = application:start(foobar). | |
... | |
(foobar_dev@si14-laptop)1> | |
=PROGRESS REPORT==== 3-Aug-2011::21:08:05 === |
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
(* | |
** | |
** A simple OpenGL example: | |
** randomly generated polygons purturbing around | |
** | |
** Author: Hongwei Xi (hwxi AT cs DOT bu DOT edu) | |
** Time: January, 2010 | |
** | |
*) |
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
~/erlexps [si14@si14-laptop] [15:03] | |
> erlc pttest.erl -pa . | |
forms: [{attribute,1,file,{"./pttest.erl",1}}, | |
{attribute,1,module,pttest}, | |
{attribute,3,export,[{foo,0}]}, | |
{attribute,5,spec, | |
{{foo,0}, | |
[{type,5,'fun', | |
[{type,5,product,[]}, | |
{type,5,nonempty_string,[]}]}]}}, |
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
fun{a1,a2:t@ype} // [zip0] is a template | |
zip0 (xs: list0 a1, ys: list0 a2): list0 '(a1, a2) = | |
case+ (xs, ys) of // [case+] indicates the exhaustiveness of pattern matching | |
| (cons0 (x, xs), cons0 (y, ys)) => cons0 ('(x, y), zip0 (xs, ys)) | |
| (nil0 (), nil0 ()) => nil0 () |
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
Foobar = lists:foldl(fun(...) -> | |
A_LOT_OF_CODE_HERE | |
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
foobar(X, [H|T]=Lst) when X > H -> | |
[X|Lst]; | |
foobar(_, Lst) -> | |
Lst. |
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
import re | |
from pprint import pprint | |
SESSION = "session.test" | |
VOLUME = "volume.test" | |
def find_with_tail(prefix): | |
return lambda s: re.compile(prefix + r":(\d+)(.+?)(?:(?=" + prefix + ":)|$)", re.I | re.S).findall(s) | |
def parse(terms, 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
{case_clause, | |
{error, | |
{{ping,{4,<<"46.182.31.0">>,#Ref<0.0.27.93826>}}, | |
"Unix.Unix_error(1, \"sendto\", \"\")"}}} |