00:04:07 -!- keenbug [~daniel@p4FE38EDA.dip.t-dialin.net] has quit [Ping timeout: 246 seconds] 00:07:37 -!- ski [~slj@c80-216-142-165.bredband.comhem.se] has quit [Ping timeout: 265 seconds] 00:08:29 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Connection reset by peer] 00:10:04 -!- jhemann [~Jason@adsl-99-14-211-92.dsl.bltnin.sbcglobal.net] has quit [Ping timeout: 260 seconds] 00:30:38 -!- masm [~masm@bl18-40-195.dsl.telepac.pt] has quit [Quit: Leaving.] 00:33:17 -!- tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 00:34:12 Arafangion` [~Arafangio@220-244-108-23.static.tpgi.com.au] has joined #scheme 00:36:34 -!- jrslepak [~jrslepak@64.134.64.192] has quit [Quit: This computer has gone to sleep] 00:37:22 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 00:38:17 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Read error: Connection reset by peer] 00:39:44 jhemann [~Jason@adsl-99-14-211-92.dsl.bltnin.sbcglobal.net] has joined #scheme 00:39:53 homie [~levgue@xdsl-78-35-182-11.netcologne.de] has joined #scheme 00:51:29 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Read error: Connection reset by peer] 00:53:02 homie [~levgue@xdsl-78-35-182-11.netcologne.de] has joined #scheme 00:55:16 jrslepak [~jrslepak@c-71-233-148-123.hsd1.ma.comcast.net] has joined #scheme 00:57:18 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 00:58:04 cdidd [~cdidd@95-26-94-174.broadband.corbina.ru] has joined #scheme 01:00:39 ski [~slj@c80-216-142-165.bredband.comhem.se] has joined #scheme 01:01:47 homie [~levgue@xdsl-78-35-182-11.netcologne.de] has joined #scheme 01:06:11 tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 01:12:40 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Operation timed out] 01:13:06 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 01:19:53 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Connection reset by peer] 01:20:21 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 01:28:59 -!- mmc1 [~michal@178-85-63-71.dynamic.upc.nl] has quit [Ping timeout: 246 seconds] 01:40:06 ThePawnBreak121 [Cristi@94.177.108.25] has joined #scheme 01:53:04 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 01:59:19 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Read error: Connection reset by peer] 02:00:53 homie [~levgue@xdsl-78-35-182-11.netcologne.de] has joined #scheme 02:06:27 _danb_ [~user@124-168-46-173.dyn.iinet.net.au] has joined #scheme 02:13:06 xwl [~user@123.108.223.115] has joined #scheme 02:21:17 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 02:31:25 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Connection reset by peer] 02:31:50 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 02:59:18 -!- dlila [~dlila@72.53.70.164] has quit [Quit: Leaving] 03:03:27 -!- ijp [~user@host86-183-35-191.range86-183.btcentralplus.com] has quit [Quit: later dudes and dudesses] 03:38:25 ofthelesser [~oftheless@dronewave.net] has joined #scheme 03:43:23 -!- samth [~samth@c-66-31-201-165.hsd1.ma.comcast.net] has quit [Ping timeout: 246 seconds] 03:52:07 homie [~levgue@xdsl-78-35-182-11.netcologne.de] has joined #scheme 03:52:50 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Ping timeout: 246 seconds] 04:05:09 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 260 seconds] 04:16:49 -!- ThePawnBreak121 [Cristi@94.177.108.25] has quit [Ping timeout: 245 seconds] 04:17:02 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Quit: WeeChat 0.3.7] 04:22:43 futilius [~futilius_@0-19-7d-d7-86-16.dynamic.ucsd.edu] has joined #scheme 04:22:51 -!- arcfide [~arcfide@c-98-223-204-153.hsd1.in.comcast.net] has quit [Quit: Leaving] 04:26:56 what's the problem with this: i'm trying to do (lset-difference eq? (concatenate (cons some-list (car something-that-cared-gives-a-list)))) 04:27:29 won't work if i substitute the cons function for list 04:29:09 execution trace gives this error: Error: (null-list?) bad argument type - not a list: # 04:29:27 but i can (car <>) it perfectly and it gives me (A) 04:29:55 (i added a (begin (display (car xxx)) .. ) to make sure it had a reasonable argument 04:30:17 (also, i could car it in the display function well, so something-that... is in fact a list 04:32:29 rudybot: (lset-difference eq? (concatenate (cons some-list (car (list 1 2 3 2 1))))) 04:32:30 *offby1: error: reference to an identifier before its definition: lset-difference in module: 'program 04:32:40 that's in some SRFI or other, yes? 04:33:02 rudybot: (require srfi/1) 04:33:02 *offby1: Done. 04:33:04 rudybot: (lset-difference eq? (concatenate (cons some-list (car (list 1 2 3 2 1))))) 04:33:05 *offby1: error: reference to an identifier before its definition: some-list in module: 'program 04:33:19 rudybot: (lset-difference eq? (concatenate (cons (list 1 2 3 2 1) (car (list 1 2 3 2 1))))) 04:33:19 *offby1: error: apply: expects type as 2nd argument, given: '((1 2 3 2 1) . 1); other arguments were: # 04:33:30 srfi1 04:33:55 rudybot: (lset-difference eq? (concatenate (cons (list 1 2 3 2 1) (car (list (list 1 2 3) (list 2 3 2 1)))))) 04:33:55 *offby1: error: append: expected argument of type ; given: 2 04:34:07 bfig: maybe paste the code 04:34:15 sure 04:34:16 one sec 04:34:16 I don't understand enough about what you're doing to repro it 04:34:29 i'm trying to compute functional dependencies through a sort of backtracking 04:34:37 *bfig* goes to a paste... 04:35:33 http://paste.call-cc.org/paste?id=400f13c9b5f94bca1c5607509d33f26def8d0cdf 04:35:39 offby1, ^ 04:36:12 that's a lotta code 04:36:26 gave you everything so you could run it 04:36:30 (if you wanted) 04:36:31 can you cut it down to just the bit that's acting funny, and include the actual output and the expected output? 04:36:58 basically I'm lazy 04:37:15 if you show me two lines of code and say "this evaluates to X but I expected Y", that's ideal 04:37:18 the problem is it is in a helper function deep inside the code. the offending line is (car next-dependency)))) 04:37:37 but it evaluates to *error* and i just want to concatenate and remove doubles 04:37:58 it's hard to explain otherwise, if i give you any type of output it'll be from somewhere far away 04:38:02 *offby1* stares blankly 04:38:08 (new-preset .... 04:38:21 that is the offending definition (inside a let*...) 04:38:58 i try to get two lists to the concatenate function, and it seems to die there 04:39:32 or maybe it dies in the (car...) but i wouldn't understand if it happened that way because the (display (car next-dependency)) works -two lines above- 04:39:51 can't help ya unless you drastically simplify it; sorry 04:40:26 -!- forcer [~forcer@hmbg-5f7734b8.pool.mediaWays.net] has quit [Ping timeout: 246 seconds] 04:42:05 -!- pygospa [~Pygosceli@kiel-4dbed838.pool.mediaWays.net] has quit [Disconnected by services] 04:42:15 pygospa [~Pygosceli@kiel-5f7694dc.pool.mediaWays.net] has joined #scheme 04:42:56 -!- dnolen [~user@p72-0-226-118-static.acedsl.com] has quit [Ping timeout: 260 seconds] 04:44:34 homie` [~levgue@xdsl-78-35-164-149.netcologne.de] has joined #scheme 04:46:27 offby1, apparently the problem has to do with the fact i don't understand concatenate's signature :| 04:46:36 -!- homie [~levgue@xdsl-78-35-182-11.netcologne.de] has quit [Ping timeout: 252 seconds] 04:49:43 -!- xwl [~user@123.108.223.115] has quit [Remote host closed the connection] 04:50:59 could be! 04:51:06 rudybot: doc concatenate 04:51:06 *offby1: http://docs.racket-lang.org/srfi-std/srfi-1.html#concatenate 04:51:20 i was looking at it 04:51:22 rudybot: (concatenate (list (list 1 2 3) (list 'a 'b 'c))) 04:51:22 *offby1: ; Value: (1 2 3 a b c) 04:51:34 *offby1* idly wonders how that differs from "append" 04:51:35 apparently it had to do with lset-difference eq? 04:51:44 or rather "apply append" 04:51:48 it doesn't differ, it is just apply append 04:51:55 rudybot: (lset-difference eq? (list 1 2 3) (list 2 3 4)) 04:51:55 *offby1: ; Value: (1) 04:52:17 err 04:52:20 delete-duplicates 04:52:55 *bfig* feels dumb 04:54:19 solved 04:56:21 \o/ 05:01:03 xwl [~user@123.108.223.115] has joined #scheme 05:10:52 -!- ofthelesser [~oftheless@dronewave.net] has left #scheme 05:18:44 -!- Fare [~Fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has quit [Quit: Leaving] 05:37:56 -!- floater [~e30dd50ec@nude.lesbianbath.com] has quit [Ping timeout: 272 seconds] 05:38:34 -!- tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 05:47:00 toekutr [~user@50-0-51-2.dsl.static.sonic.net] has joined #scheme 05:56:57 -!- homie` [~levgue@xdsl-78-35-164-149.netcologne.de] has quit [Remote host closed the connection] 06:00:56 adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has joined #scheme 06:01:10 -!- adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has quit [Remote host closed the connection] 06:01:15 bipt [~bpt@cpe-071-070-253-241.nc.res.rr.com] has joined #scheme 06:01:37 adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has joined #scheme 06:05:01 -!- dous [~dous@unaffiliated/dous] has quit [Remote host closed the connection] 06:07:19 gravicappa [~gravicapp@ppp91-77-177-181.pppoe.mtu-net.ru] has joined #scheme 06:07:32 kevin01123 [~user@97-91-232-86.dhcp.stls.mo.charter.com] has joined #scheme 06:07:38 -!- kevin01123 [~user@97-91-232-86.dhcp.stls.mo.charter.com] has left #scheme 06:07:44 lcc [4bad5a33@gateway/web/freenode/ip.75.173.90.51] has joined #scheme 06:08:01 -!- lcc [4bad5a33@gateway/web/freenode/ip.75.173.90.51] has quit [Client Quit] 06:16:14 soveran [~soveran@186.19.214.247] has joined #scheme 06:30:01 question about begin: can i add this function over anything without changing the behavior? 06:30:13 (lambda (x) (begin (display x) x)) ? 06:30:22 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 06:30:55 bfig: no. Lambda returns a procedure. x returns what is bound to x. 06:31:07 i mean like this 06:31:09 begin is not a function also. 06:31:21 (define (print x) (begin (display x) x)) 06:31:25 (begin x) === x, yes. 06:32:00 (begin (something) x) =/= x because (something) may have side effects impacting x. 06:32:02 then for example i have something which i want to check for validity: (somefun ..) and i put right there (print (somefun ..)) 06:32:12 pjb, what if i'm only printing it? 06:32:21 ie using the display function 06:32:39 there is code that won't work if i do what i just said and i don't see why that should be a problem 06:32:40 printing is a side effect 06:32:41 Use your print function: (print x) instead of x. 06:32:50 what do you mean? 06:33:06 (print (print 42)) =/= (print 42) ! 06:33:18 not in the return value? 06:33:23 -!- copumpkin [~copumpkin@unaffiliated/copumpkin] has quit [Ping timeout: 245 seconds] 06:33:51 copumpkin [~copumpkin@unaffiliated/copumpkin] has joined #scheme 06:34:19 pjb, why is that a problem? aren't you just printing and returning whatever you got? 06:34:36 i'd like to print a value and pass it forward, nothing more 06:35:07 bfig: (print (print 42)) prints 42 two times, while (print 42) prints it once. Therefore, for x = (print 42), (print x) is vastly different from x. 06:35:25 pjb, i don't care about the printing, i care about the return value 06:35:33 So there. 06:35:37 it's not a macro, it is just a regular define 06:35:54 i just want to print in the interpreter whatever value is passing through there 06:40:54 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 06:41:54 -!- adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has quit [Quit: adu] 06:43:57 albacker [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 06:43:57 -!- albacker [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Changing host] 06:43:57 albacker [~eni@unaffiliated/enyx] has joined #scheme 06:44:31 -!- mark_weaver [~user@209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 06:46:25 adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has joined #scheme 06:57:33 -!- adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has quit [Quit: adu] 06:57:41 pjb, sorry, i didn't understand what you meant 06:58:30 i'm still trying to find a way to do what i just told: print the value without changing the behavior of the program (i'm running a complicated algorithm and some data is just not behaving as it should) 06:58:52 if (define (print x) (begin (display x) x)) doesn't work, how can i do it? 07:06:16 I didn't say that it didn't work. You asked whether you could add this function over anything without changing the behavior. 07:06:24 That's a different question. 07:06:39 ok, well, consider my objective: is this going to work always? 07:06:56 If your algorithm involves output (eg. it's a protocol that's sending some structured data), then printing on that same out will break it. 07:07:03 No, it won't work always. 07:07:13 As soon as you have side effects, you must take those side effects into account. 07:07:30 the algorithm won't display anything except for debugging purposes 07:07:48 So you are able to consider the side effects. Why are you asking here? 07:07:51 ie, everything that is displayed is some debug capture, trying not to mess the flow of the algorithm 07:08:04 what? it's a scheme thing 07:08:21 I mean that only you can know the answer! 07:08:34 let me tell you why i'm asking 07:08:42 i have a definition inside a let, right? 07:08:45 I don't know your algorithm. I don't know what it's about, what it's I/O what side effects it has, etc. 07:08:50 it has no io 07:09:07 it just takes a couple lists, does some stuff (no io, no parallelism, no nothing) and returns a list of lists 07:09:31 Then your print function doesn't effect that, does it? 07:10:10 Also some algorithms are time dependant, and calling a function as always at least that side effect. 07:11:04 but it suddenly doesn't work complaining that my arguments change 07:11:09 ie, xxx is not a list 07:11:12 or things like that 07:11:22 i remove the (print ...) and it stops complaining 07:11:47 say i have a function f that returns a list. is (f) the same as (print (f)) ? 07:11:58 the *return* of the executions, not the side effects 07:12:11 rudybot: (define (print x) (begin (display x) x)) 07:12:12 pjb: your sandbox is ready 07:12:12 pjb: Done. 07:13:04 rudybot: (eq? 1 (print 1)) 07:13:04 pjb: ; Value: #t 07:13:05 pjb: ; stdout: "1" 07:13:21 rudybot: (let ((x '(1 2 3))) (eq? x (print x))) 07:13:21 pjb: ; Value: #t 07:13:22 pjb: ; stdout: "(1 2 3)" 07:13:31 rudybot: (let ((x "Hello")) (eq? x (print x))) 07:13:32 pjb: ; Value: #t 07:13:33 pjb: ; stdout: "Hello" 07:14:30 ThePawnBreak [Cristi@94.177.108.25] has joined #scheme 07:16:35 forcer [~forcer@hmbg-5f773010.pool.mediaWays.net] has joined #scheme 07:18:08 attila_lendvai [~attila_le@87.247.50.122] has joined #scheme 07:18:08 -!- attila_lendvai [~attila_le@87.247.50.122] has quit [Changing host] 07:18:08 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 07:38:21 -!- djcb`` [~user@a88-114-95-13.elisa-laajakaista.fi] has quit [Read error: Operation timed out] 07:39:34 djcb`` [~user@a88-114-95-13.elisa-laajakaista.fi] has joined #scheme 07:50:14 -!- djcb`` [~user@a88-114-95-13.elisa-laajakaista.fi] has quit [Read error: Operation timed out] 07:51:18 djcb`` [~user@a88-114-95-13.elisa-laajakaista.fi] has joined #scheme 07:51:47 -!- djcb`` [~user@a88-114-95-13.elisa-laajakaista.fi] has quit [Remote host closed the connection] 08:16:59 mmc1 [~michal@178-85-63-71.dynamic.upc.nl] has joined #scheme 08:19:55 -!- copumpkin [~copumpkin@unaffiliated/copumpkin] has quit [Remote host closed the connection] 08:20:13 copumpkin [~copumpkin@unaffiliated/copumpkin] has joined #scheme 08:22:14 keenbug [~daniel@p4FDB78F4.dip.t-dialin.net] has joined #scheme 08:23:34 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Ping timeout: 260 seconds] 08:44:34 -!- mmc1 [~michal@178-85-63-71.dynamic.upc.nl] has quit [Read error: Operation timed out] 08:53:39 drizzd [~drizzd@80.123.242.182] has joined #scheme 09:05:13 _danb_` [~user@124-168-46-173.dyn.iinet.net.au] has joined #scheme 09:05:38 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 09:07:18 bfgun [~b_fin_g@r186-53-168-167.dialup.adsl.anteldata.net.uy] has joined #scheme 09:07:19 -!- _danb_ [~user@124-168-46-173.dyn.iinet.net.au] has quit [Ping timeout: 264 seconds] 09:11:31 -!- bfig [~b_fin_g@r186-53-174-170.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 264 seconds] 09:13:11 -!- gravicappa [~gravicapp@ppp91-77-177-181.pppoe.mtu-net.ru] has quit [Ping timeout: 250 seconds] 09:21:00 antithesis [~antithesi@81.71.110.7] has joined #scheme 09:22:42 -!- _danb_` is now known as _danb_ 09:27:38 dous [~dous@unaffiliated/dous] has joined #scheme 09:27:48 jewel [~jewel@196-209-224-252.dynamic.isadsl.co.za] has joined #scheme 09:32:04 masm [~masm@bl18-40-195.dsl.telepac.pt] has joined #scheme 09:34:59 gravicappa [~gravicapp@ppp91-77-180-19.pppoe.mtu-net.ru] has joined #scheme 09:45:39 tomobrien [~tomobrien@host-92-2-79-163.as43234.net] has joined #scheme 09:45:59 -!- peterhil [~peterhil@xdsl-77-86-196-131.nebulazone.fi] has quit [Quit: Must not waste too much time here...] 09:53:20 -!- antithesis [~antithesi@81.71.110.7] has quit [Quit: yes leaving] 10:00:25 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 250 seconds] 10:02:10 peterhil [~peterhil@xdsl-77-86-196-131.nebulazone.fi] has joined #scheme 10:12:03 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 10:28:06 dzhus [~sphinx@176.14.94.92] has joined #scheme 10:32:51 -!- wollw [~davidsher@75-101-85-170.dsl.dynamic.sonic.net] has quit [Quit: leaving] 10:33:01 phax [~phax@b01b98ec.bb.sky.com] has joined #scheme 10:33:02 -!- phax [~phax@b01b98ec.bb.sky.com] has quit [Changing host] 10:33:02 phax [~phax@unaffiliated/phax] has joined #scheme 10:33:05 wollw [~davidsher@75-101-85-170.dsl.dynamic.sonic.net] has joined #scheme 10:34:49 -!- jhemann [~Jason@adsl-99-14-211-92.dsl.bltnin.sbcglobal.net] has quit [Ping timeout: 246 seconds] 10:42:57 gremmachook [u1735@gateway/web/irccloud.com/x-qwmjjdvkbhvzznjj] has joined #scheme 10:44:04 Hi, I'd like to create a matrix using vectors, so this seems to be the easiest way: (make-vector vertex-count (make-vector vertex-count 0)). But, all of the row vectors refer to the same object. How'd I go about avoiding this? 10:46:30 gremmachook: perhaps map, eg (apply vector vertex-count (map (lambda (x) (make-vector vertex-count 0)) (make-list vertex-count))) 10:47:02 RageOfThou [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 10:47:05 oops 10:47:11 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Connection reset by peer] 10:47:17 (apply vector (map (lambda (x) (make-vector vertex-count 0)) (make-list vertex-count))) 10:49:00 rudybot: (let ((vertex-count 3)) (apply vector (map (lambda (x) (make-vector vertex-count 0)) (make-list vertex-count)))) 10:49:00 leppie: your sandbox is ready 10:49:00 leppie: error: procedure make-list: expects 2 arguments, given 1: 3 10:49:17 rudybot: (let ((vertex-count 3)) (apply vector (map (lambda (x) (make-vector vertex-count 0)) (make-list vertex-count #f)))) 10:49:18 leppie: ; Value: #(#(0 0 0) #(0 0 0) #(0 0 0)) 10:54:25 leppie: Thanks! 10:55:59 -!- RageOfThou [~RageOfTho@users-55-233.vinet.ba] has quit [Ping timeout: 245 seconds] 10:56:05 gremmachook: there are quite a few ways to do this, vector-map might be a better choice, eg: (vector-map (lambda (x) (make-vector x 0)) (make-vector vertex-count vertex-count)) 11:02:04 leppie: Yes, I was just looking at the documentation of vector-map; this looks much cleaner. 11:05:08 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 11:15:26 -!- pygospa [~Pygosceli@kiel-5f7694dc.pool.mediaWays.net] has quit [Disconnected by services] 11:15:36 pygospa [~Pygosceli@kiel-5f77b737.pool.mediaWays.net] has joined #scheme 11:25:07 antithesis [~antithesi@81.71.110.7] has joined #scheme 11:29:00 fschwidom [~fschwidom@46.115.22.106] has joined #scheme 11:37:17 ijp [~user@host86-183-35-191.range86-183.btcentralplus.com] has joined #scheme 11:40:16 -!- fschwidom [~fschwidom@46.115.22.106] has quit [Remote host closed the connection] 11:48:27 Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #scheme 12:02:49 -!- hive-mind [~hivemind@unaffiliated/contempt] has quit [Read error: Operation timed out] 12:04:53 -!- copumpkin [~copumpkin@unaffiliated/copumpkin] has quit [Ping timeout: 252 seconds] 12:05:22 copumpkin [~copumpkin@unaffiliated/copumpkin] has joined #scheme 12:08:53 hive-mind [~hivemind@unaffiliated/contempt] has joined #scheme 12:22:49 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 276 seconds] 12:24:07 -!- tomobrien [~tomobrien@host-92-2-79-163.as43234.net] has quit [Ping timeout: 276 seconds] 12:26:04 -!- tomodo [~tomodo@gateway/tor-sasl/tomodo] has quit [Ping timeout: 276 seconds] 12:35:16 -!- teiresias [~teiresias@archlinux/trusteduser/teiresias] has quit [Quit: leaving] 12:38:34 choas [~lars@d83-187-168-138.cust.tele2.at] has joined #scheme 12:44:20 aune_ [~Arne@h-152-28.a163.priv.bahnhof.se] has joined #scheme 12:46:29 samth [~samth@c-66-31-201-165.hsd1.ma.comcast.net] has joined #scheme 12:46:43 -!- xwl_ [user@nat/nokia/x-rrcnevzcogyojakm] has quit [Ping timeout: 245 seconds] 12:50:28 -!- pygospa [~Pygosceli@kiel-5f77b737.pool.mediaWays.net] has quit [Disconnected by services] 12:50:37 pygospa [~Pygosceli@kiel-4dbec5f3.pool.mediaWays.net] has joined #scheme 12:52:20 FreeArtMan [~fam@93.177.213.54] has joined #scheme 12:56:26 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Quit: Leaving.] 12:58:26 woonie [~woonie@nusnet-232-26.dynip.nus.edu.sg] has joined #scheme 13:05:18 -!- FreeArtMan [~fam@93.177.213.54] has quit [Ping timeout: 265 seconds] 13:05:47 FreeArtMan [~fam@93.177.213.54] has joined #scheme 13:06:01 -!- pygospa [~Pygosceli@kiel-4dbec5f3.pool.mediaWays.net] has quit [Disconnected by services] 13:06:09 pygospa [~Pygosceli@kiel-4d06728e.pool.mediaWays.net] has joined #scheme 13:23:24 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 13:33:39 jhemann [~Jason@99.14.211.92] has joined #scheme 13:34:36 -!- phax [~phax@unaffiliated/phax] has quit [Ping timeout: 252 seconds] 13:38:25 phax [~phax@unaffiliated/phax] has joined #scheme 13:42:53 -!- ffs is now known as acedia 13:43:10 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 13:44:39 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 13:55:15 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 260 seconds] 13:57:37 tom_i [~thomasing@ingserv.demon.co.uk] has joined #scheme 13:57:59 homie [~levgue@xdsl-78-35-164-149.netcologne.de] has joined #scheme 13:59:13 soveran [~soveran@186.19.214.247] has joined #scheme 14:01:09 -!- aune_ [~Arne@h-152-28.a163.priv.bahnhof.se] has quit [Quit: Lämnar] 14:03:03 mark_weaver [~user@209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 14:07:00 -!- tessier [~treed@kernel-panic/copilotco] has quit [Ping timeout: 252 seconds] 14:07:06 tessier [~treed@216.105.40.125] has joined #scheme 14:12:25 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 14:18:37 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Quit: WeeChat 0.3.7] 14:20:01 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 14:25:07 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Quit: WeeChat 0.3.7] 14:25:59 -!- samth [~samth@c-66-31-201-165.hsd1.ma.comcast.net] has quit [Ping timeout: 246 seconds] 14:26:23 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 14:31:36 -!- futilius [~futilius_@0-19-7d-d7-86-16.dynamic.ucsd.edu] has quit [Quit: Leaving] 14:47:36 Hi, this is a common construct that I have seen in Scheme -- using let to define a procedure http://paste.pocoo.org/show/577991/. Is it possible to use late bindings like let* allows in this case? 14:57:40 tupi [~david@177.31.167.14] has joined #scheme 14:59:02 gremmachook: can you be more specific about what you're trying to do? 15:01:14 -!- tessier [~treed@216.105.40.125] has quit [Read error: Operation timed out] 15:08:50 -!- keenbug [~daniel@p4FDB78F4.dip.t-dialin.net] has quit [Ping timeout: 260 seconds] 15:11:08 -!- samth_away is now known as samth 15:21:25 -!- hiato [~nine@clam.leg.uct.ac.za] has quit [Ping timeout: 248 seconds] 15:23:17 hiato [~nine@clam.leg.uct.ac.za] has joined #scheme 15:27:38 -!- phax [~phax@unaffiliated/phax] has quit [Ping timeout: 240 seconds] 15:28:02 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 15:28:25 tessier [~treed@216.105.40.125] has joined #scheme 15:29:48 gremmachook: I suspect that you are using the term "late bindings" incorrectly, because that's not what 'let*' does. 15:30:42 gremmachook: there is no "named" let*, to be honest, I'm not sure what the recursive call to loop would be like in that case 15:30:59 though I may be misunderstanding you 15:31:35 namidark [~joshrende@c-98-230-1-143.hsd1.fl.comcast.net] has joined #scheme 15:32:36 I'm trying to sum up two pairs of lists, but when running http://pastie.org/private/bicmucer0loxopkwstovpq -- I get the Object (2 3) is not applicable, can you not sum the car of a list? 15:33:11 namidark: the problem is (distance ( (cdr x) (cdr y))) 15:33:30 here you are applying the cdr of x to the cdr of y, then computing the distance of that 15:33:44 I suspect it should be (distance (cdr x) (cdr y)) 15:33:57 namidark: also, you need to check for the end-of-list. 15:34:06 yes, that too 15:34:22 actually, namidark, you do the same thing in the body of distance 15:34:48 where you are trying to apply the return value of display to the result of the addition and the recursive call to distance 15:35:03 ijp: Ah okay, so now I'm getting an error about () which means I just need to check for an empty list? 15:35:04 be careful with parentheses; they have a meaning 15:35:12 namidark: remember that parentheses do more than just grouping in lisp. each set of parens actually causes a procedure call to the first item. 15:35:23 mark_weaver: yeah i just saw that :) 15:36:31 -!- hiato [~nine@clam.leg.uct.ac.za] has quit [Ping timeout: 276 seconds] 15:36:58 hiato [~nine@clam.leg.uct.ac.za] has joined #scheme 15:37:15 gremmachook: do you have a (hypothetical) example, of what it is you would like? 15:38:45 mark_weaver: ijp: so now i have my condition to check for when its null, but how do i return that recursive sum? 15:39:19 namidark: you'll want to include the recursive call in your '+' 15:39:44 namidark: are you trying to compute the distance between two points in euclidean space? 15:39:59 because for that, you want the sum of the squares of the differences. 15:40:05 mark_weaver: eventually two vectors, but I'm jst trying to wrap my head around the recursive part first 15:41:50 attila_lendvai [~attila_le@176.222.149.2] has joined #scheme 15:41:50 -!- attila_lendvai [~attila_le@176.222.149.2] has quit [Changing host] 15:41:50 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #scheme 15:42:24 ijp: like (+ x y distance()) ? 15:42:57 namidark: you are still falling into C-style syntax. 15:43:04 yup :) 15:43:24 to call a procedure, you wrap parens around both the procedure name and the args, instead of after the procedure name. 15:43:40 so (distance x y) instead of distance(x y) 15:44:19 mark_weaver: so (+ x y (distance (cdr x) (cdr y))) 15:44:41 namidark: right. 15:45:04 namidark: well, actually (+ (car x) (car y) (distance (cdr x) (cdr y))) 15:45:37 tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 15:45:46 but before doing this, you need to check whether x or y is the empty list, and decide what the result should be in that case. 15:46:05 mark_weaver: if its empty i want to return the result of the summing so far 15:46:32 so something like... (cond ((null? x) [sum] ) (else (.... 15:46:46 namidark: I think you want something like this: 15:46:47 (define (distance x y) 15:46:47 (if (null? x) 15:46:47 0 15:46:50 (+ (car x) 15:46:53 (car y) 15:46:57 (distance (cdr x) (cdr y))))) 15:46:59 15:48:05 mmc1 [~michal@178-85-63-71.dynamic.upc.nl] has joined #scheme 15:50:36 mark_weaver: so i have that now; http://pastie.org/private/5z6dpnluvbgixe3i8v0sxg but now its not defining the function for some reason 15:51:21 by defining i mean its saying unbound variable distance * 15:51:26 namidark: okay, two problems there: 15:52:11 namidark: first of all, your syntax for 'if' is still C style. you want (if (null? x) 0 ...) 15:52:34 so ditch the parens on 5 and 8? 15:52:46 qu1j0t3: mark_weaver ijp Something like this: http://paste.pocoo.org/show/578015/ 15:52:50 the other thing is that in two places, you are wrapping an extra set of parens for grouping, but remember that in lisp each set of parens implies a procedure call. 15:53:32 gremmachook: to set j, just use an inner LET 15:53:45 aff, but you don't even need that. 15:53:48 gremmachook: what's the purpose here? 15:53:48 mark_weaver: so this? http://pastie.org/private/m3vhmhv2qcja3i8offjw5q 15:53:57 qu1j0t3: Yes, but I was wondering if that was possible in the let itself? 15:53:59 gremmachook: explain in english 15:54:01 namidark: well, there you need to _sequence_ the 'display' and the addition into a single expression for the 'else' part of the 'is', so you need: (begin (display ...) (+ ...)) 15:54:02 gremmachook: not code 15:54:05 bah nvm if i removed the wrong quotes 15:54:23 namidark: and you have an extra set of parens around the body of the entire procedure.. 15:54:45 gremmachook: explain in english what values i and j should take in the loop. you can always do what you do here, call loop with (i i-1) 15:54:52 namidark: so scrap the parens on 2 and 10. 15:54:54 gremmachook: if j is supposed to be invariantly i-1 15:55:03 qu1j0t3: Right, I was wondering if the parameters to loop can be used to form another parameter. For example, j is created fromi. 15:55:13 gremmachook: yes, by doing what you do here. 15:55:29 But this gives me an error on MIT Scheme. 15:55:36 mark_weaver: so now i'm down to this: http://pastie.org/private/uxhwuupfxkrwsobu55vjmw 15:55:37 ?* 15:55:38 is j supposed to be i-1? 15:55:43 on each iteration? 15:55:55 qu1j0t3: Doesn't matter, I am just trying to understand if that is possible if at all? 15:55:57 gremmachook: you can count with any number of parallel variables 15:56:06 gremmachook: no, it DOES matter, because it's not clear WHAT you want to do. 15:56:11 (since the code isn't correct) 15:56:19 is j supposed to be i-1? 15:56:22 namidark: change "if(" to "(if" 15:56:26 qu1j0t3: I quickly made that up to show you an example. 15:56:30 gremmachook: an example of WHAT? 15:56:38 mark_weaver: bingo! :D 15:56:40 mark_weaver: ty :) 15:56:41 gremmachook: what is the intention -- explain in english what values i,j take on each iteration 15:56:46 namidark: welcome :) 15:56:50 gremmachook: e.g., is j = i-1 on each iteration? 15:57:11 gremmachook: if so, you can use named LET for this pattern easily 15:57:14 qu1j0t3: Of whether 'j' can be created from 'i' in the let declaration? 15:57:24 gremmachook: no, you would use an inner LET 15:57:31 gremmachook: OR, use the named LET and pass j 15:57:31 qu1j0t3: Right, that's it. 15:57:38 see? 15:57:42 2 options 15:57:54 I'm unsure of what the named let is. Can you give an example 15:57:57 you used one. 15:58:03 I understand that j can be created in another inner let. 15:58:04 (let loop ((i 1) ... ) 15:58:08 ^^ this is the named LET. 15:58:25 if you literally want to 'compute j from i', then use an inner LET, but you can also do it with the named LET 15:58:33 namidark: another way to do the same thing is (apply + (append x y)) :) 15:58:33 but only by passing in the new value of j 15:58:45 So, from I understand, (let loop ((i 1) (j (- i 1))) ...) is correct? 15:58:49 no. 15:58:52 it is not. 15:58:59 let me paste the two options, gremmachook 15:59:19 qu1j0t3: Sure, that'd be helpful. I am finding it hard to follow the flow here. 15:59:19 gremmachook: but first, please tell me the termination condition of the loop 15:59:40 gremmachook: (= i 10) for example? 15:59:47 qu1j0t3: Give any condition you want, I only want to understand the syntax. 15:59:49 ok 15:59:51 stand by 16:00:32 -!- choas [~lars@d83-187-168-138.cust.tele2.at] has quit [Quit: leaving] 16:02:05 ijp` [~user@host86-151-79-183.range86-151.btcentralplus.com] has joined #scheme 16:02:13 gremmachook: something like this http://paste.pocoo.org/show/578020/ 16:03:01 gremmachook: i hope that's what you're looking for? i prefer the first tbh 16:03:28 gremmachook: in option 2, you need a (begin ...) or something around the 'else' part of the 'if'. 16:03:38 -!- ijp [~user@host86-183-35-191.range86-183.btcentralplus.com] has quit [Ping timeout: 246 seconds] 16:03:47 mark_weaver: ah yes. 16:03:52 mark_weaver: let me correct that 16:03:55 (sorry, I meant to send that to qu1j0t3 :) 16:04:15 mark_weaver: gremmachook http://paste.pocoo.org/show/578021/ 16:04:17 -!- ijp` is now known as ijp 16:05:06 gremmachook: if you're looking for loop idioms, you can use macros to get anythign you want: http://www.telegraphics.com.au/svn/puzzles/trunk/quad/ch5_for.scm 16:06:06 qu1j0t3: Assume that `i` that you have set to 1 initially in the second is the result of a big computation and j is the same calculation except that it's one less than the calculation for `i`. So, I could say (let loop ((i ) (j (- 1))) ... ), which is completely correct. But what if I want to avoid writing the part twice? Can't I just say (j (- i 1)) ? 16:06:17 call a function 16:06:27 well, 16:06:32 in that case you used an inner LET 16:06:51 use* 16:06:52 qu1j0t3: Yes, I was wondering if I could do a (j (- i 1)) instead of an inner let? 16:06:55 gremmachook: just like the top example. 16:06:58 why? 16:07:05 no, you can't do that in named LET. 16:07:16 gremmachook: in named LET, the parameters are bound to those passed by the caller. 16:07:22 Right, that's what I wanted to know. 16:07:28 gremmachook: so you use an inner LET. 16:07:38 Right, that makes it clear. 16:07:38 gremmachook: if you find that ugly, develop a macro to sugar it 16:07:54 might be interesting, if you want some comparisions of different ways to write loops 16:07:59 Well, I'm still learning Scheme, haven't reached Macros yet. 16:08:18 then balance that out with some syntactic umami 16:08:22 ijp: :) 16:08:24 So I'll probably use the inner let for now and revisit this later when I learn macros. 16:08:29 gremmachook: sure. 16:08:36 Thanks for you help guys. 16:08:40 ijp: I think it's _semantic_ umami 16:08:41 s/you/your/ 16:08:45 gremmachook: always welcome. 16:10:36 mark_weaver: is multiplication not able to be called recursively like this? http://pastie.org/private/hju57asta7yzaiot2q6jdq 16:10:38 -!- jewel [~jewel@196-209-224-252.dynamic.isadsl.co.za] has quit [Ping timeout: 246 seconds] 16:11:31 namidark: what seems wrong with that? 16:12:07 *qu1j0t3* waves a rubber chicken 16:12:08 attila_lendvai1 [~attila_le@176.222.155.205] has joined #scheme 16:12:08 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Disconnected by services] 16:12:08 offby1: well when passing in (1 2 3) (0 0 0) I should be getting 3.7416 but I get 0 16:12:44 multiplication by zero is always zero 16:12:52 namidark: syntactically it is fine (although very hard to read because of the non-standard formatting) 16:12:52 1 is the correct base case 16:13:01 bah 16:13:10 wot ijp said 16:13:13 namidark: however, the problem is that you want (+ (* ...) (distance ...)) 16:13:33 probably that too 16:13:45 namidark: are you aiming to achieve the correct euclidean distance here? 16:13:56 mark_weaver: yup 16:13:57 namidark: I suspect you're a newbie, so this may be TMI, but: you've basically reinvented "fold" and "reduce". Ideally you'd _use_ those functions rather than reinventing them 16:14:10 namidark: btw, the easy way to do it is this: (apply + (map * x y)) 16:14:16 offby1: my head still hurts from all the parens :p 16:14:50 namidark: sorry, that's wrong... that's the dot product :) 16:15:14 namidark: (apply + (map square (map - x y))) 16:15:57 rudybot: (let ([xs (list 1 2 3)][ys (list 0 0 0)]) (sqrt (for/fold ([d 0]) ([x xs][y ys]) (+ d (sqr (- x y)))))) 16:15:57 *offby1: ; Value: 3.7416573867739413 16:16:03 thass how I'd do it 16:16:27 of course "for/fold" is specific to racket. 16:16:29 mark_weaver: offby1 k ill try that 16:16:33 ahh nvm im using mit-scheme 16:16:36 but there's probably some SRFI with something similar. 16:17:04 mark_weaver: the map one gives me 14 16:17:04 dous_ [~dous@unaffiliated/dous] has joined #scheme 16:17:13 the point is: recognize that a) you're "folding"; b) there are functions already written that do "folding" for you; c) your code gets simpler when you let someone else do half the work :) 16:17:58 rudybot: so who did the other half of you then? 16:17:58 ijp: The marathons, the first half life, the first halo, were all awesome FPSes 16:18:15 namidark: but to do it without the use of higher-order procedures like 'map': 16:18:15 (define (distance a b) 16:18:15 (define (square x) (* x x)) 16:18:15 (if (null? a) 16:18:17 0 16:18:21 (+ (square (- (car a) (car b))) 16:18:24 (distance (cdr a) (cdr b))))) 16:18:30 add`__ [~user@2001:16d8:cc2c:0:21a:4dff:fe5e:803a] has joined #scheme 16:18:41 -!- dous [~dous@unaffiliated/dous] has quit [Ping timeout: 246 seconds] 16:20:22 mark_weaver: thanks but I'm still getting 14 :\ on mine 16:20:33 this is portable 16:20:35 rudybot: (let loop ([sum-of-squares 0] [xs (list 1 2 3)] [ys (list 0 0 0)]) (cond ((or (null? xs) (null? ys)) (sqrt sum-of-squares)) (else (loop (+ sum-of-squares (sqr (- (car xs) (car ys)))) (cdr xs) (cdr ys))))) 16:20:35 *offby1: ; Value: 3.7416573867739413 16:20:43 namidark: as offby1 points out, once you get the hang of scheme and its higher-order procedures, you can do things much more easily and concisely, but for now you should probably stick with the basics :) 16:20:55 namidark: 14 for what inputs? 16:21:44 offby1: it's not actually portable because of the square brackets. also, remember that's namidark is just starting out. 16:21:57 namidark: right, I forgot to 'sqrt' the final sum :) 16:22:04 mark_weaver: ah 16:23:23 rudybot: (define (distance x y) (define (sum-of-squares x y) (if (null? x) 0 (+ (* (- (car x) (car y)) (- (car x) (car y))) ( sum-of-squares (cdr x) (cdr y) )))) (sqrt (sum-of-squares x y))) 16:23:23 *offby1: Done. 16:23:36 rudybot: (distance (list 1 2 3) (list 0 0 0)) 16:23:37 *offby1: ; Value: 3.7416573867739413 16:24:06 namidark: how about this: 16:24:06 (define (distance a b) 16:24:06 (define (square x) (* x x)) 16:24:09 (define (dist^2 a b) 16:24:12 (if (null? a) 16:24:16 0 16:24:19 (+ (square (- (car a) (car b))) 16:24:22 (dist^2 (cdr a) (cdr b))))) 16:24:25 (sqrt (dist^2 a b))) 16:24:40 That worked offby1 and I understand it haha 16:24:49 How do you guys keep track of all these parens :(? 16:24:58 I don't. My editor does :) 16:25:07 namidark: what editor do you use? 16:25:53 mark_weaver: vim has matching parens which is somewhat helpful, but its formatting barely works 16:26:11 ijp++ 16:26:27 "I don't keep track of parentheses, Mr Gittes; my editor does." 16:26:29 everyone else i bet uses emacs :)? 16:26:38 namidark: ayup 16:26:58 namidark: emacs is a lot nicer for editing lisp, but vim has a variable you can set that helps.. 'lisp' I think? 16:27:32 I'll have to look into it 16:27:47 vim has a paredit script 16:28:34 namidark: if you get frustrated, remember that Paul Graham uses vi 16:28:47 ;) 16:29:16 lol 16:30:06 namidark: set lisp autoindent showmatch 16:30:26 mark_weaver: nice :) that worked 16:31:12 :) 16:32:17 excellent! 16:32:31 thanks again for the help mark_weaver offby1 16:33:49 anytime! :) 16:34:32 \o/ 16:34:37 /o\ 16:41:23 -!- toekutr [~user@50-0-51-2.dsl.static.sonic.net] has quit [Remote host closed the connection] 16:42:37 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Remote host closed the connection] 16:43:57 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Quit: WeeChat 0.3.7] 16:46:51 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 16:51:41 -!- jaimef [jaimef@dns.mauthesis.com] has quit [Quit: ZNC - http://znc.in] 16:51:42 -!- noam [~noam@37.142.141.69] has quit [Read error: Connection reset by peer] 16:52:47 noam [~noam@37.142.141.69] has joined #scheme 16:52:54 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 17:00:14 adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has joined #scheme 17:01:13 ghost_ [~ghost@2001:da8:d800:101:216:d3ff:feae:1b91] has joined #scheme 17:02:45 -!- gremmachook [u1735@gateway/web/irccloud.com/x-qwmjjdvkbhvzznjj] has left #scheme 17:04:53 djcb [~user@a88-114-95-13.elisa-laajakaista.fi] has joined #scheme 17:09:28 -!- cdidd [~cdidd@95-26-94-174.broadband.corbina.ru] has quit [Remote host closed the connection] 17:11:25 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 276 seconds] 17:13:47 -!- dous_ [~dous@unaffiliated/dous] has quit [Remote host closed the connection] 17:16:07 dous [~dous@unaffiliated/dous] has joined #scheme 17:17:10 homie` [~levgue@xdsl-87-79-199-7.netcologne.de] has joined #scheme 17:18:04 realitygrill [~realitygr@76.226.203.43] has joined #scheme 17:19:52 -!- homie [~levgue@xdsl-78-35-164-149.netcologne.de] has quit [Ping timeout: 276 seconds] 17:23:45 -!- ghost_ [~ghost@2001:da8:d800:101:216:d3ff:feae:1b91] has quit [Quit: ] 17:24:12 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 17:29:54 keenbug [~daniel@p4FE399A2.dip.t-dialin.net] has joined #scheme 17:38:04 -!- ThePawnBreak [Cristi@94.177.108.25] has quit [Ping timeout: 276 seconds] 17:38:43 can you access a repl from vim? 17:40:25 -!- keenbug [~daniel@p4FE399A2.dip.t-dialin.net] has quit [Ping timeout: 253 seconds] 17:40:28 bfgun: I'd guess you could do it with http://code.google.com/p/conque/ 17:41:32 -!- drizzd [~drizzd@80.123.242.182] has quit [Ping timeout: 265 seconds] 17:41:49 mark_weaver, cool 17:44:35 why is this procedure not working correctly, (define (printx y x) (begin (display y) (newline) (display x) (newline) x)) 17:44:46 bfgun: what error do you get. 17:44:59 bfgun: also, in chicken, (print...) is shorthand for (display...) (newline) 17:45:05 i have a (for-each (...) something), and when i do (for-each (...) (print "thevar:" something)) it dies 17:45:21 maybe that's the problem 17:45:26 i'll change the name of the procedure 17:45:32 1 seg 17:45:50 arcfide [~arcfide@c-98-223-204-153.hsd1.in.comcast.net] has joined #scheme 17:45:52 AAAAAAHHH 17:45:58 so much time with this error 17:46:07 qu1j0t3++ 17:46:54 bfgun: looks like you're using 'for-each' incorrectly. Its first parameter should be a procedure of one argument, and the second parameter is the list to iterate over. 17:47:17 mark_weaver, the problem was like qu1j0t3 said: i was trying to redefine the print procedure 17:47:18 bfgun: e.g. (for-each (lambda (x) (display x)) xs) 17:47:24 -!- copumpkin is now known as OestrusBunny 17:47:28 i didn't know it was previosuly defined 17:47:42 mark_weaver, no, i just want to intercept whatever is happening and print the variable but leave the flow of execution unaltered 17:47:45 i'm debugging a procedure 17:47:56 i want to intercept the second argument of the for-each 17:48:08 so i wanted to print and leave the variable alone... but it only printed ;) 17:49:57 bfgun: ah okay. also, you don't need the 'begin' for the main body of a procedure. e.g. you can do (define (foo x) a b c) instead of (define (foo x) (begin a b c)) 17:50:07 cool 17:50:17 (there's an implied 'begin' in various places, including there) 17:51:18 you also don't need 'begin' within 'let', 'let*', 'letrec', or within 'cond' or 'case' clauses.. 17:51:45 awesome 17:51:46 -!- OestrusBunny is now known as copumpkin 17:53:22 is there a way to program android apps with scheme? 17:53:22 rudybot: eval (cond (#t (define a 0) a)) 17:53:22 ski: your scheme sandbox is ready 17:53:22 ski: ; Value: 0 17:53:54 hmmm, that ain't right 17:55:33 bfgun: Use Kawa 17:56:19 is that very different from chicken? 17:57:01 bfgun: Kawa compiles scheme to java bytecodes. "Google App Inventor" uses Kawa to execute scheme on android from a graphical description that's similar to the one used by Scratch. (It's for kids) 17:58:36 bfgun: if you stick to standard scheme constructs and don't use call-with-current-continuation, you should probably be okay. 17:58:47 naaah!!! no call/cc? :p 17:59:45 I think I'm going to blog about call/cc soon 17:59:46 bfgun: actually, I think Kawa _does_ have call/cc.. 17:59:54 :)) 18:00:15 escape continuations maybe, but I don't think it has call/cc 18:00:40 call/ec 18:00:52 ski: that example is not standard scheme, btw. cond clauses make an implied 'begin', but not an implied (let () ...) 18:01:55 ijp: indeed, you are correct. (never used Kawa myself :) 18:02:07 see https://www.gnu.org/software/kawa/Restrictions.html 18:02:52 rudybot: yech, tail call elimination is off by default 18:02:52 ijp: yech 18:03:30 mark_weaver : yes, i know :) 18:03:30 *koff* Scala 18:04:23 *ijp* points his blunderbuss in qu1j0t3's direction 18:04:36 *qu1j0t3* blunders off 18:08:25 rudybot: help 18:08:26 mark_weaver: bug ..., help [], version, quote, source, url, seen , uptime, t8 ..., init [], eval ..., give ..., apropos ..., desc , doc 18:09:34 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 18:09:36 is there a way to make rudybot associate a keyword with arbitrary text, such that we can retrieve it later ? 18:10:19 -!- tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 18:10:43 (like sneek's " is " functionality on #guile) 18:11:35 -!- tom_i [~thomasing@ingserv.demon.co.uk] has quit [Ping timeout: 272 seconds] 18:13:19 I don't think so 18:14:02 although if you tell fsbot it, there is a not too bad chance of rudybot repeating it :) 18:14:15 (assuming offby1 hasn't cleaned the db) 18:14:54 fsbot? 18:15:02 the bot on #emacs 18:15:07 ah 18:15:29 -!- pygospa [~Pygosceli@kiel-4d06728e.pool.mediaWays.net] has quit [Disconnected by services] 18:15:39 pygospa [~Pygosceli@kiel-5f76838a.pool.mediaWays.net] has joined #scheme 18:15:39 recently they've been eerily similar to each other... 18:15:53 -!- dous [~dous@unaffiliated/dous] has quit [Remote host closed the connection] 18:16:26 I don't really want my first appearance on #emacs to be used to tell the bot how to configure 'vim' to edit lisp code :) 18:16:40 -!- tupi [~david@177.31.167.14] has quit [Quit: Leaving] 18:20:31 -!- weinholt [weinholt@debian/emeritus/weinholt] has quit [] 18:20:35 kk`` [~kk@77.107.164.131] has joined #scheme 18:20:58 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Ping timeout: 276 seconds] 18:26:16 dous [~dous@unaffiliated/dous] has joined #scheme 18:26:28 -!- dous [~dous@unaffiliated/dous] has quit [Remote host closed the connection] 18:31:04 is there a common name for this function: (define (apply-with x) (lambda (f) (f x))) 18:31:26 (ie, useful when you map a parameter to a list of functions 18:32:00 consider this signature: a->list (a->b) -> list b 18:35:39 and for (lambda (x) (set! x (+ x 1))) 18:39:05 albacker_ [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 18:39:17 -!- albacker [~eni@unaffiliated/enyx] has quit [Read error: No route to host] 18:39:17 -!- attila_lendvai1 [~attila_le@176.222.155.205] has quit [Quit: Leaving.] 18:40:50 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 18:44:11 bfgun: (lambda (x) (set! x (+ x 1))) is a no-op 18:44:13 -!- noam [~noam@37.142.141.69] has quit [Read error: Connection reset by peer] 18:44:38 noam [~noam@37.142.141.69] has joined #scheme 18:44:42 bfgun: arguments are passed by value in scheme, so there you are incrementing the local variable only. 18:45:14 -!- albacker_ is now known as albacker 18:45:18 -!- albacker [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Changing host] 18:45:18 albacker [~eni@unaffiliated/enyx] has joined #scheme 18:45:21 -!- albacker is now known as eni 18:45:38 mmm, lambda (x) (set! (x) (+ x 1)) ? :P 18:46:25 bfgun: I don't know of a common name for your 'apply-with', but with srfi-26, (cut <> x) is equivalent to (lambda (f) (f x)) 18:47:18 rudybot: eval (lambda (x) (set! (x) (+ x 1))) 18:47:18 ski: error: #:1:18: set!: not an identifier at: (x) in: (set! (x) (+ x 1)) 18:47:46 *bfgun* downloads srfi 26 18:47:51 bfgun: so (map (cut <> x) funcs) will do the job you want 18:48:20 cool 18:49:54 -!- realitygrill [~realitygr@76.226.203.43] has quit [Ping timeout: 250 seconds] 18:51:46 realitygrill [~realitygr@76.226.210.222] has joined #scheme 18:59:58 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 19:02:45 -!- realitygrill [~realitygr@76.226.210.222] has quit [Ping timeout: 248 seconds] 19:04:14 realitygrill [~realitygr@adsl-76-226-110-91.dsl.sfldmi.sbcglobal.net] has joined #scheme 19:05:21 How would I keep track of a variable locally to increment it? Would I need to be using set!? 19:06:57 namidark: you could do something like this: (let ((counter 0)) (map (lambda (x) (set! counter (+ counter 1))) xs)) 19:07:35 or maybe I'm thinking about it wrong; I need to pass a variable to a recursive function but only increment it if a condition is met, so I assume I need to increment it before passing it back to the function right? 19:08:15 namidark: you can use macros to make things nicer, for example: 19:08:15 (define-syntax inc! 19:08:15 (syntax-rules () 19:08:15 ((inc! x) 19:08:18 (set! x (+ x 1))))) 19:08:46 and then: (let ((counter 0)) (map (lambda (x) (inc! counter)) xs)) 19:09:03 though actually it would be better to use 'for-each' here. 19:10:51 namidark: instead of passing in the value of the variable itself, you could pass it an incrementer procedure. 19:11:10 mark_weaver: gonna play with that inc syntax nwo :) 19:11:19 because i have multiple counters to track and that seems pretty nice 19:11:43 -!- homie` [~levgue@xdsl-87-79-199-7.netcologne.de] has quit [Read error: Connection reset by peer] 19:14:14 namidark: for example: 19:14:14 (define (count-zeroes increment xs) 19:14:14 (for-each (lambda (x) (if (zero? x) (increment))) 19:14:14 xs)) 19:14:17 19:14:20 (let ((counter 0)) 19:14:24 (count-zeroes (lambda (x) (inc! counter)) 19:14:27 '(0 1 2 3))) 19:14:30 19:15:45 :\ why does read-char and peek-char return different letters? 19:16:37 namidark: huh? if there's a character available, they should return the same thing. 19:17:16 -!- MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has quit [Read error: Connection reset by peer] 19:17:38 MrFahrenheit [~RageOfTho@users-55-233.vinet.ba] has joined #scheme 19:18:00 s/(lambda (x) (inc! counter))/(lambda () (inc! counter))/ 19:18:58 does calling read-char multiple times keep popping letters off the stack? 19:19:37 namidark: peek-char returns what read-char will return if called 19:19:54 qu1j0t3: so peek if i dont wanna pop it off? 19:19:56 namidark: read-char consumes from the input stream 19:19:58 namidark: yes 19:20:01 k 19:20:07 namidark: i wouldn't think of it as a stack, though. 19:20:17 Sweet :) 19:20:19 namidark: a queue would be closer 19:20:21 queue 19:23:53 tomobrien [~tomobrien@host-92-2-79-163.as43234.net] has joined #scheme 19:24:11 and char-whitespace? only counts #\space ? 19:25:55 soveran [~soveran@186.19.214.247] has joined #scheme 19:26:07 homie [~levgue@xdsl-87-79-199-7.netcologne.de] has joined #scheme 19:29:35 namidark: normally whitespace includes a number of characters other than space. 19:29:45 ah new lines and such too? 19:29:53 namidark: yes, and horizontal tab. 19:34:41 -!- homie [~levgue@xdsl-87-79-199-7.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 19:40:30 namidark: and form feed. 19:41:15 With Unicode support, probably everything with the whitespace property 19:42:49 indeed 19:43:04 it's so exciting! 19:47:22 teiresias [~teiresias@archlinux/trusteduser/teiresias] has joined #scheme 19:59:14 Aune [~Arne@h-152-28.a163.priv.bahnhof.se] has joined #scheme 20:05:04 evildaemon [~user@50-35-181-162.evrt.wa.frontiernet.net] has joined #scheme 20:05:08 -!- kniu [~kniu@pool-71-182-247-225.pitbpa.east.verizon.net] has quit [Ping timeout: 246 seconds] 20:05:36 To anyone who's seen the "inventing on principle" talk: Is there an editor like that actually out there? 20:06:18 I doubt there is one beyond some prototype 20:07:11 RomyRomy [~stickycak@207.239.107.3] has joined #scheme 20:07:32 -!- RomyRomy [~stickycak@207.239.107.3] has quit [Client Quit] 20:07:40 -!- antithesis [~antithesi@81.71.110.7] has quit [Quit: yes leaving] 20:18:31 kniu [~kniu@pool-74-98-44-132.pitbpa.east.verizon.net] has joined #scheme 20:20:44 -!- kk`` [~kk@77.107.164.131] has quit [Quit: WeeChat 0.3.7] 20:21:30 -!- djcb [~user@a88-114-95-13.elisa-laajakaista.fi] has quit [Ping timeout: 260 seconds] 20:29:41 -!- adu [~ajr@pool-173-66-5-43.washdc.fios.verizon.net] has quit [Quit: adu] 20:31:09 Is there some idiom for appending to a list of lists? Like i have (foo '('())) and then I want to go make foo[0] be '(0 1) and then after a condition, grow the list to be '('(0 1) ()) and then start appending elmements to that second inner list 20:34:25 namidark: I don't understand anything. You probably have too many quotes. 20:34:52 evildaemon: It seems neat, but also seems like you'd have to re-engineer it for every context. 20:35:04 I wonder if it's possible to develop a generic framework for building such editors. 20:35:41 DrRacket's editor does something similar if you count online syntax expansion+checking. 20:35:58 namidark: you should read r5rs. Have a look at set-car! and set-cdr!. 20:37:25 brcrth [~user@unaffiliated/brcrth] has joined #scheme 20:38:38 pjb: thanks ill look at that 20:42:11 namidark: 'foo is a short-hand for (quote foo), which evaluates to the value foo. '('()) is thus a shorthand for (quote ((quote ()))), which evaluates to ((quote ())), which is probably not what you want. 20:42:44 namidark: put more simply, ' quotes everything within the datum that follows, so you normally don't want any nested quotes in there. 20:43:04 Is scheme still a good "first language"? I'm really looking forward to go through all SICP or even HTDP, but my fear is that it's kinda "dated". Also, I have no experience in programming other than some simple bash scripts one-liners. 20:43:45 brcrth: imho, it's not dated. in fact, other popular languages are asymptotically approaching the semantics of scheme over time. 20:45:29 mark_weaver: Great! And which implementation? Racket? 20:45:56 brcrth: Racket's a great implementation, especially for learning, yes. 20:46:57 and I highly recommend SICP. I wish I had read it much earlier than I did. It fundamentally changed the way I think about programming. 20:47:06 mark_weaver: Can I use it with Emacs (integrating the buffer and the REPL, in some SLIME fashion) 20:47:56 jewel [~jewel@196-209-224-252.dynamic.isadsl.co.za] has joined #scheme 20:47:57 mark_weaver: That's why I want to start with it. Also, it's more like a hobby thing, I always wanted to program but never tried. 20:48:06 brcrth: yes, Racket can be used with Emacs. Check out http://www.neilvandyke.org/quack/ 20:48:21 how does someone with no programming experience have such particular tastes about editing? :P 20:49:47 ijp: I never programmed, but I read a bunch of articles/stuff about it. 20:50:05 adu [~ajr@64.134.102.121] has joined #scheme 20:50:50 ijp: Emacs feels the right choice since it's almost a Lisp Machine (you can argue that Smalltalk is much more closer). 20:51:01 brcrth: HtDP is also helpful, but if you're eager to read SICP I recommend just reading maybe the first 4 chapters of HtDP 2nd edition. 20:51:07 brcrth: I'm reading SICP as in info doc in Emacs and doing the exercises alongside it 20:51:14 *an 20:51:19 brcrth: agreed, emacs is definitely the editor of choice for scheme or lisp programming. 20:51:20 tomobrien: that sounds fun 20:52:00 adu: I'm having a great time :) 20:52:06 tomobrien: I got a nice formated pdf with vector images and the formulas converted to LaTeX notation. It's really nice. 20:52:11 -!- eni [~eni@unaffiliated/enyx] has quit [Quit: .] 20:53:17 tomobrien: SICP is a great reference for building interpreters and/or compilers 20:53:45 but I wish it had more about source-to-source transpilers 20:54:02 Also, I like the "child-focused" approach of Racket, Squeak, Scratch. My first idea was to buy Conrad Barski's Land of Lisp, but then I was into some trouble about which Lisp interpretation... 20:54:43 brcrth: The SICP video lectures are also available online. They're from 1986, but highly recommended nonetheless. (the authors were _way_ ahead of their time; the mainstream still has yet to catch up with them :) 20:54:54 All my programming-interest revival is caused by Notch's new game 0x10c 20:55:14 adu: I've heard that. I've only recently got back into programming after spending nearly 7 years in academia, and I'm trying to go about it "the right way" (whatever that means) 20:55:25 mark_weaver | and I highly recommend SICP. I wish I had read it much earlier than I did. It fundamentally changed the way I think about programming. // +1 20:55:48 brcrth: Hal Abelson, one of the authors of SICP, recently created a Scratch-like system called Google App Inventor, which uses a very similar graphical interface, but underneath it is based on Scheme (whereas Scratch is based on Smalltalk) 20:56:03 tomobrien: "the right way" is the kind that gets you programming, a lot. The key to success is lots of practice at failing :) 20:57:05 ijp: then I can't wait, I've written dozens of parsers, and I'm working on my second scheme interpreter now 20:57:17 my first scheme was kinda lame 20:57:57 ;):): 20:57:59 adu: Whoa. 20:58:26 my first scheme was written entirely in JS 20:58:33 my current scheme is written in Go 20:59:00 I would imagine my N-th scheme will be written in scheme 20:59:32 rudybot: you're not a failure, just a success in training. 20:59:33 ijp: In Helmand province, American instructors appeal to the Afghans' sense of masculinity in urging them to be cautious. "They are very much a society of honor and shame," said retired Marine senior gunner Terry Walker, who runs the training camp. "Either one works for me." 21:00:16 okay... 21:00:36 I thought rudybot was a boy 21:00:39 s/boy/bot/ 21:00:48 jcowan [~John@cpe-66-108-19-185.nyc.res.rr.com] has joined #scheme 21:00:53 it is a bot 21:01:35 brcrth: what's whoa? 21:02:55 hoi 21:03:00 adu: The fact that you have built your own scheme interpreter. I think it's quite a bit complex, don't? (as I said, I'm not a programmer so this can be totally silly) 21:03:23 It's a tradition. 21:03:46 One I intend to uphold by writing my own JavaScript interpreter in Scheme. 21:03:46 brcrth: building an interpreter is in general complex, but scheme makes it not so complex 21:04:06 brcrth: if you want to check it out: https://github.com/andydude/droscheme 21:04:22 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 21:04:46 until you've written one, interpreters and compilers seem like black magic 21:04:59 -!- jewel [~jewel@196-209-224-252.dynamic.isadsl.co.za] has quit [Ping timeout: 246 seconds] 21:05:31 ijp: since I haven't implemented (define-syntax) yet, it still seems like black magic to me 21:05:57 adu: Go looks like a "nicer" (from the syntax perspective) C. 21:06:36 brcrth: it is, but Go has GC and dynamic types, which C doesn't 21:06:46 of course, the things compiler writers and cpu designers do for speed are still black magic :) 21:06:46 adu: GC? 21:06:53 garbage collection 21:06:53 brcrth: garbage collection 21:07:16 Time for Google 21:07:36 There's a Compilers course starting in the near future at coursera.org 21:08:09 brcrth: http://en.wikipedia.org/wiki/Garbage_collection_(computer_science) 21:08:18 tomobrien: heh, I'm taking one of those courses right now 21:08:41 brcrth: another advantage to Go types over C types is separation of name and type i.e. C's (char buffer[255]) is written (buffer [255]char) in Go 21:08:44 mark_weaver: That's what I'm reading right now. 21:09:41 adu: Now that's the thing that I never wrapped my head into: what is a typed language? I read the concept many times but couldn't grasp it. 21:09:42 ijp: nice, I'm not quite at that level yet (my background is mathematics). Hopefully I'll be a bit more up to speed when it starts, though the Intro to Algorithms course has been fun so far 21:10:31 brcrth: every language I can think of is typed, it's just a matter of what kind of typed 21:10:55 even assembly language is typed 21:11:19 brcrth: http://en.wikipedia.org/wiki/Type_system 21:11:29 I was wondering if a DCPU-16 scheme was written yet. 21:11:50 evildaemon: yes, let me grab you the link 21:12:03 evildaemon: here: https://github.com/ecraven/dcpu16-scheme 21:12:35 -!- bfgun [~b_fin_g@r186-53-168-167.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 244 seconds] 21:12:54 brcrth: Thank you. 21:13:25 -!- shachaf [~shachaf@li227-219.members.linode.com] has left #scheme 21:14:19 I also realized that I found s-expressions much better than the usual arithmetic notation (+ 2 2) instead of 2 + 2 = 21:14:49 brcrth: anyways, the nice thing about scheme is that it can be broken down into read, eval, write (traditionally called print) 21:15:59 adu: Oh, yes. 21:16:34 brcrth: from my experience, print is easy (it took me about a day for droscheme), read is harder (it took about 3 days), and eval is harder (it took about a week), and ever since then, I've just been implementing builtin functions 21:17:06 adu: So you built it all in ~2 weeks? 21:17:34 brcrth: aside from builtin functions, yes 21:17:36 that's 7 times longer than he should have, if we take scheme48 as the standard :) 21:17:47 ijp: i know, i know 21:17:52 it's only my second scheme 21:18:01 brcrth: in the SICP video lectures, they write the entire code for a simple scheme interpreter on the blackboard. 21:18:11 adu: it's a joke, take your time 21:18:39 mark_weaver: Yeah, but 1 - I don't know nothing; 2 - I really suck at math. 21:19:22 dnolen [~user@p72-0-226-118-static.acedsl.com] has joined #scheme 21:19:29 brcrth: by the time you finish reading SICP, you'll be able to invent your own little languages, so that you can write your programs the way you want, whereas other languages are usually designed specifically for a particular programming style and force you to do it their way. 21:20:26 mark_weaver: Impressive. Really neat. 21:20:55 -!- Urchin [~urchin@unaffiliated/urchin] has quit [Ping timeout: 260 seconds] 21:22:56 -!- adu [~ajr@64.134.102.121] has quit [Quit: adu] 21:24:46 bfgun [~b_fin_g@r186-53-151-112.dialup.adsl.anteldata.net.uy] has joined #scheme 21:26:13 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 276 seconds] 21:26:46 CampinSam [~CampinSam@24-176-98-217.dhcp.jcsn.tn.charter.com] has joined #scheme 21:27:39 brcrth: As far as maths is concerned you might want to have a look at http://cs.ua.edu/500/Lehman_Leighton.pdf - I've read nothing but good things (though I've not spent a lot of time with it myself) 21:28:06 Myk267 [~myk@adsl-71-149-249-146.dsl.mtry01.sbcglobal.net] has joined #scheme 21:30:04 tomobrien: Thanks! I was thinking about going through all the lessons on Khan Academy, but I prefer text over video so this is a lot nicer. 21:31:13 brcrth: of course, whenever learning any skill, it is _crucial_ to do the exercises. if you just passively read or watch videos, your understanding will become increasingly superficial as your proceed. 21:32:00 mark_weaver: The reason that I stopped reading articles about it and started to (at least try to) do something. 21:32:05 -!- tessier [~treed@216.105.40.125] has quit [Changing host] 21:32:05 tessier [~treed@kernel-panic/copilotco] has joined #scheme 21:32:21 brcrth: if your math skills are weak, you might want to start with at least the first few chapters of HtDP, and move on to SICP later. 21:32:37 brcrth: You're welcome. Khan Academy is a great resource too. There's a lot of good maths resources out there. For example, if you've got ~20 hours to spare there are some really nice basic Linear Algebra lectures on MIT OCW 21:32:40 -!- copumpkin [~copumpkin@unaffiliated/copumpkin] has quit [Ping timeout: 260 seconds] 21:32:44 mark_weaver: Probably what I'll do. 21:33:09 copumpkin [~copumpkin@unaffiliated/copumpkin] has joined #scheme 21:35:20 tomobrien: Wow. Never heard of MIT's OCW. Lots of great stuff. 21:35:36 mark_weaver: indeed; in the book i picked up this week, "How to think like a mathematician," it comes out and admits that if you can't do the exercises, you don't understand the topic. 21:36:17 *mark_weaver* nods 21:36:55 Quite the opposite of what I do everyday. 21:37:20 drizzd [~drizzd@80.123.242.182] has joined #scheme 21:37:28 mark_weaver: i never appreciated that part when i was younger either. applies to TAOCP as well 21:37:39 mark_weaver: which i bought as soon as i finished high school 21:37:51 mark_weaver: but never penetrated enough, setting a bad lifelong habit that i'm trying to change now. 21:38:05 Also (but this is somewhat harder) make your own exercises when you encounter a new topic (I must admit I'm guilty of not doing this as often as I should) 21:38:11 tomobrien: yeah! 21:38:49 -!- arcfide [~arcfide@c-98-223-204-153.hsd1.in.comcast.net] has quit [Quit: Leaving] 21:41:28 qu1j0t3: yes, I've made the same mistake a few times. 21:44:21 It's easy to _believe_ that you understand something enough to skip the exercises, but often there are deficiencies in our understanding that can only be remedied by practice. 21:44:28 Euthydemus [~euthydemu@unaffiliated/euthydemus] has joined #scheme 21:45:20 and even if you _do_ understand, you may quickly forget the details if you don't reinforce it through exercise. 21:45:40 mark_weaver: exactly 21:45:50 mark_weaver: hubristic youth 21:46:10 mark_weaver: but in reality i didn't even /think/ I understood :D 21:46:26 :) 21:47:40 -!- drizzd [~drizzd@80.123.242.182] has left #scheme 21:47:49 right, sometimes it is simply impatience, or eagerness to move on and read new interesting things. 21:48:30 which leads to the old saying "there's never time to do it right, but always time to do it over" 21:50:44 i know this is OT... but i first encountered that saying in the pre-press trade. Every trade has its version. Now, including software. 21:51:51 -!- kniu [~kniu@pool-74-98-44-132.pitbpa.east.verizon.net] has quit [Ping timeout: 244 seconds] 21:52:22 yeah, I think that saying has nearly universal applicability. 21:57:30 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 21:58:43 mark_weaver: Pretty much. 21:59:20 mark_weaver: Sort of like Hoftstader's law. It always takes longer than expected, even taking into account hoftstadter's law. 21:59:36 hehe 22:00:22 Because theres no way he would ever write a piece that ddn't recurse somehow. 22:00:28 *didn't 22:02:28 rudybot: recursion makes everything better 22:02:28 ijp: 18 looping is not recursion in any shape or form. 22:02:48 rudybot: teach the controversy 22:02:48 qu1j0t3: I think the controversy was that kids hadn't tended to be written like that [much] until then 22:02:56 looping with a stack basically is 22:03:51 rudybot: where do you stand on pithy remarks? 22:03:51 ijp: as, a pithy stem; a pithy fruit. 22:04:06 *ijp* sighs 22:06:09 ,told ijp 22:06:14 oops, wrong channel :) 22:06:29 :) 22:07:34 ijp: But it does lead to a sort of mirror paradox where if you take into account the 'law' then you'll have to set your expectations further, but if you do then you're taking that part of the 'law' into account so you still have to set your expectations further. 22:08:03 Thus creating an infinite self-similar loop. 22:11:22 tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has joined #scheme 22:11:59 adu [~ajr@64.134.102.121] has joined #scheme 22:12:51 what's 0x10C? 22:13:23 rudybot: (number->string "10C" 16) 22:13:23 *offby1: error: number->string: expects type as 1st argument, given: "10C"; other arguments were: 16 22:13:29 rudybot: (string->number "10C" 16) 22:13:29 *offby1: ; Value: 268 22:13:59 rudybot: eval #x10c 22:13:59 ijp: your r5rs sandbox is ready 22:13:59 ijp: ; Value: 268 22:14:11 that too 22:14:45 :) 22:15:49 that is not a space ship: http://www.0x10cforum.com/gallery/m/4932873/detail/56189#pid=466444 22:16:06 brcrth: are you still here? 22:16:47 adu: yes 22:17:25 brcrth: were you talking about DCPU-16 earlier? 22:17:50 adu: yep 22:18:06 brcrth: how are you involved with it? 22:19:28 adu: I'm not involved, I just found it really cool and remembered a QBASIC game that I loved called Gorillas, so not I'm learning how to program so I can build things and have some fun :) 22:20:52 brcrth: you should try Blender 22:21:15 adu: the 3D program? 22:21:28 yes 22:22:26 Oh, the "build things" part is nothing to do with games. 22:22:49 The game only respawned my intentions to learn how to program. 22:24:03 brcrth: then scheme is probably the best place to start 22:24:44 then after learning enough languages, you'll start seeing parentheses in Java 22:25:09 -!- woonie [~woonie@nusnet-232-26.dynip.nus.edu.sg] has quit [Ping timeout: 245 seconds] 22:25:14 adu: yes, I'm playing with the repl for more than an hour trying abunch of different things. It's awesome. 22:25:41 also, scheme makes a great calculator 22:25:55 adu: I don't mind the parentheses, in fact, I like the lisp syntax (and Haskell's, I really like the guards in Haskell) 22:26:52 there are a lot of guards in Haskell, case guards, lambda guards, list comprehension guards, are you talking about one in particular? 22:27:32 Hmm, the ones that stats with: | 22:27:54 brcrth: that describes the first two, list comprehension guards start with , 22:28:29 but even those, ultimately start with | 22:28:46 The first with | and the rest with , 22:28:51 yes 22:29:38 Of course I was talking about just the aesthetics, I don't know if they're good or not in terms of syntax. I just find it pretty. 22:29:38 brcrth: Haskell is definitely another language very much worth learning, but probably not a good one to start with. 22:31:01 mark_weaver: It'll be my second language for sure. The only reason it's not the first one is because the Learn You a Haskell for Great Good book have the same advice as yours. 22:31:38 brcrth: sounds like a great plan :) 22:32:55 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Quit: Lost terminal] 22:33:11 -!- adu [~ajr@64.134.102.121] has quit [Ping timeout: 244 seconds] 22:38:10 homie [~levgue@xdsl-87-79-199-7.netcologne.de] has joined #scheme 22:42:17 -!- mmc1 [~michal@178-85-63-71.dynamic.upc.nl] has quit [Ping timeout: 246 seconds] 22:42:30 -!- gravicappa [~gravicapp@ppp91-77-180-19.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 22:44:07 brcrth: Standard ML is also a potential stepping stone from Scheme to Haskell 22:45:07 adu [~ajr@64.134.102.121] has joined #scheme 22:45:09 stlifey [~stlifey@116.26.27.25] has joined #scheme 22:46:50 is there any similar function to str_split/str_tok from php/c in scheme? 22:49:30 qu1j0t3: ML or OCaml? (or they're different?) 22:49:31 namidark: SRFI 13 has 'string-tokenize' and several other relevant procedures. 22:49:51 mark_weaver: i take it srfi is another implementation diff than mit? 22:49:55 brcrth: Ocaml would probably be just as good; they are quite similar. 22:50:18 brcrth: fairly simple functional languages with type inference and pattern matching. 22:50:33 brcrth: and there are good texts floating around like ML for the Working Programmer, Applicative High-Order Programming 22:50:34 namidark: SRFIs are common interfaces that are implemented in several different schemes. 22:50:42 brcrth: I got disconnected 22:53:18 qu1j0t3: Higher Order Perl have a lot of praise (never read it, tough). not only for people who like/use Perl but it's a good "functional programming best practices". 22:53:26 s/have/has 22:54:06 brcrth: i would say that it covers the same ground as functional texts aimed at other languages. 22:54:23 brcrth: the Perl woudl only get in your way if you didn't plan to use Perl. 22:54:53 brcrth: apart from LYAHFGG there is 'Haskell - the Craft of Functional Programming' 22:57:37 qu1j0t3: Oh sure.This is all for the future since I'm on the very beginning. 23:10:22 asumu: I just bumped your SO rep to 1000. Congrats! :-D 23:11:21 -!- wollw [~davidsher@75-101-85-170.dsl.dynamic.sonic.net] has quit [Quit: Lost terminal] 23:12:05 wollw [~davidsher@75-101-85-170.dsl.dynamic.sonic.net] has joined #scheme 23:14:40 brcrth: FWIW, I still recommend SICP as a starting point, before moving onto other learning resources or languages. 23:14:51 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 23:16:26 With other languages, the core concepts are often obscured or distorted by the complexities and idiosyncrasies of the languages on which they are based. 23:16:48 *qu1j0t3* agrees with mark_weaver 23:16:50 s/other languages/educational resources/ 23:16:52 mark_weaver: And it's what I'm doing. Racket + SICP. 23:21:05 BTW, I'm downloading the first lecture right now. 23:21:37 -!- masm [~masm@bl18-40-195.dsl.telepac.pt] has quit [Quit: Leaving.] 23:21:49 Apr 9 01:04:31 sagitta kernel: Unable to handle kernel paging request at virtual addr 23:21:49 ess 01000014 23:21:50 Apr 9 01:04:31 sagitta kernel: printing eip: 23:21:50 Apr 9 01:04:31 sagitta kernel: c016fd69 23:21:53 Apr 9 01:04:31 sagitta kernel: *pde = 2398c001 23:21:56 Apr 9 01:04:31 sagitta kernel: Oops: 0000 [#1] 23:21:59 Apr 9 01:04:31 sagitta kernel: SMP 23:22:03 Apr 9 01:04:31 sagitta kernel: Modules linked in: md5 ipv6 parport_pc lp parport auto 23:22:06 fs4 i2c_dev i2c_core sunrpc dm_mirror dm_mod uhci_hcd ehci_hcd tg3 floppy ata_piix lib 23:22:09 ata ext3 jbd 3w_xxxx sd_mod scsi_mod 23:22:12 Apr 9 01:04:31 sagitta kernel: CPU: 0 23:22:15 -!- adu [~ajr@64.134.102.121] has quit [Quit: adu] 23:22:15 Apr 9 01:04:31 sagitta kernel: EIP: 0060:[] Not tainted VLI 23:22:19 Apr 9 01:04:31 sagitta kernel: EFLAGS: 00010206 (2.6.9-55.ELsmp) 23:22:20 Apr 9 01:04:31 sagitta kernel: EIP is at prune_dcache+0x290/0x31b 23:22:23 Apr 9 01:04:31 sagitta kernel: eax: 01000000 ebx: c19d7c40 ecx: dbac2100 edx: c 23:22:26 0395000 23:22:28 -!- ChanServ has set mode +o Riastradh 23:22:29 Apr 9 01:04:31 sagitta kernel: esi: db1cbe8c edi: db1cbe94 ebp: dbac20f8 esp: f 23:22:33 7c6aee8 23:22:33 -!- Riastradh has set mode +q surrounder!*@* 23:22:37 brcrth: cool! 23:22:57 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 23:23:27 -!- surrounder [~surrounde@d130031.upc-d.chello.nl] has left #scheme 23:23:35 -!- Riastradh has set mode -q surrounder!*@* 23:26:02 surrounder [~surrounde@d130031.upc-d.chello.nl] has joined #scheme 23:26:28 sorry you all - accidental paste 23:30:39 surrounder: no problem 23:32:54 -!- Riastradh has set mode -o Riastradh 23:37:00 phax [~phax@unaffiliated/phax] has joined #scheme 23:39:26 did learn now you can change putty's rightclick behaviour, that's a plus :) 23:39:44 *offby1* wrote an accidental-paste-prevention thing for his favorite IRC client 23:40:36 not a bad idea 23:40:49 irssi has had one of those things built-in for ages. 23:43:33 Is it possible to run the same program on two (or more) different implementations of Scheme? (R6RS) 23:43:57 Sometimes. 23:47:04 dous [~dous@unaffiliated/dous] has joined #scheme 23:47:48 brcrth: you can even run the same program on scheme, emacs lisp and common lisp: http://paste.lisp.org/display/122296 23:49:14 ¡con mucha precoción! 23:49:28 pjb: Cool, thanks! 23:49:34 brcrth: you can, if you are careful 23:50:21 -!- realitygrill [~realitygr@adsl-76-226-110-91.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 252 seconds] 23:51:12 brcrth: make heavy use of the SRFIs. 23:52:03 realitygrill [~realitygr@adsl-76-226-104-67.dsl.sfldmi.sbcglobal.net] has joined #scheme 23:52:16 the widely supported ones anyway 23:54:51 -!- tuubow_ [~adityavit@c-69-136-105-164.hsd1.nj.comcast.net] has quit [Ping timeout: 272 seconds] 23:55:49 Now I have a function that does a google search on the region, nice. 23:56:34 -!- phax [~phax@unaffiliated/phax] has quit [Quit: Leaving]