Skip to content

Instantly share code, notes, and snippets.

View solson's full-sized avatar

Scott Olson solson

  • Canada/Ireland
  • 16:34 (UTC +01:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tsion on github.
  • I am tsion (https://keybase.io/tsion) on keybase.
  • I have a public key whose fingerprint is 1910 621B F70D EE9D 2D37 878C A6A3 CAAD E230 1627

To claim this, I am signing this object:

@solson
solson / haskell-v2.rb
Created September 27, 2009 02:20
Haskell/Functional programming in Ruby! Version 2012
#!/usr/bin/env ruby
# encoding: utf-8
## Haskell/Functional Programming in Ruby! Version 2012
## By Scott Olson
def λ(&block)
lambda(&block).curry
end
[/home/scott]$ time ./random.rb
Thu Sep 25 04:13:46 -0600 2008
�<w�=0`������$u�c��7�!�@�=�9��U�P|Tآ�"�H��϶E9 �<Y�טTO��dȐv���Y�ĝ��p˵UW�+�F[scott�fDZܪ�K*�����u����Pge�j&n�4�~ѹ(
real 2073m13.828s
user 74m4.440s
sys 1808m39.267s
[/home/scott]$ cat ./random.rb
#!/usr/bin/env ruby
17:04:38 <scott> lists are [1,2,3,4]
17:04:47 <scott> maps are {one: 1, two: 2}
17:04:57 <scott> omaps are [one: 1, two: 2]
17:05:02 <scott> sets are {1,2,3,4}
17:05:34 <scott> key: value shows mapping and []/{} shows ordering/unordering
@solson
solson / gist:585475
Created September 18, 2010 08:07
Lisp in Ioke
Lisp = Ground mimic do(
do = dmacro(
[+forms]
ret = nil
forms each(msg, ret = msg evaluateOn(self))
ret
)
cell("") = dsyntax(
[code]
@solson
solson / classes.md
Created July 26, 2012 07:13
My 2012-2013 classes

Term 1

LING 111.3 — 1/2(3L) — Structure of Language

An introduction to the findings, theories and methods of modern structural linguistics. Includes phonetics, phonology, word-formation, syntax, semantics and pragmatics. Basic analytical skills are emphasized. Examples will be drawn from a wide variety of natural languages.

CMPT 214.3 — 1(3L-2P) — Programming Principles and Practice

A hands-on approach to software development at the individual and small team level. Application of software tools- including scripting languages, system utilities and libraries- for construction of small software systems. Integrated with and motivated by programming practices, system development, testing and maintenance issues.

/// A stack frame:
///
/// ```text
/// +-----------------------+
/// | ReturnPointer | return value
/// + - - - - - - - - - - - +
/// | Arg(0) |
/// | Arg(1) | arguments
/// | ... |
/// | Arg(num_args - 1) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
fn(a0: usize) -> usize {
let v0: usize; // n
let mut v1: usize; // prod
let v2: (); // _result
let mut v3: core::ops::Range<usize>; // iter
let v4: usize; // x
let t0: ();
let t1: ();
let t2: core::ops::Range<usize>;
let t3: core::ops::Range<usize>;
fn(arg0: usize) -> usize {
let var0: usize; // n
let mut var1: usize; // prod
let var2: (); // _result
let mut var3: core::ops::Range<usize>; // iter
let var4: usize; // x
let tmp0: ();
let tmp1: ();
let tmp2: core::ops::Range<usize>;
let tmp3: core::ops::Range<usize>;