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))
var q = require('q');
function jednaDroga(p) {
//....
p.resolve(wartosc);
//....
}
function drugaDroga(p) {
//....
@nooga
nooga / ghettomacro.js
Created June 17, 2013 13:01
Silly experiments with "macros" in JS.
function macro(mfun) {
var fstr = mfun.toString(),
params = fstr
.match(/^function\s*\((.*)\)/)[1]
.replace(/\s+/,'').split(','),
msrc = fstr.match(/^function\s*\(.*\)\s*\{((?:.|\n)*)\}\s*$/)[1];
console.log(fstr, params, msrc);
return function() {
(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 / robot.js
Created December 4, 2012 15:55 — forked from AndreMeira/robot.js
skaicoo
//FightCode can only understand your robot
//if its class is called Robot
var id;
var Robot = function(robot) {
id = this.id;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@nooga
nooga / ostatnideadline.txt
Created October 12, 2012 10:11
Piosenka "Ostatni Deadline"
"Ostatni Deadline" (w oparciu o "Ostatnia Nocka" by Maciej Maleńczuk & Yugopolis)
słowa: Marcin Gasperowicz
Boli mnie głowa a nie mogę spać, a GC
chociaż dokoła wszyscy już posnęli, F E
nie mogę siedzieć a nie mogę wstać,
mija ostatni termin beznadziei.
ref.:
Tylko kod, kod, kod, płoną światła lamp,