Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Submission + - Functors, Applicatives and Monads in Pictures - in Clojure->

dragandj writes: A Clojure version of a friendly Functors, Applicatives and Monads in Pictures tutorial. The original article was written in Haskell, and is an excellent introduction to the very basics of functors, applicatives, and monads. This tutorial, available at http://fluokitten.uncomplicate.org/articles/functors_applicatives_monads_in_pictures.html uses the same picturesque examples, but written in Clojure with Fluokitten library.
Link to Original Source

Comment Re:Python as pseudocode (Score 1) 195

the strange syntax

S-expression is more like the textual representation of Lisp's abstract syntax tree than syntax. In the past Lisp had something more like a conventional syntax (M-expression) which (if I remember correctly) compiled into s-expression, but somehow people still liked s-expression better.

Comment Re:Indiana, not Indian (Score 1) 195

Your Scheme code uses pattern matching so that's not comparable to the pseudo Scheme stuff, which just uses simple accessor.

Scheme does provide accessor for record type. Well I would love to have a reader macro and define something more concise like a.x, but too bad reader macro is not standard. The comparable code with that pseudo Scheme code of yours would be something like

(define (point3-add a b)
  (make-point3
    (+ (point3-x a) (point3-x b))
    (+ (point3-y a) (point3-y b))
    (+ (point3-z a) (point3-z b))))

I bet those who appreciate s-expression can comprehend this code with just a glance. I find that s-expressions are rather easy to parse by (my) human eyes provided they are properly indented.

Submission + - xkcd's long-running "Time" comic: Work of art or nerd sniping?

Fortran IV writes: Randall Munroe's xkcd webcomic has done some odd things before, but #1190, "Time," is something special. It's a time-lapse movie of two people building a sandcastle that's been updating just once an hour (twice an hour in the beginning) for well over a month (since March 25th), and after over a thousand frames shows no sign of ending; in a few days the number of frames will surpass the total number of xkcd comics. It's been mentioned in The Economist. Some of its readers have called it the One True Comic; others have called it a MMONS (Massively Multiplayer Online Nerd Sniping). It's sparked its own wiki, its own jargon (Timewaiters, newpix, Blitzgirling), and a thread on the xkcd user forum that runs to over 20,000 posts from 1100 distinct posters. Is "Time" a fascinating work of art, a deep sociological experiment—or the longest-running shaggy-dog joke in history? Randall Munroe's not saying.

"The number of Unix installations has grown to 10, with more expected." -- The Unix Programmer's Manual, 2nd Edition, June, 1972

Working...