3
Name:
Anonymous
2012-12-09 22:39
5
Name:
Anonymous
2012-12-09 23:19
( ͡; ͟ʖ ͡;) and it was never good
9
Name:
Anonymous
2012-12-10 2:03
>>3
I puked a little in my mouth reading that implementation.
10
Name:
Anonymous
2012-12-10 3:08
>>9
I know, isn't it wonderful?
11
Name:
Anonymous
2012-12-10 3:14
>>7
And when she reads it, it's displayed in a
proportional font!
12
Name:
Anonymous
2012-12-10 5:15
>>3
No borders and no indices, turned out way uglier than I set it out to be because I got lazy:
(define test
'((0 0 0 0 0 0 0 0)
(0 0 0 1 1 0 1 0)
(0 0 1 0 1 0 1 0)
(0 0 1 1 1 0 0 0)
(0 1 0 0 1 1 1 0)
(0 1 1 1 0 0 0 0)
(0 0 0 1 1 0 1 0)
(0 0 0 0 0 0 0 0)))
(define (shiftl l)
`(,@(cdr l) ,(car l)))
(define (shiftr l)
`(,(last l) ,@(reverse (cdr (reverse l)))))
(define (combine . xs)
(cond
((foldl (λ (a b) (or a b)) #f (map null? xs)) null)
((foldl (λ (a b) (and a b)) #t (map (λ (x) (not (list? x))) xs)) (apply list xs))
(else (cons (apply combine (map car xs)) (apply combine (map cdr xs))))))
(define (neighbors m)
(let ((top (shiftr m))
(middle m)
(bottom (shiftl m)))
(map (λ (r) (map (λ (l) (foldl (λ (v i) (+ v i)) 0 l)) r)) (combine (map shiftl top) top (map shiftr top) (map shiftl middle) (map shiftr middle) (map shiftl bottom) bottom (map shiftr bottom)))))
(define (conway cell neighbor-count)
(cond
((= neighbor-count 3) 1)
((and (= 1 cell) (= neighbor-count 2) 1))
(else 0)))
(define (tick m)
(map (λ (l) (map (curry apply conway) l)) (combine m (neighbors m))))
(define (show m)
(for-each (λ (l) (begin (for-each (λ (e) (display (if (= e 1) "*" " "))) l) (newline))) m))
(define (life time torus)
(let loop ((gen 0) (t torus))
(unless (= gen time)
(printf "Generation ~s\n" gen)
(show t)
(loop (add1 gen) (tick t)))))
14
Name:
Anonymous
2012-12-10 5:53
>>13
I wanted to use lists, if I want to do things with arrays I use C.
15
Name:
Anonymous
2012-12-10 6:14
>>14
No, you've got it wrong. The data types you use should be determined by purpose, not language.
16
Name:
Anonymous
2012-12-10 6:51
>>15
I just wanted to do it in a cute way. I know what the boring answer would look like.
17
Name:
Anonymous
2012-12-10 7:04
>>16
You are forgiven. The gods will not haunt you tonight. I like how you used λ also.
19
Name:
Anonymous
2012-12-11 4:03
hey
hey guys
I just saw this cool new même on the imageboards
*whips out dick*
20
Name:
Anonymous
2012-12-11 6:10
[spoiler] /prog/[spoiler] is devolving, not dying.
23
Name:
Anonymous
2012-12-13 6:27
...3d would be better. ...and not in stutter. omg
24
Name:
Anonymous
2013-09-01 13:53
,ヘr/'!_,..-─- 、.,_
ri:::;ゝ'´=-..,,__ `ヽ.
くン´ `ヽ.、 ヽ.
/ , / 、_ i , ヽ! ',
く_/、 」ォ、!/! ./l_,.!- ハ i
//.7.ゞ'└'ァr-ォ Li_」 i
く/ .ヘ ' ___ ゞ'´/ / ハ !
`.!/`>、' ) ,.イ、/!、/ !」
 ̄ ヾ' ̄く/ `ヽ.>ヽ
く!/ !ヽト、
ゝ!、 ァ'"ヽ:::', ヽ.
-==ニニ二く!/`'ーへ. ヽ.! /_
<::::::::::::::〉 /!´ー' i
─-- ..,,,,__ .r/7`'ー/ ./「 ハ
`"'' ─-- 二_"__'' ─-- ::;;;____「|_,/ /::::ハ / .ノ
 ̄r.ア"'':ー--| l. ,iニニ⊃ヽ i (
r<:::::/::::::::::l.」ー‐'::::::/::::ム〉>、 i `ヽ.
7''>rヽ二ゝ、:::::::::::::::/::::;:イン ノ |
`7'ー'' ̄`_rァ'-、__.イ/ン´ ,. '"  ̄ `ヽ. i
.!,ゝ、_、_,./ .,.-r'ー'7 ,' ,. 、 i
/ / |i::;イ'7 i ・ ・ i
,.-‐ r'ー-ン ヽ--' ', ヽ-' ー' /
|i:::;イ`ー'7 ヽ、.,_______,,. '
ヽ、__ニン
25
Name:
Anonymous
2013-09-01 15:24
_,,,...,,_
,.:く:::::::::::::::\
,:'_;;:>-‐::ァ':::':, /´`ヽ、 ,. -─- 、
/:::::::::::::::::::/:::::::::'; ,. - 、_,,.メ.,__ \
;:-\_::イ::::::::::::::_;ハ/ _,..,_ `ヽ
|:::::::::> ''"´ ̄ ̄ `''<´ `' 、 }
l, '´/ 、 `' 、 ':, /
/ ; ハ‐-ヽ、 ヽ } }
.,:' . /{ ./_」ニ=t、ハ ハノ ;
/ ./ /__ト、 ;'ァ' lh ,ハノl| , | ' /
.' ; ;' _」_ \| ゝ-゚' ,./ / ; | ;
! { l!´lhハ ∠ イ |/ ;' {
', \ ハ ゝ゚` ノ / ,ハ ∧ '、
\ `>" ー'´ ,' ,.' ;' ':、 \
∨ | 人 ; .// / ', ヽ
/{ |>, 、 _,,. レ'ム,イ / } ':,
,' ' !/ | `てlハ _/ `ァ─- 、 / } }
レ'´ \{ '、| r'八 ̄ / / ヽ./ ./
_/{ト-r-= '" .|/ \ /
;'´ {/ / { / ,
; |/ /_ } ; }
, .,' ;:'"::::::':,{ /´) |/
/ ' .{:::::::::::::;l! / ´-ヽ ,'
;' {/ ゙' ー ''"リ _r;' _-、_) /
r'{ /} ///! ノ /
{ ヽ.,/ _,,.. -''" { { イ /{ヽ
26
Name:
Anonymous
2013-11-30 8:08
░░░░░░░▄▀▀▀▀▀▀▀▀▀▀▄▄░░░░░░░░░
░░░░▄▀▀░░░░░░░░░░░░░▀▄░░░░░░░
░░▄▀░░░░░░░░░░░░░░░░░░▀▄░░░░░ YOU HAVE BEEN VISITED BY
░░█░░░░░░░░░░░░░░░░░░░░░▀▄░░░ LE 'FEEL OF NO GF
░▐▌░░░░░░░░▄▄▄▄▄▄▄░░░░░░░▐▌░░
░█░░░░░░░░░░░▄▄▄▄░░▀▀▀▀▀░░█░░ A qt 3.14 gf will come to you,
▐▌░░░░░░░▀▀▀▀░░░░░▀▀▀▀▀░░░▐▌░ but ONLY if you post a
█░░░░░░░░░▄▄▀▀▀▀▀░░░░▀▀▀▀▄░█░ `>tfw no GF on this thread
█░░░░░░░░░░░░░░░░▀░░░▐░░░░░▐▌
▐▌░░░░░░░░░▐██▀█▄░░░░░░█▀█░▐▌
░█░░░░░░░░░░░▀▀▀░░░░░░▀▀▀▀░▀▄
░▐▌░░░░▄░░░░░░░░░░░░░▌░░░░░░█
░░▐▌░░▐░░░░░░░░░░░░░░▀▄░░░░░█
░░░█░░░▌░░░░░░░░▐▀░░░░▄▀░░░▐▌
░░░▐▌░░▀▄░░░░░░░░▀░▀░▀▀░░░▄▀░
░░░▐▌░░▐▀▄░░░░░░░░░░░░░░░░█░░
░░░▐▌░░░▌░▀▄░░░░▀▀▀▀▀▀░░░█░░░
░░░█░░░▀░░░░▀▄░░░░░░░░░░▄▀░░░
░░▐▌░░░░░░░░░░▀▄░░░░░░▄▀░░░░░
░▄▀░░░▄▀░░░░░░░░▀▀▀▀█▀░░░░░░░