Skip to content

Instantly share code, notes, and snippets.

View nooga's full-sized avatar
😎

Marcin Gasperowicz nooga

😎
View GitHub Profile
"/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/bin/java" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=58039:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/charsets.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/localedata.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunec.jar:/Applications/IntelliJ IDEA CE.app/Contents/jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Applicat
D Info: Raising Exception EXCEPT_ITLBMISS(00000a00)
D Info: Raising Exception EXCEPT_IPF(00000400)
D Info: Raising Exception EXCEPT_ITLBMISS(00000a00)
D Info: Raising Exception EXCEPT_IPF(00000400)
D Info: Raising Exception EXCEPT_IPF(00000400)
@nooga
nooga / soundio.clj
Created June 5, 2016 09:39
pixie ffi for libsoundio
(ns soundio
(:require [pixie.ffi-infer :refer :all]
[pixie.ffi :as ffi]))
(defmacro defcenum [ename syms]
(let [enumerated (zipmap (range (count syms)) syms)
enumeratedq (zipmap (range (count syms)) (map str syms))]
`(do ~@(for [[i e] enumerated] `(def ~e ~i))
(defn ~(symbol (str ename "->str")) [n] (get ~enumeratedq n)))))
[translation:info] created: /home/pi/pixie/pixie-vm
[240c8] translation-task}
[translation:info] usession directory: /tmp/usession-s390x-backend-0
[Timer] Timings:
[Timer] annotate --- 227.2 s
[Timer] rtype_lltype --- 400.8 s
[Timer] pyjitpl_lltype --- 2067.8 s
[Timer] backendopt_lltype --- 674.0 s
[Timer] stackcheckinsertion_lltype --- 108.1 s
[Timer] database_c --- 699.1 s
@nooga
nooga / journalmap.clj
Last active March 1, 2016 21:21
fun fun fun
(defprotocol IJournalMap
(journal [_]))
(deftype JournalMap [journal data]
IJournalMap
(journal [_] journal)
clojure.lang.ILookup
(valAt [this key] (get data key))
(valAt [this key nf] (get data key nf))
(defn tree-path
([tree sym] (seq (tree-path tree sym [])))
([tree sym acc]
(cond
(= tree sym) acc
(symbol? tree) nil
:else (or
(tree-path (first tree) sym (conj acc 'left))
(tree-path (second tree) sym (conj acc 'right))))))
@nooga
nooga / test.cljs
Last active September 28, 2015 15:43
(defonce state (atom {:items [{:name "apple" :tasty true}
{:name "shoe" :tasty false}
{:name "glue" :tasty true}]}))
(defn toggle-tasty [name]
;... swap! :items
)
(defn item [i]
[:div [:span (:name i)]
! aaaaaaaaaaaaaaaa
"""""""" # cccccc
cc ddddddddd %% ee
eeeeeeeeeeeeeeeeee
eeee & fffffffff '
gg ((((((((((((((
((((((((((( H hhh
))))))))))))))))))
))))))) I iiiiiiii
iiii +++ , lllllll
$ laser -t rex
.-=-==--==--.
..-==" ,'o`) `.
,' `"' \
: ( `.__...._
| ) / `-=-.
: ,vv.-._ / / `---==-._
\/\/\/VV ///88`;' / `.
byte field
offset
0 +---------+
|command |
4 +---------+
|arg a |
8 +---------+
|arg b |
12 +---------+