00:05:07 -!- arubin [uid489@gateway/web/irccloud.com/x-hhmnxlsezzdvxezb] has quit [] 00:18:39 -!- oleo [~oleo@xdsl-78-35-160-187.netcologne.de] has quit [Ping timeout: 252 seconds] 00:19:32 oleo [~oleo@xdsl-78-35-176-246.netcologne.de] has joined #scheme 00:21:29 -!- synacktic [~jordyd@unaffiliated/jordyd] has quit [Ping timeout: 252 seconds] 00:30:35 main [~main@bwc243.neoplus.adsl.tpnet.pl] has joined #scheme 00:30:39 -!- wilfredh_ is now known as wilfredh 00:31:57
Hi. Is there a way to create a cyclic list within a let statement ? (don't know how do do it nicely - without mutation) 00:32:56
letrec and let* don't either seem to allow me to do this straight forwar 00:32:59
*forward. 00:33:33 main: http://srfi.schemers.org/srfi-1/srfi-1.html#circular-list 00:35:42 and it should be possible to do it with begin, i think 00:35:43
defanor: is it not possible without external libraries? 00:36:13
will try then 00:37:04 (let ((l (begin (let ((l (list 'a 'b))) (set-cdr! (cdr l) l) l)))) l) 00:37:12 like this 00:38:17 synacktic [~jordyd@unaffiliated/jordyd] has joined #scheme 00:38:50 oh, and begin is not needed there 00:40:00
thanks again 00:40:04 but it's with mutation 00:40:05 -!- jyf [~root@192.241.238.111] has quit [Quit: already be with hell] 00:40:06 yw 00:45:26 but i think i got the question wrong. do you want to use let just to create a circular list without using mutation, or just do get a circular list in let? 00:48:48
just wanted a circular list. It would be much nicer to make it without mutation that is not so bad either. We can always make an external function to hide the mutation (or not try to reinvent the wheel and use SLIB or some SRFI). 00:49:20
s/that/but\ that/ 00:49:50 yep. and it's not possible with standard let variations, i think 00:56:24 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 01:18:27 jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has joined #scheme 01:18:30 -!- jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has quit [Changing host] 01:18:30 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 01:18:49 -!- tenq|away is now known as tenq 01:41:02 -!- main [~main@bwc243.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 264 seconds] 01:53:58 karswell [~user@87.115.147.68] has joined #scheme 01:58:05 b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has joined #scheme 01:58:11 -!- amgarchIn9 [~amgarchin@p4FD62B5F.dip0.t-ipconnect.de] has quit [Ping timeout: 260 seconds] 02:07:54 strobegen [~Adium@188.168.72.225] has joined #scheme 02:16:26 arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has joined #scheme 02:18:50 -!- mdmkolbe [~adamsmd@mobile-130-126-255-159.near.illinois.edu] has quit [Ping timeout: 264 seconds] 02:28:43 -!- rgc [~user@95.Red-83-33-70.dynamicIP.rima-tde.net] has quit [Remote host closed the connection] 02:35:40 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 02:39:10 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Client Quit] 02:41:36 -!- davexunit [~user@fsf/member/davexunit] has quit [Quit: Later] 02:45:07 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 02:47:11 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Client Quit] 02:58:53 -!- clog [~nef@bespin.org] has quit [Excess Flood] 02:59:02 clog [~nef@bespin.org] has joined #scheme 02:59:30 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 03:01:32 mdmkolbe [~adamsmd@107-218-198-115.lightspeed.dctril.sbcglobal.net] has joined #scheme 03:09:37 -!- joneshf-work [~joneshf@mail.concordusapps.com] has quit [Remote host closed the connection] 03:11:32 Ogion_ [~Ogion@84.Red-79-158-91.staticIP.rima-tde.net] has joined #scheme 03:13:09 -!- Ogion__ [~Ogion@189.Red-83-57-112.dynamicIP.rima-tde.net] has quit [Ping timeout: 248 seconds] 03:19:55 -!- zzach [~zzach@dslb-178-001-217-078.pools.arcor-ip.net] has quit [Ping timeout: 245 seconds] 03:20:34 zzach [~zzach@dslb-092-073-092-038.pools.arcor-ip.net] has joined #scheme 03:24:20 -!- yrdz [~p_adams@unaffiliated/p-adams/x-7117614] has quit [Quit: WeeChat 0.4.2] 03:27:29 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 03:31:04 weie [~weie@softbank221078042071.bbtec.net] has joined #scheme 03:45:53 -!- LeoNerd [leo@2a01:7e00::f03c:91ff:fe96:20e8] has quit [Quit: Client restart...] 03:47:40 LeoNerd [leo@2a01:7e00::f03c:91ff:fe96:20e8] has joined #scheme 03:52:47 -!- MichaelRaskin [~MichaelRa@195.91.224.161] has quit [Quit: MichaelRaskin] 03:53:45 -!- vishesh [~vishesh@103.30.143.135] has quit [Ping timeout: 245 seconds] 03:56:22 vishesh [~vishesh@103.30.142.133] has joined #scheme 04:04:36 -!- _5kg [~zifeitong@60.191.2.238] has quit [Excess Flood] 04:05:30 _5kg [~zifeitong@60.191.2.238] has joined #scheme 04:08:51 kilimanjaro [~kilimanja@ip68-0-132-121.tc.ph.cox.net] has joined #scheme 04:10:10 levi [~user@c-174-52-89-43.hsd1.ut.comcast.net] has joined #scheme 04:13:45 -!- yacks [~py@103.6.159.103] has quit [Quit: Leaving] 04:15:13 amgarchIn9 [~amgarchin@p4FD62B5F.dip0.t-ipconnect.de] has joined #scheme 04:22:42 alexei [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has joined #scheme 04:24:39 -!- Ogion_ [~Ogion@84.Red-79-158-91.staticIP.rima-tde.net] has quit [Ping timeout: 260 seconds] 04:26:02 -!- amgarchIn9 [~amgarchin@p4FD62B5F.dip0.t-ipconnect.de] has quit [Ping timeout: 264 seconds] 04:37:03 -!- vishesh [~vishesh@103.30.142.133] has quit [Ping timeout: 240 seconds] 04:54:34 vishesh [~vishesh@103.30.142.133] has joined #scheme 04:59:04 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 240 seconds] 04:59:34 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 05:00:18 -!- preflex_ is now known as preflex 05:05:37 -!- synacktic [~jordyd@unaffiliated/jordyd] has quit [Quit: Leaving] 05:06:51 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Ping timeout: 252 seconds] 05:09:06 the first link in topic seems slightly broken, and there's a redirect on the last one 05:12:56 Ogion [~Ogion@203.Red-88-9-226.dynamicIP.rima-tde.net] has joined #scheme 05:16:34 main [~main@bwc243.neoplus.adsl.tpnet.pl] has joined #scheme 05:20:03 -!- main [~main@bwc243.neoplus.adsl.tpnet.pl] has quit [Client Quit] 05:22:26 -!- MrFahrenheit [~RageOfTho@unaffiliated/rageofthou] has quit [Ping timeout: 264 seconds] 05:23:10 MichaelRaskin [~MichaelRa@195.178.216.16] has joined #scheme 05:27:11 -!- vishesh [~vishesh@103.30.142.133] has quit [Ping timeout: 260 seconds] 05:40:12 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 05:43:10 kvda [~kvda@unaffiliated/kvda] has joined #scheme 05:46:34 gravicappa [~gravicapp@ppp91-77-189-211.pppoe.mtu-net.ru] has joined #scheme 06:02:31 -!- oleo [~oleo@xdsl-78-35-176-246.netcologne.de] has quit [Quit: Leaving] 06:13:27 -!- strobegen [~Adium@188.168.72.225] has quit [Ping timeout: 250 seconds] 06:18:34 strobegen [~Adium@83.149.34.143] has joined #scheme 06:19:42 -!- mrowe is now known as mrowe_away 06:31:33 -!- strobegen [~Adium@83.149.34.143] has quit [Ping timeout: 248 seconds] 06:38:10 strobegen [~Adium@62.33.153.231] has joined #scheme 06:38:50 joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 06:40:36 cdan [~cdan@95.76.67.170] has joined #scheme 06:57:47 -!- mdmkolbe [~adamsmd@107-218-198-115.lightspeed.dctril.sbcglobal.net] has quit [Ping timeout: 260 seconds] 07:00:31 -!- joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has quit [Ping timeout: 252 seconds] 07:08:26 vishesh [~vishesh@122.177.107.242] has joined #scheme 07:09:26 joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 07:14:11 -!- zzach [~zzach@dslb-092-073-092-038.pools.arcor-ip.net] has quit [] 07:14:32 -!- stamourv`` [~user@ahuntsic.ccs.neu.edu] has quit [Remote host closed the connection] 07:27:07 -!- cdan [~cdan@95.76.67.170] has quit [Ping timeout: 250 seconds] 07:57:53 civodul [~user@gateway/tor-sasl/civodul] has joined #scheme 08:15:33 -!- haroldwu is now known as haroldwu_afk 08:23:56 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Quit: groovy2shoes] 08:40:33 -!- haroldwu_afk [~haroldwu@unaffiliated/haroldwu] has quit [Quit: leaving] 08:40:48 haroldwu [~haroldwu@219.85.185.194] has joined #scheme 08:40:48 -!- haroldwu [~haroldwu@219.85.185.194] has quit [Changing host] 08:40:48 haroldwu [~haroldwu@unaffiliated/haroldwu] has joined #scheme 08:41:37 -!- haroldwu [~haroldwu@unaffiliated/haroldwu] has quit [Client Quit] 08:41:53 haroldwu [~haroldwu@219.85.185.194] has joined #scheme 08:41:54 -!- haroldwu [~haroldwu@219.85.185.194] has quit [Changing host] 08:41:54 haroldwu [~haroldwu@unaffiliated/haroldwu] has joined #scheme 08:50:36 defanor: What exactly is broken about the first ? The page seems kinda weird but I think that's just the design. 09:08:47 hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 09:09:09 cmatei [~cmatei@78.96.108.146] has joined #scheme 09:13:35 taylanub: there's a trailing " in the url 09:14:14 doesn't seem to make a difference i guess 09:21:25 yacks [~py@103.6.159.103] has joined #scheme 09:22:16 -!- kvda [~kvda@unaffiliated/kvda] has quit [Quit: z____z] 09:31:39 -!- vraid [50d8e34d@gateway/web/freenode/ip.80.216.227.77] has quit [Quit: Page closed] 09:35:48 -!- arubin [~textual@99-114-192-172.lightspeed.cicril.sbcglobal.net] has quit [Quit: My MacBook has gone to sleep. ZZZzzz] 09:37:07 Kneferilis [~Kneferili@nb1-210.static.cytanet.com.cy] has joined #scheme 09:38:18 I'm starting to dislike other languages I've learned, while learning (scheme).. 09:38:23 it kind of sucks 09:46:37 hlavaty [~user@friedrichstrasse.knowledgetools.de] has joined #scheme 09:47:02 -!- hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 264 seconds] 09:48:34 zacts: http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/ :) 09:48:34 http://tinyurl.com/yzqbvdu 09:48:56 (Substitute scheme for haskell/python.) 09:52:16 przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has joined #scheme 09:54:58 -!- aranhoide [~smuxi@90.Red-83-59-17.dynamicIP.rima-tde.net] has quit [Ping timeout: 240 seconds] 09:56:36 *taylanub* is having similar experiences as that author, but with Scheme and Objective-C instead of Haskell/Python and C#. ObjC 2.0 supports lexical scope with first-class functions, but with all the C-type-system boilerplate, the need to explicitly declare which variables have to be scoped lexically, and the need to break cyclic references (a simple example: mutually recursive functions) by declaration of weak references (logically, making one o 09:57:07 stepnem [~stepnem@77.78.117.2] has joined #scheme 09:58:52 hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 09:59:32 taylanub: I'm taking a course for the spring semester next year, along with other classes, based on this book http://www.info.ucl.ac.be/~pvr/book.html 09:59:52 I think that this book doesn't idolize any particular way of coding, such as functional, OOP, etc.. 10:00:30 but it teaches you how to use each tool for whatever job the tools are designed for.. 10:01:11 I do love scheme, and feel I am learning a lot, but I think we need to be careful not to idolize any _one_ particular paradigm for _every_ task.. 10:01:43 Note that Scheme isn't "purely" functional, and supports or can support OO and logic programming as well. :) 10:01:52 -!- b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has quit [Read error: Connection timed out] 10:02:02 vraid [d91bbc5a@gateway/web/freenode/ip.217.27.188.90] has joined #scheme 10:02:02 yeah, scheme is multiparadigm, that's one reason I like learning with it 10:02:43 and it can support imperative programming 10:02:49 ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has joined #scheme 10:02:51 *taylanub* wonders if RnRS will ever touch static typing. :P 10:03:03 -!- yacks [~py@103.6.159.103] has quit [Read error: Operation timed out] 10:05:47 b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has joined #scheme 10:07:14 -!- zacts [~zacts@unaffiliated/zacts] has quit [Quit: leaving] 10:10:27 -!- alexei [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 10:14:40 taylanub: scheme is not hostile to static analysis, quite the contrary. 10:17:04 ogamita: Sure, but that's not the same as supporting static typing, is it ? 10:22:34 zacts [~user@unaffiliated/zacts] has joined #scheme 10:24:37 back 10:25:28 rszeno [~rszeno@79.114.63.225] has joined #scheme 10:27:18 amgarchIn9 [~amgarchin@theo1.theochem.tu-muenchen.de] has joined #scheme 10:27:23 -!- kbtr [~kbtr@li198-73.members.linode.com] has quit [Quit: Changing server] 10:27:56 kbtr [~kbtr@li198-73.members.linode.com] has joined #scheme 10:28:36 is there any lisp with a type system more like that of haskell? 10:31:06 hm.. random side note, http://lfe.github.io/ 10:31:23 although, I don't know if erlang has a type system like haskell 10:33:05 I think it would be cool to have a scheme front end to the erlang vm 10:34:19 zacts: http://the-concurrent-schemer.github.io/scm-doc/ 10:35:11 -!- kilimanjaro [~kilimanja@ip68-0-132-121.tc.ph.cox.net] has quit [Ping timeout: 260 seconds] 10:35:36 oh neat 10:35:40 vraid: Racket has some static typing support but I don't know how much it's like Haskell's. 10:36:03 taylanub: the thing is that the difference between lisp and C (as categories of languages), it's not static vs. dynamic typing. It's that in lisp, it's the _values_ that have types, while in C, it's the _variables_ that have types. 10:36:12 vraid: By the way my IRC client excludes the double-quoted from the link in the topic just fine, dunno what standards-compliant behavior would be. 10:36:27 taylanub: values are essentially run-time things, while variables have a definition at compilation-time. 10:36:32 ogamita: I think you just defined static vs. dynamic typing. :P 10:37:08 static analysis of lisp program may determine that only values of a given type are ever bound to variables, therefore it allows to generate code similar to what a C compiler would generate, with respect to those variables. 10:37:49 the chicken compiler has a static analysis pass like that 10:38:27 it is possible to declare types for it, too 10:39:00 Yes, but 1) you have to know and rely on the details of a specific implementation to make sure this optimization happens for a given variable, 2) static type systems actually let you express some distinct ideas, and aren't just there for optimization. 10:39:27 also there are scheme derived languages with type declarations, and IIRC, there's even some in Racket. 10:39:43 DerGuteMoritz: Oh, one can declare types explicitly ? Does it still compile to safe code though, or just remove run-time checks and let the program crash in the case of programmer errors ? 10:39:52 taylanub: racket is not like haskell, no 10:40:24 i've been using typed racket 10:40:26 -!- asumu [~at@2001:470:b:b7:1e6f:65ff:fe23:c3d4] has quit [Ping timeout: 264 seconds] 10:41:38 taylanub: there is a switch to make it compile to unsafe code but by default it doesn't 10:41:49 asumu [~at@2001:470:b:b7:1e6f:65ff:fe23:c3d4] has joined #scheme 10:42:01 taylanub: AFAIK it uses the type information to reduce runtime checks though 10:42:15 DerGuteMoritz: So it implements static type-checking at compile-time. 10:42:16 -!- przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 10:42:17 taylanub: there is a talk by its creator about it, if you like I can look up the link 10:42:25 taylanub: yeah 10:42:34 OK, will save for later :) 10:43:03 taylanub: here it is: http://media.ccc.de/browse/conferences/froscon/2013/c116_lisp_-_2013-08-24_16:30_-_scheme_implementation_techniques_-_felix_-_1258.html 10:43:06 http://tinyurl.com/oaowe88 10:43:26 Thanks 10:43:34 yw 10:52:10 add^_ [~user@m176-70-201-196.cust.tele2.se] has joined #scheme 10:54:22 -!- gravicappa [~gravicapp@ppp91-77-189-211.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 10:54:38 -!- stepnem [~stepnem@77.78.117.2] has quit [Ping timeout: 240 seconds] 10:55:21 scoofy [scoofy@catv-89-135-80-2.catv.broadband.hu] has joined #scheme 10:56:08 stepnem [~stepnem@internet2.cznet.cz] has joined #scheme 10:56:31 -!- b4283 [~b4283@60-249-196-111.HINET-IP.hinet.net] has quit [Quit: ] 10:57:04 -!- ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has quit [Ping timeout: 240 seconds] 10:57:40 ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has joined #scheme 10:57:54 przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has joined #scheme 11:03:15 -!- przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 11:05:49 pnkfelix [~pnkfelix@89.202.203.51] has joined #scheme 11:08:12 -!- rszeno [~rszeno@79.114.63.225] has quit [Quit: Leaving.] 11:48:55 yacks [~py@103.6.159.103] has joined #scheme 11:49:51 -!- stepnem [~stepnem@internet2.cznet.cz] has quit [Ping timeout: 240 seconds] 11:50:46 stepnem [~stepnem@internet2.cznet.cz] has joined #scheme 11:57:31 -!- vishesh [~vishesh@122.177.107.242] has quit [Ping timeout: 252 seconds] 11:59:38 -!- hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 264 seconds] 12:05:31 I wonder if there is a scheme powered robot 12:06:59 surely. 12:10:33 maybe I'll try to make a scheme powered lego bot 12:11:00 I wish I had a scheme bot to do my dishes, and take out the trash.. :p 12:11:30 but seriously, maybe that could be a start for me to get into embedded a bit.. I don't know.. 12:12:16 i've seen a scheme to c compiler for microcontrollers somewhere 12:13:05 was it chicken? 12:14:40 nope, a small one 12:14:50 specifically designed for microcontrollers 12:15:13 oh interesting 12:15:39 as a side note, I'm really excited about this scheme frontend to erlang 12:15:45 maybe check out this 12:15:45 http://www.iro.umontreal.ca/~feeley/papers/sw03.pdf 12:16:05 round-robin [~bubo@91.224.149.58] has joined #scheme 12:16:10 scheme to erlang? what would that be good for, in practice? 12:16:31 oh cool 12:17:39 so you can train a pic-controlled robot to do dishwashing in scheme :) 12:18:02 sure! 12:18:05 http://the-concurrent-schemer.github.io/scm-doc/ 12:18:31 but seriously, I think it's cool to be able to use scheme in "real world" projects.. 12:18:36 hm. interesting. 12:19:30 gravicappa [~gravicapp@80.90.116.82] has joined #scheme 12:21:13 przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has joined #scheme 12:40:39 -!- stepnem [~stepnem@internet2.cznet.cz] has quit [Ping timeout: 240 seconds] 12:43:11 stepnem [~stepnem@internet2.cznet.cz] has joined #scheme 12:45:12 -!- yacks [~py@103.6.159.103] has quit [Ping timeout: 250 seconds] 12:46:09 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 12:53:47 Cromulent|2 [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 12:54:35 Cromulent|3 [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 12:55:13 vishesh [~vishesh@106.201.83.96] has joined #scheme 12:55:17 -!- Sgeo [~quassel@ool-44c2df0c.dyn.optonline.net] has quit [Read error: Connection reset by peer] 12:57:01 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Ping timeout: 246 seconds] 12:58:31 -!- Cromulent|2 [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Ping timeout: 260 seconds] 12:59:46 taylanub: are you the dude who implemented a scheme interpreter in haskell? 12:59:54 No. 13:00:01 ah ok 13:00:07 And that's a 48-hours exercise IIRC ? :P 13:00:49 I think this one was supposed to be a serious interpreter.. 13:05:52 taylanub: not sure, but it seems like it should be http://paste.lisp.org/new with selected 'scheme', but it's not. i see only channel selection here, which does not seem to provide anything useful 13:07:26 You're right, seems kinda broken/useless. 13:16:59 truncate [~vishesh@122.177.176.173] has joined #scheme 13:18:24 -!- vishesh [~vishesh@106.201.83.96] has quit [Ping timeout: 240 seconds] 13:21:16 Wolfy_ [a552d44c@gateway/web/freenode/ip.165.82.212.76] has joined #scheme 13:23:39 hey, would someone be able to tell me if 'x' defined as "(define x (list 100 200 (delay x)))" be considered a valid implementation of a circular list? 13:26:10 you aren't trying to get answers to homework are you? 13:26:49 nope, just exploring some weird ways to express a circular list 13:27:29 Wolfy_: nope, you'll have a promise as the third element 13:27:54 defanor: but if I force it, wouldn't I have exactly the same list? 13:27:58 and circular list's third element should poinp to it's first pair 13:28:28 you'll have nearly the same functionality, i think, but not exactly circular list still 13:29:18 I just delayed it so I could test it out, so I won't get in a loop 13:29:28 I see 13:29:47 You won't get in a loop from defining a circular list, only from traversing it (and not detecting cycles). 13:30:03 without delay, last element will be unspecified, or will have some old x value 13:30:23 Oh, `define' doesn't work like `letrec' does it ... 13:30:33 Or does it, I forgot again 13:30:42 with letrec you still will have unspecified value, i think 13:30:51 yep, just tried it 13:31:00 Oh, uh, you're right, I got confused. 13:31:27 That's why datum-labels have been introduced in R7RS-small. 13:31:33 -!- przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has quit [Ping timeout: 250 seconds] 13:31:39 (So you can express circular lists without resorting to mutation or promises.) 13:31:43 isn't it an error to use them in code? i thought they are only for output 13:32:06 I don't think so .. let me check 13:32:44 hmm, I see now 13:33:10 not resorting to promise is indeed a lot better 13:33:21 It's only allowed in literals, but it is valid in code. 13:34:03 oh, right, checked it too. nice 13:35:05 And it actually says explicitly that it's for denoting "structures with shared or circular substructure" (that's where I have the idea from myself, presumably, I forget where I read what :P) 13:35:25 thank you defanor and taylanub that was helpful. 13:35:46 yw 13:35:50 np 13:36:57 -!- tenq is now known as tenq|away 13:42:07 -!- Cromulent|3 [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 13:47:09 I realized only now that s-expressions aren't usual binary trees at all. At least according to Wikipedia, a tree (whether binary or n-ary) is defined such that every node has a value AND zero or more children; a sexpr OTOH is either an atom (value only) or two sexprs (children only). I wonder why I realized this so late. 13:47:57 I also wonder if there's a term for the sexpr kind of tree data structure, where a node is either a value or a branch. 13:48:04 taylanub: that would be labelled binary trees. 13:48:17 taylanub: but you can have unlabelled binary trees too. 13:48:41 And of course, the point is that with conses, you can build any kind of trees, (cons label (cons left right)) for a labelled binary tree. 13:48:56 So "unlabelled binary tree" is the term for the sexpr kind of tree ? 13:49:06 I see. Thanks, Wikipedia doesn't seem to have anything on this. 13:49:07 (cons label (cons child1 (cons child2 (cons  (cons childn '()))))) for a n-ary tree. 13:49:48 taylanub: sexps are atoms or lists of sexps. Therefore they are trees of sexps. They are implemented with unlabelled binary trees of cons cells. 13:50:05 But you must distinguish things for what they are, from how they're implemented. 13:51:22 Apparently Alex Shinn's match.scm works on labelled trees implemented the way you've just shown, regarding its recent `***' syntax. Perhaps it should mention that explicitly. 13:52:26 Indeed, when speaking of frees, it should be made explicit what kind of tree and how they're implemented. 13:52:44 Often in lisp we use lists to implement trees, because that allows us to write literal trees as plain sexps. 13:53:17 But it's kind of an abuse, it's leaking abstractions. 13:54:43 ogamita, why is it leaky? 13:55:06 davexunit [~user@fsf/member/davexunit] has joined #scheme 13:55:54 przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has joined #scheme 13:56:52 jewel: I suppose because of the issue we just talked about; for instance match.scm implicitly works on labelled n-ary trees implemented via sexprs as (value child1 child2 ...), whereas I thought it works on unlabelled binary trees (which sexprs fundamentally are), because there's nothing to distinguish. 13:59:16 So I thought "(match '(foo . (bar . (baz . ()))) ((test *** 'baz) test)) => (foo)" is a bug. 13:59:35 no, fundamentally sexps are either atoms or lists of sexps. Incidentally, they're implemented as conses in lisp, but eg. in Ruby they are implemented as vectors of atoms or vectors. 14:00:10 MrFahrenheit [~RageOfTho@unaffiliated/rageofthou] has joined #scheme 14:00:14 Oh, I wasn't aware of that definition. I'm once again Wikipedia-bound here. 14:00:19 taylanub: that's the problem of using such type punning. But it also has advantages, so we keep it. 14:02:00 just so I understand, a vector is an ordered list right? 14:02:15 with random access? 14:04:06 Yes. (Though "ordered list" seems like a misnomer.) 14:11:12 -!- truncate [~vishesh@122.177.176.173] has quit [Quit: WeeChat 0.4.2] 14:13:06 stamourv` [~user@ahuntsic.ccs.neu.edu] has joined #scheme 14:18:56 jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has joined #scheme 14:18:59 -!- jao [~jao@21.Red-79-153-49.dynamicIP.rima-tde.net] has quit [Changing host] 14:18:59 jao [~jao@pdpc/supporter/professional/jao] has joined #scheme 14:21:51 -!- gravicappa [~gravicapp@80.90.116.82] has quit [Ping timeout: 240 seconds] 14:24:44 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 14:25:42 -!- Wolfy_ [a552d44c@gateway/web/freenode/ip.165.82.212.76] has quit [Ping timeout: 272 seconds] 14:42:30 oleo [~oleo@xdsl-78-35-151-154.netcologne.de] has joined #scheme 14:46:45 ogamita` [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has joined #scheme 14:47:31 -!- Riastradh [~riastradh@fsf/member/riastradh] has quit [Ping timeout: 272 seconds] 14:50:13 -!- ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has quit [Ping timeout: 248 seconds] 14:54:43 duggiefresh [~duggiefre@64.119.141.126] has joined #scheme 14:54:50 -!- jao [~jao@pdpc/supporter/professional/jao] has quit [Ping timeout: 264 seconds] 14:57:57 mdmkolbe [~adamsmd@107-218-198-115.lightspeed.dctril.sbcglobal.net] has joined #scheme 14:58:55 -!- ogamita` is now known as ogamita 15:01:25 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection reset by peer] 15:02:33 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 15:02:43 araujo [~araujo@gentoo/developer/araujo] has joined #scheme 15:02:57 hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has joined #scheme 15:07:33 ffio [~fire@unaffiliated/security] has joined #scheme 15:15:45 -!- hiroakip [~hiroaki@77-20-51-63-dynip.superkabel.de] has quit [Ping timeout: 246 seconds] 15:20:53 -!- defanor [~defanor@ppp91-77-185-244.pppoe.mtu-net.ru] has quit [Read error: Operation timed out] 15:23:14 defanor [~defanor@ppp85-141-206-68.pppoe.mtu-net.ru] has joined #scheme 15:23:35 -!- mdmkolbe [~adamsmd@107-218-198-115.lightspeed.dctril.sbcglobal.net] has quit [Ping timeout: 252 seconds] 15:25:03 -!- mmc1 [~michal@sams-office-nat.tomtomgroup.com] has quit [Read error: Connection reset by peer] 15:28:16 mmc [~michal@sams-office-nat.tomtomgroup.com] has joined #scheme 15:37:52 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 15:43:45 -!- MichaelRaskin [~MichaelRa@195.178.216.16] has quit [Quit: MichaelRaskin] 15:52:46 mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has joined #scheme 15:56:57 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 15:59:37 gravicappa [~gravicapp@ppp91-77-189-211.pppoe.mtu-net.ru] has joined #scheme 16:11:21 -!- hderms_ [pushp0p@0xffffff.be] has left #scheme 16:12:11 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 260 seconds] 16:14:00 -!- ffio [~fire@unaffiliated/security] has quit [Quit: WeeChat 0.4.1] 16:20:32 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 16:29:35 -!- scoofy [scoofy@catv-89-135-80-2.catv.broadband.hu] has quit [Ping timeout: 245 seconds] 16:46:38 przl_ [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has joined #scheme 16:46:43 joneshf-laptop_ [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has joined #scheme 16:46:57 ntesir_ [~rnd@31.220.43.117] has joined #scheme 16:51:59 kilimanjaro [~kilimanja@ip68-0-132-121.tc.ph.cox.net] has joined #scheme 16:52:02 -!- mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has quit [*.net *.split] 16:52:02 -!- przl [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has quit [*.net *.split] 16:52:02 -!- joneshf-laptop [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has quit [*.net *.split] 16:52:02 -!- ntesir [~rnd@31.220.43.117] has quit [*.net *.split] 16:52:18 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Quit: groovy2shoes] 16:55:48 mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has joined #scheme 16:58:43 MichaelRaskin [~MichaelRa@195.91.224.161] has joined #scheme 16:58:45 -!- mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has quit [*.net *.split] 17:01:09 -!- ogamita [~t@tru75-h02-31-38-72-69.dsl.sta.abo.bbox.fr] has quit [Ping timeout: 272 seconds] 17:02:31 -!- amgarchIn9 [~amgarchin@theo1.theochem.tu-muenchen.de] has quit [Ping timeout: 260 seconds] 17:04:34 arubin [uid489@gateway/web/irccloud.com/x-ynuvnysmdxldpfrp] has joined #scheme 17:04:53 mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has joined #scheme 17:04:57 yacks [~py@103.6.159.103] has joined #scheme 17:09:13 -!- mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has quit [*.net *.split] 17:12:47 -!- kilimanjaro [~kilimanja@ip68-0-132-121.tc.ph.cox.net] has quit [Quit: Leaving] 17:12:48 Riastradh [~riastradh@fsf/member/riastradh] has joined #scheme 17:15:03 mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has joined #scheme 17:17:04 -!- Ogion [~Ogion@203.Red-88-9-226.dynamicIP.rima-tde.net] has quit [Ping timeout: 246 seconds] 17:18:23 -!- civodul [~user@gateway/tor-sasl/civodul] has quit [Remote host closed the connection] 17:18:50 Ogion [~Ogion@203.Red-88-9-226.dynamicIP.rima-tde.net] has joined #scheme 17:19:36 -!- dpk [~dpk@199.241.31.225] has quit [Remote host closed the connection] 17:20:58 hiroakip [~hiroaki@ip-178-202-201-114.unitymediagroup.de] has joined #scheme 17:28:37 -!- Kabaka [kabaka@botters/kabaka] has quit [Ping timeout: 246 seconds] 17:28:39 -!- hiroakip [~hiroaki@ip-178-202-201-114.unitymediagroup.de] has quit [Ping timeout: 240 seconds] 17:30:16 snits [~snits@inet-hqmc03-o.oracle.com] has joined #scheme 17:30:39 -!- przl_ [~przlrkt@p549FDC34.dip0.t-ipconnect.de] has quit [Quit: leaving] 17:30:40 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 17:32:28 -!- d2biG [drbig@unhallowed.pl] has quit [Ping timeout: 246 seconds] 17:36:02 dRbiG [drbig@unhallowed.pl] has joined #scheme 17:37:27 Kabaka [kabaka@botters/kabaka] has joined #scheme 17:47:27 ebby [~ebby@c80-216-34-53.bredband.comhem.se] has joined #scheme 17:55:43 ffio [~fire@unaffiliated/security] has joined #scheme 17:57:20 -!- nmeum [~nmeum@2a00:12c0:1015:123::] has quit [Quit: Lost terminal] 17:59:09 aranhoide [~smuxi@82.Red-95-122-80.staticIP.rima-tde.net] has joined #scheme 18:04:16 -!- aranhoide [~smuxi@82.Red-95-122-80.staticIP.rima-tde.net] has quit [Read error: Operation timed out] 18:11:16 Shadox [Shadox@96-35-84-97.dhcp.bycy.mi.charter.com] has joined #scheme 18:11:53 nmeum [~nmeum@2a00:12c0:1015:123::] has joined #scheme 18:12:33 -!- mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has quit [Ping timeout: 240 seconds] 18:31:18 aranhoide [~smuxi@82.Red-95-122-80.staticIP.rima-tde.net] has joined #scheme 18:31:26 -!- vraid [d91bbc5a@gateway/web/freenode/ip.217.27.188.90] has quit [Ping timeout: 272 seconds] 18:35:19 -!- REPLeffect [~REPLeffec@69.54.115.254] has quit [Remote host closed the connection] 18:40:42 alexei [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has joined #scheme 18:45:45 -!- nmeum [~nmeum@2a00:12c0:1015:123::] has quit [Ping timeout: 245 seconds] 18:47:54 -!- alexei [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has quit [Quit: Konversation terminated!] 18:48:41 nmeum [~nmeum@2a00:12c0:1015:123::] has joined #scheme 18:48:54 amgarchIn9 [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has joined #scheme 18:51:43 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 18:53:34 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Max SendQ exceeded] 18:57:49 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 19:02:46 vraid [5fc705f2@gateway/web/freenode/ip.95.199.5.242] has joined #scheme 19:03:57 hiroakip [~hiroaki@ip-178-202-201-114.unitymediagroup.de] has joined #scheme 19:14:06 -!- ffio [~fire@unaffiliated/security] has quit [Quit: WeeChat 0.4.1] 19:28:35 -!- pnkfelix [~pnkfelix@89.202.203.51] has quit [Remote host closed the connection] 19:34:04 sheilong [~sabayonus@unaffiliated/sheilong] has joined #scheme 19:41:55 mdmkolbe [~adamsmd@mobile-130-126-255-227.near.illinois.edu] has joined #scheme 19:43:51 -!- joneshf-laptop_ [~joneshf@086.112-30-64.ftth.swbr.surewest.net] has quit [Remote host closed the connection] 20:00:06 -!- vraid [5fc705f2@gateway/web/freenode/ip.95.199.5.242] has quit [Ping timeout: 272 seconds] 20:00:07 -!- jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has quit [Read error: Connection timed out] 20:00:43 jewel [~jewel@105-236-25-199.access.mtnbusiness.co.za] has joined #scheme 20:03:29 -!- hiroakip [~hiroaki@ip-178-202-201-114.unitymediagroup.de] has quit [Ping timeout: 246 seconds] 20:06:02 -!- Ogion [~Ogion@203.Red-88-9-226.dynamicIP.rima-tde.net] has quit [Quit: Leaving] 20:13:06 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 20:14:09 Ogion [~Ogion@203.Red-88-9-226.dynamicIP.rima-tde.net] has joined #scheme 20:17:54 -!- taylanub [tub@p4FD91B1E.dip0.t-ipconnect.de] has quit [Quit: Using Circe, the loveliest of all IRC clients] 20:24:10 Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has joined #scheme 20:32:39 civodul [~user@gateway/tor-sasl/civodul] has joined #scheme 20:38:29 vraid [50d8e34d@gateway/web/freenode/ip.80.216.227.77] has joined #scheme 21:01:12 -!- amgarchIn9 [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 21:06:08 -!- eMBee [~eMBee@foresight/developer/pike/programmer] has quit [Ping timeout: 260 seconds] 21:09:19 -!- mrowe_away is now known as mrowe 21:09:52 eMBee [~eMBee@static.199.240.4.46.clients.your-server.de] has joined #scheme 21:09:57 -!- eMBee [~eMBee@static.199.240.4.46.clients.your-server.de] has quit [Changing host] 21:09:57 eMBee [~eMBee@foresight/developer/pike/programmer] has joined #scheme 21:11:21 amgarchIn9 [~amgarchin@p4FD568D7.dip0.t-ipconnect.de] has joined #scheme 21:23:58 -!- Cromulent [~Cromulent@cpc1-reig5-2-0-cust251.6-3.cable.virginm.net] has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] 21:29:58 -!- weie [~weie@softbank221078042071.bbtec.net] has quit [Quit: Leaving...] 21:59:20 -!- aranhoide [~smuxi@82.Red-95-122-80.staticIP.rima-tde.net] has quit [Ping timeout: 246 seconds] 22:06:46 -!- add^_ [~user@m176-70-201-196.cust.tele2.se] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:09:46 zzach [~zzach@dslb-092-073-092-038.pools.arcor-ip.net] has joined #scheme 22:10:42 -!- gravicappa [~gravicapp@ppp91-77-189-211.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 22:12:37 main [~main@azh234.neoplus.adsl.tpnet.pl] has joined #scheme 22:13:44 -!- main is now known as pumpkin360 22:15:09 Hi. Are there any higher orders functions similar to accumulate (fold-right) but operation on a number and not on a list. Like a for (in other languages) loop but accumulating it's result and returning it? 22:15:20 *operating 22:15:58 ofc, I can create one (the awesomeness of scheme). But I would prefer to use something widespread if possible 22:16:45 operating on a number how? 22:17:43 for (unsigned i = 0; i < n; i++) ... --> (do ((i 0 (+ i 1))) ((>= i n)) ...) 22:18:06 if could change the number somehow, check for some predicate and break if it is true/false. That would mean 2 additional arguments - but we can make any of them constant 22:18:40 http://mumble.net/~campbell/scheme/foof-loop.scm --> (loop ((for i (up-from 0 (to n)))) ...) 22:18:46 Riastradh: but that is a simple iteration and it look aweful 22:18:50 wait 22:19:04 didn't read the last line before entering it. 22:22:18 (http://mumble.net/~campbell/tmp/foof-loop.txt for documentation on the whole foof-loop thing) 22:36:24 Ok. I am not sure, but from what I read it seems like a thing which would allow me to build powerful things but that is not necessairlly what I needed. But I was just wondering wether such thing exists and if noone mentions it probably not. 22:36:40 Just realised I can just create a list generating function 22:37:09 something like unfold which I have already seen 22:37:26 wouldn't a simple recursive function work? 22:37:32 Thanks for help by the way. 22:37:44 vraid: it makes 5 lines from 2 22:38:15 vraid: which is a lot, it is often less convenient. 22:38:41 s/it/also it/ 22:38:48 s/it/also\ it/ 22:39:10 ah 22:40:00 -!- strobegen [~Adium@62.33.153.231] has quit [Quit: Leaving.] 22:46:54 I hope (scheme) improves its libraries across implementations. I really would like to see (scheme) used for more practical applications. 22:47:33 I don't know what I can do about it personally? 22:47:38 but I would be willing to help.. 22:48:13 zacts: did you look into racket? 22:48:17 I guess sfri is a step in that direction.. 22:48:23 vraid: PlaneT? 22:48:39 aye 22:49:08 yeah 22:49:15 but most of those are only specific to racket right? 22:49:37 why isn't there at least one standard library across scheme implementations? 22:49:49 or is that what R7RS big is trying to do? 22:50:39 R7RS is aimed at being a small, educational language, unlike R6RS which extended the language in some ways 22:51:07 but in the meantime I'm hoping to contribute chicken eggs and PlaneT modules.. 22:53:19 -!- davexunit [~user@fsf/member/davexunit] has quit [Quit: Later] 23:02:51 -!- nmeum [~nmeum@2a00:12c0:1015:123::] has quit [Remote host closed the connection] 23:07:03 zacts: SLIB is more less standard I guess 23:14:11 http://trac.sacrideo.us/wg/wiki/ReassignedDocket -- does it mean that there will be no C/CLR/Java FFI in r7rs-large? i don't get if they decided to postpone those topics, or just deciding still 23:14:41 what does 'No SC action yet.' mean? 23:21:13 zacts: for the same reason there isn't a standard library between ruby and python -- they're different languages with a common heritage 23:21:41 -!- round-robin [~bubo@91.224.149.58] has quit [Quit: leaving] 23:28:05 dpk [uid15387@gateway/web/irccloud.com/x-mvdprrqrbdwnezzr] has joined #scheme 23:38:17 -!- civodul [~user@gateway/tor-sasl/civodul] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:47:38 -!- pumpkin360 [~main@azh234.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 264 seconds] 23:53:30 -!- arubin [uid489@gateway/web/irccloud.com/x-ynuvnysmdxldpfrp] has quit [] 23:55:33 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection reset by peer] 23:56:39 araujo [~araujo@gentoo/developer/araujo] has joined #scheme