Skip to content

Instantly share code, notes, and snippets.

View MysteryMachine's full-sized avatar

Sal Becker MysteryMachine

View GitHub Profile
@MysteryMachine
MysteryMachine / .clj
Created May 31, 2016 23:46
Jobim Presentation
(ns cljnyc.core
(:require [jobim.core :as jobim])
(:require-macros [jobim.core :as jobim]))
(defonce show-state (jobim/new-show))
(jobim/defcommented-clj code-slide 80
"Jobim utilizes its own simple evaluation strategy to allow you to test code like this"
(def a 5)
(def b 2)
#1 Bad Blood: 9.4
#2 Anasazi: 9.3
#3 Clyde Bruckman's Final Repose: 9.3
#4 Paper Clip: 9.2
#5 Redux II: 9.2
#6 Musings of a Cigarette Smoking Man: 9.2
#7 Jose Chung's 'From Outer Space': 9.2
#8 The Erlenmeyer Flask: 9.2
#9 Small Potatoes: 9.2
#10 Dreamland: 9.1
"use strict";
var mori = require("mori");
var get = mori.get;
var assoc = mori.assoc;
var hashMap = mori.hashMap;
var vector = mori.vector;
var map = mori.map;
var reduce = mori.reduce;
;; Because using clojure.core.read-string feels like cheating!
(ns fizzbuzz.lisp
(require [clojure.test :as t]
[clojure.string :as s]))
(defn trim [expr]
"Trims parens and whitepsace from a combination"
(-> expr (s/trim) (subs 1 (dec (count expr)))))
(defn combination? [expr]
;; Please excuse any lack of neatness, I finished this at 4 am!
(ns fizzbuzz.lisp
(require [clojure.test :as t]
[clojure.string :as s]))
(defn trim
"Trims parens and whitepsace from a combination"
[expr] (-> expr (s/trim) (subs 1 (dec (count expr)))))
(defn combination?
"Returns true if the string is a combination"
(ns game.gist
(:use arcadia.core))
(defcomponent MyComponent [^int myInt]
(Awake [this] (set! (.myInt this) 0)))
;; Applied to a component, on run produces:
;; ArgumentException: Object type System.Int64 cannot be converted to target type: System.Int32