Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <[email protected]>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
#!/usr/bin/perl | |
# This script is made to show graphs with git commit time made on workweek vs weekend | |
# | |
# The desription of this script and results of its usage is avaliable at: | |
# https://ivan.bessarabov.com/blog/famous-programmers-work-time-part-2-workweek-vs-weekend | |
# | |
# usage: | |
# | |
# git log --author="Sebastian Riedel" --format="%H %ai" | perl script.pl |
Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <[email protected]>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
import struct | |
import spidev | |
import sys | |
import time | |
import random | |
import RPi.GPIO as gpio | |
ascii = [ | |
[ 0x55, 0x00, 0x55, 0x00, 0x55 ], | |
[ 0x55, 0x00, 0x55, 0x00, 0x55 ], |
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
(ns async-test.sinewave.core | |
(:require [cljs.core.async :refer [<! >! chan timeout]]) | |
(:require-macros | |
[cljs.core.async.macros :as m :refer [go]])) | |
(defn sin-vals [offset] | |
(map #(Math/sin %) (iterate (partial + 0.1) offset))) | |
(let [events (chan)] |
(ns three.demo | |
(:require [THREE :as THREE])) | |
(def camera | |
(THREE/PerspectiveCamera. | |
75 | |
(/ 800 600) | |
1 | |
10000)) |
(ns sudoku | |
;(:refer-clojure :exclude [==]) | |
(:require-macros [cljs.core.logic.macros :as m]) | |
(:use [cljs.core.logic :only [everyg infd distinctfd]])) | |
(defn get-square [rows x y] | |
(for [x (range x (+ x 3)) | |
y (range y (+ y 3))] | |
(get-in rows [x y]))) |
(defmacro def-curry-fn [name args & body] | |
{:pre [(not-any? #{'&} args)]} | |
(if (empty? args) | |
`(defn ~name ~args ~@body) | |
(let [rec-funcs (reduce (fn [l v] | |
`(letfn [(helper# | |
([] helper#) | |
([x#] (let [~v x#] ~l)) | |
([x# & rest#] (let [~v x#] | |
(apply (helper# x#) rest#))))] |