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
frenchy64 / hidden.md
Last active Jul 21, 2019
Venue: Keynote for Compose :: Melbourne, September 2nd 2019 (http://www.composeconference.org/)
View hidden.md

The Hidden Data Flow in Types

On the surface, function types simply describe inputs and outputs—indeed, that's how they're used in most type systems. But there's more to function types!

Fascinatingly, a function type can be transformed into a data flow graph that predicts the inner workings of any function that has that type. Using this graph, intricate dependencies between function inputs and outputs can be inferred

@frenchy64
frenchy64 / README.md
Last active Jul 11, 2019
RFC: Animation for cljfx
View README.md

RFC: Animation for cljfx

This is an initial attempt at supporting animations in cljfx. Running instructions are below.

The actual animation logic is here under the Demo comment.

The original code is here.

Running

@frenchy64
frenchy64 / notes.md
Last active Jul 8, 2019
Notes on JavaScript prototypes
View notes.md

Why Objects were successful

https://www.cs.cmu.edu/~charlie/courses/15-214/2014-fall/slides/25-history-oo.pdf

  • essense of objects is (dynamic) dispatch
  • dispatch provides interoperability
  • first-class interoperability is critical to frameworks and ecosystems
  • frameworks and ecosystems are economically critical to the software industry
  • likely a significant factor in objects' success
  • Also talks about early mistakes in Simula

Why objects are inevitable

@frenchy64
frenchy64 / Io Example Problems
Created Jun 25, 2019 — forked from jezen/Io Example Problems
The example problems have gone missing from the Io language website, so here’s a backup.
View Io Example Problems
#Sample code
#Hello world
"Hello world!" print
#Factorial
factorial := method(n, if(n == 1, 1, n * factorial(n - 1)))
99 bottles of beer
View colored.clj
(ns colored-lti-clj.core)
(defalias List
(TFn [a]
'{:match (All [b] [(ListVisitor a b) :-> b])}))
(defalias ListVisitor
(TFn [a b]
'{:caseNil (All [:-> b])
:caseCons (All [a (List a) :-> b])}))
@frenchy64
frenchy64 / compiler.clj
Created Apr 18, 2018
cljs.compiler generated specs (core.typed 0.5.1)
View compiler.clj
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(ns cljs.compiler
#?(:clj (:refer-clojure :exclude [munge macroexpand-1 ensure])
@frenchy64
frenchy64 / compiler.clj
Created Apr 18, 2018
cljs.compiler generated types (core.typed 0.5.1)
View compiler.clj
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
(ns cljs.compiler
#?(:clj (:refer-clojure :exclude [munge macroexpand-1 ensure])
@frenchy64
frenchy64 / bash_profile.sh
Created Jul 19, 2017
Update clojure spec alpha
View bash_profile.sh
update_spec_alpha () {
git grep -l clojure.spec | xargs sed -i '' 's/clojure.spec /clojure.spec.alpha /g'
git grep -l clojure.spec | xargs sed -i '' 's/clojure.spec.test /clojure.spec.test.alpha /g'
git grep -l clojure.spec | xargs sed -i '' 's/clojure.spec.gen /clojure.spec.gen.alpha /g'
}
View gist:33e063e378ed279270fe8ab6eb43345a
Retrieving banks-0.1.9.pom from s3p://sparkfund-maven/releases/
Could not transfer artifact sparkfund:banks:pom:0.1.9 from/to sparkfund (s3p://sparkfund-maven/releases/): Cannot run program "aws": error=2, No such file or directory
Retrieving jimfs-1.2.0.pom from s3p://sparkfund-maven/releases/
Could not transfer artifact sparkfund:jimfs:pom:1.2.0 from/to sparkfund (s3p://sparkfund-maven/releases/): Cannot run program "aws": error=2, No such file or directory
java.lang.Thread.run Thread.java: 745
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run RunnableErrorForwarder.java: 60
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run WagonRepositoryConnector.java: 601
View 0_before.clj
(ns clojure.core.typed.test.rt-infer.loop
{:lang :core.typed
:core.typed {:features #{:runtime-infer}}}
(:require [clojure.core.typed :as t]))
(defn b [coll]
(loop [c coll
out []]
(if (seq c)
(recur (next c) (conj out (inc (first c))))
You can’t perform that action at this time.