Skip to content

Instantly share code, notes, and snippets.

Ambrose Bonnaire-Sergeant frenchy64

  • Bloomington, Indiana
Block or report user

Report or block frenchy64

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
frenchy64 / diagnose.clj
Last active Aug 29, 2015
Handy tools.trace
View diagnose.clj
; [org.clojure/tools.trace "0.7.5"]
(require '[ :as trace]
'[clojure.repl :as repl])
(defmacro spit-to
"Dump diagnostics to a file"
[f & body]
`(spit ~f
View gist:8848928
Without dynalint:
(first 1)
IllegalArgumentException Don't know how to create ISeq from: java.lang.Long clojure.lang.RT.seqFrom (
With dynalint:
(first 1)
ExceptionInfo ERROR (Dynalint id 4): First argument to clojure.core/first must be seqable: 1 (instance of class java.lang.Long) clojure.core/ex-info (core.clj:4327)
View taj.clj
(ns ^:skip-wiki clojure.core.typed.analyze-clj
(:require [ :as analyze]
[ :as hygienic]
[ :as ta]
[ :as taj]
[ :as tr]
[ :as readers]
[clojure.string :as str]
[ :as io]
[clojure.core.typed.utils :as u]))
View trampoline.clj
(ns clojure.core.typed.test.trampoline
(:require [clojure.core.typed :as t]))
(declare funb)
(t/ann-many [Number -> (Rec [f]
(U Number [-> (U Number f)]))]
funa funb)
(defn funa [n]
(if (= n 0)
frenchy64 / min.clj
Last active Aug 29, 2015
ctyp-108 min
View min.clj
; CTYP-108
(let [{:keys [a] :as props}
(ann-form {} '{})]
(when-not (and a)
(print-env "")
{:env {a__#0 (U nil false), props__#0 (HMap :mandatory {}), map__63343__#1 (HMap :mandatory {}), map__63343__#0 (HMap :mandatory {})},
:props ((when (is (U nil false) props__#0)
View ana.clj
; [org.clojure/tools.analyzer.jvm "0.1.0-beta4"]
(ns tst.ana
[ :as taj]
[ :as emit-for m]))
(defn ^:private analyze1 [form env]
(let [a (taj/analyze form env)
frm (emit-form/emit-form a)]
(eval frm)
View clj.clj
(ns analyze.clj
(:require [ :as ta]
[ :as taj]
[ :as emit-form]
[ :as tr]
[ :as readers]
[clojure.string :as str]
[ :as io]))
(defn ^:private analyze1 [form env]
View hw.c
#include <stdio.h>
int main()
char string[] = "Hello World";
printf("%s\n", string);
return 0;
View gist:9271711
(deftype FooDT [normal other-keys?])
(.normal ^FooDT (->FooDT 2 1))
View overtone.clj
(Fn [Note Scale -> (t/Set MIDINote)]
[Note Scale Inversion -> (t/Set MIDINote)]))
You can’t perform that action at this time.