This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
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
| /** | |
| * so here the thing ... you go in your github page | |
| * as example I go here: https://github.com/WebReflection | |
| * you open your console | |
| * you copy and paste this shit | |
| * then you write and execut in the console | |
| * write("Hi There!"); | |
| * NOTE: Pixel Font from a 2006 project of mine :-) http://devpro.it/pixelfont/ | |
| */ | |
| function write(text, color) { |
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
| My thoughts on writing tiny reusable modules that each do just one | |
| thing. These notes were adapted from an email I recently sent. | |
| *** | |
| If some component is reusable enough to be a module then the | |
| maintenance gains are really worth the overhead of making a new | |
| project with separate tests and docs. Splitting out a reusable | |
| component might take 5 or 10 minutes to set up all the package | |
| overhead but it's much easier to test and document a piece that is |
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 'thread' | |
| module SonicPi | |
| class Promise | |
| VAL_SEM = Mutex.new | |
| PUSH_SEM = Mutex.new | |
| def initialize | |
| @box = Queue.new |
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
| function rm () { | |
| local path | |
| for path in "$@"; do | |
| # ignore any arguments | |
| if [[ "$path" = -* ]]; then : | |
| else | |
| local dst=${path##*/} | |
| # append the time if necessary | |
| while [ -e ~/.Trash/"$dst" ]; do | |
| dst="$dst "$(date +%H-%M-%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
| Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> import shapeless._, HList._ | |
| import shapeless._ | |
| import HList._ | |
| scala> "foo" :: 124 :: HNil | |
| res0: shapeless.::[java.lang.String,shapeless.::[Int,shapeless.HNil]] = foo :: 124 :: HNil |
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
| #!/usr/bin/env bash | |
| # fresh-chrome | |
| # | |
| # Use this script on OS X to launch a new instance of Google Chrome | |
| # with its own empty cache, cookies, and user configuration. | |
| # | |
| # The first time you run this script, it will launch a new Google | |
| # Chrome instance with a permanent user-data directory, which you can | |
| # customize below. Perform any initial setup you want to keep on every |
The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."
Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and
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
| (def cds (collection)) | |
| ;; interact with database | |
| (go | |
| (>! (:in cds) | |
| {:op :create | |
| :val {:title "Soft Machine Vol. 1" | |
| :artist "Soft Machine" | |
| :year 1969}}) |
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
| (ns circles.core | |
| (:require [quil.core :as q])) | |
| ; "hello world" for Quil meets http://bit.ly/18luJO2 | |
| (def the-width 808) | |
| (def the-height 500) | |
| (defn random-x-y [] | |
| (list (int (rand the-width)) |