00:04:05 there's also guile: http://www.gnu.org/s/guile-gtk/ 00:05:08 guile-gtk isn't maintained 00:05:15 guile-gnome should be used instead 00:05:56 samth, ooh... mm.. but is this some generic racket gui , or it maps directly to gtk+ ? 00:06:20 araujo: the `racket/gui' library exposes a cross-platform api 00:06:29 samth, I see 00:06:38 which is implemented using gtk on X 00:06:58 there's a set of gtk bindings in racket that's part of the implementation 00:07:01 interesting 00:07:18 but no one has yet put in the effort to clean that up as a public api 00:07:48 gui docs here: http://docs.racket-lang.org/gui/ 00:08:08 thanks samth , checking 00:08:31 gtk code here: https://github.com/plt/racket/tree/master/collects/mred/private/wx/gtk 00:12:33 -!- choas [~lars@p4FDC5D42.dip.t-dialin.net] has quit [Ping timeout: 252 seconds] 00:13:00 kuribas [~user@94-227-36-180.access.telenet.be] has joined #scheme 00:18:46 EmmanuelOga [~emmanuel@190.244.19.108] has joined #scheme 00:25:38 -!- SeanTAllen [u4855@gateway/web/irccloud.com/x-gaggfenkmimcvwog] has quit [] 00:25:51 SeanTAllen [u4855@gateway/web/irccloud.com/x-ymulrttjkfsapbnb] has joined #scheme 00:26:33 -!- Neban [~neban@177.Red-79-156-36.staticIP.rima-tde.net] has quit [Quit: Neban] 00:27:28 -!- SeanTAllen [u4855@gateway/web/irccloud.com/x-ymulrttjkfsapbnb] has quit [Client Quit] 00:27:51 SeanTAllen [u4855@gateway/web/irccloud.com/x-rivwbghafhdkjroj] has joined #scheme 00:29:16 homie [~levgue@xdsl-78-35-187-52.netcologne.de] has joined #scheme 00:37:02 -!- kuribas [~user@94-227-36-180.access.telenet.be] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 00:38:17 -!- otakutomo [~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has quit [Remote host closed the connection] 00:39:26 bombshelter13b [~bombshelt@76-10-149-209.dsl.teksavvy.com] has joined #scheme 00:40:17 kniu [~kniu@pool-71-106-0-41.lsanca.dsl-w.verizon.net] has joined #scheme 00:41:24 -!- ly- [~ly_@unaffiliated/ly-] has quit [Remote host closed the connection] 00:43:54 -!- bombshelter13b [~bombshelt@76-10-149-209.dsl.teksavvy.com] has quit [Client Quit] 01:06:11 -!- fantazo [~fantazo@178-190-233-246.adsl.highway.telekom.at] has quit [Remote host closed the connection] 01:06:59 -!- realitygrill [~realitygr@76.226.204.55] has quit [Read error: Connection reset by peer] 01:07:10 realitygrill [~realitygr@76.226.204.55] has joined #scheme 01:10:07 -!- mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has quit [Ping timeout: 240 seconds] 01:11:56 -!- bwright [~bwright@c122-106-254-100.belrs3.nsw.optusnet.com.au] has quit [Ping timeout: 252 seconds] 01:16:35 -!- toekutr [~user@50-0-51-2.dsl.static.sonic.net] has quit [Remote host closed the connection] 01:23:54 tuubow [~adityavit@c-69-136-107-140.hsd1.nj.comcast.net] has joined #scheme 01:25:30 bwright [~bwright@c122-106-254-100.belrs3.nsw.optusnet.com.au] has joined #scheme 01:31:12 -!- masm [~masm@bl19-166-174.dsl.telepac.pt] has quit [Quit: Leaving.] 01:36:18 -!- samth is now known as samth_away 01:46:04 -!- homie [~levgue@xdsl-78-35-187-52.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 01:46:46 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving] 01:56:53 -!- zmv [~zmv@c953345a.virtua.com.br] has quit [Ping timeout: 252 seconds] 01:57:15 jjjj2_ [~jon@jonr5.dsl.xmission.com] has joined #scheme 01:59:48 rjj [~rjj@cpe-76-90-79-73.socal.res.rr.com] has joined #scheme 02:04:20 -!- pjb [~t@81.202.16.46.dyn.user.ono.com] has quit [Ping timeout: 240 seconds] 02:04:20 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 240 seconds] 02:11:46 -!- jjjj2_ [~jon@jonr5.dsl.xmission.com] has quit [Quit: Ex-Chat] 02:12:11 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 02:12:25 -!- rjcks [~richard@124.225.76.87] has quit [Quit: leaving] 02:15:38 homie [~levgue@xdsl-78-35-187-52.netcologne.de] has joined #scheme 02:36:40 -!- Nisstyre [~yours@infocalypse-net.info] has quit [Read error: Connection reset by peer] 02:38:15 Nisstyre [~yours@infocalypse-net.info] has joined #scheme 02:39:07 -!- rostayob [~rostayob@93-40-112-8.ip38.fastwebnet.it] has quit [Quit: WeeChat 0.3.5] 03:01:20 -!- SeanTAllen [u4855@gateway/web/irccloud.com/x-rivwbghafhdkjroj] has quit [] 03:01:35 SeanTAllen [~SeanTAlle@cpe-98-14-83-126.nyc.res.rr.com] has joined #scheme 03:05:19 -!- SeanTAllen [~SeanTAlle@cpe-98-14-83-126.nyc.res.rr.com] has quit [Client Quit] 03:05:38 SeanTAllen [u4855@gateway/web/irccloud.com/x-bchnqrwnlzstfujz] has joined #scheme 03:06:30 X-Scale` [email@89.180.132.223] has joined #scheme 03:07:10 bombshelter13b [~bombshelt@76-10-149-209.dsl.teksavvy.com] has joined #scheme 03:07:16 -!- bombshelter13b [~bombshelt@76-10-149-209.dsl.teksavvy.com] has quit [Client Quit] 03:07:20 -!- X-Scale [email@2001:5c0:1000:b::9eff] has quit [Ping timeout: 268 seconds] 03:08:18 jrslepak [~jrslepak@c-24-12-144-42.hsd1.il.comcast.net] has joined #scheme 03:11:11 cataska [~cataska@210.64.6.233] has joined #scheme 03:12:35 -!- X-Scale` [email@89.180.132.223] has quit [Remote host closed the connection] 03:13:00 X-Scale [email@sgi-ultra64.broker.freenet6.net] has joined #scheme 03:44:19 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has left #scheme 03:53:28 ThePawnBreak [~quassel@94.177.108.25] has joined #scheme 03:56:52 -!- ybit [~ybit@unaffiliated/ybit] has quit [Quit: leaving] 04:12:22 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 04:24:45 -!- MrFahrenheit [~RageOfTho@users-150-252.vinet.ba] has quit [Ping timeout: 248 seconds] 04:24:50 penryu [~penryu@unaffiliated/penryu] has joined #scheme 04:24:58 hola 04:26:11 have a shiny new android phone, and looking for a scheme impl. 04:31:18 riverswain [~avery@host-208-117-127-155.beyondbb.com] has joined #scheme 04:32:43 -!- ThePawnBreak [~quassel@94.177.108.25] has quit [Ping timeout: 252 seconds] 04:54:33 ASau`` [~user@89-178-114-64.broadband.corbina.ru] has joined #scheme 04:54:36 -!- ijp [~user@host81-159-31-81.range81-159.btcentralplus.com] has quit [Quit: The garbage collector got me] 04:58:07 -!- ASau` [~user@89-178-123-216.broadband.corbina.ru] has quit [Ping timeout: 240 seconds] 05:01:36 -!- drdo [~user@85.207.54.77.rev.vodafone.pt] has quit [Remote host closed the connection] 05:02:22 drdo [~drdo@drdo.eu] has joined #scheme 05:04:23 -!- drdo [~drdo@drdo.eu] has quit [Client Quit] 05:04:32 drdo [~drdo@drdo.eu] has joined #scheme 05:11:09 leo2007` [~leo@119.255.41.67] has joined #scheme 05:11:48 -!- leo2007` [~leo@119.255.41.67] has quit [Client Quit] 05:12:14 leo2007 [~leo@119.255.41.67] has joined #scheme 05:29:45 -!- drdo [~drdo@drdo.eu] has quit [Quit: Coyote finally caught me] 05:33:27 hrm. Gambit is on android *and* ios. sorted. 05:34:48 \o= 05:34:55 \o/ even 05:35:03 I hate typing on my netbook keyboard. :-P 05:35:05 -!- djcb```` is now known as djcb 05:35:26 drdo [~drdo@drdo.eu] has joined #scheme 05:37:16 \o/ from gambit on android? or from kbd hate? 05:37:26 Former. 05:37:37 \o/ 05:38:03 The netbook keyboard comment was for the initial mistyping of that emoticon. 05:38:30 heh. it was either a mistype of \o/ or a mistype of a haskell lambda 05:38:38 Hehehehe. 05:44:50 -!- drwho [~drwho@c-68-81-125-196.hsd1.pa.comcast.net] has quit [Quit: meh] 05:53:45 hydrogenesis [~hdg@124.205.102.34] has joined #scheme 05:54:19 Operaist2 [~OperaIst@ppp-110-169-243-214.revip5.asianet.co.th] has joined #scheme 05:54:34 how do i reverse a list? 05:55:02 -!- pothos [~pothos@114-36-229-64.dynamic.hinet.net] has quit [Ping timeout: 252 seconds] 05:56:39 pothos [~pothos@114-36-229-64.dynamic.hinet.net] has joined #scheme 05:56:47 Operaist2: You can use fold or unfold. Pick your poison. 05:57:04 can you tell me more about fold/unfold? 05:57:31 Operaist2: I'll show you actual implementations. You should then seek to understand why they work. 05:57:39 It'll be very enlightening when you finally "get" it. 05:57:43 ok 05:57:45 is reverse discouraged? or is that just sugar? 05:57:51 rudybot: (require srfi/1) 05:57:51 cky: Done. 05:58:00 -!- annodomini [~lambda@wikipedia/lambda] has quit [Quit: annodomini] 05:58:01 penryu: reverse is fine. But it's good to know how it works. 05:58:10 true. 05:58:14 *penryu* shuts up and watches. 05:58:17 rudybot: (define (reverse1 lst) (fold cons '() lst)) 05:58:18 cky: Done. 05:58:39 rudybot: (define (reverse2 lst) (unfold-right null? car cdr lst)) 05:58:40 cky: Done. 05:58:45 rudybot: (reverse1 '(1 2 3 4)) 05:58:45 cky: ; Value: (4 3 2 1) 05:58:50 rudybot: (reverse2 '(1 2 3 4)) 05:58:50 cky: ; Value: (4 3 2 1) 05:59:02 psykoTRON [~psykoTRON@c-67-166-148-128.hsd1.ca.comcast.net] has joined #scheme 05:59:20 -!- pothos [~pothos@114-36-229-64.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 05:59:38 pothos [~pothos@114-36-229-64.dynamic.hinet.net] has joined #scheme 05:59:48 Operaist2: Of course, you can just use Scheme's built-in reverse, which is what penryu referred to. 06:00:15 wher ecan i read about fold 06:00:17 as in the procedure 06:00:20 fold is a right-fold? 06:00:24 penryu: Left. 06:00:30 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 06:00:32 Operaist2: http://srfi.schemers.org/srfi-1/srfi-1.html 06:00:51 doh. of course. 06:01:22 why does schemers use kons and klin 06:01:25 knil 06:01:35 is he swedish or some such? 06:01:45 Operaist2: No. 06:01:59 Operaist2: kons represents the abstract notion of cons, without actually having to be CONS. 06:02:13 que? 06:02:38 Hehehehehe. 06:02:57 Operaist2: Basically, in this context, kons represents any CONS-like function. 06:03:29 In specific, it's a function that takes two arguments, the first of which is the list element, and the second of which is the previous return value. 06:03:46 (or knil, if there is no previous return value). 06:04:27 well your problem about using fold to reverse just delays the questoin 06:04:33 instead of asking how do you reverse 06:04:37 now i ask how do you fold? 06:04:44 That is at least easy. :-) 06:04:54 Here's a simple definition of fold. 06:05:47 rudybot: (define (fold1 func val lst) (if (null? lst) val (fold1 func (func (car lst) val) (cdr lst)))) 06:05:47 cky: Done. 06:05:54 rudybot: (fold1 + 0 '(1 2 3 4 5)) 06:05:55 cky: ; Value: 15 06:06:04 rudybot: (fold1 cons '() '(1 2 3 4 5)) 06:06:04 cky: ; Value: (5 4 3 2 1) 06:07:05 what did require srfi/1 do? 06:07:14 Operaist2: It provides the fold and unfold functions. 06:07:21 Operaist2: Otherwise I'd have to define those first. 06:09:40 so (fold cons '() '(1 2 3)) is the equivalent of (cons 3 (cons 2 (cons 1 '()))) 06:09:51 is there some other place that explains (fold ...) 06:10:03 that one ddidn't help me very much 06:10:06 penryu: Yes. 06:10:10 (fold + 0 '(1 2 3)) => (+ 3 (+ 2 (+ 1 0))) 06:10:23 Operaist2: What penryu said. 06:10:41 (kons en ... (kons e2 (kons e1 knil)) ... ) that is the sample given in schemers 06:10:43 sorry. I've been in haskell mode for a couple months. 06:10:52 the first ... refers to en -> e2 06:10:59 but what does the second ellipsis do? 06:11:32 I think it expands to however many closing parentheses are req'd to close the expression 06:11:44 Yep. 06:11:45 pj pl 06:11:50 ok that makes sense 06:12:34 so fold applie some procedure to a list in forward order 06:12:58 well maybe that isn't very precise 06:13:28 Right, and the return value is used in the next call. 06:13:50 After the final call, its return value is what fold returns. 06:14:20 so reverse is fold with cons and zero 06:14:27 Operaist2: Empty list. 06:14:42 oh yeah 06:14:52 empty list 06:14:56 thats important lol 06:15:07 i always don't pay attention to the base case 06:15:27 (define (reverse lst) (fold cons '() lst)) 06:15:39 (define (sum lst) (fold + 0 lst)) 06:15:54 (define (product lst) (fold * 1 lst)) 06:15:56 etc 06:16:16 (I may be stomping on already-defined names) 06:17:30 Operaist2: SRFI 1 also defines append-reverse. 06:17:33 Think of it this way: 06:17:47 (define (append-reverse x lst) (fold cons x lst)) 06:18:05 (define (reverse lst) (append-reverse lst '())) 06:18:21 Oops, I got append-reverse wrong. 06:18:29 -!- psykoTRON [~psykoTRON@c-67-166-148-128.hsd1.ca.comcast.net] has quit [] 06:18:34 (define (append-reverse lst x) (fold cons x lst)) 06:19:39 -!- EmmanuelOga [~emmanuel@190.244.19.108] has quit [Ping timeout: 244 seconds] 06:19:59 rudybot: init 06:19:59 cky: your sandbox is ready 06:21:07 rudybot: (define (fold func val lst) (cond ((null? lst) val) ((null? (cdr lst)) (func (car lst) val)) (else (fold func (func (car lst) val) (cdr lst))))) 06:21:07 cky: Done. 06:21:34 rudybot: (define (append-reverse rev-head tail) (fold cons tail rev-head)) 06:21:34 cky: Done. 06:21:51 rudybot: (define (reverse lst) (append-reverse lst '())) 06:21:51 cky: Done. 06:21:57 rudybot: (reverse '(1 2 3 4 5)) 06:21:57 cky: ; Value: (5 4 3 2 1) 06:22:01 psykotron [~psykoTRON@c-67-166-148-128.hsd1.ca.comcast.net] has joined #scheme 06:22:04 Operaist2: ^^--- ;-) 06:22:05 youu have 2 null?s 06:22:26 in the cond 06:22:27 Operaist2: That new version I wrote is refactored to make the last function call a tail call. 06:22:38 So the first case just checks whether the list is empty. 06:22:46 The second case checks whether the list has only one value. 06:22:54 oh right 06:22:57 that makes sense 06:23:02 If so, it just calls func directly without going to the empty list case. 06:23:34 but if you are checking cdr? lst 06:23:48 then wouldn't the prior iteration stop potentil null? list? 06:24:00 Yes. 06:24:04 That's by design. 06:24:13 So, you can simplify the checks this way: 06:24:29 so the first null? would be redundant 06:24:39 except for some bad input case 06:24:49 ? 06:25:46 rudybot: (define (fold func init lst) (if (null? lst) init) (let loop ((val init) (a (car lst)) (d (cdr lst))) (if (null? d) (func a val) (loop (func a val) (car d) (cdr d)))))) 06:25:47 cky: sorry about that, I'm just trying to use (setq sym1 val1 sym2 val2...) form and its not working as expected for me. 06:25:54 Oops. 06:26:20 rudybot: evar (define (fold func init lst) (if (null? lst) init) (let loop ((val init) (a (car lst)) (d (cdr lst))) (if (null? d) (func a val) (loop (func a val) (car d) (cdr d)))))) 06:26:20 cky: reminds me of the most brilliant IRC bot evar: "feckbot", from chrisdone. Impersonates someone with Tourette's Syndrome. Sounds kind of like that, except with obscenities. 06:26:25 rudybot: eval (define (fold func init lst) (if (null? lst) init) (let loop ((val init) (a (car lst)) (d (cdr lst))) (if (null? d) (func a val) (loop (func a val) (car d) (cdr d)))))) 06:26:25 cky: error: #:1:167: read: unexpected `)' 06:26:32 rudybot: eval (define (fold func init lst) (if (null? lst) init) (let loop ((val init) (a (car lst)) (d (cdr lst))) (if (null? d) (func a val) (loop (func a val) (car d) (cdr d))))) 06:26:32 cky: error: #:1:29: if: bad syntax (must have an "else" expression) in: (if (null? lst) init) 06:26:47 rudybot: eval (define (fold func init lst) (if (null? lst) init (let loop ((val init) (a (car lst)) (d (cdr lst))) (if (null? d) (func a val) (loop (func a val) (car d) (cdr d)))))) 06:26:47 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 240 seconds] 06:26:47 cky: Done. 06:26:56 There, fourth time lucky. 06:27:16 Fifth, even. 06:27:39 rudybot: (fold + 0 '()) 06:27:39 cky: ; Value: 0 06:27:41 rudybot: (fold + 0 '(1)) 06:27:41 cky: ; Value: 1 06:27:43 rudybot: (fold + 0 '(1 2)) 06:27:43 cky: ; Value: 3 06:27:46 Very good. 06:27:48 geef [~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #scheme 06:28:09 Operaist2: So you can see, yes, after the initial check, you never have to check whether the list is empty, instead you always just check if the list has one element left. 06:28:28 Operaist2: Lemme pastebin that in a nice-looking format. 06:30:08 Operaist2: http://paste.lisp.org/display/126570 06:32:53 let loop ((val init 06:33:00 where did val come from? 06:33:14 Operaist2: You know what LET is, right? 06:33:27 yeah 06:33:29 oh right 06:33:39 what is loop then? 06:33:47 Operaist2: That creates a "named LET". 06:34:13 In this case, the name is "loop" 06:34:17 But you can choose any name you want. 06:34:26 so inside loop the let will take effect? 06:34:34 Yes. 06:34:43 i cna see why you use let on a and d 06:34:45 but why val 06:34:57 Operaist2: Because val will be given a new value each time "loop" is called. 06:35:31 i don't see why 06:35:59 Okay, so, loop is a function that, in this case, takes three arguments. 06:36:13 The three arguments correspond to the new values of "val", "a", and "d". 06:41:31 -!- markskilbeck [~markskilb@unaffiliated/markskilbeck] has quit [Remote host closed the connection] 06:50:54 -!- psykotron [~psykoTRON@c-67-166-148-128.hsd1.ca.comcast.net] has left #scheme 06:53:17 how long do i have to stare at these for them to make sense? 06:53:22 -!- snarkyboojum [~snarkyboo@67-23-4-190.static.slicehost.net] has quit [Excess Flood] 06:53:55 cky what is the tail call bit? 06:54:25 snarkyboojum [~snarkyboo@67-23-4-190.static.slicehost.net] has joined #scheme 07:08:14 -!- jrslepak [~jrslepak@c-24-12-144-42.hsd1.il.comcast.net] has quit [Quit: Leaving] 07:10:57 -!- sphex [~nobody@74.127.215.20] has quit [Read error: Connection reset by peer] 07:15:32 -!- djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has quit [Read error: Connection reset by peer] 07:20:24 -!- brendn [~Brendan_T@repo.parabolagnulinux.org] has quit [Remote host closed the connection] 07:26:47 xwl_ [user@nat/nokia/x-kqznhvcbiwhnpgqk] has joined #scheme 07:27:11 sphex [~nobody@74.127.215.20] has joined #scheme 07:28:20 does anyone know of any good example programs of 'real world' scheme code? 07:29:30 Operaist2: :-O 07:29:41 Dulak: The inner "if", in the "then" branch. 07:29:52 Dulak: It just returs the result of (func a val) directly. 07:29:55 *returns 07:30:08 geef: Define "real world". 07:30:40 geef: Is AisleRiot considered real world in your definition? :-) 07:30:46 What about Gimp? 07:30:50 gravicappa [~gravicapp@ppp91-77-191-149.pppoe.mtu-net.ru] has joined #scheme 07:32:58 those are good, thanks :) 07:33:17 :-) 07:35:59 is gimp written in scheme? 07:36:35 Operaist2: not that I know of. 07:38:23 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 245 seconds] 07:39:57 rudybot: eval (define (factorial n) (define (loop n acc) (if (= n 0) acc (loop (- n 1) (* n acc)))) (loop n 1)) 07:39:57 ski: Done. 07:40:05 rudybot: eval (factorial 5) 07:40:06 ski: ; Value: 120 07:40:34 wow factorial 5 is already 120 07:40:35 rudybot: eval (define (factorial n) (let loop ((n n) (acc 1)) (if (= n 0) acc (loop (- n 1) (* n acc))))) 07:40:35 ski: Done. 07:40:38 what a function 07:40:39 rudybot: eval (factorial 5) 07:40:39 ski: ; Value: 120 07:41:30 Operaist2 : compare those ^ two versions, the first uses an internal definition of `loop', which it starts off by `(loop n 1)'. the second uses a "named `let'". both basically evaluate in the same way, though 07:42:11 brendn [~brendn@repo.parabolagnulinux.org] has joined #scheme 07:42:39 (hopefullt that explains how a named-`let' works) 07:43:13 vjacob [~vjacob@87.61.170.233] has joined #scheme 07:46:04 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 240 seconds] 07:48:05 ski: Very nice demonstration. 07:48:17 *ski* bows 07:48:49 Named let is one of my top favourite Scheme features. Whoever designed that was a genius. 07:48:51 *ski* still wonders whether it clicks for Operaist2, though 07:49:23 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Quit: leaving] 07:49:52 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 07:51:02 djcb [djcb@nat/nokia/x-ejzkblkigkymcimy] has joined #scheme 07:51:06 hkBst [~marijn@gentoo/developer/hkbst] has joined #scheme 07:52:16 rudybot: eval (define (fold proc init lst) (let loop ((acc init) (lst lst)) (cond ((null? lst) acc) ((pair? lst) (loop (proc (car lst) acc) (cdr lst)))))) ; fwiw, how i might define it 07:52:17 ski: Done. 07:52:45 (so avoiding the code duplication of having two `null?' calls and two `func'/`proc' calls) 07:53:52 ski: Um, you realise why I wrote the version I wrote, right? ;-) 07:54:49 ski: It's expressly designed to make the final function call a tail call. 07:55:36 .. oh, i missed that :) 07:55:46 -!- ddp [~ddp@216.243.111.165] has quit [Remote host closed the connection] 07:56:03 good point 07:56:20 ddp [~ddp@anon-136-179.relakks.com] has joined #scheme 07:57:19 whats so special about tail call? 07:58:34 you can have an unbounded amount of active tail calls 07:58:53 basically, tail calls are used to make iterative processes 07:59:33 Operaist2: In Scheme, loops use tail calls, not goto. 08:00:19 imagine making very many recursive calls. if the recursive calls are tail calls, you could keep doing this for more recursive calls than there are bits in your computers memory 08:00:41 especially consider server-type programs that has to run a long time 08:01:26 also, some systems have artificial restrictions on stack size, so even if you would have enough memory, you wouldn't have enough *stack* memory for very many recursive calls 08:02:16 wait 08:02:23 so with tail calls i have no space limitation 08:02:26 Operaist2 : so, all iteration constructs (including e.g. the imperative-looking `do' one) in Scheme uses tail calls for the iteration 08:02:28 and can compute anything? 08:02:29 since there is no waiting computation (continuation) in a tail call, a single stack frame can be reused. 08:03:30 Operaist2 : values constructed will still take space. but there won't be any extra space taken by activition frames for tail calls 08:04:28 (or more correctly : the implementation might use space for that, but only bounded space even for an unbounded number of tail calls. so effectively you can think of them as taking no extra space, and many implementations will give literally that) 08:05:41 Operaist2 : so, normal kinds of iteration (like definite loops (`for') and indefinite loops (`while')) can be done using this, as well as more unusual forms of iteration, such as a state-machine 08:08:01 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 08:10:29 so what do C use? 08:10:36 if not tail calls 08:10:39 for for 08:15:43 in C, iteration constructs are built into the language 08:15:52 in Scheme, you can build your own 08:17:25 (and indeed, people have done so, ,) 08:31:10 ecraven [~nex@www.nexoid.at] has joined #scheme 08:38:03 what's the difference between C loops and scheme iteration? 08:46:05 mikecsh [~mikecsh@113.28.74.33] has joined #scheme 08:49:23 -!- brendn is now known as brendyn 08:49:38 in Scheme, you iterate by doing repeated tail-calls 08:50:12 in C, you iterate by `for',`while',`do',`continue',`goto' 08:54:33 wingo [~wingo@90.164.198.39] has joined #scheme 08:55:16 but how does C iterate with for? 09:01:05 a branching test instruction and a jump? 09:01:17 amca [~amca@CPE-121-208-82-128.cqzr1.cha.bigpond.net.au] has joined #scheme 09:04:36 -!- djcb [djcb@nat/nokia/x-ejzkblkigkymcimy] has quit [Remote host closed the connection] 09:04:52 tom_i [~thomasing@cmc.beaming.biz] has joined #scheme 09:05:24 djcb [djcb@nat/nokia/x-fmvqoipxdvlnfgwd] has joined #scheme 09:06:27 snizzo [~Claudio@host17-238-dynamic.50-79-r.retail.telecomitalia.it] has joined #scheme 09:06:47 -!- snizzo_ [~Claudio@host138-238-dynamic.31-79-r.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds] 09:06:54 -!- mmc2 [~michal@sams-office-nat.tomtomgroup.com] has left #scheme 09:10:47 -!- tuubow [~adityavit@c-69-136-107-140.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 09:11:17 Operaist2: however the compiler feels like, but naively you could imagine a transformation through goto that a do{} while() is a label followed by code followed by a conditional goto the top of the loop. a while loop is the same only also has a guard at the top, and a for loop is a while loop that also has an initializer and an incrimination step (before the final jump IIRC). 09:14:02 -!- ASau`` is now known as ASau 09:14:11 woonie [~woonie@nusnet-199-161.dynip.nus.edu.sg] has joined #scheme 09:14:46 beware incriminating loops 09:14:46 snizzo_ [~Claudio@host132-42-dynamic.7-79-r.retail.telecomitalia.it] has joined #scheme 09:14:52 -!- snizzo [~Claudio@host17-238-dynamic.50-79-r.retail.telecomitalia.it] has quit [Ping timeout: 268 seconds] 09:15:05 oh, wow. good catch. 09:16:42 a great way to figure out how C loops work is to code a simple one and compile to assembler with -S 09:17:17 very true, the assembly when you compile simply is usually readable. 09:19:20 once you start optimizing though i start having trouble reading the code. 09:19:30 yeah, just optimize... 09:19:45 yeah. -O can turn your "simple" loop into a great big nop. 09:20:53 s/just/just don't/ 09:21:53 masm [~masm@bl19-166-174.dsl.telepac.pt] has joined #scheme 09:27:28 so the scheme iteration and C for are intrinsically different 09:27:30 then 09:27:36 or is it the same if you keep gonig down? 09:28:55 Operaist2: well in both cases there are promises about behavior, but the implementations are free to do what they want. but they are different promises. 09:29:26 free within those promises that is. 09:31:44 -!- dRbiG [drbig@unhallowed.pl] has quit [Ping timeout: 252 seconds] 09:32:27 eniirane [ttW62uQ1@rikki.fi] has joined #scheme 09:32:42 -!- eniirane is now known as koeskoes 09:32:45 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has left #scheme 09:32:48 so the answer is a tail call /might/ be implement in a way that is similar to a loop in C, but it might not. and in some cases a perfectly reasonable tail call construct would be equivalent to some rather unstructured C. but there is no reason to believe that an implementation would do it that way. and it certainly isn't the most straight forward way to implement it. 09:32:53 dRbiG [drbig@unhallowed.pl] has joined #scheme 09:33:26 but the way loop works is different from how iteration works 09:33:41 or maybe not 09:33:45 i dunno lol 09:34:10 -!- mikecsh [~mikecsh@113.28.74.33] has quit [Quit: mikecsh] 09:34:36 well all iterative constructs in C can be expressed equivalently as tail call recursion. 09:35:31 if you think in terms of what you are expressing, not how the implementation handles it. 09:37:11 tuubow [~adityavit@c-69-136-107-140.hsd1.nj.comcast.net] has joined #scheme 09:39:31 -!- Operaist2 [~OperaIst@ppp-110-169-243-214.revip5.asianet.co.th] has quit [Ping timeout: 255 seconds] 09:43:21 ijp [~user@host86-174-96-3.range86-174.btcentralplus.com] has joined #scheme 09:44:46 homie` [~levgue@xdsl-78-35-153-13.netcologne.de] has joined #scheme 09:47:01 -!- homie [~levgue@xdsl-78-35-187-52.netcologne.de] has quit [Ping timeout: 248 seconds] 09:52:37 the core difference is how you approach the problem conceptually. 09:53:52 Operaist2 [~OperaIst@ppp-110-169-230-229.revip5.asianet.co.th] has joined #scheme 09:56:50 -!- realitygrill [~realitygr@76.226.204.55] has quit [Read error: Connection reset by peer] 09:57:06 whether you iterate over element in a list using a loop, or use a fold or tail-recursive function, the same numbers will ultimately be read, summed, and returned. 09:57:13 realitygrill [~realitygr@76.226.204.55] has joined #scheme 09:57:50 indeed. 09:58:02 ... assuming you're summing the numbers in a list. substitute your favorite operation as you see fit. 09:59:28 -!- leo2007 [~leo@119.255.41.67] has quit [Quit: rcirc on GNU Emacs 23.3.50.1] 10:00:04 true 10:00:23 but whether you use a car, horse, legs or dogs, the same distance would be travelled. 10:01:29 ... it took me a full 5 seconds to realize you meant a 4-wheeled vehicle and not the function on lists. 10:01:49 well, the problem is solved whether you do it efficiently or not, or expressively or not. but some problems are expressed more effectively one way or another. 10:02:01 *penryu* <- tired. sleep time. g'night. 10:02:07 g'night 10:02:36 Operaist2: i recommend taking a look at the SICP. it really covers all of this in better detail than i can. 10:04:42 -!- Operaist2 [~OperaIst@ppp-110-169-230-229.revip5.asianet.co.th] has quit [Ping timeout: 252 seconds] 10:05:19 -!- realitygrill [~realitygr@76.226.204.55] has quit [Read error: Connection reset by peer] 10:05:36 Operaist2: but taking the example of acting on every element in a list, this would probably best be represented as a mapping function. but you could also write a recursive function or an iterative (tail-recursive) function, depending on need. using a for loop to go through indices feels like a kludge in comparison. 10:05:43 realitygrill [~realitygr@76.226.204.55] has joined #scheme 10:10:21 ASau` [~user@95-26-89-189.broadband.corbina.ru] has joined #scheme 10:10:40 -!- SHODAN [~shozan@c-a1b5e253.011-86-73746f30.cust.bredbandsbolaget.se] has quit [Read error: Connection reset by peer] 10:11:12 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 10:12:19 -!- realitygrill [~realitygr@76.226.204.55] has quit [Read error: Connection reset by peer] 10:12:22 SHODAN [~shozan@c-a1b5e253.011-86-73746f30.cust.bredbandsbolaget.se] has joined #scheme 10:12:43 realitygrill [~realitygr@76.226.204.55] has joined #scheme 10:14:07 -!- ASau [~user@89-178-114-64.broadband.corbina.ru] has quit [Ping timeout: 240 seconds] 10:16:00 otakutomo [~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #scheme 10:17:32 realitygrill_ [~realitygr@76.226.204.55] has joined #scheme 10:17:34 -!- realitygrill [~realitygr@76.226.204.55] has quit [Read error: Connection reset by peer] 10:17:36 -!- realitygrill_ is now known as realitygrill 10:21:52 Operaist2 [~OperaIst@ppp-110-169-230-229.revip5.asianet.co.th] has joined #scheme 10:26:27 bokr [~edka@109.110.57.104] has joined #scheme 10:30:44 -!- Operaist2 [~OperaIst@ppp-110-169-230-229.revip5.asianet.co.th] has quit [Quit: ChatZilla 0.9.87 [Firefox 8.0/20111115184056]] 10:53:32 -!- bytbox [~s@129.2.129.229] has quit [Ping timeout: 268 seconds] 10:59:23 tupi [~david@139.82.89.24] has joined #scheme 11:01:19 leo2007 [~leo@123.123.248.109] has joined #scheme 11:04:43 markskilbeck [~markskilb@unaffiliated/markskilbeck] has joined #scheme 11:17:19 -!- amca [~amca@CPE-121-208-82-128.cqzr1.cha.bigpond.net.au] has quit [Quit: Farewell] 11:17:19 -!- yamanu [~yamanu@cpe-212-18-40-64.static.amis.net] has quit [Ping timeout: 252 seconds] 11:23:46 rostayob [~rostayob@93-40-67-232.ip37.fastwebnet.it] has joined #scheme 11:25:35 ijp` [~user@host86-182-155-147.range86-182.btcentralplus.com] has joined #scheme 11:26:14 -!- bokr [~edka@109.110.57.104] has quit [Quit: Leaving.] 11:27:07 -!- ijp [~user@host86-174-96-3.range86-174.btcentralplus.com] has quit [Ping timeout: 240 seconds] 11:27:51 ddp_ [~ddp@216.243.111.165] has joined #scheme 11:30:21 -!- ddp [~ddp@anon-136-179.relakks.com] has quit [Ping timeout: 252 seconds] 11:30:22 -!- ddp_ is now known as ddp 11:32:21 -!- vjacob [~vjacob@87.61.170.233] has quit [Quit: This computer has gone to sleep] 11:38:07 -!- tuubow [~adityavit@c-69-136-107-140.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 11:44:43 -!- ijp` is now known as ijp 12:09:11 bytbox [~s@129.2.129.229] has joined #scheme 12:10:00 -!- bytbox [~s@129.2.129.229] has quit [Client Quit] 12:17:08 -!- realitygrill [~realitygr@76.226.204.55] has quit [Quit: realitygrill] 12:19:55 add^_ [~add^_^@h134n3c1o838.bredband.skanova.com] has joined #scheme 12:22:45 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 12:23:19 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 252 seconds] 12:23:32 -!- preflex_ is now known as preflex 12:24:42 -!- DGASAU` [~user@91.218.144.129] has quit [Read error: Connection reset by peer] 12:25:07 DGASAU` [~user@91.218.144.129] has joined #scheme 12:31:53 -!- markskilbeck [~markskilb@unaffiliated/markskilbeck] has quit [Quit: Leaving] 17:34:04 ccl-logbot [~ccl-logbo@setf.clozure.com] has joined #scheme 17:34:04 17:34:04 -!- names: ccl-logbot rixed kk` twem2 soveran Riastradh realitygrill MichaelRaskin masm annodomini evhan copumpkin rostayob EmmanuelOga fantazo kuribas snizzo pjb xpololz jonrafkind pygospa Belaf tom_i araujo ijp eno MrFahrenheit Neban karswell Adrinael tauntaun stchang joast drdo tupi sphex penryu Khisanth ThePawnBreak bzzbzz ve XTL stepnem incubot amoe arbscht rotty_ certainty rotty koeskoes REPLeffect zbigniew cky stamourv aoh Saeren_ kephas homie`` shachaf_ 17:34:04 -!- names: DGASAU` preflex add^_ ddp leo2007 otakutomo SHODAN ASau` dRbiG wingo ecraven pchrist brendyn gravicappa xwl_ snarkyboojum geef pothos riverswain X-Scale cataska SeanTAllen Nisstyre rjj bwright kniu wtetzner exobit pranq snorble leppie dotemacs dsmith GoKhlayeh Dulak devn mornfall markski1beck EvanR em foof elly jb55 cswords_ eMBee Pepe_ confab peterbb Precious1etals tali713 tltstc Nshag ruru qu1j0t3 saccadewrk eli pyro- samth surrounder aking antoszka 17:34:04 -!- names: _p4bl0 djanatyn sstrickl Euthydemus Guest48950 jrslepak_ danking felipe amgarching gnomon whitequark dnm gf3 mario-goulart klutometis elliottcable xian yosafbridge tessier tonyg tizoc inimino ttvd roderic C-Keen fizzie DerGuteMoritz fbs zedstar asumu gabot rapacity Obfuscate teiresias ft ineiros erg micro z0d weinholt ray moll offby1 daedric duncanm Intensity lonstein macrobat aehrisch fds rudybot ski muep shardz cmatei levi` finnrobi_ poucet_ alaricsp 17:34:04 -!- names: astertronistic Razz aidy framling clog ToxicFrog Axioplase_ 17:38:07 -!- rixed [~rixed@extranet.securactive.org] has quit [Ping timeout: 240 seconds] 17:38:47 rixed [~rixed@extranet.securactive.org] has joined #scheme 17:50:07 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 17:50:34 bytbox [~s@129.2.129.231] has joined #scheme 17:51:36 -!- ddp [~ddp@216.243.111.165] has quit [Remote host closed the connection] 17:51:50 ddp [~ddp@anon-158-71.relakks.com] has joined #scheme 17:54:50 acarrico [~acarrico@pppoe-68-142-54-129.gmavt.net] has joined #scheme 17:58:44 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 18:00:27 mmc [~michal@178-85-131-65.dynamic.upc.nl] has joined #scheme 18:07:07 djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has joined #scheme 18:10:45 -!- Saeren_ is now known as Saeren 18:11:44 rixed_ [~rixed@extranet.securactive.org] has joined #scheme 18:12:15 choas [~lars@p5795C6B7.dip.t-dialin.net] has joined #scheme 18:12:30 -!- rixed [~rixed@extranet.securactive.org] has quit [Read error: Operation timed out] 18:14:36 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 240 seconds] 18:15:49 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 18:17:16 -!- djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has quit [Ping timeout: 240 seconds] 18:19:25 -!- shachaf_ is now known as shachaf 18:20:37 -!- rjj [~rjj@cpe-76-90-79-73.socal.res.rr.com] has quit [Read error: Connection reset by peer] 18:21:29 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 18:27:37 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 18:30:23 snizzo_ [~Claudio@host162-237-dynamic.50-79-r.retail.telecomitalia.it] has joined #scheme 18:30:47 -!- snizzo [~Claudio@host132-42-dynamic.7-79-r.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds] 18:35:33 -!- wingo [~wingo@90.164.198.39] has quit [Ping timeout: 248 seconds] 18:40:49 bweaver [~user@host-68-169-175-226.WISOLT2.epbfi.com] has joined #scheme 18:49:14 djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has joined #scheme 18:56:57 githogori [~githogori@216.207.36.222] has joined #scheme 19:05:13 -!- Neban [~neban@45.Red-83-61-38.dynamicIP.rima-tde.net] has quit [Disconnected by services] 19:05:19 Neban [~neban@45.Red-83-61-38.dynamicIP.rima-tde.net] has joined #scheme 19:06:31 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 255 seconds] 19:20:55 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Ping timeout: 255 seconds] 19:23:49 barryfm [~barryfm@fl-71-2-134-179.dhcp.embarqhsd.net] has joined #scheme 19:24:19 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 19:35:37 mazzwar [~chatzilla@41.177.77.207] has joined #scheme 19:35:55 -!- realitygrill [~realitygr@76.226.204.55] has quit [Quit: realitygrill] 19:36:18 -!- mazzwar [~chatzilla@41.177.77.207] has left #scheme 19:39:58 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 244 seconds] 19:42:55 metasyntax|work [~taylor@fw-its-kt209a-2.dyn.ipfw.edu] has joined #scheme 19:50:38 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 19:52:24 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 19:53:45 realitygrill [~realitygr@76.226.204.55] has joined #scheme 19:54:07 -!- realitygrill [~realitygr@76.226.204.55] has quit [Client Quit] 20:05:56 -!- ThePawnBreak [~quassel@94.177.108.25] has quit [Ping timeout: 240 seconds] 20:06:13 -!- geef [~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has quit [Ping timeout: 248 seconds] 20:07:50 rumina [~rumina@88-148-252-70.bb.dnainternet.fi] has joined #scheme 20:09:24 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 20:09:31 How do I design a program bottom-up rather than top-down? I have imperative mind cancer. 20:10:24 there are a few books about it. 20:10:25 I'm trying to make this tic-tac-toe program and I keep trying to do it the C way 20:11:36 Qworkescence [~quad@unaffiliated/quadrescence] has joined #scheme 20:11:46 rumina, write on paper how your program should work 20:12:00 Ok, I'll try that 20:12:14 or closer to what I mean, *what* it should do 20:12:34 :) 20:12:36 Qworkescence: thanks 20:12:39 "it should play tic tac toe". Great! Now elaborate on what that means. 20:12:44 Qworkescence: you saved me from trying to remember which books 20:12:52 Qworkescence: though Henderson on FP is one, iirc. 20:13:07 Qworkescence: that's top down, dumbass 20:13:15 No. "How the program should work" is top-down. 20:13:30 pjb: now _you_ will know which books. :D 20:13:38 Oh you're right. I better leave, because I hate bottom-up programming which is for C. 20:13:39 Bye bye! 20:13:42 -!- Qworkescence [~quad@unaffiliated/quadrescence] has left #scheme 20:13:45 Qworkescence: stay....... 20:14:50 qu1j0t3: I think "dumbass" didn't help matters. ;-) 20:15:06 pretty inappropriate 20:15:54 LOL 20:16:20 it's okay he has a thick skin. 20:16:40 O_o 20:16:51 no really, I know ole Quadrescence 20:17:21 it's an odd mistake for him to make 20:17:31 so the program has three phases: input(player turn) -> game logic(modifying squares based on input) -> output(displaying the board). So I should start from input and pile up the functions along the way then? 20:17:54 rumina: in bottom-up instead of starting with (define (solve-tic-tac-toe) ...), you start with (define (cell) ...) 20:18:29 rumina: don't consider the program, consider the objects in a tic-tac-toe game. 20:18:48 okay :) 20:19:20 The program is the last thing to consider in bottom-up, because the customer may change the specifications before you finish: tic-tac-toe on 4x4 or infinite sheets, or in 3D or 4D, etc. 20:21:34 Qworkescence [~quad@unaffiliated/quadrescence] has joined #scheme 20:21:45 also I call qu1j0t3 a dumbass all the time so he was getting even 20:21:45 In bottom-up you design layers of libraries and frameworks, until you can implement the program trivially with a few library calls. 20:24:53 wow 20:25:09 sounds like how PPoE operates. "let's build it then see if it has any relevance to our product" 20:25:11 "oops, no" 20:25:23 *qu1j0t3* exaggerates a little 20:25:37 gffa [~gffa@unaffiliated/gffa] has joined #scheme 20:25:49 Again, you may not know what the product needs to be until the day before the release. 20:26:08 which doesn't mean you finish libraries first, surely? 20:26:22 YAGNI, DTSSTCPW, etc. 20:26:22 Yes, that's the point. 20:26:30 cool. we're on the same page. 20:26:59 -!- Dulak [~michael@unaffiliated/dulak] has quit [Read error: Connection reset by peer] 20:27:01 You write the libraries first. So you can write any program in a couple of lines of high level calls. 20:27:11 oh. 20:27:31 *qu1j0t3* goes back to work, more confused than evere 20:27:37 And this is done at all levels. 20:28:07 -!- pygospa [~Pygosceli@kiel-5f768846.pool.mediaWays.net] has quit [Disconnected by services] 20:28:17 pygospa [~Pygosceli@kiel-5f7696d4.pool.mediaWays.net] has joined #scheme 20:34:21 this is a lot harder than I thought, this might take a while 20:36:53 rumina: it's better to have played with Lego. 20:36:54 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 20:37:01 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 20:37:01 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 20:37:32 *qu1j0t3* ruminates on that 20:39:54 -!- gravicappa [~gravicapp@ppp91-77-191-149.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 20:42:16 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 240 seconds] 20:42:40 Dulak [~michael@unaffiliated/dulak] has joined #scheme 20:48:31 sadly, I feel that I'm completely unable to discern the shapes of the lego pieces 20:49:18 You use the lego pieces to build blocs. And then you use those blocs to build larger modules. 20:50:50 toekutr [~user@50-0-51-2.dsl.static.sonic.net] has joined #scheme 20:52:50 -!- barryfm [~barryfm@fl-71-2-134-179.dhcp.embarqhsd.net] has left #scheme 20:54:45 -!- fantazo [~fantazo@178-190-233-246.adsl.highway.telekom.at] has quit [Ping timeout: 248 seconds] 21:08:41 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 21:10:59 yeah, I'm lost -.- 21:12:07 THIS IS WHAT BOTTOM-UP DOES TO ONESELF 21:15:04 rumina: It's easy: bottom-up = writing procedures in postfix order. top-down = writing procedures in prefix order. 21:15:09 seriously, I didn't get anything done http://paste.lisp.org/display/126583 21:15:53 bipt [~bpt@cpe-071-070-253-241.nc.res.rr.com] has joined #scheme 21:15:58 How does that help? 21:16:06 What is a cell? 21:16:07 Cosman246 [~cosman246@c-66-235-51-122.sea.wa.customer.broadstripe.net] has joined #scheme 21:16:21 true, I suppose? 21:16:33 I don't know what a cell is 21:17:10 That's your problem. Top-down or bottom-up, you have to think in both cases. 21:17:46 Why don't you know what a cell is? Can't you play a few tic-tac-toe games and see for yourself what a cell is? 21:18:38 You may also play a few other games, such as chess or checker to better understand the notion of cell. 21:18:43 Well a cell is that thing that holds the "X" or "O" 21:19:22 or a king or a queen. That holds something. Right. 21:25:44 HG` [~HG@dsbg-4db578b9.pool.mediaWays.net] has joined #scheme 21:26:54 freakazoid [~seanl@out-mpk.corp.tfbnw.net] has joined #scheme 21:27:36 tupi [~david@139.82.89.24] has joined #scheme 21:30:12 Umm... I'm not exactly sure how I'm supposed to make a cell functionally :( 21:30:14 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 252 seconds] 21:31:29 rudybot: (define nil '()) 21:31:30 pjb: your r5rs sandbox is ready 21:31:30 pjb: Done. 21:31:36 rudybot: (define (make-cell) (let ((contents nil)) (lambda (m . r) (cond ((eqv? m 'contents) contents) ((eqv? m 'set-contents) (set! contents (car r))) (else (error "invalid message")))))) 21:31:37 pjb: Done. 21:31:45 rudybot: (define c (make-cell)) 21:31:45 pjb: Done. 21:31:50 rudybot: (c 'contents) 21:31:51 pjb: ; Value: () 21:31:56 rudybot: (c 'set-contents 'x) 21:31:57 pjb: Done. 21:31:59 rudybot: (c 'contents) 21:31:59 pjb: ; Value: x 21:32:04 someothing like that for a start. 21:32:27 You may use an OO library to ease the definition and modification of those cell abstractions. 21:32:53 alternatively you could use define-struct or define-record-type or whatever is available in your scheme implementation 21:35:16 rumina: notice how my cell abstraction works as well for a tic-tac-toe as for a chess or checker game: 21:35:24 rudybot: (c 'set-contents 'white-king) 21:35:25 pjb: Done. 21:35:27 rudybot: (c 'contents) 21:35:28 pjb: ; Value: white-king 21:35:37 rudybot: (c 'set-contents 'token) 21:35:38 pjb: Done. 21:35:39 rudybot: (c 'contents) 21:35:40 pjb: ; Value: token 21:39:14 I didn't understand everything in that line of code but isn't setting contents a side-effect, not functional? 21:39:57 Yes it is a side effect. One could implement a functional cell if wanted. 21:43:59 rumina: of course, you take the code and reformat it and indent it correctly to better read it. 21:51:11 homie``` [~levgue@xdsl-78-35-149-78.netcologne.de] has joined #scheme 21:52:27 -!- homie`` [~levgue@xdsl-78-35-153-13.netcologne.de] has quit [Ping timeout: 240 seconds] 21:54:27 -!- snizzo_ [~Claudio@host162-237-dynamic.50-79-r.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds] 21:55:00 never mind, I'm way over my head with this one -.-" 21:58:17 rumina: then start learning scheme before trying to understand philosophical differences. 22:07:36 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 22:19:34 soveran [~soveran@186.19.214.247] has joined #scheme 22:19:41 -!- rumina [~rumina@88-148-252-70.bb.dnainternet.fi] has left #scheme 22:26:07 -!- rostayob [~rostayob@93-40-67-232.ip37.fastwebnet.it] has quit [Ping timeout: 252 seconds] 22:27:00 -!- HG` [~HG@dsbg-4db578b9.pool.mediaWays.net] has quit [Quit: HG`] 22:29:23 -!- toekutr [~user@50-0-51-2.dsl.static.sonic.net] has quit [Remote host closed the connection] 22:29:43 -!- freakazoid [~seanl@out-mpk.corp.tfbnw.net] has quit [Quit: Computer has gone to sleep.] 22:32:34 freakazoid [~seanl@out-mpk.corp.tfbnw.net] has joined #scheme 22:33:25 -!- choas [~lars@p5795C6B7.dip.t-dialin.net] has quit [Ping timeout: 248 seconds] 22:35:17 -!- bweaver [~user@host-68-169-175-226.WISOLT2.epbfi.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:36:40 -!- EmmanuelOga [~emmanuel@190.244.19.108] has quit [Ping timeout: 244 seconds] 22:39:36 -!- xpololz [~xpol@50.80-203-124.nextgentel.com] has quit [Ping timeout: 240 seconds] 22:39:36 rostayob [~rostayob@93-40-67-232.ip37.fastwebnet.it] has joined #scheme 22:52:38 ASau`` [~user@95-26-89-189.broadband.corbina.ru] has joined #scheme 22:53:27 -!- ASau` [~user@95-26-89-189.broadband.corbina.ru] has quit [Ping timeout: 240 seconds] 22:57:01 -!- stamourv [~user@ahuntsic.ccs.neu.edu] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:00:12 ddp_ [~ddp@216.243.111.165] has joined #scheme 23:01:44 -!- add^_ [~add^_^@h134n3c1o838.bredband.skanova.com] has quit [Quit: add^_] 23:02:05 -!- freakazoid [~seanl@out-mpk.corp.tfbnw.net] has quit [Quit: Computer has gone to sleep.] 23:04:07 -!- ddp [~ddp@anon-158-71.relakks.com] has quit [Ping timeout: 252 seconds] 23:04:07 -!- ddp_ is now known as ddp 23:07:51 lbc [~quassel@h198.natout.aau.dk] has joined #scheme 23:19:30 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 23:21:30 -!- gffa [~gffa@unaffiliated/gffa] has quit [Quit: sleep] 23:22:10 markskilbeck [~markskilb@host86-133-64-229.range86-133.btcentralplus.com] has joined #scheme 23:22:10 -!- markskilbeck [~markskilb@host86-133-64-229.range86-133.btcentralplus.com] has quit [Changing host] 23:22:10 markskilbeck [~markskilb@unaffiliated/markskilbeck] has joined #scheme 23:30:12 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 23:34:00 -!- githogori [~githogori@216.207.36.222] has quit [Remote host closed the connection] 23:37:46 -!- Qworkescence [~quad@unaffiliated/quadrescence] has quit [Quit: Leaving] 23:40:00 freakazoid [~seanl@out-mpk.corp.tfbnw.net] has joined #scheme 23:41:47 -!- mmc [~michal@178-85-131-65.dynamic.upc.nl] has quit [Ping timeout: 240 seconds] 23:43:33 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Remote host closed the connection] 23:45:40 bokr [~edka@109.110.35.186] has joined #scheme 23:47:37 -!- MrFahrenheit [~RageOfTho@users-150-252.vinet.ba] has quit [Read error: Connection reset by peer] 23:47:42 RageOfThou [~RageOfTho@users-150-252.vinet.ba] has joined #scheme 23:47:51 -!- djcb [~user@a88-112-255-94.elisa-laajakaista.fi] has quit [Ping timeout: 248 seconds] 23:49:55 -!- kuribas [~user@94-227-88-45.access.telenet.be] has quit [Ping timeout: 268 seconds] 23:51:11 kuribas [~user@94-227-88-45.access.telenet.be] has joined #scheme 23:56:47 -!- kuribas [~user@94-227-88-45.access.telenet.be] has quit [Ping timeout: 240 seconds] 23:58:09 kuribas [~user@94-227-88-45.access.telenet.be] has joined #scheme 23:59:05 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving]