00:15:45 Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has joined #scheme 00:46:39 -!- trusktr [~trusktr@130.86.99.179] has quit [Ping timeout: 260 seconds] 00:53:34 trusktr [~trusktr@130.86.99.179] has joined #scheme 00:54:57 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 00:54:57 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Changing host] 00:54:57 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 00:55:18 -!- amgarchIn9 [~amgarchin@p4FD62853.dip0.t-ipconnect.de] has quit [Ping timeout: 264 seconds] 01:20:01 -!- MrFahrenheit [~RageOfTho@77.221.25.95] has quit [Ping timeout: 248 seconds] 01:28:33 -!- tertl3 [6c551097@gateway/web/freenode/ip.108.85.16.151] has quit [Quit: Page closed] 01:36:17 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 01:50:19 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 02:08:06 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 02:11:11 rszeno [~rszeno@79.114.105.31] has joined #scheme 02:36:20 juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has joined #scheme 02:45:15 -!- youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 02:46:19 -!- miql [~miql@ip72-201-117-127.ph.ph.cox.net] has quit [Ping timeout: 246 seconds] 02:58:41 adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has joined #scheme 03:04:10 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 246 seconds] 03:04:40 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 03:05:07 -!- juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has quit [Remote host closed the connection] 03:05:24 -!- preflex_ is now known as preflex 03:06:07 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Ping timeout: 256 seconds] 03:08:06 -!- dessos [~dessos@c-174-60-176-249.hsd1.pa.comcast.net] has quit [Ping timeout: 256 seconds] 03:08:21 dessos [~dessos@c-174-60-176-249.hsd1.pa.comcast.net] has joined #scheme 03:15:28 -!- Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 256 seconds] 03:22:18 -!- adiii [~adityavit@NYUFWA-WLESSAUTHCLIENTS-04.NATPOOL.NYU.EDU] has quit [Ping timeout: 264 seconds] 03:22:59 -!- Triclops256|away is now known as Triclops256 03:26:15 sablib [~sabayonus@119.98.62.32] has joined #scheme 03:28:51 adiii [~adityavit@NYUFWA-WLESSAUTHCLIENTS-04.NATPOOL.NYU.EDU] has joined #scheme 03:30:12 jarod_ch_ [~jarod_che@115.205.239.230] has joined #scheme 03:32:38 -!- Triclops256 [~Triclops2@Powder/Developer/Triclops200] has quit [Quit: ZNC - http://znc.in] 03:33:20 Triclops256 [~Triclops2@Powder/Developer/Triclops200] has joined #scheme 03:36:21 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 03:38:44 Euthy [~euthy@unaffiliated/euthydemus] has joined #scheme 03:40:13 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Ping timeout: 276 seconds] 03:52:37 -!- youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 03:56:30 -!- eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Ping timeout: 264 seconds] 04:00:31 Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has joined #scheme 04:01:24 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 04:02:30 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 256 seconds] 04:02:46 -!- preflex_ is now known as preflex 04:07:11 -!- rszeno [~rszeno@79.114.105.31] has quit [Quit: Leaving.] 04:09:48 tenq [~tenq@ip68-100-228-234.dc.dc.cox.net] has joined #scheme 04:26:51 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 04:29:57 -!- wbooze [~wbooze@xdsl-78-35-180-172.netcologne.de] has quit [Ping timeout: 248 seconds] 04:37:36 -!- Triclops256 is now known as Triclops256|away 04:51:54 -!- adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has quit [Read error: No route to host] 04:52:14 adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has joined #scheme 05:00:49 -!- trusktr [~trusktr@130.86.99.179] has quit [Ping timeout: 276 seconds] 05:02:32 -!- youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Remote host closed the connection] 05:11:19 -!- Kobain [~kobian@unaffiliated/kobain] has quit [Ping timeout: 245 seconds] 05:12:25 Kobain [~kobian@unaffiliated/kobain] has joined #scheme 05:12:45 -!- Kobain [~kobian@unaffiliated/kobain] has quit [Client Quit] 05:18:00 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 05:19:28 jrapdx [~jra@209.49.225.226] has joined #scheme 05:32:02 -!- Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 256 seconds] 05:33:19 -!- adiii [~adityavit@NYUFWA-WLESSAUTHCLIENTS-04.NATPOOL.NYU.EDU] has quit [Ping timeout: 276 seconds] 05:38:44 rszeno [~rszeno@79.114.105.31] has joined #scheme 05:52:49 agumonkey [~agu@45.217.72.86.rev.sfr.net] has joined #scheme 05:59:52 -!- jonrafkind [~jon@racket/jonrafkind] has quit [Ping timeout: 256 seconds] 06:28:16 weie [~eie@softbank221078042071.bbtec.net] has joined #scheme 06:46:14 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 06:47:36 adiii [~adityavit@c-76-117-52-187.hsd1.nj.comcast.net] has joined #scheme 06:52:48 jerryzhou [~slackerui@58.245.253.218] has joined #scheme 06:56:22 -!- adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has quit [Quit: adu] 06:59:11 joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 07:00:51 -!- jerryzhou [~slackerui@58.245.253.218] has quit [Remote host closed the connection] 07:19:43 jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has joined #scheme 07:23:36 juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has joined #scheme 07:36:46 -!- jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has quit [Ping timeout: 256 seconds] 07:38:07 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 276 seconds] 07:44:29 -!- juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has quit [Read error: Connection reset by peer] 07:48:22 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 07:55:11 cdidd [~cdidd@93-80-5-132.broadband.corbina.ru] has joined #scheme 07:57:06 -!- adiii [~adityavit@c-76-117-52-187.hsd1.nj.comcast.net] has quit [Ping timeout: 256 seconds] 08:03:19 lu_yu_hu [~lyhux@175.42.222.109] has joined #scheme 08:12:38 -!- sablib [~sabayonus@119.98.62.32] has left #scheme 08:15:13 weie_ [~eie@softbank221078042071.bbtec.net] has joined #scheme 08:18:13 -!- weie [~eie@softbank221078042071.bbtec.net] has quit [Ping timeout: 248 seconds] 08:19:43 -!- gravicappa [~gravicapp@ppp91-77-175-86.pppoe.mtu-net.ru] has quit [Ping timeout: 264 seconds] 08:35:24 juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has joined #scheme 08:41:52 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 08:45:31 -!- cdidd [~cdidd@93-80-5-132.broadband.corbina.ru] has quit [Ping timeout: 264 seconds] 08:53:24 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 245 seconds] 08:54:06 -!- jrapdx [~jra@209.49.225.226] has quit [Ping timeout: 264 seconds] 08:55:34 gravicappa [~gravicapp@ppp91-77-166-132.pppoe.mtu-net.ru] has joined #scheme 09:07:44 -!- robot-beethoven [~user@c-24-118-142-0.hsd1.mn.comcast.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 09:19:30 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 09:25:37 wingo [~wingo@cha74-2-88-160-190-192.fbx.proxad.net] has joined #scheme 09:26:10 cdidd [~cdidd@176.14.95.209] has joined #scheme 09:35:28 wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has joined #scheme 09:36:40 amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has joined #scheme 09:43:12 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 09:46:52 araujo [~araujo@190.73.45.171] has joined #scheme 09:46:52 -!- araujo [~araujo@190.73.45.171] has quit [Changing host] 09:46:52 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 09:49:23 LAMMJohnson [~ja@user-5af436df.broadband.tesco.net] has joined #scheme 09:50:18 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 09:50:28 -!- juxovec [~juxovec@ip-37-188-227-224.eurotel.cz] has quit [Remote host closed the connection] 09:57:42 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 264 seconds] 09:59:51 -!- lu_yu_hu [~lyhux@175.42.222.109] has left #scheme 10:24:14 -!- amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has quit [Ping timeout: 245 seconds] 10:32:43 juxovec [~juxovec@88.103.13.78] has joined #scheme 10:37:18 -!- samrat [uid2534@gateway/web/irccloud.com/x-suknpzsdfkewnvtw] has left #scheme 10:47:46 Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has joined #scheme 10:55:14 -!- wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has quit [Quit: none] 11:09:46 -!- Fare [~fare@173-9-65-97-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 256 seconds] 11:13:39 Myk268 [~myk@adsl-71-149-245-243.dsl.mtry01.sbcglobal.net] has joined #scheme 11:15:13 -!- LAMMJohnson [~ja@user-5af436df.broadband.tesco.net] has quit [Ping timeout: 276 seconds] 11:15:52 -!- Myk267 [~myk@unaffiliated/myk267] has quit [Ping timeout: 276 seconds] 11:17:19 -!- cdidd [~cdidd@176.14.95.209] has quit [Ping timeout: 246 seconds] 11:21:01 LAMMJohnson [~ja@user-5af436df.broadband.tesco.net] has joined #scheme 11:40:47 pumpkin360 [~main@aagj174.neoplus.adsl.tpnet.pl] has joined #scheme 12:01:00 clear 12:01:08 sorry 12:07:34 -!- eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Ping timeout: 256 seconds] 12:09:51 -!- rszeno [~rszeno@79.114.105.31] has quit [Quit: Leaving.] 12:10:14 wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has joined #scheme 12:33:14 rage_ [~rage@unaffiliated/ffs] has joined #scheme 12:34:07 -!- acedia [~rage@unaffiliated/ffs] has quit [Ping timeout: 264 seconds] 12:43:32 -!- wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has quit [Quit: none] 12:53:31 wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has joined #scheme 12:59:42 lu_yu_hu [~lyhux@175.42.222.109] has joined #scheme 13:00:02 #j #centos 13:02:54 MrFahrenheit [~RageOfTho@77.221.25.95] has joined #scheme 13:05:07 jao [~jao@118.Red-83-41-22.dynamicIP.rima-tde.net] has joined #scheme 13:05:10 -!- jao [~jao@118.Red-83-41-22.dynamicIP.rima-tde.net] has quit [Changing host] 13:05:10 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 13:05:37 cdidd [~cdidd@93-80-113-249.broadband.corbina.ru] has joined #scheme 13:09:49 htor [165479@safir.ifi.uio.no] has joined #scheme 13:13:04 hi! 13:14:54 (for-each (display "hello world!\n") (get-user-nicks '#scheme)) 13:15:18 -!- MrFahrenheit [~RageOfTho@77.221.25.95] has quit [Quit: Leaving] 13:16:35 aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #scheme 13:20:57 Chaos`Eternal [~chaos@180.174.223.39] has joined #scheme 13:21:52 MrFahrenheit [~RageOfTho@77.221.25.95] has joined #scheme 13:24:03 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 13:24:04 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Changing host] 13:24:04 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 13:26:49 -!- rage_ is now known as sonstwo 13:37:40 -!- bjz_ [~brendanza@125.253.99.68] has quit [Ping timeout: 256 seconds] 13:52:09 is using for-each totaly okey with the scheme programing style ? 13:52:53 Mm? 13:53:30 well it isn't a proper loop but it is some kind of loop and scheme used the avoid them 13:53:36 like 13:55:32 ((lambda (x) (display "hello world!\n")) (get-user-nicks '#scheme) 13:56:08 looks much nicer, even contains one lambda in it ! 13:56:44 for-each is a loop 13:56:47 for-each look like some ruby style syntax, awful 13:57:14 (for-each (lambda (p) (...)) people) 13:57:39 sorry my fault. 13:57:53 it should be something like hmmm... 13:57:53 The point of lisp and its macros is that you define your own language. 13:57:58 Read again chapter 4 of sicp! 13:58:13 I'm ending chapter 3 so far 13:58:26 chapter 4 describes macros. 13:58:27 ? 13:58:33 *? 13:58:46 It describes metalinguistic abstraction. 13:59:37 ((lambda (x) (cond ((pair? x) (display "hello world!\n")) 13:59:48 nvm 14:00:37 but it can be done without for-each. Isn't using tail recursion insead of loops more scheme style ? 14:00:54 I mean/ 14:01:33 I mean. If you define loops by macros it isn't thought as a bad style or something ? 14:02:28 introom [~Eddie@th130213.ip.tsinghua.edu.cn] has joined #scheme 14:02:45 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Ping timeout: 248 seconds] 14:04:30 loops are just not defined in the core language and it is up to you if you use them or not, right ? 14:04:44 (except for-each) 14:06:04 Hrm? r5 defines quite a few looping constructs 14:06:13 map, for-each, loop, named let 14:06:48 Personally I quite like a pair of constructs I call gather-while and gather-until 14:07:01 ok then, I must learn bit more. Wikipedia isn't a good source. and I forgot about map which I often used. 14:07:25 jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has joined #scheme 14:07:51 pumpkin360: you can read the Scheme standard itself, it's not that big. 14:08:04 Yeah.. r5 is a nice read 14:08:06 will try too. 14:08:08 Don't read r6 though 14:08:09 *to 14:08:13 why 14:08:14 ? 14:08:28 r6 got a bit too big and sprawling, wait for r7, or read some of the drafts 14:08:28 because r7rs retconned r6rs 14:08:39 Hehe.. retconned.. good word :) 14:08:56 http://trac.sacrideo.us/wg/raw-attachment/wiki/WikiStart/r7rs-draft-9.pdf 14:09:08 if there's a new draft it should be linked on this page: http://scheme-reports.org/ 14:09:18 read that r6 gave up some nice ideas. 14:09:38 Ooh, draft 9. *reads* 14:09:51 When is r7 possibly going to be released ? 14:10:17 pumpkin360: you can use r7rs Schemes already. e.g. https://code.google.com/p/chibi-scheme/ 14:11:52 I wonder if racket will add an r7rs. they have an r5rs. 14:12:51 Also I really like the two-level split in R7. I wish other languages (e.g. C) did this 14:13:38 pt [5b891484@gateway/web/freenode/ip.91.137.20.132] has joined #scheme 14:14:04 I don't like the idea personally. I do not have big experience but I don't like it. 14:14:20 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 14:16:28 It's useful for the core -language- implementation to ignore all the boring "here's a big standard library of functions" part 14:16:39 isn't the language supposed to be universal? So what is the point in spliting it? Nevertheless I do not know the things they strip of it so can't tell 14:16:46 The core language doesn't need to know what's in the standard library, only needs to know that the standard library -can- be implemented atop it 14:17:30 the scheme curse.. 14:17:35 sorry 14:17:40 the lisp curse 14:17:59 every body invent their own wheel 14:18:06 LeoNerd: actually, not all of r7rs-large can be implemented in r7rs-small, afaik. I remember talking to some of the standardization people in this channel a while back (maybe a year ago? has it really been that long?) 14:18:11 and, every body done the 80% of job 14:19:14 Chaos`Eternal: it's not unique to lisp. if you want to see reinventing the wheel, look at KDE. all they need is a shell, a filesystem, and a kernel! https://en.wikipedia.org/wiki/Template:KDE 14:19:37 that's why i stopped using kde 10 years ago 14:19:58 so the language itself should be small and the standard libraries big and I don't see the point in spliting the language in two - one with the libraries and second without them and that's what they are trying to make if I understande it correct. 14:20:24 Chaos`Eternal: unfortunately, minimalism is now the new cool thing to do, so I've recently switched back to KDE just to use 1% of it because the other desktops don't offer even that. 14:20:48 but KDE is HEAVY... 14:21:17 if you really want minialism, aeth , i suggest you follow my road, using a user defined .xsession, running awesome, and xterm etc. 14:21:21 yes, but KDE also handles two equally important monitors (not one primary and one secondary, the typical *laptop* use case) 14:21:56 but that's not the point, 14:22:01 urxvt is nicer from what i heard (the server/client mode particularly) 14:22:18 client/server was interesting in 1990, but we've moved on now 14:22:28 my point is that there are two way for schemers, one is die with r5rs, one get eternal with r6rs 14:22:29 haha 14:22:30 fork is cheap. shared libraries are cheap. terminals are tiny compared to most things desktops run 14:23:06 pumpkin360, most urxvt benchmarks are cheats... 14:23:17 i can run the same speed as in xterm 14:23:33 and, i use tmux for session multiplexing 14:23:33 My terminal is ~10 times faster than xterm at fast "cat big text file to screen" output 14:23:43 LeoNerd: client/server is still useful for many things. 14:23:51 aeth: Sure; but I meant specifically in a terminal 14:24:02 LeoNerd, then you must using vte-based terminalls 14:24:16 Chaos`Eternal: No, I meant my terminal. The one I wrote 14:24:17 which has a large memory foot-print 14:24:22 :) 14:24:26 awesome 14:24:30 show me the url 14:24:36 i will switch to that 14:24:39 https://launchpad.net/pangoterm 14:24:45 well, my three most used apps are emacs, my terminal, and Firefox. having them always up in the background even when not open wouldn't be a bad idea. well, except for Firefox. restarting it to free RAM is useful. :-P 14:25:16 pt 14:25:28 aeth: For me, starting a new -terminal- is so fast I can't see a delay between my hitting Win+t and the window appearing. There's then a delay while bash reads my monster-sized .bashrc 14:25:46 Chaos`Eternal: ? 14:26:00 LeoNerd, still libvte based? 14:26:04 firefox is memory hungry - it eats up 1/8 of my ram and that's all I ever use. Maybe excep when I make 10^9 array... 14:26:32 chrome always eat up my 90% of memory 14:26:53 Chaos`Eternal: No, it's libvterm-based. A library I also wrote. Go read it, really :P 14:27:02 .oO( Because libvte is crazy ) 14:27:05 chrome doesn't have pentadactyl and that's quite cool, even if it is in alpha phase. 14:27:13 really.. 14:27:46 LeoNerd: well, I was thinking about an added benefit would be persistent sessions (although I'm not sure if urxvt does this)? although I currently use tmux, which also tiles, so I wouldn't really use that feature. 14:28:00 LeoNerd, sound promising... 14:28:07 shall try 14:28:13 aeth: Yeah; that's a feature for a terminal multiplexor, such as screen or tmux; not of the terminal -itself- 14:28:19 aeth: This is Unix. "Do one small thing well" 14:28:41 The thing my terminal does is takes bytes and turns them into pretty pixel patterns on the screen. 14:29:26 sucklesstools made a similar featureless terminal, didn't they? 14:29:27 LeoNerd: Unix still follows the Unix philosophy? 14:30:10 aeth: Some of them do. I don't feel that OS X does 14:30:59 we went a bit far from discussing the nice language this channel is about. From pure curiosity, did any of you create a usable program in scheme ? 14:31:27 and is there a good curses library for scheme (using chicken one right now) 14:31:35 ? 14:31:38 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 14:31:40 Curses? Why not Tickit? ;) 14:31:50 .oO( Someone could just write a Tickit scheme binding ) 14:32:26 so is there a good/decent terminal graphics library ? 14:32:41 anybody know how to sort large data use scheme? 14:33:02 lu_yu_hu: "large" is very vague 14:33:03 dunno, merge sort ? 14:33:21 How large is large? Does it fit in one process? One machine's RAM? One machine's disk? Is it too big to fit in 1000 machines' hard disks? 14:33:39 480000 words 14:33:43 ... 14:33:44 big ? 14:33:52 Hah. That's tiny by some standards 14:33:59 do it in exel... 14:34:13 ;-) 14:34:26 If it will all fit in physical (not swapped) RAM of one process, it's not big 14:34:32 I'm pretty sure my frient told me he manipulated such data in exel. 14:34:48 i want to find an words like "sowt stow swot tows twos wost wots " 14:34:54 I used to work at Google - "big" is data that can't fit in fewer than, say, 100 machines' hard disks. :) 14:35:40 pumpkin360, why not wrap dialog? 14:35:50 for small programs 14:35:54 do all the smart people work/(used to work) at google ? 14:36:41 what do you mean by "wrap dialog"? Like using C library in scheme? 14:37:19 no, just system / pipeopen in scheme 14:37:34 hmm, i can do this using my guile-scsh 14:37:44 a guile port of scheme shell 14:37:49 LeoNerd: do you know how to do it ? 14:37:52 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Ping timeout: 246 seconds] 14:37:53 which make such live easier 14:38:14 s/live/life/ 14:38:51 does the guile-scsh or scheme48-scsh work properly on a 64-bit system ? 14:39:27 guile-scsh can, because it's pure scheme code 14:39:37 good. 14:39:47 scheme48-scsh can't, i can't even compile them 14:39:51 something wrong 14:40:06 but there are no compilers/interpretes with a good curses library ? 14:40:17 (used chicken but wouldn't call it good) 14:41:10 "good curses" is an oxymoron, IMHO 14:41:12 wasn't aware scsh was available via guile scheme, good to know. Now I will install it and not bother learning essentiall thing like bash 14:41:43 well, is a good solution to write a terminal snake then ? 14:42:16 Personally, I wouldn't. I'd use my own Tickit library. But then I'm biased as I wrote it :) 14:44:53 is it availiable for scheme ? What interpreter/compiler and even where can I find it - I don't like thing that are not trivial to google/. 14:45:50 AFAIK no Scheme binding yet.. It's a C library 14:45:55 Has Perl and Python bindings currently 14:47:00 are you planing to make the bindings ? 14:47:30 Not directly because I have no idea how to, but I'd be happy to help/support anyone who did 14:49:16 Neither do I but I will perhap try to do some research. I would like to get my hands dirty in some reall life coding and maybe this would be a good opportunity. With some luck I will have holiday in 3 days (for like 4 months) 14:49:41 although I'm not sure if scheme is a good 14:50:03 language for introduction in "real life coding" 14:50:06 :P 14:53:02 adiii [~adityavit@c-76-117-52-187.hsd1.nj.comcast.net] has joined #scheme 14:53:56 okay, I guess that guy with lots of self writen software on his side is you. If I would find it interesting to port your library I will write. 14:54:04 gtg, bay bay for now. 14:56:03 haha 14:56:10 that's lisp curse 14:57:00 big guys make wheel for their own, but not suitable for other, because only 80% of the work has been done 14:57:39 so you can't use it, the remaining 20% forbids you 14:57:52 bjz [~brendanza@125.253.99.68] has joined #scheme 15:02:37 -!- pt [5b891484@gateway/web/freenode/ip.91.137.20.132] has quit [Quit: Page closed] 15:07:24 jonrafkind [~jon@racket/jonrafkind] has joined #scheme 15:07:42 -!- jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has quit [Ping timeout: 252 seconds] 15:15:42 amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has joined #scheme 15:25:04 so I should make myself a library to create a nice termianal snake, sound great. Love scheme anyway. 15:25:15 *sounds 15:27:04 terminal based snake game?... 15:28:03 yeah, I mean a standar snake game - 50 line program, more if you want some needless features 15:30:30 it's the Lisp curse that this hasn't already been written in an easy way. you should just (import (snake game)) ;-) 15:31:21 lol 15:31:32 :) 15:33:00 it's not too late to add it to r7rs-extra-large. 15:34:01 why not. 15:35:06 I want to see a programming language that makes printing and string operations nearly impossible, but has a special hello world library you can import to make that special case trivial. 15:36:52 you can avoid the Lisp curse by making everything so hard to do that the only tasks easily doable are library imports. 15:39:29 aeth, that's what c++/java/ruby/pythons are doing... 15:39:55 well, these are mortal languages 15:40:10 actually... with Python the issue is speed. that's why you import. 15:40:16 eternal languages like scheme don't need to be like that 15:41:01 http://paulgraham.com/hundred.html 15:41:21 are you sure it's Scheme and not Arc? ;-) 15:42:06 -!- yacks [~py@180.151.36.168] has quit [Ping timeout: 264 seconds] 15:46:52 -!- eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has quit [Ping timeout: 256 seconds] 15:46:54 -!- introom [~Eddie@th130213.ip.tsinghua.edu.cn] has quit [Ping timeout: 264 seconds] 15:47:19 introom [~Eddie@202.112.3.7] has joined #scheme 15:47:37 is guile-scsh stable at all? Wondering if I'm uncomfortable enough with zsh to change. 15:48:22 -!- lu_yu_hu [~lyhux@175.42.222.109] has left #scheme 15:48:25 pumpkin360, I don't suggest use it to replace zsh 15:48:55 because i haven't written a filename completing for it 15:49:14 and also, no job management, so ctrl-z wont work 15:49:25 only for scripting 15:50:27 and, I found use it in emacs with geiser-mode connected a separate terminal running guile --listen is wonderful 15:51:35 yacks [~py@180.151.36.168] has joined #scheme 15:52:21 so you're the one maintaining it ? 15:52:22 nice. 15:52:33 yes 15:54:12 bug-reports, patches are welcome! 15:56:25 how do You access the system resources from guile? 15:56:48 you mean? fork? file? 15:57:00 guile have posix interface 15:57:31 -!- amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has quit [Ping timeout: 264 seconds] 15:57:42 scsh is a sh written in scheme? 15:59:02 something like that 15:59:08 not exactly 15:59:10 #t 15:59:27 scsh is a shell using scheme syntax 15:59:47 and with scheme advantages 16:00:31 is it like eshell, where you mix (+ 1 1) kind of s-expressions with regular Unix shell command line arguments like ls -l if no parentheses are given? 16:00:43 or does it have its own syntax for calling programs, too? 16:01:14 (run (ls -l)) is the syntax of scsh 16:01:32 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 16:01:39 ah 16:02:10 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Ping timeout: 256 seconds] 16:02:25 and the underlaying sh which runs (ls -l) is 16:03:06 tupi [~user@189.122.61.44] has joined #scheme 16:03:11 no other underlying shell 16:04:22 so what runs the (ls -l) 16:04:23 ? 16:04:29 scsh ? 16:04:30 -!- ASau [~user@p5797E672.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 16:04:47 run is a macro, the code above will be replaced by code like (wait (fork (exec (list (stringify 'ls) (stringify '-l))))) 16:05:49 tupi` [~user@189.122.61.44] has joined #scheme 16:05:54 pt [~pt@84.114.230.154] has joined #scheme 16:07:11 scsh _is_ a shell; I doubt it will invoke bash or sh unless you explicitly ask it to. 16:07:11 ASau [~user@p5797E672.dip0.t-ipconnect.de] has joined #scheme 16:07:20 that's the whole point. 16:07:30 Hmm... r7 is looking a bit odd in places. It specifies delete-file but not really any other file-related operations 16:07:32 I wonder why 16:08:08 ask jcowan 16:08:13 rudybot: seen jcowan 16:08:13 offby1: jcowan was seen in #scheme two days ago, saying "Probably ~X doesn't understand 4-digit years in your implementation.", and then jcowan was seen leaving the channel in #scheme two days ago, saying ""Leaving"" 16:09:57 -!- tupi` [~user@189.122.61.44] has quit [Ping timeout: 240 seconds] 16:10:13 tupi` [~user@189.122.61.44] has joined #scheme 16:10:23 -!- tupi [~user@189.122.61.44] has quit [Ping timeout: 256 seconds] 16:11:36 I love that all the talk of r6rs is "I _heard_ Such and such" and not "I _know_ such and such" 16:11:49 you love that, eh? 16:11:53 You must be a happy feller 16:12:02 at this point, it's basically a bogeyman 16:12:21 I heard r6rs eats children whole while singing off-key 16:12:27 well, I heard that most Scheme implementations didn't implement r6rs, so it's hard to try it out. 16:12:51 I think a few of the bigger ones have done. 16:12:57 Racket, probably three or four others. 16:12:58 tupi`` [~user@189.122.61.44] has joined #scheme 16:13:15 aeth: yeah, only about 8 or 9 or so 16:13:22 totally none of them 16:14:03 if you want to play that game, most Scheme implementations don't implement r5rs or r4rs, and won't r7rs 16:14:08 lol 16:14:14 because most scheme implementations aren't 16:14:22 ijp: it was a joke, I literally began my sentence with "well, I heard that..." 16:14:32 sorry, I didn't put a ;-) or :-P because I thought it was obvious, but I guess Poe's. 16:15:06 aeth: I apologize for not noticing. 16:16:56 offby1: no, my fault for not putting a smilie. Poe's law exists for a reason. 16:17:16 -!- tupi`` [~user@189.122.61.44] has quit [Ping timeout: 246 seconds] 16:17:28 -!- tupi` [~user@189.122.61.44] has quit [Ping timeout: 256 seconds] 16:17:29 tupi`` [~user@189.122.61.44] has joined #scheme 16:19:12 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 16:27:16 miql [~miql@ip72-201-117-127.ph.ph.cox.net] has joined #scheme 16:29:26 jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has joined #scheme 16:29:30 -!- pt [~pt@84.114.230.154] has quit [Ping timeout: 264 seconds] 16:31:46 -!- introom [~Eddie@202.112.3.7] has quit [Quit: introom] 16:32:25 -!- yacks [~py@180.151.36.168] has quit [Ping timeout: 276 seconds] 16:44:01 pt_ [~pt@84.114.230.154] has joined #scheme 16:48:20 -!- pjb [~t@AMontsouris-651-1-109-2.w83-202.abo.wanadoo.fr] has quit [Ping timeout: 252 seconds] 16:56:02 -!- pt_ [~pt@84.114.230.154] has left #scheme 16:56:24 -!- pumpkin360 [~main@aagj174.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 260 seconds] 16:58:51 -!- Chaos`Eternal [~chaos@180.174.223.39] has quit [Quit: it is a good day to die!] 17:05:20 pt_ [~pt@84.114.230.154] has joined #scheme 17:07:37 rszeno [~rszeno@86.125.253.152] has joined #scheme 17:13:11 -!- wbooze [~wbooze@xdsl-78-35-154-83.netcologne.de] has quit [Ping timeout: 260 seconds] 17:13:53 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 17:15:53 -!- Myk268 [~myk@adsl-71-149-245-243.dsl.mtry01.sbcglobal.net] has quit [Quit: Ack! Hans, run! It's the lhurgoyf!] 17:16:16 Myk267 [~myk@unaffiliated/myk267] has joined #scheme 17:18:56 wbooze [~wbooze@xdsl-78-35-191-76.netcologne.de] has joined #scheme 17:27:37 -!- wbooze [~wbooze@xdsl-78-35-191-76.netcologne.de] has quit [Read error: Connection reset by peer] 17:32:20 -!- tenq [~tenq@ip68-100-228-234.dc.dc.cox.net] has quit [Ping timeout: 256 seconds] 17:35:19 wbooze [~wbooze@xdsl-78-35-191-76.netcologne.de] has joined #scheme 17:39:22 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Ping timeout: 276 seconds] 17:39:32 przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has joined #scheme 17:40:39 -!- pt_ [~pt@84.114.230.154] has quit [Read error: Operation timed out] 17:43:57 pt [~pt@84.114.230.154] has joined #scheme 17:45:31 tenq [~tenq@ip68-100-228-234.dc.dc.cox.net] has joined #scheme 17:47:59 what exactly is a domain-specific language when talking about lisp and scheme? macros? or some well-defined "language" that you construct in scheme syntax, with procedures and data structures? 17:48:38 in the latter case, a language for rational numbers for instance 17:49:39 whats a language for rational numbers 17:50:27 jonrafkind: operations on data structures for manipulating (the concept of) rational numbers 17:50:46 this idea is taken directly from scip 17:51:38 anyway you can make up all the procedures and whatnot you need then write macros to make it look nice 17:52:20 there is no line that you cross to become a 'domain specific language' but when its suitably far from scheme you can plausibly call it its own language 17:54:06 -!- adiii [~adityavit@c-76-117-52-187.hsd1.nj.comcast.net] has quit [Ping timeout: 264 seconds] 17:56:56 jonrafkind: that's true. when i'm talking about a 'domain language' i mean a language suitable for formulating processes in a specific domain. like the circuit language or the logic language, but yes, still it's scheme, and it has the same evaluation rules and underlying semantics 17:57:27 well you can change the evaluation rules and semantics with macros 17:57:46 okey, now i think we're onto something 17:57:48 not of scheme of course 17:57:51 but of your new language 17:58:00 yes, exactly 17:58:45 i haven't played around with making macros in scheme 17:58:53 i haven't looked at sicp in a while but i imagine you can just get away with writing some procedures to manipulate the data structures 17:58:59 real+ instead of + or whatever 17:59:12 I think a lot of people use the same rule for dsls as for pornography, "I'll know it when I see it" 17:59:24 macros are good if you want to change evaluation rules or create binding forms 18:00:12 jonrafkind: r5rs says "( ...)" is the macro-syntax 18:00:22 yea 18:00:27 that's a bit confusing to me 18:00:33 so you cant change the underlying shceme syntax from s-expressions 18:00:46 it means (my-macro anything goes here ...) 18:00:57 where my-macro gets the entire s-expression and does anything it wants to it 18:01:07 jonrafkind: in terms of scheme-expressions? 18:01:10 yes 18:01:13 okay 18:01:30 r5rs is painfully weak in that it only has syntax-rules but with other schemes you get syntax-case 18:02:56 jonrafkind: so macros are for defining new language constructs? like primitives? 18:03:11 yea 18:03:26 How does syntax-case differ from syntax-rules ? 18:03:27 i mean a primitive is just something that is defined by the implementation 18:03:39 LeoNerd: arbitrary computation 18:04:11 you can't e.g. implement 'include' with syntax-rules 18:04:15 Hmmm 18:04:22 but a macro lets you do arbitrary (with syntax-case) syntax modification which lets you hide the fact that constructs are really implemented with other syntax 18:05:02 jonrafkind: couldn't one do that with (set!)-ing primitives to something else? 18:05:12 you can also selectively break hygiene, if you so choose 18:05:19 Ahh 18:05:29 htor, I suppose that would work 18:05:57 htor: try implementing 'cond' as a procedure 18:06:29 you'll end up with something that requires a whole heap of lambdas to properly delay computation 18:06:47 ijp: hmmm, i think i did something similar when making a metacircular evaluator 18:07:00 without writing a whole new interpretetr 18:07:10 :-D 18:08:08 ijp: could perhaps deal with it using define-syntax? (don't know yet) 18:08:17 yes, this its purpose 18:09:29 i really like scheme, it makes my brain think again 18:12:50 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 18:12:50 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Changing host] 18:12:50 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 18:12:53 https://gist.github.com/5608470 is cond as a procedure, just because I felt silly 18:13:21 note the ridiculous number of thunks 18:14:07 ijp: oh, you! 18:15:53 ijp: i see you like sicp 18:16:06 less than I used to 18:17:41 ijp: oh really? i'm using it for my course this semester. i like the little schemer better for learning the basics though 18:22:40 adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has joined #scheme 18:24:55 by the way, always wondered what's the convention for commenting? one, two or three for comments? 18:25:18 three semi-colons that is 18:25:32 -!- miql [~miql@ip72-201-117-127.ph.ph.cox.net] has quit [Ping timeout: 256 seconds] 18:28:01 one for sorrow, two for joy, three for a girl, four for a boy, five for silver, six for gold, seven for a secret never to be told 18:29:04 -!- wbooze [~wbooze@xdsl-78-35-191-76.netcologne.de] has quit [Quit: none] 18:29:15 http://community.schemewiki.org/?comment-style 18:30:52 ;;; Frobbotz gargle blatz? 18:30:54 -!- jeapostrophe [~jay@racket/jeapostrophe] has quit [Ping timeout: 245 seconds] 18:31:04 gesundheit 18:31:57 genau 18:36:25 cinolt [~cinolt@108-230-150-77.lightspeed.bcvloh.sbcglobal.net] has joined #scheme 18:36:38 Why is there no let*/letrec analogue of named let? 18:37:52 how would that work? 18:38:53 they would bind sequentially/recursively only the first time? 18:39:27 why not the other times? 18:40:17 then please explain how you think this should work? 18:41:18 in particular, what does (let* loop ((a 1) (b 2)) .... (loop a a)) expand to? 18:41:45 s/does/should/ 18:42:13 -!- juxovec [~juxovec@88.103.13.78] has quit [Ping timeout: 248 seconds] 18:42:34 In that case, a=1, b=2, then a=1, b=1, and stays that way 18:42:37 That's what I would think anyway. 18:42:45 no, what does it _expand_ to 18:43:09 Not sure what expanding means in this context. 18:43:48 (let ((a 1)) b) can be thought of as a transformation into ((lambda (a) b) 1) 18:44:11 and (let* ((a b) (c a)) d) into (let ((a b)) (let ((c a)) d)) 18:44:20 cinolt: what should let* transform into? 18:44:30 named let* 18:45:26 Beats me. 18:45:43 so, you have no idea about how you expect this form you desire to behave? 18:45:58 great, that's a good reason not to have it 18:46:12 TBH it was more of a question of curiosity than that of "accusation". 18:46:22 cinolt: because it doesn't make sense 18:47:12 Maybe if I saw how named let expands, I'd be able to get a better picture. 18:47:18 yacks [~py@180.151.36.168] has joined #scheme 18:47:43 (let loop ((a b) (c d)) e) -> (letrec ((loop (lambda (a c) e))) (loop b d)) 18:48:37 I expect this question would never have arisen had someone named this form "loop" rather than extending let 18:49:18 i must say, this is very short: http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html#%_idx_198 18:49:19 http://tinyurl.com/5ehmz2 18:52:05 any particular good resources for learning about scheme macros? 18:52:10 presumably, you are after some form of sequential binding in the loop recurrence 18:52:41 which means, now the loop identifier needs to be bound to syntax, rather than a function 18:53:06 secondly, you can achieve this much more clearly by nesting a let* inside your loop 18:53:35 also, what is meant by "hygiene" when talking about macros? 18:54:07 and a named letrec, where every time round the loop you need a different set of recursively defined functions, seems like an extremely pathological usecase 18:54:08 wbooze [~wbooze@xdsl-78-35-191-76.netcologne.de] has joined #scheme 18:54:51 htor: the analogy is close to that of lexical scoping for functions 18:55:20 identifiers used in macros use the definitions at their definition site, not their use site. and identifiers internal to the macro cannot leak out. 18:55:47 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 18:57:42 ijp: okay, thanks! 18:58:41 -!- hiroakip [~hiroaki@77-20-192-229-dynip.superkabel.de] has quit [Ping timeout: 256 seconds] 18:58:42 cinolt: so presumably you wanted something like (let* loop ((a b) (c d)) e (loop 10 a)) -> (let* ((a b) (c d)) (letrec ((loop (lambda (a c) e (let ((a 10) (b a)) (loop a b))))) (loop a c))) 18:59:47 well, s/loop/lp/ in the output 19:00:40 which I can honestly see little use for in anything approaching sane code 19:02:27 I'd have to spend time analyzing that expansion. The question came to me when I was coding something along the lines of: (let* loop ((a 5) (b (+ a 1))) (if (zero? a) b (loop (- a 1) b))) 19:02:39 Which didn't seem too far off at first glance. 19:02:59 cinolt: which was what I suggested the first time, and you poo-pooed it 19:06:14 thou shal't poo on thine fellow schemer 19:06:42 hiroakip [~hiroaki@77-20-192-229-dynip.superkabel.de] has joined #scheme 19:07:02 *shall not 19:09:19 -!- przl [~przlrkt@p4FE64445.dip0.t-ipconnect.de] has quit [Quit: leaving] 19:09:33 cinolt: anyway, setting aside how common this use case actually is. The real reason is that scheme basically doesn't believe in the concept of a standard library 19:09:49 you get a few nods to practicality, but not much 19:16:43 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 19:18:15 ijp: So the expansion makes sense. I still don't see why it's not considered to be sane? The example I gave doesn't seem to be unreasonable. 19:23:15 no, that is reasonable. It was the other interpretation that is insane 19:24:27 There was another interpretation? 19:25:02 so you haven't been reading what I have been writing? 19:25:14 well, that's lovely 19:25:14 -!- rszeno [~rszeno@86.125.253.152] has left #scheme 19:26:10 -!- youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Read error: Operation timed out] 19:26:58 Not everything is as evident to others as it's evident to you. 19:27:11 cinolt: sequential/recursive binding before each recursion. Which you implied when you asked "why just the first time" 19:27:33 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 19:27:37 trusktr [~trusktr@130.86.99.179] has joined #scheme 19:27:53 just wrap the named let in a let* 19:28:15 they would bind sequentially/recursively only the first time? why not the other times? 19:28:30 presumably, you are after some form of sequential binding in the loop recurrence 19:28:38 cinolt: so presumably you wanted something like (let* loop ((a b) (c d)) e (loop 10 a)) -> (let* ((a b) (c d)) (letrec ((loop (lambda (a c) e (let ((a 10) (b a)) (loop a b))))) (loop a c))) 19:30:24 which, as I said, is insane 19:30:43 gleag [~gleag@71.175.broadband2.iol.cz] has joined #scheme 19:30:45 -!- tupi`` [~user@189.122.61.44] has quit [Ping timeout: 248 seconds] 19:30:45 So I was looking into "Simply Scheme" as a good way to relaunch me into SICP, but it seems they use a library or something and/or not show how to write some of the basic functions they build examples off of... Am I missing something? 19:33:24 probably not :) 19:33:38 finding a working Scheme with which to follow along SICP is a notorious challenge. 19:33:44 I'm not aware of any easy way to do it. 19:33:57 There's supposedly some PLaneT package for Racket that helps, but I suspect it's unmaintained. 19:35:14 youlysse` [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 19:35:15 "Within a pattern the identifier ... must follow the last element of a nonempty sequence of subpatterns." does this mean i have to include the ellipsis after my define-syntax patterns, always? 19:36:33 -!- youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Ping timeout: 248 seconds] 19:41:01 no 19:41:09 it just means if it's there, it's gotta be the last thing. 19:41:18 typical confusing wording :-| 19:41:48 offby1: thanks, my mind was confused 19:42:27 what is the function of the ellipsis? 19:43:06 it allows you to match zero or more of a pattern 19:43:28 otherwise, your macros couldn't be very general 19:43:41 well, I suppose you could use improper lists 19:44:27 ijp: okay, so what does that mean in the pattern "(for element in list body ...)"? 19:44:46 it means, try to match the body pattern, zero or more times 19:45:24 ijp: so the ellpsis functions as a * from regex? 19:45:31 here body is a variable, so that pattern will match any list that begins with 'for' and has at least 3 arguments (one for element, one for in, and one for list) 19:46:01 htor: yes, except you also use it in templates 19:46:54 ijp: okay, i have a little problem using my new less-than syntax here.. 19:47:02 so, for let, you have a pattern (let ((var val) ...) body ...), and a template ((lambda (var ...) body ...) val ...) 19:47:45 ijp: that makes sence 19:47:49 *sense 19:48:09 (define-syntax less-than 19:48:10 (syntax-rules () 19:48:10 ((x less-than y) 19:48:11 (< x y)))) 19:48:17 what's wrond with this? 19:48:24 *wrong 19:48:34 because the macro keyword must come at the beginning 19:49:10 so, there 'x' is 'less-than', and you end up with (< less-than y) which will error 19:49:35 or at least, you would, if it ever applied the less-than rule, which it can't 19:50:02 it's erroring on me, yes 19:50:05 htor: in short, you can't write an infix macro, or a postfix macro 19:50:20 they are prefix, like the rest of lisp 19:50:45 huh, i just thought i read about someone creating infix macros.. 19:50:54 some people write a macro like (infix 3 + 4 / 5) 19:51:04 but note, the keyword at the beginning 19:51:40 guile supports srfi 105 (curly infix) which I am not at all fond of, but is available 19:51:59 not that i'll ever need infix expression while coding in scheme... 19:52:10 and that lets you do, e.g. {1 < 3} 19:53:09 but that doesn't do precedence IIRC 19:54:14 -!- pt [~pt@84.114.230.154] has quit [Ping timeout: 245 seconds] 19:55:38 but it allows you to do silly things like {(x) lambda (* x x)} 19:55:38 *htor* is defining a new lambda-syntax now.. let's see.. 19:56:54 adiii [~adityavit@NYUFWA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has joined #scheme 19:57:07 (define-syntax \l 19:57:07 (syntax-rules () 19:57:07 ((\l (parameters ...) body ...) 19:57:08 (lambda (parameters ...) body ...)))) 19:57:11 any good? 19:58:25 no, (\l x x) would fail 19:59:15 so would (\ (x . y) x) 19:59:27 (\l (x . y) x) ; oops 20:00:51 leppie: but isn't it an error to do (lambda (x x)) anyway? 20:01:22 that is, but (lambda a a) is not the same as (lambda (a a)) 20:01:46 oops, sorry misread that 20:03:09 -!- ASau [~user@p5797E672.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20:15:02 i've noticed that you can put anything for the first element of a pattern, i've seen _ used alot. is this normal? 20:15:40 pjb [~user@AMontsouris-651-1-109-2.w83-202.abo.wanadoo.fr] has joined #scheme 20:15:49 -!- pjb is now known as Guest61990 20:18:16 pt [~pt@84.114.230.154] has joined #scheme 20:25:06 htor: frankly, it doesn't matter, since it will always match the macro keyword 20:25:24 well, as long as it is an identifier 20:28:56 ijp: okay 20:29:00 htor: _ is sometimes used to denote "anything", although it could be anything that doesn't collide with another name 20:31:49 juxovec [~juxovec@88.103.13.78] has joined #scheme 20:33:40 Nisstyre: yeah, i recognized it from haskell conventions 20:33:54 not seen the use of (x:xs) in scheme yet 20:34:27 that would be (x . xs) ? 20:35:14 htor: in Racket: (match xs [(list-rest x xs) ...]) 20:36:09 -!- agumonkey [~agu@45.217.72.86.rev.sfr.net] has quit [Ping timeout: 256 seconds] 20:37:05 htor: anyway x is just the car of the list, and xs is the cdr 20:37:11 miql [~miql@ip72-201-117-127.ph.ph.cox.net] has joined #scheme 20:41:09 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 248 seconds] 20:51:13 -!- jewel [~jewel@105-237-24-43.access.mtnbusiness.co.za] has quit [Ping timeout: 248 seconds] 20:52:12 -!- juxovec [~juxovec@88.103.13.78] has quit [Remote host closed the connection] 20:54:26 Nisstyre: so basically, haskell has builtin pattern matching in lambda parameters? 20:54:53 htor: you can do pattern matching in various places, parameters being one of them 20:55:03 you can also do let pattern = foo in whatever 20:55:13 civodul [~user@reverse-83.fdn.fr] has joined #scheme 20:55:15 and case foo of; pattern -> exp ... 20:55:24 but that's Haskell 20:55:30 not Scheme or Racket :P 20:55:35 yeah, a whole nother world 20:55:51 there have been scheme pattern matching macros for over 20 years, they just don't get used as much 20:56:02 ijp: I use it all the time in Racket 20:56:21 as much doesn't mean never 20:56:47 main [~main@aagj174.neoplus.adsl.tpnet.pl] has joined #scheme 20:57:51 ijp: sometimes I go too far with it though, and my code looks impenetrable 20:58:34 and replacing it with an if or cond is better 20:59:32 newtothis [~chatzilla@77.126.132.52] has joined #scheme 21:00:13 -!- Guest61990 is now known as pjb 21:01:23 -!- main [~main@aagj174.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 260 seconds] 21:08:52 main [~main@aagj174.neoplus.adsl.tpnet.pl] has joined #scheme 21:09:58 -!- pt [~pt@84.114.230.154] has quit [Ping timeout: 276 seconds] 21:11:19 pt [~pt@84.114.230.154] has joined #scheme 21:16:06 amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has joined #scheme 21:21:10 -!- newtothis [~chatzilla@77.126.132.52] has quit [Quit: ChatZilla 0.9.90 [Firefox 21.0/20130511120803]] 21:22:28 -!- wingo [~wingo@cha74-2-88-160-190-192.fbx.proxad.net] has quit [Ping timeout: 246 seconds] 21:30:27 jao [~jao@118.Red-83-41-22.dynamicIP.rima-tde.net] has joined #scheme 21:30:30 -!- jao [~jao@118.Red-83-41-22.dynamicIP.rima-tde.net] has quit [Changing host] 21:30:30 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 21:31:06 (define-syntax test-syntax 21:31:06 (syntax-rules () 21:31:06 ((_ ((a b) ...) ...) 21:31:07 (list ((a b) ...) ...)))) 21:31:37 why is this giving me bad syntax? i want to create a pattern that accepts a list of pairs 21:32:14 and returns a list with it 21:34:01 how are you invoking it? 21:34:21 ,expand (test-syntax ((1 2) (3 4)) ((5 6))) 21:34:24 $2 = (list ((1 2) (3 4)) ((5 6))) 21:34:26 (test-syntax '((a b))) 21:34:50 ah, right, the quote is your problem 21:35:07 that is equivalent to (test-syntax (quote ((a b)))) 21:35:48 without the quote, it would expand to (list ((a b))) 21:36:38 ijp: hmmm 21:36:49 and (quote ((a b))) is not a list of pairs 21:37:43 i tried (test-syntax (list (list 1 2))) but it didn't work 21:38:08 test-syntax: bad syntax in: (test-syntax (list (list 1 2))) 21:38:46 -!- gravicappa [~gravicapp@ppp91-77-166-132.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 21:38:56 rszeno [~rszeno@79.118.12.203] has joined #scheme 21:39:17 That doesn't match the pattern you wrote down. 21:40:49 my pattern is something like "zero or more list, containing zero or more pairs" right? 21:41:01 htor: these lists are not evaluated 21:41:06 the forms are used _as is_ 21:41:14 fdr [~fdr@189.102.204.123] has joined #scheme 21:41:58 The form (list ) does not match the pattern ((a b) ...) because the form `list' does not match the pattern (a b). 21:44:34 ijp: the list passed to test-syntax is evaluated before being passed to it, right? 21:44:48 Riastradh: what do you mean when you say 'form'? 21:44:57 No. Macros happen before evaluation. 21:45:15 Riastradh: aha! 21:45:16 Any S-expression. 21:46:35 rudybot: (define-syntax-rule (my-quote whatever) (quote (i literally got -> whatever))) 21:46:36 ijp: your sandbox is ready 21:46:36 ijp: Done. 21:46:43 rudybot: (my-quote (+ 2 5)) 21:46:44 ijp: ; Value: '(i literally got -> (+ 2 5)) 21:47:18 rudybot: (my-quote (list (list 1 2))) 21:47:18 ijp: ; Value: '(i literally got -> (list (list 1 2))) 21:47:22 etc. 21:47:57 -!- taylanub [tub@p4FD93662.dip0.t-ipconnect.de] has quit [Disconnected by services] 21:48:23 taylanub [tub@p4FD910A5.dip0.t-ipconnect.de] has joined #scheme 21:49:41 -!- fdr [~fdr@189.102.204.123] has quit [Read error: Connection reset by peer] 21:50:34 now i'm confused 21:51:05 good, it means you are learning 21:52:45 -!- adu [~ajr@pool-173-66-11-197.washdc.fios.verizon.net] has quit [Quit: adu] 21:53:04
is there a way of passing parameters to a function without evaluating them? Excep for macros - they can do anything. some strange delay or something 21:53:07
? 21:53:24
(theoretical question) 21:53:31 well, you can wrap them in a lambda, or delay, but you will need to call/force them 21:54:01 scheme is call-by-value, it evaluates all its arguments before calling the function 21:54:22
if you wrap them in lambda the interpreter won't try to evaluate the lambda ? 21:54:51
like 21:55:01 it will evaluate the lambda, and get a function object back 21:55:09 but it will not evaluate the body of the lambda 21:55:26
(define (f (lambda () (+ x y))) ) 21:55:35 quote? 21:55:37 that just doensn't make sense 21:55:55
why? 21:56:05 because it is syntactically invalid scheme 21:56:19
why ? 21:56:23 main: x and y are not bound params for instance 21:56:35 because (lambda () (+ x y)) is not an identifier 21:56:39
oh.. yes. 21:56:48
sorry it was supposed to be 21:57:05
(f (lambda () (+ x y))) ) 21:57:13
no 21:57:17
without the body... 21:57:18 you can have a function (define (foo bar) body), and that body can refer to bar 21:57:31 and if bar is a function, you can call it to get a result 21:57:52 that is how you would delay evaluation of a function argument until later 21:58:03
ok, yes, now i understand, at least think so. 21:58:30
(just reading about delays in SICP) 21:58:46 rudybot: (begin (define (foo bar) (display "zot") bar (display "zot")) (foo (display "frotz"))) 21:58:46 ijp: ; stdout: "frotzzotzot" 21:58:52 compared to 21:59:00 rudybot: (begin (define (foo bar) (display "zot") (bar) (display "zot")) (foo (lambda () (display "frotz")))) 21:59:00 ijp: ; stdout: "zotfrotzzot" 21:59:09 rudybot: botsnack 21:59:09 :) 21:59:12
thanks 21:59:41 and there are two forms, delay & force, that you can use instead of lambda directly, which has the advantage of memorizing the result 22:00:09
yeah, it is mentioned in SICP 22:00:11 -!- youlysse` [~user@75-132-28-10.dhcp.stls.mo.charter.com] has quit [Read error: Operation timed out] 22:00:22 -!- rszeno [~rszeno@79.118.12.203] has quit [Quit: Leaving.] 22:00:41
any way it is memorized as a list 22:00:50
so you don't have random access 22:01:00
what makes it sad. 22:01:22 (define-syntax test-syntax 22:01:23 (syntax-rules () 22:01:23 ((_ (a ...) ...) 22:01:23 er, what? 22:01:23 (quote (a ...) ...)))) 22:01:29 ; oopsie 22:01:45 delay only memorised one form, it doesn't specify how it does it 22:02:26
oh, ok, one more time, my fault 22:02:37 my syntax over matches any list with anything in it. how can i match against only list of pairs? 22:04:12 i'm not so familiar with this pattern language 22:04:37 You want it to match a sequence of things that each look like (a b)? 22:04:59 yes 22:05:08 -!- teiresias [~teiresias@archlinux/trusteduser/teiresias] has quit [Quit: leaving] 22:05:16 Then write (a b) as the pattern. 22:05:23 (followed by an ellipsis) 22:05:46 i did that, earlier 22:06:11 And? 22:06:25 i got a bad syntax error 22:07:01 with (syntax-test '((a b) (b c))) and (syntax-test (list (list 'a 'b) (list 'b 'c))) forms 22:07:28 (list (list 'a 'b) (list 'b 'c)) is not seen as a list of pairs by a macro 22:07:29 And what exactly was the pattern you wrote? 22:07:46 because it hasn't evaluated by then 22:08:00 Riastradh: pattern was (_ ((a b) ...) ...) 22:08:28 Remember that evaluation happens after macro expansion, so the macros see exactly what you wrote syntactically, and remember that writing 'foo is equivalent to writing (quote foo). 22:09:04 So, (syntax-test '((a b) (b c))) is equivalent to writing (syntax-test (quote ((a b) (b c)))), and `quote' does not match the pattern (a b), although ((a b) (c d)) does. 22:09:32 okey, so i need to unquote the list? 22:10:12 Let's take a step back a moment. I suspect that the calls to LIST and the quotations are tripping you up and you probably don't actually want to do any of that. What are you trying to accomplish with this macro? 22:10:40 i simply want to test if a pattern works 22:10:50 so that i can verify if it works, basically 22:11:12 the input should be a list of pairs, which i will do something with 22:11:50 So, if you wrote as a pattern (syntax-test ((a b) ...) ...), and you want to try it with a nontrivial input, write down the pattern exactly, and then replace each ellipsis by as many copies of whatever precedes it as you like. 22:12:01 For example, (syntax-test ((a b) (a b) (a b)) ((a b) (a b) (a b))). 22:12:10 Or (syntax-test () () ()). 22:12:13 Or (syntax-test). 22:12:29 (The latter two would be trivial inputs, I suppose.) 22:13:23 wow! huh? .. 22:13:31 i'm waffled 22:13:50 The pattern language is very easy, and I think you're supposing it's much harder than it actually is. 22:14:09 yes, you're right there 22:14:19 Barring ellipsis, anywhere you see a name in a pattern you can put anything you want; otherwise you must match the parenthetical structure exactly. 22:14:28 i've been dealing with symbolic data a lot lately 22:14:39 And ellipsis just means `zero or more of the preceding pattern'. 22:15:28 this was very trivial it seems 22:15:36 my mind wouldn't bend 22:16:09 thanks, ijp and Riastradh 22:16:38 one question to make sure i've got it; 22:17:12 eni [~eni@gob75-5-82-230-88-217.fbx.proxad.net] has joined #scheme 22:17:29 when now applying some macro to X then X is not evaluated before after macro-substitution has taken place? 22:17:58 `before after'? 22:18:25 before, sorry 22:18:58 Macro expansion happens before evaluation. 22:20:18 right! onwards then 22:20:37 sometimes i get little hangups 22:20:53 -!- peterhil [~peterhil@91-157-48-77.elisa-laajakaista.fi] has quit [Quit: Must not waste too much time here...] 22:22:11 do you folks have long experiences with scheme? 22:23:15 -!- civodul [~user@reverse-83.fdn.fr] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:23:16 I have been using Scheme for a while. 22:24:01 scheme has been a constant intellectual thorn in my brain for about 5 or 6 years now 22:24:16 ow 22:24:23 I'm told removing it would kill me 22:24:31 hehe! 22:24:36 don't do it 22:25:14 with advances in medical technology, they may be able to transplant it with ML, but it is risky 22:25:57 ijp: as long as you don't get dysfunctional, i guess! 22:29:23 ASau [~user@p4FF963D1.dip0.t-ipconnect.de] has joined #scheme 22:30:15 -!- amgarchIn9 [~amgarchin@p4FD61CAE.dip0.t-ipconnect.de] has quit [Read error: Operation timed out] 22:31:57 teiresias [~teiresias@archlinux/trusteduser/teiresias] has joined #scheme 22:37:41 ijp: that ,expand thing you did there, what was that? 22:38:25 -!- gleag [~gleag@71.175.broadband2.iol.cz] has quit [Ping timeout: 248 seconds] 22:39:21 sorry, guile repl command 22:39:27 I just copy pasted directly 22:40:26 ijp: it seemed to have some meaning to drracket as well 22:40:30 most implementations will have some way of expanding a macro for you, look for a procedure named "macroexpand" or similar 22:40:41 drracket has a very sexy gui macro expander 22:41:45 hmmm, yes, it has 22:42:50 wow, that really exposes one to the underlying stuff.. 22:43:24 like, what am i supposed to make out of for instance "(#%app:44 list*:44 sc40606:42 sc40601:42 sc40605:42 sc40604:42)" 22:44:20 better not worry too much about that 22:54:30 -!- pt [~pt@84.114.230.154] has quit [Quit: leaving] 22:54:39 -!- miql [~miql@ip72-201-117-127.ph.ph.cox.net] has quit [Ping timeout: 245 seconds] 22:57:19 what is really happend when do (lambda x) and (lambda x x)? both are equivalent to (lambda)? 22:57:36 (lambda x) and (lambda) are invalid syntax. 22:58:32 hmm, then what's (lambda x x)? 22:58:45 A procedure that takes any number of arguments and returns a list of them. 22:58:52 Just like the LIST procedure. 22:59:41 wow! how does that work? 23:00:15
I'm also curious why does that work this way 23:00:54 -!- tenq [~tenq@ip68-100-228-234.dc.dc.cox.net] has quit [Ping timeout: 245 seconds] 23:00:56 (lambda x ...) is a procedure that takes any number of arguments and collects them in a list called X for the ellipsis in the body. 23:01:37 it is desirable to create a function that can act upon any number of arguments, this just happens to be the syntax we have chosen for it 23:01:47 but... doesn't lambda -create- procedures? 23:01:59 It does. 23:02:11
but we usually use dots ti 23:02:14 When I said `(lambda x ...) is...' above, I meant `The expression (lambda x ...) evaluates to...'. 23:02:33 (The ellipsis there was metasyntactic, not literal.) 23:02:54 main: right, we use an improper list, whose last cdr gets the rest list 23:03:43 this is just taking it to the logical conclusion 23:04:16
so we can always just ommit the dot ? 23:04:41 no 23:05:01 because a proper list is not improper, (obviously) 23:05:22 x is a zero-length dotted list. (x . y) is dotted list of length 1. (x y . z) is a dotted list of length 2, &c. 23:05:45 So, (lambda x ) takes zero or more arguments, (lambda (x . y) ) takes one or more arguments, &c. 23:07:21
ok. This is the only case we can ommit the parenthesis in lambda arguments ? 23:08:19 tenq [~tenq@ip68-100-228-234.dc.dc.cox.net] has joined #scheme 23:08:34 Riastradh: why isn't the syntax for zero-or-more then (lambda . rest-args )? 23:09:24 it makes more sense when you realise that . denotes cons 23:09:34 so (a b c) = (a . (b . (c . ()))) 23:09:45 for (a b . c) = (a . (b . c)) 23:10:24 so, the syntax you have suggested could have been used, in theory, but it would require an additional way of interpreting . 23:10:58 as opposed to the current case, where everything works out as expected 23:11:04 well, then i shall discard that suggestion 23:11:46 rudybot: (cons . (1 . (2 . ()))) 23:11:46 ijp: ; Value: '(1 . 2) 23:12:08 ijp: it doesn't show it as (1 2)? 23:12:31
ok, but I still don't get it. Why "(x)" is just one argument and "x" is an empty list and why can we use a lambda without the parenthesis wraping the arguments ? 23:12:41 htor: no, I applied the function cons to the arguments 1 and 2 23:12:56 if I had used the list function, it would have 23:13:01 rudybot: (list . (1 . (2 . ()))) 23:13:01 ijp: ; Value: '(1 2) 23:13:05 ijp: ah, i read it too fast 23:13:52 main: you can (lambda x ....) collects all the arguments passed to the function in a list, and binds it to x 23:14:07 htor: JFYI, the equivalent to ,expand in Racket is ,syntax (assuming you did `(require xrepl)`) 23:14:09 rudybot: ((lambda x (list 'args x)) 1 2 3) 23:14:09 ijp: ; Value: '(args (1 2 3)) 23:14:41 oh sorry, I see what you mean now 23:15:06 main: you are asking why (let ((x ())) (lambda x 3)) is not the same as (lambda () 3) 23:16:23 the answer then is that lambda is a special form, and it "just doesn't work that way" 23:17:07 miql [~miql@ip72-201-117-127.ph.ph.cox.net] has joined #scheme 23:17:10 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 23:17:33 ijp: so another example of arguments (here x) not being evaluated before macro expansion? 23:18:06
no, at least don't see my question that way. I read (from a good book) that the syntax of lambda is (lambda (arg1 arg2 ... argn) ) 23:18:12 if you consider x as an argument to lambda 23:18:30 well, your book might have been high quality, but it didn't fill you in on all the subtleties 23:18:42 main: lambda can also take no arguments 23:18:52
well it is a old book. 23:19:00 scheme is old. no? 23:19:02
and you probably know it. 23:19:04 probably because variable arities, or nullary procedures were not relevant to its aim 23:19:29
but when lambda takes no arguments it is (lambda () ) 23:19:33
isn't it ? 23:19:42 i agree 23:19:56 *htor* but i'm confused anyway 23:20:22 if I were teaching a class "scheme for people afraid of computer programming" I would, e.g. tell them that + takes exactly two arguments. Even though in reality it can take 0,1,2, or more 23:20:43 and make them write (+ (+ a b) c) rather than (+ a b c) 23:20:44
so why is this strange case when we can just remove the parenthesis and the arguments will be compressed in a list 23:21:13 guess it is because lambda is a special form 23:21:36 it isn't strange, it is just an extension of (a . b) (a b . c) and (a b c . d) 23:22:46
*thinking hard without much result) 23:22:47
* 23:22:53 :-) 23:23:23
not sure if symphony #9 is a good background 23:23:34 agumonkey [~agu@45.217.72.86.rev.sfr.net] has joined #scheme 23:23:51 background music, no, foreground, yes 23:24:23
no, in the foreground I'm trying to think 23:26:03 put on some edgar varese and try again 23:26:12 -!- SHODAN [~shozan@fsf/member/shodan] has quit [Read error: Operation timed out] 23:26:31
title ? 23:26:56 and if that doesn't help, maybe try something silly, like a joy division/wu tang clan crossover 23:27:07 youlysses [~user@75-132-28-10.dhcp.stls.mo.charter.com] has joined #scheme 23:27:24 hihihi 23:27:35 joy to the lambda 23:27:49 for it is mystical indeed 23:28:01 hmm, I think we broke him 23:28:08
gave up on edgar varese 23:28:21
blue monday :) 23:29:09 i can't remember what i was trying to accomplish in scheme, earlier today 23:29:30 it was something about domain specific languages 23:29:37
conquer the world ? 23:29:59 that's implicit in everything i do, yes :-) 23:30:27 Shozan [~shozan@fsf/member/shodan] has joined #scheme 23:30:38
well, your not doing good. Unless Your doing it undercover 23:30:56 first we must understand lambda, then conquer 23:31:42
understanding of lambda is a nice aim any way, although conquering the world seems a bit more challenging. 23:31:48 would it be easier to read up on lambda calculus in order to understand scheme better? 23:32:25
don't think so, you just need the basics 23:32:38
of lambda calculus 23:33:22 that mayhaps be so 23:33:32
unless You want to prove the correctness of Your programs but that doesn't have much to do with scheme 23:34:39 e.g. Böhm's theorem is interesting and all, but it has helped me very little in my day-to-day programming 23:35:14 ijp: what are your day to day programming projects? 23:35:29 trying to take over the world 23:36:20 well, you can try but you can't ignore my excellent pattern matching skills 23:36:26 I had intended to write a new exporter for emacs org mode today, but sleeping got in the way 23:36:43 ijp: To what? 23:36:50 youlysses: a diffent html one 23:36:55 Ah. 23:37:04 -!- Shozan [~shozan@fsf/member/shodan] has quit [Quit: No Ping reply in 180 seconds.] 23:37:14 maybe I could do scribble 23:37:49 ,scribble 23:37:54 there should be some application for scheme in natural language processing 23:38:10 at least, i heard lisp is good at that 23:38:54
why we can make (lambda x x) but (define (a . x) x) 23:38:57 jcowan [~jcowan@mail.digitalkingdom.org] has joined #scheme 23:40:08 main: you are welcome, scheme says 23:40:18 Question to people who use hash tables on any Scheme: how often, if ever, do you find yourself constructing a hash table with a special equivalence predicate and hash function (that is, other than eq?, eqv?, equal?, string=?, or string-ci=?)? 23:40:36
htor: ? 23:40:53 main: i don't know why that works, seriously 23:41:51 Shozan [~shozan@fsf/member/shodan] has joined #scheme 23:42:56
why isn't it (lambda (. x) x) 23:43:22 That's illegal lexical syntax. 23:43:42
yeah 23:45:12
but why it is (define (a . x) x) but (lambda x x) ? 23:46:00 It is (define a (lambda x x)) 23:46:04 Because in a define, you cons the name being defined on to the front of the lambda list. Where all the arguments are in a rest-of-the-arguments list, it's just x. Consing a onto that gives (a . x) 23:46:16 But you can curry it: (define (a . x) x) 23:46:50 (define (a . args) body) == (define a (lambda args body)) 23:47:19 jcowan: not very often. Usually I want eqv? or string=? 23:47:30 (define ((a x) y) (+ x y)) == (define (a x) (lambda (y) (+ x y))) == (define a (lambda (x) (lambda (y) (+ x y)))) 23:47:54
how would (define (a . arg1 rest) body) look like? (lambda (arg1 .rest) body) ? 23:48:23 main, (a . arg rest1) makes no sense: a list can have only one tail. 23:48:49
*(a arg1 . rest) 23:49:17 jcowan: can I take it, this means that the r7rs-large hashtable module is not going to be consistent with either (rnrs hashtables) or (srfi :69) 23:50:22 and if so, can you please tell me why? 23:51:29
pjb: ok, you made it, I THINK I understand this. 23:52:20 As I've written it, it's consistent with srfi 69, modulo two changes of name which are for compatibility with the rest of Scheme. 23:52:54 It's at http://trac.sacrideo.us/wg/wiki/HashTablesCowan and I'd be happy to get feedback. 23:53:06
does anyone know good introductions to lambda calculus? 23:53:22
not too big one though 23:53:38 is this a good lambda-syntax? (define-syntax \l 23:53:38 (syntax-rules () 23:53:38 ((_ (parameter ...) body ...) 23:53:38 (lambda (parameter ...) body ...)) 23:53:38 ((_ parameter body ...) 23:53:40 (lambda parameter body ...)))) 23:53:49 jcowan: actually, I would disagree with the -size one, but I expect you won't approve of me arguing for that :) 23:55:05 ^ it's reflecting the alternative syntax of lambda - with or without parenthesis 23:55:07 Oh, you can argue with me. 23:55:25 Why is length wrong? 23:56:25 length feels like there should be a dimension associated with it 23:56:30
how are the scopes searched for functions in scheme? some dictionary? 23:56:49 Depends on the implementation. 23:57:14
so it's not specified in the standard ? 23:57:14 Unlike Python, Scheme does not expose that, allowing it to be expressed directly in simple interpreters, or compiled away as much as you want. 23:57:33
good. 23:57:33 Right. All that's specified is that names in inner scopes shadow names in outer scopes. 23:57:34 main: scheme is pretty opaque 23:57:55 or whatever the correct opposite to reflective is 23:58:28
so in the "big" compilers/interpretes there is a dictionary, right ? 23:58:31 jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 23:58:32 -!- jeapostrophe [~jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Changing host] 23:58:32 jeapostrophe [~jay@racket/jeapostrophe] has joined #scheme 23:59:03 in general, no 23:59:15
why? 23:59:21
just lists ? 23:59:25 not even lists 23:59:31 it just isn't exposed 23:59:49
but it has to be implemented somehow