00:11:03 -!- kk` [~kk@unaffiliated/kk/x-5380134] has quit [Remote host closed the connection] 00:13:04 -!- amoe [~amoe@host-92-26-166-110.as13285.net] has quit [Read error: Connection reset by peer] 00:13:45 jrslepak_ [~jrslepak@129.10.229.54] has joined #scheme 00:16:38 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Quit: Leaving] 00:18:15 amoe [~amoe@host-92-26-166-110.as13285.net] has joined #scheme 00:18:18 -!- rostayob [~rostayob@5add3a8e.bb.sky.com] has quit [Quit: WeeChat 0.3.5] 00:20:24 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 00:25:12 -!- imphasing [~Alex@97-81-115-30.dhcp.gwnt.ga.charter.com] has quit [Ping timeout: 258 seconds] 00:27:54 imphasin1 [~Alex@97-81-115-30.dhcp.gwnt.ga.charter.com] has joined #scheme 00:31:11 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Ping timeout: 248 seconds] 00:31:46 -!- gffa [~gffa@unaffiliated/gffa] has quit [Quit: sleep] 00:37:57 gtoast [~gtoast@166.137.8.148] has joined #scheme 00:51:16 hi, i am writing a small interpreter for scheme and i need to find what characters are valid for procedure names, can anyone point me to such resource? something like parsing grammar would be excellent. 00:56:37 -!- jrslepak_ [~jrslepak@129.10.229.54] has quit [Quit: This computer has gone to sleep] 00:59:04 ttvd: Any characters are valid. 00:59:21 except space and comma 00:59:25 and whatever else 00:59:34 ttvd: However, consult R5RS or R6RS for a list of what characters are valid in a _bare_ identifier. 00:59:55 rudybot: (define (|hello, world|) (display "Hello, world!")) 00:59:55 cky: is tehre anyway to use scheme as a scripting language of a bigger app? like LUA is used to script world of warcraft addons 01:00:00 rudybot: eval (define (|hello, world|) (display "Hello, world!")) 01:00:00 cky: Done. 01:00:10 rudybot: eval (|hello, world|) 01:00:11 cky: ; stdout: "Hello, world!" 01:00:25 btw i found something while playing with rudy bot 01:00:28 cky, #t #t 01:00:32 err 01:00:33 ttvd: If you surround an identifier with ||, you can put any character (other than |) inside it. 01:00:35 rudybot, #t #t 01:00:35 ttvd: can i insert an invisible image? (insert (propertize " " 'invisible t 'display (create-image "~/whatever.png"))) isn't doing it.. 01:00:40 is that normal? 01:00:44 ttvd: Yes. 01:00:59 ttvd: If you give a non-expression to rudybot, it will try to find what you typed in its history. 01:01:05 rudybot: Hello, world! 01:01:05 cky: Well hello stranger! 01:01:06 nod 01:01:09 awesome, thank you 01:01:12 :-) 01:01:18 leo2007 [~leo@119.255.41.67] has joined #scheme 01:01:28 ttvd: If you are writing a real expression, but it's not detecting it properly, then write "eval" first. 01:01:37 e.g., my |hello, world| thingy needed the eval. 01:02:00 ttvd: Notice that |hello, world| is actually an identifier named "hello, world" (without the quotes). 01:02:08 rudybot: (eq? 'foo '|foo|) 01:02:08 cky: ; Value: #t 01:02:25 ttvd: The || just allows you to put arbitrary characters into the identifier. 01:02:45 nod 01:02:54 does it have a use really? 01:03:05 Yes, it allows you to have arbitrary identifiers. :-) 01:03:11 lol, okay, fair :D 01:03:26 You can even have an empty identifier. 01:03:51 rudybot: (define || "empty identifier!") 01:03:51 cky: Done. 01:03:59 rudybot: || 01:03:59 cky: ; Value: "empty identifier!" 01:04:13 rudybot: (symbol->string '||) 01:04:14 cky: ; Value: "" 01:04:32 pretty cool 01:04:35 okay :) 01:04:36 Uh huh. :-) 01:04:56 you sir just complicated my parsing grammar. 01:05:04 Glad to be of help. :-) 01:05:25 pfft, || is just sugar for (string->symbol) :-) 01:06:19 aspect: It's done at the reader level, though. :-P 01:06:38 Whereas (string->symbol ...) is done at runtime, thus unusable as an identifier. 01:07:34 rudybot: eval (define (string->symbol "x") "try it out. scientifically.") 01:07:35 eli: error: eval:1:24: define: not an identifier, identifier with default, or keyword for procedure argument at: "x" in: (define (string->symbol "x") "try it out. scientifically.") 01:07:48 well, a compile-time string->symbol .. my point being, if you want a trivial parser, (quote) and friends are handy :-) 01:07:59 Scientifically, there's no sugar. 01:08:09 *eli* QEDs 01:10:45 -!- X-Scale [email@2001:470:1f14:135b::2] has quit [Ping timeout: 244 seconds] 01:10:57 X-Scale [email@sgi-ultra64.broker.freenet6.net] has joined #scheme 01:15:39 -!- leo2007 [~leo@119.255.41.67] has quit [Ping timeout: 252 seconds] 01:16:56 -!- emma is now known as Em 01:31:29 mikecsh [~mikecsh@113.28.74.33] has joined #scheme 01:31:54 -!- mikecsh [~mikecsh@113.28.74.33] has quit [Client Quit] 01:36:36 leo2007 [~leo@119.255.41.67] has joined #scheme 01:42:37 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 01:43:23 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 01:44:16 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 01:44:56 -!- masm [~masm@bl19-165-231.dsl.telepac.pt] has quit [Quit: Leaving.] 01:45:54 ttvd: that is spelled out in the Scheme standards. 01:46:13 yah i see it in R5RS as cky suggested 01:46:25 those are pretty awesome documents 01:46:26 airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has joined #scheme 01:46:33 shame printed version costs like 70 pounds 01:46:34 ttvd: here's a silly subset parser I wrote the other day which references the standard http://telegraphics.com.au/svn/puzzles/trunk/quad/ch10_dumb_parser.scm 01:46:58 ttvd: it handles indentifiers correctly afaics except for the 'peculiar identifiers', but as you see the goal wasn't to be very comprehensive 01:47:06 nod 01:47:09 thanks qu1j0t3 01:47:14 ttvd: np 01:47:23 ttvd: it also handles quoting and dotted pairs, fwiw 01:47:40 ttvd: but the only atoms are symbols and integers 01:48:12 i am writing mine in c++ it's ... much messier :D 01:48:23 -!- copumpkin is now known as gourd 01:48:32 -!- rudybot is now known as rudybot_ 01:48:52 -!- rudybot_ is now known as sneakypants 01:49:05 -!- sneakypants is now known as rudybot 01:49:37 ttvd: yeah it will probably be more than 100 lines in C++ 01:49:40 -!- gourd is now known as copumpkin 01:49:58 pygospa [~Pygosceli@kiel-5f77bf47.pool.mediaWays.net] has joined #scheme 01:50:12 tupi_ [~david@177.30.34.134] has joined #scheme 01:51:22 Re handling quoting and dotted pairs: make sure that these two are treated differently: 01:51:26 (foo . bar) 01:51:29 (foo |.| bar) 01:51:48 yes, they would be treated differently ; . and |.| are different tokens. 01:51:57 i do not handle || at this time.) 01:52:15 Right, but up until recently, Guile actually treated (foo #{.}# bar) the same as (foo . bar). (#{foo}# is Guile's notation for |foo|.) 01:52:19 i've developed a sudden urge to implement a low level read-only git library in scheme 01:52:43 but i can't think of any reason why i would need to 01:52:44 cky: couldn't happen in my parser. 01:52:51 turbofail: maybe you're just bored? 01:53:01 i am a little bored 01:53:27 but i have other projects that i'm in the middle of that are in many respects more interesting 01:53:50 i just don't feel like doing them 01:55:25 anyway i've already started on it, but now i need zlib streams 01:56:24 jrslepak_ [~jrslepak@c-71-233-151-135.hsd1.ma.comcast.net] has joined #scheme 01:56:40 turbofail: congratulations, you are now shaving a yak! 02:00:01 yeah 02:03:47 anyway it's go-home time 02:12:29 -!- turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 02:15:03 -!- leo2007 [~leo@119.255.41.67] has quit [Ping timeout: 252 seconds] 02:26:00 -!- airolson [~airolson@CPE00222d55a738-CM00222d55a735.cpe.net.cable.rogers.com] has quit [] 02:28:43 Guest2118 [~g@pool-71-189-7-58.lsanca.fios.verizon.net] has joined #scheme 02:28:55 Snaffu [~Snaffu@oh-69-34-16-39.sta.embarqhsd.net] has joined #scheme 02:38:29 -!- Guest2118 [~g@pool-71-189-7-58.lsanca.fios.verizon.net] has quit [Ping timeout: 240 seconds] 02:38:50 -!- jrslepak_ [~jrslepak@c-71-233-151-135.hsd1.ma.comcast.net] has quit [Quit: Leaving] 02:38:50 -!- luist is now known as ojs 02:46:16 -!- gtoast [~gtoast@166.137.8.148] has quit [Read error: Connection reset by peer] 02:46:19 -!- Snaffu [~Snaffu@oh-69-34-16-39.sta.embarqhsd.net] has quit [Remote host closed the connection] 02:50:25 -!- ojs is now known as luist 02:56:14 leo2007 [~leo@119.255.41.67] has joined #scheme 03:21:10 gtoast [~gtoast@99-100-70-120.lightspeed.sntcca.sbcglobal.net] has joined #scheme 03:21:27 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 03:21:47 -!- tupi_ [~david@177.30.34.134] has quit [Quit: Leaving] 03:23:55 -!- mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has quit [Read error: Operation timed out] 03:28:42 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 03:29:59 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 03:31:34 is there a function to explode a list? So (+ '(1 2 3 4 5)) could become (+ 1 2 3 4 5) 03:34:23 -!- drwho [~drwho@c-68-81-125-196.hsd1.pa.comcast.net] has quit [Ping timeout: 244 seconds] 03:35:12 gtoast: Yes, APPLY. 03:35:16 rudybot: (apply + '(1 2 3 4 5)) 03:35:16 cky: ; Value: 15 03:36:34 gtoast: If you like that answer, please feel free to upvote my corresponding post on Stack Overflow: http://stackoverflow.com/questions/7746312/sum-of-numbers-in-a-list-using-scheme/7746336#7746336 :-) 03:36:35 http://tinyurl.com/3dk7767 03:38:22 Thanks gusy 03:38:26 er guys 03:38:32 :-) 03:38:33 I will thanks 03:55:29 Operaist2 [~OperaIst@ppp-124-120-216-71.revip2.asianet.co.th] has joined #scheme 03:55:40 can anyone help me with figuring out how this won't work? http://pastebin.com/5XAXg1cv 03:56:04 sure. 03:56:15 Your first step: write a couple of tests for each of those functions. 03:56:19 They needn't be complicated. 03:56:22 Second step: run them :) 03:56:43 and? 03:57:10 and? 03:57:27 I'm assuming that once you follow those two steps, you'll see the problem. 03:57:33 _I_ sure don't know what's wrong with the code. 03:59:05 I wrote a Newton's Method thing myself just recently for fun; is your code doing Newton's Method? 03:59:21 If so, are you sure you've got "improve" right? I'd expect to see 3x^2 in there somewhere, but don't. 04:00:04 it's giving some arity-error-type 11 04:00:17 supposedly im passing a procedure to a "+" 04:00:22 but i dont see why 04:00:40 -!- lbc_ [~quassel@1908ds1-aboes.0.fullrate.dk] has quit [Read error: Connection reset by peer] 04:00:46 ah, lemme stare at it 04:01:04 I don't see it either. I'll try running it 04:01:43 returns 1.0 for me 04:01:46 1. Your good-enough? function is busted. 04:01:47 is that the right answer? 04:02:03 2. I'd also write the improve function differently too, but that's only because I'm a perfectionist. 04:02:17 cky: 1. It doesn't look that bad, although I suppose it could use a call to "abs" 04:02:24 offby1: Exactly. 04:02:27 oh. 04:02:44 *offby1* could use some abs, too 04:02:50 40-minute workout 04:02:58 My "improve" function would be (mean (/ x guess guess) guess guess). 04:03:13 huh 04:03:17 where "mean" is defined the obvious way. 04:03:41 rudybot: (define (mean . items) (/ (apply + items) (length items))) 04:03:41 cky: Done. 04:03:41 I'd do some tricky thing whereby I find the tangent line at x, see where it hits the X-axis, then use that x value 04:03:53 rudybot: how would you then define "median"? 04:03:53 *offby1: So what you're talking about is, roughly, (define + (lambda xs (if some-global-flag (do-this args) (do-that args)))), with the complex module banging `some-global-flag' -- right? 04:04:07 rudybot: no, that's not at all what I'm talking about. What are you, stupid? 04:04:07 *offby1: Stupid snake in the stupid garden 04:04:16 oh right i remembered i had an abs but i removed it because i thought it was giving the error 04:04:18 rudybot: Fools's names and fool's faces. 04:04:19 *offby1: My term has only 16 colors, and the emacs default faces are pretty good chosen in that circumstances, so I'd like to use those. 04:04:43 Operaist2: I don't understand that error you mentioned at all -- I don't see how your code could generate it. 04:05:10 offby1: i actually fixed it and forgot about it sorry 04:05:19 How DARE you waste our valuable time! 04:05:22 Can't you see we're busy?! 04:05:29 *offby1* pretends to scribble furiously at a note pad 04:07:52 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 04:08:05 the math is because this is a specific ase for y = x**3 04:08:14 well, I figured that 04:10:15 when I add abs, it gets the right answer, but never terminates 04:10:24 what do you mean 04:10:31 how do you get the right answer if it doesnt terminate? 04:10:35 -!- leo2007 [~leo@119.255.41.67] has quit [Ping timeout: 260 seconds] 04:10:52 Lol. 04:10:59 well, I was spying on it as it ran. 04:11:01 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 04:11:11 I had "improve" print out its return value every time 04:11:31 how do you print in scheme? 04:11:32 this is an advanced black-belt trick. Now that I've revealed it, I must kill you. 04:11:41 you cant kill me im a ninja 04:11:45 rudybot: (printf "Like ~a~%" 'this) 04:11:47 *offby1: your sandbox is ready 04:11:47 *offby1: ; stdout: "Like this\n" 04:12:04 rudybot: (display "This also works") 04:12:05 *offby1: ; stdout: "This also works" 04:12:12 rudybot: (newline) 04:12:12 *offby1: ; stdout: "\n" 04:12:41 (actually, "printf" isn't standard; your flavor of scheme might not have it) 04:12:46 i might need to call goodenough with improve 04:12:53 as parameter 04:12:59 or whatever you call it in scheme 04:14:13 booyah 04:14:30 i had this in my original program 04:14:37 but it was in emacs and i didnt know how to save 04:14:46 so i made another one and forgot to modify it 04:14:50 Lol. 04:16:27 what is this "x" that you're using all over the place? 04:17:10 it's the number you wish to compute the root of 04:17:29 dont know what youd call that 04:17:31 rootee? 04:17:33 rootand? 04:18:03 I thought that's what "guess" was. 04:18:06 hm 04:19:00 no guess is the guess 04:19:06 you want to roor 14 04:19:10 you might guess 3.5 04:21:36 LIES 04:21:43 I would guess no such thing. 04:22:00 I would guess "guava purple despair thudbucket". 04:22:09 Every time. Like clockwork. 04:22:44 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 04:22:53 i think that won't work 04:22:57 error: type mismatch applying procedure + 04:23:05 unless scheme can convert string to number 04:23:06 Well, paint my plaid and call me Sally. You're right. 04:23:15 ok sally 04:24:09 rudybot: (string->number "guava" 36) 04:24:09 cky: error: string->number: expects type as 2nd argument, given: 36; other arguments were: "guava" 04:24:14 Darnit. 04:24:39 Learn fruit, rudybot. Furrfu. 04:24:48 Heheheh. 04:24:53 incubot: (string->number "guava" 36) 04:24:53 28287622 04:24:56 :-D 04:24:57 how I'd do it: http://pastebin.com/7aJT4WBp 04:25:09 *offby1* would guess "inflate a paper bag" 04:25:43 *gnomon* aims a sidelong glance at offby1 04:25:56 don't look at me in that tone of voice 04:26:09 god, I hate pastebin. 04:26:13 *gnomon* misses spectacularly and ends up ogling the crown mouldings 04:26:16 And it's one of the best paste sites. 04:26:35 Why does it in particular attract your ire, sir? 04:27:00 slowness 04:27:02 offby1: Nice. 04:27:04 visual cruft 04:27:14 cky: I mean, it's the only way to do it, isn't it? 04:27:15 :-| 04:27:31 It's certainly more general. *nods* 04:27:36 unfortunately the computer doesn't compute the derivative for me :) 04:27:50 Some mathematical systems will. 04:28:01 Obviously, closed forms only exist for select expressions. 04:28:28 Obviously. 04:28:30 *offby1* glances around nervously. 04:28:41 *offby1* furtively looks up the definition of "closed form" 04:30:32 somehow I didn't notice that incubot was here 04:30:38 incubot: hail, great father 04:30:42 Yes, and my father was also crazy about such vehicles. We often ended up driving in straight lines from point A to point B, for an amuzing value of "shortest path". 04:30:45 damn, that was slow 04:30:52 incubot: version 04:30:55 that's ok. I'll push a version with the current setup, and s48 using the cli-driven load. 04:32:04 *offby1* loudly wonders what scheme is this, whose string->number can deal with base 36 04:35:00 Not one which implements R5RS, which forbids radices other than 2, 8, 10, and 16! 04:35:12 No word in there about the banning of radishes, however. 04:35:49 One ill-placed ban there once wiped out an entire Doozer generation. Soul-crushingly tragic. 04:58:54 is it true that if you write scheme for 10 years you will have matrix vision? 04:59:47 leo2007 [~leo@119.255.41.67] has joined #scheme 05:00:10 MadMuppet006 [~MadMuppet@122-62-124-247.jetstream.xtra.co.nz] has joined #scheme 05:05:48 -!- rff [~rff@ip72-207-248-18.br.br.cox.net] has quit [Ping timeout: 258 seconds] 05:36:24 -!- Operaist2 [~OperaIst@ppp-124-120-216-71.revip2.asianet.co.th] has quit [Quit: ChatZilla 0.9.87 [Firefox 7.0.1/20111008085056]] 05:36:55 Speaking of R5RS, there is something cosy about a 50 pages paper that define such a powerful tool. 05:38:59 wolfpython [~wolf@117.89.169.97] has joined #scheme 05:39:39 jewel [~jewel@196-215-117-72.dynamic.isadsl.co.za] has joined #scheme 05:42:09 -!- wolfpython [~wolf@117.89.169.97] has quit [Client Quit] 05:42:53 -!- jao [~user@pdpc/supporter/professional/jao] has quit [Ping timeout: 240 seconds] 05:54:58 gravicappa [~gravicapp@ppp91-77-164-160.pppoe.mtu-net.ru] has joined #scheme 06:10:27 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has quit [Ping timeout: 252 seconds] 06:19:37 -!- EmmanuelOga [~emmanuel@190.244.27.236] has quit [Ping timeout: 252 seconds] 06:38:51 MichaelRaskin [~MichaelRa@195.178.216.22] has joined #scheme 06:43:05 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 252 seconds] 06:50:12 hi guys I am trying to solve a problem in the little schemer .. I am trying to write a function the show whether an expression is composed only of numbers and + x or ^ my attempt is here http://pastebin.com/XaZnqadk 06:50:40 can anyone see any obvious mistakes .. help appreciated 07:07:41 -!- jewel [~jewel@196-215-117-72.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 07:28:39 gvhagopi [43b4a1d7@gateway/web/freenode/ip.67.180.161.215] has joined #scheme 07:29:49 -!- gvhagopi [43b4a1d7@gateway/web/freenode/ip.67.180.161.215] has quit [Quit: Page closed] 07:47:21 mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has joined #scheme 07:55:17 -!- ToxicFrog [~ToxicFrog@24-246-40-169.cable.teksavvy.com] has quit [Ping timeout: 240 seconds] 07:56:28 -!- mmc1 [~michal@178-85-65-177.dynamic.upc.nl] has quit [Ping timeout: 255 seconds] 07:56:42 ToxicFrog [~ToxicFrog@24-246-40-169.cable.teksavvy.com] has joined #scheme 07:57:17 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 08:20:58 wingo [~wingo@90.164.198.39] has joined #scheme 08:23:33 -!- confab [~win7@c-24-10-60-185.hsd1.ca.comcast.net] has quit [Ping timeout: 260 seconds] 08:30:13 luist_ [~luist@189.59.164.169] has joined #scheme 08:30:51 -!- luist [~luist@189.59.201.53] has quit [Read error: Connection reset by peer] 08:30:51 -!- luist_ is now known as luist 08:37:54 No explanation of the error, and unknown paste id. I wish I could help. 08:47:01 -!- wingo [~wingo@90.164.198.39] has quit [Ping timeout: 252 seconds] 09:12:43 ahinki [~chatzilla@212.99.10.150] has joined #scheme 09:22:56 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Quit: smtlaissezfaire] 09:24:19 smtlaissezfaire [~smtlaisse@76.15.192.54] has joined #scheme 09:24:27 -!- smtlaissezfaire [~smtlaisse@76.15.192.54] has quit [Client Quit] 09:33:48 -!- leo2007 [~leo@119.255.41.67] has quit [Ping timeout: 240 seconds] 09:46:18 -!- gravicappa [~gravicapp@ppp91-77-164-160.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 10:03:26 -!- arbscht [~arbscht@fsf/member/arbscht] has quit [Ping timeout: 244 seconds] 10:04:49 arbscht [~arbscht@fsf/member/arbscht] has joined #scheme 10:11:08 -!- ToxicFrog [~ToxicFrog@24-246-40-169.cable.teksavvy.com] has quit [Ping timeout: 256 seconds] 10:14:07 ToxicFrog [~ToxicFrog@24-246-40-169.cable.teksavvy.com] has joined #scheme 10:27:57 oiiii [~oiiii@82.71.241.25] has joined #scheme 10:30:22 kvda [~kvda@124-169-130-71.dyn.iinet.net.au] has joined #scheme 10:32:04 -!- kvda [~kvda@124-169-130-71.dyn.iinet.net.au] has quit [Client Quit] 10:32:26 kvda [~kvda@124-169-130-71.dyn.iinet.net.au] has joined #scheme 10:34:22 gravicappa [~gravicapp@80.90.116.82] has joined #scheme 10:34:53 -!- drdo`` [~drdo@85.207.54.77.rev.vodafone.pt] has quit [Ping timeout: 240 seconds] 10:40:55 EmanuelZ [~Emanuel@fsf/member/emanuelz] has joined #scheme 10:41:46 -!- EmanuelZ [~Emanuel@fsf/member/emanuelz] has left #scheme 11:12:51 pandeiro [~pandeiro@177.32.217.182] has joined #scheme 11:18:05 -!- luist [~luist@189.59.164.169] has quit [Ping timeout: 240 seconds] 11:18:51 rff [~rff@ip72-207-248-18.br.br.cox.net] has joined #scheme 11:34:48 -!- peterhil [~peterhil@GGZYMKCCCVI.gprs.sl-laajakaista.fi] has quit [Ping timeout: 260 seconds] 11:36:25 -!- cdueck [~chris@129-97-220-33.uwaterloo.ca] has quit [Ping timeout: 258 seconds] 11:39:07 peterhil [~peterhil@GGZYMKCCCVI.gprs.sl-laajakaista.fi] has joined #scheme 11:43:08 cdueck [~chris@129-97-220-33.uwaterloo.ca] has joined #scheme 12:14:19 masm [~masm@2.80.165.231] has joined #scheme 12:21:40 luist [~luist@189.101.4.123] has joined #scheme 12:23:52 -!- rff [~rff@ip72-207-248-18.br.br.cox.net] has quit [Ping timeout: 260 seconds] 12:31:43 -!- wigners_friend [~wigners_f@dagaz.whitequark.org] has quit [Ping timeout: 244 seconds] 12:34:25 nodie [~josemaria@62.82.81.113.static.user.ono.com] has joined #scheme 12:42:34 -!- kvda [~kvda@124-169-130-71.dyn.iinet.net.au] has quit [Quit: -___-] 12:47:16 wigners_friend [~wigners_f@dagaz.whitequark.org] has joined #scheme 13:00:41 leo2007 [~leo@222.130.132.191] has joined #scheme 13:01:22 -!- imphasin1 is now known as imphasing 13:05:07 drwho [~drwho@c-68-81-125-196.hsd1.pa.comcast.net] has joined #scheme 13:15:39 djcb [djcb@nat/nokia/x-hfoezwxphinaegod] has joined #scheme 13:17:41 rudybot: eval Unknown Paste ID! 13:17:42 leppie: your sandbox is ready 13:17:42 leppie: error: reference to an identifier before its definition: Unknown in module: 'program 13:20:26 Lol. 13:22:13 -!- nodie [~josemaria@62.82.81.113.static.user.ono.com] has left #scheme 13:57:26 soveran [~soveran@186.19.214.247] has joined #scheme 13:57:32 gffa [~gffa@unaffiliated/gffa] has joined #scheme 14:03:25 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 240 seconds] 14:03:49 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 14:14:04 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 14:15:14 EmmanuelOga [~emmanuel@190.244.27.236] has joined #scheme 14:41:09 rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has joined #scheme 14:42:16 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 15:05:51 wingo [~wingo@188.84.169.192] has joined #scheme 15:13:53 -!- samth_away is now known as samth 15:18:49 Does the name rudybot stand for "a rude-y bot"? 15:19:21 I doubt it, but only offby1 will know for sure. 15:20:47 confab [~win7@c-24-10-60-185.hsd1.ca.comcast.net] has joined #scheme 15:28:32 homie [~levgue@xdsl-84-44-153-16.netcologne.de] has joined #scheme 15:30:09 wbooze [~levgue@xdsl-84-44-153-16.netcologne.de] has joined #scheme 15:34:11 snizzo [~quassel@iglu.cc.uniud.it] has joined #scheme 15:37:34 dostoyevsky: more like "rude bot" 15:37:49 I originally named it fartbot, but people thought that was too rude, so ... 15:40:15 QmrXI3rXd_Q 15:46:38 -!- gtoast [~gtoast@99-100-70-120.lightspeed.sntcca.sbcglobal.net] has quit [Quit: gtoast] 15:57:52 -!- tali713 [~tali713@c-75-72-220-197.hsd1.mn.comcast.net] has quit [Quit: ZNC - http://znc.sourceforge.net] 15:58:22 tali713 [~tali713@c-75-72-220-197.hsd1.mn.comcast.net] has joined #scheme 16:00:48 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 245 seconds] 16:02:43 offby1: ? 16:02:55 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 16:03:47 ! 16:04:09 if you didn't understand that burst of letters, try googling 16:04:50 snizzo_ [~quassel@iglu.cc.uniud.it] has joined #scheme 16:05:19 :-) 16:05:38 -!- ahinki [~chatzilla@212.99.10.150] has quit [Quit: ChatZilla 0.9.87 [Firefox 8.0/20111026191032]] 16:05:57 -!- snizzo_ [~quassel@iglu.cc.uniud.it] has quit [Remote host closed the connection] 16:07:07 Now that song is stuck in my head. But that's OK; it's a good song 16:10:34 tupi_ [~david@189.67.209.201] has joined #scheme 16:11:49 -!- karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has quit [Ping timeout: 244 seconds] 16:12:32 -!- snizzo [~quassel@iglu.cc.uniud.it] has quit [Remote host closed the connection] 16:13:39 -!- MichaelRaskin [~MichaelRa@195.178.216.22] has left #scheme 16:16:12 -!- tupi [~david@139.82.89.24] has quit [Remote host closed the connection] 16:18:31 -!- tupi_ [~david@189.67.209.201] has quit [Quit: Leaving] 16:20:19 A message to you, rudybot. 16:22:24 offby1: the saxophonist has an impressive mullet 16:22:37 rudybot can't fail. 16:22:42 wingo: that's Bobby Keys. 16:23:57 is that Bobby Tables of key value stores? 16:24:48 rudybot's outta jail. 16:27:00 So I implemented a rename rewriter for my macros.. this works sort of like quasiquote, where something like `(,(rename 'list)) becomes () or whatever else list is bound to in the macro's defining environment 16:27:37 It just runs through a lambda's definitions and looks for (rename (quote )) and replaces it with the bound value from the defining environment 16:27:41 I'm not sure how proper this is :/ 16:28:07 Basically, you get to pick which symbols should be mapped to defining environment bindings and which ones should be evaluated in the calling env 16:28:23 -!- tali713 [~tali713@c-75-72-220-197.hsd1.mn.comcast.net] has quit [Quit: ZNC - http://znc.sourceforge.net] 16:28:32 If you want to use the defining env, use (rename 'symbol) which isn't actually a function, it's just there to help the rewriter know when it should rebind a symbol.. 16:28:53 tali713 [~tali713@c-75-72-220-197.hsd1.mn.comcast.net] has joined #scheme 16:29:42 imphasing: That's insane. :-P 16:29:51 imphasing: I say this because it effectively makes "rename" a reserved word. 16:30:02 Whereas Scheme basically has no reserved words. 16:30:02 Yeah, basically 16:30:08 it's like 'else' 16:30:16 don't use 'rename in a macro if you don't want to rename 16:30:17 "else" isn't a reserved word. 16:30:27 okay, like unquote 16:30:29 rudybot: (define else 42) 16:30:30 cky: Done. 16:30:31 rudybot: else 16:30:32 cky: ; Value: 42 16:30:39 rudybot: (define unquote 42) 16:30:39 cky: Done. 16:30:43 rudybot: unquote 16:30:43 cky: ; Value: 42 16:30:48 imphasing: Say again? 16:30:51 (define rename 42) works fine for me :/ 16:30:55 It's not reserved 16:31:03 it's just used specially in a macro, like unquote for quasiquotes 16:31:11 or else with cond 16:31:32 rudybot: init 16:31:33 cky: your sandbox is ready 16:31:37 rudybot: (define else #f) 16:31:37 cky: Done. 16:32:01 rudybot: (cond (else 'no) (#t 'yes)) 16:32:01 cky: ; Value: yes 16:32:08 output from my interpreter: (define rename 42) => (); rename => 42 16:32:35 If "else" were not defined, that "cond" I had above would be invalid. 16:32:41 rudybot: init 16:32:42 cky: your sandbox is ready 16:32:44 rudybot: (cond (else 'no) (#t 'yes)) 16:32:44 cky: error: eval:1:6: cond: bad syntax (`else' clause must be last) at: (else (quote no)) in: (cond (else (quote no)) (#t (quote yes))) 16:33:02 It still uses it specially though, just only when it's the last element 16:33:07 No. 16:33:09 I'm not getting how that's different from using rename that way 16:33:11 rudybot: (define else #f) 16:33:11 cky: Done. 16:33:14 rudybot: (cond (else 'no)) 16:33:15 cky: Done. 16:33:25 imphasing: That fell through, rather than evaluating to 'no. 16:33:41 Well that's certainly unexpected, how do you use else on a cond if it's defined? 16:33:48 imphasing: You do not. 16:33:59 That's pretty jacked up. 16:34:05 That's the way it's designed to work. 16:34:11 (define else "lolol") will break every usage of cond that uses else? 16:34:11 Nice. 16:34:14 lol 16:34:22 Only in the scope of the "else", but right. 16:34:26 Wow. 16:34:29 Is rudybot's owner here? 16:34:40 Well, my interpreter not doing that seems fine to me :P 16:34:45 -!- rstandy [~rastandy@93-63-185-248.ip29.fastwebnet.it] has quit [Ping timeout: 256 seconds] 16:34:50 tonyg: Always (though that person isn't me). What do you need to know? 16:35:01 imphasing: It's broken, sorry. :-P 16:35:12 The standard seems broken :O 16:35:14 imphasing: That behaviour is mandated by standards. 16:35:19 No, it's not broken. 16:35:20 cky: :) I suspect that (define c (make-cvector _int 1000000000)) will crash the outer racket and I'm wondering if I experiment, whether rudybot will come back 16:35:33 cky: Why would anyone want that behavoir, ever? 16:35:39 I don't think you can use FFI in rudybot. 16:35:42 Feel free to try. 16:36:01 cky: ok, i'll try - everyone else, save your work ;-) 16:36:09 imphasing: It avoids making things like else and => reserved words, in that if you define them, their definitions will be respected. 16:36:15 -!- rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has quit [Remote host closed the connection] 16:36:20 Welp. 16:36:20 Wow. 16:36:21 Darn. 16:36:39 offby1: ^^--- 16:37:05 offby1: sorry ;-) 16:37:20 I've emailed samth and eli. 16:37:39 cky: scheme48 doesn't do that either, (define else "BREAKEVERYTHING") then (cond (else 'yay)) gives me 'yay 16:37:53 imphasing: Well, that's because "BREAKEVERYTHING" is a true value. 16:37:57 Try (define else #f). 16:38:11 Ah, you're right 16:39:05 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 16:39:10 -!- levi` is now known as levi 16:39:12 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 16:39:12 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 16:39:17 I can't imagine why that would ever be a good idea :| 16:39:36 else DOES mean something special in a cond 16:40:13 the special part is if it's undefined, it's always true 16:40:20 Even in standard scheme 16:40:32 This seems very unexpected. 16:40:53 imphasing: No, undefined doesn't mean true. :-P 16:41:08 imphasing: For this to make any sense, you must look at how the "cond" macro is defined. 16:41:15 MrFahrenheit [~RageOfTho@users-146-59.vinet.ba] has joined #scheme 16:41:22 Specifically, it does something special when it sees "else". 16:41:39 However, the "else" only matches if it isn't shadowed by a different definition. 16:41:56 I'll give you another example. 16:42:03 Oh, darn. 16:42:08 rudybot is still dead. 16:42:11 offby1: Help! :-P 16:42:12 sorry 16:42:14 *tonyg* blushes 16:42:15 Hehehehehehe. 16:42:19 -!- leo2007 [~leo@222.130.132.191] has quit [Ping timeout: 258 seconds] 16:42:22 I can start another one maybe 16:42:26 as penance 16:42:29 Lol. 16:42:32 cky: That seems pretty smecial, it only matches if it isn't shadowed? :/ 16:42:36 s/smecial/special/ 16:43:27 -!- masm [~masm@2.80.165.231] has quit [Ping timeout: 248 seconds] 16:44:25 Why would someone make an exception that if it's defined, use that value instead of #t? 16:44:30 else should always mean "otherwise do this" 16:44:39 I can imagine this has bitten someone in the ass at some point 16:44:51 That's because of the way syntax-rules is defined to work. 16:45:02 Just don't ever define else to be #f I guess, but that requires people know not to do that 16:45:11 imphasing: It's more subtle than that. 16:45:23 Let's see if incubot will let me try. :-) 16:45:35 incubot: (define a '((foo . bar) (baz . qux))) 16:45:36 # 16:45:40 incubot: a 16:45:41 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Ping timeout: 240 seconds] 16:45:52 incubot: (display a) 16:45:53 Error: unbound variable: a 16:45:57 Darn it. 16:46:16 I'm waiting for planet to do its longwinded magic now 16:46:21 ;-) 16:46:27 . . . 16:46:51 it appears to be pulling a maven 16:47:18 masm [~masm@2.80.165.231] has joined #scheme 16:47:52 ffs 16:48:26 imphasing: R7RS had a long-winded debate over the issue of "else" 16:48:43 I can't say I feel bad about not following the standard in this case :P 16:49:08 The conclusion was that, in general, making symbols like "else" special was a bad idea, but cond can't be changed now 16:49:12 'else should be special to me, it should always mean "do this otherwise", at least that's what I would expect :/ 16:49:14 imphasing: you may find "Keeping it Clean with Syntax Parameters", http://barzilay.org/misc/stxparam.pdf, Eli Barzilay, to be of use 16:49:24 imphasing: isn't that what (syntax-rules (else) ; is for? 16:49:31 *tonyg* . o O (oh good god now it's rebuilding all the fscking documentation) 16:49:45 qu1j0t3: I don't know anything about syntax-rules really :/ 16:50:02 tonyg: raco setup -D is your friend 16:50:03 qu1j0t3: Indeed, what we're demonstrating are things that syntax-rules _specifies_. 16:50:15 Why should it be legitimate to say "(let ((a ...)) (cond ... (a foo)))" but not "(let ((else ...)) (cond ... (else foo)))"? Things shouldn't depend on what you name your symbols, as long as they're all distinct. 16:50:16 samth: does that permanently disable doc building etc? 16:50:16 cky: right. i just demonstrated this to imphasing: 16:50:23 #;1> (cond (#f 1) (else 2)) 16:50:24 2 16:50:26 #;2> (define else #f) 16:50:28 #;3> (cond (#f 1) (else 2)) 16:50:30 2 16:50:31 samth: because I am currently in a passive position: I'm running a program that did some (require (planet ...)). 16:50:48 qu1j0t3: That's not supposed to happen. 16:51:08 cky: go on 16:51:16 qu1j0t3: The new "else" is not the same binding as the "else" at the point of the syntax-rules. 16:51:25 Therefore, it should not match the "else" in the macro. 16:51:27 all you fools are playing on the REPL, write real programs! 16:51:32 cky: isn't it a literal in the macro? 16:51:42 ISTR the conclusion was that else has to be a binding like any other, and therefore shadowable, as otherwise it can't be properly renamed to be hygienic. 16:51:43 cky: so I am not surprised by the above behaviour 16:51:47 cky: should I be? 16:51:48 try (let ((else #f)) (cond (#f 1) (else 2))) 16:51:50 qu1j0t3: Correct, and a literal matches only if the binding at the point of macro use is the same as the binding at the point of the macro definition. 16:51:56 hm 16:52:14 tonyg: no result 16:52:19 qu1j0t3: That is correct. 16:52:25 It's supposed to fall through. 16:52:28 ok 16:52:43 tonyg: no, for planet you're just stuck 16:52:44 Eg, if your macro expands to a cond with an else, but the macro is USED in a context where cond and else have been totally rebound to other stuff, then the macro engine needs to be able to rewrite your cond and your else to other symbols so they don't clash with the local definitions 16:52:45 That seems wrong to me. 16:53:02 And if else is matched as a literal symbol equality test, then the else can't be renamed 16:53:18 alaricsp: My cond and macros using (rename) just look at the symbol name and change it to something else, the symbol is never actually used 16:53:21 It's just a marker for something 16:53:22 kk` [~kk@77.107.164.131] has joined #scheme 16:53:22 -!- kk` [~kk@77.107.164.131] has quit [Changing host] 16:53:22 kk` [~kk@unaffiliated/kk/x-5380134] has joined #scheme 16:53:43 alaricsp: And as I explained to imphasing, that makes "rename" magical in his system, and totally non-lexical. 16:53:54 So, in effect, the "else" in a cond should be a normal binding, so that macros can rewrite it with the usual semantics, like any other symbol 16:53:57 alaricsp: Whereas not even "else" or "=>" in cond get that treatment. 16:54:13 imphasing: Your problems start with saying "symbol"; this is not common lisp, and these things are *not* symbols. 16:54:19 imphasing: i thnk you're agreeing with the standard :) 16:54:39 My memory of this discussion is vague, however, because it had the misfortune to start without the problem being properly explained, so everyone was going "What the hell is the problem here?!?" 16:54:42 imphasing: In a real ER system, "rename" is the second argument to an ER macro transformer. 16:54:49 imphasing: So it's a real function you call. 16:54:59 eli: atom :P 16:55:04 imphasing: Wrong. 16:55:12 imphasing: No, not an atom either. 16:55:23 "Identifier" is the right concept (though eli is welcome to correct me). 16:55:23 'else sure looks like an atom/symbol to me 16:55:38 imphasing: What cky said. 16:56:03 An identifier has a symbol as its printed name, but it's not just that -- it also has lexical context. 16:56:03 Why do functions like symbol->string exist then? 16:56:09 'else is a symbol 16:56:21 There could be other kinds of identifiers 16:56:23 imphasing: you should check what syntax-rules is supposed to do for literals, i think 16:56:43 imphasing: In (define else #f), the "else" is not a symbol, it's an identifier. 16:56:57 Of course, in '(define else #f), the else is a symbol, of course. 16:57:15 cky: (+ 2 2) "+" is a symbol bound to hopefully something 16:57:21 No, it's not. 16:57:24 It's an identifier. 16:57:34 I don't have any identifiers besides symbols 16:57:37 so it's a symbol to me 16:57:52 -!- djcb [djcb@nat/nokia/x-hfoezwxphinaegod] has quit [Quit: Ex-Chat] 16:57:53 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 16:57:55 Identifiers are read in as symbols, but when you eval a bare symbol, it's treated as an identifier. 16:58:00 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 16:58:00 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 16:58:08 This is something that never seems to be well explained 16:58:17 alaricsp: I know, sorry. :-( 16:58:25 AIUI, "identifier" is "a symbol in a given context"; the same symbol in different contexts becomes a different identifier 16:58:30 It seems sort of pointless to care really, symbol, identifier.. does it matter? What kinds of identifiers bedies symbols are there? 16:58:37 cky: Not your fault, it's just that we as a community haven't found a good way of explaining it yet ;-) 16:58:44 s/bedies/besides/ 16:58:46 imphasing: `symbol->string' does deal with symbols, but in macros they're not enough -- you need to go further from these symbols to identifiers. 16:58:47 alaricsp: Hehehehe. 16:59:26 imphasing: And your problem is that you underestimate the importance of that step, yet it is crucial for maintaining proper lexical scope and dealing with hygienic macros. 16:59:32 imphasing: the distinction between symbols/variables/whatnot is covered early in "Lisp in Small Pieces" 16:59:32 imphasing: The most important thing to understand is this: symbols are not self-evaluating in Scheme. 16:59:32 eli: See, in my interpreter, if it's a sequence of characters and it's not a string or something, it's a symbol 16:59:40 (define x 10) define and x are symbols 16:59:43 imphasing: that's only at one level 16:59:46 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 16:59:48 imphasing: there are semantics above this. 16:59:52 imphasing: see LiSP 16:59:52 imphasing: In that case your interpreter is fundamentally broken. 17:00:04 (At least if you intend it to be an interpreter for Scheme.) 17:00:08 100% agree with eli. 17:00:16 I'd like to target r5rs 17:00:16 imphasing: ('define 'x 10) ; define and x are symbols 17:00:33 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 17:00:36 imphasing: In that case it's definitely broken. 17:00:55 So you're saying (define x 10) doesn't get parsed into a list of 3 atoms, the first 2 being symbols and the last being an integer? 17:00:58 Because that seems really weird. 17:01:04 Giomancer [~Gio@76.231.35.17] has joined #scheme 17:01:12 imphasing: SYMBOLS ARE NOT SELF-EVALUATING. Sorry for yelling. 17:01:22 They are in my interpreter 17:01:26 imphasing: That's 100% wrong. 17:01:29 Why? 17:01:37 Where in the standard is that wrong? 17:01:47 imphasing: Say that you do treat the `define' in (define x 10) is a symbol. 17:02:05 What happens when you do (define-syntax foo (syntax-rules () [(foo) (define x 10)])) ? 17:02:06 (car '(define x 10)) is 'define :| 17:02:14 notrudybot [~luser@nomad.ccs.neu.edu] has joined #scheme 17:02:19 finally. 17:02:19 eli: I have no idea, I don't have define-syntax and I have no idea how it works. 17:02:30 tonyg: ;-) 17:02:37 imphasing: (That's true -- but '(define ...) is *not* a syntax.) 17:02:43 notrudybot is my penance temporary replacement for rudybot. 17:02:47 notrudybot: hi 17:02:48 tonyg: eh? Try "notrudybot: help". 17:03:13 notrudybot: (define a '((foo . bar) (baz . qux))) 17:03:14 cky: your sandbox is ready 17:03:14 cky: Done. 17:03:33 notrudybot: (cond ((assq 'foo a) => cdr)) 17:03:34 cky: At first I thought you were misspelling emphasizing. 17:03:34 cky: ; Value: bar 17:03:34 imphasing: If you don't have an idea about macros, how they work, and how they're implemented, then you're pretty far from having a scheme implementation. 17:03:51 But you're not. o.o 17:03:53 eli: So you're saying that scheme doesn't parse text into the same structure as you work with normally? (define x 10) isn't the same as (cons 'define (cons 'x (cons 10 '()))) ? 17:04:05 Giomancer: Which word were you referring to? 17:04:09 eli: I never said I had a scheme implementation or that it was ever going to work right 17:04:10 No. 17:04:12 imphasing: Absolutely not. 17:04:38 cky: So I guess homoiconicity is a dream after all 17:04:46 No. 17:05:08 "Homoiconicity" is a vague concept that is true in pretty much all languages. 17:05:19 imphasing: Homoiconicity does not imply everything is self-evaluating. 17:05:21 It certainly is there in Scheme. 17:05:38 cky: imphasing. xD 17:05:47 Giomancer: :-P 17:05:52 haha 17:06:16 I just walked in, I'm allowed to misread. >.< 17:06:27 notrudybot: (define-syntax foo (syntax-rules () [(foo) (+ 1 2)])) 17:06:28 eli: your sandbox is ready 17:06:28 eli: Done. 17:06:32 the homoiconicity people talk about with lisps seems like writing the AST in text basically. If you're not doing that in scheme, wtf man :| 17:06:33 notrudybot: (foo) 17:06:33 eli: ; Value: 3 17:06:44 notrudybot: (let ([+ list]) (+ 1 2)) 17:06:45 eli: ; Value: (1 2) 17:06:48 notrudybot: (let ([+ list]) (foo)) 17:06:49 eli: ; Value: 3 17:06:55 imphasing: Start with that. 17:07:12 Starting with define-syntax seems like the wrong way around 17:07:20 notrudybot: (cond ((assq 'foo a) => cdr)) 17:07:20 cky: ; Value: bar 17:07:38 Now I want to know wtf is going on with scheme if the parsed AST isn't the same as the data structures you work with 17:07:42 notrudybot: (let ((=> #f)) (cond ((assq 'foo a) => cdr))) 17:07:43 cky: ; Value: # 17:07:44 Because that's not what I thought scheme was like. 17:07:46 imphasing: ^^--- 17:08:30 imphasing: Scheme is about reading the source code into a bunch of Scheme lists, then evaluating those lists. 17:08:49 cky: So how is (define x 10) different than (cons 'define (cons 'x (cons 10 '()))) ? 17:08:53 imphasing: When you read "(define x 10)", that's read in as a list of three objects, the symbol "define", the symbol "x", and the number 10. 17:09:03 cky: You just said they were symbols. 17:09:07 wtf. 17:09:07 However, when you eval that list, it's no longer treated as a list. 17:09:17 That's what I mean by "not self-evaluating". 17:09:32 Read and eval are totally separate steps. 17:09:42 Is that in the standard? 17:09:42 Do not make the mistake of mixing the two up. 17:09:57 I would assume, given the definition of "eval" in the standard. 17:10:31 imphasing: The sexprs (symbols, lists, etc) are things that are used as the concrete syntax that is read, but the evaluator "enriches" them and turns them into some representation of syntax. 17:10:52 In some implementations that is actually a new type, called `syntax' or `syntax-object'. 17:10:58 -!- oiiii [~oiiii@82.71.241.25] has quit [Remote host closed the connection] 17:11:21 In others (those that use ER), the type is implicit in extra functions that you need to use in order to properly deal with syntax. 17:11:41 Using these makes a much more powerful language than what you imagined with symbols. 17:12:33 Taking the concept further to modules (as in r6rs and up) means that redefining `else' is something that can affect your code (supposedly you didn't mistype it, so that's a good feature), but not anyone else's code. 17:12:52 It is essentially the same as defining `+' as I did above. 17:16:17 eli: In your example above, it looks like the + in the macro is just the bare primitive, in my macro I would (rename '+) that, which would cause it to be rewritten to :/ 17:16:25 I'm not getting this syntax object thing clearly 17:17:02 I don't see how or even why there needs to be a difference between parsed objects and the objects to evaluate :/ 17:17:28 imphasing: It's not a matter of the objects so much as how they are interpreted 17:17:48 imphasing: I have no idea what you mean by (rename '+) 17:17:52 imphasing: But, confusingly, it CAN be in some implementations ;-) 17:18:23 eli: That causes the symbol '+ to be rewritten to whatever the bound value was in the creating environment 17:18:27 In this case, the primitive function + 17:18:31 Not the symbol 17:18:48 jewel [~jewel@196-215-117-72.dynamic.isadsl.co.za] has joined #scheme 17:19:54 imphasing: why do you call it 'rename'? 17:19:58 imphasing: isn't it a lookup? 17:20:23 It's just there to tell the rewriter that it needs to give that symbol the value of whatever the binding was in the defining environment 17:20:50 I could call it anything, it's just there to annontate the fact that it needs to be replaced with what the bound value was in the macro's defining environment 17:20:58 imphasing: If you rewrite the else in a cond to a primitive else object, then you should be fine - cond/elses that come out of macros will still work, even if cond and/or else happen to mean something else there. AIUI. 17:21:20 That primitive else objects could be "#t", of course! 17:21:39 It seems I'm 100% wrong in how scheme works, is my problem now. The parser doesn't make the same stuff as you do apparently. 17:21:53 Which I don't understand the reasoning behind/ 17:22:10 imphasing: Relax. It's not that bad. It's just that this identifier/symbol thing is bloody confusing and nobody seems able to explain it properly. 17:22:30 My understanding is shaky, too, but I think you're on the right sort of track. 17:22:42 Don't worry that you need a type called "identifier" that's like a symbol but different etc. 17:22:57 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 17:23:13 AIUI, some implementations have such a type, but it's not compulsory, and the main issue is that the same symbol can refer to different things in different contexts, so people made up "identifier" to refer to what's different about the same symbol in two places 17:23:54 (begin (let ((a 1)) (display a)) (let ((a 2)) (display a))) - same symbol "a", different identifier due to being in different scopes 17:23:55 the symbol 'test is always the same though, everywhere. It's just bound differently.. why does there need to be a concept of an identifier in the first place? 17:24:10 a symbol is just a name that maps a value I though 17:24:19 imphasing: because identifier enriches the concept of symbol with a concept of scope 17:24:21 imphasing: Now you're thinking with dynamic scoping. :-P 17:24:22 So you can talk about this test here or that test there (in different scopes, even if bound ot the same thing) 17:24:33 imphasing: there's an example from OO: Gun.draw and Shape.draw are different things 17:24:37 imphasing: If dynamic scoping is your thing, Scheme is the wrong language for you. :-P 17:24:56 imphasing: the "draw" is the raw symbol; by the time it's resolvable as belonging to either the "Gun" or "Shape" scope, it's become an identifier 17:25:06 The next level of confusion is that value-bindings are to mutable cells while syntax-bindings are to mysterious macro objects ;-) 17:25:15 imphasing: symbols just have spelling, i.e. they're much like strings - plain old text 17:25:19 cky: What? Lexical scope is about how you use environments, not the identifiers themselves :/ 17:25:32 I think we're unnecessarily scaring imphasing :-) 17:25:36 -!- githogori [~githogori@c-24-7-1-43.hsd1.ca.comcast.net] has quit [Ping timeout: 248 seconds] 17:25:41 imphasing: once the interpreter starts to *interpret* the symbol as written, it starts to attach information about its scope and meaning etc, and it becomes an identifier 17:25:44 imphasing: It's not that bad - it's just that the terminology is a bit confusing 17:25:51 imphasing: an identifier is a symbol *under interpretation* 17:25:53 cky: There's no dynamic scope happening anywhere. 17:26:05 Shame, parameters are useful ;-) 17:27:23 tonyg: All that meaning is in the environment, not the symbol though :? 17:27:36 The symbol is just a name, the layers of enviornments are what give it meaning 17:27:41 imphasing: Yes 17:27:49 imphasing: yes, that'd be a good place to put it. So in a way, an identifier is a combination of a symbol with the environment it's to be looked-up in 17:28:00 imphasing: now this combination can be implicit or explicit 17:28:04 symbols closures :| 17:28:13 imphasing: Some macro system *implementations* handle the confusion of symbols ending up in different environments by having a special identifier object that contains a symbol and a reference to an environment 17:28:17 imphasing: but the win of scheme and hygienic macro systems is that they manage the combining and manipulation of symbols with environments for you 17:28:27 imphasing: whereas simpler macro systems leave you doing that by hand 17:28:39 imphasing: symbol closures, EXACTLY 17:28:49 imphasing: "symbols closures" is perceptive, as the "syntactic closure" macro system works like that ;-) 17:29:13 gabot: joke 17:29:14 *gabot* thinks 17:29:16 *gabot* laughs hysterically 17:29:27 MORE NOISE. 17:29:51 Right... time to go. 17:29:59 alaricsp: Thanks for your assistance :) 17:30:12 NP! 17:30:20 Try and figure out how to explain this stuff better ;-) 17:30:21 This is going to take me some time and reading to understand I think :| 17:31:10 See, the way my evaluator works is a symbol is always a symbol.. stack frames carry a current environment, so when I get to a symbol I just look it up in that env 17:32:07 tonyg: Thanks for your help too, I think I get the purpose of an identifier.. 17:32:10 Would it be correct to say that all identifiers are symbols, but not all symbols are identifers? Identifiers are symbols bound to values in a given context. 17:32:18 But it only seems to be a problem or needed when macros exist 17:33:39 -!- gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Ping timeout: 258 seconds] 17:34:40 gnomon [~gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 17:34:51 mario-goulart: In general all identifiers *contain* a symbol. 17:35:35 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 260 seconds] 17:36:06 imphasing: Re your earlier `rename' -- what I don't understand is whether it's in your system or some ER thing that you're using. If it's the former, then I can't say anything about it; if it's the latter, then that `rename' is exactly the tool that you use to talk about the + identifier, and you do that indirectly by using a + symbol. 17:36:40 `syntax-case' systems are more explicit in that you actually get to see the new type, instead of use it in such an indirect way. 17:37:26 imphasing: And about your last comment above: of course this is something that is needed when macros exist -- without macros there is no need to talk about whatever the implementation uses to deal with syntax. 17:37:32 http://www.quickmeme.com/meme/358qm2/ 17:37:48 something like this 17:37:48 :-D 17:37:52 Basically, I have a hyper-simplistic macro system that's just a lambda that gets the arguments of the form passed to it, a call like (somemacro arg1 arg2) becomes (eval-macro (lambda-rewriter 'arg1 'arg2)), and I'm trying to add hygiene to this system 17:38:24 My idea was to capture the environment when a macro is created, and use (rename ) to tell the macro system that that symbol needs to be the value in the creating environment 17:38:32 It's not really a normal ER system at all 17:38:43 DerGuteMoritz: That's actually something that can help a bunch of people... 17:38:51 I just named the symbol 'rename so I could annotate the macro 17:39:24 eli: first actually educative meme in history! 17:39:53 githogori [~githogori@c-24-7-1-43.hsd1.ca.comcast.net] has joined #scheme 17:40:32 denisw [~denisw@dslb-188-102-019-101.pools.arcor-ip.net] has joined #scheme 17:40:48 imphasing: If you're just starting to add hygiene, then you have a bunch of reading to do... This discussion is just a mess of hints at possible directions, but you'll need a more thorough understanding to implement it. 17:41:04 DerGuteMoritz: I'm actually about to get there in my class, maybe I'll use it... 17:41:30 That's the understanding I'm trying to find :) 17:41:36 Obviously I'm doing all kinds of things wrong. 17:41:38 eli: no problem, I'll fax you the paperwork 17:42:03 DerGuteMoritz: But it just happens to hit a few good points -- like the fact that people actually like symbols, a *lot*, and they find it hard to disconnect from them. 17:42:17 lolz @ meme DerGuteMoritz 17:43:11 I ran into the same problem in a very different setting when I wrote my dissertation: logicians love to talk about a specific name, so if you give them a syntax system that has alpha-equivalent-classes instead, their first reaction is to run away screaming "rape!". 17:43:39 people need to read their de Saussure 17:43:40 logicians also have a strange desire to specify the lexical syntax of their systems 17:43:49 memes to the rescue 17:44:57 DerGuteMoritz: I'm deeply suspicious of all non-PL linguists. 17:45:12 (Even married one...) 17:45:26 So how does one create an identifier? Are they first class objects in r5rs? 17:45:33 good thing he was a mineralogist! 17:45:47 oh wait that was his father 17:47:23 That's to say that languages rock 17:47:43 turbofail [~user@c-107-3-149-149.hsd1.ca.comcast.net] has joined #scheme 17:48:02 imphasing, (datum->syntax lexical-context 'foobar source-context) or something 17:48:21 That doesn't look like r5rs :O 17:49:17 Hell, I don't even really care about hygiene right now, I just want macros with lexical scope :( 17:49:38 mario-goulart: thus Ruby 17:49:47 oh, i've forgotten what 15 year old standards contain 17:50:39 imphasing: I think that's what hygiene refers to! 17:50:59 I thought it was that, in combination with rewriting introduced symbols 17:51:05 jonrafkind: yeah the text has become kinda hard to read after all that time! 17:51:05 Although I guess the scope is the hardest part 17:51:33 hardy har 17:51:56 DerGuteMoritz: eyes failing! 17:52:03 DerGuteMoritz: where did I leave my reading glasses 17:53:26 imphasing: maybe it helps to think that a symbol is just a datum without intrinsic meaning (it *symbolizes* stuff)? 17:53:46 imphasing: and when evaluating, some symbols symbolize identifiers 17:53:58 DerGuteMoritz: Right 17:54:00 Er 17:54:08 you might use "represent" 17:54:13 symbols *represent* identifiers 17:54:18 So identifiers are first class objects? 17:54:19 ah yes that's less overloading 17:54:23 identifiers arise from an *interpretation* of symbols 17:54:27 identifiers may be first-class 17:54:28 imphasing: I think that's an implementation detail 17:54:30 but may not. 17:54:31 yeah 17:54:32 Okay 17:54:32 not sure though! 17:54:34 ok 17:54:43 *DerGuteMoritz* has never implemented a Scheme himself 17:54:43 SOMEBODY SOMEBODY find R5RS 17:54:49 you can think of representation and interpretation as inverses 17:54:51 did somebody type it in at one time 17:55:07 snizzo [~quassel@host61-30-dynamic.21-79-r.retail.telecomitalia.it] has joined #scheme 17:55:08 qu1j0t3: the edges are a bit torn 17:55:11 tonyg: duals? 17:55:25 qu1j0t3: inverses. :-) 17:55:33 tonyg: ok 17:55:37 as in, functions. 17:55:48 represent :: meaning -> representation 17:55:52 interpret :: representation -> meaning 17:56:03 ah that's good 17:56:12 or 17:56:21 represent :: semantics -> syntax 17:56:25 hee 17:56:26 yep 17:56:30 and the other way around 17:56:37 sort of anyway. 17:56:45 ~ 17:56:50 connections here abound to denotational semantics 17:57:11 also monads 17:57:32 no scratch that, I just wanted to say a clever word, too :-) 17:57:38 ha 17:57:47 DerGuteMoritz: in this case use "ultrametric spaces" 17:57:49 well there is a connection. but it's not as close 17:58:00 oh yes I remember that article about syntax as monads 17:58:09 -!- Giomancer [~Gio@76.231.35.17] has quit [Quit: I cna ytpe 300 wrods pre mniuet!!!] 17:58:14 you damn academics :P 17:58:20 mario-goulart: I found myself in ultrametric space after reading that 17:58:43 disconnected from reality, like an ephemeron 17:58:53 DerGuteMoritz: to get out of there, use ultrametric backspace 18:00:23 So do most scheme implementations not use the actual symbols during evaluation? Are they transformed into an identifier at some point or something? 18:00:32 It would have to happen after evaluation of the symbol :/ 18:01:23 freakazoid [~seanl@66.220.144.73] has joined #scheme 18:01:38 imphasing: simple interpreters sometimes use something like psyntax to preprocess syntax represented as simple s-expressions 18:01:44 imphasing: psyntax uses gensym to make up new symbols 18:02:03 imphasing: in the expanded result, symbols *play the part* of identifiers, even though they don't have any explicit environment attached 18:02:10 imphasing: because they've already been rewritten 18:02:27 imphasing: and *then*, post expansion, the interpreter can be very simple-minded and just use symbols as identifiers. 18:02:48 imphasing: there are other approaches which expand macros as they are encountered at runtime which can be very simple (and very inefficient!) 18:03:07 My interpreter works like that, everything happens at runtime 18:03:10 There's ONLY runtime 18:03:15 *tonyg* nods. 18:03:18 Hence your nick? 18:03:30 hah 18:03:32 :-D 18:03:32 macros are a lambda that just hands it's results back to the evaluator and re-runs 18:03:43 There must be some joke about my nick that I don't get :( 18:03:48 It's from calvin and hobbes 18:03:52 yep. the trick with systems like that is, as you are discovering, getting hygiene right 18:04:02 ah :-) i was reading it as "implicit phasing" 18:04:09 Ah :P 18:04:58 -!- drwho [~drwho@c-68-81-125-196.hsd1.pa.comcast.net] has quit [Quit: leaving] 18:13:03 -!- masm [~masm@2.80.165.231] has quit [Ping timeout: 248 seconds] 18:17:25 masm [~masm@2.80.165.231] has joined #scheme 18:27:30 coderdad [~coderdad@wsip-70-164-198-85.ok.ok.cox.net] has joined #scheme 18:27:52 Fare [~Fare@74.125.59.116] has joined #scheme 18:33:41 i have spent all day in psyntax 18:33:47 i feel dirty 18:33:54 wingo: ouch! 18:34:15 what were you trying to do? 18:35:35 fix a bug in guile, where macro-introduced toplevel definitions are not fresh 18:36:54 i have not finished yet. it is a deep bug. 18:40:17 :( 18:42:21 cky: heh. Looks like another sandbox bug for eli 18:43:30 So does Chicken just blow all the other Schemes out of the water for C and C++ FFI? 18:43:44 more like quicksandbox 18:43:45 rudybot [~luser@ec2-204-236-150-238.us-west-1.compute.amazonaws.com] has joined #scheme 18:44:06 rudybot: (exit 1) 18:44:11 leppie: your sandbox is ready 18:44:11 leppie: error: evaluator: terminated (exited) 18:44:42 I feel much better now 18:45:17 Shall we have a rudybot vs notrudybot fight? 18:46:25 Tonight, on #scheme: ircbot wars! 18:47:12 gabot: ring the bell 18:47:12 *gabot* is busy gossiping with rudybot 18:48:01 *offby1* is busy earning his paycheck 18:48:52 offby1: BTW, that bug was already sent to the authorities (who happen not to be me). 18:49:06 *XTL* toys with ipython and cwiid 18:49:22 -!- X-Scale [email@sgi-ultra64.broker.freenet6.net] has quit [Quit: Time left until the Epochalypse: 26yrs 10wks 6days 20hrs 24mins 15secs] 18:50:17 freakazoid: I hear Racket's FFI is great. 18:50:37 stamourv: I didn't see any mention of C++ in there, though 18:50:56 Oh, that I don't know. 18:51:01 eli's the right person to ask. 18:51:02 ijp [~user@host86-182-155-249.range86-182.btcentralplus.com] has joined #scheme 18:51:10 I don't know for sure that I'll need to use any C++ libs, but it'd be nice to have that option. 18:51:23 Bullet, the main one I was worried about, apparently does have a C API 18:51:44 the ability to distribute bundles on OS X that are relatively small is also important 18:51:50 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Read error: Connection reset by peer] 18:52:02 -!- denisw [~denisw@dslb-188-102-019-101.pools.arcor-ip.net] has left #scheme 18:52:11 Racket would have been my first choice before I discovered Chicken's ability to interface with C++ 18:52:13 I do believe Racket can do that too. 18:52:21 cool 18:52:22 (OS X bundles.) 18:52:26 *freakazoid* installs racket 18:52:55 If that's for a GUI app, the Racket GUI libraries are a joy to use. Nicest I've ever used. 18:53:10 It's for an OpenGL app 18:53:40 I'll probably need to figure out how to run the rendering loop in a separate thread, so I may well only interface with zeromq to send messages to the other thread 18:54:06 unless racket has realtime gc 18:54:38 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 18:54:41 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 18:54:41 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 18:54:41 karswell [~coat@93-97-29-243.zone5.bethere.co.uk] has joined #scheme 18:55:31 -!- gravicappa [~gravicapp@80.90.116.82] has quit [Remote host closed the connection] 18:57:08 f8l [~f8l@213-238-96-124.adsl.inetia.pl] has joined #scheme 18:59:11 wow, racket automatically parallelizes stuff. 18:59:12 I'm sold. 18:59:41 what now? 19:00:40 http://docs.racket-lang.org/guide/performance.html#%28part._effective-futures%29 19:00:41 http://tinyurl.com/6f2v62y 19:00:45 thanks, rudybot 19:01:54 -!- MrFahrenheit [~RageOfTho@users-146-59.vinet.ba] has quit [Ping timeout: 260 seconds] 19:02:01 c has automatic memory management! it just requires you to use malloc/free.. 19:02:08 haha 19:02:13 I've been using c++ and shared_ptr 19:02:31 my point is explcitily using (future) makes it not very automatic 19:02:32 jonrafkind: :) 19:02:44 jonrafkind: it's more automatic than spawning threads 19:03:11 be careful with futures, they tend to block a lot 19:07:19 mjonsson [~mjonsson@38.109.95.133] has joined #scheme 19:09:51 I'll have to check out fluxus, since it uses racket and glew 19:13:46 saccadewrk_ [saccadewrk@nat/google/x-nyjbrwjntyboeckz] has joined #scheme 19:13:46 guile also has futures FWIW 19:14:00 -!- saccadewrk_ [saccadewrk@nat/google/x-nyjbrwjntyboeckz] has quit [Client Quit] 19:15:00 my requirements are ability to interface with (all of) OpenGL, decent FFI for at least C, crossplatformness without Cygwin, and ability to generate bundles on Mac 19:15:30 smallness of said bundles would also be nice, though as long as they're not huge (>30M) I'll live. 19:15:52 oh, and a sandbox that will allow me to run untrusted code 19:16:09 so that user-provided material and animation scripts can't delete people's files 19:16:17 or violate their privacy 19:18:15 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Remote host closed the connection] 19:18:47 freakazoid: I think chicken provides everything you require. I'm not really sure about those macosx bundles (I don't know about them). But there is http://wiki.call-cc.org/man/4/Deployment 19:19:13 Oh, now I see: "On the Macintosh, passing the -gui option to csc will result in a true GUI application bundle (named .app)." 19:19:48 rudybot: you're back! how nice. 19:19:49 tonyg: Maybe try directly first, and if your ISP blocks it, use dpkg-reconfigure postfix to get back the menu and change it to the smarthost. 19:20:00 well quite. 19:20:03 -!- notrudybot [~luser@nomad.ccs.neu.edu] has quit [Remote host closed the connection] 19:22:19 mario-goulart: yeah, Chicken was the other Scheme I was looking at 19:23:01 Racket's IDE tips the balance in its favor, though. 19:23:23 If either of them had a realtime GC that would also be a mark in its favor 19:23:59 mario-goulart: I have a little more confidence in Chicken's FFI since I've actually been looking at it, but I'm going to checkout fluxus, which uses a lot of the libraries I want 19:24:04 and is written using racket 19:24:51 *imphasing* reverts all attempts at hygienic macros :( 19:25:21 not sure if chicken's sandbox egg would suit your needs though 19:25:29 freakazoid: sounds like a good plan 19:25:32 OTOH racket's seems to have its problems, too :-) 19:25:47 DerGuteMoritz: being fixed as we speak 19:25:53 DerGuteMoritz: what'd be the problem with the sandbox egg? 19:25:54 :-D 19:25:58 -!- wingo [~wingo@188.84.169.192] has quit [Ping timeout: 258 seconds] 19:26:16 mario-goulart: you can't use and/or define macros inside the sandbox IIRC 19:26:29 mario-goulart: how does the sandbox egg prevent you from accessing scary things like the ffi? 19:26:35 ah, ok. 19:26:51 samth: the ffi is only available throug the compiler 19:26:54 samth: ffi is only available if you use the compiler. 19:26:57 haha 19:27:12 I like how "the compiler" lines up in our messages 19:27:19 thanks to me misspelling "through" 19:27:48 :-) 19:29:03 mario-goulart, DerGuteMoritz: looking at that sandbox implementation, it seems much weaker than the racket one. 19:29:34 eli: it's not very advanced, indeed. 19:29:37 Specifically, it looks like much of the protection is achieved by not having bindings. 19:30:24 That would be a major limitation compared against having all the bindings you want but blocking forbidden access via the VM. 19:31:17 Also, it looks like time & space limits can apply only on a per-evaluation basis -- so you can't restrict the memory for the whole sandbox. 19:31:23 freakazoid: Regarding GC, chicken provides some runtime options that can be used to tweak the garbage collector (I guess most implementations provide similar things). 19:31:37 eli: are you talking about blacklisting certain ops rather than whitelisting them? 19:32:25 tonyg: I'm just looking at http://wiki.call-cc.org/eggref/4/sandbox, and the top part lists a bunch of bindings that are not available. 19:32:33 eli: right, i've just found that; i see. 19:33:04 looks like both systems are based around blacklisting then. 19:33:07 I now understand why klutometis implemented incubot's sandbox feature directly via the OS. 19:33:10 just at slightly different levels 19:33:22 oo that's an interesting stmt, eli - can you elaborate? 19:33:32 tonyg: Um, I'd say *vastly* different levels. 19:33:40 :) 19:34:01 they're still oriented around forbidding known-dangerous operations rather than permitting known-safe operations 19:34:03 Racket allows you to restrict access to the FS, it's very different than restricting access to `write'. 19:34:16 but yes, implemented very differently 19:34:34 oww i have a headache, must get food 19:34:34 I disagree with "implemented" -- the resulting systems are very different. 19:34:38 i think that's more than a difference of implementation 19:34:45 rudybot: (display "foo") 19:34:46 eli: your sandbox is ready 19:34:46 eli: ; stdout: "foo" 19:35:07 tonyg: That won't work with the chicken thing, IIUC. 19:35:17 rudybot: (require racket/file) 19:35:17 eli: Done. 19:35:20 Neither that. 19:35:32 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 19:35:32 rudybot: (list delete-file rename-file-or-directory) 19:35:32 eli: ; Value: (# #) 19:35:37 And that. 19:35:39 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 19:35:39 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 19:35:57 How does racket knows which operations affect the file system, given that there is the port abstraction? 19:36:16 know* 19:36:47 mario-goulart: Like I said, it's done at the VM level: http://docs.racket-lang.org/reference/securityguards.html 19:37:30 true, chicken's i/o facility is not as almost-oo as rackets 19:37:33 *racket's 19:38:03 freakazoid: BTW, the racket ffi is based on libffi -- it's completely dynamic, which means that you can play with stuff interactively, and you can distribute source code easily without requiring a compiler for installations. 19:38:19 ... which is an excellent feature 19:38:37 we've been using that to deploy racket code on an embedded(ish) system that lacks a C compiler on the machine itself 19:38:47 ffi-using racket code, that is 19:38:51 freakazoid: But it does prevent talking to C++, since it obfuscates names. (And I don't know about any standard way to know how they're obfuscated.) 19:38:55 -!- pandeiro [~pandeiro@177.32.217.182] has quit [Quit: Out of quarters] 19:39:05 eli: there is none. they tried but failed to get a standard 19:39:28 tonyg: Whew! 19:39:31 :) 19:43:21 FWIW there is the lazy-ffi egg that provides libffi bindings for chicken, too 19:47:37 I'm trying to come up with a way to seperate parts of a quasiquoting macro template into parts that need to be evaluated in the macro's defining environment, and parts that need to be evaluating in the calling environment.. is there a standard way that people accomplish this? 19:48:49 My thought was to check the body of the quasiquote, and if a symbol is unquoted like (unquote sym) or (unquote-splicing sym) then it's a regular symbol to evaluate in the calling env, and if there's no unquote, I can replace it with an identifier that contains the macro's defining environment 19:49:01 gravicappa [~gravicapp@ppp91-77-218-135.pppoe.mtu-net.ru] has joined #scheme 19:49:02 But I'm not really sure now :/ 19:49:17 DerGuteMoritz: Does it do callbacks too? (Bonus points if it does that in a way that makes a uniform interface for both kinds of functions.) 20:01:49 -!- luist [~luist@189.101.4.123] has quit [Ping timeout: 240 seconds] 20:02:23 rff [~rff@ip72-207-248-18.br.br.cox.net] has joined #scheme 20:05:25 There are only two name mangling schemes in practice though 20:05:32 Intel's and (I think) Microsoft's 20:05:41 gcc uses intel's IIRC 20:06:09 eli: I'm pretty sure you can't call back into Chicken from its native ffi 20:06:20 I'll have to look into lazy-ffi 20:08:01 taylanub [taylanub@pingas.org] has joined #scheme 20:09:22 freakazoid: Sun used to have a mangling scheme that differed from GCC. But I don't know whether Sun CC is still alive. 20:09:28 Ugh, every solution to hygienic macros I can think of basically involves first class environments 20:09:38 imphasing: bingo :-) go with it 20:09:42 :( 20:09:47 That sounds bad 20:09:54 nah, it's ok for a runtime-based system 20:09:58 Hmm.. 20:10:17 Both Chicken and Racket seem to have pretty active communities 20:10:28 ahead-of-time systems have abstract equivalents; in a runtime system you have the real thing, as it's happening, to work with 20:10:37 freakazoid: Heh, not being able to do that certainly makes it non-uniform... 20:11:01 when doing (pair-for-each f list), each call to f can modify the (rest of) list, right ? 20:11:02 (Hopefully it is still possible to do callouts...) 20:11:03 saccadewrk_ [saccadewrk@nat/google/x-uvoswdfjyfuptcdh] has joined #scheme 20:11:07 eli: Calling back into Scheme is not a capability I care about. 20:11:09 eli: if you're familiar with Gambit's ffi, chicken's is based on that 20:11:27 -!- saccadewrk_ [saccadewrk@nat/google/x-uvoswdfjyfuptcdh] has quit [Client Quit] 20:11:28 I may end up having my callbacks just send messages via zeromq 20:11:28 or rather, shares heritage with it 20:11:47 tonyg: I was talking about the dynamic thing. The compile-time hack is something that I never cared much about. 20:11:50 freakazoid: you could do worse than using 0mq as your cross-language glue 20:11:55 eli: oh, ok. 20:12:06 I've been looking for an excuse to use 0mq for ages :) 20:13:32 tonyg: it's also a way to avoid having garbage collections happen in the rendering loop 20:13:46 Non-jerky rendering is important to me 20:13:51 Heh, with first class environments I could store the macro's defining env away, and hand it as an argument to the lambda rewriter along with a function to map a symbol to that environment, then call that "rename" function in the macro whenever I want ER.. 20:14:27 imphasing: you're about a millimeter away from inventing explicit renaming 20:14:33 imphasing: and/or synclo 20:14:38 imphasing: have you read the papers? 20:15:02 I haven't, do you know the titles? 20:15:04 He doesn't need to. He's writing them himself. 20:15:11 I actually may have and not known 20:15:16 :-) it might help speed up the process and/or prune off dead ends 20:15:36 I'm definitely into reading what smarter people than I have done :) 20:16:53 -!- ijp [~user@host86-182-155-249.range86-182.btcentralplus.com] has left #scheme 20:17:06 imphasing: Just be sure that these are syntactic environment that you're dealing with, not the runtime ones. (Since if you do that, then my guess is that you'll definitely fall into the fexpr pit.) 20:17:08 (imphasing, if you haven't read http://en.wikipedia.org/wiki/Hygienic_macro, please do) 20:17:14 heh 20:17:29 eli: I'm still having a hard time seperating those concepts :/ 20:17:48 There isn't a syntactic environment that I'm aware of is probably the problem 20:18:14 conjecture: fexprs can get from symbols to values using an environment; if you limit it to being able only to go from symbols to bindings then you don't get the fexpr problem. eli? 20:18:28 imphasing: For example, after you process (define foo (* 2 3)) you should have an environment that talks about a binding for `foo', and it might say something about where it is etc; it might even have something to do with (* 2 3). 20:18:31 or rather, construct identifiers from symbols 20:18:51 imphasing: But there should *not* be any 6 around -- since that is something that belongs to the runtime side. 20:19:47 The only environments I have map symbols to their computed value :/ 20:19:51 imphasing: note that eli is not talking about correctness here, since fexprs can express anything macroish, but is talking about practicality: fexprs make it easy to shoot your foot off 20:19:54 I don't have a syntactic environment I guess. 20:19:59 tonyg: Probably. I guess you could talk about a system that has both fexprs and syntax objects, but that would be very interesting in a way that is not interesting to me... 20:20:26 tonyg: do you mean "interesting" :-) ? 20:20:48 When would an environment that doesn't map a symbol to a value be useful? 20:20:57 or identifier ;) 20:21:22 More like sawing your foot off, shooting your hands off, then sewing your bloody foot into your shoulders, then get surprised that typing code is difficult. 20:22:34 It seems like to even create a syntactic environment, you'd have to evaluate (define x (+ 2 2)) for example, to figure out that something is binding something to x.. 20:22:42 tonyg: No, I meant "uninteresting"... Once you have fexprs, then you already have a weird mix of runtime and compiletime, and worrying about the small spot on the wall when the floor is covered with blood seems redundant. 20:23:14 oh heck. imphasing i was wrong earlier: you don't have a syntactic environment then. Macros map sourcecode to sourcecode, and so must not talk about variables' values: they must talk about the variables themselves. 20:23:35 imphasing: if you don't have (set!) then you can maybe kludge it 20:23:44 eli: gotcha. 20:25:28 imphasing: pah. I mean identifiers, not variables. So you could imagine having a type of object called "lump", and mapping symbols to lumps in the macro-expansion phase, and lumps to values (or cells holding values) in the runtime environment 20:25:44 reusing symbols as lumps invites confusion 20:26:07 So basically, I need to man up and implement a seperate macro expansion phase? :( 20:26:22 imphasing: if you want hygiene: yes. 20:26:26 one way or another. 20:26:29 -!- jewel [~jewel@196-215-117-72.dynamic.isadsl.co.za] has quit [Ping timeout: 240 seconds] 20:26:34 you can have it running concurrently or ahead-of-time of runtime 20:26:49 it's ok though, it's not usually a huge deal 20:27:13 i mean, once the basic idea of managing a syntactic environment sinks in 20:27:20 Yeah :/ 20:27:33 imphasing: have you looked at any of the portable expanders to see how they work? 20:27:45 imphasing: I'd suggest looking at Al Petrofsky's syntax-rules implementation 20:28:06 is that psyntax? 20:28:11 and also at the srfi-72 implementation by Andrė van Tonder 20:28:16 imphasing: no, it's not psyntax 20:28:20 I would avoid learning from psyntax 20:28:28 it is a large, old, complicated piece of code 20:28:38 it's hard to read. 20:28:41 or rather, i found it so. 20:28:56 (psyntax, i mean) 20:29:36 Alright, thanks for the tips I'll check them out :) 20:29:46 imphasing: srfi-72 is probably right up your alley. 20:35:25 pumpkin [~pumpkin@17.45.135.20] has joined #scheme 20:35:32 -!- pumpkin [~pumpkin@17.45.135.20] has quit [Changing host] 20:35:32 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 20:35:44 jcowan [~John@cpe-98-14-172-212.nyc.res.rr.com] has joined #scheme 20:36:22 coi 20:37:33 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 260 seconds] 20:37:43 calling back from C to Scheme is possible in Chicken 20:37:58 Hm, so in scheme implementations are all symbols not the same? this is probably an implmentation detail, but in my scheme symbols come from a factory, so 'test is always the same object as 'test 20:38:04 Oh? That's useful to know 20:38:05 defining callbacks, too, not sure if and how that works with lazy-ffi though, never used it myself 20:38:53 -!- snizzo [~quassel@host61-30-dynamic.21-79-r.retail.telecomitalia.it] has quit [Ping timeout: 240 seconds] 20:38:57 -!- pumpkin is now known as copumpkin 20:39:16 DerGuteMoritz: OK, so the remaining question is whether it's done in a uniform way... 20:39:34 eli: what exactly? 20:39:48 Specifying callouts and callbacks. 20:40:04 For example, in Racket, (_fun _int -> _int) is a type for both sides. 20:40:27 A better example: (_fun _int (_fun _int -> (_fun _int -> _int)) -> _int) 20:41:32 imphasing: Normally, yes. I can't think of any Scheme that doesn't intern symbols in that fashion. 20:42:15 eli: On Chicken, most types are bidirectional, but there are a few exceptions, because for strings, who owns the string is part of the type. 20:45:08 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Ping timeout: 276 seconds] 20:45:41 hm I don't get those examples but if you mean whether you can use the same type specifiers for both sides then what jcowan said :-) 20:49:05 ijp [~user@host86-182-155-249.range86-182.btcentralplus.com] has joined #scheme 20:50:22 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 20:50:31 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 20:50:31 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 20:50:39 snizzo [~quassel@host61-30-dynamic.21-79-r.retail.telecomitalia.it] has joined #scheme 20:54:04 I'll take that as a "yes" then, any pointers to examples? 20:58:42 MrFahrenheit [~RageOfTho@users-147-91.vinet.ba] has joined #scheme 20:59:27 -!- imphasing is now known as imphasing|home 20:59:42 *dostoyevsky* thinks he's going to implement continuations now!!! 20:59:55 Yay :D 20:59:57 It's a great feeling 21:03:58 imphasing|home: It's a first hack. It will only do stack unwinding, so a continuation can only work if it's position is still in the current stack. But if I change the internal storage for the stack to a cons list, then I can actually retain the part of the stack even after it's not actually in the current stack anymore 21:10:09 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Read error: Connection reset by peer] 21:10:57 elderK [~k@pdpc/supporter/active/elderk] has joined #scheme 21:11:05 Hey guys 21:11:06 Ahaha 21:11:11 The work saga continues. 21:11:14 And I'm not sure I care :P 21:11:16 yo, cky! 21:11:50 -!- homie [~levgue@xdsl-84-44-153-16.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 21:11:56 -!- wbooze [~levgue@xdsl-84-44-153-16.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 21:13:26 -!- gravicappa [~gravicapp@ppp91-77-218-135.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 21:14:57 eli: the FFI lacks good examples other than eggs code 21:15:17 there are very few examples in the FFI reference 21:15:27 see http://api.call-cc.org/doc/foreign 21:15:29 DerGuteMoritz: a good example is the openssl collection 21:15:33 oh wait 21:15:34 haha 21:15:35 sorry 21:15:38 WAT 21:15:51 I'd rather recommend the postgresql egg 21:15:54 my bad 21:16:05 i was thinking you were saying the racket ffi lacks good examples 21:16:17 heh 21:16:27 its documentation lacks examples, too? 21:16:36 I think I didn't look into it, yet 21:16:42 no, it has a few examples 21:16:49 but for the meaty stuff nothing beats a real program 21:16:56 that's right 21:17:07 DerGuteMoritz: I was just interested in examples of uniform syntax for callbacks... 21:21:15 eli: well, for callbacks you use foreign-safe-lambda / foreign-safe-lambda* instead of foreign-lambda / foreign-lambda*. other than that it's exactly the same syntax. not sure if that answers your question though! 21:21:31 I guess I don't really get your question 21:26:49 Hey DerGuteMoritz! 21:26:53 How're you doing, man? 21:27:01 mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has joined #scheme 21:27:16 elderK: ho! 21:27:26 elderK: wait, you aren't in #chicken 21:27:45 fine, thanks :-) 21:29:39 DerGuteMoritz: But you must specify the types somewhere. And I don't see how a `foreign-lambda' would help since the whole point is passing plain scheme functions to the foreign side. 21:29:52 :) I'm a little afraid to go to #chicken now 21:29:54 I've been away for so long! 21:29:59 Crazy, I know :) 21:30:01 But how're you man 21:30:02 ? 21:30:48 eli: ah, pass plain scheme functions to the foreign side so that they appear as regular C functions? 21:31:00 luist [~luist@189.59.164.169] has joined #scheme 21:31:12 elderK: no worries, you won't be kicked :-) how are you? I'm fine 21:31:38 DerGuteMoritz: Yes. As in trying to use the stdlib qsort() function. 21:31:50 eli: ok, you need define-external for that 21:31:55 I'm okay, things've been tough of late but, I'm alive :P:) 21:31:57 http://api.call-cc.org/doc/foreign/callbacks/define-external 21:33:38 DerGuteMoritz: OK -- so this is definitely not symmetric (in the sense that I wrote above: specifying both sides the same way), and you can't even call an arbitrary scheme function then. 21:33:41 -!- mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has quit [Ping timeout: 240 seconds] 21:34:07 -!- Fare [~Fare@74.125.59.116] has quit [Ping timeout: 248 seconds] 21:34:15 eli: right, not all scheme functions are exported as C functions 21:38:10 pandeiro [~pandeiro@177.32.217.182] has joined #scheme 21:39:48 -!- f8l [~f8l@213-238-96-124.adsl.inetia.pl] has quit [Quit: WeeChat 0.3.6] 21:40:06 sepuku [~sepuku@83.212.47.63] has joined #scheme 21:41:58 -!- coderdad [~coderdad@wsip-70-164-198-85.ok.ok.cox.net] has quit [Ping timeout: 244 seconds] 21:44:05 coderdad [~coderdad@wsip-70-164-198-85.ok.ok.cox.net] has joined #scheme 21:51:32 -!- sepuku [~sepuku@83.212.47.63] has quit [Quit: Leaving] 21:52:24 mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has joined #scheme 21:54:27 -!- coderdad [~coderdad@wsip-70-164-198-85.ok.ok.cox.net] has quit [Quit: Computer has gone to sleep.] 22:16:29 -!- mmc1 [~michal@178-85-131-65.dynamic.upc.nl] has quit [Ping timeout: 240 seconds] 22:18:19 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 22:18:26 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 22:18:26 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 22:20:01 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 22:23:38 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Read error: Connection reset by peer] 22:24:31 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 22:24:36 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 22:24:37 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 22:29:55 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Remote host closed the connection] 22:30:07 jeapostr1phe [~jay@lallab.cs.byu.edu] has joined #scheme 22:30:11 -!- jeapostr1phe [~jay@lallab.cs.byu.edu] has quit [Client Quit] 22:33:41 -!- ijp [~user@host86-182-155-249.range86-182.btcentralplus.com] has quit [Ping timeout: 240 seconds] 22:34:39 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 22:34:46 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 22:34:46 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 22:39:47 -!- MadMuppet006 [~MadMuppet@122-62-124-247.jetstream.xtra.co.nz] has quit [Quit: Leaving] 22:44:02 -!- gffa [~gffa@unaffiliated/gffa] has quit [Quit: sleep] 22:49:40 -!- snizzo [~quassel@host61-30-dynamic.21-79-r.retail.telecomitalia.it] has quit [Remote host closed the connection] 23:05:22 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 23:06:00 -!- pandeiro [~pandeiro@177.32.217.182] has quit [Quit: Leaving] 23:06:05 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Read error: Connection reset by peer] 23:07:24 joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has joined #scheme 23:07:31 -!- joyfulgirl [~ivy@209-6-79-248.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com] has quit [Changing host] 23:07:31 joyfulgirl [~ivy@unaffiliated/joyfulgirl] has joined #scheme 23:12:44 dnolen [~davidnole@cpe-98-14-92-234.nyc.res.rr.com] has joined #scheme 23:16:09 -!- elliottcable [~me@ell.io] has quit [K-Lined] 23:27:30 -!- amoe [~amoe@host-92-26-166-110.as13285.net] has quit [Ping timeout: 258 seconds] 23:29:04 amoe [~amoe@host-92-24-168-25.ppp.as43234.net] has joined #scheme 23:33:52 Scientific American archives open until Nov 30 from 1845 till 1906: http://www.nature.com/scientificamerican/archive/index.html 23:38:53 -!- joyfulgirl [~ivy@unaffiliated/joyfulgirl] has quit [Remote host closed the connection] 23:45:22 -!- soveran [~soveran@186.19.214.247] has quit [Remote host closed the connection] 23:50:51 soveran [~soveran@186.19.214.247] has joined #scheme