By Scott Adams
We’ve won the war on boredom! If you have a smartphone in your pocket, a game console in the living room, a Kindle in your backpack and an iPad in the kitchen, you never need to suffer a minute without stimulation. Yay!
By Scott Adams
We’ve won the war on boredom! If you have a smartphone in your pocket, a game console in the living room, a Kindle in your backpack and an iPad in the kitchen, you never need to suffer a minute without stimulation. Yay!
Colossal Typewriter | |
by John McCarthy and Roland | |
Silver for the PDP-1 | Photon typesetter | |
? | editors by Michael | |
? \ Barnett & Kalon | |
Expensive Typewriter CREATE/EDIT \ Kelley for TECO | |
for PDP-1 by Steve Piner for CTSS \ IBM 704 for PDP-1 | |
/ | / | \ \__ \ by Dan Murphy | |
/ | / | \ \ \ | | |
* Expensive Typewriter editors EDITS | MEMO/MODIFY | | VEDIT | |
(ns file-cols.core | |
"Print the source-line length histogram of a bunch of files as a histogram. | |
Inspired by: https://gist.github.com/rsms/36bda3b5c8ab83d951e45ed788a184f4" | |
(:require [clojure.java.io :as io])) | |
(def uni-bar | |
"Unicode bars for histogram." | |
["" "▏" "▎" "▍" "▌" "▋" "▊" "▉" "█"]) | |
(def quot-rem-8 |
(ns mars.rover) | |
;; A squad of robotic rovers are to be landed by NASA on a plateau on | |
;; Mars. | |
;; This plateau, which is curiously rectangular, must be navigated by the | |
;; rovers so that their on-board cameras can get a complete view of the | |
;; surrounding terrain to send back to Earth. |
;;; http://srfi.schemers.org/srfi-26/srfi-26.html | |
(defn ^:private cut* | |
[[a f] form] | |
(cond | |
(nil? form) [a f] | |
(seq? (first form)) | |
(let [[arg-list xform] (cut* [[] '()] (first form))] | |
(recur [(reduce conj a arg-list) (concat f (list xform))] (next form))) |
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |