I hereby claim:
- I am cataska on github.
- I am lovecankill (https://keybase.io/lovecankill) on keybase.
- I have a public key whose fingerprint is DD42 91A8 D4CF 41C7 6753 B843 04E6 FF04 9423 FF7C
To claim this, I am signing this object:
(ns cataska | |
(:use clojure.contrib.str-utils) | |
(:import (java.net URL) | |
(java.io BufferedReader InputStreamReader))) | |
(def coin | |
["TWD" "CNY" "JPY" "KRW" | |
"HKD" "THB" "SGD" "IDR" | |
"VND" "MYR" "PHP" "INR" | |
"AED" "KWD" "AUD" "NZD" |
USING: kernel io sequences math math.ranges namespaces arrays | |
prettyprint ; | |
IN: aboveAndDiv2 | |
: above60 ( seq -- seq ) | |
[ 60 >= ] filter ; | |
: div2 ( seq -- seq ) | |
[ 2 / ] map ; |
;; Why is Lisp so great? or Why so many parenthesis? | |
;; The funny thing about Lisp is that everybody asks why it has so may parenthesis. Quite a few friends of mine who have studied Lisp in college don’t like it that much. I couldn’t really understand why, until I realized they usually take a class that uses the book Concepts of Programming Languages by Robert W. Sebesta as a textbook. I’m in no position to review this book because I haven’t read it. But from what I’ve skimmed, Lisp is not very well represented in this book, to put it very nicely. He describes Lisp only as a functional programming language, tells a little bit about cons cells, and that’s pretty much it! No object orientation in lisp, no syntactic abstraction, no meta-programming, and so on. My feeling is that if I didn’t know Lisp and read this book I wouldn’t be very impressed by Lisp. | |
;; So why is Lisp so great and why so many parenthesis? These two different questions have the same answer; because Lisp have syntactic abstraction trough t |
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"net/http" | |
"io/ioutil" | |
"regexp" | |
"strings" |
(* Week 1 assignment in Ocaml *) | |
let is_older d1 d2 = match d1, d2 with | |
(y1,m1,d1), (y2,m2,d2) -> | |
y1 < y2 || (y1 = y2 && m1 < m2) || (y1 = y2 && m1 = m2 && d1 < d2) | |
let rec number_in_month ds m = match ds with | |
[] -> 0 | |
| x :: xs -> | |
let r = number_in_month xs m in |
# Created by newuser for 5.0.0 | |
autoload -U compinit | |
compinit | |
# Completion caching | |
zstyle ':completion::complete:*' use-cache on | |
zstyle ':completion::complete:*' cache-path .zcache | |
#Completion Options | |
zstyle ':completion:*:match:*' original only |
(defmacro defkbalias (old new) | |
`(define-key (current-global-map) ,new | |
(lookup-key (current-global-map) ,old))) | |
;; now "C-x -" equals to "C-x 2" | |
(defkbalias (kbd "C-x 2") (kbd "C-x -")) |
#!/bin/sh | |
input=$1 | |
output=$2 | |
ffmpeg -i "$input" -c:v libx264 -profile:v high -level 5 -crf 18 -maxrate 10M -bufsize 16M -pix_fmt yuv420p -vf "scale=iw*sar:ih, scale='if(gt(iw,ih),min(1920,iw),-1)':'if(gt(iw,ih),-1,min(1080,ih))'" -x264opts bframes=3:cabac=1 -movflags faststart -c:a libfdk_aac -b:a 320k -y "$output" |
;; Clojure mode | |
;; (defun run-clojure () | |
;; (interactive) | |
;; (let ((libs (mapconcat 'identity | |
;; '("/home/allen/work/java/clojure-stable/clojure-1.4.0/clojure-1.4.0.jar" | |
;; "/home/allen/work/java/my-clj") | |
;; ":"))) | |
;; (run-lisp (concat "java -server -cp " libs " clojure.main")))) | |
(setq load-path (cons (concat emacs-root "prog-modes/clojure-mode") load-path)) |
I hereby claim:
To claim this, I am signing this object: