00:01:45 Mohamdu [~Mohamdu@CPE00222d6b3798-CM00222d6b3795.cpe.net.cable.rogers.com] has joined #scheme 00:03:22 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 00:05:51 -!- bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has quit [Remote host closed the connection] 00:11:04 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Read error: Connection reset by peer] 00:11:27 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 00:14:32 -!- groovy2shoes [~guv@unaffiliated/groovebot] has left #scheme 00:14:41 kanru [~kanru@118-160-160-172.dynamic.hinet.net] has joined #scheme 00:25:03 wisey [~Steven@host86-150-108-29.range86-150.btcentralplus.com] has joined #scheme 00:25:26 hi, how do I load a file in scheme. I'm using dr scheme 00:25:44 i've tried (load "C:\\Program Files (x86)\\PLT\\simply.scm") 00:25:50 on windows 00:26:07 rgrau [~user@62.Red-88-2-20.staticIP.rima-tde.net] has joined #scheme 00:28:25 -!- alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Quit: alexsuraci] 00:28:33 alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 00:30:15 alexsuraci_ [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 00:31:01 -!- alexsuraci_ [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Client Quit] 00:31:24 alexsuraci_ [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #scheme 00:33:04 -!- alexsuraci [~alexsurac@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Ping timeout: 250 seconds] 00:33:04 -!- alexsuraci_ is now known as alexsuraci 00:37:28 wisey, what error do you get 00:37:53 simply.scm:8:0: compile: unbound identifier (and no #%app syntax transformer is bound) in: #%top-interaction 00:38:17 are you using drscheme? 00:38:28 oh you said you were 00:38:34 ok so where are you typing this? in the top window or the bottom 00:38:35 ye 00:38:43 top 00:38:57 do you see #lang racket as the first line? 00:39:09 this is my entire program so far 00:39:13 #lang scheme 00:39:13 (load "C:\\Program Files (x86)\\PLT\\simply.scm") 00:39:45 Tasser: What implementation do you use? The error is *weird* 00:40:01 i'm trying to load a file from brian harveys book 00:40:09 wisey, is the language set to 'use language declared in source' ? 00:40:12 or r5rs or something 00:40:19 What implementation would not allow several expressions in the function body? 00:40:24 ? 00:40:26 don't you want #r6rs ? 00:40:32 or r5rs 00:41:06 wisey, goto the language dialog box in the menu bar 00:41:21 yes i am 00:41:30 what does it say 00:41:36 use the language declared in the source 00:41:56 does your program work (at least not error) if you put a ; in front of the load line? 00:42:35 -!- DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has quit [Ping timeout: 240 seconds] 00:43:23 i think so. at least it doesn't give any output 00:44:41 jonrafkind 00:45:22 ok 00:45:28 whats in simply.scm 00:46:06 some small programs written by brian harvey 00:46:22 from his book simply sheme 00:46:45 i did change some stuff though, maybe I broke the programs 00:46:52 hang on 00:50:48 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 00:50:58 actually just ignore that cos the original source code isn't compatible either jonrafkind 00:51:10 back to the same problem 00:57:18 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 00:57:36 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 00:57:36 -!- lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has quit [Read error: Connection reset by peer] 00:57:59 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Client Quit] 00:59:28 -!- alvatar [~alvatar@4.23.222.87.dynamic.jazztel.es] has quit [Quit: leaving] 01:01:32 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 01:01:44 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Client Quit] 01:02:44 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 01:02:54 lololol 01:03:05 i quit cs 01:03:25 -!- xwl_ [~wixu@nat/nokia/x-mwbzffdhddwrxsdq] has quit [Remote host closed the connection] 01:03:49 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 01:04:39 -!- Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has quit [Quit: Leaving] 01:05:00 qhe [~qhe2@134.134.137.71] has joined #scheme 01:05:57 how hard can it be. I need help with loading files in scheme 01:06:13 -!- kanru [~kanru@118-160-160-172.dynamic.hinet.net] has quit [Ping timeout: 246 seconds] 01:06:22 jonrafkind you given up on me? 01:06:40 yea sorry i have no idea whats wrong 01:08:37 -!- pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has quit [Ping timeout: 240 seconds] 01:10:55 wisey: http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-9.html 01:13:38 adu, sorry, thats not helping me. I need a bit more of a push 01:14:04 lol 01:15:26 xwl_ [~wixu@nat/nokia/x-nlhuyoijiyzkzlgl] has joined #scheme 01:17:43 wisey: well, it really depends on your implementation 01:18:30 adu, DrScheme 01:19:45 then use open-input-file 01:22:13 thats not what he wants obviously 01:22:19 he wants to load code 01:24:23 has anybody here read brian harveys book and installed some software that will run the examples? 01:24:58 Caleb-- [thedude@bzq-79-181-21-100.red.bezeqint.net] has joined #scheme 01:25:18 cos actually. I just tried to run some of his code and that produces an error also. 01:25:59 i think he's probably got some version running on linux for his students 01:26:11 he uses some version of emacs 01:26:21 sorry I don't have a clue about these things 01:26:36 I normally just use visual studio and maya etc. 01:29:01 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Read error: Operation timed out] 01:30:06 -!- leppie [~lolcow@196-215-126-77.dynamic.isadsl.co.za] has quit [Read error: Connection reset by peer] 01:31:42 leppie [~lolcow@196-215-126-77.dynamic.isadsl.co.za] has joined #scheme 01:34:03 -!- pumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 01:35:46 -!- masm [~masm@bl16-170-191.dsl.telepac.pt] has quit [Quit: Leaving.] 01:35:54 -!- rgrau [~user@62.Red-88-2-20.staticIP.rima-tde.net] has quit [Remote host closed the connection] 01:41:19 -!- Caleb-- [thedude@bzq-79-181-21-100.red.bezeqint.net] has quit [Ping timeout: 260 seconds] 01:42:25 Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has joined #scheme 01:44:03 -!- carleastlund [~cce@gotham.ccs.neu.edu] has quit [Quit: carleastlund] 01:45:43 Caleb-- [thedude@bzq-109-66-11-209.red.bezeqint.net] has joined #scheme 01:46:14 my book says that some scheme systems allow a program to be loaded permanently so that it'll be there automatically from then on. Only thing is, his source code won't run in my drscheme 01:51:08 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 01:51:08 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Read error: Connection reset by peer] 01:51:23 Tekk_ [~user@cpe-071-077-209-233.ec.res.rr.com] has joined #scheme 01:51:32 is there a specific not equals? 01:51:38 or is it like not wrapping around eq? 01:51:54 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 01:52:25 You can use `not' with any kind of equality you want, not just eq? :-) 01:52:53 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 01:52:57 wisey: It doesn't sound like your problem is with loading, but just getting his code to work, which is presumably using a different language than what you've selected. 01:53:16 fds: so (not 1 3) will return #t? 01:53:51 wisey: DrScheme allows you to select from multiple scheme dialects, perhaps you should select a different one 01:53:53 Tekk_: afaik, just use not. r6rs might have something else, but I'm not aware of it. 01:53:59 Tekk_: No, you need some kind of equality operator to use with the not. In that case (not (= 1 3)) 01:54:08 ah 01:54:31 Tekk_: But, my point was you could use =, eq?, eqv?, equal?, &c 01:54:41 al, okay 01:54:43 -!- Tekk_ [~user@cpe-071-077-209-233.ec.res.rr.com] has left #scheme 01:54:51 Heh 01:54:56 Equality is complicated... 01:55:36 fds: Then there's char=?, string=?, etc. :-P 01:55:54 Yeah, I wasn't going to list them all! 01:56:05 Surprisingly, I have other things I want to do today 01:56:10 ;-) 01:56:57 Very surprisingly. :-P 02:02:03 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 02:02:03 Indeed 02:02:30 In fact, just wait a moment and I'll start asking annoying questions of my own. :-) 02:03:03 kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #scheme 02:03:40 :-P 02:05:16 copumpkin [~pumpkin@209-6-232-56.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com] has joined #scheme 02:05:16 -!- copumpkin [~pumpkin@209-6-232-56.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com] has quit [Changing host] 02:05:16 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 02:06:07 accel [~accel@unaffiliated/accel] has joined #scheme 02:07:59 -!- MrFahrenheit [~RageOfTho@users-146-124.vinet.ba] has quit [Ping timeout: 265 seconds] 02:11:23 mejja [~user@c-b4b5e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 02:17:35 -!- pavelludi [57f63ac1@gateway/web/freenode/ip.87.246.58.193] has quit [Ping timeout: 265 seconds] 02:18:03 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 02:26:17 -!- githogori [~githogori@105.sub-75-210-175.myvzw.com] has quit [Read error: Connection reset by peer] 02:26:21 obfuscate, ye its his code. I can define simple arithmetic functions and call them but his code won't run. I'm having the same problem with SICP and Simply Scheme. 02:28:09 maybe I should ask the author which scheme system will run his code on windows vista (my os) 02:31:05 mwolfe [~michael@cpe-67-49-72-40.socal.res.rr.com] has joined #scheme 02:31:41 incubot: Most other langs drivel with jargons, pettiness, comp-sci pretentiousness, while their content is mathematically garbage. 02:31:45 pettiness! :) 02:42:54 wisey: You may have an easier time with htdp(.org), which was written for drscheme. If you want to use other books, you'll need to be aware of some subtle differences between environments or standards (most books and implementations are mostly conforming to r5rs). 02:45:44 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 02:46:35 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 02:48:22 obfuscate, I would like to use the two books i've purchased. Simply Scheme and Structure and interpretation of computer programs 02:48:29 -!- bgs100 [~ian@unaffiliated/bgs100] has quit [Quit: 'night, all!] 02:49:19 Only thing I can suggest is to make sure you're setting racket (drscheme) to use r5rs, not that I actually know how to do that :) 02:49:32 environments, ye I think thats the issue. I don't have anything that can read brian harveys code and then enjoy calling his procedures as I read through the text 02:51:54 Anyone familiar with SRFI-45 and exactly why it's needed? 02:52:08 darn it, programming is a big subject 02:52:33 Yes, foof. It's because (delay (force x)) isn't tail-recursive whereas (lazy x) is. 02:53:03 wisey: indeed it is. but scheme is a good place to begin (or learn in the middle, or the end, as long as you do it sometime :) 02:53:16 A little more specifically, forcing (delay (force ...{n times}... (delay (force x)) ...)) runs in O(n) space, whereas forcing (lazy ...n times... (lazy x) ...) runs in O(1) space. 02:53:34 wisey: sicp should be straightforward with #lang r5rs, although I can't comment on the other book. 02:54:31 Why does this matter? This lets procedures returning promises defer figuring out what they are going to promise by wrapping their bodies in (lazy ...). Example: STREAM-FILTER needs to know whether to return nil or a stream pair. But it doesn't know which until it has forced its argument. On the other hand, the caller doesn't want STREAM-FILTER to force its arguments until the caller actually needs to look at the filtered stream. 02:55:16 Solution: Replace (define (stream-filter predicate stream) (if (stream-pair? stream) ...)) by (define (stream-filter predicate stream) (lazy (if (stream-pair? stream) ...))). 02:55:17 Riastradh: Thanks, your first answer made much more sense than anything I've read on the topic. 02:56:43 I live in Yorkshire, UK. But I'd like to learn computer programming through berkeley and MIT video lectures. I find it really interesting 02:56:48 But (delay (force x)) is a specific idiom used for streams, and there are other ways to implement streams. 02:57:18 (and in the context of WG1 there is no streams library) 02:58:13 wisey: well you picked a difficult but good starting point 02:58:21 The next question being, is it possible to make (delay (force x)) properly tail recursive, possibly with compiler optimizations? 02:58:28 I read a book by cliff stoll who was from UC Berkeley 02:59:07 Doing anything else is pretty silly. Either you make a stream-promise which is not a promise, in which case you must also make STREAM-DELAY, STREAM-FORCE, and STREAM-LAZY, which fail to compose with any existing laziness operations; or you require STREAM-FILTER to be more eager than necessary (e.g., with odd streams instead of even streams), which is error-prone and leads to more complicated code. 02:59:27 and the computer science page on wikipedia links with those video lectures 03:00:22 Yeah, MIT 6.001 is arguably one of the best introductions to computer science there is, not necessarily what you want if you just want to get to the coding and make real world stuff right away, but great if you want to grok what's really going on 03:00:25 I hope they keep running them until I've had time to get into it 03:00:26 Your compiler could just recognize (delay (force x)) and rewrite it as (lazy x). But I don't think that's worthwhile. The trouble is that FORCE needs to be an iteration, not a (let ((x ((promise-thunk promise)))) (cache-promise! promise x) x) recursion. 03:00:34 DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has joined #scheme 03:01:30 oh i wouldn't worry about that, for the SICP course those lectures were recorded years ago and won't be going anywhere 03:01:55 iTunes U on iPad/iPhone links up with Berkeley Webcasts and MIT OCW so its really handy 03:02:57 i'm learning visual studio aswell 03:03:01 and maya 03:03:11 What kind of laziness operations would streams need to compose with? They seem very different beasts to me. 03:03:13 programming is awesome 03:03:57 A lazy fold-right. 03:04:51 Fold doesn't make sense on a lazy object, you want to fold over a sequence type like a stream. 03:05:14 But you can't really get lectures by english universities of the same quality as American uni's like berkeley and mit 03:06:15 Yeah MIT's opening up of their lectures is very nice, i believe they eventually plan to have pretty much every class online 03:06:20 -!- myu2 [~myu2@v077103.dynamic.ppp.asahi-net.or.jp] has quit [Remote host closed the connection] 03:06:24 I mean (define (fold-right f x l) (if (pair? l) (f (car l) (delay (fold-right f x (cdr l)))) x)), or some variation on the theme. 03:06:37 Nice for those of us who were accepted but couldn't afford to go even with financial aid :) 03:06:58 Perhaps (define (fold-right f x l) (lazy (if (pair? l) (f (car l) (lazy (fold-right f x (cdr l)))) x))) would be more appropriate. 03:07:16 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 03:07:21 robtillotson, you were accepted at MIT? 03:07:59 yes, it was one of my "give it a shot and see what happens" schools when i was applying 03:08:07 Then (define (list->stream list) (fold-right (lambda (x y) (stream-cons x y)) stream-nil l)) DTRT. 03:08:31 Riastradh: So you want to expose the stream implementation as being a list whose cdr's are wrapped in promises? 03:08:32 robtillotson, then you're a genius. lol 03:08:33 but due to a disparity between the calculations for financial aid vs. parental contributions, and the actual ability of my parents to contribute, i couldn't have gone to any private school anyway 03:08:54 wisey: I have a friend who's an MIT alumnus, who thinks that MIT is overrated. :-P 03:08:58 Yes, foof. 03:10:17 OK, but I don't see what that gains you. The operations you propose are all stream operations. 03:10:39 Not to mention on top of the cost of school, living in boston would probably have been expensive too 03:10:49 The FOLD-RIGHT I defined takes a list, not a stream. 03:11:21 That's why everyone in who lives in Boston lives in Somerville, robtillotson, duh. 03:11:49 (Except for the rich financiers, who presumably live in Manhattan anyway.) 03:12:35 Heh well I have no idea, i've only been there a couple of times to visit and just hung out in cambridge with friends :) 03:13:01 ...who all live in Somerville, right? 03:13:35 Nope, at the time they actually lived in cambridge 03:13:47 Oh, well, that's just a suburb of Somerville. 03:14:10 Harvard and MIT grad students and an MIT postdoc, at the time 03:14:30 Oh, I see. They slept under their desks, presumably. 03:14:42 Riastradh: If you're generating a stream you can use stream-cons, if not, the underlying stream implementation doesn't matter. 03:14:43 lol 03:14:46 (or sometimes on top of their desks, giving them nasty cases of qwertitis, I imagine) 03:15:34 wall wait, the postdoc didn't live in cambridge, she had an apartment on revere street(? ancient neighborhood near the T stop across the river from cambridge), it was like a closet and i didn't even dare ask what it cost 03:15:44 foof, what I described with FOLD-RIGHT is a lazy abstraction that doesn't know about streams. But it doesn't compose (practically) with operations on streams unless streams are (delay (cons x y)). 03:15:54 (or (delay '())) 03:16:55 What can I say, I like being way out in the beyond-suburbs where I can crank up my sound system and nobody cares :) 03:21:17 Riastradh: That seems to me to be composing by coincidence, I don't find it very convincing. 03:21:36 accel [~accel@unaffiliated/accel] has joined #scheme 03:22:32 It is a coincidence only if you treat `stream' as an abstraction on its own instead of as a list, situated in the lazy world. 03:26:34 The lazy world can be a fun place, especially if you like white russians, but only when lazy abstractions fit together... 03:26:58 -!- Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has quit [Quit: Leaving] 03:31:54 bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has joined #scheme 03:35:13 epichero [~chatzilla@163.sub-72-102-3.myvzw.com] has joined #scheme 03:45:26 -!- parcs [~patrick@ool-45741d7d.dyn.optonline.net] has quit [Ping timeout: 240 seconds] 03:47:05 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 03:47:08 parcs [~patrick@ool-45741d7d.dyn.optonline.net] has joined #scheme 03:52:33 timj_ [~timj@e176193225.adsl.alicedsl.de] has joined #scheme 03:55:53 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 03:56:58 -!- timj__ [~timj@e176197151.adsl.alicedsl.de] has quit [Ping timeout: 276 seconds] 04:01:01 *offby1* spoils Riastradh's rug 04:01:13 homie` [~levgue@xdsl-78-35-163-140.netcologne.de] has joined #scheme 04:01:18 wbooze` [~levgue@xdsl-78-35-163-140.netcologne.de] has joined #scheme 04:04:14 -!- homie [~levgue@xdsl-78-35-138-242.netcologne.de] has quit [Ping timeout: 260 seconds] 04:04:37 -!- wbooze [~levgue@xdsl-78-35-138-242.netcologne.de] has quit [Ping timeout: 276 seconds] 04:06:04 -!- copumpkin is now known as zygohistomorphic 04:08:42 -!- didi [~user@unaffiliated/didi/x-1022147] has quit [Remote host closed the connection] 04:12:24 if I have an object, a, and it's bound to some object that could be ANYTHING, and I have (define b a), (eq? b a) will always return #t, right? 04:12:43 phao: Hahahahahahahahahaha. 04:12:56 phao: There was this discussion with jonrafkind, you may remember. 04:13:07 phao: Where he said that as of R6RS, this is not necessarily guaranteed. 04:13:12 I remember getting more confused on eq? 04:13:16 No, phao, but (eqv? b a) will be. 04:13:36 hmm 04:13:43 are there eq-* for types? like 04:13:47 eq-number? 04:13:49 eq-string? 04:13:53 Prefer EQV? over EQ? unless you know what you're doing. 04:13:56 eq-symbol? eq-list? eq-vector? ... 04:14:16 For numbers, use = -- but note that = and EQV? consider exactness differently. 04:14:22 For strings, use STRING=?. 04:14:38 hm, getting better =) 04:14:42 For symbols, use EQV?. EQ? will work too, but EQV? is a safer default choice. 04:15:05 what I don't like about eq? is that people try to explain it as a pointer comparison in a language, scheme, with no explicit pointers (afaik). 04:15:36 For lists, well, how do you want to compare the elements? SRFI 1 defines an operation (LIST= elt= list-a list-b ...) which compares the lists pairwise, and pairs corresponding of elements of pairs of lists by elt=. 04:16:34 hard to answer that question... I don't know very much on scheme data types 04:16:48 I'm pretty sure I'll be able to come up with something when I finish reading more on scheme... 04:16:55 In most implementations of Scheme, there is a uniform representation for objects in which every object is represented by a machine word, usually a string of 32 or 64 bits, of which some bits are interpreted as tags, and for some of the tags, the rest of the bits are interpreted as a pointer into memory. 04:16:56 I just wanted to understand the logic behind eq? 04:17:13 For the other tags, there are enough bits left in the word to represent everything about the object. 04:17:19 because, so far, eq? looks like a huge table of rules, unrelated to eachother.. 04:18:09 For example, in Scheme48, the low two bits are interpreted as a tag. If the tag is 00, then the word as a whole is interpreted as a small integer called a `fixnum', and the rest of the bits are the integer's value encoded in two's-complement. 04:18:45 If the tag is 11, then the word as a whole is interpreted as something that is neither a fixnum nor any other kind of immediate object; the remaining bits form a pointer into memory, where further information about the object is stored. 04:19:05 is that standarized?! 04:19:23 No. I'm talking about implementation details of Scheme48. 04:19:23 phao: Of course not. 04:19:36 It's pretty similar to how pretty much every Scheme system works, though. 04:19:59 That is, the general idea is pretty much the same in every Scheme system, but all the details are different. 04:21:51 To represent a pair in Scheme48, given a representation for (i.e., given a machine word describing) its car and one for its cdr, one must find three contiguous locations for words in memory. The first location stores a header word, which has some type information saying that the object is a pair (and a tag 01 or 10, I forget which); the second stores the word representing the pair's car; and the third stores the that for its cdr. 04:21:57 EQ? doesn't care about any of my last message. 04:22:17 didi [~user@unaffiliated/didi/x-1022147] has joined #scheme 04:22:22 It just looks at the 32 bits representing the first object, and the 32 bits representing the second object, and tells you whether they are the same 32 bits or not. 04:23:17 lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has joined #scheme 04:23:37 -!- MichaelRaskin [~MichaelRa@195.91.224.225] has quit [Ping timeout: 240 seconds] 04:23:50 I mentioned fixnums -- small integers. Large integers, whose two's-complement representations need more than 30 bits, are stored in memory and represented by tagged pointers, just like pairs. 04:24:12 The representations for such large integers are usually called bignums. 04:24:13 accel [~accel@unaffiliated/accel] has joined #scheme 04:24:33 -!- bombshelter13b [~bombshelt@76-10-149-209.dsl.teksavvy.com] has quit [Quit: bombshelter13b] 04:24:57 In Scheme48, two bignums may represent a common integer, but be stored in different locations in memory. In this case, EQ? will return false for them. 04:25:54 I wonder if any Scheme implementations implement bignum interning. :-P 04:26:02 so is tiny clos dead or what's the story/ can't find a homepage anywhere 04:26:04 Furthermore, a compiler may look at (let* ((x 3) (y x)) (eq? x y)), and rewrite it as (let* ((x 3) (y 3)) (eq? x x)), and -- if 3 were represented by a bignum rather than a fixnum -- produce two distinct bignums in the compiled representation for this program. In this case, the whole expression will yield false when evaluated. 04:26:17 ...am somewhat tempted to roll my own object system. it was fun in Lua 04:26:27 I don't think Tiny-CLOS ever had a home page. 04:26:36 Riastradh, so 04:26:49 where does the rules that specify eq? come from? 04:26:52 It's three source files. Half of tiny-clos.scm is a red herring, too. 04:27:00 how so? 04:27:19 phao: there's a section on them in TSPL, it's a good explanation 04:27:35 lewis1711, I'm reading that book... I'm in section 2.8 04:27:39 though tbh I still forget...there's physical equality, structural equality and...something inbetween, or something 04:27:48 *lewis1711* is clearly a scheme expert 04:28:01 hehe.. 04:28:04 lewis1711, well, it's unnecessary to use the same object to represent both generic procedures and their associated method tables. Tiny-CLOS has a stupid hack to do this which covers the first half of tiny-clos.scm or something. 04:28:14 -!- DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has quit [Ping timeout: 240 seconds] 04:29:17 I see. I might attempt rolling my own then. it really wasn't too painful in Lua and scheme should be better for this sort of thing 04:29:20 phao, basically, EQ? is supposed to be at most as coarse-grained as EQV?. In other words, if (eq? x y), then (eqv? x y). It may disagree with EQV?, though, for objects that are not, to mere mortal Scheme programs, observably different, but are technically expedient to distinguish in implementation. 04:29:37 lewis1711, what's an `object system'? 04:30:00 Riastradh: encapsulation and message passing/methods, I guess 04:30:19 I don't need to get too fancy with it. single inheritance if i am skilled, or maybe go the prototype way 04:30:20 Oh, in that case, you don't want to go near Tiny-CLOS; it has nothing to do with message passing. 04:30:32 ah 04:30:33 Nor does it have anything to do with encapsulation, for that matter, although there is an example of encapsulation in support.scm. 04:30:40 ...excuse me, in tiny-examples.scm. 04:30:46 (or whatever it's called; I forget) 04:30:47 making object systems in scheme is fun, I'm on my second or third one and I've only been using scheme for a couple of months :) 04:30:50 then I have to wonder what it does do:D 04:32:01 -!- accel [~accel@unaffiliated/accel] has quit [Ping timeout: 265 seconds] 04:32:17 lewis1711: the art of the metaobject protocol is a nice starting point for CLOS 04:32:19 -!- Caleb-- [thedude@bzq-109-66-11-209.red.bezeqint.net] has quit [Ping timeout: 255 seconds] 04:32:25 What does it do? Well, it does two things: it gives a taxonomy (`ontology', I suppose) to collections of objects, and a mechanism for dispatching on objects' representations (`classes') based on a unique map from object to class. 04:32:54 -!- chandler [~bem@opendarwin/developer/chandler] has quit [Quit: leaving] 04:33:34 accel [~accel@unaffiliated/accel] has joined #scheme 04:33:38 The code is more complicated, but the distinction between the two concepts -- and a third, not represented in Tiny-CLOS, of making said dispatch fast with a hairy cache -- is a little more clearly explained in MIT Scheme's generic procedure subsystem, and the SOS (Tiny-CLOS-alike) built atop it. 04:35:25 If you really want an object system that is more like the typical dynamic smalltalkish objects found in other popular languages, you can implement it in like one page of scheme 04:35:42 Oh, Tiny-CLOS also gives a mechanism for laying out objects' guts in memory, and a way to extend that to different gut layouts that look the same to programs. (This part is about `instances' and `slots'. The first part I mentioned is the `class' hierarchy. The second part is the procedure CLASS-OF, and the generic procedure system.) 04:36:52 ftp://ftp.parc.xerox.com/pub/openimplementations/tiny/ 04:37:10 hmm I guess the problem is the most small talk like object system I've used is ruby. I somehow don't see java/c++/simula style oop really working in scheme 04:37:40 or rather, i'm sure you could get it working, but it would feel...odd IMO 04:38:20 yeah, it's interesting to play with as a way to understand what's going on in such systems, but you might not want to use it for actual work 04:38:22 Well, it would feel odd partially because it would require a lot more manual work than in Java or C++, in which the same work is done by the compiler and driven by the type system. 04:38:29 By the static type system, that is. 04:38:57 Caleb-- [thedude@bzq-79-181-23-221.red.bezeqint.net] has joined #scheme 04:39:32 hmm 04:39:32 It's somewhat instructive that you can essentially duplicate the ruby/python/smalltalk/obj-c type of object system in a single function in scheme, though :) 04:39:49 what is this "multiple dispatch" I keep hearing of? 04:39:54 robtillotson: oh? :O 04:39:57 well okay, a single function with some others nested inside it, but as far as I'm concerned that's just one :) 04:40:24 Not exactly, robtillotson, because all four of those languages support reflection that is not reflected by a CASE expression. 04:41:12 Well, to some degree you can get the same effect by using a method table and predefined methods to inspect it 04:41:15 scheme sort of has encapsulation by just using a let inside a define, doesn' tit? 04:41:21 exactly 04:42:00 -!- epichero [~chatzilla@163.sub-72-102-3.myvzw.com] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.13/20101203075014]] 04:42:00 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 04:42:28 never used smalltalk but I've read that when you send it a message it can't understand, things don't crash. which makes more sense to me. I mean I don't explode when someone speaks japanese to me 04:43:23 lewis1711, in Ruby, Python, Objective-C, Smalltalk, &c., when you invoke a `method' (`pass a message', whatever you call it), say foo.bar(baz, quux), or foo bar: baz with: quux, or [foo bar: baz with: quux], the language's dispatch mechanism decides what behaviour is invoked solely from foo and the name of the method, not from any information about baz or quux. 04:43:44 well it doesn't crash, but iirc it does something like call notImplementedError: on the base class, or something. been a long time since i have used actual smalltalk. 04:44:07 In Common Lisp, when you apply a generic procedure, say (bar foo baz quux), the language's dispatch mechanism decides what behaviour is invoked based on the class of FOO, the class of BAZ, and the class of QUUX. 04:44:28 The same goes for Dylan, Tiny-CLOS, SOS, &c. 04:44:32 jonrafkind [~jon@jonr5.dsl.xmission.com] has joined #scheme 04:44:39 Ruby &c. do single dispatch. Common Lisp &c. do multiple dispatch. 04:44:54 ahhhhh 04:45:07 Riastradh: that's a great explination, thanks 04:45:19 single dispatch sounds fine by me then 04:45:44 In C++ and Java the story looks a little more complicated for complicated reasons, but essentially, they do single dispatch too, and pretend to do multiple dispatch (`overloading') by using very funny names inside, which is why if you run nm on a compiled C++ program it makes your eyes cross. 04:47:14 -!- tupi [~david@186.205.37.15] has quit [Quit: Leaving] 04:47:20 (If you have never experienced eye-crossing, just run `nm /usr/lib/libstdc++.a' and try to read the output; that should work on most systems, except for reading the output.) 04:50:08 Consider the operation (+ a b) in a system with multiple different representations for numbers. 04:50:38 Just so you know, though, doing such a thing has results similar to those described in the works of HP Lovecraft, when a foolish human looks upon an eldritch horror :) 04:50:55 Hm, I haven't got that file, does `nm /usr/lib/gcc/x86_64-linux-gnu/4.3/libstdc++.a' work too? 04:51:13 yeah 04:51:23 fds, I don't know -- you'll have to figure out yourself whether that makes your eyes cross; I can't see you from here. 04:51:32 :-) 04:51:37 hehe 04:51:52 (Unless you're that sketchy-looking guy over in the corner who just looked up and grinned at nobody in particular. Are you?) 04:51:55 I don't think that's a fair comparison: function overloading doesn't "pretend" to do multiple dispatch... rather multiple dispatch /requires/ overloading, which you don't get without name mangling or table lookups. 04:52:19 That does sound like me, but I think I'm in a different corner. 04:53:52 What distinction are you drawing between multiple dispatch and overloading? The distinction I intended to draw is whether a name carries a single common meaning and chooses behaviour depending on the observed representation of the arguments (multiple dispatch), or whether a common name is used for multiple different meanings altogether disambiguated by a static type system (overloading). 04:55:08 In those senses, Common Lisp does multiple dispatch, whereas C++ does overloading. 04:55:17 accel [~accel@unaffiliated/accel] has joined #scheme 04:56:14 myu2 [~myu2@58x5x224x106.ap58.ftth.ucom.ne.jp] has joined #scheme 04:57:37 I mean dynamic dispatch methods (single vs multiple doesn't really matter in this case), versus static overloading... so we're pretty close on intent. 04:58:46 The point I wanted to draw though is that multiple dispatch in dynamically typed languages usually draw on table lookups (or a horrible series of "if" expressions), which effectively amounts to the same thing. 05:01:02 oh dear, reading about object systems on the scheme wiki. so...much...choice 05:01:25 Hence my question: What is an `object system'? 05:04:34 Here's a stab at it. In the C object system, an object is a contiguous sequence of bytes stored in memory, with a particular address representing its identity. There is a partial order on object addresses relating certain objects to others (notably, in arrays and in structs). Objects can be copied to argument positions in procedure calls, or copied to return from procedures. In the Scheme object system, an object is just about anything with a 05:04:41 Oops, I was probably truncated. 05:05:05 `anything with s' 05:05:13 s/s/a/ 05:05:29 -!- mejja [~user@c-b4b5e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 05:06:16 (...was the last thing that got through) 05:06:29 In the Scheme object system, an object is just about anything with an observable presence in the program. Objects can be passed as arguments to procedures or returned from procedures. A variable is (essentially) a location where an object may be stored. 05:07:14 I guess.. creating a prototype, cloning a prototype, and sending it messages would be a good place to start (leaning towards prototypes here) 05:07:25 One important difference between Scheme and C is that in C, variables are immutable and objects cannot be passed as arguments to procedures or returned from procedures (in fact, many objects immediately cease to exist when a procedure returns -- all objects created for `auto' variables), and variables are immutable. In Scheme, quite the opposite is true. 05:07:58 (Excuse me; C variables are only immutable, not doubly so.) 05:08:20 But maybe the examples I am giving are not examples of what you want to call `object systems'. 05:08:34 (Usually the term I use for these beasts is `object model'.) 05:10:00 I suppose OOP system is a better word 05:10:24 (no matter what term I use to describe computer science things in IRC, someone will bite me in the ass;)) 05:10:27 Java, Scheme, Ruby, Python, Smalltalk, Common Lisp, Erlang, Emacs Lisp, and ML all share approximately the object model of Scheme, except that in some subset of those, variables are immutable. 05:11:01 `OOP system' doesn't say anything more than `object system'; the two words it adds, `-oriented' and `programming' hardly add any meaning. 05:12:01 what was wrong with my protoyping one then? 05:12:27 -!- phao [~phao@189.107.211.14] has quit [Quit: Leaving] 05:13:02 Riastradh: I'm having a hard time figuring out what your point is. It sounds to me like you consider the requirement of passing by reference to define an object system (afaict, that's the only difference you've mentioned between the languages), while the same effect can be achieved in C by passing a pointer. 05:13:41 -!- Caleb-- [thedude@bzq-79-181-23-221.red.bezeqint.net] has quit [Ping timeout: 260 seconds] 05:14:19 My point is that `object system' isn't a very meaningful term. 05:14:33 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Read error: Connection reset by peer] 05:14:35 lewis1711: In order for an object system to make sense, you first need to figure out what kind of type system is palatable to you: it doesn't work otherwise. 05:14:44 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:14:52 Riastradh: Heh, fair enough. 05:15:01 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Client Quit] 05:15:14 what do you mean by type system? 05:15:14 I didn't say anything about `references', though. 05:15:55 (The terms `call-by-reference' and `call-by-value' may not be as meaningless as `object system', but they make up for that by being confusing.) 05:16:09 lewis1711: What is an object? How do you determine what operations to apply to it, or what operations are even valid? 05:16:10 call-by-whim is my favorite 05:16:40 Your categories are showing, copumpkin. 05:16:47 yeah I have a pretty good idea on all that Obfuscate 05:17:03 eek! 05:17:05 -!- zygohistomorphic is now known as copumpkin 05:19:16 Riastradh: You mentioned that variables in C are immutable and can only be copied, while it's the opposite in scheme: the only way I can make sense of that is that you're labeling C semantics as pass-by-value while scheme semantics are pass-by-reference. 05:19:27 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:20:07 didi` [~user@unaffiliated/didi/x-1022147] has joined #scheme 05:20:34 -!- didi [~user@unaffiliated/didi/x-1022147] has quit [Read error: Connection reset by peer] 05:20:52 Caleb-- [thedude@bzq-79-182-17-203.red.bezeqint.net] has joined #scheme 05:21:46 I didn't label either semantics with either term! 05:23:10 http://community.schemewiki.org/?simple-object this looks like a nice enough starting point 05:23:13 Obfuscate: C++ supports both pass-by-value and pass-by-reference; however, C++ variables are just as immutable as C's. 05:23:27 didi`` [~user@scorpion.tdkom.psi.br] has joined #scheme 05:23:55 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Read error: Connection reset by peer] 05:24:03 Riastradh: I have no idea what you mean if not that. 05:24:04 If one has `int x;', C doesn't have the notion of passing the object x to a procedure. It does have the notion of passing a copy of x to a procedure, and it does have the notion of constructing another object called a pointer and passing that to a procedure. 05:24:52 -!- didi` [~user@unaffiliated/didi/x-1022147] has quit [Ping timeout: 240 seconds] 05:24:54 cky: You're using a confusing notion of immutability to me. 05:25:14 Obfuscate, concerning immutability: 05:25:15 kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #scheme 05:25:51 -!- Caleb-- [thedude@bzq-79-182-17-203.red.bezeqint.net] has quit [Ping timeout: 272 seconds] 05:25:51 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 05:25:55 Obfuscate: The way I understood Riastradh's definition of immutability, C and C++ variables cannot be rebound. Scheme variables can be. 05:26:05 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 05:26:13 Riastradh: Sure, which is what scheme does by default. 05:26:19 Let's suppose I have `struct s { int i; } x, y;'. If I first run `x.i = 0;', then nothing I do will induce `y.i = 1;' to cause a subsequent evaluation of `x.i' to yield (a copy of) 1. Consequently, the objects x and y are different. 05:26:22 -!- wisey [~Steven@host86-150-108-29.range86-150.btcentralplus.com] has quit [Quit: Leaving] 05:27:13 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 05:27:24 In Scheme, though, if I have (let ((x (cons 0 0)) (y (cons 0 0))) ... (set-car! y 1) (car x)), there does exist an expression to fill the ellipsis so that this whole expression yields 1. 05:27:48 That expression is (set! y x). Scheme has mutable variables. 05:27:56 -!- didi`` is now known as didi 05:28:31 In C, however, I can't change what object the name y names -- it will never be the same object as what the name x names. 05:29:20 (I could also have illustrated that by observing that no matter what I do, &x == &y will never yield true. However, this illustration doesn't map very well to Scheme, because Scheme has no notion of the address of an object in the language uniquely identifying it.) 05:29:30 ... except that set-car! requires that a cons pair functions as a pair of pointers, so to draw the same conclusion in C you would need to introduce pointers. 05:29:45 Obfuscate: This has nothing to do with pointers, but to do with rebinding variables. 05:29:58 Caleb-- [thedude@bzq-79-178-2-9.red.bezeqint.net] has joined #scheme 05:30:14 cky: What he did is not rebinding a variable: it's setting the value of a variable. 05:30:36 What if the ... is (set! x y)? Doesn't that rebind x to y's value? 05:30:47 If you want to make the two terms synonymous, then yes. 05:31:34 Obfuscate, `struct s' functions the same way. I could rename its field `car' and add another field `cdr', and write `*(&x.i) = 0;' and `*(&y.i) = 1;' and `*(&x.i)', but I don't think that would have made the example clearer. 05:32:10 (or, `*(&x.car) = 0;', &c.) 05:33:17 That wouldn't change the example: you'ld instead need to define it as struct { void* car; void* cdr; }, if you want scheme semantics. 05:33:53 Forget that pairs can hold arbitrary objects; that's a red herring. 05:36:59 Well, it's more that C is statically typed, and so you're forced to give them some type: if one wanted, they could bitcast away in C (which is how object tagging in most dynamic languages work anyways), but the void* case is the most common one and not convoluted. 05:37:11 Or, don't forget that -- if you like: void *p = malloc(1), *q = malloc(1); struct s { void *a; } x, y; if ((!p) || (!q)) abort(); x.a = p; ...; /* What goes in ... so that `y.a = q;' induces subsequent evaluation of x.a to yield a copy of q? (Clobbering the objects p and q is not allowed, just like with integers.) */ 05:40:57 http://community.schemewiki.org/?java-like-object-system what is with the capital letters? are some schemes case-insensitve or so? 05:41:33 Riastradh: I don't understand how the parallel for that example is supposed to function in scheme. 05:42:41 Obfuscate, (let ((p (make-vector 1)) (q (make-vector 1))) (let ((x (cons p '())) (y (cons '() '())) ... (set-car! y q) (eq? (car x) p] ; What goes in ... so that this expression yields true? (SET!ing P and Q is not allowed, just like with integers.) 05:42:49 lewis1711: Old-school Lispers are case-insensitive. 05:42:52 ...er. 05:43:08 Excuse me: I meant `...so that this expression yields false?', or (eq? (car x) q). 05:47:16 -!- mwolfe [~michael@cpe-67-49-72-40.socal.res.rr.com] has quit [Remote host closed the connection] 05:47:36 fds ah I see 05:47:47 also what's with variable names like ? 05:47:49 didi` [~user@unaffiliated/didi/x-1022147] has joined #scheme 05:48:06 Riastradh: Is your point that (set! y x) can't be approximated because x in the C example was not itself declared as a pointer? 05:48:22 lewis1711: They're a naming convention used by CLOS to name classes. 05:48:24 ...oh some experimentation tells me <> is perfectly legal as part of a variable name so taht explains that 05:48:29 Err, y, rather. 05:48:29 Exactly. 05:48:30 ah 05:48:32 -!- didi [~user@scorpion.tdkom.psi.br] has quit [Ping timeout: 240 seconds] 05:48:37 The difference between passing objects versus passing copies of objects, or clobbering objects versus assigning variables, becomes much more apparent in C++, where it figures more strongly into the semantics of programs because one can add extra behaviour to the copying and clobbering operations. (Unfortunately, C++ uses the term `assign' for what I'm calling `clobber'.) 05:48:52 I've also figured out that gambit lets me use both {} and [] for brackets. may start using {} for top level brackets 05:49:02 a bit of pseudo syntax to break things up 05:49:02 !!!! 05:49:14 That requires you to know what brackets to use. Too much work. 05:49:24 come again? 05:49:29 One type of bracket means you can treat all brackets as invisible, just as $DEITY ordained. 05:49:49 treat them all as invisible? 05:50:01 lewis1711: Yes. Experienced Lispers do not look at the brackets. 05:50:03 Obfuscate, my point is that you can't change what object the name x names. That is, you can't assign the variable x. What you can do is clobber the object it names -- overwriting the object x with a copy of the object y. 05:50:11 lewis1711: They look at indentation. 05:50:32 TSPL is full of square brackets:P 05:50:33 lewis1711: The brackets become effectively fnords. 05:50:42 lewis1711: TSPL is written by a heretic. :-P 05:50:48 so some experienced schemers are obviously using it 05:50:49 hahaha 05:50:50 (No, just kidding. But seriously!) 05:51:20 but what?! parens don't scare me too much, but I don't see what's wrong with mixing it up here and there. break up the monotonousness of code 05:51:38 Riastradh: Okay, I understand your point then (although I don't buy the idea of mutable vs immutable variables in this case, because your mutable variables are really just in C: struct { void* data; long type; }; where the casting is implicit, and data itself may be cast to an integral type). 05:51:43 You could start using underscores instead of spaces too 05:52:03 Not in Scheme, but it would breadk up the monotony of English! 05:52:39 Riastradh: In other words, I see it as a distinction between static and dynamic types that has nothing to do with actual immutable variables (or immutable data of any sort). 05:52:40 fds: *pukes* 05:52:51 cky: ;-) 05:53:01 Obfuscate: Oh, no. It's about whether variables can be rebound, and nothing to do with static or dynamic. 05:53:09 oh come on, just because I like scheme doesn't mean I like a *little* bit of syntax 05:53:19 *don't like 05:53:44 besides if the brackets are invisible you won't notice me using different ones when I lispaste 05:53:45 ;) 05:53:58 lewis1711: Not true; if you use different types, then suddenly they become visible. 05:54:14 then you obviously haven't trained hard enough! 05:54:14 Because (using the R6RS rules), you can't use (]. You have to use () or []. 05:54:35 If you can use [) and (], then you can truly treat them as invisible. 05:54:44 cky: It has everything to do with static vs dynamic typing. If a variable has static type in a strong type system, you obviously cannot dynamically rebind it to a different type, regardless of whether the language allows references. 05:55:04 cky: are you just trying to get me to stop bashing emacs?;) 05:55:22 Types are a red herring. We could just talk about integers and pairs of integers, statically determined. 05:55:26 lewis1711: I don't give a flying fox about Emacs. It's not too bad, but I'm a vi user. 05:56:07 Pretend a Scheme pair can hold only integers. Then you can go back to the original example I gave in Scheme involving (cons 0 0) and stuff. 05:56:37 lewis1711: The decision to allow [] and {} as synonyms for () is really silly, imo. 05:56:49 *cky* agrees. 05:57:13 (And rewrite (rename, really) the C code as `struct pair { int car; int cdr; } x, y;', &c.) 05:58:08 I am not even using an r6rs scheme 05:58:24 Riastradh: Except then... you can't rebind them. If you want that behavior in a type system that understands rebinding, then you'll need something like: union (reference int) int, which is what you're /really/ thinking of. 05:58:37 lewis1711: If you're using Racket, Chez, etc., you are. :-P 05:58:57 I'm not talking about rebinding or shadowing or anything of the sort here. I am also not talking about any notion of polymorphism, or unions, or anything of the sort. 05:58:57 nah, switched to gambit as it's FFI interface is either the nicest or just the best documented 05:59:24 though having to do things like install a 3rd party module system is a bit iffy 05:59:50 Riastradh: If not rebinding or modifying a value, what does set! do? 06:00:33 SET! changes what object is stored in the location of a variable. 06:00:42 Also, you are talking about polymorphism (static or dynamic is irrelevant). 06:00:58 The object and the location have no intrinsic relation. 06:01:26 -!- Caleb-- [thedude@bzq-79-178-2-9.red.bezeqint.net] has quit [Ping timeout: 265 seconds] 06:01:34 No, polymorphism doesn't enter into this. Nowhere do I use a common variable, or a common procedure, or anything of the sort, for different types of data. 06:02:11 Sure you do. set! and eq? 06:02:41 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 06:02:49 I don't use SET! or SET-CAR! or EQ? in the example in two places for two different types of data. 06:03:36 You could replace SET! by SET-TO-A-PAIR! or SET-CAR! by SET-CAR-TO-A-PAIR! or EQ? by EQ-PAIRS? and so on. All that is irrelevant. 06:04:52 It's not: eq-pairs? (for example) would itself need to dispatch on different types. 06:05:31 (x (cons 1 2)) => pair int int? 06:05:40 False. Pairs have identity. EQ? on two pairs doesn't need to (in fact, *doesn't*) look at the objects that are stored in the pairs' car and cdr locations. 06:06:42 Ah, yes, you're correct. set-to-a-pair! would work the way I was thinking though. 06:07:46 I had confused it with equal? 06:08:17 -!- jonrafkind [~jon@jonr5.dsl.xmission.com] has quit [Ping timeout: 240 seconds] 06:09:49 (...Also, what I passed to EQ? was vectors, not pairs, but the point remains.) 06:11:11 Do you understand the point that I'm making? 06:11:55 No -- what was your most recent point? Have I persuaded you that polymorphism doesn't enter into this? 06:13:46 ... that a cons pair that functions the way you're thinking does not actually have type (pair int int), but rather type (pair any any), or if you want to restrict pairs to only holding possibly-rebound ints, they have type (pair (union int (ref int)) (union int (ref int))). 06:14:53 If you simply dismiss the idea of a rebindable variable having a different type than one that can not be rebound (or just think it's a silly distinction), then I think I understand the majority of your points (but I don't think it's silly). 06:16:53 ie., if you dismiss that concept, then you can say that polymorphism isn't involved, as well as that the type system is weaker because it doesn't allow expression of whether a variable may be rebound or not. 06:18:46 What is this (union int (ref int)) business? 06:19:00 Can I fetch an `object of type' (ref int) from a pair in Scheme? 06:20:00 Obfuscate: don't you mean "t = (pair (union int t) (union int t))"? 06:20:32 *Axioplase_* has no idea what's going on. 06:21:22 Axioplase_: No, but I'm referring to an earlier example Riastradh gave. 06:21:48 The answer is either yes, or no, depending on your answer to this question: can you fetch an object of type int from a pair in Scheme? 06:22:11 Yes, you can. 06:22:34 (car (cons 0 0)) gives an `object of type' int. 06:23:00 Then no is a reasonable answer, but that also means that int itself is a union type. 06:23:26 Write int as a union type for me, please. 06:24:07 union raw-unbindable-integer bindable-integer 06:24:12 ie., union int (ref int) 06:24:35 Maybe (union primitive-int (ref primitive-int)), to avoid a recursive definition? 06:25:35 Sure, good catch. 06:25:58 OK. So how do I get a (ref primitive-int) out of this, and what can I do with it? 06:26:19 dereference it! 06:26:22 *Axioplase_* vanishes 06:26:58 Riastradh: You can rebind it to another value, or you can extract its value (ie., dereference) to perform a computation. 06:27:03 Maybe what you're trying to get at is that Scheme's (pair a d) type is really implemented by (primitive-pair (ref a) (ref d)), except that there is no way in Scheme to do anything with a (ref t); such beasts have no first-class existence. 06:27:05 y'know it occured to me i should try and create a prototype OO system since I haven't actually used one before, even if I like the sound of it:P 06:27:22 lewis1711: Try playing with JavaScript. 06:28:16 Riastradh: You're very close: I'm saying that all objects in scheme are implicitly reference types and only point to the real values which only built-in operations access. 06:29:04 Riastradh: It's somewhat closer to the truth to say that there is no primitive-int type that scheme users can access directly, but rather only a reference-int type. 06:29:51 The truth is really the union example though, which is how most (all?) scheme implementations handle it. 06:30:07 ... and at the very least, how the language behaves. 06:31:36 Caleb-- [~caleb@bzq-109-64-14-186.red.bezeqint.net] has joined #scheme 06:31:37 aidalgol [aidan@2002:453d:f72::1337:2] has joined #scheme 06:31:45 -!- aidalgol [aidan@2002:453d:f72::1337:2] has left #scheme 06:36:40 Here's how it works: Small integer objects in Scheme are represented by strings of 32 or 64 bits. Such a string of bits -- irrespective of where you wrote it down in memory -- is the extent of an integer object's identity. It doesn't matter by what name you refer to it, or whether you use multiple names to refer to it; the string of bits is the sole identity. 06:38:19 -!- Caleb-- [~caleb@bzq-109-64-14-186.red.bezeqint.net] has quit [Ping timeout: 255 seconds] 06:40:09 Not so in C: Given `int x = 0, y = 0;', I can distinguish the objects x and y: &x != &y. Similarly, given `struct { int a; } x, y; x.a = 0; y.a = 0;', no matter how I wrangle with C, &x != &y. I can even write `x = y;', and still, &x != &y; and, again, no matter how I wrangle with C, I can't make `y.a = 2;' have the effect that x.a will evaluate to a copy of 2. 06:43:10 (I'm glossing over some details here. Some Scheme systems don't represent small integers by strings of 32 or 64 bits, and EQ? may provide greater distinguishing ability than anything else in the language, but EQ? is essentially an implementation hack, not a proper part of the semantics.) 06:43:13 ... of course not, because references are explicit in C, and y needs to be a reference type (or a union including a reference type) for that to work. 06:43:39 githogori [~githogori@adsl-66-123-22-146.dsl.snfc21.pacbell.net] has joined #scheme 06:44:51 The encoding of an integer in scheme is implicitly either a constant integer value (which cannot be rebound), a reference, or a union of multiple types, of which one is a reference. 06:45:35 smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has joined #scheme 06:47:11 There's really no way around this, although whether you consider it a meaningful part of a type system is another matter. 06:47:11 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Read error: Connection reset by peer] 06:47:59 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 06:49:50 Suppose I use a sort of tagged union representation for integers as you describe. 06:50:09 Now suppose I somehow construct a pair whose car is a primitive integer -- not a reference to a primitive integer, but a primitive integer. 06:50:11 How do I set the car of the pair? 06:53:13 ... by writing the tagged union representation to the car member of the pair (which would have type (union int (ref int)), or in a real scheme system, type (union everything...)). 06:53:40 I think you are making your mental model much more complicated than necessary. 06:55:21 Is a pair's `type' supposed to be (primitive-pair (ref int) (ref int)), or is it supposed to be (primitive-pair int int); and is int supposed to be primitive-int, or is it supposed to be (union primitive-int (ref primitive-int))? 06:56:44 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Read error: Connection reset by peer] 06:56:58 It doesn't get any simpler though: you use a tag to distinguish between primitive types (of which one is a reference type), and a cons pair /must/ contain either reference types, or unions which include reference types, or you can't rebind them. 06:57:05 Let's call the first two choices A and B, and the second two 1 and 2. In case B1, SET-CAR! can't work at all. In case B2, I can make a pair with no `references' involved in its car, so I can't possibly use SET-CAR! on it. Case A2, I claim, is more complicated than necessary. 06:57:09 The latter of both suggestions is closer to the truth. 06:57:57 (`Rebind' is a poor choice of word because it suggests bindings and variables and environments and whatnot, which are irrelevant here.) 06:58:04 groovy2shoes [~guv@wvc32564rh.rh.ncsu.edu] has joined #scheme 06:58:04 -!- groovy2shoes [~guv@wvc32564rh.rh.ncsu.edu] has quit [Changing host] 06:58:04 groovy2shoes [~guv@unaffiliated/groovebot] has joined #scheme 06:58:34 It's B2, except that you could rebind it by changing the type from primitive-int to (ref primitive-int), which is still compatible with the union of the two types. 06:59:17 Case A1 is how it actually works -- both in any semantics you write (e.g., in a PL theory paper, or in an interpreter in a purely functional language), and in actual Scheme implementations. 06:59:40 A1 is an acceptable implementation strategy, as is B2. 07:00:21 Nobody actually uses B2. It's unnecessarily complicated and buys nothing over A1. 07:00:55 If you argue for A1, then you could say that there is no directly accessible int type in scheme: all actual integers are behind the scenes and the user only handles references. 07:02:02 http://wiki.call-cc.org/man/4/Data%20representation 07:02:06 There's at least one that does. 07:02:46 I think you are using `reference' in a different sense from how I assumed you were using `reference'. 07:03:38 Chicken's representation is A1, not B2. 07:03:51 A reference is any pointer-like type (ie., anything that "references" another object, whether by direct machine address, or a hash table entry). 07:04:17 Here's how a pair might be represented: #b11011110101011011011111011101100. 07:05:06 accel [~accel@unaffiliated/accel] has joined #scheme 07:05:12 This happens also to be a representation of the location where the pair's header is stored, although that's really a pun, because the low-order 00 bits are actually a tag and happen to double as the low-order zero bits of a word-aligned address. 07:06:00 Associated with this pair is the location of memory at the address #b11011110101011011011111011110000. In this location is stored a representation of the pair's car. 07:06:48 What is the type of the representation of the pair's car? 07:07:37 For example, the pair's car might currently be the integer 417683105. This is represented by the bit string #b01001110001001001111101101101101 -- that's the bit string stored in the location of memory at the address #b11011110101011011011111011110000. 07:08:04 Your description is nothing like what's mentioned on that page. 07:08:33 In other words, if the current time is t, then memory(t, #b01001110001001001111101101101101) = #b11011110101011011011111011110000, where memory(t, a) returns the contents of the memory location at address a, as of time t. 07:08:36 -!- dakeyras [~dakeyras@pool-173-64-149-152.sttlwa.fios.verizon.net] has quit [Quit: dakeyras] 07:08:46 ...er, excuse me, I wrote those backwards. 07:08:50 "pairs: vector-like object with type bits C_PAIR_TYPE, currently 0011). The car and the cdr are contained in the first and second slots, respectively." 07:08:54 -!- accel [~accel@unaffiliated/accel] has quit [Client Quit] 07:08:57 memory(t, #b11011110101011011011111011110000) = #b01001110001001001111101101101101 07:09:43 There are only two ways of interpreting that: a pair (which is itself a member of a tagged union) contains two values which are... 07:10:13 A: a tagged union themselves. B: a pointer to another tagged value. 07:11:10 Read a little bit earlier in the text. A non-immediate object is represented by a machine word whose two low-order bits are zero; the remaining bits (actually, all the bits, because the low-order zero tag doubles as the low-order bits of any multiple of four) are interpreted as an address. 07:11:45 -!- groovy2shoes [~guv@unaffiliated/groovebot] has quit [Quit: groovy2shoes] 07:11:56 Read this part again: "A non-immediate object is represented by a machine word whose two low-order bits are zero" 07:11:57 Thus, a pair (a non-immediate object) is represented by a machine word whose two low-order bits are zero. What is at the address contained in those bits is another string of 32 bits called the pair's header. 07:12:20 What if the two low-order bits aren't zero? 07:12:39 ... does that change the interpretation (the /type/) of the data? 07:14:57 it might not be the right channel but I think there are a lot of emacs user here. 07:15:09 What is the best way to do timeline in emacs ? 07:15:12 org-mode ? 07:15:48 minsa: I don't know, but there is a much larger #emacs channel. 07:15:58 Heh, nevermind. :) 07:16:12 yeah.. I just did that. thanks. 07:17:45 Consider a function f from strings of 32 bits into the set {0, 1, 2}. In particular, f(#b...1) = 0, f(#b...10) = 1, and f(#b...00) = 2. You can interpret this if you like to mean the following: Iff f(b) = 0, b represents a fixnum. Iff f(b) = 1, b represents some non-fixnum immediate object. Iff f(b) = 2, b represents a non-immediate object. But I'm not talking about types here. 07:18:36 Riastradh: How is this any different than a tagged union? 07:18:50 We can step up a level and return to talking about types (although they are still really a red herring), but I wanted to make sure that you understand how pairs and fixnums are represented first. 07:19:26 I understand the representation. 07:21:48 Well, here's one of the tagged unions involved: (union (fixnum 31-bit-string) ... (non-immediate 30-bit-string)) 07:21:57 Pairs are represented with the NON-IMMEDIATE tag of this tagged union. 07:22:24 Their representation also involves a store. 07:23:21 All expected. Where is this going? 07:26:28 Now, it's a little nicer to think about pairs as being represented by two locations for objects. Actually only one location is represented -- that of the pair's header -- from which the addresses of the interesting locations can be derived. But that's just a fiddly implementation detail. (An address is just a frotz you can pass to a store function together with a time to tell you what bits are stored, or what object is stored, in the addressed 07:27:58 That's why I described the `pair type' as looking like (primitive-pair (ref int) (ref int)), or, for the general object case rather than the int-specific case which is all I really wanted to discuss at the beginning, (primitive-pair (ref object) (ref object)). 07:28:56 (Again, really, it's a tagged pointer that is expected to point at the locations for the two subobjects. What you put in a machine register isn't a pair of pointers, as the notation (primitive-pair (ref object) (ref object)) might suggest; rather, it's just a string of 32 bits interpreted as a tagged pointer.) 07:29:24 ugh, I just spent ages compiling a module add on for gambit only to discover it doesn't export C type definitions between modules, thus making it practically worthless for what I want:P note to self, read docs first 07:31:27 Riastradh: The first and third sentences are correct, but the second isn't really right at all, because the representation of a pair is that of a pointer to a struct of three objects: the type encoding of the pair, then the car and cdr of the pair (which are tagged unions just like the immediate data of / pointer to the pair is). 07:31:55 `The type encoding of the pair'? 07:32:25 Riastradh: ie., it's not a (pair (ref int) (ref int)), but rather a (pair (union fixnum char bool non-immediate) ...) 07:32:33 I don't know what sentences you're referring to, sorry. 07:32:57 Riastradh: Sorry, s/sentences/paragraphs or messages/ 07:34:08 The pair itself is a pointer, which points to a position on the heap, of which the first word identifies that data as a pair: that's its type encoding. 07:34:09 Quote, please. I lost track of message sequence numbers. 07:34:09 -!- xwl_ [~wixu@nat/nokia/x-nlhuyoijiyzkzlgl] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 07:34:31 "3:27:58 Riastradh | That's why I described the `pair type' as looking like..." 07:34:39 That's the second message. 07:34:40 xwl_ [~wixu@nat/nokia/x-plysykansstrxrdn] has joined #scheme 07:36:04 Consider a function R. R takes a noncircular Scheme object and a memory. It gives back a Chicken representation for the object and a new memory. 07:37:00 Okay, but I hope this doesn't concern the same typing argument, because every chicken object is a tagged union. 07:38:46 If p is a pair whose car is a and whose cdr is d, and if L is a previously unused address in memory, then R(p, memory) = R(L, memory'' [L |---> a pair header, (L + 1) |---> R_1(a, memory'), (L + 2) |---> R_1(d, memory)]), where if R(x, m) = (r, m'), then R_1(x, m) = r and R_2(x, m) = m'; and where memory' = R_2(d, memory) and memory'' = R_2(a, memory'). 07:39:50 If you disagree with this, let me know. R here gives a representation for a Scheme object in a fresh memory. (Assume there are no symbols to bother us about interning or anything.) 07:40:08 ... digesting, just a moment. 07:40:16 hkBst [~quassel@gentoo/developer/hkbst] has joined #scheme 07:41:23 accel [~accel@unaffiliated/accel] has joined #scheme 07:41:49 Okay. 07:44:25 The essential pieces of the representation of p are the word L representing it (which, by a pun, is just the address of the location of its header), the representation R_1(a, memory') of its car, which is stored at L + 1, and the representation R_2(d, memory) of its cdr, which is stored at L + 2. What is actually stored is R_1(a, memory'), at L + 1, and R_1(d, memory), at L + 2. 07:44:49 That is what I meant when I said that pairs look like (primitive-pair (ref object) (ref object)): there are locations (`references'), L + 1 and L + 2, where representations for arbitrary subobjects can be stored. 07:46:19 `Primitive pair' here is just a concept for putting two things together into a single thing so that one can easily get at them. In this case, it's putting L + 1 and L + 2 into a single thing, L, from which one can get at L + 1 by adding one, and from which one can get at L + 2 by adding two. 07:50:19 It doesn't make sense to me to extend the concept of a pointer to three words to that of a pair of two references to objects, but I think I understand your point of view. 07:51:44 The header word is just gubbish put in memory because there aren't enough bits in registers to go around. It's a red herring. If you like, read it into the words `primitive pair'. 07:55:28 If one is to represent this in a C-like language, you'd get something like (for x86-32) struct object { i28 data; i4 type_bits; }; pair { i32 pair_encoding; object car; object cdr; }; 07:57:01 What's very important about all this nonsense, though, is that it doesn't matter where the bits #xdeadbeec turn up in memory, or the bits #x056cb581. Wherever #xdeadbeec turns up, it will represent the same pair. Wherever #x056cb581 turns up, it will represent the integer 12356996. 07:57:09 In a language recognizing discriminated unions, object = union fixnum char bool non-imm...; pair = struct type_encoding object object 07:57:32 humm, anyone used jazz scheme? compiling it now 07:59:25 Now, let's look at C. In C, suppose the stack pointer is at #xffffffe0 when I do `int x = 0, y = 0;'. Now the stack pointer is at #xffffffd8. Now x names the object at #xffffffdc, and y names the object at #xffffffd8. 07:59:45 Both objects correspond with the integer zero. 08:00:37 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 08:01:16 Let's say Q is the C analogue to R. Then Q(x, m) = (#xffffffdc, m [#xffffffdc |---> 0]), and Q(y, m) = (#xffffffd8, m [#xffffffd8 |---> 0]). 08:02:00 What effect does `x = 1;' have? It replaces m by m [#xffffffdc |---> 1] -- it modifies the object x. (The name `x' still names the same object.) 08:02:31 (Here by `0' I mean #x00000000, as a string of 32 bits, and by `1' I mean #x00000001, as a string of 32 bits.) 08:04:17 If next I do `struct { int a; } p, q; p.a = 0; q.a = 0;', then the stack pointer will become #xffffffd0, and p -- as well as p.a -- will name the object at #xffffffd4, and q -- as well as q.a -- will name the object at #xffffffd0. 08:05:12 Again, this is the same issue regarding scheme types being implicit unions. 08:05:38 What effect does `q.a = 1; p = q;' have? It will first replace m by m' = m [#xffffffd0 |---> 1], and then m' by m'' = m' [#xffffffd4 |---> 1] as well. The last `1' was produced by copying the object q. 08:07:07 Note that local variables/references in scheme must be allocated on either the stack or kept in a register, and so have the exact same behavior with regards to this object modification, except that in C you must explicitly manage the unions/references. 08:08:55 If a variable is to outlive a function in scheme, it can be moved to the heap when spilling is necessary, or put on the heap at the start, and a reference kept in a register or on the stack. 08:08:55 Where variables in Scheme are allocated is immaterial -- and that's significant! 08:09:36 Sure, scheme simplifies programming quite a bit. ;) 08:11:54 The basic parameter-passing mechanism in Scheme has the following property: If I have an object, say foo, and I pass it to a procedure, then the procedure receives foo exactly as I had it. The procedure doesn't receive a copy of foo in any sense. If it uses the name bar for its parameter, then R(foo, m) = R(bar, m). 08:13:20 The basic parameter-passing mechanism in C has the following property: If I have an object, say foo, and I want to pass it to a procedure, I *cannot* give that procedure the object exactly as I had it. I can give a pointer to the object, say p = &foo, so that Q(foo, m) = Q(*p, m), but I cannot arrange the program so that the callee sees some bar such that Q(foo, m) = Q(bar, m). 08:13:51 (Here `Q(*p, m)' is a bit of a cheap notational trick.) 08:15:50 Ignoring arrays, I can also, in C, give the callee a copy of foo, say bar, so that memcmp(&foo, &bar, sizeof foo) gives 0. (I might arrange this by doing `void *p = foo, *q = frobblethorpe(foo); memcmp(...)', where `void *frobblethorpe(whatever_t bar) { static whatever_t x = bar; return &x; }'.) 08:16:12 But I can't give the callee foo exactly as I have it. 08:16:58 I think you're mistaken on one part: aside of compiler optimizations, objects in scheme are implicitly passed as references. 08:17:41 ie., in chicken, immediate values are passed by value, while non-immediate values are implicitly references to their actual values. 08:17:47 I don't like to talk about `passing references' versus `passing values' because it's terribly confusing. 08:19:24 It's simpler just to say that what goes in the machine register when passing x is R(x, m), where R is the object representation function of the implementation. One needn't draw some random distinction between `passing frotzim by value' and `passing zotzim by reference' which doesn't materially affect the semantics of the program. 08:19:28 This is really the equivalent to making every variable in C into a pointer, except where you can determine that it's not necessary. 08:20:10 You can't really do that, because in C you eventually have to allocate an actual value to reference, while in scheme this is taken care of automatically. 08:21:00 ...Of course you can apply lots of global transformations to make one language equivalent to another. 08:21:58 It does materially affect the semantics: the behavior you're describing of "can't give the callee foo exactly as I have it" is the result of your insistence for some of your variables to be passed by value. 08:22:41 In scheme, the actual values are inaccessible: your variable names are really references. 08:23:11 In C, the actual values are accessible, including the values of the references themselves. 08:23:47 `In scheme, the actual values are inaccessible: your variable names are really references.' What would it mean for `actual values' to be accessible? In other words, what is the content of this assertion? 08:25:43 (C++, by the way, actually does have two different parameter-passing mechanisms -- one for passing objects, and one for passing copies. The default is to pass copies; writing ampersands in funny places causes the objects themselves to be passed. However, C++ still doesn't have mutable variables like Scheme.) 08:27:07 Let's say we have two variables in scheme: x and y. x may point to y, or vice versa, or (given the union model that chicken uses) may itself contain a value. 08:27:26 Hold it! 08:27:29 `x may point to y' 08:27:31 why is scheme so mutable? seems pretty weird for FP 08:27:31 What does this mean? 08:27:50 lewis1711, hysterical raisins. Frankly I'd rather have seen SET! omitted a long time ago, but it's too late now. 08:27:57 Riastradh: It means that x may alias the value of y, such that modifying x may modify y, and vice versa. 08:28:18 (SET! is the confusing part of Scheme. Copying (and clobbering, under the name `assigning') is the confusing part of C. ML got this right.) 08:28:24 lewis1711: The real oddity, imo, is that no formal semantics for mutability was including. 08:28:33 *included. 08:28:39 Obfuscate, when you say `modifying x may modify y', can you give a concrete example of a program incurring and observing these modifications? 08:28:49 I find it scary how you can define to the same variable twice...it's the reason I stopped using racket (gambit will at least warn me if I pass -warnings to the compiler) 08:29:05 lewis1711: That's shadowing, not mutability. 08:29:32 (define pi 3) (define pi 4) ;how is that not mutating? 08:29:49 not in a REPL, in a file 08:30:07 lewis1711, in a file with or without `#lang' at the top? 08:30:18 (`#lang mumble', to be precise; `#lang racket' or something, to be more precise.) 08:30:20 isn't that just a racket thing? 08:30:32 #lang racket would allow it 08:30:50 #r6rs would complain. gambit doesn't mind so I guess it's not defined in r5 08:31:02 Curious. OK. 08:31:11 In the R5RS a second definition is tantamount to a SET!. 08:31:32 In any case, why are you worried? Did you actually encounter a program in which you were bitten by this? 08:31:46 (In the years I have been programming in Scheme, I don't think I have ever been bitten by such a bug.) 08:31:58 I don't like that behaviour. if I define something I want it to stay bound 08:32:11 I like to make use of constant globals 08:32:13 lewis1711: Well, the first definition technically still exists, although its inaccessible in that case: consider a define inside of a function definition. 08:32:47 Riastradh: (set! x y) (set-car! x foo) 08:32:53 technically doesn't help much 08:33:07 Riastradh: ie., basically the same examples you gave an hour or two ago. 08:33:54 anyway, with -warnings enabled it seems gambit is now as const-correct as ruby:P (which will do the same thing) 08:34:06 lewis1711: Heh, perhaps not, but they are different concepts and have to be handled differently (by language implementers/designers, at least). 08:34:33 Obfuscate, OK, so the object in the location for the variable x is the same as the object in the location for variable y. In other words, memory(environment(x)) = memory(environment(y)), where memory is the current memory and environment is the lexical environment somewhere inside this program. 08:34:36 there was an srfi for an immutable define, or defconst or something, that got withdrawn 08:35:56 Riastradh: I would phrase that as "x and y both reference the same value", or "x fully aliases y". 08:36:03 This is usually not what one means when one says `x may point to y', though. Usually, that means that x is a pointer, and that dereferencing the value of x is tantamount to reading y, and that writing to y has the effect of changing what you get when subsequently dereferencing the value of x. 08:36:20 Yes, I'll get to that. 08:36:27 (`Usually, that means that x's value is a pointer...', rather.) 08:36:54 Well, in that case, x's value /must/ be a pointer (or at least some sort of reference), but we're not there yet. 08:37:34 Hold it! 08:38:27 *Obfuscate* tapdances. 08:38:51 First, which did you mean? memory(environment(x)) = memory(environment(y)) for some memory (the current one), or memory(memory(environment(x))) = memory(environment(y)) for all memory? 08:39:16 The first is what you get from (set! x y). The second is what I understand `x points to y' to mean. 08:40:33 Let's go with the first for now, although it's not important yet, and I was going to cover both cases. 08:40:41 stis [~stis@1-1-1-39a.veo.vs.bostream.se] has joined #scheme 08:40:47 (Extremely roughly, the second approximates what you get in C from `int y, *x = &y;'.) 08:41:07 ... so we have x and y, and we'll go ahead and... (set! x 1) (set! y 2). 08:41:08 (The first makes sense in Scheme; the second doesn't.) 08:41:31 (But you mentioned tweaking the semantics of Scheme to add a concept it doesn't already have, so I don't know.) 08:41:38 Hold it! Where did x and y come from, anyway? 08:41:43 Let's assume the compiler chooses to make both into immediate values, and stores them kindly in memory. 08:41:50 Can you start with a LET binding them? 08:42:20 Okay, we'll do it this way: (let ((x 1) (y 2)) ... 08:42:37 Good. 08:43:15 Actually, let's have the compiler put them into registers for now, since it hasn't decided to spill anything yet... that will illustrate this most clearly. 08:43:42 x and y are immediate values in memory, representing 1 and 2, accordingly. 08:43:49 Damnit, s/memory/register/s 08:44:01 I'm really sucking tonight... anyways... 08:44:02 Registers are just fancy memory. 08:44:20 For the purpose of discussing semantics, we don't need to distinguish registers from memory. 08:44:33 Sort of, except with one caveat: you can't form a reference to them on common architectures. 08:44:51 Let's pretend we're on a PDP-10, where they even have physical memory addresses. 08:45:12 It's more clearly illustrated this way, since you get to see the transition, but whatever. 08:46:11 ok, so, we decide to do (set! x y), and our scheme implementation (chicken) rebinds the variable x for us. 08:46:12 In Scheme every variable has a *location*, which may not have a virtual address in your favourite instruction set architecture, but for discussing semantics, we need to name the locations anyway, and we already have something that maps names for locations to the bit strings stored at those locations, called the memory. 08:46:26 There's no rebinding! 08:46:38 Is rename better? 08:46:40 Rebinding would be (let ((x 5)) (let ((x 3)) x)). 08:47:08 The generally accepted term is `assign'. 08:47:13 I call that shadowing, but I've been out of scheme for awhile. 08:47:15 It's not a great term. 08:47:33 The term `assign' also has a totally different meaning in C and C++. 08:47:40 You could say `set'. 08:47:43 That would match SET!. 08:47:45 Okay, it assigns x a new location. Is that better? 08:47:56 It doesn't matter to me, as long as we agree on a definition. 08:48:03 Nope! 08:48:16 SET! does nothing with new locations. 08:48:18 Okay, how would you state it? 08:48:23 x already has a location: environment(x). 08:48:30 SET! changes what object is stored at that location. 08:48:58 (set! x y) replaces the memory m by m [environment(x) |---> m(environment(y))]. 08:50:05 mmc [~michal@cs27120227.pp.htv.fi] has joined #scheme 08:50:10 I feel like this discussion is not wholly rooted in reality. 08:51:26 In what respect? 08:52:39 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 08:52:42 Scheme is a language, and like other languages, it must be implemented: such implementations must concern themselves with both the intent of the user, as well as the constraints of the machines they run on. 08:54:36 -!- ve [~a@vortis.xen.tardis.ed.ac.uk] has quit [Ping timeout: 240 seconds] 08:55:16 Basically, that means that backend functionality (that most users care little about) are very important for defining the language's behavior. 08:57:34 In this case, we have variables that are really tagged data, and as that data changes type (dynamically), the locations of the data may change. 08:58:26 If we want to change the value of a variable later and have other variables that "share" its value receive the update, we must do so via a reference to the variable's data, and not by copying the variable itself. 09:00:34 That's not an implementation constraint either (although it would require it), since it's not really conceptually clear to define these operations without considering it in that manner (or an equivalent one, which again, requires a referencing scheme, and requires references to be usable in place of values). 09:02:31 In Scheme, you can't change the value of a variable (usually, this means SET!ing a variable) and trigger changes in the values of other variables. That is, if x, y, and z are variables, then the value of (begin (set! x E) (eq? y z)) is independent of the expression E. 09:03:12 Sorry, (begin (set! x E) (eqv? y z)). 09:03:36 -!- myu2 [~myu2@58x5x224x106.ap58.ftth.ucom.ne.jp] has quit [Remote host closed the connection] 09:04:56 Sorry, that's not true either, because E may have effects. If w, x, y, and z are variables, then (begin (set! w x) (eq? y z)) is independent of the initial values of w and x. 09:05:00 I would consider any language where that applied (and E did not mention y or z) to be horribly broken anyways. 09:05:32 E.g., C++? 09:07:20 x = E; return y == z; // the comparison is independent of the assignment here, except for the horribly degenerate case of x87 computations which I suspect most scheme implementations are vulnerable to as well 09:08:34 Ah, nevermind, I see what you're getting at. I glossed over the aliasing there. 09:08:56 You are referring to aliasing of x by a reference, right? 09:08:59 (Consider `int w = 0, x = X, &y = w, z = 1;'. If X is 0, the expression `w = x, y == z' gives false; if X is 1, then it gives true.) 09:09:48 accel [~accel@unaffiliated/accel] has joined #scheme 09:10:14 In scheme, there's the case of cons pairs. 09:10:53 In this example, w and y are two different names for a common object. Saying `struct s &y = w' in C++ is a little like saying (let ((y w)) ...) in Scheme, in that it lets y be another name for the same object (but there the similarity ends). 09:12:17 Oh, I am more than familiar with C++ (not that I particularly enjoy this fact). 09:12:41 pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has joined #scheme 09:13:48 Scheme and C++ can both have lots of arbitrary names for a single object. C can't -- any other names must be prefixed by * and entail introducing another object, a pointer. 09:14:44 Scheme has a concept of mutable variables; C and C++ don't. C and C++ have concepts of copying and clobbering; Scheme doesn't. 09:15:08 -!- pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has quit [Max SendQ exceeded] 09:15:21 That's all I wanted to say earlier. Sorry for the excess noise. I'm done; time for bed. 09:15:49 pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has joined #scheme 09:16:01 I disagree with the mutable variables portion, but I think that's a philosophical difference (ie., I consider that it's a limitation of scheme, and not vice versa). 09:17:03 The conversation was a good distraction; there's no need to apologize. 09:17:09 Good night then. ;) 09:18:48 I know I've said this already, but I'll bite once more: Given `struct { int s; } x, y; x.s = y.s = 0;', I can't make `y.s = 1' cause `x.s' to give 1. But I can fill in the ellipsis to make (let ((x (cons 0 0)) (y (cons 0 0))) ... (set-car! y 1) (car x)) give 1. That's what mutable variables are all about: whether I can change what object a name names. (Mutable variables are, of course, tremendously confusing, just like copying and assignment 09:21:28 Heh, how about this: in C, an object of pointer type represents a mutable variable, while an object of non-pointer type represents an immutable variable (again, using your definition of mutability). 09:22:10 ie., to me, C has the concept of mutable variables, and scheme lacks the concept of immutable variables. 09:22:40 I'm pretty sure we understand each other anyways. 09:22:43 -!- qhe [~qhe2@134.134.137.71] has quit [Ping timeout: 272 seconds] 09:22:44 I'm going to go eat some pie. 09:22:46 Those aren't variables -- those are objects. Sometimes objects are named by variables: when I do `int x;', I create an object and use the name x for it. Some objects are not named by variables: when I do `int *x = malloc(sizeof(*x));', I create two objects, one of which is an int and one of which is an int pointer, but I name only the pointer with a variable. 09:23:00 mg4001 [~mg4001@cpe-76-93-28-217.socal.res.rr.com] has joined #scheme 09:23:26 Okay, one last view... 09:23:41 Wow, still debating you two? 09:25:23 Riastradh: Here's a crude model of scheme in C++: int* x = new int(1); // forbid creating non-pointer objects on the stack and you have scheme style variables (albeit restricted by types) 09:25:55 Axioplase_: Yeah. I don't think either of us feel like working tonight. 09:26:17 Axioplase_: it's my fault. i asked about object orientation in very vague terms 09:27:04 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit: adu] 09:27:06 Riastradh: Now you just need to call objects with pointer types variables, and objects of non-pointer types can be plain objects, and... well, I did mention pie, didn't I? 09:28:58 -!- smtlaissezfaire [~smtlaisse@user-387hbid.cable.mindspring.com] has quit [Quit: smtlaissezfaire] 09:35:18 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 09:35:58 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Client Quit] 09:43:37 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Read error: Operation timed out] 09:43:45 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 09:56:45 adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined #scheme 09:58:46 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Client Quit] 10:07:58 -!- stis [~stis@1-1-1-39a.veo.vs.bostream.se] has quit [Ping timeout: 276 seconds] 10:10:26 right, jazz scheme is finally done. wonder if it works:/ 10:13:16 wow, jedi makes drracket look like absolute trash 10:13:45 nilg` [~user@77.70.2.229] has joined #scheme 10:15:20 Ah, eclipse based? 10:16:33 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 10:17:18 I can't actually tell 10:17:25 doesn't feel like swig 10:17:29 *swing 10:17:39 it's not following my gtk theme though 10:19:55 MrFahrenheit [~RageOfTho@users-146-124.vinet.ba] has joined #scheme 10:25:16 no idea how to use it really, IDEs freak me out:D 10:28:25 Heh. I always end up using vim anyways (although I find its scripting system disappointing). 10:40:17 femtoo [~femto@95-89-196-149-dynip.superkabel.de] has joined #scheme 10:41:02 Axioplase_, drracket with beginner... 10:41:22 Tasser: ha, ok, that would make sense. 10:41:31 You can still use "let" I think. 10:41:38 hmm 10:46:49 ve [~a@vortis.xen.tardis.ed.ac.uk] has joined #scheme 10:58:05 schmir [~schmir@mail.brainbot.com] has joined #scheme 11:06:37 MichaelRaskin [~MichaelRa@195.91.224.225] has joined #scheme 11:11:00 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 11:14:37 schmir [~schmir@mail.brainbot.com] has joined #scheme 11:25:43 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 246 seconds] 11:30:06 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 11:38:49 -!- dualbus [~dualbus@201.170.71.87.dsl.dyn.telnor.net] has quit [Remote host closed the connection] 11:47:51 myu2 [~myu2@v077103.dynamic.ppp.asahi-net.or.jp] has joined #scheme 11:52:17 -!- pygospa [~pygospa@kiel-4dbede73.pool.mediaWays.net] has quit [Disconnected by services] 11:52:29 pygospa [~pygospa@kiel-d9bfd0e7.pool.mediaWays.net] has joined #scheme 12:03:53 gravicappa [~gravicapp@ppp85-140-117-93.pppoe.mtu-net.ru] has joined #scheme 12:05:20 masm [~masm@bl16-170-191.dsl.telepac.pt] has joined #scheme 12:20:56 Gmind [~Welcome@113.190.172.251] has joined #scheme 12:22:27 hey 12:22:36 any Asm expert here 12:23:00 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 12:23:06 join #asm 12:23:36 =.=! 12:23:41 tupi [~david@186.205.37.15] has joined #scheme 12:23:44 unexpected asm community 12:26:54 pavelludi [57f63ac1@gateway/web/freenode/ip.87.246.58.193] has joined #scheme 12:28:38 Adamant [~Adamant@unaffiliated/adamant] has joined #scheme 12:32:15 -!- lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has quit [Remote host closed the connection] 12:43:51 -!- mmc [~michal@cs27120227.pp.htv.fi] has quit [Quit: Leaving.] 12:55:06 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 260 seconds] 12:58:36 zevarito [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has joined #scheme 13:04:27 -!- zevarito [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has quit [Read error: Connection reset by peer] 13:04:44 zevarito [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has joined #scheme 13:10:06 schmir [~schmir@mail.brainbot.com] has joined #scheme 13:11:50 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 13:12:41 -!- Checkie [6797@unaffiliated/checkie] has quit [Ping timeout: 264 seconds] 13:13:23 -!- drdo [~user@91.205.108.93.rev.vodafone.pt] has quit [Read error: Connection reset by peer] 13:22:58 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Remote host closed the connection] 13:23:04 Jafet [~Jafet@unaffiliated/jafet] has joined #scheme 13:26:39 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 240 seconds] 13:27:31 drdo [~user@91.205.108.93.rev.vodafone.pt] has joined #scheme 13:29:13 -!- gravicappa [~gravicapp@ppp85-140-117-93.pppoe.mtu-net.ru] has quit [Ping timeout: 240 seconds] 13:31:35 phao [~phao@189.12.240.52] has joined #scheme 13:38:56 schmir [~schmir@mail.brainbot.com] has joined #scheme 13:39:43 kanru [~kanru@118-160-160-172.dynamic.hinet.net] has joined #scheme 13:39:59 -!- femtoo [~femto@95-89-196-149-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 13:50:05 -!- tupi [~david@186.205.37.15] has quit [Remote host closed the connection] 13:58:41 gravicappa [~gravicapp@ppp85-140-118-102.pppoe.mtu-net.ru] has joined #scheme 13:59:05 corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has joined #scheme 14:06:36 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 14:11:42 lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has joined #scheme 14:13:44 -!- lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has left #scheme 14:15:00 -!- bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has left #scheme 14:17:20 -!- _danb_ [~user@124-149-166-62.dyn.iinet.net.au] has quit [Ping timeout: 265 seconds] 14:23:29 Gmind1 [~Welcome@113.190.172.251] has joined #scheme 14:23:29 -!- Gmind [~Welcome@113.190.172.251] has quit [Read error: Connection reset by peer] 14:25:46 bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has joined #scheme 14:27:35 -!- unkanon2 [~unkanon@rrcs-69-193-217-130.nyc.biz.rr.com] has quit [Quit: Lost terminal] 14:33:53 -!- zevarito [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has quit [Read error: Connection reset by peer] 14:33:55 zevarito_ [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has joined #scheme 14:36:53 tupi [~david@139.82.89.24] has joined #scheme 14:42:26 -!- Gmind1 [~Welcome@113.190.172.251] has quit [Read error: Connection reset by peer] 14:43:03 schmir [~schmir@mail.brainbot.com] has joined #scheme 14:46:53 vu3rdd [~vu3rdd@122.167.86.56] has joined #scheme 14:46:55 -!- vu3rdd [~vu3rdd@122.167.86.56] has quit [Changing host] 14:46:55 vu3rdd [~vu3rdd@fsf/member/vu3rdd] has joined #scheme 14:47:37 unkanon-work [~unkanon@rrcs-69-193-217-130.nyc.biz.rr.com] has joined #scheme 14:47:51 DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has joined #scheme 14:52:49 langmartin [~user@exeuntcha2.tva.gov] has joined #scheme 14:57:01 bweaver [~user@host-68-169-175-225.WISOLT2.epbfi.com] has joined #scheme 15:02:50 -!- hkBst [~quassel@gentoo/developer/hkbst] has quit [Remote host closed the connection] 15:04:52 -!- Mohamdu [~Mohamdu@CPE00222d6b3798-CM00222d6b3795.cpe.net.cable.rogers.com] has quit [Quit: Leaving] 15:10:46 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 15:10:57 zevarito [~zevarito@r186-48-192-38.dialup.adsl.anteldata.net.uy] has joined #scheme 15:12:32 -!- zevarito_ [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 240 seconds] 15:16:27 rgrau [~user@62.Red-88-2-20.staticIP.rima-tde.net] has joined #scheme 15:20:19 aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has joined #scheme 15:35:58 copumpkin [~pumpkin@17.101.89.205] has joined #scheme 15:35:58 -!- copumpkin [~pumpkin@17.101.89.205] has quit [Changing host] 15:35:58 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 15:36:21 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Client Quit] 15:37:02 copumpkin [~pumpkin@17.101.89.205] has joined #scheme 15:37:03 -!- copumpkin [~pumpkin@17.101.89.205] has quit [Changing host] 15:37:03 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 15:44:06 -!- DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has quit [Read error: Connection reset by peer] 16:00:41 -!- kanru [~kanru@118-160-160-172.dynamic.hinet.net] has quit [Ping timeout: 264 seconds] 16:04:44 -!- bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has quit [Ping timeout: 250 seconds] 16:08:18 -!- homie` [~levgue@xdsl-78-35-163-140.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 16:08:40 -!- wbooze` [~levgue@xdsl-78-35-163-140.netcologne.de] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 16:09:30 -!- antoszka [~antoszka@unaffiliated/antoszka] has quit [Read error: Operation timed out] 16:09:39 antoszka [~antoszka@unaffiliated/antoszka] has joined #scheme 16:14:12 DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has joined #scheme 16:14:20 femtoo [~femto@95-89-196-149-dynip.superkabel.de] has joined #scheme 16:16:39 -!- vu3rdd [~vu3rdd@fsf/member/vu3rdd] has quit [Remote host closed the connection] 16:20:15 zevarito_ [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has joined #scheme 16:22:31 -!- zevarito [~zevarito@r186-48-192-38.dialup.adsl.anteldata.net.uy] has quit [Ping timeout: 265 seconds] 16:23:07 homie [~levgue@xdsl-84-44-153-92.netcologne.de] has joined #scheme 16:24:49 wbooze [~levgue@xdsl-84-44-153-92.netcologne.de] has joined #scheme 16:25:35 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 16:26:10 schmir [~schmir@mail.brainbot.com] has joined #scheme 16:26:44 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 16:28:14 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 240 seconds] 16:32:03 -!- gravicappa [~gravicapp@ppp85-140-118-102.pppoe.mtu-net.ru] has quit [Read error: Connection reset by peer] 16:33:17 Gmind [~Nevermind@113.190.178.172] has joined #scheme 16:33:23 schmir [~schmir@mail.brainbot.com] has joined #scheme 16:35:23 sedeki [~sedeki@c80-216-168-90.bredband.comhem.se] has joined #scheme 16:35:28 -!- schmir [~schmir@mail.brainbot.com] has quit [Remote host closed the connection] 16:35:47 i'm trying to do a (make-array 1) 16:35:59 returns: shape is not a shape 16:36:18 and when i do (shape 1), shape: uneven number of bounds ... 16:36:46 fradgers- [~fradgers-@5e0b815c.bb.sky.com] has joined #scheme 16:36:57 sedeki: Try (shape 0 1). 16:37:14 yeah 16:37:21 what exactly does that do? 16:37:22 But, if you want to use a one-dimensional array, you may prefer to use a vector instead. 16:37:37 (shape 0 1) defines 1 dimension, with elements [0, 1). 16:38:04 0 and 1? 16:38:12 hi cky 16:38:27 It's open-closed notation; it means indices start at 0, inclusive, and end at 1, exclusive. 16:38:27 I think he means 0, 0.000..001, ..., 0.9999..., but not one 16:38:37 unkanon-work: These are integers. 16:38:45 So, it encompasses the index 0 only. 16:38:53 Gmind: Heya! 16:38:55 ah ok 16:39:01 cky: oic 16:40:14 :-) 16:40:31 how ya doin' ? 16:40:33 :P 16:43:38 cky, how can i initilize values in a make-array call? 16:48:44 Gmind1 [~Nevermind@113.190.178.172] has joined #scheme 16:52:24 -!- Gmind [~Nevermind@113.190.178.172] has quit [Ping timeout: 250 seconds] 16:57:28 -!- langmartin [~user@exeuntcha2.tva.gov] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 17:06:13 jonrafkind [~jon@crystalis.cs.utah.edu] has joined #scheme 17:06:16 zaniyah [~user@unaffiliated/zaniyah] has joined #scheme 17:06:35 jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 17:07:56 -!- pchrist [~spirit@gentoo/developer/pchrist] has quit [Quit: leaving] 17:08:32 pchrist [~spirit@gentoo/developer/pchrist] has joined #scheme 17:08:53 -!- Gmind1 [~Nevermind@113.190.178.172] has quit [Quit: Leaving.] 17:19:29 bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has joined #scheme 17:29:08 how can i find the smallest element of an array? 17:33:12 Well, you can do it several ways: 17:33:19 1. Convert it to a list, and use min. 17:33:33 2. Use something like a folding operator on the array, with the min function. 17:33:35 what's an array? 17:33:49 C-Keen: It's those n-dimensional thingies defined by SRFI ???. 17:33:57 a vector? 17:34:15 C-Keen: Well, sedeki was asking about arrays created by make-array. 17:34:31 C-Keen: Though I did suggest that for one-dimensional, vector is a better choice mostly. 17:34:33 ah that has been scrolled off 17:34:47 *nods* 17:35:12 cky i'll post some code, wait 17:35:19 sorry cky :) 17:36:00 cky http://code-bin.homedns.org/1038 17:39:17 cky: I decided to give a pretty answer for once on stackoverflow 17:39:27 leppie: Oh, yes? ;-) 17:39:35 *cky* checks leppie's recent SO activity 17:39:42 -!- Jafet [~Jafet@unaffiliated/jafet] has quit [Ping timeout: 241 seconds] 17:39:43 check your own 17:39:46 ;P 17:40:01 would I mention anything but a scheme question in here? :) 17:40:13 :-P 17:41:08 leppie: That's hardcore. 17:41:24 leppie: (Re using eval.) 17:41:30 the original answer was the first sentence, and 'good luck' :) 17:41:34 cky, sorry updated version: http://code-bin.homedns.org/1039 17:41:43 Hahahahahaha. :-D 17:42:00 but then I realized if written in scheme it would probably not be too hard 17:42:03 BTW, I notice you're catching up on the rep! Sheesh, you're gonna beat my score in a month if I don't pedal harder. :-P 17:42:12 i get this error: index 2 not in bounds [0..2) .. i don't see where i loop up to 2 17:42:35 Hehehehehe. 17:42:39 lol, I have been level this whole week, mostly downvoting and closing, and getting 1 or 2 votes a day 17:42:46 Awwww.... 17:43:09 my closing quota is finished in 3 hours... 17:43:16 then I start downvoting ;P 17:43:40 :-P 17:43:49 i wonder if I can see how questions I requested to be closed? 17:43:58 s/how/how many/ 17:44:14 sedeki: You're missing an "if" in your "inner" function. 17:44:19 HG` [~HG@xdsl-92-252-91-65.dip.osnanet.de] has joined #scheme 17:44:33 leppie: Yes, just close a new one and see how many left you have today. :-P 17:44:42 leppie: Unless you mean across your whole history. :-) 17:44:51 they were all gone by 10am 17:44:57 Yes, true. 17:45:06 I mean whole history, they are gone in 3-4 hours everyday 17:45:16 Hehehehehehe. 17:47:15 still the same error 17:57:23 pumpkin [~pumpkin@17.101.89.205] has joined #scheme 17:57:23 -!- pumpkin [~pumpkin@17.101.89.205] has quit [Changing host] 17:57:23 pumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 17:57:43 -!- DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has quit [Ping timeout: 246 seconds] 17:58:14 -!- corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has quit [Ping timeout: 240 seconds] 17:58:49 -!- tonyg [~tonyg@navarone.ccs.neu.edu] has quit [Remote host closed the connection] 17:58:59 -!- roderic [~roderic@zerowing.ccs.neu.edu] has quit [Remote host closed the connection] 17:58:59 -!- danking [~danking@zerowing.ccs.neu.edu] has quit [Remote host closed the connection] 17:58:59 -!- jeff_ [~jdlouhy@zerowing.ccs.neu.edu] has quit [Remote host closed the connection] 17:59:09 scheme is not listed in the language shootout 17:59:29 I wonder how it compares to other languages in terms of speed 17:59:37 -!- ada2358 [~ada2358@login.ccs.neu.edu] has quit [Remote host closed the connection] 18:00:40 unkanon-work: see e.g. http://shootout.alioth.debian.org/u32/racket.php 18:00:46 -!- copumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Ping timeout: 260 seconds] 18:01:02 unkanon-work: There is no "reference implementation" of Scheme, so it's only appropriate to compare per-implementation. 18:01:34 corruptmemory [~jim@ool-18bbd5b2.static.optonline.net] has joined #scheme 18:02:07 "Reference implementation" = "mine". 18:02:10 they could just compare per-implementation then 18:02:28 how can i do two things? say (display something) and then run whatever i was supposed to? 18:02:34 Scheme 9 comes close to being a reference implementation in terms of semantics, but it's slow and R4RS. 18:02:37 unkanon-work: yes. What do you think the url I pasted is? 18:02:46 bremner: so if I pick haskell GHC in that division-sign dropdown box that means I'm comparing racket to it? in which case sceme is 3x slower than haskell? 18:02:52 sedeki: (begin ...) is your friend 18:03:04 thanks 18:03:12 bremner: right, that's what it is, for only one implementation of scheme 18:03:20 unkanon-work: could be. The haskell people really got into microoptimizing those silly benchmarks 18:03:32 yes they cheat I know 18:03:51 they care, mainly, if that counts as cheating. 18:05:27 wow racket is not bad at all 18:05:53 that probably means things like chicken do even better 18:07:22 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 18:07:58 rudybot: (begin (print 2) (print 3)) 18:07:59 unkanon-work: your sandbox is ready 18:07:59 unkanon-work: ; stdout: "23" 18:08:40 What is "print"? Is that like "display"? 18:09:18 you tell me, I'm a newbie :) 18:09:26 I'd guess it's like display 18:09:33 in chicken it is like display + newline 18:09:44 and in racket too apparently 18:09:58 And to (current-output-port) 18:10:04 Okay, but rudybot's response didn't have \n, so, I did wonder. 18:10:13 indeed 18:12:01 gravicappa [~gravicapp@ppp85-140-66-122.pppoe.mtu-net.ru] has joined #scheme 18:15:06 -!- nilg` [~user@77.70.2.229] has quit [Remote host closed the connection] 18:15:59 what are those badges things on stackoverflow? 18:16:10 how can i return the second least integer in an array? 18:16:32 bitweiler: They are like Steam achievements. 18:16:44 bitweiler: Only, SO is even more of an MMORPG than most games on Steam. 18:16:55 hehe 18:17:08 i thought is was money ;) 18:17:13 bitweiler: BTW, if you want to take a holiday from SO, feel free to drop by in #stackoverflow. :-P 18:17:16 Oh, I wish. 18:17:34 O'Reilly has a Q&A thing that's pretty similar to SO, except you can redeem your rep for ebooks. 18:17:50 Sadly, SO has no such scheme. :-P 18:18:27 oh, i just sign up for SO ;) 18:24:18 -!- HG` [~HG@xdsl-92-252-91-65.dip.osnanet.de] has quit [Quit: Leaving.] 18:24:42 Hehehehe. 18:25:31 bitweiler: On the contrary, I was one of the very first people to sign up for SO. ;-P 18:25:37 is slime really as nice as people say? 18:25:49 I'm a vim user. should I also learn emacs just for slime? 18:26:12 I remember using emacs and I liked it so it's not like it'd be the end of the world for me to use it 18:26:49 unkanon-work: You should learn Emacs for paredit, too. :-P 18:27:00 <3 paredit 18:28:53 -!- zaniyah [~user@unaffiliated/zaniyah] has quit [Quit: zzz] 18:33:17 unkanon-work: iuscheme is nice as well 18:33:38 well aleast for my purposes ;) 18:33:51 s/aleast/at least/ 18:42:19 hkr [~hkr@188.207.68.138] has joined #scheme 18:46:16 carleastlund [~cce@gotham.ccs.neu.edu] has joined #scheme 18:46:34 iuscheme? never heard of it 18:46:40 *unkanon-work* looks up paredit 18:47:29 -!- hkr [~hkr@188.207.68.138] has quit [Remote host closed the connection] 19:05:13 Oejet [~oejet@212.45.122.120] has joined #scheme 19:19:11 WonTu [~WonTu@p57B552D7.dip.t-dialin.net] has joined #scheme 19:19:24 -!- WonTu [~WonTu@p57B552D7.dip.t-dialin.net] has left #scheme 19:20:44 -!- tupi [~david@139.82.89.24] has quit [Quit: Leaving] 19:21:46 http://www.cs.indiana.edu/proglang/scheme/iuscheme.el 19:22:10 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 19:23:23 -!- didi` [~user@unaffiliated/didi/x-1022147] has quit [Read error: Connection reset by peer] 19:25:42 -!- sedeki [~sedeki@c80-216-168-90.bredband.comhem.se] has quit [Quit: Lämnar] 19:32:40 accel [~accel@unaffiliated/accel] has joined #scheme 19:35:46 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 250 seconds] 19:39:06 stamourv [~user@kauai.ccs.neu.edu] has joined #scheme 19:49:49 -!- pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has quit [Ping timeout: 260 seconds] 19:54:57 Euthydemus` [~euthydemu@vaxjo7.80.cust.blixtvik.net] has joined #scheme 19:57:24 -!- Euthydemus [~euthydemu@vaxjo7.80.cust.blixtvik.net] has quit [Ping timeout: 260 seconds] 20:02:09 femtooo [~femto@95-89-196-149-dynip.superkabel.de] has joined #scheme 20:03:42 -!- accel [~accel@unaffiliated/accel] has quit [Quit: leaving] 20:06:05 -!- femtoo [~femto@95-89-196-149-dynip.superkabel.de] has quit [Ping timeout: 264 seconds] 20:09:46 didi [~user@unaffiliated/didi/x-1022147] has joined #scheme 20:13:04 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 20:14:26 roderic [~roderic@zerowing.ccs.neu.edu] has joined #scheme 20:15:31 -!- pavelludi [57f63ac1@gateway/web/freenode/ip.87.246.58.193] has left #scheme 20:18:28 -!- timj_ [~timj@e176193225.adsl.alicedsl.de] has quit [Ping timeout: 276 seconds] 20:20:16 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 276 seconds] 20:20:54 Checkie [2930@unaffiliated/checkie] has joined #scheme 20:26:44 unkanon-work: "that probably means things like chicken do even better" -- ?? 20:28:39 _danb_ [~user@124-149-166-62.dyn.iinet.net.au] has joined #scheme 20:29:08 pavelludiq [~quassel@87.246.58.193] has joined #scheme 20:29:26 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 20:29:57 timj_ [~timj@e176206226.adsl.alicedsl.de] has joined #scheme 20:30:02 -!- myu2 [~myu2@v077103.dynamic.ppp.asahi-net.or.jp] has quit [Remote host closed the connection] 20:30:30 foof: `lazy' is important enough to be included, (as well as additional behavior requirements from promises that were never specified and usually mis-implemented). 20:30:52 schmir [~schmir@p54A915D1.dip0.t-ipconnect.de] has joined #scheme 20:32:42 DrDuck [~duck@adsl-81-55-129.hsv.bellsouth.net] has joined #scheme 20:34:37 -!- schmir [~schmir@p54A915D1.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20:35:18 -!- kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has quit [Ping timeout: 265 seconds] 20:39:51 -!- bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has quit [Read error: Connection reset by peer] 20:40:44 eli: Quite. 20:40:56 Hammer foof quick before he takes any more people with him. 20:43:42 jcowan: I don't intend to do any hammering, it'll just be bad to not include it (`lazy'), since there are things that just cannot be done with `delay'. Since it's essentially the same as a language with and without TCO, it looks bad to include that requirement, but not the `lazy' feature. 20:43:59 (The rest of the srfi details, such as `eager' are not as important.) 20:45:27 -!- Oejet [~oejet@212.45.122.120] has quit [Ping timeout: 265 seconds] 20:50:04 pdelgallego [~pdelgalle@1385159852.dhcp.dbnet.dk] has joined #scheme 20:51:16 -!- drdo [~user@91.205.108.93.rev.vodafone.pt] has quit [Remote host closed the connection] 20:51:46 eli: regarding the language shootout 20:51:54 racket does well 20:52:01 so maybe chicken should fare even better 20:53:09 unkanon-work: True. And it might also be slower. 20:53:17 The two implementations are unrelated. 20:54:51 but chicken compiles to C and stuff 20:54:56 I was thinking in that sense 20:55:13 of course it depends on the quality of the generated C code and etc 20:55:37 but also, I don't think Racket is really concerned with speed, more with teaching 20:56:03 so for a language not concerned with speed it looks like they're doing very well 20:56:18 and then I would think chicken would be more concerned with speed 20:56:21 see my point? 20:56:25 unkanon-work: Being compiled to C or not is irrelevant. Racket uses a jit that compiles directly to machine code dynamically. 20:56:52 And regarding the main focus of the project -- there is no preference for teaching at the expense of speed. 20:57:13 IOW, Racket is *not* "just a teaching toy". 20:57:32 but they probably won't waste their time optimizing for speed when I'm sure they have their plate full with more important goals for their project 20:58:59 unkanon-work: No, this is a very bogus conclusion. 20:59:12 Oejet [~oejet@212.45.122.120] has joined #scheme 20:59:18 The jit was not made for any goals other than speed, for example. 21:00:10 My guess is that at least 95% of the work done on racket is unrelated to teaching students. 21:00:18 drdo [~user@91.205.108.93.rev.vodafone.pt] has joined #scheme 21:00:39 that's really good, because I like racket as a real-world language 21:01:37 I didn't know racket used a jit 21:02:31 femtoo [~femto@95-89-196-149-dynip.superkabel.de] has joined #scheme 21:02:31 In that case you can rest assured that being used in course doesn't mean that there's any less stress on real-world things like speed. 21:03:14 There's much more than just speed, of course -- any conceivable feature list will undoubtedly be pretty much unrelated to teaching 21:04:47 -!- Nisstyre65 [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving] 21:05:14 -!- femtooo [~femto@95-89-196-149-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 21:06:35 Nisstyre65 [~nisstyre@infocalypse-net.info] has joined #scheme 21:06:38 REPLeffect [~REPLeffec@69.54.115.254] has joined #scheme 21:11:32 mathk [~mathk@194.177.62.31] has joined #scheme 21:13:56 mejja [~user@c-b4b5e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 21:14:07 cool 21:14:23 -!- mg4001 [~mg4001@cpe-76-93-28-217.socal.res.rr.com] has quit [Quit: Leaving] 21:14:34 maybe I'll use racket for my opengl project 21:16:07 nilg` [~user@77.70.2.229] has joined #scheme 21:18:51 -!- Nisstyre65 [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving] 21:19:21 Nisstyre65 [~nisstyre@infocalypse-net.info] has joined #scheme 21:19:22 -!- Nisstyre65 [~nisstyre@infocalypse-net.info] has quit [Max SendQ exceeded] 21:19:27 unkanon-work: You know that racket comes with opengl support, right? 21:19:41 Nisstyre65 [~nisstyre@infocalypse-net.info] has joined #scheme 21:19:43 -!- Nisstyre65 [~nisstyre@infocalypse-net.info] has quit [Max SendQ exceeded] 21:19:51 I didn't know that, but that's very good to know 21:20:23 what I like about racket is that it's like an environment 21:20:28 you download, double click and it just works 21:20:48 Nisstyre65 [~nisstyre@infocalypse-net.info] has joined #scheme 21:21:06 there's no "configure, make clean, make, make install, blabla, error, google for error, find patch, fix this, make clean and make again" 21:21:48 also, I was really impressed to see that it looks consistent across windows, mac and linux (I tried on all of them) 21:22:10 and that the installation for linux is as simple as for other OSes (a rare trait/treat) 21:22:54 What's hard about installing for Linux, except that there's more than one installer? "sudo apt-get/yum/whatever blabla" 21:22:57 I personally think that's the way to go, like smalltalk has Pharo and Squeak that work the same 21:23:01 And then you have blabla. 21:23:26 jcowan: what's hard about that is that sometimes it just doesn't work, needs dependencies, won't compile for some silly reason, etc 21:23:29 What's an environment? Is it some inferior replacement for emacs :) :) 21:24:08 Building from source sometimes fails, with old and unmaintained code. I've never had an apt-get run fail other than for things like network connectivity. 21:24:28 bgs100 [~ian@unaffiliated/bgs100] has joined #scheme 21:25:14 robtillotson: hahah, no I mean more like an image 21:27:03 unkanon-work: It's definitely intended to be an environment (eg, there's a paper that uses something like "son of the lisp machine" as a title pun). 21:27:36 jcowan: you either have more luck than I do or you simply just know more than I do (probably the case :) 21:27:39 hold on, staff meeting here 21:27:42 (And re portability, you should try writing a gui application -- I used to be infinitely surprised that it would actually work on different platforms than the one I used.) 21:28:40 jcowan: Relying on apt-get/yum/whatever means that you also rely on an updated package that your distro maintains -- something that is often false. () 21:28:48 s/ ()// 21:28:53 -!- peterhil [~peterhil@a91-153-127-82.elisa-laajakaista.fi] has quit [Ping timeout: 264 seconds] 21:28:57 *jcowan* shrugs. 21:29:13 This is why I made the linux installer which is as convenient as other installers. 21:29:21 Downloading HEAD and trying to build it fails more often than using apt-get. 21:29:37 What dependencies are there? 21:29:50 (I'm not talking about building from any source, BTW.) 21:30:22 bitweiler [~bitweiler@adsl-99-58-93-196.dsl.stl2mo.sbcglobal.net] has joined #scheme 21:31:50 jcowan: with the caveat that you and eli seem to be in two different conversations ;), the main build dependencies for racket on Linux are X11 related (fonts, cairo, and so on) 21:32:25 eli: it should be really really hard to make it work across platforms so well (seeing that no other *anything* almost seems to be able to do it - only Pharo comes to mind) 21:32:28 yantan.tethera.net -- I love it! 21:32:59 just a pretentious colonial mind you 21:33:24 eli: right, thanks for that, that's a good argument that I forgot about 21:33:39 Ya gotta wonder if those sheep numerals are actually remembered by any actual shepherds, or if they now belong solely to nerds. 21:33:46 eli: you made the racket linux installer? 21:34:31 bremner: (re the different conversations -- jcowan started with asking about distribution, I don't know how it got to building from source though...) 21:34:57 unkanon-work: Yes -- the one that you get from the racket site (when you download a binary installer). 21:35:08 eli: the .sh one 21:35:35 unkanon-work said that Racket installs on Linux without having to build from source, and I pointed out that most programs on Linux don't have to be built from source. 21:35:50 BTW, my Racket installation on Linux stopped working today 21:35:54 jcowan: I didn't say anything about building from source 21:35:54 unkanon-work: Yes. 21:35:58 I just meant hands-off 21:36:09 there's no "configure, make clean, make, make install, blabla, error, google for error, find patch, fix this, make clean and make again" 21:36:12 That's building from source. 21:36:22 drdo` [~user@91.205.108.93.rev.vodafone.pt] has joined #scheme 21:36:23 I don't care if the racket.sh builds from source or what, I just like it because it works and then it gets out of my way, unline many many things in linux 21:36:38 I don't mean to bash linux 21:36:46 but obviously eli did something very right here 21:36:57 eli: Welcome to Racket v5.0.1. 21:36:57 SIGSEGV SI_KERNEL SI_CODE 128 fault on addr (nil) sent by kernel 21:36:57 Aborted 21:37:03 and I assume it's hard because nobody else cares for doing the same thing for there programs 21:37:20 unkanon-work: bash away -- as far as distributing binaries goes, linux is a pretty huge mess. 21:37:38 jcowan: Which OS? 21:37:43 If programs have lots of dependencies, it pays to use distro installers which can make sure the dependencies are in place. 21:37:46 Linux 21:37:51 peterhil [~peterhil@a91-153-127-82.elisa-laajakaista.fi] has joined #scheme 21:38:08 <_danb_> apt is great; that's one of the chief reasons I use debian 21:38:13 I last ran it probably a week ago. 21:38:16 -!- drdo [~user@91.205.108.93.rev.vodafone.pt] has quit [Ping timeout: 255 seconds] 21:38:25 <_danb_> but linux is constantly shifting; software is constantly changing; 21:38:49 jcowan: More specific than "Linux"? 21:39:16 <_danb_> it's amazing what a distro like debian does with packaging; speaking as an arms-length user of it 21:39:27 Linux pubuntu 2.6.33-co-0.8.0 #1 PREEMPT Sun Mar 21 19:46:28 UTC 2010 i686 GNU/Linux, running as CoLinux 21:40:12 _danb_: I migrated to minor distro because neither apt nor yum are greate enough for me 21:40:14 -!- Riastradh [debian-tor@fsf/member/riastradh] has quit [Ping timeout: 240 seconds] 21:41:20 <_danb_> Well, my point is that with a distro like debian you have the ability to install a huge range of software from thousands of developers, fairly recent (if you use debian testing) and it's as simple as aptitude install 21:41:27 <_danb_> it knocks windows et al into a cocked hat 21:41:42 I always say that what linux needs is a .dmg like the mac has 21:41:49 -!- homie [~levgue@xdsl-84-44-153-92.netcologne.de] has quit [Remote host closed the connection] 21:42:09 unkanon-work: advertise 0install then 21:42:15 the is a bsd based distro 21:42:18 -!- wbooze [~levgue@xdsl-84-44-153-92.netcologne.de] has quit [Remote host closed the connection] 21:42:26 MichaelRaskin: I didn't quite get that 21:42:30 the mac that is 21:42:31 <_danb_> if you want to play with software like python, ruby, apache, rails, django, etc etc which would you use: mac, windows or debian ? 21:42:36 mac installs are 'easy' mostly because they've abandonded shared libraries 21:42:45 <_danb_> (s/debian/ubuntu/ of whatever your preference is) 21:42:46 yeah I know that 21:42:52 <_danb_> I hate yum for some reason 21:43:01 unkanon-work: they are all for providing "packed with all libraries" binaries with them 21:43:08 all the more reason for linux to have a .dmg 21:43:29 MichaelRaskin: they who? I didn't understand your first sentence about advertise install 21:43:35 is that a tool I'm unaware of? 21:43:35 0install 21:43:39 what's that/ 21:43:45 _danb_: i would prefer any of those OSes since they all use the same package manager 21:44:10 http://0install.net/faq.html 21:44:14 *jcowan* would never use a Mac because he hates the ugly and user-unfriendly UI 21:44:16 _danb_: that's if you use NetBSD's package manager ;) 21:44:37 I use Nix because it is a package manager that allows me to undo an update 21:44:56 *bitweiler* smiles 21:45:23 Given incompatibilities in interpreter versions, pack-everything-with-you is a costly approach 21:45:29 jcowan: I use a mac and I don't care about the UI because I'm always on the command line 21:45:38 Nix just puts every version of everything in its own directory 21:45:57 And ensures that ewvery binary references the needed library 21:46:42 MichaelRaskin: I'll read about that. 21:47:01 http://nixos.org/ 21:47:03 MichaelRaskin: it's not image-based though 21:47:14 -!- zevarito_ [~zevarito@r186-48-199-159.dialup.adsl.anteldata.net.uy] has quit [Remote host closed the connection] 21:47:14 unkanon-work: You browse the web with netcat? 21:47:28 jcowan: why do you not believe in elinks? 21:47:57 jcowan: that remark went *woosh* over my head 21:47:57 Sure. I even use Lynx with some frequency. But it's so much more hardcore to talk about using netcat. 21:47:58 unkanon-work: if Nixpkgs has your package, you get most of the benefits of image-basedness 21:48:36 unkanon-work: Netcat is a command-line utility that lets you set up two-way TCP and UDP connections connected to its standard input and output. 21:48:39 jcowan: why leave socat? 21:49:03 MichaelRaskin: maybe, but let's use firefox as an example. on the mac the installer for firefox is an image with *one* thing inside, the executable for firefox. can the same be done with 0install? (i.e. there is no installation behind the scenes) 21:49:22 jcowan: yes I know that but I still don't know what you mean :/ 21:49:44 -!- peterhil [~peterhil@a91-153-127-82.elisa-laajakaista.fi] has quit [Ping timeout: 240 seconds] 21:50:11 Well, if you only use the command line, you *could* (if you are hardcore enough) do all your browsing with netcat. 21:50:26 But lynx or w3m or elinks is a far more sensible approach. 21:50:28 jcowan: stop being a luddite 21:50:31 peterhil [~peterhil@a91-153-127-82.elisa-laajakaista.fi] has joined #scheme 21:50:49 If you want to do a command-line browsing session without using ncurses, curl is a better choice 21:50:56 That works too. 21:51:06 jcowan: oh! I didn't realize it was connected to what I had said earlier. sorry, I'm scatterbrained 21:51:09 I'm not a Luddite. I use Chrome. I just hate the Mac UI. 21:51:21 jcowan: no I do indeed browse with firefox but then the UI doesn't really get in my way 21:51:32 jcowan: I don't hate nor love mac's UI 21:51:41 Even in thought experiments one should use the finest tool designed in spirit with self-imposed limitations! 21:51:44 incubot: What century is this? 21:51:48 fie on you and your 21st-century practicality 21:52:01 jcowan: I tried using lynx but I didn't like it, it's not how I think a command line browser should be, at least not out of the box 21:52:42 unkanon-work: as I know, 0install does install things - it just does that transparently 21:52:45 It was my first browser, so I'm used to it. 21:53:07 Putting entire OO.o into a single executable is considered a waste of effort on Linux 21:53:33 MichaelRaskin: I think I just distrust the dependencies part of things, so as long as the installer made with 0install manages those well (well = bringing the dependencies with the installer) then it's fine 21:53:43 -!- nilg` [~user@77.70.2.229] has quit [Remote host closed the connection] 21:53:47 I'll definitely check it out - wish more people were using it more though, and I wonder why they aren't 21:54:01 unkanon-work: 0install seems to bring the dependencies fine 21:54:37 it sounds great then. do you know why we don't see many programs using it for their installers? 21:54:48 Inertia, probably. 21:54:59 In nix the dependencies are strictly defined (when package is built you know exactly what glibc it uses), and you can have multiple glibc's if desired, so not an issue 21:56:23 yeah 21:56:37 That's good if you need bug-for-bug compatibility, not so good if you actually want your bugs to get fixed from time to time. 21:57:02 You know a distribution trusts its PM to work when entire set of services to run on boot is just one more package 21:57:13 jcowan: for that we have a buildfarm 21:57:20 Riastradh [debian-tor@fsf/member/riastradh] has joined #scheme 21:59:16 eli: well, congrats on the .sh installer, it's truly a work of art and I can't imagine how hard it must have been to do it. and also, thank you. 21:59:43 I never thought something as nice as DrRacket could ever run on linux without hours of sweat for trying to install it 22:02:45 Hours? 22:03:03 femtooo [~femto@95-89-196-149-dynip.superkabel.de] has joined #scheme 22:03:08 Most Nix expressions for packages don't take that long to write and test... 22:03:37 Azuvix [~Azuvix@71-215-25-216.bois.qwest.net] has joined #scheme 22:03:59 Versioning is really a social problem, as exhibited by the sad tale of Server Geek and Client Geek. 22:04:58 SG publishes a feed of stock prices, but due to a bug, any stock with a single-letter symbol gets the price increased by $32. 22:05:41 Eventually, SG detects this and fixes the bug. He then gets an angry call from CG. 22:05:50 -!- femtoo [~femto@95-89-196-149-dynip.superkabel.de] has quit [Ping timeout: 240 seconds] 22:05:58 MichaelRaskin: yes, I'm not a super advanced unix user, although I'd like to be 22:06:23 I mean I waste hours when trying to solve a problem when a package won't install 22:07:01 jcowan: lol did that really happen? I gotta read about that (I'll google for those names) 22:07:03 It seems that CG spotted that AT&T prices were too high, and included a fix to decrease them by $32. (Ticker symbol T, but CG doesn't know that's relevant.) 22:07:13 unkanon-work: No 22:07:16 oh 22:07:38 Or rather, you won't find it easily. 22:07:41 jcowan: well, there are technical approaches that somewhat lighten the issue if you remember about them from the beginning 22:08:18 Reducing trusted codebase.. (I mean, versioning patchlevel of the feed) 22:08:25 So CG complains that the new feed is bad, and demands the old feed back. 22:08:51 jcowan: it is no accident I mentioned having multiple glibcs installed 22:09:04 But of course what he really wants is a totally new feed where all prices are correct *except T*. 22:09:40 This is another case of alleviating the social problems by allowing each CG keep the feed it wants - at least if such exists 22:09:42 Then the issue becomes political and/or economic, which company has more clout, etc. 22:10:12 And then we get Windows ME bloated with Windows 3.0 compatibility hacks introduced in Windows 3.11 22:10:32 And whether CG's software is embedded in a device, etc. etc. 22:11:48 saccade [~saccade@209-6-54-113.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 22:12:29 MichaelRaskin: But note that CG doesn't depend on what he thinks he depends on. He depends on a combination of buggy and correct bheavior by SG *that has never existed* 22:12:40 That's the sting in the tail. 22:12:59 -!- drdo` is now known as drdo 22:13:39 If you can afford giving each one a separate version, whether he gets the feed he wants becomes a more rationally decided question of whether development of needed feed is worth it for SG 22:14:01 If you cannot... well, we get today's world 22:14:29 Given perfect information, that works. Here nobody has perfect information except the story teller. 22:16:33 homie [~levgue@xdsl-84-44-153-92.netcologne.de] has joined #scheme 22:17:25 Versioning is what CG proposes to solve the problem, but in fact it won't solve his problem because he doesn't truly know what his problem is. 22:18:26 jcowan: in reality, we have _two_ CG instances with different needs 22:18:47 unkanon-work: re the sh installer -- thanks, I'm mostly happy with the way it came together... 22:19:12 MichaelRaskin: How so? 22:19:15 jcowan: Did you try 5.0.2 or a nightly build? 22:19:30 jcowan: well, two is understatement, of course 22:19:37 eli: not yet 22:19:55 eli: :) 22:20:09 But perfect information is irrelevant when CG1 and CG2 want different values just for T 22:20:24 jcowan: Also, did you build from source? (Given the colinux thing, there might be some issues with running a build made on a plain linux.) 22:20:32 In this story there is only one CG, and he wants the old feed back. 22:20:48 eli: No. The point is that it worked last week, or at least the CLI did. 22:22:06 -!- Oejet [~oejet@212.45.122.120] has left #scheme 22:24:11 I'll reinstall. 22:24:41 jcowan: Reinstalling the same version is unlikely to do anything... 22:24:59 It was unlikely that the same version would spontaneously stop working, but AFAIK it did. 22:25:33 BTW, googling for that error message shows very little -- two mentions, one is from samth from ocober. 22:25:43 lewis1711 [~lewis@125-239-255-244.jetstream.xtra.co.nz] has joined #scheme 22:25:50 And since I'm using the CLI, it's unlikely to be an X11 dependency. 22:25:50 But he's on a plain ubuntu, and he was running his own build. 22:26:10 Except for the kernel, it is a plain Ubuntu Karmic. 22:26:12 eli, that's a pretty generic error message 22:26:26 jcowan: Yes, it's clear that it's not an x11 issue. 22:26:46 so if you make a macro (I think that's what define-syntax is called) do you just have to include it in every single one of your sourcefiles? 22:26:49 samth: that's what I assumed, which is why I was surprised to see so little. 22:27:50 lewis1711: re your (define pi 3) (define pi 4) issue in racket -- having two definitions in a file that starts with some "#lang" line (so they are modules) *is* a syntax error. 22:28:16 jcowan: BTW, does that colinux thing play nicely with the windows FS? 22:28:16 I tried running it under gdb, but even gdb doesn't survive. 22:28:29 eli: hmm, let me check this out 22:28:36 Yes, modulo trying to write the same file at the same time. 22:28:40 Zot! 22:29:22 from both OSes 22:29:35 wbooze [~levgue@xdsl-84-44-153-92.netcologne.de] has joined #scheme 22:29:44 jcowan: re gdb -- you need to say "handle SIGSEGV nostop noprint" before you run it so gdb will ignore that (it's used by the GC). 22:30:14 jcowan: And re the FS -- does it perform well too, or is it annoyingly slow like cygwin? 22:30:24 eli: right you are. now I remember my issue was that racket let you redefine things that are already scheme key words without warning 22:30:47 jcowan: (That's one reason I was trying to play with it -- when it gets to things like git cygwin is painfully slow.) 22:31:03 eli: That handle command doesn't help, gdb still crashed 22:31:24 gdb itself crashes? 22:31:48 -!- femtooo [~femto@95-89-196-149-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 22:31:58 eli: though on experimentation they all let you do that. I just know I am going to get bitten in the ass by this:( 22:32:09 lewis1711: If you mean that you can write a file that has a definition for a name that is part of the language, then that's a feature. 22:32:37 well, i guess it should be allowed... but a warning would be nice 22:33:00 lewis1711: But it's nothing that should be considered "scary", for example, when you write (define + ...whatever...) it knows that all references to `+' in your own module use that definition, and it has no effect outside of your module. 22:33:26 so i don't come in here trying to solve a problem, only to find procedure-i-need has been defined to be something else in my code and used all over the place 22:33:41 lewis1711: Nope, these defines don't leak outside the module. 22:34:12 lewis1711: In other words, this is something that is detected *syntactically*, not some kind of a dynamic overriding. 22:34:16 huh? so if I want a file of global constants, (define life 42), I can't import that everywhere? 22:34:22 *export 22:34:35 eli: Well, it terminates. 22:36:18 lewis1711: For example, if you try: (define x (+ 1 2)) (define + *), then `x' will not get bound to 3 -- instead, you'll get an error about using an uninitialized value. This means that when racket sees your `+' definition as it compiles the file, it already knows that it should be used in your module. 22:36:37 jcowan: I'm out of ideas then... 22:37:59 eli: I am trying some stuff out in racket now. i don't really get it 22:39:16 lewis1711: What is "it" that you don't get? 22:39:47 -!- pumpkin [~pumpkin@unaffiliated/pumpkingod] has quit [Quit: Computer has gone to sleep.] 22:41:06 well for one thing I don't know how to import in racket:P (require "test.rkt") seems to read it then give errors, even though it has no syntax errors 22:41:37 oh no, it did have errors 22:42:46 eli: ah I see now. if it's not a keyword you can define it and use it anywhere by importing the moduel 22:42:54 if it is, it will keep its meaning 22:43:12 jcowan_ [~John@cpe-74-68-112-189.nyc.res.rr.com] has joined #scheme 22:43:27 though still, a warning would be nice. I can imagine myself defining some-keyword-I-don't-know to be something else, then trying to use it in another module, then spend ages tracking down the bug 22:44:31 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Disconnected by services] 22:44:34 -!- jcowan_ is now known as jcowan 22:46:12 -!- fradgers- [~fradgers-@5e0b815c.bb.sky.com] has quit [Remote host closed the connection] 22:46:38 lewis1711: `require' should be fine, and should only complain when the required file has problems. As for your concern, it's unclear to me what you mean by "keyword". If you have some concrete example for what is it that you're worried about it will help. 22:46:41 ...also as another criticism, this error in compiling "SDL : cannot load terminal.png" causes drracket to crash 22:47:13 How did you get to SDL? 22:47:42 eli: lets say I'm a noob and i don't know what eval is. i define eval to be this very complicated procedure. i then require the file it's defined in, in another module, and try and use it...and get weird errors 22:47:57 eli: oh some dude made a binding to a library that uses sdl, was just trying it out and 22:47:59 for racket 22:48:31 lewis1711: Maybe the crashing is caused by some dude. 22:48:45 lewis1711: You should sue him NOW! :-P 22:48:53 maybe IDEs shouldn't crash because the compiler can't find a file?:P 22:49:00 lewis1711: re rebinding `eval' -- if you're a noob, then you shouldn't provide it, and as long as you don't provide your `eval', I can use your code without problems. 22:49:12 provide? 22:49:29 lewis1711: "provide" is how a module exports items. 22:49:32 `provide' -- the way you declare some bindings to be exported. 22:50:05 this is still relying on the programmer to know things the compiler should warn about 22:50:13 lewis1711: The IDE should not crash because of a missing file, but the fact that you're using some dude's foreign interface means that it's very easy (and much more likely) that some dude messed up and did something wrong. 22:50:35 (I'll reply more later, must run out now.) 22:51:03 I am sure he did something wrong, but the IDE should not crash over it. I mean...it's an IDE. it should just report the error 22:51:55 lewis1711: Heh. 22:52:10 lewis1711: Actually, when using FFIs, all bets are off. 22:52:13 Just like unprotected sex. 22:53:00 -!- aisa [~aisa@173-10-243-253-Albuquerque.hfc.comcastbusiness.net] has quit [Quit: aisa] 22:53:27 and I maintain that's a bug. things shouldn't crash when a compile fails. that just implies to me that something in drracket is way too closely coupled with the compile process 22:53:52 I don't care if I am dealing with something written in evil foreign C. 22:54:41 lewis1711: What you're trying to say is, code evaluated in DrRacket should be run "out-of-process". 22:54:52 yes 22:55:35 That will double DrRacket's memory usage (one runtime for DrRacket itself, one runtime to run your program in). So maybe that should be configurable. 22:55:37 maybe it was written in one of those schemes without exception handling? they should update to racket! /troll 22:56:12 And for the people who play it safe all the time, they can save on their memory usage. ;-) 22:56:13 cky: huh? I have used plenty of IDEs where a compiler crash won't crash the IDE. even text editors. 22:56:29 lewis1711: It's not a compiler we're talking about here. 22:56:34 We're talking about _running_ foreign code. 22:56:38 I swear you peoiple will defend anything that involves scheme remotely 22:56:58 I have no interest or involvement in Racket. 22:57:03 I only have interest and involvement in clue. 22:57:23 You sound like someone who thinks like a User. :-P 22:57:38 a User? 22:58:05 dfkjjkfd [~paulh@161-9-ftth.onsnetstudenten.nl] has joined #scheme 22:59:47 dakeyras [~dakeyras@pool-173-64-149-152.sttlwa.fios.verizon.net] has joined #scheme 23:02:32 kilimanjaro [~kilimanja@unaffiliated/kilimanjaro] has joined #scheme 23:02:41 lewis1711, there are important reasons why DrRacket runs user programs in-process 23:02:59 in particular, it allows close integration between the program and the ide 23:03:14 for example, the ability to use images in programs relies on this 23:03:41 it also gives drracket much more control over the user program 23:03:56 hmm 23:04:02 guess i just prefer it the old fashioned way 23:05:16 if you want an ide that works well with Racket but runs out-of-process, i recommend geiser in emacs 23:05:31 the way drracket works is actually fairly old-fashioned, it's just not common in these days of languages with separate compilers and interpreters :) 23:08:15 *unkanon-work* prefers the old-fashioned way 23:09:18 *cky* agrees with robtillotson that in-process is the old-fashioned way. 23:09:37 it is reminiscent of smalltalk, or developing emacs extensions 23:09:50 yes, it reminds me of smalltalk 23:10:16 drracket imposes much more isolation between the user program and itself than smalltalk usually does 23:11:54 wisey [~Steven@host86-150-108-29.range86-150.btcentralplus.com] has joined #scheme 23:12:28 -!- drdo [~user@91.205.108.93.rev.vodafone.pt] has quit [Remote host closed the connection] 23:15:27 eli: Why can't we simply require that (delay (force x)) not leak? 23:16:33 drdo [~user@91.205.108.93.rev.vodafone.pt] has joined #scheme 23:17:17 -!- dfkjjkfd [~paulh@161-9-ftth.onsnetstudenten.nl] has quit [Quit: Lost terminal] 23:17:19 foof, do you want to require that the Scheme implementation perform a source-to-source transformation from (delay (force x)) to (lazy x) in order to be correct? 23:17:31 jlongster [~user@nat/mozilla/x-fxzfunnwohrlevkp] has joined #scheme 23:17:50 Riastradh: I'm not convinced that's the only way to do it. 23:20:11 copumpkin [~pumpkin@unaffiliated/pumpkingod] has joined #scheme 23:20:51 -!- gravicappa [~gravicapp@ppp85-140-66-122.pppoe.mtu-net.ru] has quit [Remote host closed the connection] 23:23:25 foof: My Chibi error report was misleading. The reason that genstub crashes during the Chibi build is that the built Chibi *always* crashes with sigsegv. 23:24:20 jcowan: OK, that helps, but I still haven't had time to look at the mingw build. 23:25:20 Cygwin, not mingw. 23:25:34 that too :) 23:26:29 -!- Checkie [2930@unaffiliated/checkie] has quit [Ping timeout: 264 seconds] 23:27:48 lisppaste not working 23:27:55 Here's what I see: 23:28:00 when I run under gdb 23:28:02 (gdb) run 23:28:02 Starting program: /opt/chibi/chibi-scheme/chibi-scheme 23:28:02 [New thread 22224.0x5aac] 23:28:02 [New thread 22224.0x44e8] 23:28:02 [New thread 22224.0x5754] 23:28:03 Program received signal SIGSEGV, Segmentation fault. 23:28:05 0x61119796 in fileno () from /usr/bin/cygwin1.dll 23:28:07 (gdb) bt 23:28:09 #0 0x61119796 in fileno () from /usr/bin/cygwin1.dll 23:28:11 #1 0x7c85ada0 in OutputDebugStringA () 23:28:13 from /cygdrive/c/WINDOWS/system32/kernel32.dll 23:28:15 #2 0x40010006 in ?? () 23:28:17 #3 0x00000000 in ?? () 23:28:19 Not too helpful. 23:28:23 I suppose I should rebuild with -g 23:28:41 The Makefile uses -g3. 23:29:53 So it's a crash in the Cygwin dll, which probably means a syscall is getting bad arguments somewhere. 23:31:04 -!- jcowan [~John@cpe-74-68-112-189.nyc.res.rr.com] has quit [Quit: Leaving] 23:41:50 -!- bweaver [~user@host-68-169-175-225.WISOLT2.epbfi.com] has quit [Ping timeout: 240 seconds] 23:56:43 -!- jonrafkind [~jon@crystalis.cs.utah.edu] has quit [Ping timeout: 276 seconds]