Skip to content

Instantly share code, notes, and snippets.

Timothy Baldridge halgari

Block or report user

Report or block halgari

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
View gist:9557588
(deftype MapProperty [^:volatile-mutable listeners ^:volatile-mutable value]
ObservableValue
(addListener [this listener]
(set! listeners (conj listeners listener))
nil))
;; fails with CompilerException java.lang.IllegalArgumentException: Must hint overloaded method: addListener
(deftype MapProperty [^:volatile-mutable listeners ^:volatile-mutable value]
View gist:770de2f8e5f86cff249f
1) Concurrecy can be made simpler (if not completely painless) via immutability
2) Working with "plain data" can mean a end to endless wrapper classes
3) The REPL allows coding via experimentation, makes prototyping fast.
4) Clojure programs will be (on average) 3-6x smaller than equivalent C# programs
5) You can get all this and your code can still be lightning fast
6) You can get all this without knowing about Monads :-P
View gist:83a6b40aef1d21d0e618
.section __TEXT,__text,regular,pure_instructions
.globl _main
.align 4, 0x90
_main:
.cfi_startproc
pushq %r15
Ltmp4:
.cfi_def_cfa_offset 16
pushq %r14
Ltmp5:
View core.clj
(ns creator.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [om.core :as om :include-macros true]
[cljs.core.async :as async :refer [chan <! >! put!]]
[om-tools.core :refer-macros [defcomponent]]
[cljs.reader :as reader]
[goog.dom :as gdom]
[om-tools.dom :as dom :include-macros true])
(:import [goog.net XhrIo]))
View gist:3cd3cd10f359f2103b89
Aborted Trace, reason: ABORT_ESCAPE [<DEBUG_MERGE_POINT_OP object at 0x1014500b0>, <GETFIELD_GC_OP object at 0x101448ec0>, <GETARRAYITEM_GC_OP object at 0x10144b970>, <INT_ADD_OP object at 0x101448ee0>, <GUARD_VALUE_OP object at 0x10144f700>, <GETARRAYITEM_GC_OP object at 0x10144b998>, <INT_ADD_OP object at 0x101448f00>, <GUARD_VALUE_OP object at 0x10144f730>, <INT_SUB_OP object at 0x101448f20>, <INT_SUB_OP object at 0x101448f40>, <GUARD_VALUE_OP object at 0x10144f760>, <GUARD_VALUE_OP object at 0x10144f790>, <GUARD_VALUE_OP object at 0x10144f7c0>, <GUARD_VALUE_OP object at 0x10144f7f0>, <DEBUG_MERGE_POINT_OP object at 0x1014500c8>, <GETARRAYITEM_GC_OP object at 0x10144b9c0>, <GUARD_VALUE_OP object at 0x10144f820>, <GETARRAYITEM_GC_OP object at 0x10144b9e8>, <GUARD_VALUE_OP object at 0x10144f850>, <GETFIELD_GC_OP object at 0x101448f60>, <GETARRAYITEM_GC_OP object at 0x10144ba10>, <DEBUG_MERGE_POINT_OP object at 0x1014500e0>, <GETARRAYITEM_GC_OP object at 0x10144ba38>, <GUARD_VALUE_OP object at 0x10144f880>,
View gist:0d57dd87434968561705
translation:info] Error:
[translation:info] File "/Users/tim/Dropbox/oss/pypy/rpython/translator/goal/translate.py", line 316, in main
[translation:info] drv.proceed(goals)
[translation:info] File "/Users/tim/Dropbox/oss/pypy/rpython/translator/driver.py", line 539, in proceed
[translation:info] return self._execute(goals, task_skip = self._maybe_skip())
[translation:info] File "/Users/tim/Dropbox/oss/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:info] res = self._do(goal, taskcallable, *args, **kwds)
[translation:info] File "/Users/tim/Dropbox/oss/pypy/rpython/translator/driver.py", line 276, in _do
[translation:info] res = func()
[translation:info] File "/Users/tim/Dropbox/oss/pypy/rpython/translator/driver.py", line 343, in task_rtype_lltype
View gist:5e248bc92a5ac3fd0c40
[translation:info] Error:
[translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/translator/goal/translate.py", line 316, in main
[translation:info] drv.proceed(goals)
[translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/translator/driver.py", line 539, in proceed
[translation:info] return self._execute(goals, task_skip = self._maybe_skip())
[translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:info] res = self._do(goal, taskcallable, *args, **kwds)
[translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/translator/driver.py", line 276, in _do
[translation:info] res = func()
[translation:info] File "/Users/tim/oss-not-dropbox/externals/pypy/rpython/translator/driver.py", line 359, in task_pyjitpl_lltype
View gist:9020cfd53d9a14ba531f
(defnmatch count
([x]
(count 0 x))
([i [h & tail]]
(count (inc i) tail))
([i nil]
i))
View gist:e3cd4be6ef51c715d6c6
[p0, p1, p2]
p3 = getfield_gc(p0, descr=FieldDescr(<GcStruct pixie.vm.ast.Locals { super, vable_token, inst__names, inst__vals }>, 'inst__vals'))
p5 = getarrayitem_gc(p3, 0, descr=ArrayDescr(<GcArray of * GcStruct object { typeptr } >))
p7 = getarrayitem_gc(p3, 1, descr=ArrayDescr(<GcArray of * GcStruct object { typeptr } >))
p8 = getfield_gc(p0, descr=FieldDescr(<GcStruct pixie.vm.ast.Locals { super, vable_token, inst__names, inst__vals }>, 'inst__names'))
p10 = getarrayitem_gc(p8, 0, descr=ArrayDescr(<GcArray of * GcStruct object { typeptr } >))
p12 = getarrayitem_gc(p8, 1, descr=ArrayDescr(<GcArray of * GcStruct object { typeptr } >))
label(p0, p1, p2, p5, p7, p10, p12, descr=TargetToken(4912768184))
debug_merge_point(0, 0, '<If object at 0x121f7b980>')
guard_class(p1, <AddressAsInt * struct pixie.vm.ast.SyntaxThunk_vtable { super=... }>, descr=<Guard0x124d2e448>) [p2, p1, p5, p7, p10, p12, p0]
View gist:31b188e8e4757ccb3218
2132: i176 = getfield_raw_pure(i126, descr=<FieldS CIF_DESCRIPTION.exchange_size 64>)
+2143: guard_value(i176, 24, descr=<Guard0x105a86250>) [p0, i176, p1, p3, p4, i7, p12, p22, p25, p27, p31, p35, None, i165]
+2153: p177 = getfield_gc(ConstPtr(ptr77), descr=<FieldP pixie.vm.libs.ffi.FFIFn.inst__arg_types 8>)
+2166: i178 = arraylen_gc(p177, descr=<ArrayP 8>)
+2170: i179 = int_ge(0, i178)
guard_false(i179, descr=<Guard0x105a861e0>) [p0, p177, p1, p3, p4, i7, p12, p22, p25, p27, p31, p35, None, i165]
+2180: p180 = getarrayitem_gc(p177, 0, descr=<ArrayP 8>)
+2184: i181 = int_add(i126, 88)
+2188: i182 = getarrayitem_raw_pure(i181, 0, descr=<ArrayS 8>)
+2191: guard_value(i182, 16, descr=<Guard0x105a86170>) [p0, i182, p177, p180, p1, p3, p4, i7, p12, p22, p25, p27, p31, p35, None, i165]
You can’t perform that action at this time.