00:03:30 smtlaissezfaire_ [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 00:06:33 -!- pygospa [~TheRealPy@kiel-4dbec47d.pool.mediaWays.net] has quit [Disconnected by services] 00:06:45 pygospa [~TheRealPy@kiel-5f768fdf.pool.mediaWays.net] has joined #scheme 00:07:39 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 00:08:18 -!- smtlaissezfaire_ [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Ping timeout: 276 seconds] 00:10:38 smtlaissezfaire_ [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 00:28:41 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 240 seconds] 00:28:56 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 00:30:49 -!- Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has quit [Ping timeout: 246 seconds] 00:35:07 -!- smtlaissezfaire_ is now known as smtlaissezfaire 00:36:07 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has quit [Ping timeout: 250 seconds] 00:40:08 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 00:45:36 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 00:56:13 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 00:57:54 -!- sajith [~sajith@140-182-144-61.dhcp-bl.indiana.edu] has quit [Ping timeout: 240 seconds] 00:59:17 -!- mithridates [~mithridat@142.167.229.211] has quit [Quit: Lost terminal] 01:00:54 Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has joined #scheme 01:09:13 -!- eholk [~eholk@2620:101:8003:200:e2f8:47ff:fe3e:26e0] has quit [Quit: eholk] 01:12:12 Penten [~user@114.255.149.182] has joined #scheme 01:13:37 -!- aidalgol [~user@202.36.179.68] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 01:14:35 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 01:17:27 dRbiG [p@bofh.edu.pl] has joined #scheme 01:17:42 -!- d2biG [p@bofh.edu.pl] has quit [Ping timeout: 246 seconds] 01:18:41 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 01:20:51 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 01:30:20 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 01:44:48 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 01:52:45 -!- zmv [~Telefonic@187.34.48.58] has quit [Ping timeout: 276 seconds] 01:54:24 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat] 02:05:04 aidalgol [~user@202.36.179.68] has joined #scheme 02:06:25 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 02:10:36 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Client Quit] 02:13:29 -!- eno [~eno@nslu2-linux/eno] has quit [Ping timeout: 265 seconds] 02:13:50 eno [~eno@nslu2-linux/eno] has joined #scheme 02:16:13 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 02:16:50 martman [~martman__@cpe-74-71-222-183.twcny.res.rr.com] has joined #scheme 02:16:54 #/join #hifi 02:17:01 err, wrong window 02:17:16 anyone mind taking a look at some code trying to work like the map function? 02:17:17 http://pastebin.com/siMfrbVV 02:17:40 i get "mcar: expects argument of type ; given 25" 02:17:43 and im not sure why 02:17:54 What happens if you evaluate (append 25 '())? 02:18:37 same error, 25 isnt a list.... hmm 02:19:33 (append (list (op (car l))) 02:19:35 awesome, thanks 02:19:57 thought i had something funkier going on... 02:19:59 I recommend learning about the CONS function. 02:20:09 rudybot: (cons 42 '(1 2 3)) 02:20:09 cky: ; Value: (42 1 2 3) 02:20:50 APPEND is a little heavyweight for what you're doing. 02:21:12 awesome, thanks 02:21:25 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 02:21:30 ill probally try and pick up a scheme book soon to pickup all these tricks again, its been awhile 02:21:58 martman: eli wants you to know about http://www.htdp.org/ 02:22:15 (A 2nd edition is in the works, but not sure when it's coming out.) 02:22:57 yeah, was thinking of that one actually 02:23:06 i used to have the little schemer book, wasnt a fan and lost it 02:23:22 That's a shame. It's actually a good book series. 02:24:00 yeah? i dont really remember much about it really besides from bad jokes 02:24:09 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 02:24:33 If you approach it seriously, it actually discusses many advanced Scheme/programming techniques. 02:25:05 Like continuations, Y combinator, lambda-based structures, etc. 02:25:06 might have to check it out too then i guess 02:25:22 kind of hard to take a book seriously when it reserves space for jelly stains though :) 02:25:30 one of the few things i remember lol... 02:25:33 That's just so the reader isn't too overwhelmed. :-) 02:25:49 Because otherwise, the book can be seriously overwhelming, especially if you're not already an experienced functional programmer. 02:26:24 yeah, is rough at first 02:28:08 -!- arcfide [1000@c-69-136-7-94.hsd1.in.comcast.net] has quit [Quit: Leaving] 02:30:19 Before you worry about the seriousness of jelly stains, you should read the preface (or is it the introduction? I forget) to SICP. 02:30:44 the introduction addresses jelly stains? 02:31:04 I remember there being extra jelly-stain capacity engineered into the Schemer books 02:33:28 No, it addresses fun. 02:34:08 oh, okay 02:39:00 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 02:40:56 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Client Quit] 02:44:25 haha 02:58:26 anyone happen to have a simple example of higher-rder functions anychance? they look pretty kool but meh examples online so far 02:58:55 maybe just take in a single variable and output a function that adds 42 to it or something stupid like that 02:59:24 map 02:59:44 Do you want to see usage or implementation? 03:00:37 implementation please 03:01:07 (define map (lambda (fun list) (if (null? list) '() (cons (fun (car list)) (map fun (cdr list)))))) 03:01:30 -!- aidalgol [~user@202.36.179.68] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 03:01:42 Which incidently gives you both... 03:05:06 -!- em_ [~em@user-0ccem0s.cable.mindspring.com] has quit [Quit: As a wild ass in the desert go I forth to my work] 03:05:34 hmm, think i missing something here 03:05:52 how is that a higher-order function? i thought those were functions that returns functions 03:06:04 that just maps or applies a function to every element in a list, and returns a new list 03:06:31 emma [~em@unaffiliated/emma] has joined #scheme 03:09:39 -!- aehrisch [~aehrisch@vhost.knauel.org] has quit [Ping timeout: 276 seconds] 03:09:59 high order functions are also functions that take functions as arguments. 03:10:12 So if you want a function that returns a function what about this: 03:10:28 martman, an higher-order procedure is a procedure that either takes procedures as arguments, or return a procedure. 03:10:46 (define kons (lambda (a d) (lambda (s) (s a d)))) (define kar (lambda (k) (k (lambda (a d) a)))) (define kdr (lambda (k) (k (lambda (a d) d)))) 03:11:11 Example: (kar (kons 1 2)) --> 1 03:11:23 (kons 1 2) --> # 03:12:07 This example should also show you that there isn't really a reason to distinguish high order functions from others. 03:15:09 aehrisch [~aehrisch@vhost.knauel.org] has joined #scheme 03:15:20 bit tricky to follow but thanks 03:16:13 martman: the trik is to realize that lambda actually returns closures. 03:16:40 closures are functions (code) + an environment (data), ie. a record containing the bindings of the free variables. 03:18:03 In (define kons (lambda (a d) (lambda (s) (s a d)))), a and d are free variables for the function returned by kons: (lambda (s) (s a d)) Therefore what's returned is actually that function, plus a binding of a and d with the actual arguments given to kons. (kons 1 2) --> # 03:18:58 So that when we call this result in (kar (kons 1 2)), (k (lambda (a d) a)), (lambda (s) (s a d)) can pass 1 and 2 for the arguments a and d to the function s. 03:19:11 martman: this is well explained in sicp (both the book and the videos). 03:19:15 rudybot: sicp 03:19:16 pjb: error: reference to an identifier before its definition: sicp in module: 'program 03:19:21 minion: sicp 03:19:21 sicp: The Structure and Interpretation of Computer Programs, a CS textbook using Scheme. Available under the CC-BY-NC Licence at (HTML), (Texinfo), and (PDF). Video lectures are available under the CC-BY-SA licence at 03:19:48 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 03:19:53 kool, have to seeif i can still find a printed US version 03:20:05 was checking it out on amazon earlier and saw mostly internation ones.... 03:20:15 martman: the videos are lively. 03:20:30 (but do read the book too). 03:20:50 martman: well, you know, there's no difference in the contents. Only in the binding and ISBN. 03:21:06 Besides, it's available online. 03:21:16 awesome 03:21:33 yeah, i can probally find these all alone. probally will to, id rather read a paper copy though 03:21:41 *online 03:22:17 ain't it funny :-) 03:24:34 -!- kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has quit [Read error: Connection reset by peer] 03:25:14 kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has joined #scheme 03:32:34 -!- emma is now known as em 03:40:10 -!- kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has quit [Quit: Leaving] 03:40:34 kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has joined #scheme 03:53:51 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 260 seconds] 03:57:18 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 03:57:57 martman: You want a function that returns functions? compose is a great example of that. :-) 03:57:59 sajith [~sajith@c-98-223-198-123.hsd1.in.comcast.net] has joined #scheme 03:58:12 martman: The simplest example of compose would be like this: 03:58:33 rudybot: (define (simple-compose f g) (lambda (x) (f (g x)))) 03:58:34 cky: Done. 03:58:52 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 04:00:07 rudybot: (define cheap-log1p (simple-compose log add1)) 04:00:07 cky: Done. 04:00:18 rudybot: (cheap-log1p 0) 04:00:18 cky: ; Value: 0 04:00:58 (I call it "cheap" log1p because the _real_ log1p handles small inputs correctly. This version will instead introduce lots of imprecision.) 04:01:27 martman: Notice that cheap-log1p's value is what's returned from simple-compose. 04:02:34 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 04:07:35 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 04:08:01 eholk [~eholk@63-235-13-3.dia.static.qwest.net] has joined #scheme 04:18:21 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 255 seconds] 04:35:40 -!- leppie [~lolcow@196-215-83-98.dynamic.isadsl.co.za] has quit [] 04:38:44 sorry for the delay 04:38:45 thanks guys 04:39:03 leppie [~lolcow@196-215-83-98.dynamic.isadsl.co.za] has joined #scheme 04:53:58 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:01:13 -!- elliottcable [~ec@ec2-174-129-205-205.compute-1.amazonaws.com] has quit [Quit: rage] 05:02:27 -!- martman [~martman__@cpe-74-71-222-183.twcny.res.rr.com] has quit [Quit: Leaving] 05:02:30 elliottcable [~ec@ec2-174-129-205-205.compute-1.amazonaws.com] has joined #scheme 05:04:27 gravicappa [~gravicapp@ppp91-77-189-55.pppoe.mtu-net.ru] has joined #scheme 05:08:40 -!- Modius [~Modius@cpe-70-123-140-183.austin.res.rr.com] has quit [Quit: "Object-oriented design" is an oxymoron] 05:11:54 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: good night.] 05:13:20 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 05:24:11 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:30:01 -!- djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has quit [Quit: Leaving] 05:36:17 -!- elliottcable is now known as Guest82573 05:37:26 -!- Guest82573 is now known as elliottcable 05:50:25 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 06:04:52 cpr420 [~cpr@unaffiliated/cpr420] has joined #scheme 06:05:35 -!- augiedoggie [~cpr@unaffiliated/cpr420] has quit [Disconnected by services] 06:05:40 -!- cpr420 is now known as augiedoggie 06:05:52 -!- gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Ping timeout: 240 seconds] 06:06:11 gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 06:07:29 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 06:08:07 -!- Daemmerung [~goetter@1133sae.mazama.net] has quit [Quit: Smoove out.] 06:13:33 mmc [~michal@82-148-210-75.fiber.unet.nl] has joined #scheme 06:23:19 -!- mmc [~michal@82-148-210-75.fiber.unet.nl] has quit [Quit: Leaving.] 06:36:06 Daemmerung [~goetter@1133sae.mazama.net] has joined #scheme 06:47:13 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 252 seconds] 06:52:19 -!- Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has quit [Ping timeout: 246 seconds] 06:56:34 Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has joined #scheme 07:17:06 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 07:19:45 -!- blueadept [~blueadept@unaffiliated/blueadept] has quit [Read error: Operation timed out] 07:23:52 Eataix [~Eataix@209.237.253.63] has joined #scheme 07:24:29 cd__mob [~carld@76.177.215.56] has joined #scheme 07:25:32 blueadept [~blueadept@unaffiliated/blueadept] has joined #scheme 07:27:17 -!- cd__mob [~carld@76.177.215.56] has quit [Client Quit] 07:27:54 csdwifi [~carl@76.177.215.56] has joined #scheme 07:33:37 -!- Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has quit [Ping timeout: 246 seconds] 07:34:48 sublimepua [~sublimepu@cpe-72-224-203-207.maine.res.rr.com] has joined #scheme 07:35:27 -!- sublimepua [~sublimepu@cpe-72-224-203-207.maine.res.rr.com] has quit [Client Quit] 07:46:58 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 07:52:35 -!- Eataix [~Eataix@209.237.253.63] has quit [Quit: Computer has gone to sleep.] 07:55:35 -!- monqy [~chap@pool-71-102-215-70.snloca.dsl-w.verizon.net] has quit [Quit: hello] 08:02:26 Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has joined #scheme 08:04:46 -!- faze` [~chris@c-66-41-214-247.hsd1.mn.comcast.net] has left #scheme 08:16:54 -!- rgrinberg_ [~rgrinberg@66.49.149.80] has quit [Read error: Connection reset by peer] 08:35:00 -!- gravicappa [~gravicapp@ppp91-77-189-55.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 08:35:45 -!- arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has quit [Ping timeout: 255 seconds] 08:43:58 -!- kennyd_ [~kennyd@93-138-195-171.adsl.net.t-com.hr] has quit [Ping timeout: 246 seconds] 08:48:15 arbscht [~arbscht@60-234-133-173.bitstream.orcon.net.nz] has joined #scheme 08:49:41 -!- csdwifi [~carl@76.177.215.56] has quit [Ping timeout: 252 seconds] 08:49:53 kennyd [~kennyd@93-141-6-133.adsl.net.t-com.hr] has joined #scheme 09:05:01 pyro- [~pyro@CPE-121-214-140-106.lnse3.lon.bigpond.net.au] has joined #scheme 09:10:15 -!- DT`` [~Feeock@net-93-149-65-184.cust.dsl.teletu.it] has quit [Read error: Connection reset by peer] 09:10:46 Eataix [~Eataix@113.83.79.138] has joined #scheme 09:11:06 DT`` [~Feeock@net-93-149-65-184.cust.dsl.teletu.it] has joined #scheme 09:14:10 -!- Eataix [~Eataix@113.83.79.138] has quit [Client Quit] 09:15:40 pyro-_ [~pyro@CPE-60-230-53-132.vic.bigpond.net.au] has joined #scheme 09:17:06 -!- pyro- [~pyro@CPE-121-214-140-106.lnse3.lon.bigpond.net.au] has quit [Ping timeout: 240 seconds] 09:19:24 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 255 seconds] 09:19:43 gravicappa [~gravicapp@80.90.116.82] has joined #scheme 09:19:55 chylli [~lchangyin@124.132.22.19] has joined #scheme 09:47:00 maploin [~mapleoin@fedora/maploin] has joined #scheme 09:48:06 aidalgol [~user@114-134-7-23.rurallink.co.nz] has joined #scheme 09:48:24 is there any procedure like assoc that works on vectors instead of assocations lists? 09:49:59 a vector of pairs 09:58:29 -!- aidalgol [~user@114-134-7-23.rurallink.co.nz] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 09:59:01 arquebus [~arquebus@189.221.12.73.cable.dyn.cableonline.com.mx] has joined #scheme 09:59:29 -!- arquebus [~arquebus@189.221.12.73.cable.dyn.cableonline.com.mx] has left #scheme 10:00:06 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Read error: Connection reset by peer] 10:00:21 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 10:03:05 maploin: no. write it. 10:04:11 -!- eholk [~eholk@63-235-13-3.dia.static.qwest.net] has quit [Ping timeout: 240 seconds] 10:07:45 maploin: (loop for E across VECTOR when (equal (car E) KEY) do (return (cdr E))) 10:08:41 (That "COBOL Arc" guy disease is contagious.) 10:09:07 -!- maploin [~mapleoin@fedora/maploin] has quit [Read error: Operation timed out] 10:12:21 csdwifi [~carl@76.177.215.56] has joined #scheme 10:15:58 -!- Daemmerung [~goetter@1133sae.mazama.net] has quit [Read error: Connection reset by peer] 10:17:31 rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has joined #scheme 10:18:11 -!- Penten [~user@114.255.149.182] has quit [Remote host closed the connection] 10:23:40 DGASAU: assoc returns the pair. 10:23:54 pjb: yeah, I've recalled it. 10:23:59 It is trivial to fix. 10:24:12 cobol arc? 10:25:45 -!- gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Ping timeout: 252 seconds] 10:26:01 gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 10:37:55 maploin [~mapleoin@fedora/maploin] has joined #scheme 10:40:08 pjb: I'm tempted to just use vector->list and then use assoc. Is it really common for people to write their own assoc-for-vectors procedure? 10:40:42 maploin: (loop for E across VECTOR when (equal (car E) KEY) do (return E)) 10:41:17 In Scheme you have to define that most probably, in CL you don't need it usually. 10:41:54 ok 10:46:53 Also, there exists "find-if", which works with all sequences. 10:47:26 -!- rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has quit [Ping timeout: 240 seconds] 10:49:06 (find-if (lambda (P) (= (car P) KEY)) SEQUENCE) 10:49:20 rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has joined #scheme 10:49:24 (Note that it works for all sequences, lists and vectors included.) 10:49:32 find-if doesn't work for me, is that implementation specific? 10:49:42 No, it is in CL. 10:49:44 oh 10:49:46 right 10:49:50 http://www.lispworks.com/documentation/HyperSpec/Body/f_find_.htm 10:49:54 I'm using scheme 10:49:55 DGASAU: If you haven't noticed, we're in #scheme 10:49:58 Please stop trolling CL 10:50:02 sjamaan: :p 11:09:24 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Quit: Leaving.] 11:09:40 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 11:29:33 -!- moll_ [~user@150.181.35.213.dyn.estpak.ee] has quit [Ping timeout: 264 seconds] 11:34:02 -!- sjamaan [~sjamaan@netbsd/developer/sjamaan] has quit [Ping timeout: 246 seconds] 11:37:30 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Quit: Leaving.] 11:37:50 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 11:42:02 sjamaan [~sjamaan@frohike.xs4all.nl] has joined #scheme 11:42:03 -!- sjamaan [~sjamaan@frohike.xs4all.nl] has quit [Changing host] 11:42:03 sjamaan [~sjamaan@netbsd/developer/sjamaan] has joined #scheme 11:42:17 -!- pyro-_ [~pyro@CPE-60-230-53-132.vic.bigpond.net.au] has quit [Remote host closed the connection] 11:42:58 wingo [~wingo@90.164.198.39] has joined #scheme 11:56:43 pyro- [~pyro@CPE-60-230-53-132.vic.bigpond.net.au] has joined #scheme 12:00:47 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 250 seconds] 12:14:35 choas [~lars@p578F6E75.dip.t-dialin.net] has joined #scheme 12:17:07 -!- Hal9k [~Lernaean@unaffiliated/kusanagi] has quit [] 12:29:52 moll [~user@150.181.35.213.dyn.estpak.ee] has joined #scheme 12:31:28 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 12:32:29 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Quit: Leaving.] 12:32:46 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 12:39:19 -!- DGASAU [~user@91.218.144.129] has quit [Remote host closed the connection] 12:39:41 DGASAU [~user@91.218.144.129] has joined #scheme 12:43:40 -!- DGASAU [~user@91.218.144.129] has quit [Remote host closed the connection] 12:44:09 DGASAU [~user@91.218.144.129] has joined #scheme 12:46:40 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 12:51:22 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 12:56:43 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Quit: Leaving.] 12:57:00 mmc [~michal@salm-office-nat.tomtomgroup.com] has joined #scheme 13:13:16 tzhuang [~tzhuang@72.53.83.36] has joined #scheme 13:15:48 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 13:19:42 -!- mmc [~michal@salm-office-nat.tomtomgroup.com] has quit [Quit: Leaving.] 13:28:50 -!- zanea_ [~zanea@210-86-94-154.jetstream.xtra.co.nz] has quit [Ping timeout: 260 seconds] 13:43:07 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 13:43:21 -!- wingo [~wingo@90.164.198.39] has quit [Ping timeout: 264 seconds] 13:44:47 -!- choas [~lars@p578F6E75.dip.t-dialin.net] has quit [Ping timeout: 264 seconds] 13:51:38 eli: is it possible to convert remaining tcsh and bash scripts to use standard shell? 13:51:56 eli: I mean, I can provide patch, if it is acceptable. 13:52:04 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 13:56:30 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 13:59:48 ASau``` [~user@95-24-140-223.broadband.corbina.ru] has joined #scheme 14:02:03 -!- ASau`` [~user@95-27-211-57.broadband.corbina.ru] has quit [Ping timeout: 276 seconds] 14:06:25 mmc [~michal@82-148-210-75.fiber.unet.nl] has joined #scheme 14:06:42 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 14:11:39 aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has joined #scheme 14:16:22 -!- maploin [~mapleoin@fedora/maploin] has quit [Ping timeout: 252 seconds] 14:19:45 copumpkin [~pumpkin@17.45.135.66] has joined #scheme 14:19:45 -!- copumpkin [~pumpkin@17.45.135.66] has quit [Changing host] 14:19:45 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:22:16 homie [~user@xdsl-84-44-179-47.netcologne.de] has joined #scheme 14:24:30 -!- kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has quit [Ping timeout: 255 seconds] 14:28:26 -!- moll [~user@150.181.35.213.dyn.estpak.ee] has quit [Ping timeout: 240 seconds] 14:30:07 sepi [j1e8kw4onb@hcl-club.lu] has joined #scheme 14:30:50 sepi pasted "case" at http://paste.lisp.org/display/123267 14:31:29 So I want to substitute SDL_QUIT for 12 in the code sample, but it stops working, even though SDL_QUIT has the value 12 14:31:35 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 14:31:40 What can I do to make the example work? 14:31:47 mithridates [~mithridat@142.167.241.93] has joined #scheme 14:34:31 (cond ((eqv? (sdl-event-type event) SDL_KEYDOWN) ...) ((eqv? (sdl-event-type event) SDL_QUIT) ...) ...) 14:35:47 moll [~user@150.181.35.213.dyn.estpak.ee] has joined #scheme 14:36:10 sepi: I usually define an `eval-case` macro for that situation. 14:42:08 DGASAU: There are tcsh scripts?? I'll be happy to dump them. 14:42:20 Not so much with bash, but which one are those? 14:57:12 MrFahrenheit [~RageOfTho@users-151-140.vinet.ba] has joined #scheme 15:03:50 btw, re find-if above, ormap :) 15:04:55 -!- rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has quit [Ping timeout: 240 seconds] 15:12:50 It's just `find' in SRFI-1. 15:15:58 foof: thanks 15:21:22 Daemmerung [~goetter@1133sae.mazama.net] has joined #scheme 15:22:33 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 15:22:35 maploin [~mapleoin@fedora/maploin] has joined #scheme 15:22:38 -!- pyro- [~pyro@CPE-60-230-53-132.vic.bigpond.net.au] has quit [Remote host closed the connection] 15:27:00 wingo [~wingo@90.164.198.39] has joined #scheme 15:29:30 masm [~masm@bl15-132-162.dsl.telepac.pt] has joined #scheme 15:39:23 eli: collects/2htdp/uchat/xrun and collects/2htdp/tests/xtest 15:39:24 15:41:09 eli: with bash scripts, I'd actually have them converted to use POSIX sh. 15:41:20 eli: they don't use anything bash specific anyway. 15:41:25 The list follows: 15:41:38 collects/tests/framework/framework-test 15:41:38 collects/meta/drdr/copy.sh 15:41:38 collects/meta/drdr/good-init.sh 15:43:18 monqy [~chap@pool-71-102-215-70.snloca.dsl-w.verizon.net] has joined #scheme 15:54:19 DGASAU: These are all nearly private scripts, which you can just delete if you really care that much about it. 15:54:30 is there any way to do 'map' and 'apply' at the same time? 15:54:55 eli: our "lint" tool doesn't like them, since they reference non-existing interpreter. 15:55:32 You realize that that's a bogus partial test... 15:55:43 I know. 15:55:57 For example, I just changed collects/meta/drdr/copy.sh to use /bin/sh, 15:56:03 it will probably make your linter happy 15:56:08 :) 15:56:19 Thank you! 15:56:23 But it's still as useless as it was before... 15:56:31 Specifically, it has some: rsync -avz . drdr:/opt/svn/drdr/ 15:56:42 in it -- I doubt that you'll ever want to run that. 15:56:45 I know. 15:57:56 -!- chrissbx [~chrissbx@bas1-montreal07-1176500366.dsl.bell.ca] has quit [Ping timeout: 246 seconds] 15:58:06 Hal9k [~Lernaean@unaffiliated/kusanagi] has joined #scheme 15:58:50 DGASAU: What's the complaint about collects/tests/framework/framework-test 15:58:52 ? 15:59:05 That one is /bin/sh, and should be very portable. 15:59:11 Hm. 15:59:42 Let me check it again. 15:59:49 DGASAU: Note also that your linter happily missed collects/meta/build/build 16:00:04 That one is sh, but the first thing it does is: exec bash "$0" "$@" 16:00:25 (And that will *not* change, I dumped all hope for /bin/sh a long time ago.) 16:00:27 It doesn't analyze all the code. 16:00:51 Yeah, I'm sure. I'm just pointing it out so you'll know if you run into it. 16:00:54 Honestly, bash doesn't make it any better. 16:00:57 IMO. 16:01:19 -!- alaricsp_ is now known as alaricsp 16:02:39 DGASAU: I very highly disagree. That build script is how we do our (nightly and manual) builds and create distributables. It is very heavy, very long, and includes something that I seriously tried to do with /bin/sh before I gave up on it. 16:02:54 `sed' hacks can only take you that much. 16:03:01 *eli* gestures a short distance 16:03:21 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 16:03:38 Why don't you write it in Scheme? 16:03:57 -!- sajith [~sajith@c-98-223-198-123.hsd1.in.comcast.net] has quit [Ping timeout: 255 seconds] 16:04:54 *DGASAU* thought of Lua for some moment. 16:06:09 slembcke [~slembcke@98.240.188.43] has joined #scheme 16:06:49 DGASAU: http://git.racket-lang.org/plt/commitdiff/69464bba 16:06:55 Riastradh: Good question. 16:07:19 It kind of grew larger in small steps, so that I never had the time to convert it into racket. 16:07:34 -!- gravicappa [~gravicapp@80.90.116.82] has quit [Remote host closed the connection] 16:07:50 IOW, to do convenient shell stuff in racket, I'd need a bunch of code, so the overhead was larger than a shell script. 16:08:10 It's probably at the point where that overhead would have been overall smaller, but... "it works". 16:08:42 it works! now for god's sake don't anybody ever touch it. 16:10:01 If I didn't have to touch it, I'd definitely unquote that... (And be "sufficiently happy"...) 16:10:58 Oh, cool. 16:11:17 It's been built at last. 16:13:34 eli: processor-count still returns 1, and "places-enabled?" gives #f. 16:13:57 Not sure how to procede at this point, will investigate later. 16:14:06 DGASAU: So that's the time to take it to the list. 16:14:16 It might be related to the pthreads issue. 16:18:24 -!- elly [~elly@atheme/member/elly] has quit [Remote host closed the connection] 16:18:24 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Remote host closed the connection] 16:18:40 elly [~elly@atheme/member/elly] has joined #scheme 16:18:55 Nisstyre [~nisstyre@infocalypse-net.info] has joined #scheme 16:19:03 -!- nteon [~nteon@204.28.122.186] has quit [Ping timeout: 250 seconds] 16:21:30 rudybot: eval (require srfi/1) 16:21:31 amoe: your sandbox is ready 16:21:31 amoe: Done. 16:21:46 rudybot: eval (pair-fold-right cons '() '(a b c)) 16:21:46 amoe: ; Value: ((a b c) (b c) (c)) 16:22:25 now, in mosh that evaluates to ((a . #1=(b . #2=(c))) #1# #2#) 16:22:31 is mosh broken? 16:23:16 amoe: No. Both are fi. 16:23:19 *fine 16:23:36 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 16:23:42 OK 16:23:49 second is the same, using shared structure? 16:24:15 Right. 16:24:50 rudybot: (require srfi/1 srfi/38) 16:24:51 cky: Done. 16:25:02 rudybot: (write-with-shared-structure (pair-fold-right cons '() '(a b c))) 16:25:03 cky: ; stdout: "((a . #0=(b . #1=(c))) #0# #1#)" 16:27:23 funky, thanks cky 16:27:44 :-) 16:30:30 I thought that the Racket printer did that by default, but am having no luck reproing with the `print-graph' parameter 16:31:32 nteon [~nteon@204.28.122.186] has joined #scheme 16:32:48 -!- maploin [~mapleoin@fedora/maploin] has quit [Remote host closed the connection] 16:35:50 Daemmerung: What did you try? 16:36:08 -!- alaricsp [~alaric@relief.warhead.org.uk] has quit [Quit: Leaving] 16:36:32 Ah, found it. print-graph only works with `write', not 'print'. 16:36:45 rudybot: init 16:36:46 Daemmerung: your sandbox is ready 16:37:31 rudybot: eval (require srfi/1) (print-graph #t) (print (pair-fold-right cons '() '(a b c))) 16:37:31 Daemmerung: ; stdout: "'((a . #0=(b . #1=(c))) #0# #1#)" 16:37:37 son of a... 16:37:58 gravicappa [~gravicapp@ppp91-77-189-55.pppoe.mtu-net.ru] has joined #scheme 16:38:05 suffice to say, different behavior was observed in a casual dr session 16:39:00 in drracket, the parameter is affecting write, but not print 16:39:31 Daemmerung: drracket might add its own customizations, but that should work in geenral. 16:39:37 s/en/ne/ 16:40:10 cheep cheep 16:40:56 -!- moll [~user@150.181.35.213.dyn.estpak.ee] has quit [Ping timeout: 260 seconds] 16:40:59 eli: indeed, plain ol' racket repl works as advertised. 16:48:09 -!- chylli [~lchangyin@124.132.22.19] has quit [Ping timeout: 264 seconds] 16:48:23 Riastradh: what is the reverse of CODE->CHAR in MIT Scheme? 16:49:12 hm.. should #\u1234 be the same as #\u01234? 16:54:39 ecraven: char-code 16:56:21 Thanks, I kept looking for CODE->CHAR... 16:58:23 It's CHAR-CODE as opposed to CHAR-BITS; the map from characters to their codes is not injective. 16:59:23 Ok. On a related note, is there a way to get the bitwise representation of floats or to convert from IEEE-format bits to a float? 17:00:04 There are several ways, none of which I'd rely on at the moment... 17:00:29 ;) Just because some X extensions use that. I'll ask again later, when I really need it. 17:01:56 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 260 seconds] 17:12:38 tauntaun [~user@li327-197.members.linode.com] has joined #scheme 17:25:49 -!- ivartj_ is now known as ivartj 17:32:56 sajith [~sajith@140-182-144-61.dhcp-bl.indiana.edu] has joined #scheme 17:36:27 -!- sajith [~sajith@140-182-144-61.dhcp-bl.indiana.edu] has left #scheme 17:44:20 tab1ta [~tab1ta@host91-0-dynamic.245-95-r.retail.telecomitalia.it] has joined #scheme 17:51:49 moll [~user@150.181.35.213.dyn.estpak.ee] has joined #scheme 17:54:01 proq [~user@unaffiliated/proqesi] has joined #scheme 18:21:15 BrianF_ [46a1ffcd@gateway/web/freenode/ip.70.161.255.205] has joined #scheme 18:25:59 eholk [~eholk@2620:101:8003:200:e2f8:47ff:fe3e:26e0] has joined #scheme 18:36:43 HG` [~HG@p5DC05F87.dip.t-dialin.net] has joined #scheme 18:43:18 -!- BrianF_ [46a1ffcd@gateway/web/freenode/ip.70.161.255.205] has left #scheme 18:46:23 -!- wingo [~wingo@90.164.198.39] has quit [Ping timeout: 250 seconds] 18:53:10 djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has joined #scheme 18:58:46 littlebobby [~bob@unaffiliated/littlebobby] has joined #scheme 19:02:19 -!- eholk [~eholk@2620:101:8003:200:e2f8:47ff:fe3e:26e0] has quit [Quit: eholk] 19:36:46 tupi [~david@139.82.89.24] has joined #scheme 19:49:17 -!- HG` [~HG@p5DC05F87.dip.t-dialin.net] has quit [Quit: Leaving.] 19:55:57 -!- moll [~user@150.181.35.213.dyn.estpak.ee] has quit [Ping timeout: 264 seconds] 19:59:22 -!- gravicappa [~gravicapp@ppp91-77-189-55.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 20:04:45 -!- nteon [~nteon@204.28.122.186] has quit [Ping timeout: 276 seconds] 20:07:54 -!- pothos [~pothos@111-240-169-203.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 20:09:52 pothos_ [~pothos@111-240-170-107.dynamic.hinet.net] has joined #scheme 20:10:18 -!- pothos_ is now known as pothos 20:12:06 -!- samth_away is now known as samth 20:12:44 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 20:13:29 -!- csdwifi [~carl@76.177.215.56] has quit [Quit: Ex-Chat] 20:15:32 -!- mmc [~michal@82-148-210-75.fiber.unet.nl] has quit [Quit: Leaving.] 20:18:32 eholk [~eholk@nat/mozilla/x-hfuwigmmrzxzdvdp] has joined #scheme 20:19:36 mmc [~michal@82-148-210-75.fiber.unet.nl] has joined #scheme 20:19:53 nteon [~nteon@204.28.122.186] has joined #scheme 20:28:23 -!- eholk [~eholk@nat/mozilla/x-hfuwigmmrzxzdvdp] has quit [Quit: eholk] 20:29:54 Has anyone come up with a better name yet for the inteded product of the Scheme working groups? 20:30:24 Riastradh: i am having trouble not responding with something impolite 20:30:41 Please don't call it `the R7RS'; it's bad enough that the R6RS was called that. Neither one is a report on an actual state of affairs at all. 20:31:12 also, jokes about Algol are no longer funny 20:31:42 although, it could be a report on chibi, if one was going for a state of affairs 20:34:41 eholk [~eholk@nat/mozilla/x-reuopyimtucogjdm] has joined #scheme 20:37:10 By that criterion, no previous Revised(n) report (at least n 3, 4, 5) was state-of-affairs. Agree with you on the stale nature of the entire R(n) conceit. 20:37:48 The others were much, much closer to being actual reports than either the R6RS or what the working groups are working on. 20:39:30 Working groups claim to be calculating a LCD of current implementations. 20:39:57 Uh... That's not what I'm seeing. 20:40:08 however, they are doing no such thing -- they're creating something new that they believe to be close to the LCD of some implementations 20:40:10 Example? 20:40:35 the module system 20:41:02 Thanks. I'll take a look. 20:41:03 Maybe a least common denominator in *concepts*. 20:41:39 (I.e., `All Scheme systems have some way to do FOO. There is a little bit of conceptual overlap between FOO_x, FOO_y, and FOO_z. Let's invent some names to capture this overlap.') 20:43:20 I don't know. When I browsed (and it was only a browse) the April draft yesterday afternoon, I didn't get that notion. I confess to skipping the module chapter, though. 20:44:43 Indeed, I was pretty comfortable with what I saw. Because it did so little. Which is what I wanted from the small-language draft. 20:45:16 what is it you want from the small language? 20:45:38 Minimalism 20:45:46 i still don't understand what people want (technically, as opposed to socially) from the small language 20:46:26 but how does the existence of a new report on minimal small descendant of Scheme improve your life? 20:46:53 Encourages convergence. 20:47:08 Convergence on what? 20:47:26 also, why do you think that it would encourage convergence? 20:47:34 this is what i mean by "social" anyway 20:48:13 there are lots of people who want the scheme community to be different, but writing reports is unlikely to make what they want happen 20:48:28 What's the Scheme community? 20:49:05 Hell with it. Cheers, y'all. 20:49:06 Riastradh: i'd say "the set of people who are interested in languages primarily descended from Scheme (in the 1975 sense) 20:49:25 Daemmerung: i'm genuinely curious 20:50:30 Riastradh: which would include you and me, but not, say, Rich Hickey 20:51:14 That's only because he's a cool kid and we're a group of kids who are above being cool. 20:51:20 *Riastradh* hiccups. 20:51:56 hmm, not sure i follow 20:52:08 I'm not sure I do either, but it sounded funny while I was writing it. 20:53:16 Anyway, silliness aside, I was asking more about the `community' part. 20:53:44 afaict, the correctness of that definitition is the primary thing people seem to want to change about the "Scheme community" 20:55:21 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 264 seconds] 20:55:56 in that they'd like "Scheme community" to be a group of people who all work on one language, more like the Python community (or the Racket community) and less like the ML community 20:57:22 -!- djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has quit [Remote host closed the connection] 20:58:39 preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 20:59:11 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 21:03:14 samth: (Sorry. You pose perfectly reasonable qs that I can't pursue now.) 21:03:48 ok, just didn't want you to think that i was just being argumentative 21:04:12 *Daemmerung* has new glasses and can't see a goddamned thing. makes typing challenging 21:04:14 even though i am (unsurprisingly) a skeptic about the r7 21:04:18 djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has joined #scheme 21:15:48 -!- AtnNn [~welcome@modemcable020.240-177-173.mc.videotron.ca] has quit [Ping timeout: 276 seconds] 21:22:40 -!- eholk [~eholk@nat/mozilla/x-reuopyimtucogjdm] has quit [Quit: eholk] 21:24:37 eholk [~eholk@2620:101:8003:200:e2f8:47ff:fe3e:26e0] has joined #scheme 21:35:52 jcowan [c6b912cf@gateway/web/freenode/ip.198.185.18.207] has joined #scheme 21:36:12 hoi 21:36:33 I'm trying to figure out how close a pure Scheme function can approach impurity without falling off the cliff. 21:37:10 64.2% 21:37:11 About four linguini-widths. 21:37:12 A function is trivially pure (I think), if it assigns no variables, mutates no objects, and refers to no non-local variables in impure functions. 21:37:26 *jcowan* chuckles 21:37:42 Is that a sufficient criterion of purity? 21:37:53 what does "refers to no non-local variables in impure functions" mean? 21:37:54 You're not looking for the classification of procedures and/or expressions as movable and flushable, are you? 21:38:25 also, no, it isn't: see (car 5) 21:38:43 or just (4 5) to avoid use of variables 21:38:44 Okay, and throws no exceptions. 21:38:45 (An expression is flushable if flushing it doesn't change the semantics of the program, i.e. it has no side effects. A procedure is movable if moving it doesn't change the semantics of the program, i.e. its behaviour is independent of all side effects.) 21:39:05 Thanks, but not what I'm looking for. 21:39:22 Or maybe I mean movable rather than pure. 21:39:27 (Rather, `An *expression* is movable if moving it...', or `A procedure is movable if moving *calls* to it...'.) 21:39:36 Gotcha. 21:39:45 samth: I don't understand what you mean by (car 5) and (4 5) 21:39:59 jcowan: both of those produce exceptions 21:40:09 Oh, okay. 21:40:28 which makes the "produces no exceptions" criteria hard to check 21:40:46 Granted. 21:41:44 The point about the non-local variables is that if a procedure refers to the value of a (mutable) variable, it can't be pure. All its variables are immutable, so that must be either global or in some enclosing scope. 21:42:19 but where is the "read" variable located? 21:42:39 That procedure mutates objects, to wit, ports. 21:43:06 Ah. I should say "refers to no non-local mutable variables" 21:43:25 I am slightly confusing myself between "mutable vs. immutable variable" and "variable vs. constant" terminologies. 21:43:45 So a pure function can examine the value of "read", but can't invoke it. 21:43:59 What's the question you're trying to answer? 21:44:26 Having established this four-part baseline, I'm interested in what deviations from it may count as harmless. 21:44:40 *Riastradh* raises several eyebrows. 21:45:25 For example, if a function refers to a mutable non-local variable only in expressions that set that same (or another?) non-local variable, the value of the function does not depend on the value of the variable. 21:45:55 For example, a function could increment a counter of how many times it has been called without, in a practical sense, ceasing to be pure. 21:46:40 For another, a function could mutate an object that it itself has created and not shown to anyone by call or return. 21:46:48 Such a procedure is neither movable nor flushable. What is your notion of `harm', and for what context are you pursuing this? 21:47:09 -!- aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has quit [Quit: aisa] 21:47:13 (A counting procedure is neither movable nor flushable, that is. The procedure (lambda (x) (set! x (+ x 1)) x) is both movable and flushable, of course.) 21:47:14 I don't really know yet. The question popped into my mind, yea, like Athena from Zeus's brain, only in the opposite direction. 21:48:06 Thirdly, a procedure could mutate its own variable if there are no other procedures closing over that variable that escape the first procedure. 21:48:51 That is what your example illustrates. 21:49:00 Modius [~Modius@cpe-70-123-140-183.austin.res.rr.com] has joined #scheme 21:50:21 If we dismiss the counting procedures for the moment, then the other two situations do not compromise purity, no? Or have I characterized them incorrectly? 21:51:01 I don't know what your notion of purity is or why you care, so it's hard to say. 21:51:09 Indeed, under assignment conversion the third becomes the second: a pure function may mutate an object (including a box) if it has created the object and has not yet shown it to anyone. 21:51:10 jcowan: can I get more context why you want to change relation between IEEE 754 and R5RS? 21:51:49 ASau```: I don't understand you. I think the answer is "I don't", but I assume you mean something different from what I think you said. 21:52:15 In particular, I don't understand why it bothers you that "NaN ?<> NaN", 21:52:23 Oh. 21:52:31 and thus "(eqv? x x)" evaluates to #f. 21:52:49 zanea [~zanea@125-237-51-83.jetstream.xtra.co.nz] has joined #scheme 21:53:01 You have the same thing for procudures and any other composite type. 21:53:39 Wait, what? In what cases does (eqv? x x) return #f other than NaN in Chicken? 21:53:40 ASau```, EQV? is supposed to ask whether two objects are substantively the same thing, so it is surprising for (eqv? x x) ever to give false. To compare numbers one generally uses = rather than EQV? anyway. 21:54:24 The problem with (eqv? +nan.0 +nan.0) => #f is that when you put a NaN into a key-value data structure such as a hash table, a-list, p-list, or what have you, and then ask if it's there, you get told it is not. 21:54:28 jcowan: "Therefore, I think Chicken should be changed so that (eqv? +nan.0 +nan.0) => #t." 21:54:37 Chicken is right here. 21:54:38 Exactly. 21:54:46 On what grounds? 21:55:00 It should be #f, if eqv? is supposed to defer to "=". 21:55:14 (eqv? +nan.0 +nan.0) --> #t (= +nan.0 +nan.0) --> #f 21:55:26 That's true on all Schemes except Chicken. 21:55:34 this would be illogical, but seems to be needed, for the semantics of lisp and of ieee754. 21:55:39 Then those all Schemes are broken. 21:55:43 Except Chicken. 21:55:58 Felix says that it violates R5RS, because R5RS says that eqv? defers to = for numbers with the same exactness. 21:56:00 ASau```, generally, EQV? is supposed to ask whether two objects are the same object. Deferring to = is a way to implement that notion. 21:56:37 Riastradh: (eqv? (lambda () '()) (lambda () '())) is allowed to evaluate to #f, 21:56:39 Depends on how = is defined. For IEEE754, #1=nan.0 should be different from #1#. 21:56:44 if I read R5RS right. 21:56:49 iirc 21:57:40 Whether two equal numbers are the same object is questionable. 21:57:52 ASau```, sure, just like (eqv? (cons 0 0) (cons 0 0)) is false and (eqv? '(x) '(x)) may be true or false. That's a little different from (let ((f (lambda () 0))) (eqv? f f)), though. 21:57:58 In classical logic, they may be not. 21:58:44 In (let ((x 0)) ...), is "0" a new "0" or the single available "0"? 21:58:46 Two equal numbers with common exactness are substantively `the same object' in Scheme because there's no way to distinguish them. 22:00:03 If Scheme violates IEEE 754, it loses large class of applications. 22:00:57 (= +nan.0 +nan.0) is definitely #f in all Schemes, so there is no violation. 22:00:59 It has nothing to do with IEEE 754, ASau```. Applications desiring IEEE 754 semantics can get that with =. 22:01:04 IEEE does not define the concept of eqv?. 22:01:42 Riastradh: then you should adjust the way "eqv?" is defined in Scheme. 22:01:43 It is a purely Scheme notion. 22:02:15 ASau```, I believe you're confusing `The definition of EQV? as the R5RS puts it.' with the general notion of the intent of EQV? and what expectations people have of that. 22:02:33 jcowan is talking about the latter. 22:02:40 Riastradh: I don't mind changing the way it is defined. 22:03:22 I can tell that I might welcome the change, so long as behaviour complies to 754. 22:03:52 How EQV? behaves neither compiles with 754 nor doesn't comply, any more than how CAR behaves. 22:03:57 In anycase, NAN are an exception. 22:03:57 For that matter, the R5RS says that EQV? defers to = for objects that are numbers, so it is perfectly sensible not to defer to = for NaN! 22:03:59 s/compiles/complies 22:04:13 NaN is a number, though, despite its name. 22:04:19 Riastradh: NaN _is_ a number. 22:04:35 sNaNs are specifically reserved for that purpose. 22:04:45 (For arithmetic-like extensions.) 22:04:48 Not in the nomenclature of IEEE 754, ASau```. 22:05:01 A NaN is a floating-point datum, but not a floating-point number. 22:05:06 No, but it's a Scheme number. 22:05:19 that is, it answers #t to NUMBER?. 22:05:30 asumu [~at@c-24-63-27-157.hsd1.ma.comcast.net] has joined #scheme 22:05:33 Perhaps it should answer #f. 22:05:51 Riastradh: it may be from CS point of view. 22:06:06 From our point of view, anything that behaves like a number, is a number. 22:06:51 pjb: In practice that creates bad results, and inexact numbers are all about "in practice". In theory, they shouldn't even exist. 22:08:37 Riastradh: "Signalling NaNs afford ... arithmetic-like extensions..." 22:08:40 ASau```: What do you believe to be the practical benefit (as opposed to standards purity) of Chicken's approach? 22:09:17 -!- samth is now known as samth_away 22:09:27 jcowan: what is practical benefit if behaviour is changed? 22:09:44 aisa [~aisa@209.234.140.58] has joined #scheme 22:09:46 I keep pointing this out. 22:09:56 You can store all Scheme objects in a data structure and get them back. 22:10:18 (hash-table/put! ht nan 0) (hash-table/get ht nan 1) ;Value: 0 or 1? 22:10:24 (ht is an eqv hash table.) 22:10:32 In Chicken you cannot use +nan.0 as the key in an associative data structure. 22:10:33 Riastradh: what does "nan" encode in your case? 22:10:45 Riastradh: "nan" isn't single value, conceptually. 22:11:01 It doesn't matter which NaN it is. All of them will fail in Chicken. 22:11:01 It is a particular NaN. 22:11:09 -!- nteon [~nteon@204.28.122.186] has quit [Ping timeout: 255 seconds] 22:11:15 I got it by computing (/ 0. 0.) a little earlier in the program. 22:11:17 If you write something like "float v[] = {nan, nan}" v[0] may differ from v[1]. 22:11:36 (let ((nan (/ 0. 0.))) (hash-table/put! ht nan 0) (hash-table/get ht nan 1)) 22:12:03 This brings my question again: 22:12:15 when you write "(let ((x 0)) ...)" 22:12:22 (hash-table/intern! nan-description another-nan (lambda () (generate-a-nan-description-string another-nan] 22:12:33 is "0" another copy of "0" or the same single (and unique) "0"? 22:13:08 From the eqv? and = viewpoints, it is the same. Eq? might disagree, but the behavior of eq? on numbers is specifically implementation-dependent. 22:13:20 Conceptually, it is _another_copy_ of "0". 22:13:34 ASau```, for the purposes of an eqv hash table, it's the same zero. 22:13:44 Conceptually, there is no difference between copying an immutable object and not copying it. 22:14:19 jcowan: sNaN _is_ intended to be allowed to differ. 22:15:15 When you write "let x = NaN", you write "let x be _some_uninitialized_value_". 22:15:20 Yes, multiple NaNs are certainly useful. That's why (let ((nan0 (/ 0. 0.)) (nan1 (log 0.)) (ht (make-eqv-hash-table))) (hash-table/put! ht nan0 0) (hash-table/put! ht nan1 1) (hash-table/count ht)) should give 2, not 1. 22:15:51 At least, it shouldn't be precluded from giving 2. 22:16:41 nteon [~nteon@204.28.122.186] has joined #scheme 22:17:36 "Signalling NaNs afford representation for uninitialized variables..." 22:18:22 (IEEE 754-2008-to-be, "Operations with NaNs") 22:19:00 ("representations" in my copy) 22:21:22 jcowan: your last statement is wrong. 22:21:39 jcowan: there's large difference between copying an object and non-copying it. 22:21:59 Not if it is immutable. 22:22:11 It doesn't matter whether it is mutable or not. 22:22:13 It contradicts intuition. 22:22:34 "We shall never agree, for we are arguing from different premises", as the pub-owner said to the other pub-owner. 22:22:47 Let me know how you distinguish the copy from the original if they're immutable... 22:22:55 -!- tab1ta [~tab1ta@host91-0-dynamic.245-95-r.retail.telecomitalia.it] has quit [Quit: Sto andando via] 22:23:40 Riastradh: there're many things in the Universe that don't behave like bosons. 22:23:40 Riastradh: The point about being precluded from giving 2 is a significant one. So you are arguing that (eqv? some-nan some-nan) have an indeterminate value? 22:23:59 Numbers are not "things in the Universe" for any reasonable ontology I know. 22:24:24 Huh? Where do you get the notion of an indeterminate value? 22:24:54 jcowan: still it depends on your model of universe. 22:25:08 Either 1 or 2 is a reasonable answer. 22:25:52 In the sense that (eq? 1 1) has an indeterminate value: you don't know what your Scheme will say until you try. 22:26:04 s/have/should have/ 22:26:14 Two different operations may give distinct or identical NaNs; a NaN's significand bits may describe what operation yielded it, or a NaN's significand bits may be all zero. 22:26:32 Quite. But is eqv? allowed to report this difference? 22:26:41 Well, sure! 22:26:52 Why? 22:26:57 Then (eqv? some-nan some-other-nan) might report #t or #f. 22:27:11 depending on the implementation. 22:27:13 If the significand bits are different and you can look at the significand bits, then EQV? should say they're different. 22:28:06 But if the significand bits are all the same, then EQV? should say they're the same. 22:28:07 I don't quite understand then why you're not allowed to use "eq?" to compare integer numbers. 22:28:22 It's the same comparison of bit strings. 22:28:28 Efficiency. Eq? is usually implemented as a pointer comparison. 22:28:59 And "eqv?" is defined in standard as numeric comparison for numbers. 22:29:15 For reasons of efficiency. 22:29:22 In other words, when x and y are double-precision floating-point data, then (= x y) should give whatever x == y gives in C, and (eqv? x y) should give whatever union { double d; uint64_t i; } u, v; u.d = x; v.d = y; u.i == v.i. 22:29:26 Although it may be a different one. 22:29:37 ...gives. 22:29:54 No, not for reasons of efficiency, but because it seemed reasonable at the time R5RS (or rather the predecessor that introduced this definition, most probably) was written. 22:29:57 It's not so reasonable now. 22:30:11 Riastradh: I follow you. 22:31:35 Riastradh: there're around 2^50 (IIRC) NaNs there, for which (= x y) should return #f by 754. 22:31:42 The general intent behind EQV? is to tell whether two objects are substantively the same. The R5RS sought to realize this intent by saying that for numbers, EQV? defers to =. The R5RS doesn't formalize a concept of NaNs, so it's silent on the issue of what EQV? gives for NaNs. Formalizing NaNs in Scheme entails specifying the behaviour of EQV? on them, and *not* deferring to = for NaNs matches the general intent of EQV?. 22:32:01 Riastradh: and following your grounds, "eqv?" may return #f for those. 22:32:49 Riastradh: NaNs are the same FPNs, all FPN operations are defined on them. 22:32:51 (2^53 - 2) 22:33:23 A NaN is not a floating-point number, in the nomenclature of IEEE 754. 22:35:12 -!- aisa [~aisa@209.234.140.58] has quit [Quit: aisa] 22:35:17 I don't see anything in IEEE 754 about "floating-point number." 22:35:51 It distinguishes "finite" FPNs, "normal" and "underflowed" ones. 22:36:14 Well, gee, I wonder what Definition 2.1.25 is all about. 22:37:24 IEEE 754-2008, Section 2 `Definitions, abbreviations, and acronyms', Subsection 2.1 `Definitions', Definition 2.1.25 `floating-point-number': `A finite or infinite number that is representable in a floating-point format. A floating-point datum that is not a NaN. All floating-point numbers, including zeros and infinities, are signed.' 22:37:24 Ah, it is 3.2.17. 22:37:41 (p. 4) 22:38:15 -!- djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has quit [Ping timeout: 258 seconds] 22:41:16 *poof* 22:41:40 Thanks. 22:45:03 If you move NaNs into separate type in Scheme, it will be funky. 22:47:11 -!- Euthydemus [~euthydemu@unaffiliated/euthydemus] has quit [Ping timeout: 240 seconds] 22:48:37 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 250 seconds] 22:51:16 -!- mithridates [~mithridat@142.167.241.93] has quit [Quit: Lost terminal] 22:51:42 djcb [~djcb@a88-114-88-233.elisa-laajakaista.fi] has joined #scheme 22:55:04 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 23:01:00 samth_away: The second draft has made many changes to coincide with R6RS. 23:02:12 Euthydemus [~euthydemu@unaffiliated/euthydemus] has joined #scheme 23:02:16 The module system _can't_ be an LCD of current implementations, because they are all so different, but what we've chosen has the advantage of being trivial to implement in any module system and provides room for extensibility. 23:03:07 -!- masm [~masm@bl15-132-162.dsl.telepac.pt] has quit [Quit: Leaving.] 23:05:35 martinhex [~mjc@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 23:06:58 And there's nothing actually new in the draft, we're only looking at widely implemented features. 23:10:00 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 23:15:56 kniu [~kniu@pool-96-250-3-60.nycmny.fios.verizon.net] has joined #scheme 23:18:53 chrissbx [~chrissbx@bas1-montreal07-1176500366.dsl.bell.ca] has joined #scheme 23:23:49 Well, except DivisionRiastradh. 23:25:59 Here's a poor sad fellow who wants to port his macros from TinyScheme to Racket. 23:27:59 paperkettles [~chris@ip72-195-132-159.ri.ri.cox.net] has joined #scheme 23:30:48 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 23:33:24 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 23:40:19 -!- DGASAU [~user@91.218.144.129] has quit [Remote host closed the connection] 23:41:32 DGASAU [~user@91.218.144.129] has joined #scheme 23:42:21 -!- jcowan [c6b912cf@gateway/web/freenode/ip.198.185.18.207] has quit [Quit: Page closed] 23:58:47 -!- Obfuscate [~keii@ip98-176-17-38.sd.sd.cox.net] has quit [Quit: WeeChat 0.3.5]