00:02:54 xkcd is an arrogant geek comic. It does have some clever moments though. 00:10:19 i have to give props to munroe for supporting himself off of his creation, though 00:10:45 -!- cmatei [n=cmatei@85.186.180.45] has quit [Remote closed the connection] 00:11:36 -!- fschwidom [n=fschwido@dslb-084-059-255-235.pools.arcor-ip.net] has quit [Remote closed the connection] 00:14:17 cmatei [n=cmatei@85.186.180.45] has joined #scheme 00:14:25 hellues [n=hellues@78.183.199.224] has joined #scheme 00:14:38 i understand flatmap :D 00:15:04 flatmap simply takes a List of List of some type A and returns a List[A]. 00:16:19 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 00:18:42 no, that would be called flatten-list-of-lists-one-level-deep. 00:27:25 so what is flatmap 00:27:30 what is it for :( 00:31:31 hellues: don't fret. it was mostly a joke. point is that flatmap has two parts: flat does what you described, but it also "maps" i.e. does a tranformation on those lists. 00:32:31 if it only did the "flat" part it would be called 'flatten' or something similar. 00:33:05 can you given an example 00:33:59 i already did... though there was a syntax error. and you claimed that "you can not use lambda". 00:34:53 rudybot: eval (let ((flatmap (lambda (proc seq) (apply append (map proc seq))))) (flatmap (lambda (l) (map (lambda (x) (+ 3 x)) l)) '((1 2 3) (3 4 5)))) 00:34:53 sladegen: ; Value: (4 5 6 6 7 8) 00:35:05 actually i dont get used lambda 00:35:23 hmm 00:36:04 you take list of list '((1 2 3) (3 2 1)) transform to one list and 00:36:14 plus 3 every element of list 00:37:00 '((1 2 3) (3 4 5)) ---> (1 2 3 3 4 5) and + 3 00:37:08 (4 5 6 6 7 8) 00:37:20 no... i plus 3 every element of list and trnform to one list. 00:41:23 yeah 00:41:26 i see 00:41:58 -!- Nshag [n=shagoune@Mix-Orleans-105-1-7.w193-250.abo.wanadoo.fr] has quit ["Quitte"] 00:42:36 but 00:42:57 you cant call (flatmap '(1 2 3) '(3 4 5)) 00:43:31 can you say anytutorial for lambda i cannot use lambda ad i must study on it 00:45:16 no you can not call it like this because as the name 'proc' suggests flatmap expects a procedure as its first argument. 00:45:32 hmm 00:45:47 what is proc sladegen 00:45:50 lambda simply creates an anonymous procedure "on the spot". 00:46:12 proc is four letter word. 00:47:00 any beginners tutorial on scheme or lisp will explain what lambda is. 00:47:35 -!- jewel [n=jewel@dsl-242-143-202.telkomadsl.co.za] has quit [Read error: 113 (No route to host)] 00:47:54 what 00:47:57 is this 00:48:06 it is scheme programming enviroment 00:48:22 htdp and sicp little general 00:48:36 i want a doc that explain step by step 00:49:48 you can read this http://www.paulgraham.com/rootsoflisp.html 00:50:33 you said complete article 00:50:36 okey i read it 00:50:44 though it might be too abstract, too, like sicp seems to be in your case. 00:52:02 thank you 00:52:55 good luck. 00:55:03 hellues: thanks, by the way, for my daily dose of surrealism 01:01:58 -!- bpt [n=bpt@cpe-071-070-209-067.nc.res.rr.com] has quit [Read error: 104 (Connection reset by peer)] 01:05:56 hello 01:08:35 xz: 'lo 01:09:13 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 01:09:51 what might have happened, by the way, had you hello'd the void and received no reply? 01:10:19 happened to what? 01:10:25 good question 01:10:53 did anyone make a scheme machine? 01:11:02 yes 01:11:08 physically, or like sicp ch. 5? 01:11:24 physical... 01:11:43 -!- nowhereman [i=pierre@pthierry.pck.nerim.net] has quit [Read error: 104 (Connection reset by peer)] 01:11:55 although - would you ever call software physical? it is in one sense. 01:12:15 but if software were physical, physical wouldn't be a very useful adjective 01:12:30 xz: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-34.html 01:12:35 they designed chip... not sure if produced in larger numbers. but there is a pic outthere of its physicality. 01:12:39 check out fig. 5.16 01:13:03 or it might have been just a factory design sheet. 01:13:07 which is both physical, by the way, and in ch. 5 01:13:10 hey that's pretty nice 01:13:40 klutometis thanks for the link 01:13:43 np 01:13:51 anyone familiar with brian cantwell smith? 01:14:17 let me google... 01:15:02 he's one of those philosophy/cs guys like thagard 01:16:25 -!- Khisanth [n=Khisanth@pool-151-204-138-236.ny325.east.verizon.net] has quit ["Leaving"] 01:18:29 bpt [n=bpt@cpe-071-070-209-067.nc.res.rr.com] has joined #scheme 01:20:38 Khisanth [n=Khisanth@pool-68-237-103-31.ny325.east.verizon.net] has joined #scheme 01:22:53 are there any forks of scheme? or attempts to specify a cleaner language better... 01:23:18 oh my god 01:23:35 better than a revised report, I mean 01:23:35 xz: did you just get here? :) 01:23:36 Yes. Next! 01:23:48 any particularly successful ones? 01:24:07 I did just get here actually 01:24:29 Nope. Next! 01:24:35 is it bad style to ask vague provocative questions? 01:24:43 Yep. Next! 01:24:51 the problem is there is no next... 01:24:57 Well, I'm done, then! 01:25:21 and so the forum was silent 01:25:58 *synx* chirps 01:26:04 xz: Riastradh is occasionally a tad snarky but overall he's pretty helpful 01:26:08 maybe he's having a tough day 01:26:10 we are... the silent killers! 01:26:16 anyway there are about one zillion Schemes. 01:26:25 some are pretty slick. Some suck. The rest run the gamut. 01:26:42 which would you call slick? 01:27:10 -!- jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has quit [Read error: 110 (Connection timed out)] 01:27:22 chicken 01:28:04 I saw a number close to a zillion the other day at http://prime.isthe.com/chongo/tech/math/prime/m43112609/prime.html 01:28:28 actually I think it's a lot more than a zillion 01:28:37 I'm fond of PLT myself. 01:29:03 jonrafkind [n=jon@wireless10.wireless.utah.edu] has joined #scheme 01:29:40 so I realize these are both implementations of a subset and superset of some revised report... my question is particularly about the language, not the implementation 01:29:47 ...yeah that's a lot more than a zillion. 01:30:03 a zillion is only 1e12 01:30:24 I see 01:30:37 can you truly separate the two? 01:30:51 plt has several languages, yet is one implementation. 01:31:15 an implementation of several languages. no you can't really separate the two, but you can try - that's what specifications try to do 01:32:09 if you had a completely operational specification... it would be pretty close to an implentation. but would still need to be coded up to run, so there'd be a bit of difference... 01:33:01 it's similar to the difference between source code and running process 01:33:41 I think R6RS is the closest anyone's come to make scheme "better". Different, certainly. 01:33:42 in a particular situation you might be able to clearly tell them apart, but it's hard to do so generally... I mean, you get to choose what you're going to call code, I guess 01:34:20 What are you having trouble clarifying? 01:34:26 butter. 01:34:33 all the foamy stuff rises to the top 01:34:36 I'm a Forth wannabe. 01:34:48 have there been many varied attempts at libraries that export macros? that's an interesting problem in itself, I think. 01:34:58 synx me too, maybe... but wouldn't you say factor is better than forth? 01:35:22 by library i mean a separately compileable piece of code 01:35:27 dunno about "many varied attempts" but I'm sure the PLT people would tell you that they can export macros properly 01:35:34 I suspect the Scheme48 folks would say the same 01:35:55 xz: Same thing. I mean concatenative languages in general. 01:35:57 Yes, xz, Scheme48 has done it for more than fifteen years. 01:36:39 factor is neat, but... the loading time for modules is so slow it's ridiculous. Can drag to a halt even. 01:37:11 I wonder if it'd be easy to write a Forth-style language in plt-scheme... 01:37:35 Scheme48 module system looks interesting 01:37:37 Yes. Next! 01:37:51 -!- hellues [n=hellues@78.183.199.224] has quit [Remote closed the connection] 01:37:54 synx have you tried it? also see the cat interpreter scheme-cat 01:38:46 *klutometis* spent 45 seconds making sure cat wasn't lolcat 01:39:11 aww, cute kitty 01:40:25 https://synx.us.to/art2/!hash/Clv_BNpM5S2czu5rUfTIgF7WpOE/cuteKitty.jpg 01:40:40 -!- schme [n=marcus@sxemacs/devel/schme] has left #scheme 01:41:40 wastrel [n=wastrel@nylug/member/wastrel] has joined #scheme 01:41:52 nice to see that smeagol found a home 01:42:46 hehe sorry I find hairless cats curiously adorable 01:44:00 rats must have a laugh when they see him. 01:45:19 xz: http://zwizwa.be/staapl/ 01:45:52 nowhere_man [i=pierre@pthierry.pck.nerim.net] has joined #scheme 01:46:28 synx: ugh! No offense, but that's one UGLY cat. 01:46:30 jeez, has nothing not been written yet 01:46:40 I mean I'm sure you love him/her/it and all, but ... 01:47:54 offby1: Isn't mine! I ain't a land owner so can't keep any pets. 01:49:05 hm, I can't say I quite parsed that, but ... whatever 01:50:40 The cat, he is not my own cat, but rather a photo I found on the Internets. 01:52:55 At my current rate I shall be able to purchase lands in as little as 177 years. 01:54:55 cemerick [n=la_mer@c-71-192-208-28.hsd1.ma.comcast.net] has joined #scheme 02:02:16 grnman [n=grnman@c-76-110-165-179.hsd1.fl.comcast.net] has joined #scheme 02:13:58 -!- allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has quit [Remote closed the connection] 02:14:10 allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has joined #scheme 02:15:54 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 02:31:42 oh good 02:38:42 that photo doesn't work for me 02:38:45 glad I cleared things up, now... 02:38:49 but I'll take offby1's word for it and say it's ugly :P 02:39:17 we old people are tough critics 02:39:25 picture George Carlin, only not dead 02:39:34 just add a security exception :p 02:40:05 Zombie Carlin 02:44:24 The 7 dirty words: brains brains brains brains brains brains and BRAINS! 02:45:58 synx pasted "corrupted image colors" at http://paste.lisp.org/display/68790 02:47:14 -!- cemerick [n=la_mer@c-71-192-208-28.hsd1.ma.comcast.net] has quit [] 02:51:38 hml [n=x@unaffiliated/hml] has joined #scheme 02:52:36 I'd love if someone who uses plt could verify that oddness. 03:00:58 -!- elmex [n=elmex@e180064148.adsl.alicedsl.de] has quit [Read error: 104 (Connection reset by peer)] 03:02:16 elmex [n=elmex@e180065019.adsl.alicedsl.de] has joined #scheme 03:06:22 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 03:09:58 Does anyone know a good clean way to extract a binary structure from a file? Like "1 byte for this, 2 bytes for that, 1 byte for foo" 03:13:09 -!- arcfide [n=arcfide@adsl-99-14-211-180.dsl.bltnin.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 03:24:23 underspecified_ [n=eric@softbank220043052011.bbtec.net] has joined #scheme 03:24:32 -!- underspecified [n=eric@softbank220043052011.bbtec.net] has quit [Read error: 54 (Connection reset by peer)] 03:30:45 you can read a byte at a time, if you want 03:31:13 Yeah, but accessing those bytes in a meaningful way... 03:31:28 I wonder if the FFI has any help 03:33:20 Instead of typing (integer-bytes->integer header #f #t 2 4) with raw numbers and such, I'd rather say (thingy header 'blue) whatever thingy is. 03:34:46 Maybe based on a list like '((red 1) (green 2) (blue 1)) or something, adding up the byte offsets. 03:35:59 I know what you mean 03:36:37 there's a first time for everything. o.o 03:37:36 emma_ [n=emma@unaffiliated/emma] has joined #scheme 03:37:39 -!- JHVH [n=Jarv@dsl-217-155-101-22.zen.co.uk] has quit [Read error: 110 (Connection timed out)] 03:37:46 Review the "C Struct" coverage in the FFI. 03:38:00 -!- allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has quit [Read error: 110 (Connection timed out)] 03:38:01 Many people have written code to do that sort of thing, synx. 03:38:25 Few, if any, successfully serve a very general purpose, however. 03:44:23 -!- emma_ [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 03:44:39 emma_ [n=emma@unaffiliated/emma] has joined #scheme 03:46:32 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 03:48:18 -!- emma [n=emma@unaffiliated/emma] has quit [Connection timed out] 03:51:27 -!- emma_ [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 03:51:39 emma [n=emma@unaffiliated/emma] has joined #scheme 03:54:06 '((a b) (c d)) -> '((a c) (b d)) hm... 03:55:04 (zip) whee... 03:57:19 (apply zip '((a b) (c d))) 03:58:25 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 03:58:38 emma [n=emma@unaffiliated/emma] has joined #scheme 04:05:02 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 54 (Connection reset by peer)] 04:05:14 emma [n=emma@unaffiliated/emma] has joined #scheme 04:09:51 rudybot: eval (apply zip '((a b) (c d))) 04:09:54 offby1: error: reference to undefined identifier: zip 04:10:00 some srfi prolly 04:10:04 specbot: zip 04:10:13 tjafk2 [n=timj@e176199146.adsl.alicedsl.de] has joined #scheme 04:11:59 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:12:12 emma [n=emma@unaffiliated/emma] has joined #scheme 04:12:29 offby1: it's SRFI-1 04:13:06 rudybot: eval (require srfi/1) 04:13:06 -!- gweiqi [n=greg@69.120.126.163] has quit [Remote closed the connection] 04:13:09 rudybot: eval (apply zip '((a b) (c d))) 04:13:09 offby1: ; Value: ((a c) (b d)) 04:13:12 yay 04:13:19 oops, didn't mention. 04:13:23 gweiqi [n=greg@69.120.126.163] has joined #scheme 04:13:39 It's neat how zip is unzip 04:13:47 rudybot: eval (apply zip '((a b c) (ALPHA BETA GAMMA) (1 2 3))) 04:13:48 offby1: ; Value: ((a ALPHA 1) (b BETA 2) (c GAMMA 3)) 04:13:55 rudybot: eval (apply zip '((a b c) (ALPHA BETA GAMMA) )) 04:13:55 offby1: ; Value: ((a ALPHA) (b BETA) (c GAMMA)) 04:14:38 (equal? (apply zip l) (unzipN l)) 04:14:39 -!- gweiqi [n=greg@69.120.126.163] has quit [Client Quit] 04:16:04 rudybot: (apply zip '((a ALPHA) (b BETA) (c GAMMA))) 04:16:14 synx: you need to say "eval" 04:16:22 plus you'll need the (require srfi/1) 04:16:23 ... 04:16:28 rudybot: eval (apply zip '((a ALPHA) (b BETA) (c GAMMA))) 04:16:34 -!- rudybot [n=luser@li11-10.members.linode.com] has quit [Remote closed the connection] 04:16:37 again? 04:16:40 hmm 04:16:53 rudybot: eval (require srfi/1) 04:16:57 ack 04:17:02 crap, he fell over again 04:17:05 this keeps happening. 04:17:07 ELI!! 04:17:10 somehow it's eli's fault. 04:17:17 I don't know how, exactly, but it must be. 04:17:35 it works though I swear 04:17:45 worked for me, until the bot fell over 04:18:01 rudybot [n=luser@li11-10.members.linode.com] has joined #scheme 04:18:10 rudybot: feeling up to it, now? 04:18:20 (equal? (apply zip (apply zip l)) l) 04:18:21 rudybot: eval (require srfi/1) 04:18:30 go, synx, go 04:18:30 rudybot: eval (apply zip '((a ALPHA) (b BETA) (c GAMMA))) 04:18:30 synx: ; Value: ((a b c) (ALPHA BETA GAMMA)) 04:18:33 yay 04:18:37 We'll see... 04:18:41 yus 04:18:57 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:19:11 emma [n=emma@unaffiliated/emma] has joined #scheme 04:19:33 unzip* isn't exactly equal, since it's one of those "return multiple value" functions. 04:19:53 (apply values (apply zip l)) or something would do it. 04:20:35 -!- jao [n=user@224.Red-83-38-59.dynamicIP.rima-tde.net] has quit [Read error: 110 (Connection timed out)] 04:21:20 offby1: ? 04:21:44 synx: what's wrong with `integer-bytes->integer'? 04:22:23 eli: I don't like leaving numbers in my code. 04:22:35 huh? 04:22:54 eli: are you up for a rambling and only marginally coherent whine? It _might_ relate to sandboxes. 04:23:14 offby1: sort of... 04:23:17 I don't like when my peas touch my mashed potatoes ... 04:23:21 synx: I don't know what "leaving numbers in code" means. 04:23:47 Instead of typing (integer-bytes->integer header #f #t 2 4) with raw numbers and such, I'd rather say (thingy header 'blue) whatever thingy is. 04:23:53 Was trying to define it... not with as much luck. 04:24:06 synx: how about `define'? 04:24:27 rudybot: eval (define (thingy header) (integer-bytes->integer header #f #t 2 4)) 04:24:30 There. 04:24:50 well, here it is, in brief: a number of times recently rudybot has crashed while doing "eval". It prints "with-limits: out of time" to the console, and just exits; no information about an exception. As far as I know, I'm handling _all_ exceptions from the evaluator ... oddly, none of the forms that it was evaluating took much time. 04:24:55 The part after the define is what I'm stuck on. :) 04:25:07 No the header is composed of multiple fields, each with a certain size in bytes. 04:25:54 Like how you'd read a packed C struct from a disk file, then scream in frustration and fix the endian-ness. 04:25:55 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:26:07 emma [n=emma@unaffiliated/emma] has joined #scheme 04:26:11 synx: how about this: 04:26:13 -!- tjafk1 [n=timj@e176213122.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 04:26:15 rudybot: eval (define (thingy inp) (integer-bytes->integer (read-bytes 2) #f #t)) 04:26:38 rudybot: eval (define (get-rgb inp) (list (thingy inp) (thingy inp) (thingy inp))) 04:27:31 offby1: I don't have any good ideas what could be causing it. You're not running rudybot itself from a sandbox, right? 04:27:34 Sure, now get that working for general packed binary data. 04:27:54 synx: define "general packed binary data". 04:28:08 eli: right: the sandbox only comes into play when someone says "eval" 04:28:18 I think he wants to read a cstruct from a bitstream. 04:28:26 Like "1 byte for field A, then 2 bytes for field B, then another byte for field C"... 04:28:51 Sure that'd be fine. 04:29:24 I was kind of defining it as a C struct anyway... then just apply that to 18 bytes or so read from the file. 04:29:37 Oh, but since people are here now... 04:29:40 offby1: if you can get a test case, that would be good. Perhaps recording the sequence of sandboxes made/collected, and what was evaluated can lead to such a test. 04:29:52 eli: hmm, not a bad idea 04:29:55 http://paste.lisp.org/display/68790 04:30:08 Please be sure you are aware of the distinction between `C struct' and `structured binary data'. 04:30:17 I'm missing something about how the "bitmap" library loads pixel data. :/ 04:30:24 synx: what I wrote *is* doing that. A very limited version of it, at least. 04:30:26 arcfide [n=arcfide@adsl-99-137-200-247.dsl.bltnin.sbcglobal.net] has joined #scheme 04:30:38 Riastradh: Yes...? You mean alignment issues? 04:30:56 synx: the natural extension of it is to extend `thingy' with an argument specifying the width of the data. 04:31:06 synx: then comes an endian argument. 04:31:09 eli: Right, so I just need to figure how to do that for various binary data types. Or get the bitmap loading correctly, whichever comes first. 04:31:13 synx: then comes a signed argument. 04:31:24 jcowan [n=jcowan@cpe-74-68-154-18.nyc.res.rr.com] has joined #scheme 04:31:26 There is no general correspondence between C structs and structured sequences of bits; the correspondence is entirely dependent on the C implementation. 04:31:42 synx: then you find yourself in the category of what Riastradh mentioned earlier. 04:32:04 (ie, you'll be in the crowd of "Many people have written code to do that sort of thing") 04:32:30 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:32:42 emma [n=emma@unaffiliated/emma] has joined #scheme 04:33:03 I was referring to cstruct in the PLT (require scheme/foreign) sense. 04:33:30 Yes well I'd like to use their code if possible. I just need to read this header and separate it into fields. 04:33:39 Daemmerung: that *should* have exactly the problem that Riastradh is talking about... 04:34:03 would that vary depending on what C compiler PLT was built with, Daemmerung? 04:34:10 It's absolutely a FFI issue. 04:34:37 You need to specify field bitwidths and endianness. 04:35:01 An example is -- if you want to read a sequence of byte,integer -- how would you read it? 04:35:04 hey all 04:35:05 (...the latter which I don't believe the FFI currently addresses.) 04:35:11 Well, only the endianness once for a given bunch of data, I'd imagine. 04:36:30 eli: The first byte is the byte. Then 2 or 4 bytes later is the integer, possibly swapped around for endian change. 04:36:52 synx: does the file format not specify the endianness? 04:37:02 synx, by the way, are you talking about bytes, which are the smallest addressible unit of memory on your local machine, or octets, which are groups of eight bits? 04:37:13 Riastradh: er ... what's the difference? 04:37:14 ...it might... hold on 04:37:18 Riastradh: I believe that fight is long lost. 04:37:30 *eli* +1s Daemmerung 04:37:38 Yeah even 64 bit computers still use 8 bit bytes. 04:37:48 *Daemmerung* can now only be hit with magic weapons... cool 04:37:57 It's just a wider bus, not a different byte format. 04:38:26 *offby1* tries to remove the -3 gloves, but can't: they appear to be cursed 04:38:33 synx: Well, if you use the ffi, you get (usually) something that is 8 bytes long, with the first field only using one byte out of the first four, and the second field using the last four. 04:39:06 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:39:07 *eli* casts a spell of remove-cursed in offby1's general direction 04:39:18 emma [n=emma@unaffiliated/emma] has joined #scheme 04:39:19 generally, when one is talking about bytes, there areC `char's involved in an FFI, or something machine-specific; when one is talking about octets, it is generally independent of machine-specific data or a C library, and would in C be referred to with uint8_t. 04:39:29 The file format is little-endian. It's TGA I'm looking at. So, need to swap integers around on a big-endian machine. 04:39:31 Yikes. 04:39:38 Not sure what happened to the capitalization and spacing in that message. 04:39:43 *offby1* rubs his wrists 04:40:18 *offby1* neither 04:40:26 *eli* gains 10 expeience points 04:40:40 experience, ewen 04:40:44 synx, suppose you read the octets of that file, and compose integers from contiguous sequences of octets. Will the code to do that differ between a little-endian machine and a big-endian machine? 04:41:22 It should yes, since the file format has to stay little endian all the time. 04:41:32 Nope! 04:41:50 tizoc_ [n=user@r190-135-22-210.dialup.adsl.anteldata.net.uy] has joined #scheme 04:42:15 If what you are doing is writing a Scheme program that deals with the individual octets in a file, the arithmetic operations you perform on them will be identical independent of the preferred byte order of the machine you're running on. 04:42:47 Uh... but... 04:43:14 You have to specify endian-ness in integer-bytes->integer. How would that not change depending on the system? 04:43:41 Oh wait... 04:43:46 Let's say you read the octets #xDE #xAD #xBE #xEF. How do you turn these octets into the integer #xDEADBEEF? 04:44:04 You specify the endian-ness of the data, but it automatically finds the system endian-ness, and changes if need-be. So it would be the same code. 04:44:10 Well, Riastradh, yes and no. If the file does not contain system-dependent representations of integers that don't fit in an octet, then you are right. But it often does. 04:44:27 Such formats are unfortunately common. 04:44:43 jcowan: We're talking about TGA, which specifies little-endian everywhere. 04:45:02 synx: what Riastradh's talking about, translated to the plt function you're using, is basically the fact that you should specify the `big-endian?' argument rather than leaving it to your OS's mercy. 04:45:03 jcowan, ah, I wasn't talking about a file containing octets requiring machine-specific interpretation. I was asking about a Scheme program that deals with a sequence of octets and interprets them according to a previously specified format defined in terms of octets. 04:45:22 s/containing octets requiring/containing data requiring/1 04:45:40 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:45:43 This assumes, of course, that on most machines there is a common notion of a file containing a sequence of octets. 04:45:44 Quite so. 04:45:52 emma [n=emma@unaffiliated/emma] has joined #scheme 04:46:02 A text file, as a trivial example. 04:47:35 Now, by contrast, if the data in question were not octets from a file in a specific format, but instead compose a C object, say a C struct, whose structure is described in a C header file, then the interpretation of those data is highly machine- (and compiler- and compiler-flag- and compiler-phase-of-the-moon-) specific. 04:48:54 Any consistency between instances of programs with such objects is purely an incidental consequence of the often thwarted efforts of operating system and compiler authors to maintain binary compatibility. 04:50:04 Quite so. 04:50:16 Sure, you have to change the integers to system-endianness (if different from the data's endian-ness) after filling up the struct. integer-bytes->integer does that automatically I guess. 04:50:19 SWIG is quite helpful in this case. 04:51:37 So, if what you want is to machine-independently interpret a sequence of octets...then the local machine's preferred byte order is absolutely irrelevant to your program (and there should be no htonl or ntohl or analogues in your program). 04:51:59 (The local machine's preferred byte order is important to the implementation of Scheme, but not to your Scheme code.) 04:52:14 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 04:52:26 emma [n=emma@unaffiliated/emma] has joined #scheme 04:53:13 Yes, as long as you know the endian-ness of the data, the interpreter can decide whether to convert or not and you never have to worry about it. 04:54:27 (Apologies for belabouring this point, but I have seen far too many people catastrophically fail to comprehend the matter, with disastrous results such as networked data serialization by memcpy(3), or some of the file formats to which jcowan alluded earlier (in some cases of which the machine-dependency is reasonable, and in other cases of which it is not).) 04:56:12 The distinction between `byte' and `octet' that I mentioned earlier, by the way, helps to clarify which kind of data one is talking about. How information is arranged in bytes is often up to the compiler; how information is arranged in octets is generally part of a machine-independent, human-interpretable specification. 04:56:19 memcpy is fine... after you change the endian-ness of your structure's integers if need-be. 04:56:22 Could be a hassle if you're sending across an array of 10,000 integers. 04:56:24 No, synx. 04:57:05 memcpy(3) is not fine for networked data serialization unless an immense number of coincidences happen to occur between the two end-points of communication. 04:57:50 memcpy of an array of bytes doesn't even bring endianness into play. 04:58:03 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 04:58:06 Though why you'd do memcpy and not just sendmsg the existing buffer I haven't a clue. 04:58:12 If you are dealing only with arrays, memcpy + endianism is tolerable. If structs are involved, though, compilers are free to lay out structs however they like, possibly with interspersed padding. 04:58:15 Would memcpy(3) require that one knows the exact system representations that are going to be happening on each side of the code, and is able to do the transormations and sanity checking before copying and moving the data? 04:58:24 It should be already serialized at this point, and in network format, or you will be a very sad panda. 04:58:49 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 54 (Connection reset by peer)] 04:59:01 emma [n=emma@unaffiliated/emma] has joined #scheme 04:59:11 jcowan: Yeah, that's true too. Most compilers support packing structs though, where the memory is guaranteed to represent what you expect, at the cost of some performance. 04:59:43 (By `memcpy(3) for networked data serialization', I mean that an object is serialized by copying it byte-for-byte into the output octet sequence. Whether this actually involves calling the memcpy(3) library routine is immaterial.) 04:59:53 -!- tizoc [n=user@r190-135-63-118.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 05:00:56 Even with arrays it's not sensible; consider an array of int. 05:01:41 Memcpying this across the network isn't going to work very well if the program on each end expects an `int', and one of them happens to be running on a 64-bit machine while the other is on a 32-bit machine. 05:02:27 Or they might get lucky, until someone changes a compiler flag, or upgrades GCC, or switches to a different compiler, or... 05:03:28 I'm saying memcpy works, but you have to munge each multi-byte integer first, and use a packed struct guaranteed to have a certain memory format. 05:03:48 Then you're relying on the semantics of a specific implementation of C. What if I choose a different implementation of C? 05:04:21 Then you have to change your program. 05:04:38 There's no automatic detection of that like in higher level languages. 05:05:39 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 05:05:52 emma [n=emma@unaffiliated/emma] has joined #scheme 05:08:02 hml [n=x@unaffiliated/hml] has joined #scheme 05:12:30 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 05:12:42 emma [n=emma@unaffiliated/emma] has joined #scheme 05:19:22 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 05:19:34 emma [n=emma@unaffiliated/emma] has joined #scheme 05:20:44 eno__ [n=eno@adsl-70-137-168-121.dsl.snfc21.sbcglobal.net] has joined #scheme 05:21:28 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 60 (Operation timed out)] 05:22:52 -!- delamarche_ [n=delamarc@dsl-67-204-20-119.acanac.net] has quit [] 05:23:06 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 05:25:56 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 05:26:09 emma [n=emma@unaffiliated/emma] has joined #scheme 05:32:28 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 05:32:40 emma [n=emma@unaffiliated/emma] has joined #scheme 05:33:00 -!- underspecified_ [n=eric@softbank220043052011.bbtec.net] has quit [] 05:39:18 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 05:39:30 emma [n=emma@unaffiliated/emma] has joined #scheme 05:41:37 quack.el, paredit.el, ... anything else i need for emacs/scheme mode? 05:41:40 synx: for what it's worth, i once used srfi-4 and a trivial segment record (defining start and end bits) to get a semantically-driven binary parser 05:41:52 hml: not that i can think of 05:45:51 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 54 (Connection reset by peer)] 05:46:03 emma [n=emma@unaffiliated/emma] has joined #scheme 05:52:54 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 05:53:07 emma [n=emma@unaffiliated/emma] has joined #scheme 05:59:47 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 05:59:59 emma [n=emma@unaffiliated/emma] has joined #scheme 06:02:58 -!- hml [n=x@unaffiliated/hml] has quit ["leaving"] 06:06:41 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 06:06:54 emma [n=emma@unaffiliated/emma] has joined #scheme 06:07:17 hml [n=x@unaffiliated/hml] has joined #scheme 06:11:20 hmm, rode about 20 miles today 06:11:29 still feeling a little buzzed 06:11:49 -!- hml [n=x@unaffiliated/hml] has quit [Client Quit] 06:13:33 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 06:13:45 emma [n=emma@unaffiliated/emma] has joined #scheme 06:14:14 I've never rode more than 8 or so... 06:14:26 Ladies and gentlemen, grab your torches and pitchforks! Tonight we march! 06:14:50 *gnomon* rallies the rabble 06:15:49 March on? Redmond? 06:15:59 Quiet, you! I said march, not question! 06:16:12 Well - perhaps some loud formless yelling would be appropriate. 06:16:28 But aside from indistinct bellows, no dissension in the ranks! 06:16:36 *jcowan* bellows indistinctly. 06:16:49 Good man! Someone give that fellow a torch! 06:17:49 Open the gates! 06:17:56 ONWARD 06:18:21 *Daemmerung* claims a good spot for knitting near the guillotine 06:18:23 *gnomon* charges out into the misty night 06:18:39 I'm going to march on bed. 06:18:47 Oof, it's a mite nippy out here tonight. 06:19:00 *jcowan* points to http://www.rpg.net/reviews/archive/9/9843.phtml 06:19:09 *Daemmerung* knits gnomon a nice neckwarmer 06:19:19 Aw, thanks ever so much. 06:19:56 (good night, Riastradh!) 06:20:27 -!- emma [n=emma@unaffiliated/emma] has quit [Connection reset by peer] 06:20:39 emma [n=emma@unaffiliated/emma] has joined #scheme 06:27:01 jgracin [n=jgracin@82.193.208.195] has joined #scheme 06:27:16 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 06:27:28 emma [n=emma@unaffiliated/emma] has joined #scheme 06:34:12 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 54 (Connection reset by peer)] 06:34:25 emma [n=emma@unaffiliated/emma] has joined #scheme 06:41:00 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 06:41:13 emma [n=emma@unaffiliated/emma] has joined #scheme 06:47:40 sodio [n=sodio@netblock-63-66-64-29.myitdepartment.net] has joined #scheme 06:47:56 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 06:48:08 emma [n=emma@unaffiliated/emma] has joined #scheme 06:52:05 -!- sodio [n=sodio@netblock-63-66-64-29.myitdepartment.net] has quit [Client Quit] 06:54:44 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 06:54:57 emma [n=emma@unaffiliated/emma] has joined #scheme 07:01:32 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 07:01:44 emma [n=emma@unaffiliated/emma] has joined #scheme 07:06:44 MichaelRaskin_ [n=raskin@gwh-1-177-mytn23k1.ln.rinet.ru] has joined #scheme 07:07:45 -!- jcowan [n=jcowan@cpe-74-68-154-18.nyc.res.rr.com] has left #scheme 07:08:18 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 07:08:30 emma [n=emma@unaffiliated/emma] has joined #scheme 07:09:47 emma: problems? 07:12:07 hotblack23 [n=jh@p5B057569.dip.t-dialin.net] has joined #scheme 07:15:06 -!- emma [n=emma@unaffiliated/emma] has quit [Read error: 104 (Connection reset by peer)] 07:15:19 emma [n=emma@user-12hdp67.cable.mindspring.com] has joined #scheme 07:22:26 -!- jonrafkind [n=jon@wireless10.wireless.utah.edu] has quit [Read error: 110 (Connection timed out)] 07:33:45 grrrrr 07:34:18 spent hours trying to figure out what is wrong only to find a bug in my flush-output-port proc :| 07:35:03 augh my brain... 07:35:14 So I made a database of images, see. 07:35:29 Images indexed by the hash of their data. Can't fail! 07:35:56 So the images have tags to them, which I naturally wish to preserve. 07:36:19 So I was saving the tags as a JPEG comment, or as a PNG TXT chunk, when exporting the image out of the database. 07:36:21 and you realise you can never update an image? 07:36:42 Wasn't planning on it. 07:37:26 And then of course, those images float around the Intarwebs... and sure enough, suddenly I have an exact copy of the image, with embedded keywords, and a different hash. 07:38:02 i hate dupes 07:38:04 AUGH 07:38:21 i have so many duplicate pdf's 07:39:09 synx: classic case of destructive observation 07:39:12 And since images are in such awful container formats, it's practically impossible to cleanly undo adding keywords, so you get the original hash. Even though it's the same darn image. 07:39:27 Also impossible to define what the "image" part of an image is, or I'd just hash that. 07:39:37 jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has joined #scheme 07:39:53 you just need 1 'dead' pixel 07:40:01 Need a separate function to extract that for every image type, just to make an "image hashing" function. 07:40:10 Oh don't even get me started on dead pixels... 07:40:21 jonrafkind: take you 17 mins to get home? 07:40:30 This project is way bigger than I wanted it to be. 07:40:36 synx: sounds familiar 07:40:46 you should have a better hashing function then, one that works on similarity 07:41:26 Proportional hashing is an open problem. 07:41:44 Those take a loooooong time to calculate. 07:41:48 We're talking like 4 gig of pictures here. 07:42:25 Proportional...? 07:43:07 Proportional hashing is based on the idea that the 'distance' between two hashes is dependent on the 'similarity' of the two input files. 07:43:14 It's almost like you want hash collisions if the data is similar enough... 07:43:22 Got it in one. 07:43:37 Oh okay, that's it then. 07:44:04 Dangerous though, because someone would game the similarity algorithm, and find a way to make porn look similar to posies. 07:45:06 The Georgia O'Keefe challenge. 07:46:04 -!- ttmrichter [n=ttmricht@221.234.212.221] has quit [Read error: 110 (Connection timed out)] 07:46:48 You go to see the Mona Lisa and it's the Lisa Simpson. 07:47:01 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit ["Connection reset by beer"] 07:48:40 Matt Skala did some work on distance-based hashing. I believe the term he used was "robust hashing". 07:48:42 So what's the Georgia O'Keefe challenge? 07:48:43 http://ansuz.sooke.bc.ca/professional/ 07:49:41 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 07:50:03 synx: posies that look similar to porn. 07:51:03 ahaha I get it now 07:55:28 fschwidom [n=fschwido@dslb-084-059-244-204.pools.arcor-ip.net] has joined #scheme 08:06:47 -!- synthasee [n=synthase@68.63.20.12] has quit [Read error: 60 (Operation timed out)] 08:14:29 puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has joined #scheme 08:17:01 -!- proqesi [n=user@unaffiliated/proqesi] has quit [Remote closed the connection] 08:17:23 -!- hotblack23 [n=jh@p5B057569.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 08:26:50 underspecified [n=eric@softbank220043052011.bbtec.net] has joined #scheme 08:36:46 Jarvellis [n=Jarv@dsl-217-155-101-22.zen.co.uk] has joined #scheme 08:37:32 allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has joined #scheme 08:42:29 xerox [n=xerox@unaffiliated/xerox] has joined #scheme 08:44:39 schmalbe [n=bernhard@p549A1BDC.dip0.t-ipconnect.de] has joined #scheme 08:53:21 judy [n=judy@166.179.167.17] has joined #scheme 08:54:56 schme [n=marcus@sxemacs/devel/schme] has joined #scheme 08:57:58 -!- judy [n=judy@166.179.167.17] has quit [Client Quit] 09:26:40 ecraven [n=nex@plc31-103.linzag.net] has joined #scheme 09:32:23 vasa [n=vasa@mm-50-185-84-93.dynamic.pppoe.mgts.by] has joined #scheme 09:37:02 -!- ecraven [n=nex@plc31-103.linzag.net] has quit ["bbl"] 09:58:34 besiria [n=user@ppp083212084215.dsl.uom.gr] has joined #scheme 10:03:22 peter___ [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 10:04:18 -!- peter___ is now known as sjamaan 10:12:02 jewel [n=jewel@dsl-242-143-202.telkomadsl.co.za] has joined #scheme 10:14:43 -!- schmalbe [n=bernhard@p549A1BDC.dip0.t-ipconnect.de] has quit [Remote closed the connection] 10:30:25 -!- arcfide [n=arcfide@adsl-99-137-200-247.dsl.bltnin.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 10:30:58 -!- allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has quit [Read error: 110 (Connection timed out)] 10:36:56 -!- besiria [n=user@ppp083212084215.dsl.uom.gr] has quit [Remote closed the connection] 10:37:37 -!- elias` [n=me@unaffiliated/elias/x-342423] has quit [Read error: 145 (Connection timed out)] 10:40:14 xhanjian [n=Jan@218.109.77.120] has joined #scheme 10:45:21 elias` [n=me@unaffiliated/elias/x-342423] has joined #scheme 10:55:19 hkBst [n=hkBst@221pc223.sshunet.nl] has joined #scheme 11:03:31 ejs [n=eugen@213-231-124-91.pool.ukrtel.net] has joined #scheme 11:06:52 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [] 11:06:59 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 11:07:13 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Remote closed the connection] 11:07:33 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 11:09:57 ecraven [n=nex@plc31-103.linzag.net] has joined #scheme 11:15:19 AreliusFreeNode [n=AreliusF@64.174.9.113] has joined #scheme 11:18:03 -!- AreliusFreeNode [n=AreliusF@64.174.9.113] has left #scheme 11:18:15 AreliusFreeNode [n=AreliusF@64.174.9.113] has joined #scheme 11:20:25 -!- ecraven [n=nex@plc31-103.linzag.net] has quit ["bbl"] 11:24:59 Interesting paper at http://lambda-the-ultimate.org/node/3055 11:26:15 I'm not sure his comments can be generalised 11:26:29 -!- vasa [n=vasa@mm-50-185-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 11:30:04 -!- BW^- [i=Miranda@94.191.167.168.bredband.tre.se] has quit [Read error: 110 (Connection timed out)] 11:47:58 -!- emma [n=emma@unaffiliated/emma] has quit [Remote closed the connection] 11:50:26 emma [n=emma@unaffiliated/emma] has joined #scheme 12:05:14 gigabytes [n=gigabyte@host25-17-dynamic.5-87-r.retail.telecomitalia.it] has joined #scheme 12:13:11 tizoc [n=user@r190-135-20-199.dialup.adsl.anteldata.net.uy] has joined #scheme 12:14:32 Nshag [i=user@Mix-Orleans-106-2-176.w193-248.abo.wanadoo.fr] has joined #scheme 12:18:46 -!- underspecified [n=eric@softbank220043052011.bbtec.net] has quit [] 12:30:48 -!- tizoc_ [n=user@r190-135-22-210.dialup.adsl.anteldata.net.uy] has quit [Read error: 110 (Connection timed out)] 12:38:01 -!- cracki_ [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has quit ["The funniest things in my life are truth and absurdity."] 12:38:36 cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has joined #scheme 12:41:32 rafaelgv [n=asdf@189.7.148.107] has joined #scheme 12:46:42 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [Remote closed the connection] 12:46:53 Adamant [n=Adamant@c-98-244-152-196.hsd1.ga.comcast.net] has joined #scheme 12:47:48 synthasee [n=synthase@68.63.20.12] has joined #scheme 12:57:08 -!- ejs [n=eugen@213-231-124-91.pool.ukrtel.net] has quit [Remote closed the connection] 13:01:19 besiria [n=user@ppp083212084108.dsl.uom.gr] has joined #scheme 13:10:29 -!- rafaelgv [n=asdf@189.7.148.107] has left #scheme 13:15:14 -!- aquanaut [n=user@pool-71-191-49-201.washdc.fios.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 13:51:17 gweiqi [n=greg@69.120.126.163] has joined #scheme 13:53:19 -!- gigabytes [n=gigabyte@host25-17-dynamic.5-87-r.retail.telecomitalia.it] has quit [] 14:08:18 -!- cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has quit ["The funniest things in my life are truth and absurdity."] 14:12:50 allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has joined #scheme 14:17:01 AshyIsMe [n=User@202.176.4.21] has joined #scheme 14:17:02 -!- benny [n=benny@i577A17E9.versanet.de] has quit [Read error: 104 (Connection reset by peer)] 14:29:17 benny [n=benny@i577A2838.versanet.de] has joined #scheme 14:46:53 vasa [n=vasa@mm-50-185-84-93.dynamic.pppoe.mgts.by] has joined #scheme 14:51:56 -!- kryptiskt [n=kryptisk@c83-249-72-204.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 15:01:39 -!- AshyIsMe [n=User@202.176.4.21] has quit ["Leaving"] 15:17:21 kryptiskt [n=kryptisk@ua-83-227-225-58.cust.bredbandsbolaget.se] has joined #scheme 15:17:59 cracki [n=cracki@sglty.kawo2.RWTH-Aachen.DE] has joined #scheme 15:19:40 underspecified [n=eric@softbank220043052011.bbtec.net] has joined #scheme 15:27:44 -!- eno__ [n=eno@adsl-70-137-168-121.dsl.snfc21.sbcglobal.net] has quit ["leaving"] 15:30:24 -!- araujo [n=araujo@gentoo/developer/araujo] has quit [Success] 15:34:02 -!- kryptiskt [n=kryptisk@ua-83-227-225-58.cust.bredbandsbolaget.se] has quit [Read error: 110 (Connection timed out)] 15:34:49 mejja [n=user@c-7d2472d5.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 15:35:51 johnnowak [n=johnnowa@207-38-171-48.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com] has joined #scheme 15:36:03 kryptiskt [n=kryptisk@ua-83-227-225-58.cust.bredbandsbolaget.se] has joined #scheme 15:42:03 annodomini [n=lambda@c-75-69-95-99.hsd1.nh.comcast.net] has joined #scheme 15:50:40 cemerick [n=la_mer@75.147.38.122] has joined #scheme 15:57:14 hellues [n=hellues@85.102.167.201] has joined #scheme 15:57:42 offby1, are you there ? Can i ask a question ? 15:57:47 lisppaste, url 15:57:48 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 15:58:37 borism_ [n=boris@195-50-205-146-dsl.krw.estpak.ee] has joined #scheme 16:01:11 hellues pasted "ex 2.41" at http://paste.lisp.org/display/68812 16:04:02 -!- elmex [n=elmex@e180065019.adsl.alicedsl.de] has quit [Read error: 60 (Operation timed out)] 16:04:09 elmex [n=elmex@e180065019.adsl.alicedsl.de] has joined #scheme 16:05:32 -!- ivarref [n=ivarref@padme.ifi.uio.no] has left #scheme 16:05:50 -!- borism [n=boris@195-50-199-195-dsl.krw.estpak.ee] has quit [Read error: 145 (Connection timed out)] 16:11:11 -!- Jarvellis [n=Jarv@dsl-217-155-101-22.zen.co.uk] has quit [Read error: 104 (Connection reset by peer)] 16:11:18 Jarvellis [n=Jarv@dsl-217-155-101-22.zen.co.uk] has joined #scheme 16:15:44 foldl is how PLT Scheme spells `fold' -- see http://srfi.schemers.org/srfi-1/srfi-1.html#FoldUnfoldMap 16:16:05 also http://docs.plt-scheme.org/reference/pairs.html#(def._((lib._scheme/base..ss)._foldl)) 16:16:06 Daemmerung, say to me ? 16:16:17 okey i look 16:19:50 hey 16:20:00 Daemmerung, but i dont understand this line 16:20:04 (let ((diff (- s (apply + seq)))) 16:20:20 apply is a function seq is a variable 16:20:24 and s is variable 16:20:35 is it ? 16:22:53 comawhite [n=Jeff@nickweinhold.demon.co.uk] has joined #scheme 16:24:17 hellues: (apply foo (list bar baz quux)) == (foo bar baz quux) 16:26:37 bar baz quux --> list of element 16:26:44 foo --> function 16:26:46 ? 16:27:00 yes, you can only apply a function 16:27:35 -!- comawhite [n=Jeff@nickweinhold.demon.co.uk] has left #scheme 16:28:44 (let ((diff (- s (apply + seq)))) 16:29:00 seq is variable s is variable apply is a function 16:29:05 just a second 16:30:46 http://paste.lisp.org/display/68813 can you look at my address 16:30:57 rudybot: eval (let ((s 57) (seq '(1 2 3 4 5))) (- s (apply + seq))) 16:30:58 mejja: ; Value: 42 16:31:28 hmm 16:31:40 I think that should be let*, not let 16:32:58 (let ((diff (- s (apply + seq)))) you said let (- s (apply +seq))) become diff 16:34:23 i think it's more like noletcookies... 16:34:37 what is noletcookies 16:34:54 :D 16:35:04 ha 16:35:06 sure 16:35:10 apply + seq 16:35:18 i understand the point 16:35:31 seq is a list and apply + to list 16:35:39 athan minus s 16:35:46 jeddhaberstro [n=jeddhabe@65-37-37-12.nrp4.roc.ny.frontiernet.net] has joined #scheme 16:36:08 ecraven [n=nex@plc31-103.linzag.net] has joined #scheme 16:36:27 rudybot: (equal? (apply + '(1 2 3 4 5)) (+ 1 2 3 4 5)) 16:36:29 afdsfD 16:36:32 s minus that 16:36:39 rudybot: eval (equal? (apply + '(1 2 3 4 5)) (+ 1 2 3 4 5)) 16:36:39 johnnowak: ; Value: #t 16:36:51 auahuahauh 16:36:53 :D 16:37:15 *sladegen* barks. 16:42:06 -!- rudybot [n=luser@li11-10.members.linode.com] has quit [Remote closed the connection] 16:42:11 *keyofnight* grrrr. (: 16:43:27 rudybot [n=luser@li11-10.members.linode.com] has joined #scheme 16:43:39 rudybot: welcome back! 16:45:30 rudybot: eval (+ 1 2) 16:45:32 offby1: ; Value: 3 16:46:34 -!- rudybot [n=luser@li11-10.members.linode.com] has quit [Remote closed the connection] 16:46:44 I keep restarting him 16:46:53 keep thinking of stuff I forgot 16:47:53 rudybot [n=luser@li11-10.members.linode.com] has joined #scheme 16:48:58 rudybot: eval (+ 1 2) 16:49:00 offby1: ; Value: 3 16:49:10 there we go 16:54:32 now ... we wait ... 16:54:56 I'm trying to grok the contracts in PLT scheme. Do I understand them correctly that they are basically checking the structure of data? 16:56:38 they're checking the data period 16:56:47 for whatever it is you want to check about it. 16:56:52 structure, for example. 16:57:39 offby1: how can I feed the data into them? I somehow missed the function to check the data with a particulat contract. 17:00:52 from what I see here, checking happens behind the scenes 17:01:54 and it does not seem to work in the REPL, provide/contract gives errors. 17:01:58 -!- jeddhaberstro [n=jeddhabe@65-37-37-12.nrp4.roc.ny.frontiernet.net] has quit [] 17:02:33 can you give rudybot an infinite loop? 17:03:01 rudybot: eval (lambda (x) x) 17:03:02 xz: ; Value: # 17:03:10 rudybot: eval (let r () (r)) 17:03:10 rudybot: eval ((lambda (f) (f f)) (lambda (g) (g g))) 17:03:12 johnnowak: error: with-limit: out of time 17:03:14 Riastradh: error: with-limit: out of time 17:03:18 oo 17:03:31 rudybot: eval (lambda (x) y) 17:03:31 xz: ; Value: # 17:03:40 xz: that's not an infinite loop 17:03:44 I know 17:04:31 rudybot: eval (let-syntax ((f (syntax-case (lambda (o) o)))) (f)) 17:04:31 xz: error: eval:1:16: syntax-case: bad syntax in: (syntax-case (lambda (o) o)) 17:04:38 oops 17:04:57 rudybot: eval (let-syntax ((f (lambda (o) o))) (f)) 17:04:59 xz: error: with-limit: out of memory 17:05:19 nice 17:06:06 LeCamarade [n=LeCamara@41.222.7.35] has joined #scheme 17:06:19 -!- Jarvellis is now known as Stateless 17:07:55 rudybot: hello 17:09:21 rudybot: eval a 17:09:21 xz: error: reference to undefined identifier: a 17:09:46 rudybot: eval import 17:09:46 xz: error: eval:1:0: import: misuse of unit keyword in: import 17:10:21 rudybot: eval library 17:10:21 xz: error: reference to undefined identifier: library 17:10:26 rudybot: eval fold-right 17:10:26 johnnowak: error: reference to undefined identifier: fold-right 17:10:32 rudybot: eval (require srfi/1) fold-right 17:10:32 johnnowak: ; Value: # 17:10:42 there you go 17:10:47 hmm 17:10:49 is that PLT? 17:10:53 yes, plt 4 17:11:04 rudybot: eval (version) 17:11:04 johnnowak: ; Value: "4.1.1" 17:11:12 I see 17:12:08 rudybot: eval (define x) 17:12:08 xz: error: eval:1:0: define: bad syntax (missing expression after identifier) in: (define x) 17:12:12 rudybot: eval (define x 0) 17:12:20 rudybot: eval x 17:12:20 xz: ; Value: 0 17:12:24 oo 17:12:54 rudybot: eval (define-syntax define (syntax-rules () ((_ x y) (+ x y)))) 17:13:05 rudybot: (define 1 2) 17:13:13 rudybot: eval (define 1 2) 17:13:13 xz: ; Value: 3 17:14:39 rudybot: eval (define-syntax Hello (identifier-syntax "How do you do?")) 17:14:40 xz: error: reference to undefined identifier: identifier-syntax 17:14:43 hmm 17:15:48 rudybot: eval fold-right 17:15:48 xz: error: reference to undefined identifier: fold-right 17:16:57 -!- allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has quit [Connection timed out] 17:17:07 -!- vasa [n=vasa@mm-50-185-84-93.dynamic.pppoe.mgts.by] has quit [Read error: 110 (Connection timed out)] 17:17:51 vasa [n=vasa@mm-219-188-84-93.dynamic.pppoe.mgts.by] has joined #scheme 17:23:01 rudybot: eval (define-syntax plus (syntax-rules () ((_ x ...) (+ x ...)))) 17:23:23 rudybot: eval (define-syntax + (syntax-rule () ((_ x y) (define x y)))) 17:23:23 xz: error: eval:1:30: #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) 17:23:38 rudybot: eval (define-syntax + (syntax-rules () ((_ x y) (define x y)))) 17:23:50 rudybot: eval (+ 2 3) 17:23:50 xz: error: with-limit: out of memory 17:24:05 rudybot: eval (define x 3) 17:24:07 xz: error: with-limit: out of time 17:24:14 poor rudybot... 17:24:19 mike [n=mike@dslb-088-066-225-193.pools.arcor-ip.net] has joined #scheme 17:27:32 rudybot: eval foldr 17:27:33 offby1: ; Value: # 17:27:39 xz: use that instead of fold-right 17:28:06 hotblack23 [n=jh@p5B053FB1.dip.t-dialin.net] has joined #scheme 17:33:00 offby1 is it your bot? 17:37:28 yup 17:37:46 rudybot: (+ 1 1) 17:37:51 rudybot: eval (+ 1 1) 17:37:53 xz: error: with-limit: out of time 17:38:11 hmm. 17:38:16 that makes no sense. 17:38:18 rudybot: eval + 17:38:18 xz: error: eval:1:0: +: bad syntax in: + 17:38:22 =P 17:38:24 neither do those "outof memory" messages 17:38:28 rudybot: eval (+ 1 1) 17:38:29 offby1: ; Value: 2 17:38:31 weird. 17:38:38 ah 17:38:45 you have a separate environment for every user? 17:38:54 yes. 17:38:57 that makes sense then 17:39:02 up to a maximum of (I think) three 17:39:07 rudybot: eval (exit) 17:39:07 xz: error: exit: user code cannot exit 17:39:09 seems there's something weird with yours 17:39:15 oh I made mine weird 17:39:15 now, that was correct behavior. 17:39:21 try (+ 1 1) again 17:39:33 how can I reset it? 17:39:39 you can't :-| 17:39:42 ah 17:39:50 try changing your nick 17:39:53 or I will 17:40:04 -!- offby1 is now known as plotz 17:40:05 nah it's okay. I have a local scheme system =P 17:40:08 rudybot: eval (+ 1 1) 17:40:08 plotz: ; Value: 2 17:40:24 rudybot: (+ 1 1) 17:40:31 rudybot: eval (+ 1 1) 17:40:32 rudybot: eval (+ 1 1) 17:40:34 xz: error: with-limit: out of memory 17:40:34 plotz: ; Value: 2 17:40:39 -!- plotz is now known as frotz` 17:40:39 rudybot: eval (+ 1 1) 17:40:40 Leonidas: ; Value: 2 17:40:47 rudybot: eval (+ 1 1) 17:40:48 frotz`: ; Value: 2 17:40:50 -!- xz is now known as xzz 17:41:04 rudybot: eval "it was my environment, because you allow define" 17:41:04 xzz: ; Value: "it was my environment, because you allow define" 17:41:08 -!- xzz is now known as xz 17:41:18 ok, that's purged the "XZ" one 17:41:18 -!- frotz` is now known as offby1 17:41:45 rudybot: eval + 17:41:46 xz: ; Value: # 17:41:51 ah better 17:43:30 rudybot: eval ((call/cc call/cc) (lambda (x) x)) 17:43:30 xz: ; Value: # 17:43:52 rudybot: eval ((call/cc call/cc) 0) 17:43:52 xz: error: procedure application: expected procedure, given: 0; arguments were: 0 17:44:50 rudybot: eval ((call/cc (lambda (x) x)) 0) 17:44:50 xz: error: procedure application: expected procedure, given: 0; arguments were: 0 17:45:14 rudybot: eval ((call/cc (lambda (x) x)) (lambda (x) x)) 17:45:14 xz: ; Value: # 17:46:39 rudybot: eval ((call/cc call/cc) (lambda (x) (x x))) 17:46:41 xz: error: with-limit: out of time 17:47:07 rudybot: eval ((call/cc call/cc) (call/cc call/cc)) 17:47:09 xz: error: with-limit: out of time 17:48:59 rudybot: eval (let ((x (call/cc (lambda (x) x)))) 0) 17:48:59 xz: ; Value: 0 17:49:03 rudybot: eval (let ((x (call/cc (lambda (x) x)))) x) 17:49:03 xz: ; Value: # 17:49:08 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x 0)) 17:49:08 xz: error: procedure application: expected procedure, given: 0; arguments were: 0 17:49:17 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x x)) 17:49:20 xz: error: with-limit: out of time 17:50:00 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x (lambda (x) x))) 17:50:00 xz: ; Value: # 17:50:08 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x (lambda (x) x)) (x 5)) 17:50:08 xz: ; Value: 5 17:50:42 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x (lambda (x) (+ x 1)) (x 4)) 17:50:42 xz: error: eval:1:0: read: expected a `)' to close `(' 17:50:45 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x (lambda (x) (+ x 1)) (x 4))) 17:50:45 xz: error: procedure application: expected procedure, given: 4; arguments were: 4 17:51:19 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x (lambda (x) (x 4)))) 17:51:19 xz: error: procedure application: expected procedure, given: 4; arguments were: 4 17:51:46 rudybot: eval (let ((x (call/cc (lambda (x) x)))) (x 2)) 17:51:46 xz: error: procedure application: expected procedure, given: 2; arguments were: 2 17:53:12 rudybot: eval (let ((x (call/cc (lambda (x) (x x))))) x) 17:53:12 xz: ; Value: # 17:53:15 golly 17:54:38 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (x) x))))) x) 17:54:38 xz: ; Value: # 17:54:43 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (x) x))))) (x 1)) 17:54:43 xz: ; Value: # 17:54:48 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (x) x))))) ((x 1) 2)) 17:54:49 xz: error: procedure application: expected procedure, given: 2; arguments were: 2 17:54:54 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (x) x))))) ((x 1) x)) 17:54:54 xz: ; Value: # 17:55:09 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (x) x))))) ((x 1) (lambda (v) v))) 17:55:09 xz: ; Value: # 17:55:35 oh it is ignoring the 1 17:56:06 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y))))) (x 0)) 17:56:06 xz: error: eval:1:0: read: expected a `)' to close `(' 17:56:08 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y))))) (x 0)) 17:56:09 xz: error: eval:1:0: read: expected a `)' to close `(' 17:56:10 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y))))) (x 0))) 17:56:10 xz: error: eval:1:0: let: bad syntax in: (let ((x (lambda (x) (call/cc (lambda (y) (cons x y))))) (x 0))) 17:56:24 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) (x 0)) 17:56:24 xz: ; Value: (0 . #) 17:57:05 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x 0)) (car (x 0))) 17:57:05 xz: error: eval:1:0: read: expected a `)' to close `(' 17:57:19 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x 0)) (car (x 0)))) 17:57:19 xz: error: cdr: expects argument of type ; given 0 17:57:38 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x '(a))) (car (x '(b))))) 17:57:38 xz: error: procedure application: expected procedure, given: (); arguments were: (b) 17:57:47 rubybot 17:58:10 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x '(a))) (car (x (lambda (b) b))))) 17:58:10 xz: error: cdr: expects argument of type ; given # 17:58:55 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x '(a))) 1)) 17:58:55 xz: error: cdr: expects argument of type ; given 1 17:59:06 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x '(a))) '(b))) 17:59:06 xz: error: procedure application: expected procedure, given: (); arguments were: (b) 17:59:26 bombshelter13 [n=bombshel@209-161-227-32.dsl.look.ca] has joined #scheme 18:00:09 la_mer [n=la_mer@75.147.38.122] has joined #scheme 18:01:46 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x 0)) (cons call/cc call/cc))) 18:01:46 xz: error: call-with-current-continuation: expects argument of type ; given (# . #) 18:01:55 oops 18:02:43 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x 0)) (cons 0 car))) 18:02:43 xz: ; Value: 0 18:02:46 yay 18:03:23 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x x)) (cons cdr car))) 18:03:23 xz: ; Value: # 18:04:07 rudybot: eval (let ((x (lambda (x) (call/cc (lambda (y) (cons x y)))))) ((cdr (x x)) (cons car cdr))) 18:04:07 xz: ; Value: # 18:15:21 -!- cemerick [n=la_mer@75.147.38.122] has quit [Read error: 110 (Connection timed out)] 18:15:40 gigabytes [n=gigabyte@host83-59-dynamic.8-87-r.retail.telecomitalia.it] has joined #scheme 18:17:32 http://paste.lisp.org/submit i write a code queen board 18:17:41 do you think it is true or not 18:18:20 -!- LeCamarade [n=LeCamara@41.222.7.35] has quit [No route to host] 18:21:02 jgracin [n=jgracin@82.193.208.195] has joined #scheme 18:25:18 -!- xhanjian [n=Jan@218.109.77.120] has quit [Read error: 113 (No route to host)] 18:34:22 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 18:45:42 -!- OceanSpray [n=karl@LEMON.RES.CMU.EDU] has quit [Read error: 110 (Connection timed out)] 18:46:20 OceanSpray [n=kniu@CMU-301252.WV.CC.CMU.EDU] has joined #scheme 19:00:24 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 19:03:07 fridim_ [n=fridim@val13-1-82-232-122-245.fbx.proxad.net] has joined #scheme 19:05:47 -!- mike [n=mike@dslb-088-066-225-193.pools.arcor-ip.net] has quit ["Leaving"] 19:06:41 -!- offby1 [n=user@q-static-138-125.avvanta.com] has quit [Nick collision from services.] 19:06:49 -!- offby1` is now known as offby1 19:07:17 ? 19:07:37 ? 19:08:01 ! 19:08:02 Hai ski 19:08:15 I was ?'ing about 20:16 < hellues> http://paste.lisp.org/submit i write a code queen board 19:08:21 offby1 : you're off by one ! 19:08:30 guilty. 19:09:03 aaah! 19:09:05 Now I get it. 19:09:09 ski: That was very funny :) 19:10:23 -!- Kinks [n=Kinks@uc087.housing.umanitoba.ca] has quit [Read error: 113 (No route to host)] 19:11:22 -!- bombshelter13 [n=bombshel@209-161-227-32.dsl.look.ca] has quit [] 19:11:26 hellues might have meant to give a link to a new paste .. 19:12:29 Kinks [n=Kinks@uc087.housing.umanitoba.ca] has joined #scheme 19:15:47 bombshelter13 [n=bombshel@209-161-227-32.dsl.look.ca] has joined #scheme 19:17:37 -!- nowhere_man [i=pierre@pthierry.pck.nerim.net] has quit [Remote closed the connection] 19:18:13 nowhere_man [i=pierre@pthierry.pck.nerim.net] has joined #scheme 19:24:20 lelf [n=lelf@217.118.90.64] has joined #scheme 19:27:57 wasabi_ [n=wasabi@ntoska151203.oska.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 19:29:08 -!- lelf [n=lelf@217.118.90.64] has quit [Client Quit] 19:32:31 -!- besiria [n=user@ppp083212084108.dsl.uom.gr] has quit [Remote closed the connection] 19:32:40 lelf [n=lelf@217.118.90.114] has joined #scheme 19:45:07 -!- bombshelter13 [n=bombshel@209-161-227-32.dsl.look.ca] has quit ["Where is the glory in complying with demands?"] 19:47:17 -!- la_mer [n=la_mer@75.147.38.122] has quit [] 19:47:51 bombshelter13 [n=bombshel@209-161-227-32.dsl.look.ca] has joined #scheme 19:48:02 -!- jonrafkind [n=jon@c-98-202-86-149.hsd1.ut.comcast.net] has quit [Read error: 110 (Connection timed out)] 19:51:04 -!- OceanSpray [n=kniu@CMU-301252.WV.CC.CMU.EDU] has quit [Remote closed the connection] 19:53:48 kniu [n=kniu@LEMON.RES.CMU.EDU] has joined #scheme 19:56:10 GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has joined #scheme 19:59:06 n3li7e [n=Neil@98.223.199.215] has joined #scheme 20:05:33 -!- gigabytes [n=gigabyte@host83-59-dynamic.8-87-r.retail.telecomitalia.it] has quit [] 20:07:32 jonrafkind [n=jon@c-67-186-250-110.hsd1.co.comcast.net] has joined #scheme 20:15:42 -!- hotblack23 [n=jh@p5B053FB1.dip.t-dialin.net] has quit [kornbluth.freenode.net irc.freenode.net] 20:18:23 -!- jgracin [n=jgracin@82.193.208.195] has quit [Remote closed the connection] 20:22:55 wingo-tp [n=wingo@23.Red-83-32-65.dynamicIP.rima-tde.net] has joined #scheme 20:23:05 good day! 20:23:09 or evening. 20:23:26 is there any literature out there regarding the interactions of type inferencing and continuations? 20:24:01 Do you have a specific question about it? (And by `continuations', I presume you mean `reified continuations' or `escape procedures'.) 20:27:37 Riastradh: by continuations, I mean the reified ones that call/cc creates. the question is that you have statically determined that a particular variable should be of a certain type, 20:28:09 but in the middle of that type-inferenced procedure a continuation is captured, what happens if that continuation returns again with a different type of value 20:28:38 i suppose you can determine statically if your type-inferencing flow graph can have a continuation captured 20:28:42 Why would the type system permit that? 20:28:45 wingo-tp: you might look at FX-87 20:29:53 In Haskell's notation, cwcc :: ((answer -> any) -> answer) -> answer 20:30:53 Riastradh: it seems that in any place in which, in scheme, you can capture a continuation, you have to be ready for any type 20:30:59 values of any type i mean 20:31:13 -!- kryptiskt [n=kryptisk@ua-83-227-225-58.cust.bredbandsbolaget.se] has quit ["Ex-Chat"] 20:31:14 johnnowak: will look, tx 20:31:36 Yes, wingo-tp, because that's Scheme. 20:31:45 wingo-tp: i'm not entirely sure what you mean either.. i'm just guessing that it might be helpful. 20:31:52 Not so in a statically typed language. CWCC doesn't magically introduce a loophole into the type system. 20:32:02 Riastradh: ok, point taken 20:32:21 am currently looking at http://research.sun.com/self/papers/pics.html and boggling, what a beautiful paper 20:32:47 aye 20:32:51 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 20:33:24 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 20:34:46 -!- Daemmerung [n=goetter@64.146.161.228] has quit ["Smoove out."] 20:35:30 -!- pchrist [n=spirit@gentoo/developer/pchrist] has quit ["leaving"] 20:36:01 i just try to learn and write some complex 20:36:05 pchrist [n=spirit@gentoo/developer/pchrist] has joined #scheme 20:36:07 what is my mistake can you tell me 20:36:11 (accumulate (lambda(l) (flatmap + 3 l)) (map append l '(1 2 3 4 5))) 20:38:49 -!- ecraven [n=nex@plc31-103.linzag.net] has quit ["bbl"] 20:43:53 -!- lelf [n=lelf@217.118.90.114] has quit ["used jmIrc"] 20:47:20 what's accumulate and flatmap? 20:57:53 -!- puchacz [n=puchacz@87-194-5-99.bethere.co.uk] has quit [Remote closed the connection] 21:01:51 sodio [n=sodio@netblock-63-66-64-29.myitdepartment.net] has joined #scheme 21:04:46 -!- GreyLensman [n=ray@c-76-108-235-51.hsd1.fl.comcast.net] has left #scheme 21:07:48 -!- fschwidom [n=fschwido@dslb-084-059-244-204.pools.arcor-ip.net] has quit [Remote closed the connection] 21:08:19 -!- Nshag [i=user@Mix-Orleans-106-2-176.w193-248.abo.wanadoo.fr] has quit ["Quitte"] 21:08:49 johnnowak, 21:08:53 http://paste.lisp.org/display/68835 21:10:14 isn't flatmap just.. map? 21:10:24 er.. how .. er 21:10:30 hold on, i'm being summoned 21:11:04 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 21:11:52 hotblack23 [n=jh@p5B053FB1.dip.t-dialin.net] has joined #scheme 21:17:24 actually flatmap transform list of list to a list than apply opt to each element of list 21:17:31 i understand that 21:17:58 that's not what it does 21:18:12 it maps then flattens 21:18:30 npe [n=npe@66.112.249.148] has joined #scheme 21:18:33 very slowly 21:22:06 hmm 21:22:28 it is actually defined in drscheme 21:22:59 flatmap is? 21:23:19 A guide to flatland. 21:23:23 -!- jonrafkind [n=jon@c-67-186-250-110.hsd1.co.comcast.net] has quit [Read error: 60 (Operation timed out)] 21:24:40 heh 21:24:58 it all makes sense now 21:26:42 -!- AreliusFreeNode is now known as Arelius 21:35:52 -!- AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has quit [Remote closed the connection] 21:39:59 saccade_ [n=saccade@65-78-24-47.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 21:41:42 AtnNn [n=welcome@modemcable230.56-56-74.mc.videotron.ca] has joined #scheme 21:42:38 -!- jewel [n=jewel@dsl-242-143-202.telkomadsl.co.za] has quit [Read error: 113 (No route to host)] 21:57:23 -!- fridim_ [n=fridim@val13-1-82-232-122-245.fbx.proxad.net] has quit [Remote closed the connection] 21:58:23 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 21:58:46 synthase [n=synthase@68.63.20.12] has joined #scheme 21:58:50 jonrafkind [n=jon@wireless50.wireless.utah.edu] has joined #scheme 22:03:28 -!- hellues [n=hellues@85.102.167.201] has quit [Remote closed the connection] 22:09:05 -!- Stateless is now known as Jarvellis 22:11:33 -!- synthasee [n=synthase@68.63.20.12] has quit [Connection timed out] 22:15:43 -!- xerox [n=xerox@unaffiliated/xerox] has quit [] 22:26:23 when you're applying for a job, is the cover-letter attached to the resume; or is it a separate document? 22:28:49 -!- npe [n=npe@66.112.249.148] has quit [] 22:30:27 i durst naught google it, for then every degenerate resume-writing two-bit will burn their propaganda-agitation into my neurons 22:32:41 -!- vasa [n=vasa@mm-219-188-84-93.dynamic.pppoe.mgts.by] has quit ["I am not vasya, i am vasa"] 22:33:27 -!- hotblack23 [n=jh@p5B053FB1.dip.t-dialin.net] has quit [Read error: 145 (Connection timed out)] 22:34:28 and #scheme degeneros are the only degeneros i trust 22:34:37 hellues [n=hellues@85.102.167.201] has joined #scheme 22:34:43 lisppaste, url 22:34:43 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 22:35:11 hellues pasted "fold-right" at http://paste.lisp.org/display/68836 22:35:32 just a question what is tha mistake fo that 22:36:50 hellues: do you have a test case? 22:36:57 yeah 22:37:58 thats interesting actually 22:38:24 my function works correctly but 22:38:35 i took this mistake from that function fold-right 22:38:40 procedure ...ues/project3.scm:192:15: expects 1 argument, given 2: 5 () 22:38:55 (fold-right cons '() '(1 2 3)) => (1 2 3) 22:39:02 which is roughly what i'd expect 22:39:05 yeah it works 22:39:09 -!- rdd [n=rdd@c83-250-142-219.bredband.comhem.se] has quit [Read error: 104 (Connection reset by peer)] 22:39:13 but i took this mistake 22:40:05 procedure ...ues/project3.scm:192:15: expects 1 argument, given 2: 5 () this is about fold-right 22:40:17 because mistakes indicate that function 22:40:22 but i dont understand 22:40:45 an example that produces the error would be helpful 22:41:13 -!- Jarvellis is now known as Stateless 22:41:21 but there is no error in my code 22:41:29 my code actually works fine 22:42:45 so the problem is imaginary? 22:43:00 it's best to code in the real domain 22:43:31 unless you have psilocybinous mushrooms 22:43:35 it indicates that 22:43:40 (op (car sequence) 22:43:40 (fold-right op initial (cdr sequence)))) 22:43:50 in fold-right 22:44:23 error is procedure ...ues/project3.scm:194:15: expects 1 argument, given 2: 5 () 22:44:23 > 22:44:55 AshyIsMe [n=User@202.176.4.21] has joined #scheme 22:45:08 best explain the "it", then, that indicates 22:45:16 are you running a library that uses your code? 22:45:25 no 22:45:48 i am just pretty big and include mred and advanced student 22:45:55 i am using* 22:46:12 no library 22:46:55 hmm; maybe it's a plt thing, then; it works fine on chicken 22:47:10 everytihng woks fine 22:47:23 rubybot: eval #t 22:47:31 rudybot: eval #t 22:47:31 xz: ; Value: #t 22:47:37 yay it's still there 22:47:50 I'm keeping a close eyeon it 22:49:09 -!- bpt [n=bpt@cpe-071-070-209-067.nc.res.rr.com] has quit ["Leaving"] 22:51:56 Just have it auto-respawn. 22:52:05 That couldn't cause any problem whatsover. 22:52:35 rudybot: eval div 22:52:36 xz: error: reference to undefined identifier: div 22:52:43 rudybot: eval modulo 22:52:43 xz: ; Value: # 22:54:20 rudybot: eval xz 22:54:20 offby1: ; Value: |very demanding! What does he want, anyhow?| 22:54:34 So when you calculate the average between a set of bits, that average changes, on average, when the value of those bits change. 22:54:53 If you average a set of averages, the same thing would apply. 22:55:28 So if you made a hash that recursively averaged in that manner, until it got to the desired hash size, would that be a bad generic similarity hash algorithm? 22:55:54 Like a tiger tree, but without the randomization. 22:56:20 rudybot: eval xz 22:56:20 offby1: ; Value: "still there? I can't tell." 22:57:02 rudybot: eval #t 22:57:02 xz: ; Value: #t 22:57:14 rudybot: eval offby1 22:57:14 xz: error: reference to undefined identifier: offby1 22:58:14 rudybot: eval xz 22:58:15 offby1: ; Value: |mua ha ha| 22:59:10 allnmymi` [n=user@bas3-ottawa10-1279680047.dsl.bell.ca] has joined #scheme 23:00:14 rudybot: eval (letrec 23:00:14 ((take (lambda (n s) (if (zero? n) '() (cons (car s) (take (- n 1) ((cdr s))))))) 23:00:14 xz: error: eval:1:0: read: expected a `)' to close `(' 23:00:17 (remd (lambda (n s) (if (zero? (modulo (car s) n)) (remd n ((cdr s))) (cons (car s) (lambda () (remd n ((cdr s)))))))) 23:00:20 (primes (lambda (n) (cons n (lambda () (remd n (primes (+ n 1)))))))) 23:00:22 (take 100 (primes 2))) 23:00:23 damn 23:01:30 aren't those matching? 23:01:49 I don't think he can read multi-line evals 23:01:53 kinda sucks 23:01:53 ah 23:02:10 rudybot: eval (letrec ((take (lambda (n s) (if (zero? n) '() (cons (car s) (take (- n 1) ((cdr s))))))) (remd (lambda (n s) (if (zero? (modulo (car s) n)) (remd n ((cdr s))) (cons (car s) (lambda () (remd n ((cdr s)))))))) (primes (lambda (n) (cons n (lambda () (remd n (primes (+ n 1)))))))) (take 100 (primes 2))) 23:02:11 xz: ; Value: (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541) 23:02:16 yay 23:04:17 imagine an obfuscated scheme code contest 23:04:44 remd? primes? 23:04:54 nooo 23:05:07 remd = remove those divisible by 23:05:12 BW^- [i=Miranda@79.138.189.36.bredband.tre.se] has joined #scheme 23:05:14 primes = stream of primes... 23:05:18 starting from n 23:05:26 aaa. does anyone of you guys know XSLT ? 23:05:28 it's the sieve 23:05:43 i was trying to do a simple XML manipulation without a Scheme environment. perhaps i'm on doomed ground right now. 23:05:57 transformation i should say 23:06:16 offby1 you did see the letrec, right? 23:06:34 XSLT scares me. Takes namespaces to a ridiculous level. 23:07:12 -!- sjamaan [n=sjamaan@frohike-old.xs4all.nl] has quit [Remote closed the connection] 23:07:24 sjamaan [n=sjamaan@frohike-old.xs4all.nl] has joined #scheme 23:07:27 ->

or something like that. Don't know it though. 23:09:20 xz: I did. 23:12:47 rudybot: eval (printf "printf?") 23:12:47 xz: ; stdout: "printf?" 23:15:13 rudybot: eval (sqrt -1) 23:15:13 xz: ; Value: 0+1i 23:15:52 rudybot: eval pi 23:15:52 xz: ; Value: 3.141592653589793 23:18:45 oh, this is #scheme. I was tired enough to think it was ##C, and when eval (sqlt -1) I was so shocked you wouldn't believe it. Not to mention that ##C doesn't have rudybot. :p 23:18:53 sqrt, even 23:19:27 time for bed, I think 23:19:53 yes. :) 23:19:55 'night 23:20:51 -!- hellues [n=hellues@85.102.167.201] has quit [Read error: 113 (No route to host)] 23:25:12 -!- wingo-tp [n=wingo@23.Red-83-32-65.dynamicIP.rima-tde.net] has left #scheme 23:26:08 rudybot: eval (if #f #f) 23:26:08 xz: error: eval:1:0: if: bad syntax (must have an "else" expression) in: (if #f #f) 23:26:18 rudybot: eval (when #f #f) 23:27:22 rudybot: eval (let-syntax ((S (syntax-rules () ((_ i m e) (let loop ((i (- (/ m 2)))) (unless (= i (/ m 2)) e (loop (+ i 1)))))))) (let ((m 10)) (S x m (begin (display (S y m (if (> (sqrt (+ (* x x) (* y y))) (/ m 2)) (display "o") (display "x")))) (newline))))) 23:27:22 xz: ; stdout: "oooooxoooo#\nooxxxxxxxo#\noxxxxxxxxx#\noxxxxxxxxx#\noxxxxxxxxx#\nxxxxxxxxxx#\noxxxxxxxxx#\noxxxxxxxxx#\noxxxxxxxxx#\nooxxxxxxxo#\n" 23:27:26 hmm 23:27:33 hey, this is a family channel! 23:27:37 *offby1* shields his cat's eyes 23:28:06 I guess it won't print newlines 23:28:25 not really 23:28:32 rudybot: eval (values "hey" "you") 23:28:33 offby1: ; Value: "hey" 23:28:34 offby1: ; Value: "you" 23:29:44 -!- AshyIsMe [n=User@202.176.4.21] has quit ["Leaving"] 23:30:17 ah.. 23:30:31 certainty [n=closure@dslb-082-083-131-002.pools.arcor-ip.net] has joined #scheme 23:30:47 -!- hiyuh [n=hiyuh@KD125054017176.ppp-bb.dion.ne.jp] has quit ["|_ e /\ \/ i |/| G"] 23:31:12 rudybot: eval (display "x\ny\nz") 23:31:12 johnnowak: ; stdout: "x\ny\nz" 23:31:32 see? it's displaying newlines. 23:32:41 -!- Stateless is now known as DeadJarv 23:37:54 rudybot: eval (let-syntax ((l (syntax-rules () ((_ x m a e) (let loop ((x (- (/ m 2))) (a '())) (if (= x (/ m 2)) a (loop (+ x 1) e)))))) (s (syntax-rules () ((_ x) (* x x))))) (let ((m 40)) (apply values (l x m a (cons (apply string-append (l y m a (if (> (sqrt (+ (s x) (s y))) (/ m 4)) (cons "x" a) (cons "y" a)))) a))))) 23:37:54 xz: ; Value: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 23:37:55 xz: ; Value: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 23:37:56 xz: ; Value: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 23:37:56 xz: error: with-limit: out of time 23:38:10 rudybot: eval (let-syntax ((l (syntax-rules () ((_ x m a e) (let loop ((x (- (/ m 2))) (a '())) (if (= x (/ m 2)) a (loop (+ x 1) e)))))) (s (syntax-rules () ((_ x) (* x x))))) (let ((m 20)) (apply values (l x m a (cons (apply string-append (l y m a (if (> (sqrt (+ (s x) (s y))) (/ m 4)) (cons "x" a) (cons "y" a)))) a))))) 23:38:10 xz: ; Value: "xxxxxxxxxxxxxxxxxxxx" 23:38:11 xz: ; Value: "xxxxxxxxxxxxxxxxxxxx" 23:38:12 xz: error: with-limit: out of time 23:38:19 hmm why is that so slow? 23:38:51 dunno :-| 23:38:54 it's pretty fast in petite 23:39:10 you had it deliver many lines -- 10, 20, or more 23:39:12 maybe PLT doesn't like apply 23:39:28 I only give it a short amount of time to display those lines 23:39:53 how many lines can there be? 23:40:10 it's not the number of lines; it's that I only allow two seconds for something or other. 23:40:13 rudybot: eval (let-syntax ((l (syntax-rules () ((_ x m a e) (let loop ((x (- (/ m 2))) (a '())) (if (= x (/ m 2)) a (loop (+ x 1) e)))))) (s (syntax-rules () ((_ x) (* x x))))) (let ((m 10)) (apply values (l x m a (cons (l y m a (if (> (sqrt (+ (s x) (s y))) (/ m 4)) (cons "x" a) (cons "y" a))) a))))) 23:40:13 xz: ; Value: ("x" "x" "x" "x" "x" "x" "x" "x" "x" "x") 23:40:14 xz: ; Value: ("x" "x" "x" "x" "x" "x" "x" "x" "x" "x") 23:40:15 xz: error: with-limit: out of time 23:40:31 oh - it takes too long to print them? 23:40:41 you might actually (without intending to) be helping me find a bug 23:40:48 lemme check the source 23:40:52 rudybot: eval (values 1 2 3 4 5 6 7 8 9 10) 23:40:52 xz: ; Value: 1 23:40:53 xz: ; Value: 2 23:40:54 xz: error: with-limit: out of time 23:40:57 that's the problem 23:41:00 I want 10 values 23:41:02 (or more) 23:41:41 how can you know what I'm intending? 23:42:09 odd; my limit is two seconds, but I don't think it really took that long 23:42:25 oh, I sleep for one second after each line :) 23:42:30 wonder why I do that :-| 23:42:33 me too 23:42:42 probably to prevent people using the bot to spam the channel 23:42:49 -!- certaint1 [n=closure@dslb-082-083-156-044.pools.arcor-ip.net] has quit [Read error: 113 (No route to host)] 23:43:06 it's working 23:43:19 almost 23:43:22 rudybot: source 23:43:22 offby1: http://rudybot.ath.cx:1234 23:43:34 I saw you made him display a picture that looks like the old AT&T log 23:43:35 logo 23:44:11 rudybot: eval (let loop ((i 0)) (unless (> i 100000000) (display "spam") (loop (+ i 1)))) 23:44:15 xz: error: with-limit: out of memory 23:44:21 rudybot: eval (let loop ((i 0)) (unless (> i 100000) (display "spam") (loop (+ i 1)))) 23:44:41 xz: ; stdout: "spamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamspamsp 23:44:55 you made him do a lot of garbage collection! 23:45:28 xz: seriously -- please keep doing what you've been doing; I wouldn't be the least surprised if you wound up triggering the bug. And I _want_ it to trigger. 23:46:07 i have real work to do too =P 23:46:09 aw 23:46:17 procrastination 23:46:36 by the way that old AT&T logo was just supposed to be a circle 23:46:55 if the width to height ratio was the same it would have been 23:46:58 sure 23:47:03 approximately 23:47:07 no way you can tell what fonts we all are using. 23:47:29 I think you're the only one who saw it anyway 23:48:09 indeed; I'm watching the logs 23:49:07 -!- wasabi_ [n=wasabi@ntoska151203.oska.nt.ftth.ppp.infoweb.ne.jp] has quit ["Leaving..."] 23:56:14 klutometis: harro 23:56:20 rudybot: seen klutometis 23:56:21 offby1: klutometis was seen in/on rudybot seven minutes, twenty-six seconds ago, saying "eval (format #t "harro, mein ~A" 'Freund)", and then klutometis was seen in/on rudybot seven minutes, ten seconds ago, saying "eval (format "harro, mein ~A" 'Freund)" 23:56:32 busted! 23:56:40 rudybot: seen johnnowak 23:56:41 offby1: johnnowak was seen in/on #scheme two hours, thirty-one minutes ago, saying "it all makes sense now", and then johnnowak was seen in/on #scheme twenty-five minutes, twenty-eight seconds ago, saying "rudybot: eval (display "x\ny\nz")" 23:57:07 ooh 23:57:19 rudybot: help 23:57:21 such a feeling of power! It's the real reason I run the bot 23:57:31 rudybot: seen offby1 23:57:31 xz: offby1 was seen in/on #scheme fifty-one seconds ago, saying "rudybot: seen johnnowak", and then offby1 was seen in/on #scheme ten seconds ago, saying "such a feeling of power! It's the real reason I run the bot" 23:57:32 xz: I sorta never got around to "help" :-| 23:57:39 rudybot: source 23:57:39 offby1: http://rudybot.ath.cx:1234 23:57:42 there ya go 23:57:55 offby1: heh; i thought i triggered the bug that way, once 23:58:04 but i have a feeling you're dealing with heisenberg 23:58:33 his entomological counterpart, that is 23:58:54 yep 23:58:55 me too 23:59:01 I've got lots of tracing turned on 23:59:28 xz was stressing it pretty hard; I was hoping that he would trigger it, but ... 23:59:39 raikov [n=igr@203.181.243.11] has joined #scheme 23:59:45 I'm trying to write another program...