00:47 (quit) neilv: Ping timeout: 245 seconds 00:53 (join) tomku 00:54 (quit) rapacity: Remote host closed the connection 00:59 (join) neilv 01:01 (join) rapacity 01:04 (quit) rapacity: Changing host 01:04 (join) rapacity 01:04 (quit) rapacity: Client Quit 01:06 (join) Lajla 01:07 (join) rapacity 01:07 (quit) jeapostrophe: Quit: jeapostrophe 01:56 neilv: if i want to read input using at-exp reader, apply some transformations, and then feed it to scribble for processing like "#lang scribble/doc" does... i can just produce a sexp and do what "scribble/doclang" does, correct? or will my life be easier if i write a .scrbl file that is then re-read by scribble later 02:06 neilv: actually, i think maybe i want to read from input port, do a tiny bit of filtering to produce another input port that at-exp reads from, use syntax-parse or syntax-case on that syntax, and then hand it off scribble/doc processing 02:06 neilv: so scribble has syntax location info to the source document for reporting errors 03:37 (quit) jonrafkind: Ping timeout: 260 seconds 03:49 (join) Demosthenes 03:55 (join) mceier 04:07 eli: neilv: For any post-processing on scribbled contents you can just use it as sexprs. If syntax properties are messed or not is a different question (which, as usual, raise the question of using a macro or a function instead). 04:19 neilv: eli: thanks. i posted on the list with more question a little earlier. i'm wondering whether planet requires that scribble read from a file. if it does, i have a couple ideas for how to work with that 04:24 eli: neilv: Do you have an example for a source file that you want to convert? 04:25 neilv: very similar to http://planet.racket-lang.org/package-source/neil/html-parsing.plt/1/2/html-parsing.rkt 04:25 rudybot: http://tinyurl.com/4yctpsx 04:27 neilv: scribble-like markup will be on lines starting with ";;;", and the other lines will be read for info pertinent to the documentaiton, such as typed-racket syntax 04:27 eli: neilv: So you want to "massage" it into a scribble file? 04:28 neilv: strictly non-sexually, yes 04:28 eli: And the contents of the doc part will change, right? 04:29 neilv: hm? 04:29 eli: Ah, nevermind, I see that you said that "scribble-like markup will be ...". 04:29 eli: So you want something kind of like the fake-literate-haskell thing, where some lines have the docs, and the rest is the source. 04:30 eli: For now, I think that the best approach would be to hack something dirty that works on whatever level is more convenient. 04:30 neilv: i have been using something dirty for 10 years. i'm ready for it to not be dirty 04:30 neilv: otherwise i can go play video games right now 04:31 eli: An extension that will probably happen soon, is that modules will be able to have more than a single part. 04:31 (quit) ryanaghd1m: Quit: Lost terminal 04:31 eli: This is useful for a bunch of use cases, like having the tests and the code be in the same file, and not load the tests unless you use that part explicitly. 04:31 eli: Another place where it's useful is things like in-line documentation. 04:32 eli: We have two of these currently -- the thing where scribble docs appear on the provide/contract part, and the LP langugae. 04:32 eli: In both cases there's a similar hack in place -- the code itself uses macros that ignores the documentation part. 04:33 eli: (In the LP case it also reorganizes the code according to chunk references, of course.) 04:33 eli: Then, there's a file for the documentation which "extracts" the documentation part. 04:33 eli: So it's kind of like a similar hack, except a little less hacky in the sense that you don't need to generate actual files. 04:34 neilv: i'm trying to do something that works with racket 5.1.3 and doesn't interfere with the #lang line 04:34 eli: The new thing will remove that aspect of it. 04:34 eli: This thing is likely to happen for the next release, which is why I think that a temporary hack is fine. 04:36 neilv: if my doc tool needs to be able to look at ":" and "define:" forms 04:36 neilv: will that work with this module parts thing? 04:36 neilv: or do i still have the same problem of having to read the file myself? 04:36 (quit) realitygrill: Quit: realitygrill 04:37 eli: It will be a little different, similar to the above two. 04:37 eli: Here's a sketch of how it could look: 04:37 eli: you basically replace the ";;; " with some real sexpr contents. 04:37 eli: Say, some @doc{blah} parts. 04:37 neilv: if this module parts thing let me add to the language a 'doc' form that is ignored for racket #lang scheme/base purposes, that would be nice 04:38 eli: Then you write the `doc' macro in a way that makes its contents appear in a doc part of the same module. 04:38 eli: Roughly that -- instead of being ignored, it's made into a kind of a sub-part of the module. 04:38 eli: One that is usually not loaded. 04:39 eli: Unless you're running some code that requires that part explicitly. 04:39 eli: (And that happens when scribbling it.) 04:43 neilv: do we give the info about this documentation language in the #lang line? 04:43 neilv: the information to ignore 'mydoc' forms for purposes of normal loading of the file, at least 04:43 neilv: ? 04:44 eli: I'm not following that completely. 04:45 eli: One thing that you'd have in the lang line is the scribble syntax: #lang at-exp racket-or-whatever 04:45 neilv: #lang at-exp racket/base 04:45 eli: Then, for the ignored `doc' thing, you just get some macro, as usual, from a library. 04:46 eli: The tricky bit would be if you want some code that is also used for the documentation. 04:46 neilv: what else gets added to that so that when we try to treat it as normal racket/base code, it ignores 'mydoc'? 04:46 eli: Nothing. 04:46 eli: Your `mydoc' would be a macro that makes its contents go to the documentation part. 04:46 neilv: where do i say there is this 'mydoc' macro that may be used in this file? 04:47 eli: Huh? 04:47 neilv: in "require"? 04:47 eli: Yeah. 04:48 eli: Same thing as requiring a file now with a `doc' macro that expands to nothing. 04:48 neilv: ok, and that macro expands to some special "(#%part mydoc-part ...)" syntax? 04:48 eli: Yes, that would be the new stuff. 04:48 eli: (Unclear how it'll look in practice though.) 04:49 neilv: ok, so that would be useful for ignoring. but i still have to read the file myself, not say "ok, racket, now expand this module for its 'mydoc-part' part", because ":" and "define:" are in the default part, and not in the "mydoc-part" part? 04:53 eli: That's the tricky bit, which is essentially the same as now. 04:54 eli: You'd need your own definitions that collect information for the docs. 04:54 eli: For example some new define form, which when you use it as some (mydefine (foo x y) ...) will expand into a plain `define', and into some code that is also going into the documentation part. 04:55 neilv: i need to see ":" and "define:", not require people to say "mydefine" 04:57 neilv: i think i will have to stick with reading the file myself for documentation extraction, but i will keep this parts thing in mind so that i can put the docs in sexp form rather than comments 04:59 eli: neilv: There's no need to *actually* call it `mydefine'. It would obviously be called `define' in my example, or `define:' in yours. 05:03 neilv: aha. before this parts feature is available, i could put the documentation in "#;" comments, with some cookie in them to mark them as documentation 05:07 eli: Well, you can make the macro just ignore them for now, and have a separate post-processor that will un-ignore them as documentation. 05:07 eli: That'd be roughly like those two hacks I mentioned. 05:08 eli: (Where the post-processor doesn't really generate the file, just reads it and creates the documentation directly -- so you have a stub file for the docs that does that and expands into the doc code.) 05:08 neilv: hm. i'd prefer not to need a "require" for ignoring the documentation forms, but i suppose the cost is minor 05:09 eli: That `require' is providing a `doc' binding, which just ignores its contents now, but will later do the other thing. 05:10 neilv: that would also mean that, without parts, i don't need to mess too much with the reader to read the file for documentation purposes (don't need to read comments) 05:10 eli: Yes, that's why it's a good plan -- most of the code will stay. 05:11 neilv: i supposed i could write it in such a way that it's easy to change to parts. that's not how i started writing it 05:12 eli: ...which is why it's a good idea to start right. 05:12 eli: BTW, the stub part is not *that* much of a hack. 05:13 eli: Since it's a macro that reads the original file, it can work with bindings and everything -- so it's even a hygienic kind of tweaking. 05:14 eli: (I'm still not clear on this Irene thing, I stayed the whole night to deal with floods, and there's still nothing... I thought that it would have been pretty bad by now.) 05:14 neilv: i just this moment pulled up http://www.boston.com/news/nation/specials/110826_irene_winds/?p1=News_links 05:14 rudybot: http://tinyurl.com/4xhcq35 05:15 neilv: it should be around 30mph winds right now 05:17 eli: Certainly doesn't feel like it... 05:17 neilv: so long as i don't get a patio chair through my window, and the power/internet isn't out long, this should be easy (knock on wood) 05:18 eli: The flooding is what worries me, last summer we had about 30cm of water in the first flood. 05:26 neilv: i'm on an upper floor of a red brick elevator building near harvard square. flooding might just mean the tile lobby needs to be waded through til they pump it out 05:36 eli: We have one side of a condo, and our main computing machine is in the basement... 05:47 neilv: tower/desktop, or you have a rack? 05:48 neilv: well, i hope it's fairly uneventful for you. if your place gets flooded, you guys can crash here for a couple days 05:49 eli: Heh, if it gets bad enough that we need to leave, then you'll have problems too... 05:50 eli: It's just the basement that is prone to flooding... 05:50 eli: (Plain desktop, but some stuff on the floor.) 06:05 ohwow: Hello 06:37 (quit) dsp_: *.net *.split 06:37 (quit) Utkarsh: *.net *.split 06:37 (quit) Lajla: *.net *.split 06:37 (quit) dwaynecrooks: *.net *.split 06:37 (quit) si14: *.net *.split 06:37 (quit) hyko-: *.net *.split 06:37 (quit) rudybot: *.net *.split 06:37 (quit) Demosthenes: *.net *.split 06:37 (quit) DGASAU: *.net *.split 06:37 (quit) shachaf: *.net *.split 06:37 (quit) ve: *.net *.split 06:37 (quit) tewk: *.net *.split 06:37 (quit) stchang_: *.net *.split 06:37 (quit) em: *.net *.split 06:37 (quit) snorble: *.net *.split 06:37 (quit) neilv: *.net *.split 06:37 (quit) jao: *.net *.split 06:37 (quit) tunes: *.net *.split 06:37 (quit) martinhex: *.net *.split 06:37 (quit) wtetzner: *.net *.split 06:37 (quit) samth_away: *.net *.split 06:37 (quit) zakwilson: *.net *.split 06:37 (quit) rapacity: *.net *.split 06:37 (quit) tomku: *.net *.split 06:37 (quit) karljoh: *.net *.split 06:37 (quit) ozzloy: *.net *.split 06:37 (quit) offby1: *.net *.split 06:37 (quit) Fade: *.net *.split 06:37 (quit) svk_: *.net *.split 06:37 (quit) mario-goulart: *.net *.split 06:37 (quit) elliottcable: *.net *.split 06:37 (quit) ohwow: *.net *.split 06:37 (quit) tauntaun: *.net *.split 06:37 (quit) cky: *.net *.split 06:37 (quit) tonyg: *.net *.split 06:37 (quit) mceier: *.net *.split 06:37 (quit) spewn: *.net *.split 06:37 (quit) gf3: *.net *.split 06:37 (quit) Burlingk: *.net *.split 06:38 (quit) janne: *.net *.split 06:38 (quit) stamourv: *.net *.split 06:38 (quit) clklein: *.net *.split 06:38 (quit) ChanServ: *.net *.split 06:38 (join) mceier 06:38 (join) Demosthenes 06:38 (join) rapacity 06:38 (join) Lajla 06:38 (join) neilv 06:38 (join) tomku 06:38 (join) jao 06:38 (join) DGASAU 06:38 (join) karljoh 06:38 (join) Fade 06:38 (join) dwaynecrooks 06:38 (join) tunes 06:38 (join) ChanServ 06:38 (join) tonyg 06:38 (join) gf3 06:38 (join) cky 06:38 (join) tauntaun 06:38 (join) offby1 06:38 (join) clklein 06:38 (join) snorble 06:38 (join) ohwow 06:38 (join) stamourv 06:38 (join) ozzloy 06:38 (join) ve 06:38 (join) janne 06:38 (join) shachaf 06:38 (join) elliottcable 06:38 (join) zakwilson 06:38 (join) em 06:38 (join) mario-goulart 06:38 (join) samth_away 06:38 (join) wtetzner 06:38 (join) martinhex 06:38 (join) rudybot 06:38 (join) hyko- 06:38 (join) stchang_ 06:38 (join) tewk 06:38 (join) dsp_ 06:38 (join) Utkarsh 06:38 (join) spewn 06:38 (join) svk_ 06:38 (join) si14 06:38 (join) Burlingk 06:38 (quit) dsp_: *.net *.split 06:38 (quit) Utkarsh: *.net *.split 06:38 (join) dsp_ 06:38 (join) Utkarsh 06:38 (quit) Lajla: *.net *.split 06:38 (quit) dwaynecrooks: *.net *.split 06:38 (quit) si14: *.net *.split 06:38 (quit) hyko-: *.net *.split 06:38 (quit) rudybot: *.net *.split 06:39 (join) Lajla 06:39 (join) dwaynecrooks 06:39 (join) si14 06:39 (join) hyko- 06:39 (join) rudybot 06:39 (quit) Demosthenes: *.net *.split 06:39 (quit) DGASAU: *.net *.split 06:40 (quit) shachaf: *.net *.split 06:40 (quit) ve: *.net *.split 06:40 (join) Demosthenes 06:40 (join) DGASAU 06:40 (join) shachaf 06:40 (join) ve 06:41 (quit) tewk: *.net *.split 06:41 (quit) stchang_: *.net *.split 06:41 (quit) em: *.net *.split 06:41 (quit) snorble: *.net *.split 06:41 (join) tewk 06:41 (join) stchang_ 06:41 (join) em 06:41 (join) snorble 06:42 (quit) em: Max SendQ exceeded 06:43 (join) em 06:48 (quit) em: Ping timeout: 252 seconds 06:54 (join) em 06:59 (quit) em: Ping timeout: 245 seconds 07:00 (join) em 07:05 (quit) em: Ping timeout: 246 seconds 07:07 (join) em 07:12 (quit) em: Ping timeout: 264 seconds 07:12 (part) snorble 07:13 (join) em 07:18 (quit) em: Ping timeout: 260 seconds 07:20 (join) em 07:20 (join) MayDaniel 07:24 (join) snorble 07:25 (quit) em: Ping timeout: 260 seconds 07:26 (join) em 07:31 (quit) em: Ping timeout: 245 seconds 07:33 (join) em 07:35 (quit) neilv: Ping timeout: 245 seconds 07:39 (quit) em: Ping timeout: 258 seconds 07:40 (join) em 07:45 (quit) em: Ping timeout: 240 seconds 07:46 (join) em 07:51 (quit) em: Ping timeout: 245 seconds 07:53 (join) em 07:58 (quit) em: Ping timeout: 250 seconds 07:59 (join) em 08:04 (quit) em: Ping timeout: 252 seconds 08:05 (quit) dwaynecrooks: Read error: Connection reset by peer 08:05 (join) em 08:11 (quit) em: Ping timeout: 240 seconds 08:12 (join) em 08:17 (quit) em: Ping timeout: 250 seconds 08:18 (join) em 08:20 (join) dwaynecrooks 08:24 (quit) em: Ping timeout: 260 seconds 08:25 (join) em 08:30 (quit) em: Ping timeout: 258 seconds 08:32 (join) em 08:33 (join) egnarts-ms 08:38 (quit) em: Ping timeout: 276 seconds 08:38 (join) em 08:40 egnarts-ms: could anyone help me with a simple question about Racket: structs, are they built-in types, like lists or vectors, or they are implemented on-top of some basic data structures ? 08:40 egnarts-ms: i've been delving into Racket sources for some time, and was unable to find the answer 08:41 egnarts-ms: neither in the documentation 08:44 (quit) em: Ping timeout: 264 seconds 08:45 (join) em 08:51 (quit) em: Ping timeout: 276 seconds 08:52 (join) em 08:57 (quit) em: Ping timeout: 264 seconds 08:58 (join) em 09:00 (join) jeapostrophe 09:00 (quit) egnarts-ms: Ping timeout: 252 seconds 09:03 (quit) em: Ping timeout: 245 seconds 09:04 (join) em 09:09 (quit) em: Ping timeout: 260 seconds 09:10 (join) em 09:16 (quit) em: Ping timeout: 264 seconds 09:17 (join) em 09:22 (quit) em: Ping timeout: 264 seconds 09:24 (join) em 09:29 (quit) em: Ping timeout: 264 seconds 09:30 (join) em 09:35 (quit) em: Ping timeout: 240 seconds 09:37 (join) em 09:42 (quit) em: Ping timeout: 252 seconds 09:43 (join) em 09:48 (quit) em: Ping timeout: 258 seconds 09:49 (join) em 09:49 (quit) em: Changing host 09:49 (join) em 09:54 (join) RacketCommitBot 09:54 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/ZZTrNQ 09:54 RacketCommitBot: [racket/master] remove leftover tmp file during reference build - Matthew Flatt 09:54 (part) RacketCommitBot 09:55 (quit) em: Ping timeout: 252 seconds 09:56 (join) em 10:01 (quit) em: Ping timeout: 246 seconds 10:01 (join) egnarts-ms 10:02 (join) em 10:07 (quit) em: Ping timeout: 264 seconds 10:08 (quit) jeapostrophe: Quit: jeapostrophe 10:08 (join) em 10:14 (quit) em: Ping timeout: 276 seconds 10:14 (join) em 10:19 ohwow: git.io, that's a cool new domain for github :] 10:19 (quit) em: Ping timeout: 250 seconds 10:21 (join) em 10:25 (quit) em: Ping timeout: 252 seconds 10:27 (join) em 10:32 (quit) em: Ping timeout: 246 seconds 10:33 (join) em 10:38 (quit) em: Ping timeout: 250 seconds 10:39 (join) em 10:40 (join) anRch 10:44 (quit) em: Ping timeout: 240 seconds 10:44 (join) jeapostrophe 10:45 (join) em 10:47 (quit) jeapostrophe: Client Quit 10:51 (quit) em: Ping timeout: 260 seconds 10:52 (join) em 10:57 (quit) em: Ping timeout: 240 seconds 10:57 (quit) anRch: Quit: anRch 10:58 (join) em 11:03 (quit) em: Ping timeout: 250 seconds 11:04 (join) em 11:10 (quit) em: Ping timeout: 264 seconds 11:10 (join) em 11:16 (quit) em: Ping timeout: 252 seconds 11:17 (join) em 11:21 (join) jonrafkind 11:23 (quit) em: Ping timeout: 246 seconds 11:28 (join) em 11:40 (quit) egnarts-ms: Ping timeout: 252 seconds 12:09 (join) samth 12:31 (join) dnolen 12:40 (quit) samth: Ping timeout: 245 seconds 13:05 (join) otzi 13:25 (join) RacketCommitBot 13:26 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/72EVHw 13:26 RacketCommitBot: [racket/master] allow phase 1+ references to not-yet-defined bindings - Matthew Flatt 13:26 RacketCommitBot: [racket/master] fix cross-reference - Matthew Flatt 13:26 RacketCommitBot: [racket/master] make bytecode compiler less picky about exports - Matthew Flatt 13:26 (part) RacketCommitBot 13:31 (join) RacketCommitBot 13:31 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/qwYZEA 13:31 RacketCommitBot: [racket/master] adjust the online check syntax so that you get a subtle indication of read errors instead of just silence - Robby Findler 13:31 (part) RacketCommitBot 14:14 (quit) tomku: Ping timeout: 252 seconds 14:16 (join) tomku 14:24 (join) ryanaghd1m 15:14 (join) jeapostrophe 16:15 (quit) jeapostrophe: Quit: jeapostrophe 16:15 (join) samth 16:26 (join) jeapostrophe 16:29 (quit) jeapostrophe: Client Quit 16:29 (join) jeapostrophe 16:29 (quit) jeapostrophe: Client Quit 16:31 (join) jeapostrophe 16:32 (quit) jeapostrophe: Client Quit 16:44 (quit) ryanaghd1m: Ping timeout: 260 seconds 16:45 (join) jeapostrophe 16:45 (quit) jeapostrophe: Client Quit 16:51 (join) realitygrill 17:26 (quit) samth: Ping timeout: 245 seconds 17:40 (join) jeapostrophe 17:40 (quit) jeapostrophe: Client Quit 17:42 (quit) mceier: Quit: leaving 18:15 (join) jeapostrophe 18:19 (quit) DGASAU: Remote host closed the connection 18:19 (join) DGASAU 18:23 (join) ryanaghd1m 18:25 (quit) ryanaghd1m: Client Quit 18:26 (join) ryanaghd1m 18:36 (quit) jeapostrophe: Quit: jeapostrophe 18:42 (quit) MayDaniel: Read error: Connection reset by peer 19:03 (join) jeapostrophe 19:22 (quit) jeapostrophe: Quit: jeapostrophe 19:29 (quit) Burlingk: Quit: Leaving 19:40 (join) jeapostrophe 19:42 (quit) jeapostrophe: Client Quit 19:55 (nick) otzi -> flaggy 20:16 (join) RacketCommitBot 20:16 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/WIFxLw 20:16 RacketCommitBot: [racket/master] move Reference reader & prnter docs to the model chapel - Matthew Flatt 20:16 RacketCommitBot: [racket/master] restore module cache - Matthew Flatt 20:16 (part) RacketCommitBot 20:16 (join) jeapostrophe 20:48 (quit) ryanaghd1m: Ping timeout: 240 seconds 21:18 (join) neilv 21:24 (join) rlph 21:25 (part) rlph 21:37 (join) RacketCommitBot 21:37 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/0Tqt1A 21:37 RacketCommitBot: [racket/master] path normalization in setup/scribble - Matthew Flatt 21:37 (part) RacketCommitBot 21:54 (join) ryanaghd1m 21:58 (join) crk 21:58 crk: hi, i'm facing a strange issue 21:58 crk: i've got this file "insertionsort.rkt" which has a (define (insertionsort ...)) 21:58 crk: i run mzscheme in the same directory 21:58 crk: followed by 21:59 crk: > (load "insertionsort.rkt") 21:59 crk: but the insertionsort function does not load 21:59 crk: there's no error in the load 21:59 jonrafkind: how do you know it doesnt load? 21:59 crk: > insertionsort 21:59 crk: reference to undefined identifier: insertionsort 21:59 crk: === context === 21:59 crk: /usr/lib/racket/collects/racket/private/misc.rkt:85:7 21:59 jonrafkind: you mena you have typed literally (define (insertionsort ...)) ? 21:59 crk: thats how :-| 21:59 crk: yeah... 21:59 crk: its in the file like that 22:00 crk: ideally i would've expected it to say procedure something something 22:00 crk: > number? 22:00 crk: # 22:00 jonrafkind: does it say antyhing after you do (load ...) ? 22:00 crk: am I doing something wrong? 22:00 crk: nope... 22:00 crk: I get the REPL prompt again 22:00 crk: no errors/warnings 22:00 crk: using racket 5.1.3 22:00 jonrafkind: i dunno, paste the contents of insertionsort.rkt somewhere (not here) 22:01 crk: yeah 22:01 crk: pastebins :) 22:01 crk: hang on 22:01 crk: http://fpaste.org/0tDG/ 22:02 jonrafkind: it may be because of the #lang ... 22:03 jonrafkind: ok do this: in insertionsort.rkt add (provide insertionsort) 22:03 crk: ok 22:03 jonrafkind: then use (require "insertionsort.rkt") instead of (load ...) 22:03 crk: remove the #lang ? 22:03 crk: or let it stay 22:03 jonrafkind: you can let it stay 22:03 jonrafkind: if you leave it there then you have a module and you have to use provide and (require) 22:03 jonrafkind: if you take it out then you can just use (load) 22:03 crk: i see 22:03 crk: wait, let me try that 22:04 crk: adding the line isnt helping 22:04 crk: let me remove #lang and see 22:04 crk: oh dang... wait 22:04 crk: didnt use require :) 22:04 crk is a dork 22:04 (join) RacketCommitBot 22:04 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/ZIcwJA 22:04 RacketCommitBot: [racket/master] fix `compile-omit-files' handling for Planet packages - Matthew Flatt 22:04 (part) RacketCommitBot 22:05 crk: Dr. Flatt... the interview on FLOSS weekly was quite interesting :) 22:05 jonrafkind: so if you want to use modules then the only things you can use outside the module are things you give to (provide ...) 22:06 crk: ok 22:06 crk: it works now :) 22:06 jonrafkind: unless you use (enter!) but thats another barrel of fish 22:06 crk: so if I use a (provide ) in the file 22:06 crk: it makes the file a module, implicitly 22:06 crk: no (module ... ) 22:06 crk: ? 22:06 jonrafkind: no if you use #lang racket, then its a module 22:06 jonrafkind: and you load modules with (require ...) 22:06 crk: ok 22:07 jonrafkind: and you get access to things in the module by putting (provide foobar) inside the module 22:07 crk: great 22:07 crk: :) 22:07 jonrafkind: and of course modules can load each other, which is the whole point 22:07 crk: on a side-note, my insertionsort 22:07 crk: which i gave you the link for 22:07 jonrafkind: if you aren't doing anything fancy you can do (load "whatever.rkt") in your files as well and it will usually work 22:07 crk: seems rather procedural, with set! and all that 22:07 crk: i mean, it shows i'm basically a python guy :P 22:08 crk: using the same insert, is there a better/more elegant/scheme way 22:08 jonrafkind: you can use for/fold there 22:08 jonrafkind: i will leave it as an exercise for you to figure out :) 22:08 crk: :D 22:08 crk: you sound like a professor in your own right 22:08 jonrafkind: but in general if you can only do things with mutation thats fine 22:08 crk: but thanks for the help 22:08 jonrafkind: yea rofl 22:09 crk: hmm 22:09 crk: actually this version takes double the amount of space 22:09 jonrafkind: i have to use phrases like "in particular" and "more generally" to become a professor ;p 22:09 crk: i was hoping to make an in-place version 22:09 (quit) jeapostrophe: Quit: jeapostrophe 22:09 crk: I even have the idea in mind... but my scheme-think isnt that evolved, I guess :) 22:10 crk: but as you said, exercise it is 22:10 jonrafkind: also replace (equal? 0 (length l)) with (null? l) 22:10 jonrafkind: length will compute the length of the list each time, so thats O(N), whereas (null? l) is O(1) 22:11 crk: cool 22:11 crk: doing that rightaway 22:42 (join) bayildi 22:42 (part) bayildi 22:47 (quit) crk: Quit: Leaving 22:49 (quit) ryanaghd1m: Ping timeout: 246 seconds 22:50 (quit) jao: Ping timeout: 245 seconds 22:57 (join) jeapostrophe 22:57 eli: jonrafkind: First advice to questions like that should be to dump `load'. 22:58 eli: (And using `mzscheme' as the executable is another problem, of course, giving him the `mzscheme' language bindings.) 22:58 jonrafkind: psh, whatever gets him to a working system > doing things the right way 22:59 (quit) jeapostrophe: Client Quit 23:00 eli: That is an unimaginably wrong answer. 23:00 eli: You could just have told him to (eval (read (open-input-string "(require \"whatever.rkt\")"))) 23:00 eli: That would also get him a working system. 23:02 jonrafkind: so what.. if it ever fails he can figure out the right way later 23:02 neilv: is it april first already? 23:03 eli: You disserviced by letting him go on using `load', and that will inevitably make him go into more traps. 23:03 jonrafkind: you do me a disservice by not reading the exchange.. he ultimately used `require' 23:03 eli: You *are* in a CS dept, you should therefore appreciate the value of educating someone over getting them a "working system". 23:03 eli: I know he did. 23:03 neilv: these need not be mutually exclusive goals 23:03 eli: But your first response was bad. 23:04 jonrafkind: i have worked with dozens of systems i barely understand and my frustration reaches epic proportions when I am told to do things "the right way" when I just want to get something done, so i have sympathy for such people 23:04 neilv: you two guys are two ends of the spectrum 23:04 jonrafkind nods 23:05 eli: I have worked with dozen times more dozens of systems. You get no excuse for just "hacking things". 23:05 jonrafkind: yea right, like im going to read about autoconf when im trying to get some stupid system to build. of course im just going to hack it until it works 23:06 eli: On a larger scale "just getting a working system" is the exact antithesis HtDP. As a student of one of its authors, it's bad that you follow that. 23:06 eli: (It's also the embodiment of the dot-com bubble burst, and other related bubbles.) 23:07 jonrafkind: straw man argument 23:07 (join) ryanaghd1m 23:07 eli: WTF is the straw here? 23:08 jonrafkind: to get anything working its always reasonable to hack it 23:08 eli: And this is the precise point that HtDP goes agaist. No straws here. 23:10 jonrafkind: i dont want this situation: tell user to use require/provide, he fools around for 5 hours, fails, gives up. id rather this situation: user uses load, does some stuff, eventually runs into subtle errors, asks for help, is told to use require, is finally motivated to get past the troubles of require/provide to get it working 23:11 jonrafkind: that is, learning by experience >*infinity learning by being told 23:12 eli: The 5 hour time spendage is a valid argument; I'd argue that you should have helped him to avoid the 5 hours; unfortunately (for you) you validated my point by the actual exchange. 23:12 jonrafkind: if he understands (load) id rather just help him with that than to understand N other concepts (since thats a lot of work for me) 23:14 eli: Anyone who really *understands* `load' and using it in Racket would not have such questions. It's therefore possible to assume that such askers do not understand it at all. 23:14 jonrafkind: thats true, but since hes really not doing anything complex whatsever, theres almost no harm in using `load' anyway 23:14 jonrafkind: modules are a solution for a problem he will likely never have 23:15 eli sighs 23:15 jonrafkind: and if he ever has the problem he can learn about it then 23:15 eli: Please stop this nonsense. 23:15 jonrafkind: do you think that he will use load, think "hey load is great why should I use require" and then never learn to use require? 23:16 eli: Yes, and I have decades of Scheme history to back that up. All the way up to R7RS discussions. 23:19 jonrafkind: i just assume people will learn the truth eventually once they have enough practical experience to understand the concepts involved. preaching advanced techniques too early will just confuse people 23:21 eli: (a) there's nothing advanced in `require', if anything, it's `load' that is more advanced; (b) you're dealing with a *ton* of Scheme related material that encourages people to use `load' as the way to structure code -- all stuff that has changed only very recently, which is why `load' will continue to be a problem for a long time. 23:21 jonrafkind: the advanced thing is "why do I need provide" 23:22 eli: For that there's `enter!' (which you specifically discouraged him away from), or -- much better -- use drr. 23:22 jonrafkind: hes from python land so he knows what "import" does of which `load' is basically the same thing 23:23 jonrafkind: i mean, why aren't you berating me for telling him mutation is ok? 23:23 eli: I hightly doubt that Python's import is an open+read+eval thing. Last time I checked they didn't even get there eval straight. 23:23 eli: Mutation is a much less fundamental problem. 23:23 jonrafkind: the similarity is open a file, get access to all its contents somehow 23:24 eli: And as a language that does provide mutations, we *do* go the practical route of making it possible. 23:24 eli: By "open a file and get access to contents" you're not saying much. The `eval' that is implicit in `load' is the problem. 23:51 (join) jeapostrophe