00:12:10 DrDuck [~duck@user-24-236-92-111.knology.net] has joined #scheme 00:26:13 gienah [~mwright@ppp121-44-70-112.lns20.syd6.internode.on.net] has joined #scheme 00:26:25 arcfide [1000@c-69-136-7-94.hsd1.in.comcast.net] has joined #scheme 00:28:16 -!- rvn_ [~rvn@77.107.164.131] has quit [Remote host closed the connection] 00:33:38 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Read error: Operation timed out] 00:38:22 -!- tupi [~david@139.82.89.157] has quit [Quit: Leaving] 00:39:57 -!- frhodes [~user@168-103-97-250.albq.qwest.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 00:43:25 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 240 seconds] 01:05:30 preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #scheme 01:06:13 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 245 seconds] 01:06:31 -!- preflex_ is now known as preflex 01:15:19 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 01:24:34 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 01:43:27 rimmjob [~king@adsl-108-195-220-248.dsl.hstntx.sbcglobal.net] has joined #scheme 01:43:40 whats a good scheme that works with slime? i know chicken does 01:47:17 not natively, but with stuff added 01:49:21 MIT, Kawa, 01:49:24 maybe others 01:50:16 There is also bee mode for Bigloo, which is similar 01:50:26 or so I'm told, I'm not an Emacs person myself. 01:51:35 -!- wisey [~Steven@host86-164-93-171.range86-164.btcentralplus.com] has quit [Quit: Leaving] 01:52:43 *qu1j0t3* blushes at the confession 01:52:58 That's not a confession, it's a boast! 01:53:00 qu1j0t3: Emacs-non-users coming out of the woodwork? :-P 01:53:08 jcowan: vi, or something else? 01:53:12 (Please not nano. :-P) 01:53:15 "ex" 01:53:19 jcowan: Awesome! 01:53:20 I am an "ex" troglodyte 01:53:27 jcowan: Just one step above ed. :-D 01:53:37 cky: agreed on the nano thing 01:53:41 Right. I'm willing to trade off some standardosity for a little convenience. 01:53:56 I've used nano: it's better than its reputation. 01:54:06 jcowan: Work had some servers that had nano and Emacs installed, but no vi. I ended up using ed to edit files, instead. 01:54:12 well it sort of works but it's ... 01:54:39 i mean i can't possibly imagine basing my identity around nano the way I base it around vimacs 01:55:00 jcowan: My workmates thought I was hardcore, but seriously, back before I used Unix, I used DOS, and its edlin editor (which I swear is heavily ed-inspired). 01:55:33 -!- Modius [~Modius@cpe-70-123-140-183.austin.res.rr.com] has quit [Quit: "Object-oriented design" is an oxymoron] 01:56:42 frhodes [~user@168-103-97-250.albq.qwest.net] has joined #scheme 02:04:11 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 256 seconds] 02:04:24 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 252 seconds] 02:07:05 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 02:07:54 It's too primitive. 02:08:18 I tried to write an implementation for Unix once, but you really need the character-mode editing within a line. 02:08:24 So I gave up on it, too much trouble. 02:08:55 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 02:09:15 vjacob [~vjacob@78-105-184-157.zone3.bethere.co.uk] has joined #scheme 02:09:18 genieliu [~genieliu@59.78.62.120] has joined #scheme 02:09:25 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 02:09:39 -!- vjacob [~vjacob@78-105-184-157.zone3.bethere.co.uk] has quit [Client Quit] 02:09:52 cky, Might be, but at one time, *all* editors were line editors. 02:12:27 jcowan: *nods* 02:12:36 dsmith: I agree. 02:13:38 (emacs was the first "screen" editor, wasn't it?) 02:14:34 -!- turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has quit [Ping timeout: 258 seconds] 02:16:12 Either that or vi, can't remember their respective histories now. 02:16:36 dsmith: i think that is rather unlikely. 02:16:53 Well TECO would be before emacs at least 02:17:11 teco isn't a screen editor afaik 02:17:16 Before ex, I was a teco maven. 02:17:20 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 02:17:21 Teco has both screen and non-screen modes 02:17:29 jcowan: ah. i've only used the line mode. 02:17:33 *jcowan* too. 02:17:35 jcowan: is that later versions? 02:17:42 i am not sure the version i used had a screen mode. 02:18:01 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Client Quit] 02:18:07 qu1j0t3, raw teco wasn't, but the Editor MACroS made it so. 02:18:17 The screen mode shows you a view around dot on the top half of the screen and the regular command mode in the bottom half. 02:18:26 dsmith: i see 02:18:28 Note that DEC Teco and MIT Teco are different things 02:18:36 jcowan: i used DEC TECO 02:18:38 I'm talking about DEC Teco here, which was a fork. 02:18:44 Emacs was built on MIT Teco 02:18:50 gotcha 02:18:54 Ahh 02:19:05 jcowan: so, VMS hand, eh? 02:19:08 I did use the screen mode of DEC Teco 02:19:27 qu1j0t3: Some but not much. I did a lot of RT-11 and RSTS/E and RSX-11/M+ 02:19:35 i see 02:19:38 But on VMS I mostly lived in Eunice, the Cygwin of its day. 02:19:42 *qu1j0t3* is pdp, vax collector. 02:20:37 jcowan: so you were using bsd on the side as well? 02:20:50 No. 02:21:05 was it unix exposure that made you prefer eunice? 02:21:11 Conceptual exposure. 02:21:25 I had known about Unix for years and was panting for a chance to actually use it. 02:21:29 ah. 02:21:45 yeah that parallels my desperate efforts to have unix-like environments on Macs 02:21:51 So when my employer got its first Microvax, I grabbed Eunice and installed it. 02:21:58 at a time when unix machinery was too far away or unaffordable 02:22:03 Just so. 02:22:14 jcowan: because you couldn't persuade them to ditch vms for bsd. :) 02:22:20 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 02:22:21 Right. 02:22:29 After all, people buy computers to run apps, even in that day. 02:22:33 certainly 02:22:36 genieliu [~genieliu@59.78.62.120] has joined #scheme 02:22:41 but LSEDIT and DCL chafed 02:22:45 (you) 02:22:46 Right. 02:22:57 I run Cygwin and Colinux on my XP SP3 laptop today in the same spirit. 02:23:01 :) 02:23:27 a little beachhead of sanity. 02:23:31 Right. 02:24:02 -!- Lemonator [~kniu@pool-96-236-148-210.pitbpa.fios.verizon.net] has quit [Read error: Connection reset by peer] 02:24:14 kniu [~kniu@pool-96-236-148-210.pitbpa.fios.verizon.net] has joined #scheme 02:24:20 thanks for the clarifications. the witness may leave the stand. 02:24:34 All my Schemes except Chicken and Chibi, my main two, I run under Colinux because it's easier and quicker than using Cygwin -- Cygwin build is excruciatingly slow. 02:24:42 why not go all-Linux? 02:24:48 (I *had* to ask.) 02:25:02 because you maintain windows ports too? 02:26:21 Cygwin is always just there; I keep a few Cygputty windows around all the time. Colinux isn't robust against Windows sleep events, alas. 02:26:23 -!- genieliu [~genieliu@59.78.62.120] has quit [Client Quit] 02:26:42 I don't maintain any ports at present, though I guess I am the de facto Cygwin user for Chibi. 02:26:48 *jcowan* loves Chibi. 02:27:06 genieliu [~genieliu@59.78.62.120] has joined #scheme 02:27:11 *qu1j0t3* uses chicken, maybe should be chi-bi-curious? 02:27:22 jcowan: I don't suppose you tried the new image support under cygwin? 02:27:36 No, I don't know about it even. 02:28:08 I plan to package Chibi as a Chicken egg for people who need fast runtime evaluation. 02:28:27 -!- frhodes [~user@168-103-97-250.albq.qwest.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 02:29:23 So I boot Colinux when I want to test something in all 28 Schemes or when I need to do something that's not practical in Cygwin. And when it falls over, it falls over. 02:29:36 It never falls over while I'm actually using it, and that's good enough. 02:30:23 all. 28. schemes. 02:30:30 *qu1j0t3* bows before jcowan 02:30:52 frhodes [~frhodes@m992736d0.tmodns.net] has joined #scheme 02:32:54 jcowan: basically "chibi-scheme -d chibi.image" dumps an image file, and "chibi-scheme -i chibi.image" loads it 02:33:52 you can do e.g. "chibi-scheme -msrfi.1 -d chibi.image" to build an image with pre-compiled SRFI-1 but it's all pretty experimental 02:34:26 realitygrill [~realitygr@adsl-76-226-139-190.dsl.sfldmi.sbcglobal.net] has joined #scheme 02:38:03 -!- genieliu [~genieliu@59.78.62.120] has left #scheme 02:38:28 bpalmer [user@nat/google/x-cweoddsfxvhhttvl] has joined #scheme 02:41:05 foof: Thanks. 02:41:12 So that's on the main branch now? 02:41:38 qu1j0t3: 02:41:41 cowan@pubuntu:~$ schemes 02:41:41 For Scheme, try racket, gosh, mit-scheme, gsi -:s, csi -R numbers, bigloo, scsh, guile, kawa, scheme48, sisc, chibi-scheme, petite, scm -m, ikarus, larceny, ypsilon, mosh, iron, stklos, ksi, sscm, s9, s7, elk, umb-scheme, vx-scheme, oaklisp 02:41:41 cowan@pubuntu:~$ lisps 02:41:41 For Lisp, try abcl, clisp, cmucl, ccl, ecl, gcl, sbcl 02:41:42 cowan@pubuntu:~$ 02:42:36 yes, impressive. 02:42:53 The main reason to keep around so many is the Scheme standardization work: I try different constructions and see what different Schemes (and sometimes CLs) do with them. 02:43:55 jcowan: Yes - I should keep the more experimental stuff on separate branches, but I like getting bug reports before I've even announced things to the list :) 02:44:17 I belong to the "develop on trunk, release on a branch" school 02:44:36 But for that you do need to release more often than you currently do, even if it's just making a branch to draw a line in the sand. 02:45:05 Here was my most recent little test: 02:45:08 (define e (interaction-environment)) 02:45:08 (define x (list 'cons 1 2)) 02:45:08 (set-car! x cons) 02:45:08 (define y (list (list 'quote 'cons) 1 2)) 02:45:08 (set-car! (cdar y) cons) 02:45:10 (eval x e) 02:45:12 (eval y e) 02:45:36 -!- gffa [~gffa@unaffiliated/gffa] has quit [Quit: sleep] 02:45:40 About half the schemes didn't like (eval x e), but almost all were okay with (eval y e) 02:46:00 (Some older systems only supported one-arg eval) 02:46:15 :-O 02:46:40 So most evals accepted procedure objects in the thing to eval, but some expected it to be quoted first. 02:46:52 (Non-self-evaluating procedures. :-P) 02:47:02 genieliu [~genieliu@59.78.62.120] has joined #scheme 02:48:10 jcowan: But that won't work with Chicken's inline-eval. 02:48:35 So I hear. 02:49:01 I just tried elisp: it's okay with the non-quoted procedure, but fails with the quoted one, as you'd expect. 02:49:30 Crap. What's the elisp function to evaluate to terminate emacs? 02:49:40 Ah, kill-emacs. 02:52:49 rapacity [~prwg@unaffiliated/rapacity] has joined #scheme 02:54:07 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 02:54:20 genieliu [~genieliu@59.78.62.120] has joined #scheme 02:54:35 The CLs of course do not like anything like this at all. 02:55:36 do i need a lot of physics before doing SICM? 02:55:54 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 255 seconds] 02:56:04 SICP? 02:56:27 structure and interpretation of classical mechanics 02:56:27 oh SICM 02:56:29 same author 02:56:31 yeah forgot about that 02:56:44 you might get a good answer on Quora about that 02:56:56 or just dive in 02:58:18 -!- Brendan_T [~brendan@static.112.22.47.78.clients.your-server.de] has quit [Ping timeout: 245 seconds] 02:58:34 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 02:59:49 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 03:00:04 theres a free pdf online ;o 03:00:07 genieliu [~genieliu@59.78.62.120] has joined #scheme 03:00:26 rimmjob: Supposedly not. 03:00:57 -!- genieliu [~genieliu@59.78.62.120] has quit [Client Quit] 03:01:15 genieliu [~genieliu@59.78.62.120] has joined #scheme 03:02:34 it does appear that there is. 03:03:29 http://www.fisica.net/mecanicaclassica/struture_and_interpretation_of_classical_mechanics_by_gerald_jay_sussman.pdf 03:03:30 http://tinyurl.com/3vaph4d 03:03:53 -!- ijp [~user@host109-151-54-191.range109-151.btcentralplus.com] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 03:06:25 mithos28 [~eric@99-113-32-54.lightspeed.sntcca.sbcglobal.net] has joined #scheme 03:07:31 jcowan_ [~John@cpe-98-14-172-212.nyc.res.rr.com] has joined #scheme 03:08:37 -!- jcowan [~John@cpe-98-14-172-212.nyc.res.rr.com] has quit [Ping timeout: 258 seconds] 03:09:39 -!- jcowan_ [~John@cpe-98-14-172-212.nyc.res.rr.com] has quit [Client Quit] 03:09:46 this is fairly easy to understand, i think ill buy the book 03:09:55 jcowan [~John@cpe-98-14-172-212.nyc.res.rr.com] has joined #scheme 03:10:38 :) 03:11:27 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 03:20:16 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 03:21:33 genieliu [~genieliu@59.78.62.120] has joined #scheme 03:22:59 -!- genieliu [~genieliu@59.78.62.120] has quit [Client Quit] 03:23:19 genieliu [~genieliu@59.78.62.120] has joined #scheme 03:48:47 realitygrill_ [~realitygr@adsl-76-226-134-251.dsl.sfldmi.sbcglobal.net] has joined #scheme 03:49:03 -!- realitygrill [~realitygr@adsl-76-226-139-190.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 248 seconds] 03:49:03 -!- realitygrill_ is now known as realitygrill 03:49:13 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 252 seconds] 03:51:59 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: 1733] 03:55:28 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 03:56:34 -!- DrDuck [~duck@user-24-236-92-111.knology.net] has left #scheme 04:11:58 -!- kennyd [~kennyd@93-136-110-42.adsl.net.t-com.hr] has quit [Ping timeout: 260 seconds] 04:14:14 kennyd [~kennyd@93-141-21-243.adsl.net.t-com.hr] has joined #scheme 04:15:37 uvtc [~uvtc@ool-45732836.dyn.optonline.net] has joined #scheme 04:16:30 Hi, all. Was hoping someone might be around to answer this beginner question. Will try to use lisppaste... 04:17:07 *qu1j0t3* moves to red alert 04:17:12 Consider a simple function for prepending a value to a list. The following works in Python. 04:17:44 Gah. Hm. 04:17:55 *qu1j0t3* considers a spherical cow in the meantime 04:18:29 foof! 04:18:34 -!- genieliu [~genieliu@59.78.62.120] has quit [Quit: leaving] 04:18:51 Trying to use http://paste.lisp.org/new/scheme , but it's just giving a blank page after I hit submit... 04:19:22 uvtc: i liek http://paste.pocoo.org - it has a scheme mode 04:19:55 Shazbot! Ok, will try that. Just a sec, please. Thank you for holding. Your call is *very* important to us... 04:20:37 *qu1j0t3* holds, white-knuckled... 04:21:09 http://paste.pocoo.org/show/485367/ 04:21:39 yes. 04:21:53 I see whut you did thar. 04:21:55 But this Scheme code fails. 04:21:57 http://paste.pocoo.org/show/485368/ 04:22:12 well 04:22:48 you're aware this is more imperative than functional idiom 04:23:10 Not really, no. I'd love for someone to say, "this is the way you do that in Scheme". 04:23:30 But first, 04:23:31 functionally you could say (print (prepend-onto A (prepend-onto B (prepend-onto C '())))) 04:23:51 I'd like to know why the pasted Scheme doesn't work. I seems like it should. 04:24:35 it is likely that your set! is using a different environment from the one you expect 04:24:46 bleh 04:24:59 nah, ignore that. it's late, i'm not thinkin' 04:25:00 s/I seems/It seems/ 04:25:14 well 04:25:17 no, i'm right. 04:25:20 there's a local binding for a-list 04:25:51 the cons is cons'ing its little heart out 04:25:59 but the a-list is passed by value, so to speak 04:26:12 and the some-list that was bound to it is unmoved by your set! 04:26:29 Ah. In the Python code, the a_list is a reference, and Python doesn't like to copy things, so it just copies the pointer behind-the-scenes. 04:26:55 But Scheme like to copy things when I pass them as args into procedures? 04:26:57 yeah, the set! binds to the new object, but the binding is in the inner environment, in a lambda in prepend-onto 04:27:09 uvtc: it's not copying; the explanation is more subtle ^^ 04:27:37 new list* 04:31:09 Ok, I added some print statements. The cons is consing. The set! is set!ing. But, as you allude to, it's always consing to the empty list, and never the one on the outside. 04:31:39 right 04:31:48 it's changing the value bound to the inner binding, the argument 04:32:02 So it looks like C, where arguments are being passed by value (not by reference). 04:32:35 Which makes it *appear* that Scheme is copying `some-list` every time. 04:32:36 well.. yeah you could consider that it's passing a pointer as if C 04:32:49 and you are assigning to the pointer in the function 04:33:11 the book Programming in Scheme (Abelson) covers environments and bindings pretty well 04:33:13 But if it was passing a pointer to `some-list`, then `some-list` (livin' on the outside) would be getting changed every call. 04:33:35 Scheme does not actually have a list datatype like Python's. 04:33:58 uvtc: no 04:34:07 you haven't got it yet. it's not making a copy of any list. 04:34:10 qu1j0t3, (btw, paste.pocoo.org is quite nice. Thanks for the link.) 04:34:18 uvtc: np 04:34:26 When you prepend something, you are simply constructing a new pair which points to the new first element and to the existing list. 04:34:47 So the old and new lists partly share their structure. 04:35:33 Unless you *actually* mutate pairs, this sharing is indiscernible, but it means that the result of cons must be explicitly returned to the caller. 04:36:07 jcowan, interesting. I think I need to draw myself a picture with paper and pencil to understand this. Thanks. 04:36:33 yes, that should help 04:36:38 also a book may 04:36:44 Draw a list as a sequence of pairs; the left half of each pair points to an element in the list, the right half points to the next pair. 04:37:42 The right side of the last pair points to the magic object (), which is pronounced "nil" or "the empty list"; it is not a pair. 04:38:02 http://cloud9.hedgee.com/priv/expr1.png :-D 04:38:08 jcowan, ok. 04:38:14 drdo [~drdo@91.205.108.93.rev.vodafone.pt] has joined #scheme 04:38:30 uvtc: See the link I just posted for an example. 04:38:40 A rather hairy example with many sublists, sub-sublists, etc. 04:38:52 jcowan: Yes. (On purpose.) 04:39:04 Walking before running, cky. 04:39:33 cky, what do the markings mean between boxes that aren't arrows? Some are vertical, some horizontal. 04:39:39 I created that diagram over 10 years ago, and I kind of use it as my dog and pony show. :-) 04:39:51 uvtc: Vertical are for referring to sublists. 04:40:02 uvtc: Horizontal are for referring to the rest elements in the same list. 04:40:30 cky: That the given side of the box (usually the right side) contains a pointer to the other box. 04:40:30 cky, Um, I mean the markings that have no arrowhead. 04:40:42 Oh. 04:40:47 The horizontal marking is a minus sign 04:40:52 the vertical one is a slash 04:41:01 That. :-) 04:41:26 cky, What is the expression (?) that the diagram is modelling? 04:41:29 Scheme identifiers can be almost anything that is not a number. 04:42:19 uvtc: (let ((s5 (sqrt 5))) (/ (- (expt (/ (1+ s5) 2) n) (expt (/ (- 1 s5) 2) n)) s5)) 04:42:34 uvtc: If you have infinite-precision numbers, that calculates fib(n). 04:43:15 cky, Thanks. ... That one is going to require extra paper and pencil. :) 04:43:23 Quite. :-P 04:43:55 However, nobody has infinite precision irrational numbers, for obvious reasons. 04:44:01 Indeed. 04:44:10 So in practice, rounding is required to get the desired result. 04:48:01 And if you round, then the (expt (/ (- 1 s5) 2) n) becomes irrelevant (it gets smaller and smaller as n gets big), so you end up with: (let ((s5 (sqrt 5))) (round (/ (expt (/ (1+ s5) 2) n) s5))) 04:49:45 Or even: (let* ((s5 (sqrt 5)) (phi (/ (1+ s5) 2))) (round (/ (expt phi n) s5))) 04:52:11 (Even rounding will only get you so far, because both (sqrt 5) and expt have inaccuracies.) 04:52:30 (Such being the nature of irrational numbers, as jcowan said.) 04:52:53 s/inaccuracies/limited precision/ 04:53:27 pjb [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 04:54:45 bzzbzz [~franco@modemcable240.34-83-70.mc.videotron.ca] has joined #scheme 04:55:04 b 4 04:55:09 oop 04:56:32 qu1j0t3, You sank my battleship! 04:57:04 :-D 04:58:53 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 04:59:02 cky: I ran a memoized conventional fib algorithm for 999 as well as the exact formula. The "exact" formula is too small by a factor of 1.6180339887498405 ( 04:59:15 because of the roundoff errors. 05:01:59 Hahahahaha, oh dear. 05:02:47 Re memoised conventional algorithm, I want to write a (SRFI 41) stream implementation now. :-) 05:02:52 hey cky, jcowan 05:03:35 jcowan: that old behavior you were seeing in rc1 was still a hack I used, but removed it went it was not needed any more :) 05:03:45 Ah. 05:03:54 Fair enough. 05:04:14 -!- sstrickl [~sstrickl@146-115-65-210.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has quit [Quit: sstrickl] 05:04:30 I only accept serializable data now, eg syntax, records, but not procedures 05:05:49 also the error messages are very confusing :) 05:06:36 jcowan: some other test cases: (eval `(apply ',cons) (interaction-environment)) and (eval `(apply ,cons) (interaction-environment)) 05:07:34 errr, they need some args still, given they all that 05:07:58 rudybot: (require srfi/1 srfi/41) 05:08:01 cky: your sandbox is ready 05:08:01 cky: Done. 05:08:05 given they handle the above 05:08:13 rudybot: (define fib (let* ((s5 (sqrt 5)) (phi (/ (add1 s5) 2))) (lambda (n) (round (inexact->exact (/ (expt phi n) s5)))))) 05:08:14 cky: Done. 05:08:22 rudybot: (define fib-stream (stream-let loop ((a 0) (b 1)) (stream-cons a (loop b (+ a b))))) 05:08:23 cky: Done. 05:08:34 rudybot: (list-index (compose not =) (stream->list 100 fib-stream) (map fib (iota 100))) 05:08:37 cky: ; Value: 71 05:08:52 jcowan: ^^--- the magic value at which the "exact" version breaks. ;-) 05:09:13 Cool. 05:11:36 jcowan: Thanks for the help. What we were discussing may be easier to see when `some-list` starts out as something more substantial, like '(a b). 05:11:49 In that case, I can see that the cons creates a new pair, 05:11:50 *jcowan* nods. 05:12:08 and that a-list (inside the procedure) is being bound to that new pair, 05:12:36 and that the new pair's cdr points to the front of a-list. 05:12:56 So, I surely see what you mean when you said there's sharing going on. 05:13:42 But I'm not sure I understand why some-list hasn't changed after the procedure returns... Hm ... I think I read that all procedures in Scheme are closures... 05:14:04 uvtc: In my diagram, there are three cons cells with contents '(s5 . ()). In theory, it's possible to make them all the same cell, so that storage is shared, but that would complicate the diagram even more, I think. :-P 05:14:56 jcowan: example of what is allowed currently: http://eval.ironscheme.net/?id=(define-record-type+foo+(fields+bar))%0A(define+x+(make-foo+42))%0A(write+x)%0A(newline)%0A(write+(eval+(list+'foo-bar+`'%2Cx)+(interaction-environment)))+%3B+ok%0A(eval+(list+'foo-bar+x)+(interaction-environment))+%3B+fails 05:15:45 cky: Thank you, cky. For the time being, I haven't yet tried to digest the diagram. Will get back to it. 05:16:19 I might enable that for procedures too, but not sure if it will handle all the cases 05:17:09 -!- rff [~rff@ip72-207-241-136.br.br.cox.net] has quit [Ping timeout: 255 seconds] 05:17:36 or http://eval.ironscheme.net/?id=10 :) 05:20:29 jcowan: Oh, wait, I think I see: When I pass some-list into the procedure, the local a-list gets bound to the same storage that some-list is bound to. Then I re-bind a-list to the new cons cell, and then return, where some-list is still pointing to what it did when we started! 05:24:07 qu1j0t3, jcowan: Thanks! 05:25:05 -!- MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has quit [Ping timeout: 258 seconds] 05:27:11 -!- yareally [~yarly@codingcreation.com] has quit [Ping timeout: 248 seconds] 05:27:51 -!- pjb [~t@81.202.16.46.dyn.user.ono.com] has quit [Ping timeout: 252 seconds] 05:28:41 pjb [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 05:31:59 -!- jlongster [~user@pool-173-53-25-235.rcmdva.fios.verizon.net] has quit [Ping timeout: 248 seconds] 05:38:59 qu1j0t3, regarding a more functional solution, maybe this gets a tiny bit closer: http://paste.pocoo.org/show/485379/ 05:40:13 uvtc: Right, so now you just have to transform that into a named let-based loop, and it will be fully-functional. 05:40:35 (Of course, you can also use fold.) 05:40:37 cky, wait! Don't tell me... 05:40:48 uvtc: Okay. 05:41:00 Then don't read up on fold yet, till you master named let. :-) 05:41:07 cky, right. 05:43:29 realitygrill_ [~realitygr@adsl-76-226-133-118.dsl.sfldmi.sbcglobal.net] has joined #scheme 05:45:01 -!- dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has quit [Quit: dnolen] 05:45:17 uvtc: Would you like to see an example of using named let, or have you got that handled? :-) 05:45:19 -!- realitygrill [~realitygr@adsl-76-226-134-251.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 248 seconds] 05:45:19 -!- realitygrill_ is now known as realitygrill 05:45:58 cky, Pasting now captain. Please hold present course for just another moment... 05:46:03 :-D 05:46:47 cky: This seems to work: http://paste.pocoo.org/show/485381/ ! 05:47:35 uvtc: Okay, let's try to do it in a way that doesn't use set!. :-) 05:47:50 Hahaha. :) 05:48:17 So rather than having a pre-existing list some-list that you modify, consider creating a new list inside the loop, and returning that. 05:50:02 Ok. Trying ... 05:50:09 :-) 05:50:23 Lemme know if you need a hint at any stage. 05:50:33 Thanks! 05:52:05 cky: Wait. I'm not sure I see the point of that. If I've got some list items already, and I'm not prepending them to some existing list, then ... that's just returning a copy of the list I start with? 05:52:36 I can use a named `let` to *generate* a list though. 05:52:51 Yes. 05:55:09 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 05:56:27 -!- elly [~elly@atheme/member/elly] has quit [Remote host closed the connection] 05:56:30 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 05:57:04 HG` [~HG@p5DC05AF1.dip.t-dialin.net] has joined #scheme 05:58:09 elly [~elly@atheme/member/elly] has joined #scheme 06:03:18 cky: Working on it, but this doesn't work: http://paste.pocoo.org/show/485383/ 06:08:32 realitygrill_ [~realitygr@adsl-76-226-137-34.dsl.sfldmi.sbcglobal.net] has joined #scheme 06:09:51 -!- realitygrill [~realitygr@adsl-76-226-133-118.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 248 seconds] 06:09:51 -!- realitygrill_ is now known as realitygrill 06:09:55 uvtc: pretty close though: ;; Create a list of 10 random ints [0, 10) 06:09:55 (use srfi-27) 06:09:55 (define my-list 06:09:55 (let loop ((n 10) 06:09:56 Oh, add another local scope 06:09:58 ls '()) 06:10:00 ! 06:10:01 (if (< n 1) 06:10:04 ls 06:10:07 (loop (- n 1) 06:10:10 (cons (random-integer 10) ls))))) 06:10:13 oops 06:10:15 I meant: http://ix.io/1U7 06:10:16 Wait wait. Fingers in my ears ... 06:10:16 ! 06:10:18 :) 06:10:19 bit o' accidental paste there :-| 06:10:23 *offby1* glances around nervously. 06:10:43 offby1: I just meant I wanted to see if my idea worked before looking at your tips. Thanks though! 06:12:24 good sport 06:13:39 in short: you ommitted a () but otherwise it's fine 06:16:22 offby1, cky: tried this http://paste.pocoo.org/show/485387/ but it's still not there. Closer? 06:17:29 Oh, I didn't bind temp-list to that cons ... but then I'd be using `set!` ... Hm... 06:18:28 *uvtc* briefly peeks at offby1's solution ... 06:18:52 offby1, Oh, accidentaly paste. Right. 06:19:07 soveran [~soveran@dan75-2-87-91-33-52.dsl.sta.abo.bbox.fr] has joined #scheme 06:20:04 gravicappa [~gravicapp@ppp91-77-166-105.pppoe.mtu-net.ru] has joined #scheme 06:20:45 -!- realitygrill [~realitygr@adsl-76-226-137-34.dsl.sfldmi.sbcglobal.net] has quit [Quit: realitygrill] 06:23:31 uvtc: Getting there? ;-) 06:23:48 cky: Almost. Can you backlog and give me a hint? 06:24:13 uvtc: Okay. Hint 1: you should use two variables in your named let: one for the input, and one for the output. 06:25:16 -!- soveran [~soveran@dan75-2-87-91-33-52.dsl.sta.abo.bbox.fr] has quit [Remote host closed the connection] 06:26:01 cky: well, I think I tried that (see bottom half of http://paste.pocoo.org/show/485383/ ), but couldn't get it to work. 06:26:51 The bottom half is the right idea, yes. 06:27:11 uvtc: Which implementation are you using? 06:27:18 cky, Chicken 06:27:45 Okay, so why doesn't the bottom half code work? 06:27:55 Oh, I see. 06:27:58 I run it, and it produces "10\n30". 06:28:05 The second variable is missing brackets. :-) 06:28:19 (let loop ((n 10) (ls '())) ...) 06:28:34 Ah! 06:29:16 masm [~masm@bl15-65-201.dsl.telepac.pt] has joined #scheme 06:29:48 cky, Hm. Although you're correct, after fixing that typo, it's still not working (and it's producing the same output as before). 06:30:23 Really?! 06:31:16 cky: No, wait. 06:31:24 X-Scale [email@sgi-ultra64.broker.freenet6.net] has joined #scheme 06:31:40 cky: Sorry, yes. It works now! Thanks for spotting my error! 06:31:48 :-) 06:31:52 Wheeee!!! 06:32:06 cky: Off to bed. Thanks a bunch. :) 06:32:10 Have fun! 06:32:19 -!- uvtc [~uvtc@ool-45732836.dyn.optonline.net] has left #scheme 06:38:33 MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has joined #scheme 06:47:11 -!- MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has quit [Ping timeout: 248 seconds] 06:48:08 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 06:54:32 -!- jcowan [~John@cpe-98-14-172-212.nyc.res.rr.com] has quit [Quit: Leaving] 06:56:39 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 255 seconds] 06:56:41 soveran [~soveran@dan75-2-87-91-33-52.dsl.sta.abo.bbox.fr] has joined #scheme 07:12:01 -!- y3llow [~y3llow@111-240-167-172.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 07:12:13 y3llow_ [~y3llow@111-240-167-172.dynamic.hinet.net] has joined #scheme 07:13:06 -!- y3llow_ is now known as y3llow 07:14:37 -!- woonie [~woonie@nusnet-228-5.dynip.nus.edu.sg] has quit [Ping timeout: 240 seconds] 07:17:25 MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has joined #scheme 07:18:15 does anyone know a scheme that compiles directly to machine code? i cant find one :< 07:19:23 i found "Real schemes compile directly to machine code" in a javascript implementation ;o 07:21:11 any statement about real scotsmen is patently not something that a real scotsman would believe 07:22:09 im not saying that schemes that compile to C first arent real 07:22:19 just that i want to look at the code of one that doesnt 07:22:51 for educational purposes 07:23:27 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Read error: Operation timed out] 07:24:29 rimmjob: Larceny. 07:25:02 rimmjob: It uses the Sassy assembler to generate output code, for x86 at least. 07:25:17 (Well, it did at one stage. It may be using a different assembler these days.) 07:26:02 thanks :) 07:26:11 :-) 07:27:45 -!- pjb [~t@81.202.16.46.dyn.user.ono.com] has quit [Ping timeout: 258 seconds] 07:30:26 -!- soveran [~soveran@dan75-2-87-91-33-52.dsl.sta.abo.bbox.fr] has quit [Remote host closed the connection] 07:45:51 -!- MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has quit [Ping timeout: 248 seconds] 07:54:33 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 245 seconds] 07:55:43 MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has joined #scheme 08:12:05 -!- gravicappa [~gravicapp@ppp91-77-166-105.pppoe.mtu-net.ru] has quit [Ping timeout: 259 seconds] 08:16:11 jewel [~jewel@196-209-248-53.dynamic.isadsl.co.za] has joined #scheme 08:23:06 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 260 seconds] 08:23:31 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 08:25:10 -!- mithos28 [~eric@99-113-32-54.lightspeed.sntcca.sbcglobal.net] has quit [Quit: mithos28] 08:26:31 gravicappa [~gravicapp@ppp91-77-166-120.pppoe.mtu-net.ru] has joined #scheme 08:32:17 peterhil` [~peterhil@ZYKMMMXXX.gprs.sl-laajakaista.fi] has joined #scheme 08:33:15 Kajtek [~nope@nat4-230.ghnet.pl] has joined #scheme 08:33:34 -!- Kajtek is now known as Kajtek2 08:33:40 -!- Kajtek2 is now known as Kajtek 08:46:36 bokr [~eduska@109.110.35.174] has joined #scheme 09:08:33 leo2007 [~leo@222.77.98.74] has joined #scheme 09:09:41 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 09:13:42 Curious minds want to know: is Chibi's atan function deliberately busted? It seems to use atan1 unconditionally, never atan2. (Why this matters: http://stackoverflow.com/questions/283406/what-is-the-difference-between-atan-and-atan2-in-c/283408#283408) 09:13:43 http://tinyurl.com/5vl687p 09:19:28 pjb`` [~t@81.202.16.46.dyn.user.ono.com] has joined #scheme 09:20:23 -!- pjb` [~t@81.202.16.46.dyn.user.ono.com] has quit [Read error: Connection reset by peer] 09:25:49 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 240 seconds] 09:27:29 Simple test: 09:27:37 rudybot: (= (* 4 (atan 1)) (atan 0 -1)) 09:27:37 cky: ; Value: #t 09:27:50 (whereas on Chibi, that returns #f) 09:49:33 cky: Providing primitive bindings to atan2 would require several hundred extra bytes! 09:57:03 -!- jewel [~jewel@196-209-248-53.dynamic.isadsl.co.za] has quit [Ping timeout: 248 seconds] 10:18:48 _danb_ [~user@124-149-162-79.dyn.iinet.net.au] has joined #scheme 10:27:46 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 10:52:17 ijp [~user@host109-151-54-191.range109-151.btcentralplus.com] has joined #scheme 10:55:12 wbooze`` [~levgue@xdsl-78-35-136-96.netcologne.de] has joined #scheme 10:55:27 homie`` [~levgue@xdsl-78-35-136-96.netcologne.de] has joined #scheme 10:57:00 -!- HG` [~HG@p5DC05AF1.dip.t-dialin.net] has quit [Quit: HG`] 10:57:28 -!- wbooze` [~levgue@xdsl-78-35-171-203.netcologne.de] has quit [Ping timeout: 245 seconds] 10:57:38 HG` [~HG@p5DC05AF1.dip.t-dialin.net] has joined #scheme 10:57:47 -!- homie` [~levgue@xdsl-78-35-171-203.netcologne.de] has quit [Ping timeout: 258 seconds] 11:17:09 -!- bokr [~eduska@109.110.35.174] has quit [Quit: Leaving.] 11:25:00 -!- leo2007 [~leo@222.77.98.74] has quit [Ping timeout: 258 seconds] 11:31:44 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 244 seconds] 11:32:09 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 11:36:10 -!- rimmjob [~king@adsl-108-195-220-248.dsl.hstntx.sbcglobal.net] has quit [Quit: Lost terminal] 11:39:59 -!- homie`` [~levgue@xdsl-78-35-136-96.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 11:40:06 -!- wbooze`` [~levgue@xdsl-78-35-136-96.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 11:40:23 -!- pygospa [~TheRealPy@kiel-4dbecc9f.pool.mediaWays.net] has quit [Disconnected by services] 11:40:32 pygospa [~TheRealPy@kiel-4dbed4a7.pool.mediaWays.net] has joined #scheme 11:47:05 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 11:53:30 rff [~rff@ip72-207-241-136.br.br.cox.net] has joined #scheme 11:58:50 homie [~levgue@xdsl-78-35-136-96.netcologne.de] has joined #scheme 11:59:30 -!- frhodes [~frhodes@m992736d0.tmodns.net] has quit [Ping timeout: 258 seconds] 12:00:34 wbooze [~levgue@xdsl-78-35-136-96.netcologne.de] has joined #scheme 12:09:03 rvn_ [~rvn@77.107.164.131] has joined #scheme 12:45:12 gffa [~gffa@unaffiliated/gffa] has joined #scheme 12:47:26 tonussi [~lucaspt@177.16.153.87] has joined #scheme 12:49:44 -!- tonussi [~lucaspt@177.16.153.87] has left #scheme 13:03:18 woonie [~woonie@175.156.210.15] has joined #scheme 13:23:17 xwl [~user@123.108.223.27] has joined #scheme 13:33:43 -!- pygospa [~TheRealPy@kiel-4dbed4a7.pool.mediaWays.net] has quit [Read error: Connection reset by peer] 13:34:38 jlongster [~user@pool-173-53-25-235.rcmdva.fios.verizon.net] has joined #scheme 13:38:21 pygospa [~TheRealPy@kiel-5f7688cf.pool.mediaWays.net] has joined #scheme 13:39:32 -!- xwl [~user@123.108.223.27] has quit [Remote host closed the connection] 13:43:20 -!- pygospa [~TheRealPy@kiel-5f7688cf.pool.mediaWays.net] has quit [Disconnected by services] 13:43:29 pygospa [~TheRealPy@kiel-d9bfdb7a.pool.mediaWays.net] has joined #scheme 13:48:31 -!- jlongster [~user@pool-173-53-25-235.rcmdva.fios.verizon.net] has quit [Ping timeout: 248 seconds] 13:48:53 wolfpython [~wolf@222.95.134.135] has joined #scheme 14:07:54 -!- _danb_ [~user@124-149-162-79.dyn.iinet.net.au] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 14:10:36 -!- gravicappa [~gravicapp@ppp91-77-166-120.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 14:13:36 soveran [~soveran@juv34-7-78-249-50-4.fbx.proxad.net] has joined #scheme 14:14:22 -!- soveran [~soveran@juv34-7-78-249-50-4.fbx.proxad.net] has quit [Remote host closed the connection] 14:21:44 -!- woonie [~woonie@175.156.210.15] has quit [Ping timeout: 276 seconds] 14:36:26 -!- dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has quit [Ping timeout: 260 seconds] 14:42:09 -!- gienah [~mwright@ppp121-44-70-112.lns20.syd6.internode.on.net] has quit [Quit: leaving] 14:46:39 foof: :-O 14:47:07 Chibi, the golfer's Scheme. :-) 14:48:16 I was actually thinking that you could provide a binding for atan2 only, not for atan. 14:48:57 Then it's simply: (define (atan y (x 1)) (atan2 y x)) 14:49:02 where atan2 is the binding. 14:49:23 dsmith [~dsmith@cpe-184-56-129-232.neo.res.rr.com] has joined #scheme 14:50:04 Or, if you don't have optional arguments, something like (define (atan y . o) (atan2 y (if (null? o) 1 (car o))) 14:50:30 -!- wolfpython [~wolf@222.95.134.135] has quit [Remote host closed the connection] 14:56:40 Oh, perhaps you mean hundreds of extra _source_ bytes because atan2 isn't covered by the define_math_op macro. 14:56:45 -!- dsmith is now known as somethingelse 14:56:55 -!- somethingelse is now known as dsmith 14:57:34 I'm making a proof-of-concept atan2-enabled build to see how much it impacts the object code size. :-) 15:00:31 Hahaha, converting sexp_complex_atan to sexp_complex_atan2 is going to be slightly more interesting. :-P 15:02:54 -!- Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has quit [Ping timeout: 265 seconds] 15:02:54 Nshag [user@chl45-1-88-123-84-8.fbx.proxad.net] has joined #scheme 15:22:23 -!- elly [~elly@atheme/member/elly] has quit [Ping timeout: 248 seconds] 15:27:53 elly [~elly@atheme/member/elly] has joined #scheme 15:47:49 -!- HG` [~HG@p5DC05AF1.dip.t-dialin.net] has quit [Quit: HG`] 15:54:27 AVRS [~Aleksej@wikimedia/AVRS] has joined #scheme 15:54:37 -!- dfeuer [~dfeuer@wikimedia/Dfeuer] has quit [Quit: Goin' away] 16:01:15 frhodes [~user@168-103-97-250.albq.qwest.net] has joined #scheme 16:09:13 -!- [1]confab is now known as confab 16:09:19 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 16:22:55 realitygrill [~realitygr@adsl-76-226-137-34.dsl.sfldmi.sbcglobal.net] has joined #scheme 16:26:16 wasao [~wasao@wasao.org] has joined #scheme 16:31:09 dfeuer [~dfeuer@96.241.126.56] has joined #scheme 16:31:09 -!- dfeuer [~dfeuer@96.241.126.56] has quit [Changing host] 16:31:09 dfeuer [~dfeuer@wikimedia/Dfeuer] has joined #scheme 16:39:50 -!- wasao [~wasao@wasao.org] has left #scheme 16:51:59 mithos28 [~eric@99-113-32-54.lightspeed.sntcca.sbcglobal.net] has joined #scheme 16:55:02 karswell [~mjc@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 17:15:59 -!- drdo [~drdo@91.205.108.93.rev.vodafone.pt] has quit [Ping timeout: 260 seconds] 17:19:58 -!- masm [~masm@bl15-65-201.dsl.telepac.pt] has quit [Ping timeout: 244 seconds] 17:29:09 -!- Urchin [~urchin@unaffiliated/urchin] has left #scheme 17:30:53 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Quit: Leaving] 17:33:55 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 17:56:09 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 18:05:04 masm [~masm@bl15-65-201.dsl.telepac.pt] has joined #scheme 18:24:13 -!- frhodes [~user@168-103-97-250.albq.qwest.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 18:28:44 -!- XTL [~XTL@dsl-olubrasgw2-fe6af800-251.dhcp.inet.fi] has quit [Ping timeout: 276 seconds] 18:29:10 XTL [~XTL@dsl-olubrasgw2-fe6af800-251.dhcp.inet.fi] has joined #scheme 18:30:58 -!- confab [~confab@c-24-10-60-185.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 18:36:31 -!- MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has quit [Ping timeout: 248 seconds] 18:42:26 Urchin [~urchin@unaffiliated/urchin] has joined #scheme 19:04:15 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 260 seconds] 19:11:45 -!- Urchin [~urchin@unaffiliated/urchin] has left #scheme 19:23:22 -!- samth_away is now known as samth 19:26:00 -!- pygospa [~TheRealPy@kiel-d9bfdb7a.pool.mediaWays.net] has quit [Disconnected by services] 19:26:12 pygospa [~TheRealPy@kiel-d9bfd5a1.pool.mediaWays.net] has joined #scheme 19:33:55 chrissbx [~chrissbx@69-196-180-202.dsl.teksavvy.com] has joined #scheme 19:34:39 Hello. I'm looking for a list function that splits the list where a predicate returns true. 19:34:51 A combination of drop-while and take-while from srfi-1. 19:35:31 (well, with the predicate possibly negated) 19:35:55 Any idea how that would or should be called? 19:37:26 ah and actually stops once the predicate returns true, unlike the take- and drop-while 19:37:58 ah, span. Sorry for the noise. 19:38:36 That's a weird name! 19:42:11 -!- Hal9k [~Hal@unaffiliated/kusanagi] has quit [Ping timeout: 276 seconds] 19:42:13 -!- imphasing [~Alex@97-81-115-30.dhcp.gwnt.ga.charter.com] has quit [Ping timeout: 258 seconds] 20:11:09 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 252 seconds] 20:13:18 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 20:20:06 Daemmerung [~goetter@1133sae.mazama.net] has joined #scheme 20:24:35 -!- pygospa [~TheRealPy@kiel-d9bfd5a1.pool.mediaWays.net] has quit [Disconnected by services] 20:24:47 pygospa [~TheRealPy@kiel-5f77b0d5.pool.mediaWays.net] has joined #scheme 20:25:58 djanatyn [~user@173-13-139-236-sfba.hfc.comcastbusiness.net] has joined #scheme 20:28:55 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 20:29:37 Euthy [~euthy@unaffiliated/euthydemus] has joined #scheme 20:49:59 gravicappa [~gravicapp@ppp91-77-166-120.pppoe.mtu-net.ru] has joined #scheme 20:51:13 -!- tonyg [~tonyg@173-203-78-111.static.cloud-ips.com] has quit [Ping timeout: 245 seconds] 20:58:39 ampersandbox [~chatzilla@adsl-99-35-227-202.dsl.pltn13.sbcglobal.net] has joined #scheme 20:59:56 geppy [~geppy@cpe-76-185-36-191.tx.res.rr.com] has joined #scheme 21:00:47 What do three dashes mean? Is it a null expression of some sort? e.g. : 21:00:47 (define (immediate? x) 21:00:47 (or (fixnum? x) (boolean? x) ---) 21:03:10 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 260 seconds] 21:03:14 If this was in an example, I suspect it just means 'etc.'. 21:03:36 Ah, okay, cool. Thanks! 21:04:02 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 21:16:31 chrissbx: Span? You don't mean partition? 21:16:35 -!- geppy [~geppy@cpe-76-185-36-191.tx.res.rr.com] has left #scheme 21:17:31 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 252 seconds] 21:19:26 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 21:21:41 is there a syntax for non-recursive quoting? i.e. (define b 5) (define c 10) '(a (b c)) will return (cons 'a (cons (cons 'b (cons 'c '())) '()), and I want (cons 'a (cons 5 (cons 10 '())) '()) 21:23:13 rudybot: (define b 5) 21:23:14 whitequark: `(a (,b ,c)) 21:23:17 rudybot: (define c 10) 21:23:26 *offby1: your r5rs sandbox is ready 21:23:27 *offby1: Done. 21:23:27 *offby1: Done. 21:23:30 rudybot: `(a (,b ,c)) 21:23:31 *offby1: ; Value: {a {5 10}} 21:23:37 whitequark: quasiquoting is what you're looking for, per ijp's suggestion 21:23:48 heh, modulo mcons 21:23:55 rudybot: init racket 21:24:04 rudybot: (define b 5) 21:24:06 *offby1: error: with-limit: out of time 21:24:12 thanks 21:24:14 *sigh* 21:24:17 *offby1: error: with-limit: out of time 21:24:30 rudybot wants Moar Life, F***er 21:24:32 rudybot: init racket 21:24:45 qu1j0t3: rudybot wants me to quit running "git" on the same box 21:24:49 offby1: o 21:24:49 *offby1: error: with-limit: out of time 21:24:53 *offby1* slaps rudybot upside the haid 21:25:04 rudybot: (define b 5) 21:25:05 *offby1: Done. 21:25:10 rudybot: (define c 10) 21:25:10 *offby1: Done. 21:25:21 rudybot: `(a (,b ,c)) 21:25:21 *offby1: ; Value: (a (5 10)) 21:25:23 rudybot: what kind of a bot doesn't do what it's told? 21:25:24 ijp: You exchanged identities with a bot. 21:25:27 \o/ 21:25:50 am I right that it is "cancellable quoting"? 21:26:13 selective evaluation 21:26:21 i.e. you begin a quoted block with ` and an unquoted block with , 21:26:27 pretty much 21:26:39 whitequark: check offby1's demo above 21:26:48 some folk calls it "quasiquoting", mm hm 21:26:59 rudybot: (define b 5) (define c 3) 21:26:59 whitequark: It's not brute force or ugly in any way that I see -- it's just the easiest way to get the meaning of random C values without implementing a C compiler yourself. 21:27:04 lolwhat? 21:27:09 :) 21:27:23 rudybot, I expected you to execute the code, not talk. 21:27:24 whitequark: hm, I'm not sure I understand -- the macro will execute until it fails..., no? 21:27:29 whitequark: it's gotta be a single form, or else he merely thinks you're talking to him 21:27:52 what a foolish thing :) 21:28:00 patches welcome 21:28:04 rudybot: source 21:28:04 *offby1: git clone git://github.com/offby1/rudybot.git 21:28:07 rudybot: (begin (define a 5) (define c 3)) 21:28:09 whitequark: your sandbox is ready 21:28:09 whitequark: Done. 21:28:20 rudybot: you'll never pass the turing test if you don't study 21:28:21 ijp: If the operating system allocates a scattering of pages for, say, libraries, all over the address space, there simply may not be a contiguous 2.5 GB subspace left. 21:31:12 rudybot: `(the a is ,a (and the b of course is ,b) with their sum being ,(+ a b)) 21:31:12 whitequark: error: reference to an identifier before its definition: b in module: 'program 21:31:22 hmm. 21:31:59 you defined a and c, but no b 21:32:05 oops. 21:32:19 rudybot: `(the a is ,a (and the b of course is not ,c) with their sum not being ,(+ a c)) 21:32:19 whitequark: ; Value: (the a is 5 (and the b of course is not 3) with their sum not being 8) 21:32:39 realitygrill_ [~realitygr@adsl-76-226-120-136.dsl.sfldmi.sbcglobal.net] has joined #scheme 21:33:06 rudybot: `(a ,(c `(b ,a))) 21:33:07 whitequark: error: procedure application: expected procedure, given: 3; arguments were: '(b 5) 21:33:50 it's on #emacs too, isn't it? 21:33:58 how does it know which dialect to speak in? 21:35:28 -!- realitygrill [~realitygr@adsl-76-226-137-34.dsl.sfldmi.sbcglobal.net] has quit [Ping timeout: 256 seconds] 21:35:28 -!- realitygrill_ is now known as realitygrill 21:35:42 yeah #emacs and ##cinema -- basically the same channels I'm in 21:35:52 I think the dialect defaults to racket 21:35:58 if you don't say otherwise with "init" 21:36:18 rudybot: (help) 21:36:19 whitequark: error: reference to an identifier before its definition: help in module: 'program 21:36:28 rudybot: help 21:36:28 *offby1: help [], version, quote, source, seen , uptime, init [], eval ..., give ..., apropos ..., desc , doc , later "tell" ..., join , part , tell ..., emote ..., for ..., ghost , nick , system ..., top-eval ... 21:36:44 top-eval? 21:36:58 rudybot: top-eval (+ 1 2) (- 3 4) 21:36:59 whitequark: top-eval (pm "#scheme" "There are those who say I am merely offby1's puppet, but I'm not a puppet! I'm a free man!!") 21:37:06 whitequark: heh. That's basically for "root" (i.e., me) only 21:37:11 ah. 21:37:26 also, Amen to that not-being-a-puppet thing 21:37:56 rudybot: top-eval (pm "whitequark" "see?") 21:37:56 *offby1: # 21:38:15 lol 21:38:17 *whitequark* looks at the source 21:38:36 fairly messy but it works 21:39:54 https://github.com/offby1/rudybot/blob/master/el-buggo 21:40:12 ahem. 21:40:19 MrFahrenheit [~RageOfTho@users-146-18.vinet.ba] has joined #scheme 21:40:58 well I didn't say it was perfect. 21:41:04 if I could repro that reliably I'd fix it 21:41:27 rudybot: for sure? 21:41:27 -!- rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has quit [Remote host closed the connection] 21:41:35 *ahem* 21:41:41 what I _meant_ to say was ... 21:41:48 *whitequark* giggles 21:41:53 rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has joined #scheme 21:42:04 maybe Nnow I have something to do over the weekend 21:44:04 tonyg [~tonyg@173-203-78-111.static.cloud-ips.com] has joined #scheme 21:46:00 dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 21:49:08 -!- XTL [~XTL@dsl-olubrasgw2-fe6af800-251.dhcp.inet.fi] has quit [Ping timeout: 245 seconds] 21:49:42 XTL [~XTL@dsl-olubrasgw2-fe6af800-251.dhcp.inet.fi] has joined #scheme 22:06:09 One day, it occurred to me that one could use a case-lambda on the right-hand-side of call-with-values. I was enlightened. :-P 22:06:38 You probably could use a (SRFI 89) lambda*, too. But I doubt that you can use call-with-values to send keyword arguments. 22:06:40 frhodes [~user@168-103-97-250.albq.qwest.net] has joined #scheme 22:10:21 -!- AVRS [~Aleksej@wikimedia/AVRS] has quit [Quit: leaving] 22:12:12 cky: paste an example 22:12:26 offby1: I once had a use case for that. I can't remember it now. 22:13:29 Oh, I remember now. 22:14:25 It was for an implementation of a modified MAP function that accepts MV returns, and would insert all the returned elements into the output list. 22:15:32 The receiver function was defined as: (case-lambda (() result) ((x) (cons x result)) (xs (append-reverse xs result)))) 22:16:03 I'm sure I put in one too many closing bracket, but you get the idea. :-P 22:16:31 I actually later decided that a zero-valued return was so uncommon that I removed that case. 22:16:40 (and let it fall through to the general branch) 22:17:12 offby1: I hope that made some sense. :-D 22:19:34 -!- rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has quit [Ping timeout: 252 seconds] 22:21:59 -!- gravicappa [~gravicapp@ppp91-77-166-120.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 22:23:55 wasn't paying attention; hole on 22:24:27 :-) 22:24:27 rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has joined #scheme 22:24:46 -!- frhodes [~user@168-103-97-250.albq.qwest.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:25:06 *offby1* scratches head 22:25:17 never mind :) 22:25:23 Hehehe. 22:25:23 *qu1j0t3* scratches rudybot's head 22:25:37 -!- rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has quit [Remote host closed the connection] 22:26:24 crap! 22:26:34 rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has joined #scheme 22:26:48 well, it's not a severe bug: only I can provoke it :-| 22:29:16 fixed now ... apparently the auto-reloading magic failed, orsomething 22:29:25 weird 22:29:26 :-O 22:29:35 rudybot: for sure? 22:29:36 *offby1: expecting: for ... 22:29:54 rudybot: for cky I have to tell you that hat looks really silly 22:29:56 cky: This should be a list of integers, ordered from smallest to largest. 22:30:18 rudybot: for cky tell offby1 I have to tell you that hat looks really silly 22:30:21 cky: i do, but I'm not active right now 22:30:31 *offby1* rolls eyes 22:30:35 there's a command we could probably live withou. 22:30:36 t 22:31:29 rudybot: for offby1 "perhaps with quotes?" 22:31:29 ijp: perhaps that's a recent addition; I tend to run bleeding-edge emacsen from bzr. 22:31:37 heh 22:31:53 zmv_ [~daniel@c953332e.virtua.com.br] has joined #scheme 22:32:14 rudybot: for you blue 22:32:36 *offby1* drums fingers 22:32:40 you: closing the buffer will still leave those blue "evaled" marks in the buffer regexp-builder operates on 22:33:10 ijp: I see what you're up to, young man 22:33:10 rudybot: for rudybot rudybot 22:33:12 ijp: eval (require syntax/free-vars) 22:33:19 I just disabled "for" 22:33:31 I can do certain kinds of brain surgery while the patient is awake 22:34:53 look ma, no anaesthetic 22:34:54 -!- zmv [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 255 seconds] 22:35:53 gienah [~mwright@ppp121-44-70-112.lns20.syd6.internode.on.net] has joined #scheme 22:36:37 -!- zmv_ [~daniel@c953332e.virtua.com.br] has quit [Ping timeout: 240 seconds] 22:36:51 zmv [~daniel@c953332e.virtua.com.br] has joined #scheme 22:53:23 -!- samth is now known as samth_away 23:05:47 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 252 seconds] 23:12:38 jao [~user@pdpc/supporter/professional/jao] has joined #scheme 23:16:27 -!- homie [~levgue@xdsl-78-35-136-96.netcologne.de] has quit [Read error: Operation timed out] 23:16:45 wbooze` [~levgue@xdsl-78-35-145-59.netcologne.de] has joined #scheme 23:17:05 homie` [~levgue@xdsl-78-35-145-59.netcologne.de] has joined #scheme 23:19:44 -!- wbooze [~levgue@xdsl-78-35-136-96.netcologne.de] has quit [Ping timeout: 256 seconds] 23:23:15 -!- homie` [~levgue@xdsl-78-35-145-59.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:23:21 -!- wbooze` [~levgue@xdsl-78-35-145-59.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 23:32:46 homie [~levgue@xdsl-78-35-145-59.netcologne.de] has joined #scheme 23:33:25 wbooze [~levgue@xdsl-78-35-145-59.netcologne.de] has joined #scheme 23:35:04 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 244 seconds] 23:35:29 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 23:41:19 -!- incubot [incubot@klutometis.wikitex.org] has quit [Remote host closed the connection] 23:42:06 incubot [incubot@klutometis.wikitex.org] has joined #scheme 23:57:46 soveran [~soveran@juv34-7-78-249-50-4.fbx.proxad.net] has joined #scheme