This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (defprotocol P (plength [this]) (pget [this index])) | |
P | |
user=> (deftype Foo [v] P (plength [this] (count v)) (pget [this index] (nth v index))) | |
user.Foo | |
user=> (defn obj-seq [obj index] (lazy-seq (if-not (= index (plength obj)) (cons (pget obj index) (obj-seq obj (inc index))) nil))) | |
#'user/obj-seq | |
user=> (obj-seq (->Foo [1 2 3])) | |
ArityException Wrong number of args (1) passed to: user/obj-seq clojure.lang.AFn.throwArity (AFn.java:429) | |
user=> (obj-seq (->Foo [1 2 3]) 0) | |
(1 2 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
(require racket/function racket/list racket/match) | |
(define (re-match? rules input) | |
(let-values ([(matches? rest-input) (re-match rules (string->list input))]) | |
matches?)) | |
(define (re-match rules input #:prev-match? [prev-match? #f]) | |
(if (empty? rules) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~:$ cabal update | |
Config file path source is default config file. | |
Config file /Users/jeremy/.cabal/config not found. | |
Writing default configuration to /Users/jeremy/.cabal/config | |
Downloading the latest package list from hackage.haskell.org | |
Note: there is a new version of cabal-install available. | |
To upgrade, run: cabal install cabal-install | |
~:$ cabal install cabal-install | |
Resolving dependencies... | |
Downloading cabal-install-1.22.6.0... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse.deriv2> (let [x [:a (delay 1)]] (match x [y (1 :<< force)] y)) | |
:a | |
parse.deriv2> (let [x [:a (delay 1)]] (match x [y (z :<< force)] y)) | |
clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No method in multimethod 'to-source' for dispatch value: null, compiling:(/var/folders/ss/mqjzp0x93t51w_6496976hrc0000gn/T/boot.user1103339281602022827.clj:1:25) | |
java.lang.IllegalArgumentException: No method in multimethod 'to-source' for dispatch value: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
500 | |
The request has been canceled by the administrator or by the server. | |
javax.servlet.ServletException: The request has been canceled by the administrator or by the server. | |
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:127) | |
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:472) | |
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:312) | |
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:192) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jeremyheiler on github. | |
* I am jeremyheiler (https://keybase.io/jeremyheiler) on keybase. | |
* I have a public key whose fingerprint is 83B1 1CFA 81C4 1FAC 97BD A611 5550 C74F 6741 0C74 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <unistd.h> | |
int | |
main(int argc, char *argv[]) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------=_Part_1352742_3817298.1424441346922 | |
Content-Type: text/plain; charset=us-ascii | |
Content-Transfer-Encoding: 7bit | |
Empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Integer a = Integer.valueOf(1); | |
Integer b = Integer.valueOf(1); | |
System.out.println("a == b -> " + (a == b)); | |
Integer c = Integer.valueOf(1234); | |
Integer d = Integer.valueOf(1234); | |
System.out.println("c == d -> " + (c == d)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.ByteBuffer; | |
public class U { | |
public static void main(String[] args) { | |
int i = Integer.MAX_VALUE; | |
int xint = 1419258235; | |
int yint = 1411392235; | |
System.out.println("let x = " + xint); | |
System.out.println("let y = " + yint); |