Skip to content

Instantly share code, notes, and snippets.

Christopher O'Brien obriencj

Block or report user

Report or block obriencj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@obriencj
obriencj / output of sample_defclass
Last active Jul 29, 2017
sibilant defclass sample
View output of sample_defclass
maybe:python-sibilant siege$ sibilant sample_defclass.lspy
Tom says: Hey there, Sally
Sally says: What's up, Tom
Tom says: Good-bye!
Sally says: Good-bye!
@obriencj
obriencj / output
Last active Jul 21, 2017
example of sibilant line number table backtraces
View output
maybe:python-sibilant siege$ python3 sample1.py
Traceback (most recent call last):
File "sample1.py", line 18, in <module>
call_a(100)
File "sample1.py", line 7, in call_a
call_1(call_b, value)
File "sample2.lspy", line 3, in call_1
(into arg))
File "sample1.py", line 11, in call_b
call_2(call_c, value)
@obriencj
obriencj / output of sample.lspy
Created Jul 20, 2017
sibilant macros and quasiquote
View output of sample.lspy
maybe:python-sibilant siege$ sibilant sample.lspy
True is True
False is False
None is False
nil is False
True is True
100 is True
False is False
-100 is True
(1 will you 8 flake tacos_1 tacos_2 tacos_3 tacos_4 tacos_5 tacos_2 tacos_3 tacos_4 tacos_5)
View gist:b4bd787d20ea58f6c0fd18c701cb7fd2
maybe:python-sibilant siege$ cat tacos.lspy
(defun make_tacos (X)
(cons 'tacos X))
(define tacos 'awesome)
maybe:python-sibilant siege$ python3
Python 3.5.3 (default, Apr 23 2017, 18:09:27)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
View keybase.md

Keybase proof

I hereby claim:

  • I am obriencj on github.
  • I am obriencj (https://keybase.io/obriencj) on keybase.
  • I have a public key whose fingerprint is B813 6B61 D568 811E 626F 0DBA B5AB A230 5282 9C5C

To claim this, I am signing this object:

@obriencj
obriencj / tailcall.py
Created Mar 14, 2014
playing chicken with the python stack using exceptions
View tailcall.py
#! /usr/bin/env python3
from functools import partial
from inspect import currentframe
import sys
STACK_LIMIT = 64
@obriencj
obriencj / xmlrpc_unittest_harness.py
Last active Dec 24, 2015
An example harness for testing an XMLRPC client/server relationship
View xmlrpc_unittest_harness.py
from threading import Thread
from unittest import TestCase
from xmlrpclib import ServerProxy
from SimpleXMLRPCServer import SimpleXMLRPCServer
class Dummy(object):
def __init__(self):
self.data = list(xrange(0,10))
@obriencj
obriencj / eval_no_closures.py
Created Feb 26, 2014
Examples of compile/eval not giving me a chance to provide lexical bindings for it to snag closures from
View eval_no_closures.py
def attempt_1():
data = list()
# no prob, bob. data is captured as a closure cell of action
action = lambda x: data.append(x)
action(5)
return data
@obriencj
obriencj / despair.scm
Last active Aug 29, 2015
Scheme Comedy
View despair.scm
((lambda (f)
((lambda (r) (f (lambda () ((r r)))))
(lambda (r) (f (lambda () ((r r)))))))
(lambda (despair)
(lambda () (despair))))
@obriencj
obriencj / lambda.py
Last active Jan 4, 2016
My take on the church of lambda
View lambda.py
"""
My take on the Church of Lambda. I've tweaked and added a few thing to
make life more enjoyable
author: Christopher O'Brien <siege@preoccupied.net>
inspiration from http://doos.m3r.nl/~ivo/lambda.txt
"""
You can’t perform that action at this time.