00:11:18 -!- specbot [n=specbot@common-lisp.net] has quit [Read error: 60 (Operation timed out)] 00:12:27 -!- lisppaste [n=lisppast@common-lisp.net] has quit [Read error: 60 (Operation timed out)] 00:14:15 peter_12 [n=peter_12@S01060026bb736c5b.gv.shawcable.net] has joined #scheme 00:20:06 hiacre1 [n=hiacre@88-97-27-187.dsl.zen.co.uk] has joined #scheme 00:20:09 -!- hiacre [n=hiacre@88-97-27-187.dsl.zen.co.uk] has quit [Read error: 110 (Connection timed out)] 00:20:55 -!- hiacre1 [n=hiacre@88-97-27-187.dsl.zen.co.uk] has quit [Client Quit] 00:21:38 -!- wingo [n=wingo@36.Red-79-150-127.dynamicIP.rima-tde.net] has quit [Read error: 113 (No route to host)] 00:21:52 -!- peter_12 [n=peter_12@S01060026bb736c5b.gv.shawcable.net] has quit [] 00:24:45 -!- minion [n=minion@common-lisp.net] has quit [Read error: 113 (No route to host)] 00:27:44 -!- johnnowak [n=johnnowa@user-387hdp5.cable.mindspring.com] has quit [] 00:28:06 -!- mmc [n=mima@cs27122078.pp.htv.fi] has quit ["Leaving."] 00:28:52 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit ["ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.0.14/2009090900]"] 00:33:16 peter_12 [n=peter_12@S01060026bb736c5b.gv.shawcable.net] has joined #scheme 00:52:42 arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has joined #scheme 01:00:38 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 01:01:25 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 01:06:09 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 01:11:04 -!- devslashnull [n=nope@dyn-75.greentreefrog.net.au] has quit [Read error: 110 (Connection timed out)] 01:11:38 -!- reprore [n=reprore@ntkngw356150.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 01:30:24 -!- sepult [n=levgue@xdsl-87-78-103-68.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 01:35:26 -!- _nofear [n=_nofear@189.115.38.153] has quit [] 01:37:25 -!- arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has quit [Remote closed the connection] 01:37:32 arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has joined #scheme 01:39:30 sepult [n=levgue@xdsl-87-78-103-68.netcologne.de] has joined #scheme 01:39:46 -!- masm [n=masm@bl10-6-120.dsl.telepac.pt] has left #scheme 01:49:15 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit [Read error: 60 (Operation timed out)] 01:49:18 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 01:59:57 nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined #scheme 02:00:10 -!- nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has quit [Remote closed the connection] 02:02:54 nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has joined #scheme 02:05:03 elderK [n=zk@125-236-160-103.jetstream.xtra.co.nz] has joined #scheme 02:08:52 -!- schoppenhauer [n=christop@unaffiliated/schoppenhauer] has quit [] 02:42:19 -!- rgrau_ [n=user@14.Red-193-152-161.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 02:42:37 -!- nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has quit [Remote closed the connection] 02:43:04 nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has joined #scheme 02:43:13 rgrau_ [n=user@14.Red-193-152-161.dynamicIP.rima-tde.net] has joined #scheme 02:50:39 copumpkin [n=copumpki@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 02:53:58 davazp [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has joined #scheme 03:00:01 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Connection timed out] 03:03:09 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 03:05:05 echo-area [i=herbert@222.130.203.170] has joined #scheme 03:15:51 -!- peter_12 [n=peter_12@S01060026bb736c5b.gv.shawcable.net] has quit [] 03:22:05 Daemmerung: that falls into the category of "too cute by half" 03:26:41 johnnowak [n=johnnowa@user-387hdp5.cable.mindspring.com] has joined #scheme 03:26:56 reprore [n=reprore@ntkngw356150.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 03:29:01 -!- reprore [n=reprore@ntkngw356150.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Client Quit] 03:30:20 *elly* is trying to figure out the nicest way to have unit tests for each module 03:30:35 -!- echo-area [i=herbert@222.130.203.170] has quit [Remote closed the connection] 03:30:46 echo-area [i=herbert@222.130.203.170] has joined #scheme 03:42:53 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 110 (Connection timed out)] 03:44:23 elly: Define a test-suite that is exported inside of each module? 03:45:06 hrm 03:45:07 yeah 03:45:49 is there a naming convention for interfaces? 03:52:23 -!- echo-area [i=herbert@222.130.203.170] has quit [Remote closed the connection] 03:52:29 tjafk [n=timj@e176206113.adsl.alicedsl.de] has joined #scheme 03:52:38 echo-area [i=herbert@222.130.203.170] has joined #scheme 03:52:47 elly: What do you mean by interfaces? 03:52:58 '(interface ...) 03:52:59 ' 03:53:06 (they are actually more or less useless, so... 03:53:07 ) 03:53:12 I keep forgetting to close things today, sigh 03:53:46 -!- blackened` [n=blackene@ip-89-102-22-70.karneval.cz] has quit [] 03:54:47 I'm still not sure I understand what you are trying to say. 03:54:59 it is okay, I was being dumb 03:55:12 plt has a construct called INTERFACE which is for defining interfaces for classes to follow 04:02:10 -!- sepult [n=levgue@xdsl-87-78-103-68.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 04:03:26 sepult [n=levgue@xdsl-87-78-103-68.netcologne.de] has joined #scheme 04:03:39 mwuh... working with filesystems sucks 04:03:51 everything has to be setuid to do anything, and I can't set a scheme script to be setuid. 04:04:15 -!- sepult [n=levgue@xdsl-87-78-103-68.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 04:04:18 make a setuid C program that runs it 04:06:52 But that's the thing is practically everything needs to run setuid. Can't mount, can't map, can't even inspect loopbacks. 04:07:08 so it pretty much just turns into a C program. 04:07:13 can't inspect loopbacks? oO 04:07:27 yeah... 04:07:48 $ /sbin/losetup -f => losetup: no permission to look at /dev/loop 04:08:30 -!- tjaway [n=timj@e176197179.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 04:10:12 synx: Um, are you sure your running this from an user that has permission. There is no reason to setuid it. Just make sure that the correct user runs it. 04:10:48 Generally speaking, you don't want to setuid things that don't require it, and if you need to do that kind of stuff, then chances are good you shouldn't be running it as a normal user. 04:11:00 Anyways, no, setuid is not the answer. 04:11:13 you need to be root to use the device mapper. 04:11:19 device mapper? 04:11:22 Are you on Linux? 04:11:26 And what are you trying to do? 04:11:31 yus. 04:11:52 I'm trying to set up a tiny encrypted filesystem, so I can have a database of login passwords. 04:12:28 *arcfide* raises a curious eyebrow. 04:12:44 currently I have a text file of the account/password pairs GPG encrypted... kind of flaky... 04:12:49 Is there something wrong with an encrypted file? 04:13:01 Why, pray tell, is this flaky? 04:13:59 because if there's an error in the middle of re-encrypting the passwords to disk, all would be lost. 04:14:08 I've lost all my passwords that way before... 04:15:05 Um...so that's why you don't overwrite your old database file until you've been successful. 04:15:42 hm... 04:16:09 well this encrypted filesystem thing isn't working at all, so I guess I'll just go with reading the whole database into unencrypted memory every time. 04:16:14 Subprocess pipe reads in the passwords from the GPG file, you work with them, change them, &c. (this is itself dangerous if you don't have encrypted memory), then write to a temporary file and move that file to the other filename when it is complete. 04:16:48 Often I just want to read one password, not all of them at once. 04:16:52 synx: At some point you're going to have your passwords unencrypted in memory unless you are somehow making it possible to not have any of those in memory at any time, which isn't possible. 04:17:01 Or maybe it is, but it's very annoyingly hard. 04:17:31 And setting up an encrypted file system isn't that hard. 04:17:34 synx: make each password a separate file, encrypted under whatever key you like 04:17:37 I thought about having one file per password, but that itself is kind of a hackish sort of database. Why not just a sqlite one? 04:17:42 er 04:17:49 because sqlite is more complicated than a file system for no benefit 04:17:50 You just set it up (outside of Scheme), and then you mount it with the owner option on Linux. 04:18:24 sqlite isn't that more complicated than a file system... plus it's fast at searching and indexing. 04:18:43 it *absolutely* is 04:18:46 sync: A proper index file is also fast, and in your case.... 04:18:46 so if I wanted to say, look for a certain user account, I wouldn't have to meticulously examine each file. 04:18:46 watch this: 04:19:00 f = fopen("somepassword", "r"); 04:19:12 Ack!!!! 04:19:12 Oh, so now I need an index file, and individual files for the password accounts. 04:19:13 fgets(buf, sizeof(buf), f) 04:19:19 no, you don't need an 'index file' 04:19:21 it's called a 'directory' 04:19:26 some advanced file systems already support that 04:19:36 directories can only index by filename. 04:19:41 and you would want to index by... 04:19:42 and sqlite is a pretty advanced file system, if ya ask me. 04:20:00 sync: How many passwords and user accounts do you have? 04:20:08 I would want to index by realm and username. 04:20:19 cat realm/username 04:20:20 Oh, less than a hundred arcfide. 04:20:34 I just don't want to manually build the indexes myself. 04:20:43 the file system does that for you! 04:21:01 I'm curious, synx, what makes you think that anything outside of a single flat file is justified, do you have so little ram that you can't possible load 100 lines of a flat file into your memory? 04:21:07 elly: return all instances of the username containing the word "molly" 04:21:15 synx: ls */*molly* 04:21:24 arcfide: I just don't want to load all my passwords into unencrypted memory. 04:21:34 elly: glob is no faster than just iterating through all the files and directories. 04:21:35 synx: if you're feeling _really_ hardcore, find . -type f -iname '*molly*' 04:21:40 synx: ...so? n < 100 04:21:43 synx: speed is irrelevant 04:21:47 synx: So then don't, load them one at a time, and discard them if they aren't the right one. 04:22:31 elly: It's relevant, he's slowing himself down by trying to over-engineer a solution. 04:22:47 arcfide: that's 'speed of design', not 'speed of resulting implementation' :P 04:22:55 I just wanted to make a little database that had all the passwords and stuff. 04:23:06 the file system is exactly what you want 04:23:17 sqlite will cause you to have to use sqlite for no gain at all 04:23:43 No, the file system is overkill. Why would I need an entire file allocated for just a 6 digit password? 04:23:51 er 04:24:03 It does so much crap behind the scenes, that sqlite can actually compete with ext or xfs. 04:24:05 allocating a file is overkill... so I'm going to set up a database? 04:24:15 dude, n < 100 04:24:17 overkill doesn't matter 04:24:27 it could use 100k of space per 6-byte file and you would never, ever notice 04:24:34 But again, speed is not my problem. My problem is having efficient indexes I can search through, and not loading all the passwords at once. 04:24:44 efficient doesn't matter for small n 04:24:51 you have premature optimization syndrome 04:25:15 I could just encrypt the passwords in my sqlite database too. That'd be easy. But then anyone could tell where I have what user accounts. 04:25:37 synx: The effecient solution is to look at each password line in a single file one at a time and search through them. That *is* the efficient solution. All others are inefficient. 04:25:42 are you even seeing the lines where I'm repeating that your n is small? are we just on different planets? 04:25:51 sqlite doesn't give me speed. It gives me efficiency and abstraction. 04:26:02 efficiency of _what_? 04:26:03 efficiency?? Not Speed??? 04:26:28 synx: Hrm, you should read a paper I just wrote. There's a section in there about the evils of abstractionitis. 04:26:33 efficiency of stuff I have to write and think about. :p 04:26:49 I would do that arcfide, but it's encrypted. I'd have to decrypt the file to read through it. 04:26:58 synx: Are you telling me that a fold and a regex is more complicated and harder to think about than interfacing with a stinkin' SQLite database? 04:27:08 ... *blink* you get to think about a SQL database instead of a regular expression? 04:27:12 and that is an improvement? 04:27:23 davazp` [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has joined #scheme 04:27:26 sqlite is really simple! I don't see why everyone's so up in arms against it. 04:27:31 -!- davazp` [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 04:27:31 synx: Yeah, of course you do, you do that with a simple one line subprocess pipe. Is there something I'm missing here? 04:27:33 because it is not the right answer here 04:27:52 there are a lot of things for which sqlite is the right answer 04:27:58 like when n is 10 million 04:28:21 "Hmm, I need a little database of three columns, indexed by the first two. Hmm. Sqlite is a terrible answer for that." 04:28:26 it _is_ 04:28:35 because of the magic word 'little' 04:28:51 'little' is an escape clause meaning 'do whatever means write the least code, regardless of runtime or space efficiency' 04:28:53 I don't even know if sqlite could handle 10 million records. It's not designed for large scale stuff like that. 04:29:08 You don't need a little database, you need a trivial table that is less complex than many people put into their Scheme code directly. 04:29:16 Yes, well sqlite involves me writing very little code. 04:29:36 I'd be really surprised if it involves less code than opening a file and iterating over lines 04:29:59 synx; You show me SQLite code that is small than reading a single flat file of entry lines. 04:30:11 s/small/smaller/ 04:30:38 How could I have a single flat file? I said I didn't want to read all the passwords into memory. You were saying I should use one file per password, in some sort of organized directory structure. 04:31:19 go for it 04:31:38 *arcfide* sighs. 04:32:26 (define (pass-for realm user) (read-line (open-input-file (format "~a/~a" realm user)))) <--- add crypto as appropriate 04:32:38 I told you that you should use a fold over the lines in the file, this can be done in an obvious way, having only one password entry in memory at any given time. That's a fairly strange requirement, given that if you cared about security, you wouldn't be using unencrypted memory. 04:32:49 "return all accounts for which orange is in the realm OR the user name" = */orange*help*/feck*not/orange/not*working 04:33:02 Oh, so you're saying encrypt each line elly? 04:33:09 But then I'd still have to iterate... 04:33:14 huh? each file is individually encrypted, yes 04:33:19 no... 04:33:37 meh... 04:33:52 (define (get-passwd file user) (call-with-input-file file (lambda (p) (for/or ([line (in-lines p)]) (let ([fields (regexp-split #rx":" line)]) (and (equal? user (car fields)) fields)))))) 04:34:04 eli: hi :) 04:34:12 synx: You're purposefully missing the obvious and correct solution here because you're getting hung up on things that A) don't matter, and B) um, don't matter. 04:34:14 "SELECT password FROM accounts WHERE name LIKE ? OR realm LIKE ?" 04:34:17 elly: Good morning. 04:34:26 eli: Hide. 04:34:37 *eli* puts a hat on 04:34:39 simple :p 04:34:55 synx: Okay, so now how do you grab the file, how do you encrypt it, how do you access it? 04:34:55 synx: re 'users without orange': find . -type f -a -not -iname '*orange*' 04:35:10 synx: You're wasting time, as usual, on over-abstraction, over-optimization, over-thinking, and over-other-stuff-ing. 04:35:41 It's just sqlite. What's so abstract about that! It's just a simple bare bones database. 04:35:45 A solution to the problem of dealing with a 100 user/password file is much smaller than the verbiage that was spilled talking about it. 04:35:56 eli is right 04:35:59 I am done with this 04:36:28 maybe if I encrypt each line, then encrypt the password again... meh 04:37:17 realm/user contains an integer that I then go to password/ just as if it was a database, except I'm writing my own crappy database here instead of using what already exists. 04:38:01 synx: Just use some library for encryption, which I'm sure is easy, and use that on separate strings, so you can encrypt whatever you want -- the whole file, each line by itself, or just the password field. 04:38:15 lisppaste [n=lisppast@common-lisp.net] has joined #scheme 04:38:43 I hadn't considered encrypting the password, then encrypting the file again. I'll probably do something like that... 04:38:49 -!- bgs100 [n=ian@unaffiliated/bgs100] has quit ["Leaving"] 04:39:51 minion [n=minion@common-lisp.net] has joined #scheme 04:39:58 specbot [n=specbot@common-lisp.net] has joined #scheme 04:40:15 *arcfide* facepalms.... 04:40:28 arcfide: soft-ignore! 04:41:01 synx: I know this great dialect of Scheme that is just right for you. 04:41:34 It's written by Sun, it has four letters in it, two vowels, and starts with a J. 04:41:39 is it called 'common lisp'? 04:41:41 aw, rats 04:42:05 -!- davazp [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 04:42:11 elly: No, Common Lisp is too primitve, hackish, and not efficient enough for synx. 04:42:55 be polite, arcfide :P 04:43:28 Bwuahahahahaa. 04:43:42 no, really! 04:43:45 I think we're supposed to 04:44:35 *arcfide* fits on his monocle and grabs his pipe, fits on his coat with tails, and sits down to a nice brandy. 04:44:55 *elly* giggles 04:45:19 Quite right, elly. I say, I do believe that's my poll library calling. 04:45:38 by jove, etc 04:45:46 *elly* runs out of old anglicisms 04:46:01 *Daemmerung* over-other-stuffs 04:46:09 *elly* overstuffs furniture 04:46:49 A skill you'll be glad to have someday when this Lisp thing goes the way of all other vanity. 04:47:10 I don't plan to make my living with scheme, sadly 04:47:20 What?!? 04:47:31 :P 04:47:48 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 04:48:12 Why not??? 04:48:22 there aren't many people hiring for that? 04:48:29 He's passing up a chance to be a hundredaire. A thousandaire, even. 04:48:32 and my secret love will always be C 04:48:36 Daemmerung: 'he' 04:48:48 He, she, whatevah. 04:49:01 but yes, I am passing up the opportunity to be incredibly impoverished 04:49:05 "thousandaire" -- that sounds yummy. 04:49:26 google's starting offer was _ludicrously_ generous, and I haven't even told them that Microsoft outbid them yet 04:49:55 Maybe thousandaire was overstating it, yes. 04:50:17 I am frankly astonished that 'my secret love will always be C' passed unremarked-upon :P 04:50:55 elly: In reality, many of us prefer C over something like C++, or Ruby, or...well, yeah, you get the idea. 04:51:09 :P 04:51:13 C is just fine by me, in its place. 04:52:15 We had a Programming Languages talk a little while ago that dealt with partial evaluation in Ruby. The guy is a friend of mine who wanted to play with Ruby for a bit, and basically, the first half of the talk was about all the dark corners of Ruby, to the point where I didn't know what wasn't a dark corner. And of course, someone else remarked, "I love languages where you can change everything, except . . . ." 04:59:42 MononcQc [n=Ferd@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 05:05:09 -!- MononcQc [n=Ferd@modemcable062.225-20-96.mc.videotron.ca] has left #scheme 05:20:25 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 05:20:48 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 05:21:08 -!- echo-area [i=herbert@222.130.203.170] has quit [Remote closed the connection] 05:21:19 echo-area [i=herbert@222.130.203.170] has joined #scheme 05:23:26 -!- arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has left #scheme 05:23:34 arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has joined #scheme 05:23:48 -!- Nshag [n=shag@lns-bzn-44-82-249-201-8.adsl.proxad.net] has quit ["Quitte"] 05:25:53 uman [n=uman@unaffiliated/uman] has joined #scheme 05:29:58 -!- echo-area [i=herbert@222.130.203.170] has quit [Remote closed the connection] 05:54:21 elly: MS always pays the best, because nobody brags that they work for MS 05:55:46 Adamant: heh :P 05:57:07 eh? 05:57:18 I'd think working for MS would be a pretty bright spot on a resume 05:57:29 even though MS is terrible :P 05:59:06 uman: you can maybe brag to (some) other tech employers 05:59:19 you can't brag to your friends or family 05:59:33 "I helped make Windows!" "Can you fix ..." 05:59:41 lol 06:00:04 folks that work at Linux companies or Apple still get that :P 06:00:14 for Windows even! 06:01:12 Adamant: most of my friends and family would think it was cool 06:01:20 it's not like I was raised in a family of Free Software zealots 06:01:34 uman: until you run into the Microsoft haters 06:01:43 and I don't mean Stallman fans 06:02:17 heh, pretty amazing that it's possible to make an algorithm that calculates fibonacci 10,000,000 in under 30 seconds on my machine, when the most obvious algorithm would take about 5 hours to calculate fibonacci 50 06:02:50 and a lot of your tech nerd buddies would not be impressed, even when you are working for one of the better departments of MS and they really should be 06:03:20 does MS actually make any useful products besides Office and (debatably) Visual Studio? 06:03:28 yes 06:03:58 they have little pockets of excellence 06:04:22 other times they have excellence gone wrong: e.g. XB360 06:04:28 what are some useful products besides those two? 06:04:56 uman: their mice and non-XB360 hardware stuff 06:05:16 their AV is not bad UI wise if you feel the need for AV 06:05:23 I'll give you that, MS mice seem pretty great (never used it) 06:05:25 etc. 06:05:28 what is AV? 06:05:34 AntiVirus 06:05:39 not all of them, just some of them 06:05:57 I'd like one of the higher-end MS keyboards to be honest 06:06:03 MS Research is pretty impressive 06:06:30 closest thing software has left to a Bell Labs now that Bell Labs isn't Bell Labs anymore 06:07:55 I'm too young to understand what that means 06:07:59 They're good at redistributing games, if that counts for anything 06:08:02 (born 1989) 06:08:04 if XB360 didn't overheat and RRoD everytime you looked at it sideways, you could include it on the list 06:08:23 uman: Bell Labs was responsible for Unix, C, and a lot of other important stuff 06:08:32 In that department they're probably surpassed only by Pop Cap 06:08:39 for software folks, not to mention the transistor 06:09:07 Adamant: from Unix and C to Windows and C# 06:09:18 but, then it got spun off as AT&T broke up 06:09:20 que? 06:09:28 Adamant: well, I guess Windows didn't come out of MS Research 06:09:31 but C# certainly did 06:09:32 no 06:09:40 I'm not sure about that 06:09:46 I'm pretty sure it did 06:09:57 I think C# came out of Heljberg (sp?) and team 06:10:21 also, as a "Java that sucks less", C# pretty much meets it's design goals 06:11:05 C# isn't bad 06:15:52 -!- luz [n=davids@189.122.90.116] has quit ["Client exiting"] 06:18:13 minion: chant 06:18:13 MORE CODE 06:19:32 lol 06:19:35 -!- nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has quit ["Leaving."] 06:19:58 nutmegmagi [n=swalters@pool-71-101-160-3.tampfl.dsl-w.verizon.net] has joined #scheme 06:25:48 -!- johnnowak [n=johnnowa@user-387hdp5.cable.mindspring.com] has quit [] 06:58:35 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 06:58:58 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 07:00:18 -!- elf [i=elf@antenora.aculei.net] has quit [Read error: 104 (Connection reset by peer)] 07:14:46 -!- rgrau_ [n=user@14.Red-193-152-161.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 07:34:46 hrm... how do I debug a type mismatch? the backtrace is useless 07:35:57 What implementation? 07:36:22 plt 07:36:33 the backtrace is literally just: foreach, toplevel 07:36:46 and the error is 'procedure application: expected procedure, given: #' 07:37:27 It helps to post up your code. 07:37:49 it is over 350 lines, and the error appears at the interaction between two modules :\ 07:38:09 I am curious what the technique is for tracking down such things in general, really 07:39:38 agh, I found it 07:39:47 extra set of parens, should've been more visually obvious 07:41:19 ((display whatever)) 07:41:24 indeed 07:42:29 proq [n=user@unaffiliated/proqesi] has joined #scheme 07:42:38 argh 07:42:47 I just realized that there is a much simpler way to write this whole thing, too 07:48:11 One way to find such problems is to add lots of printfs and see where things break. 07:48:31 Another way is to run in drscheme, which will usually point at the problem in a clear way. 07:48:59 *elly* wants to be able to type 'bt' :( 07:49:07 And yet another way is to use errortrace, which is what drscheme does, and get very verbose backtraces. 07:49:57 It's probably possible to implement a bt, but nobody cared enough to do so... 07:50:09 (Most of it is in the debegger.) 08:01:06 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 08:01:28 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 08:11:46 -!- dfeuer [n=dfeuer@wikimedia/Dfeuer] has quit [Read error: 113 (No route to host)] 08:14:35 dfeuer [n=dfeuer@wikimedia/Dfeuer] has joined #scheme 08:15:37 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 08:22:08 klutometis: Sorry, I've been sleeping :) It seems that using syntactic-closures it works: 08:22:32 (define-syntax string->function 08:22:32 (sc-macro-transformer 08:22:32 (lambda (form env) 08:22:32 (let ((str (make-syntactic-closure env '() 08:22:32 (string->symbol (eval (cadr form)))))) 08:22:33 str)))) 08:23:46 Looks like PHP 08:24:42 Yes, it still uses eval, I didn't find the way to avoid it :( 08:25:01 Belaf: That runs 'eval' in the expand time environment, doesn't it? 08:25:26 Well, yes, if I understand it correctly... 08:25:34 Belaf: What's that supposed to do? 08:25:44 PHP had create_function($str) at some point 08:26:02 (Hooray dynamic scoping) 08:26:28 I'd like to refer to an already defined function by composing its name, e.g.: 08:26:43 (let ((fn (lambda () 'hey-now!))) ((string->function (string-append "f" "n")))) 08:26:43 hey-now! 08:26:52 -!- Modius [n=Modius@cpe-70-123-130-159.austin.res.rr.com] has quit [Read error: 110 (Connection timed out)] 08:27:13 Ah, well, that's easy. 08:27:17 Now, in my case I didn't need to use it with lexically defined functions, but that's the idea 08:27:30 And no, you don't need define. 08:27:41 Is there an easier way? 08:28:47 Yes, hang on. 08:28:52 I guess here it's considered blasphemy, but I was looking for something like the ## operation of C preprocessor... 08:28:58 :) 08:30:58 arcfide pasted "string->identifier" at http://paste.lisp.org/display/93194 08:31:02 Belaf: Voila. 08:33:10 Of course, if you have the string components of the name, then you coudl just type the name yourself, and it would be much easier. 08:34:40 Oh, thanks. I've seen something similar in a thread in plt mailing list I've been pointed to yesterday, but it uses syntax-case, which I still don't understand... is it possible to write the same thing in syntax-rules or syntactic-closures? 08:35:06 Belaf: You can't do it with syntax-rules, and I don't use syntactic-closures, so I wouldn't know. 08:35:16 The problem is that this is kind of an useless macro. 08:35:32 If you have the raw strings to use in the macro, then you could just append them yourself and avoid it altogether. 08:35:45 Oh, so maybe this is the interesting thing that I need to understand :) 08:36:38 The question is why you would want to do this? The only interesting case is if you expect it to somehow reference variables. 08:36:57 In this case, you can't avoid using EVAL, and you'd probably could do it with EVAL. 08:37:11 Sorry, I meant you could probably do it with syntax-rules. 08:37:44 Belaf: what you need to think about is whether you want this to work: (let ((fn (lambda () 'hey-now!))) ((string->function (string-append foo "n")))) 08:38:07 cky_ [n=cky@h-98-105-62-26.ip.alltel.net] has joined #scheme 08:38:17 Drat, you beat me to the example, eli. :-) 08:38:24 Well, I was trying to make a macro to shorten the code that repeatedly access a series of "getters" to a structure, so I wanted to build the names by a macro. 08:38:33 -!- cky [n=cky@h-98-105-16-46.ip.alltel.net] has quit [Nick collision from services.] 08:38:35 -!- cky_ is now known as cky 08:38:45 Belaf: Do you have an use case? 08:39:08 IOW, do you have some code you can paste that shows the current repeated access and the way this macro eases this? 08:39:33 arcfide: BTW, there is some use for a macro like the one you posted -- if you use some definitions in the syntax phase. 08:39:47 And that makes it very close to the CPP `##' thing. 08:39:54 (Or at least to how it's used.) 08:40:08 Oh really? 08:40:24 What do you mean by using some definitions in the syntax phase? 08:40:33 rudybot: eval (version) 08:40:34 eli: your scheme sandbox is ready 08:40:34 eli: ; Value: "4.2.2" 08:40:45 rudybot: eval (require unstable/syntax) 08:40:45 eli: error: eval:1:9: unstable/syntax: standard-module-name-resolver: collection not found: "unstable" in any of: (#) in: unstable/syntax 08:40:49 Bah. 08:40:51 Wow, you write too fast! :) Give me a moment to put things together... 08:43:10 arcfide: Anyway, it's something that would use local-expand, or something similar to that. 08:44:26 eli: Oh, yes, while you're here, what's the PLT equivalent of Chez's 'meta' form? Something that makes this work: (let () (meta define z 5) (define-syntax x (lambda (y) z)) (x)) => 5. 08:44:43 My PLT docs navigation skillz are . . . um . . . lacking. 08:45:27 Here is my original attempt, if it makes a good use case, I don't know :) : http://paste.lisp.org/+1ZWR 08:46:09 Before somebody says it... "it looks like visual basic!" 08:47:49 arcfide: My guess is (begin-for-syntax (define z 5)), or (define-for-syntax z 5) 08:48:24 Seriously, I'm just interested in understanding what can be done with macros, and I'll try to understand the syntax-case ones. 08:48:59 Belaf: So you already have functions like SDL_VideoInfo.get_hw_available defined? 08:49:23 Belaf: Why do you need to use `eval' then? 08:49:35 Yes, they come from the ffi layer. 08:49:57 Belaf: Then just import them with a shorter name if you are tired of typing the prefix. 08:50:07 eli: I've been scared by the plt thread I've been pointed to yesterday ;-) 08:50:44 wingo [n=wingo@36.Red-79-150-127.dynamicIP.rima-tde.net] has joined #scheme 08:50:46 Belaf: I'd also just use a procedure for the write-into-field. 08:51:19 arcfide: yes, I see 08:51:36 However, you could play with writing a 'define-prefixed' macro or something like: 08:53:26 Anyway, my use case is just an example, and I was now interested in understanding how to use a macro for that. Your syntax-case example looks like a solution for it, I'll try to understand it. Thanks 08:54:03 I also understand that for my use case, instead, I should try to avoid the problem altogether... 08:54:19 Back later. 08:54:31 Belaf: ping? 08:56:56 Belaf: When you return, check out http://tmp.barzilay.org/x.ss 08:57:15 Belaf: It's not something that should be scary in any way... 09:00:14 -!- wingo [n=wingo@36.Red-79-150-127.dynamicIP.rima-tde.net] has quit [Read error: 60 (Operation timed out)] 09:02:10 Belaf: You can also play with the annotations that I have made to your paste. 09:02:40 Belaf: If you already know how to use Syntax-rules, it isn't very hard to use syntax-case at all. There are couple of extra things you learn, and that's about it. 09:05:36 elf [i=elf@antenora.aculei.net] has joined #scheme 09:07:58 pbusser [n=pbusser@ip138-238-174-82.adsl2.static.versatel.nl] has joined #scheme 09:10:48 Bah, Gmane seems to be choking with the ikarus mailing list. It doesn't like me sending mail to it. Oh well. 09:11:04 I didn't really want to send that email anyways. :-) 09:16:20 -!- phax [n=phax@unaffiliated/phax] has quit [Read error: 110 (Connection timed out)] 09:17:07 phax [n=phax@unaffiliated/phax] has joined #scheme 09:20:05 eli & arcfide: thanks for the examples, I've got something to learn here :) 09:21:34 they still both use syntax-case, though, the reason I avoided them till now is that I'm playing with chibi-scheme and it doesn't seem to provide them. 09:22:58 eli: what the plt thread scared me about was the use of eval, it seemed to be considered bad practice in any case. So I tried to find another way. 09:24:01 syntax-case is r6rs 09:25:06 ...blah, misread 09:27:13 Disregard that last line... misreading myself misreading syntax-case for syntax-rules 09:31:12 :) Hey there people! 09:34:13 Jafet: so your first line is ok, I think it makes sense, chibi is r5rs afaik 09:35:09 Apparently it's as powerful as defmacro. I should study it at some point 09:40:37 -!- proq [n=user@unaffiliated/proqesi] has quit [Read error: 110 (Connection timed out)] 09:48:47 Edico [n=Edico@unaffiliated/edico] has joined #scheme 09:55:11 -!- pbusser [n=pbusser@ip138-238-174-82.adsl2.static.versatel.nl] has quit ["Client Quit"] 09:57:04 -!- MichaelRaskin [n=MichaelR@195.91.224.225] has quit [Remote closed the connection] 09:57:57 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 10:08:01 Jafet: Are you talking about defmacro and syntax-case being of equal power? 10:08:15 Well, are they? 10:08:30 I don't know. 10:08:32 hiacre [n=hiacre@88-97-27-187.dsl.zen.co.uk] has joined #scheme 10:08:59 Jafet: I would actually argue that syntax-case is more powerful than define-macro because it allows you to express true hygiene and referential transparency. 10:09:19 Isn't that possible too in CL? 10:09:23 No. 10:09:28 Not with define-macro. 10:09:37 At least, I haven't seen it. 10:09:49 I thought you could if you used helpers like gensym 10:10:22 Basically, while you can ensure that the identifiers generated by a macro are unique, you can't ensure that the identifiers upon which your macro relies will actually be bound to the values you expect. 10:10:39 That's true 10:10:55 syntax-case can control the environment of the expansion? 10:11:57 Jafet: Well, no more than any other procedure can, but if you put an 'if' expansion in a macro and in the scope of that macro the 'if' refers to the normal Scheme 'if', you can be sure that when someone runs that macro, the Scheme 'if' is the one that will be used. 10:12:43 So it enforces lexical scoping. 10:12:50 epiko [n=epiko@softbank219174119031.bbtec.net] has joined #scheme 10:13:08 -!- epiko [n=epiko@softbank219174119031.bbtec.net] has left #scheme 10:13:27 In a define-macro, you return a list, and the symbols are then bound to identifiers in the environment of the call site, which makes it impossible to ensure the bindings of any of the free variables that you use in your macro. 10:14:32 A proper Scheme macro, on the other hand, ensures that the result of expanding a macro is actually a syntax object, which not only carries with it the symbolic representation of some identifier, but also its wraps and therefore, it's binding, so that you are guaranteed some very important things about the macro expansion. 10:15:48 mmc [n=mima@cs27122078.pp.htv.fi] has joined #scheme 10:16:37 If I'm reading that right, then neither macro system is strictly more "powerful" in that it can express everything that can be done in the other. Rather syntax-case binds symbols lexically, while defmacro binds them where they are used. 10:31:27 xwl [n=user@123.115.125.156] has joined #scheme 10:38:52 arcfide: I've added an annotation which shows a version of your rename macro using syntax-closures. It seems to work, afact 10:39:18 ops, forgot the url: http://paste.lisp.org/+1ZWR/3 10:40:01 Jafet: You can't express in defmacro a macro that uses if that will behave appropriately in the following call site: (let ([if (lambda () ---)]) (my-macro ---) ---). 10:40:32 Moreover, say I rebind the 'if' value and want to use this value and the original 'if' form in the same macro. I can't do this. 10:40:45 My question is (and was): are there defmacros which cannot be equivalently stated using syntax-case? 10:40:59 No. 10:41:18 Ok, I think I see why. Thanks for the (long) clarification 10:41:51 Jafet: You can't simply define define-macro using syntax-case, and voila. 10:42:26 Roughly speaking, define-macro is a special case of syntax-case where it calls a procedure on a a form datum and then wraps the returned form using the call site wraps. 10:42:30 There, I meant macros defined using defmacro 10:43:23 Belaf: What if I redefine 'define' at the call site? 10:43:53 uhm... let me try... 10:44:55 (let ([define 'something]) (rename x "def" "ine") x) => ??? 10:45:58 Or maybe a better test might be (let-syntax ([define (syntax-rules () [(_) 5])]) (rename x define) (x)) => ??? 10:46:59 Ack, (rename x define) should be (rename x "def" "fine") there. 10:47:07 Bah, s/fine/ine/ 10:47:08 Psh. 10:50:11 Belaf: How did it go? 10:51:16 Assuming I pasted correctly: 10:51:19 (let-syntax ((define (syntax-rules () ((_) 5)))) (rename x "def" "ine") (x)) 10:51:27 ERROR on line 12: invalid use of syntax as value: define 10:52:12 Okay, as a different test, replace "def" "ine" with any random unary procedure. 10:53:39 Belaf: Also, I've annotated your paste with a different rename macro, since generally the first one I wrote wouldn't work the way you would expect. 10:53:40 Uhm... (let-syntax ((define (syntax-rules () ((_) 5)))) (rename x "squ" "are") (x)))) 10:53:49 ERROR on line 18: not enough args for opcode: (x) 10:54:34 Belaf: Okay, sorry, I mispoke, what about a thunk? Unary procedures should give you an error. 10:57:04 Sorry, what do you mean by a thunk? what shoul it replace in the (let-syntax ...) line? 10:57:39 (let ([y (lambda () 7)]) (let-syntax ([define (syntax-rules () [(_) 5])]) (rename x "" "y") (x))) 10:58:41 bombshelter13b [n=bombshel@76-10-149-209.dsl.teksavvy.com] has joined #scheme 10:59:35 (let ((y (lambda () 7))) (let-syntax ((define (syntax-rules () ((_) 5)))) (rename x "" "y") (x))) 10:59:35 ERROR on line 26: not enough args for opcode: (x) 10:59:59 I need to translate all the '['s :-) 11:00:49 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 60 (Operation timed out)] 11:04:04 Hrm, now I didn't expect that. 11:07:27 Honestly I don't know what to expect ;-) 11:07:38 It should return 7. 11:08:35 Does Chibi have a way to see what an expression expands to, with unique ids? 11:08:39 Something like 'expand?' 11:08:47 Sorry, without the question mark. 11:10:16 Well, it does work if I drop my macro: 11:10:19 > (let ((y (lambda () 7))) (let-syntax ((define (syntax-rules () ((_) 5)))) (y))) 11:10:19 7 11:10:28 so the macro is broken, I guess 11:11:20 There's macroexpand 11:11:22 What if you don't drop your macro but drop the define in the let-syntax. 11:11:25 ? 11:11:41 In other words: (let ([y (lambda () 7)]) (rename x "" "y") (y))? 11:12:11 Belaf: I am curious to see the output of the macroexpand. 11:12:31 > (macroexpand '(rename x "" "y")) 11:12:31 WARNING: reference to undefined variable: y 11:12:31 (set! x y) 11:13:00 or you meant using it on the whole (let-syntax ...) ? 11:13:04 No no, You'd need to put in the entire LET expression that is giving you trouble. Also, does running the above give you 7? 11:14:25 hotblack23 [n=jh@p4FC5A5A1.dip.t-dialin.net] has joined #scheme 11:15:11 Now, with my rename macro: 11:15:24 > (let ((y (lambda () 7))) (rename x "" "y") (y)) 11:15:24 ERROR: undefined variable: y 11:15:50 > (macroexpand '(let ((y (lambda () 7))) (rename x "" "y") (y))) 11:15:51 ((lambda (y.1) (set! x y) (y.1)) (lambda () 7)) 11:16:49 Okay...now what aobut the one with the define renamed? 11:17:07 The one with the let and let-syntax forms in it. 11:18:13 > (macroexpand '(let ((y (lambda () 7))) (let-syntax ((define (syntax-rules () ((_) 5)))) (rename x "" "y") (x)))) 11:18:13 ((lambda (y.1) (set! x y) (x)) (lambda () 7)) 11:18:26 I hope to have picked the right one... 11:19:05 Wow, it fails in a strange way that I did not expect. 11:19:50 But that makes sense, seeing your macro definition again. You need to wrap the old variable in a syntactic closure, too. 11:20:18 And you probably don't have to close over the environment with pre and suf. 11:21:29 Anyways, I need some sleep. 11:22:50 -!- arcfide [n=arcfide@ppp-70-246-149-137.dsl.stlsmo.swbell.net] has left #scheme 11:22:53 Yes, with your changes it seems to work :) I've got more to learn :) 11:40:13 -!- hiacre [n=hiacre@88-97-27-187.dsl.zen.co.uk] has quit ["Leaving."] 12:06:28 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 12:27:07 Belaf: what was the final solution to you problem? 12:28:24 :O so SICP doesn't teach macros! 12:28:34 what's a good book for learning them? 12:29:36 alvatar: i've often wondered the same thing, actually; and have resorted to a shit-load of ad-hoc information on the 'net 12:30:02 klutometis: and did you find any specially valuable resource? 12:30:42 The best I've found is TSPL 12:30:57 "The Scheme programming language"? 12:31:53 Jafet: that's interesting; been meaning to pick that up 12:32:08 oh, it's on line; sweet 12:32:43 it's so nice that scheme has free good books :) 12:32:50 It's not terribly clear, but after reading about a dozen times you'll get the idea 12:33:05 Jafet: :) hehehe 12:33:31 well I hope knowledge about metaprogramming in C++/D helps 12:33:41 although it may not have anything to do 12:33:47 (no idea about macros at all) 12:39:27 alvatar: in my experience, the cognitive jump from c-macros to scheme-macros was initially non-trivial 12:39:54 or, clinging to my understanding of c-macros proved somehow retrograde to understanding scheme macros 12:40:06 I'll agree with that 12:40:08 might be better to tabula-rasa yourself 12:40:22 -!- bombshelter13b [n=bombshel@76-10-149-209.dsl.teksavvy.com] has quit [] 12:40:26 masm [n=masm@bl7-204-6.dsl.telepac.pt] has joined #scheme 12:41:29 attila_lendvai [n=ati@catv-89-134-66-143.catv.broadband.hu] has joined #scheme 12:45:42 C macros are more similar to Common Lisp macros -- a transformation on tokens 12:46:24 klutometis: for the original macro I couldn't find anything not using eval, for the alternative rename solution suggested by arcfide I added an annotation here: http://paste.lisp.org/display/93195#5 12:50:10 Guys, I have a question wrt to lambda, set! and define :) 12:50:12 http://paste.lisp.org/display/92180#12 12:50:16 set annotation 11 and 12 :) 12:50:28 output of the first is bye, output of the second is hey. 12:50:47 I understand that the second creates a lambda... that closes over the definition of func? 12:50:59 I don't understand why the first doesn't close over. 12:51:05 since, it winds up being a lambda anyway? 12:52:53 Not exactly. 12:53:44 weird thing is, if you set! func, instead of re-defining it, in the second, the answer is the same as the first. 12:54:09 :) What am I missing here, Jafet? 12:54:17 *elderK* goes back to r5rs for insights 12:55:26 In #11, func is redefined. 12:55:53 Adding a new definition there is equivalent to set!-ting over the old one. 12:56:05 In #12, two functions are created and bound to func. 12:56:36 (define (func) ...) == (define func (lambda () ...) ) ?? 12:58:21 elderK: Neither is a valid r5rs program. 12:58:49 really, masm? 13:01:46 R5RS's internal definitions are macro-expanded to letrec definitions and you cannot have the same variable defined multiple times by one letrec. 13:01:51 wingo [n=wingo@36.Red-79-150-127.dynamicIP.rima-tde.net] has joined #scheme 13:02:20 -!- xwl_` [n=user@147.243.236.60] has quit [Remote closed the connection] 13:02:36 I thought they're expanded to set! calls, like top-level definitions 13:02:49 aye, I just found the passage masm, 13:02:50 "Just as for the equivalent letrec expression, it must be possible to evaluate each expression of every internal def- inition in a body without assigning or referring to the value of any variable being defined." 13:02:54 Also, that set! before the second define is not allowed. 13:03:54 because the defines have to be at the top of the body, right? 13:04:22 Right. 13:04:29 What implementation are you using? 13:04:43 Chicken 13:04:52 I'm just doing some research for my own implementation attempt :) 13:05:06 (Was pondering what would happen in these cases, so, I wanted to see if chicken allowed them, how it reacted) 13:05:10 (and it seems we've found a bug in chicken!) 13:06:04 xwl_` [n=user@147.243.236.60] has joined #scheme 13:06:27 It's not a bug. It is just the behavior that deviates from r5rs. 13:06:50 In that respect, r6rs is saner that r5rs. See letrec* 13:07:22 For my definition of "saner", of course. :) 13:07:25 :) Cheers masm. 13:07:29 Man, that was highly elucidating. 13:09:02 Your WM reminds me of FVWM 13:09:10 or Blackbox 13:09:19 In the background, the program seems to be Qt based. 13:13:52 pbusser [n=pbusser@82.174.238.138] has joined #scheme 13:23:46 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit [Read error: 110 (Connection timed out)] 13:37:21 *elderK* prints out r5rs 13:40:07 blackened` [n=blackene@ip-89-102-22-70.karneval.cz] has joined #scheme 13:46:42 -!- bytecolor [n=user@32.153.226.142] has quit [Read error: 60 (Operation timed out)] 13:52:17 -!- pbusser [n=pbusser@82.174.238.138] has quit [Read error: 104 (Connection reset by peer)] 13:52:58 pbusser [n=pbusser@ip138-238-174-82.adsl2.static.versatel.nl] has joined #scheme 13:57:35 _nofear [n=_nofear@189.115.38.153] has joined #scheme 14:13:31 choas [n=lars@p5B0DAD31.dip.t-dialin.net] has joined #scheme 14:14:35 -!- _nofear [n=_nofear@189.115.38.153] has quit [Read error: 113 (No route to host)] 14:23:02 bytecolor [n=user@32.152.131.217] has joined #scheme 14:25:01 seamus_android [n=scratch@host86-180-146-119.range86-180.btcentralplus.com] has joined #scheme 14:25:48 bgs100 [n=ian@unaffiliated/bgs100] has joined #scheme 14:26:12 is it sane, possible, ok, to give a closure a `type'? (define (foo) (let ((x 0)) (lambda () x))) and then somehow create (foo? obj) 14:27:00 Somehow create? 14:28:03 There are scheme extensions/SRFIs that let you create new types. 14:28:18 oh? hrm 14:28:42 luz [n=davids@189.122.90.116] has joined #scheme 14:29:33 ah, but you are referring to records, yes? 14:29:38 That is one. 14:29:47 What are you trying to do? 14:30:06 conquer the world! 14:30:22 slxix [i=r@li144-113.members.linode.com] has joined #scheme 14:30:25 hehe, well I could paste a bit of code I suppose 14:30:34 Scheme doesn't provide enough primitives. Try Common Lisp. 14:30:43 ahahah 14:31:04 I have it was ummm *too* big 14:33:25 bytecolor pasted "give a closure a type" at http://paste.lisp.org/display/93207 14:35:53 -!- elderK [n=zk@pdpc/supporter/active/elderk] has quit [Excess Flood] 14:36:10 elderK [n=zk@125-236-160-103.jetstream.xtra.co.nz] has joined #scheme 14:36:24 I was reading srfi-9 to see how they implemented record?. looks like it is storing a tag in a vector 14:37:26 -!- wingo [n=wingo@36.Red-79-150-127.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 14:37:51 It's a reference implementation 14:38:14 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 14:38:53 nod, so chicken scheme didn't necessarily use that implementation 14:39:03 It probably doesn't. 14:39:22 well, I was just trying to figure out how predicates are implemented in general 14:40:06 afaik the only think I can test against in my case is (procedure? some-grammar) 14:41:07 A predicate is a procedure that returns a boolean value 14:41:24 wingo [n=wingo@155.Red-83-35-139.dynamicIP.rima-tde.net] has joined #scheme 14:44:01 It boils down to: I need to discern between a closure created by define-grammar and a normal procedure. 14:44:21 A closure is a normal procedure 14:44:34 All normal procedures have closures. 14:44:50 right, that's the problem ;) 14:45:08 I may have to resort to wrapping up a record some how 14:48:00 bytecolor: In PLT you can have a callable record. 14:50:03 oh? see that's kind of what I'm after with my macro 14:50:03 well I've only scratched the surface on records 14:50:18 Search the documentation for prop:procedure. 14:50:39 rudybot: help 14:50:39 masm: help [], version, quote, source, seen , uptime, t8 ..., init [], eval ..., give ..., apropos ..., desc , doc , later "tell" ... 14:50:42 oh... like common lisp 14:51:05 rudybot: doc prop:procedure 14:51:06 masm: your r5rs sandbox is ready 14:51:11 masm: no docs for a current binding, but provided by: mzscheme, scheme/base, scheme 14:51:29 incubot: help 14:51:33 hum, well, I can't help you there, I'm afraid. 14:51:58 masm: so basically a symbol has an a-list attached, correct? 14:52:14 What? 14:52:30 rudybot: init scheme 14:52:31 masm: your scheme sandbox is ready 14:52:36 rudybot: doc prop:procedure 14:52:36 masm: http://docs.plt-scheme.org/reference/procedures.html#(def._((lib._scheme%2Fbase..ss)._prop~3aprocedure)) 14:52:39 There 14:52:41 . 14:52:46 heh 14:55:42 masm, well I dont think I need all that, but you did give me an idea 14:56:08 just tag the symbol with a property list 14:58:17 it's not portable, but the code I'm writing is chicken-centric any way ;) 15:03:57 reprore [n=reprore@ntkngw356150.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 15:05:30 Riastradh [n=riastrad@tissot.csail.mit.edu] has joined #scheme 15:17:11 why do we speak of Lisp having different "dialects 15:17:13 "? 15:17:30 We wouldn't say that C++ is a "dialect" of C, but a similar yet different language 15:17:57 C++ is hardly similar to C. 15:18:19 Jafet: what are you talking about? C++ is very similar to C. 15:18:30 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 15:18:46 it only adds three features 15:18:52 :P 15:18:55 Name them. 15:19:56 I was exaggurating when I said it only adds three, but I would contend that there are three major ones: classes, templates, and exceptions 15:20:04 I guess the new standard library should also be counted 15:21:12 "I may have exaggerated the slightness." 15:24:48 masm: thanks, I have a working (grammar? foo) now ;) 15:27:15 onox [n=onox@kalfjeslab.demon.nl] has joined #scheme 15:27:23 anyone here who knows how to use sqlite.ss? 15:27:30 from the plt planet? 15:32:39 Sergio` [n=Sergio`@a89-152-187-193.cpe.netcabo.pt] has joined #scheme 15:48:42 (syntax-alias fn lambda) (syntax-alias def define) makes my scheme code look substantially prettier 15:49:51 -!- Lemonator [n=kniu@pool-71-105-70-131.lsanca.dsl-w.verizon.net] has quit ["Leaving"] 15:49:57 bytecolor: Does chicken have weak hash tables? 15:51:51 -!- Narrenschiff [n=ritchie@xolotl.plus.com] has quit [] 15:53:05 eli I dont know 15:53:35 bytecolor: It would be a good idea to look for them, and to use a weak hash table keyed on the closure you want to mark. 15:53:42 I'm using srfi-69 15:54:01 That's the common way to fake functions as structs. 15:54:12 ah 15:58:19 schoppenhauer [n=christop@unaffiliated/schoppenhauer] has joined #scheme 15:58:31 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 16:00:39 -!- wingo [n=wingo@155.Red-83-35-139.dynamicIP.rima-tde.net] has quit [Read error: 113 (No route to host)] 16:01:05 muaha, writing this test suite is the smartest thing I've done so far in my scheme adventures ;) 16:01:59 did my edits screw something up? dunno, run the test suite and see 16:02:07 mmmulani [n=mmmulani@taurine.csclub.uwaterloo.ca] has joined #scheme 16:02:25 in drscheme is it possible to have the definitions to the left of the interactions? 16:02:28 instead of on top 16:03:37 bytecolor, why do you want applicable records? 16:03:51 That is, what do you want to do with them? 16:04:06 Hey people. 16:04:26 Riastradh, umm errrr, see my last paste url! 16:04:51 the code should explain better than I can 16:06:49 mmmulani: Preferences -> General -> "Put the interactions window besides ..." 16:07:15 bytecolor: That conclusion is valid regardless of what language you happen to use. 16:07:55 eli: sweet! 16:08:23 bytecolor, what URI is that? 16:08:41 http://paste.lisp.org/display/93207 16:09:20 I found a fix, I just use the p-list of the name of the grammar 16:09:53 which chicken supports in the core 16:09:54 Why don't you just introduce a new record type for grammars, which has one field, for a hash table, and define a procedure to fetch an entry out of the hash table, rather than representing grammars as that procedure? 16:10:46 nod, that was one consideration 16:11:39 less syntax, I suppose 16:11:42 That way, the use of grammars isn't tied to any particular representation of them, and as a bonus you don't need to futz with global databases (plists) or hanging auxiliary data on procedures. 16:12:09 (a-grammar 'start) => start rule (a-grammar 'skipper) => skipper 16:12:29 yes, yes 16:12:30 Compare (grammar-rule a-grammar 'start). 16:12:44 too much syntax ;) 16:12:49 ahaha 16:14:22 :) Hey Riastradh, I finalyl clicked to CPS :D 16:16:39 Riastradh: that *would* give me the predicate for free, eh 16:18:12 so many choices, that's what I love about scheme though, not much it can't do ;) 16:18:24 -!- schoppenhauer [n=christop@unaffiliated/schoppenhauer] has quit [] 16:18:41 plus I'm a scheme n00b, much to learn 16:36:12 -!- onox [n=onox@kalfjeslab.demon.nl] has left #scheme 16:50:02 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 17:11:09 -!- alvatar [n=alvatar@57.22.222.87.dynamic.jazztel.es] has quit [Read error: 60 (Operation timed out)] 17:15:17 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 17:25:06 mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 17:25:49 Copter [i=Copter@bzq-79-180-13-225.red.bezeqint.net] has joined #scheme 17:26:47 -!- Narrenschiff [n=ritchie@xolotl.plus.com] has quit [] 17:27:50 a-s [n=user@93.112.122.84] has joined #scheme 17:31:00 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 17:33:06 -!- Narrenschiff [n=ritchie@xolotl.plus.com] has quit [Client Quit] 17:37:26 -!- Riastradh [n=riastrad@tissot.csail.mit.edu] has quit [Remote closed the connection] 17:38:56 -!- seamus_android [n=scratch@host86-180-146-119.range86-180.btcentralplus.com] has quit ["Ex-Chat"] 17:41:00 uman: find and read a paper by Steele and Gabriel, "The Evolution of Lisp." You will then know more than you want to know about the balkanization of Lisps. 17:42:18 f***ing People's Front of Judea 17:42:20 splitters 17:43:41 Campaign for a Free Galilee! 17:44:55 when I was little, I thought my uncle's worship of the Goons, and "Beyond the Fringe", was odd. Now that I and all my contemporaries worship Monty Python, I start to understand. 17:44:59 rudybot: eval (do ((i 0 (+ i 1))) ((= i 10)) (display "Romans, go home!")) 17:45:00 mejja: your sandbox is ready 17:45:00 mejja: ; stdout: "Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!Romans, go home!" 17:45:12 *offby1* corrects mejja's Latin grammar 17:45:25 mejja: actually, I'm impressed that you know how to use "do". I've never learned. 17:46:37 I'm impressed that he correctly uses the vocative case. 17:48:18 -!- attila_lendvai [n=ati@catv-89-134-66-143.catv.broadband.hu] has quit [Read error: 60 (Operation timed out)] 17:50:48 cky_ [n=cky@h-98-133-53-41.ip.alltel.net] has joined #scheme 18:04:23 Daemmerung++ 18:04:34 actually as much I love teh Pythons 18:04:55 their stuff has gotten a little formulaic among the geek community 18:06:49 formulaic? What does that mean? 18:08:07 -!- cky [n=cky@h-98-105-62-26.ip.alltel.net] has quit [Read error: 110 (Connection timed out)] 18:10:13 -!- copumpkin [n=copumpki@c-24-63-67-154.hsd1.nh.comcast.net] has quit [] 18:10:29 unless that's a Monty Python reference I am not getting, it means 'like a formula, dry, routine, overused' 18:10:48 if that is a Monty Python reference, pbusser++ 18:11:13 It's not a MP reference. 18:13:01 pbusser: when certain things get brought up in geek conversation, you get to the point where you know where and what Monty Python reference someone is going to use if you are among geeks that really like Monty Python 18:13:17 part of good humor is unexpectedness 18:14:39 like everything else geek, xkcd has done a comic on this, so sadly, citing xkcd in the middle of a online geek conversation is probably next on the list to become formulaic 18:14:41 so, you don't mean the humor is formulaic, you mean that it's overused by nerds 18:14:57 the overuse is formulaic maybe 18:15:06 davazp [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has joined #scheme 18:15:37 Adamant: take this instead then: http://www.theonion.com/content/node/25793 18:15:37 cky [n=cky@h-98-133-53-41.ip.alltel.net] has joined #scheme 18:16:16 zbigniew: this is more my speed: http://www.theonion.com/content/video/vh1_reality_show_bus_crashes_in (NSFW) 18:16:50 Adamant: somewhere I read a good essay about the irony of: a) the Pythons being iconoclasts in their day; versus b) how all us nerds treat them as icons themselves 18:17:13 offby1: that essay is already summed up on xkcd 18:17:19 in a picture 18:17:31 I'll check it out 18:18:28 Adamant: I always say "Ni!" when geeks bring up Montey Python. But for some reason, that doesn't stop them... 18:18:30 Adamant: even 25-30 years ago, that was still true. 18:19:03 But I have ROMANES EVNT DOMUS burned into my soul. It's like call-and-response, like a liturgy to me. 18:19:16 Daemmerung: learned Latin as a kid? 18:19:22 Adamant: y'know ... I think that strip is what I was (oh so vaguely) remembering. 18:19:25 I meant DOMVS of course 18:19:30 :P 18:19:31 Adamant: yes. 18:19:48 Daemmerung: all is forgive, kyrie eleision 18:19:52 except that's Greek 18:19:56 but close enough 18:20:03 *forgiven 18:20:08 Christe elision 18:20:47 ("Christ elision" being what has happened to Christmas over the last 50y....) 18:20:56 *rimshot* 18:21:04 *sad trombone* 18:21:04 leaving us just with "mas" 18:21:07 Merry mas! 18:21:14 *Daemmerung* celebrates Mas 18:21:22 excuse me, you're interrupting my Cashmas 18:21:25 :P 18:21:26 The Latin Mas? 18:21:29 Ite, missa est. 18:21:29 there will be no elision in here, the true geek does not use contractions 18:21:42 riastradh and chandler certainly don't :) 18:21:44 offby1: No mas 18:21:49 ¡ay! 18:22:32 do not make me come back there, i will pull this car over post-haste 18:23:24 post hoc ergo propter hoc even 18:25:09 *Daemmerung* celebrates Cashmas by cueing up "Wanted Man" 18:25:57 I'm the Santa in black 18:26:16 -!- Copter [i=Copter@bzq-79-180-13-225.red.bezeqint.net] has quit [] 18:27:31 Copter [i=Copter@bzq-79-179-40-35.red.bezeqint.net] has joined #scheme 18:32:53 cky__ [n=cky@h-166-166-104-194.ip.alltel.net] has joined #scheme 18:35:26 -!- cky_ [n=cky@h-98-133-53-41.ip.alltel.net] has quit [Read error: 110 (Connection timed out)] 18:38:00 copumpkin [n=copumpki@dhcp-212-196.cs.dartmouth.edu] has joined #scheme 18:43:12 -!- cky [n=cky@h-98-133-53-41.ip.alltel.net] has quit [Read error: 110 (Connection timed out)] 18:43:55 cky [n=cky@h-98-133-70-181.ip.alltel.net] has joined #scheme 18:50:34 While driving, it's quite simple to persuade your passengers to do what ever you ask. Just turn to them with a crazed look in your eyes and say "I'll kill us all" and give the wheel an ever so slight jerk. 18:50:44 -!- Copter [i=Copter@bzq-79-179-40-35.red.bezeqint.net] has left #scheme 18:52:05 that only works if one of your passengers isn't both suicidal and homicidal 18:52:19 ahah 18:52:30 excuse me, that only works if ALL of your passengers... 18:52:42 corner case 18:53:19 but an important one, consider suicide by cop in the US and suicide by autobahn in Germany 18:54:01 never bet your life on you being the craziest dude in the room 18:54:33 unless the room is otherwise empty 18:55:34 that what it wants you to think 18:55:38 that's 18:55:58 I once saw this show about a guy that built porsches just for the autobahn. He would go out at like 2am to test them @ 200+ mph. 18:56:09 -!- a-s [n=user@93.112.122.84] has quit [Read error: 54 (Connection reset by peer)] 18:56:59 yeah. sadly, even stuff like Montana's "no posted speed limit" stuff will last here in the US 18:57:07 *not even 18:57:12 gahhhh 18:59:01 -!- cky__ [n=cky@h-166-166-104-194.ip.alltel.net] has quit [Read error: 110 (Connection timed out)] 19:00:15 So long as there are Eastern Senators who feel the need to control Western highways, it will be so. It nevertheless impresses me how bipartisan the asshattery is. 19:00:42 a-s [n=user@93.112.122.84] has joined #scheme 19:01:26 -!- luz [n=davids@189.122.90.116] has quit [Read error: 110 (Connection timed out)] 19:01:29 luz [n=davids@189.122.90.116] has joined #scheme 19:01:30 Daemmerung: I think even the Montanans were kind of sick of it 19:01:39 could be wrong 19:02:25 everyone decided that it was the new Autobahn, except it doesn't have the hospital density, road medical stations, and other infrastructure the Autobahn has 19:03:01 If I were picking up the pieces there, I'd be sick of it, too. 19:04:57 otho, some of the cops were just considered the real speed limit to be 90mph and fining anyone over 19:05:08 that would probably be reasonable for the situation 19:05:16 *just considered 19:05:29 *were fining 19:05:38 ok, need to stop typing, clearly. later. 19:06:24 *Daemmerung* can't drive 55, but can jog 5.5, and leaves to do so 19:07:35 The amount of Autobahn without speed limit is shrinking though. 19:09:43 pbusser: yeah, Germans were loading up their Autobahn-grade cars and having them taken out to Montana to get frisky while before Montana changed things back 19:09:59 *frisky for a while 19:10:40 pbusser: aw 19:10:58 I always wanted to drive on a no-speed-limit road 19:15:09 offby1: Just do it! 19:15:44 -!- davazp [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 19:17:31 By God, I will! 19:17:42 *offby1* buys a plane ticket to .de, and reserves a BMW 19:18:23 nice 19:18:58 offby1: http://www.nuerburgring.de/en/feel/formula-bmw-racing-experience/nordschleife.html 19:19:00 -rudybot:#scheme- http://tinyurl.com/yc8bu53 19:23:40 aack [n=user@a83-161-214-179.adsl.xs4all.nl] has joined #scheme 19:25:14 somehow that doesn't look street-legal 19:25:18 cky_ [n=cky@h-166-166-100-157.ip.alltel.net] has joined #scheme 19:26:40 -!- tonyg [n=tonyg@host238.lshift.net] has quit ["Leaving"] 19:29:17 -!- reprore [n=reprore@ntkngw356150.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 19:30:26 -!- uman [n=uman@unaffiliated/uman] has quit [Remote closed the connection] 19:30:56 -!- luz [n=davids@189.122.90.116] has quit ["Client exiting"] 19:35:52 eclugtesting [n=mona@212.33.202.124] has joined #scheme 19:36:09 -!- cky [n=cky@h-98-133-70-181.ip.alltel.net] has quit [Read error: 60 (Operation timed out)] 19:41:06 -!- eclugtesting [n=mona@212.33.202.124] has left #scheme 19:50:16 Lemur [n=ajmorgan@96.18.164.16] has joined #scheme 19:50:59 -!- bytecolor [n=user@32.152.131.217] has left #scheme 19:52:54 offby1: it is not as nice as you would think 19:53:08 how do I get the interpreter to return a floating point number, e.g. return ".6" for (/ 3 5) rather than returning "3/5" 19:57:01 -!- nowhere_man [n=pierre@lec67-4-82-235-57-28.fbx.proxad.net] has quit [Read error: 113 (No route to host)] 19:57:46 Lemur: that depends on the scheme you are using 19:58:59 I'm currently using plt scheme (mzscheme) 20:02:16 lol, I needed to use a floating point number as one of the numbers, say (/ 3 5.0) 20:02:27 should have guessed it sooner 20:06:24 onox [n=onox@kalfjeslab.demon.nl] has joined #scheme 20:06:46 how can I format current-seconds to day/month/year? 20:07:22 srfi-19 20:08:39 offby1: http://www.proformanceracingschool.com/ (at the old SIR track) will get that out of your system 20:09:32 onox: (require scheme/date) 20:12:41 ok, thx, it works 20:16:34 Poeir [n=Poeir@c-98-228-48-133.hsd1.il.comcast.net] has joined #scheme 20:18:00 Daemmerung: huh! 20:18:11 *offby1* wonders if he'd get a break on his auto insurance if he took a racing course 20:18:52 *offby1* keeps forgetting that many IRC regulars live, or used to live, in his 'hood 20:21:55 SharkBrain [n=gerard@210.48.104.34] has joined #scheme 20:25:07 -!- Belaf [n=campedel@net-93-144-17-71.t2.dsl.vodafone.it] has quit ["Leaving."] 20:25:08 It didn't exactly get speeding out of my system-- took old age to do that-- but it did make me a more competent speeder, in that I learned the behavior of my auto and my own ability to control said auto. 20:26:19 annodomini [n=lambda@c-75-69-96-104.hsd1.nh.comcast.net] has joined #scheme 20:26:33 .oO("old age"?) 20:26:45 *offby1* considers a bout of denture-hurling 20:26:49 rudybot: seen mbishop 20:26:49 *offby1: mbishop was seen quitting in/on geeks.im three weeks ago, saying "lindbohm.freenode.net irc.freenode.net", and then mbishop was seen joining in/on #scheme three weeks ago 20:30:32 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit ["+++ killed by SIGSEGV +++"] 20:30:35 That rudybot, he gets around 20:33:57 nowhere_man [n=pierre@lec67-4-82-235-57-28.fbx.proxad.net] has joined #scheme 20:36:20 roundheels 20:37:51 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 20:39:18 visof [n=visof@41.238.232.189] has joined #scheme 20:43:00 Is Swindle's MOP similar to the AMOP? 20:54:05 schoppenhauer [n=christop@unaffiliated/schoppenhauer] has joined #scheme 20:55:15 robby [n=robby@c-68-51-72-31.hsd1.il.comcast.net] has joined #scheme 20:55:51 -!- robby [n=robby@c-68-51-72-31.hsd1.il.comcast.net] has quit [Client Quit] 20:58:04 incubot: Scientists unearthed the shells at two archaeological sites in the Murcia province of southern Spain. The team says its find buries "the view of Neanderthals as half-wits" and shows they were capable of symbolic thinking. 20:58:08 yes, only club wielding neanderthals bother with them 21:01:29 robby [n=robby@taitung.ece.northwestern.edu] has joined #scheme 21:01:40 -!- robby [n=robby@taitung.ece.northwestern.edu] has quit [Client Quit] 21:02:07 robby [n=robby@taitung.ece.northwestern.edu] has joined #scheme 21:02:13 -!- robby [n=robby@taitung.ece.northwestern.edu] has quit [Client Quit] 21:06:52 -!- onox [n=onox@kalfjeslab.demon.nl] has left #scheme 21:11:45 Nshag [n=shag@lns-bzn-24-82-64-141-214.adsl.proxad.net] has joined #scheme 21:11:58 -!- pbusser [n=pbusser@ip138-238-174-82.adsl2.static.versatel.nl] has quit ["Client Quit"] 21:14:14 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit ["ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.0.14/2009090900]"] 21:20:15 .lastlog infra 5 21:20:17 er 21:29:24 davazp [n=user@95.Red-83-55-182.dynamicIP.rima-tde.net] has joined #scheme 21:30:33 Lemur: (exact->inexact (/ 3 5)) ;=> 0.6 21:36:56 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 21:38:04 -!- choas [n=lars@p5B0DAD31.dip.t-dialin.net] has quit ["leaving"] 21:39:47 wingo [n=wingo@155.Red-83-35-139.dynamicIP.rima-tde.net] has joined #scheme 21:41:37 rudybot: eval (real->decimal-string (/ 3 5)) 21:41:39 Daemmerung: your sandbox is ready 21:41:39 Daemmerung: ; Value: "0.60" 21:41:54 rudybot: eval (real->decimal-string (/ 5 7) 20) 21:41:54 Daemmerung: ; Value: "0.71428571428571428571" 21:42:38 rudybot: doc real->decimal-string 21:42:38 *offby1: your scheme sandbox is ready 21:42:39 *offby1: http://docs.plt-scheme.org/reference/numbers.html#(def._((lib._scheme%2Fbase..ss)._real-~3edecimal-string)) 21:43:50 kewl 21:44:26 lewk 21:45:09 i am your faaaather lewk 21:46:16 what I want to know is how to print an integer with leading zeroes. 21:46:30 001 002 ... 010 ... 123 ... 21:46:47 foof has a nice "format" library that does that sorta thing 21:47:04 Use string-length and put them there yourself. Or, what offby1 said. 21:47:14 usually I just futz with the log10 to find how many digits it has... 21:47:24 onox [n=onox@kalfjeslab.demon.nl] has joined #scheme 21:47:28 is there a htmlentities() function? 21:47:29 synx: http://synthcode.com/scheme/fmt/ 21:47:40 thanks offby1 21:47:42 onox: probably not by that name. What would it do? 21:47:49 -!- aack [n=user@a83-161-214-179.adsl.xs4all.nl] has quit [Read error: 54 (Connection reset by peer)] 21:48:00 -!- Lemur [n=ajmorgan@96.18.164.16] has quit [] 21:48:20 forks PHP, apparently 21:48:25 obviously, it would htmlentity 21:48:32 Obviously! 21:49:08 *offby1* nods obviously 21:49:38 *Daemmerung* nods off 21:49:40 onox: what you want is some kind of a decoder, that takes a string, and returns a byte string with the multibyte and higher order characters HTML encoded. 21:52:08 what _I_ want is something that turns " into a ". 21:52:51 http://github.com/offby1/rudybot/commit/d126aff0930b0c7d929433e37399ee59908e4555 21:52:53 -rudybot:#scheme- http://tinyurl.com/yjeljyr 21:52:55 best I could come up with 21:52:56 offby1: I just set up a mapping from quot -> " and such, and use regexp-replace... 21:53:04 synx: pretty much what I did 21:53:07 'twas annoying though 21:53:14 yeah exactly offby1 21:53:43 It is annoying, true. I'm not sure it really works for all HTML too, because some people put a naked '&' in their HTML to represent '&' 21:54:01 http://github.com/sharkbrainguy/clean/blob/master/clean.ss I did some code that converts non-ascii characters to numeric html entities 21:54:24 of course any (strict) html validator won't validate that, but... 21:54:57 FrontPage puts custom processing logic and javascript into XML comments Dx 21:54:58 it's not beautiful, but it also handles windows-1252 characters by converting them to their best-fit unicode 21:55:42 ugh, windows-1252... 21:55:53 I know ... 21:56:28 "It's exactly like iso8859-1, except we randomly switched all the smart quotes with unprintable control characters!" 21:56:59 you can only tell the difference by visual inspection... 21:57:12 *shudder* 22:01:29 unless you're blind 22:01:54 -!- a-s [n=user@93.112.122.84] has quit [Read error: 54 (Connection reset by peer)] 22:04:27 aack [n=user@a83-161-214-179.adsl.xs4all.nl] has joined #scheme 22:05:15 eclugtesting1 [n=mona@212.33.202.124] has joined #scheme 22:05:18 offby1: how do I reset the contents of a rudybot sandbox? 22:05:27 In which case your voice reader spits out "c-o-n-t-r-o-l-c-h-a-r-a-c-t-e-r-2-2-3" 22:05:35 Daemmerung: I think just "init scheme" 22:05:36 let's see 22:05:40 rudybot: eval (define x 'crap) 22:05:42 rudybot: eval x 22:05:43 *offby1: ; Value: crap 22:05:45 rudybot: init scheme 22:05:47 *offby1: your scheme sandbox is ready 22:05:48 rudybot: eval x 22:05:48 *offby1: error: reference to an identifier before its definition: x in module: 'program 22:05:51 -!- eclugtesting1 [n=mona@212.33.202.124] has left #scheme 22:05:51 ta-da 22:05:55 Sweet. 22:06:26 rudybot: eval (require srfi/13) 22:07:00 c'mon boy, you can do it 22:07:20 I think he did it silently. 22:07:50 rudybot: eval (string-pad (real->decimal-string 45) 5 #\0) 22:07:50 Daemmerung: ; Value: "45.00" 22:08:00 oho 22:08:24 rudybot: eval (string-pad (real->decimal-string 45 1) 7 #\0) 22:08:25 Daemmerung: ; Value: "00045.0" 22:08:30 That's more like it. 22:08:46 rudybot: eval (string-pad (real->decimal-string 4500 1) 7 #\0) 22:08:47 *offby1: error: reference to an identifier before its definition: string-pad in module: 'program 22:08:51 heh 22:08:55 well anyway. 22:08:59 I still like foof's fmt. 22:09:04 rudybot: init scheme 22:09:05 Daemmerung: your scheme sandbox is ready 22:09:06 super-flexible. 22:09:13 rudybot: eval string-pad 22:09:13 Daemmerung: error: reference to an identifier before its definition: string-pad in module: 'program 22:09:17 Nice and clean now. 22:09:19 ayup 22:09:26 eli did most of that, actually 22:14:37 so plt/scheme doesn't have a ready-to-use function to esacpe html entities? 22:15:21 Probably does, but heck if I know. Not my thing. 22:17:12 speaking of the desire for ready-to-use-functions... 22:17:18 i saw a parade of ponies today. 22:17:35 it was pretty awesome. 22:17:40 Oh! Ponies! 22:18:03 was one on a Ferris wheel and 4-legged? 22:18:06 http://images.google.com/images?oe=UTF-8&q=els+tres+tombs&um=1&ie=UTF-8&ei=-1FKS-7XDNG14QaXtb30Ag&sa=X&oi=image_result_group&ct=title&resnum=6&ved=0CCwQsAQwBQ 22:18:08 -rudybot:#scheme- http://tinyurl.com/y8u49vj 22:18:25 no but in one instances there were 4 ponies wth bells pulling a cart 22:18:30 onox: can you give an example of what you need? 22:18:34 Was one pursuing the wolf Fenrir, and 8-legged? 22:18:53 and in another, there were a pair of 5-year-olds in a chaise, driving a pony, holding a chihuahua 22:18:57 i kid you not. 22:19:00 lol 22:19:08 I'm pretty sure I've seen that on a Tarot trump. 22:19:29 Daemmerung: I think neither Chesty Puller or Thor is going home happy from this parade, apparently 22:19:40 rudybot: eval (require net/cgi) 22:19:48 but chihuahuas are awesome! 22:19:51 rudybot: eval (string->html "Look at 'him") 22:19:51 *offby1: ; Value: "Look at 'him" 22:19:55 rudybot: eval (string->html "Look at \"him") 22:19:56 *offby1: ; Value: "Look at \"him" 22:19:59 hmm 22:20:17 rudybot: eval (string->html "Look at ") 22:20:18 *offby1: ; Value: "Look at <him>" 22:20:21 ah there we go 22:21:45 ecraven: yes. 22:21:53 offby1: I need to replace < with < 22:22:27 I'm trying to use string-replace, but this scheme shizze keeps thinking it doesn't exist 22:23:04 kuribas [i=kristof@d54C4377F.access.telenet.be] has joined #scheme 22:23:28 onox: (require srfi/13) 22:23:50 eli: Thanks ;) I'm trying to get an overview of which Schemes have what kind of MOP 22:24:23 onox: did you not see me do just that abovd? 22:24:25 above? 22:24:35 onox: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=module/sxml/simple.scm;h=a1b485420b5089c1125d0ac72f59ad460d887db3;hb=HEAD#l126 22:24:36 -rudybot:#scheme- http://tinyurl.com/ycsjesx 22:24:38 ah, but that requires PLT scheme :) 22:27:07 wingo: call it like (string->esacped-xml "to-be-replaced")? 22:33:57 bombshelter13b [n=bombshel@76-10-149-209.dsl.teksavvy.com] has joined #scheme 22:34:38 onox: yes 22:35:50 ecraven: It's basically tiny-clos, with a number of extensions that make it has most of the features you find in CLOS, and a number of optimizations. 22:36:39 (But as usual, it has one huge imperative flaw...) 22:37:00 wingo: is it a lib I can (require or do I just need to copy paste the code? 22:37:32 onox: copy-paste make-char-quotator and string->escaped-xml 22:37:47 that code is public domain (it's from ssax) 22:37:56 it only depends on r5rs and srfi-13 22:39:30 -!- visof [n=visof@41.238.232.189] has quit [Read error: 60 (Operation timed out)] 22:39:51 bgs101 [n=ian@unaffiliated/bgs100] has joined #scheme 22:39:58 visof [n=visof@41.238.232.189] has joined #scheme 22:40:21 eli: what flaw? 22:40:50 eli: I find Telos and Dylan very interesting.. and some compile-time MOPs :) 22:40:51 is it some kind of class-of bit? 22:40:58 -!- TR2N [i=email@89-180-179-26.net.novis.pt] has quit [Read error: 110 (Connection timed out)] 22:41:20 ecraven: `defmethod' is adding a method to a generic function -- as a side-effect. 22:41:27 ah. 22:41:43 It sounds like a minor thing, but it's pretty bad. 22:42:02 It doesn't play nicely with letting the compiler do more optimizations, 22:42:54 which is not a really big problem, since you could go over that with `eval'-like tricks to recompile code; which is one reason that CLOS is so macro-oriented -- eg, method combination is done at the level of quoted code. 22:42:56 eli: I'm still wondering about the exact way to make defmethod work correctly with modules 22:43:38 But a bigger problem is that it introduces the order-of-loading issue, and that comes with the usual steep price tag. (IMO, at least.) 22:44:26 should be "defmethod!" ¬.¬ 22:44:42 ecraven: you could look at guile's resolution of generics and modules; it's probably slightly better but still terrible 22:44:53 synx: Actually, swindle has `add-method', but the problem is inherent. 22:45:23 ecraven: swindle is trying to hack around that with some PLT hacks which are trying to figure out if the name is defined, and use `defgeneric' first if it isn't -- but these are dirty tricks. 22:45:28 One would think you could pass a generic and a method, and return a new generic back that implemented the method. 22:46:00 ...so the original generic would not implement the method, and there would be no side effects... 22:46:02 one would think that, but what about the namespace binding... 22:46:12 synx: But that reduces the usability of the whole thing, since you can't just define methods independently -- you need to construct and pass the resulting gf around. 22:46:19 and then, what about extensibility 22:46:29 (addmethod! generic method) => (set! generic (addmethod generic method)) 22:46:30 eli: I don't know of any remotely clos-like system that doesn't have some kind of add-method or defmethod 22:48:33 -!- bgs100 [n=ian@unaffiliated/bgs100] has quit [Read error: 110 (Connection timed out)] 22:50:44 ecraven: Yeah, it's inherent, IMO. 22:51:01 And that makes me think much less of it... 22:51:25 As much as the reflection tricks are cute -- the basis for all of this is side-effecting... 22:52:11 you really think that poorly of side-effecting? 22:53:11 wingo: Yes. 22:53:31 wingo: It means getting all kinds of bad jujus. 22:53:37 heh 22:53:50 it is a universal implementation technique tho :) 22:53:55 Optimizer? I hardly knew 'er! 22:54:01 For example, (require foo bar) is now likely to be different from (require bar foo). 22:54:52 As another example, you might do something like (require foo) not because you need some bindings, but because you need it to inject the right code into some gf. 22:55:04 you might be right of course. i've always felt odd about generics, and it could be fundamentally due to side-effecting juju. 22:55:07 (seriously.) 22:55:12 This means that things are much less convenient on a system like ikarus, which doesn't instantiate the module unless it's used. 22:55:51 That might be the case -- it took a while for me to get to my current level od dislike... 22:56:02 s/od/of/ 22:58:24 Are there alternatives, if we want generic functions? 23:00:58 I don't know of any... 23:01:15 And whatever form it takes, it will make things different anyway. 23:01:44 Part of the whole thing -- the MOP-AOP connection -- relies on being able to modify running code. 23:02:21 So you might come up with some way to do things like synx suggested, but then you don't get the interference property. 23:03:11 (The third big feature on their list, if you've seen some of the talks about MOP and Open Systems (I think that was the term).) 23:03:30 hm.. much to think about :) going to bed now, thanks for the talking! 23:03:40 open implementations, I think 23:04:01 Oh right -- that sounds more familiar. 23:04:39 nickgibbon [n=nring@210.8.201.244] has joined #scheme 23:06:36 -!- bgs101 is now known as bgs100 23:08:10 Fuufie [n=innocent@86.80-203-225.nextgentel.com] has joined #scheme 23:09:06 mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 23:10:37 NNshag [n=shag@lns-bzn-35-82-250-199-23.adsl.proxad.net] has joined #scheme 23:18:54 -!- kuribas [i=kristof@d54C4377F.access.telenet.be] has quit ["ERC Version 5.2 (IRC client for Emacs)"] 23:21:24 -!- visof [n=visof@41.238.232.189] has quit [Remote closed the connection] 23:23:40 MrFahrenheit [n=RageOfTh@users-55-218.vinet.ba] has joined #scheme 23:23:41 -!- Nshag [n=shag@lns-bzn-24-82-64-141-214.adsl.proxad.net] has quit [Read error: 110 (Connection timed out)] 23:24:01 RageOfThou [n=RageOfTh@users-55-218.vinet.ba] has joined #scheme 23:26:19 -!- Foofie [n=innocent@86.80-203-225.nextgentel.com] has quit [Read error: 110 (Connection timed out)] 23:29:43 -!- hotblack23 [n=jh@p4FC5A5A1.dip.t-dialin.net] has quit ["Leaving."] 23:32:50 -!- onox [n=onox@kalfjeslab.demon.nl] has left #scheme 23:34:25 -!- wingo [n=wingo@155.Red-83-35-139.dynamicIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 23:34:27 rgrau_ [n=user@14.Red-193-152-161.dynamicIP.rima-tde.net] has joined #scheme 23:39:37 jmcphers [n=jmcphers@218.185.108.156] has joined #scheme 23:49:09 -!- masm [n=masm@bl7-204-6.dsl.telepac.pt] has quit ["Leaving."] 23:56:32 jao [n=jao@80.31.222.61] has joined #scheme 23:59:57 bytecolor [n=user@32.152.60.63] has joined #scheme