Skip to content

Instantly share code, notes, and snippets.

Josh Tilles MerelyAPseudonym

Block or report user

Report or block MerelyAPseudonym

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
@MerelyAPseudonym
MerelyAPseudonym / Praxis19Aug2011.rkt
Created Sep 8, 2011
Programming Praxis 19 Aug 2011 (first non-repeating char) solution in PLT Racket
View Praxis19Aug2011.rkt
#lang racket
(define (first-uniq chars)
(when (empty? chars)
(raise "There are no unique letters"))
(let ([c (first chars)])
(if (memq c (rest chars)) ; MEMQ is like MEMBER with EQ?
(first-uniq (remq* (list c) chars)) ; N.B the tail-recursion here
c)))
@MerelyAPseudonym
MerelyAPseudonym / Queue-Tip.rkt
Created Sep 30, 2011
pseudocode and data definitions
View Queue-Tip.rkt
#lang racket
; for symbol->char contract
(define (single-symbol? sym)
(= 1 (string-length (symbol->string sym))))
(define (each-unique? lst)
(= (length lst)
(length (remove-duplicates lst))))
View OfficialProgrammerDvorak.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<keyboard group="0" id="6454" name="Programmer Dvorak" maxout="1">
<layouts>
<!-- http://developer.apple.com/library/mac/documentation/Carbon/Reference/Gestalt_Manager/Reference/reference.html#//apple_ref/doc/uid/TP30000036-CH4g-KeyboardSelectors -->
<!-- identifiers in Gestalt.h has been used to determine the type of
the keyboard. the table given as example in TN2056 is different,
but on the other hand, that technote also claimed that ANSI
layouts could serve ISO keyboards
-->
@MerelyAPseudonym
MerelyAPseudonym / Homebrew's configuration info
Created Oct 3, 2012
Failed wordnet installation with Homebrew
View Homebrew's configuration info
$ brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: c2a575c94e4588103c281836c47146d643a36b35
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.8.2-x86_64
Xcode: 4.5
CLT: 4.5.0.0.1.1249367152
LLVM-GCC: build 2336
@MerelyAPseudonym
MerelyAPseudonym / gist:5273905
Last active Mar 29, 2019
implementation of an exponentially weighted moving-average function (instigated by http://grahamstratton.org/straightornamental/entries/moreclojure)
View gist:5273905
(defn ema [f values]
(reductions (fn [running v]
(let [one-minus-F (- 1 f)] ;naming intermediate results can help with the readability of non-associative operators.
(+ (* f v)
(* one-minus-F running))))
values))
@MerelyAPseudonym
MerelyAPseudonym / DEBUG=true lein repl.out
Created Aug 21, 2013
Diagnostic information for Leiningen failure
View DEBUG=true lein repl.out
Leiningen's classpath: :/home/…/joshua.tilles/.lein/self-installs/leiningen-2.3.2-standalone.jar
Applying task repl to ()
Applying task javac to nil
Running javac with [@/tmp/.leiningen-cmdline1025933496280107206.tmp]
Applying task compile to nil
All namespaces already AOT compiled.
@MerelyAPseudonym
MerelyAPseudonym / ghc.rb
Last active Aug 29, 2015
Proof of concept for GHC 7.8.2
View ghc.rb
require 'formula'
class Ghc < Formula
homepage "http://haskell.org/ghc/"
url "http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2"
sha1 "8938e1ef08b37a4caa071fa169e79a3001d065ff"
depends_on "gmp"
bottle do
@MerelyAPseudonym
MerelyAPseudonym / stacktrace.txt
Created Oct 6, 2016
Cursive IDE 1.4.0-eap3 REPL-startup stacktrace
View stacktrace.txt
Error:Internal error: (java.lang.UnsupportedClassVersionError) cursive/jps/model/impl/JpsClojureModelSerializerExtension : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: cursive/jps/model/impl/JpsClojureModelSerializerExtension : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
@MerelyAPseudonym
MerelyAPseudonym / # hello - 2019-03-13_23-36-05.txt
Created Mar 13, 2019
hello on 4.14.104-95.84.amzn2.x86_64 - Homebrew build logs
View # hello - 2019-03-13_23-36-05.txt
Homebrew build logs for hello on 4.14.104-95.84.amzn2.x86_64
Build date: 2019-03-13 23:36:05
@MerelyAPseudonym
MerelyAPseudonym / # hello - 2019-03-20_06-17-32.txt
Created Mar 20, 2019
hello on 4.14.104-95.84.amzn2.x86_64 - Homebrew build logs
View # hello - 2019-03-20_06-17-32.txt
Homebrew build logs for hello on 4.14.104-95.84.amzn2.x86_64
Build date: 2019-03-20 06:17:32
You can’t perform that action at this time.