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
able | |
about | |
above | |
abst | |
accordance | |
according | |
accordingly | |
across | |
act | |
actually |
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
# Display chart of programming languages recognized by GitHub, sorted by their popularity. | |
# Be patient, it takes about one minute to complete on a good internet connection. | |
for i in `curl -s "https://github.com/languages" | grep -io "/languages/[^\"]*" | sort | uniq`; do curl -s "https://github.com$i" | grep "<h1>.*</h1>" | sed 's/the most/#1/g' | sed 's/.*<h1>\(.*\) <em>.*#\([0-9]*\).*/\2 \1/g'; done | sort -n |
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
;simple inference engine, using bruteforce propagation of modus ponens | |
;if the fact matches given clause (using supplied map of bindings), | |
;returns a map of established bindings, else returns false | |
(defn match | |
([clause fact] (match clause fact {})) | |
([clause fact bnds] | |
(let [[cls & clsR] clause, [fct & fctR] fact] | |
(cond (contains? #{:not=} cls) {:__special__ clause} | |
(= clause fact) bnds |
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
; source: http://lib.store.yahoo.net/lib/paulgraham/jmc.lisp | |
; The Lisp defined in McCarthy's 1960 paper, translated into CL. | |
; Assumes only quote, atom, eq, cons, car, cdr, cond. | |
; Bug reports to [email protected]. | |
(defun null. (x) | |
(eq x '())) | |
(defun and. (x y) |
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
;we define a function 'starter' which calls its first parameter on itself and the second parameter | |
(define starter | |
(lambda (f arg) | |
((f f arg)))) | |
;we call the 'starter' on anonymous (lambda) function (calling its first parameter on itself and the second parameter) and a number | |
(starter (lambda (g num) | |
(printf "~a\n" num) | |
(g g (+ num 1))) | |
0) |
NewerOlder