00:10 Pauan: alrighty, sent to the dev list 00:28 ozzloy: Pauan, i don't see it 00:29 ozzloy: Pauan, still there? 00:29 Pauan: it's in moderation 00:29 ozzloy: ic 00:29 freakazoid: anyone know why distnoted uses up all my CPU every time I start a Racket REPL under Emacs on Lion? 00:29 freakazoid: Aquamacs, actually 00:29 freakazoid: slows my whole system down and the REPL takes forever to start 00:30 freakazoid: long enough that Aquamacs times out before seeing the prompt 00:30 ozzloy: Pauan, so is it currently the case that there are some escapes that don't work in racket's regexp? 00:30 Pauan: sorta 00:31 Pauan: (regexp-match? "\n" "\n") returns #t 00:31 Pauan: but (regexp-match? "\\n" "\n") returns #f 00:31 Pauan: this is important because if you want to get rid of the backslashes in regexp literals, you need #px"\n" to convert into "\\n" 00:32 Pauan: there are, however, two rather obscure syntaxes which Racket truly does not support 00:32 Pauan: \\X and \\u{E0} where E0 is 1-4 hexadecimal digits 00:32 Pauan: ...but I don't consider those two to be very important 00:32 ozzloy: hold on, i'm going to have to look up the semantics of (regexp-match? a b) 00:33 Pauan: it returns #t if the pattern a matches the input b 00:33 Pauan: basically, it's regexp-match but returning #t rather than a list 00:34 ozzloy: yeah, but if the second argument is a string what does it do exactly with it is what i'm looking up 00:35 ozzloy: er... if the first argument is a string what does regexp-match? do with the string 00:35 ozzloy: is what i'm looking up. 00:35 Pauan: it converts it into a regexp pattern 00:35 Pauan: basically, (regexp-match? (regexp "\n") "\n") 00:36 Pauan: sadly, it doesn't use pregexp 00:36 ozzloy: a regexp pattern to match that string, or a regexp pattern specified by the string 00:36 ozzloy: ic 00:36 ozzloy: so a regexp specified by the string 00:36 Pauan: yes 00:36 ozzloy: that's unfortunate 00:39 ozzloy: i would think given that there is #rx"...", that it would be expected that people could use that if they mean "the regex specified by this sequence of characters" and an actual string would mean "match the characters in this string, however that would be specified in a regular expression pattern" 00:39 ozzloy: but whatevs 00:40 Pauan: right, so using #rx"foo\dbar" would be equivalent to (regexp "foo\\dbar") 00:40 Pauan: but the first step is to get the regexp escapes in there 00:40 Pauan: otherwise you won't be able to use things like \n in a regexp literal 00:40 ozzloy: so currently /\X/ and /\u{E0}/ do something in other languages, but in racket they raise an error because they're not implemented 00:41 Pauan: Perl, specifically 00:41 Pauan: I believe the \u{E0} syntax is Perl-specific 00:41 Pauan: not sure about \X 00:41 ozzloy: wait 00:43 Pauan: (\X matches a Unicode grapheme, and \u{E0} is equivalent to \u00E0, in other words, a Unicode escape) 00:47 ozzloy: if regexp-match already does the translation of a string to the regexp represented by that string for you, then what's the point of having #rx"" at all? 00:47 ozzloy: (regexp-match and all of its kin) 00:47 Pauan: right now? I'm not 100% sure 00:47 jonrafkind: just guessing, but maybe to avoid a function call 00:47 Pauan: with my idea? 00:47 jonrafkind: although that doesn't sound very convincing 00:47 Pauan: it would allow less backslashes 00:47 (join) RackN00b 00:48 Pauan: because #rx"\d" would convert into (regexp "\\d") 00:48 Pauan: and #rx"\\" would convert into (regexp "\\\\") 00:48 Pauan: that's obviously not implemented, though, and may not be 00:48 Pauan: but it'd be nice to have 00:49 jonrafkind: #rx makes an interned regex but (regex) creates a new one 00:49 RackN00b: Hello again guys... Pauan, glad you're still on - I have an interesting question, not looking for code btw... That list you helped me with... I am trying to "reflect" it about various axes. Flipping it about the x-axis is trivial, I just reverse the list... Do you have any ieas of how I might be able to reflect about a diagonal? 00:49 jonrafkind: rudybot, (eq? #rx"a" #rx"a") 00:49 rudybot: jonrafkind: your sandbox is ready 00:49 rudybot: jonrafkind: ; Value: #f 00:49 jonrafkind: errr it would in the new version 00:50 Pauan: I think the point is that #rx"a" is shorter than (regexp "a") and it compiles it 00:50 Pauan: ...though that's a pretty weak point, imo 00:50 jonrafkind: I agree 00:50 ozzloy: but it's worse than that 00:50 Pauan: RackN00b: can you give an example of the list and what you want it to be? 00:50 Pauan: like say... input: ((0 1) (1 2)) output: ((1 0) (2 1)) 00:50 ozzloy: (regexp-match #rx"a" "a") is LONGER than (regexp-match "a" "a") 00:51 Pauan: well 00:51 Pauan: there is *one* reason... 00:51 ozzloy: and that is? 00:51 freakazoid: Turns out the problem wasn't related to Racket or AquaMacs at all, but the fact that I deleted Sophos AV in anger 00:51 Pauan: things like regexp-match convert it into a regexp 00:51 RackN00b: Sure... say I have '((X X X) (. X .)) and I wanted '((. X) (X X) (. X)) 00:51 Pauan: but most of the time you want pregexps 00:51 Pauan: which are more powerful 00:51 jonrafkind: quibbling about a few extra characters here and there isn't productive 00:51 Pauan: so (regexp-match #px"a" "a") is different from (regexp-match "a" "a") 00:51 ozzloy: jonrafkind, true, that's not that big of a deal 00:51 ozzloy: Pauan, that is a good point 00:52 Pauan: that only applies to pregexps, though 00:52 jonrafkind: #px should die 00:52 Pauan: not regexps 00:52 ozzloy: i forgot about #px 00:52 jonrafkind: actually now I can't remember which one is the most normal one, I think #px is the normal one and #rx is the wierd one 00:52 ozzloy: i usually want #px, now that i think about it 00:52 jonrafkind: ya 00:52 Pauan: yeah, pregexp is Perl syntax 00:52 Pauan: regexp is Racket regexp syntax 00:52 Pauan: (which I believe is less powerful) 00:52 Pauan: (missing features) 00:53 Pauan: RackN00b: You mean like this? '((1 2 3) (. 4 .)) -> '((. 1) (2 3) (. 4)) 00:55 RackN00b: Pauan: '((1 2 3) (. 4 .)) -> '((. 3) (4 2) (. 1)) 00:55 Pauan: ah, okay, that changes things 00:55 Pauan: wait 00:55 Pauan: ... 00:55 Pauan: haha 00:55 Pauan: that looks like zip! 00:55 Pauan: lemme try something 00:56 Pauan: hm... 00:56 Pauan: it's *almost* zip 00:56 RackN00b: The one you mentioned looks like you flatted it and "looped" the order right? 00:56 ozzloy: (reverse(zip a b))? 00:56 RackN00b: Hmmm. what's zip? 00:56 Pauan: (zip '(1 2 3) '(4 5 6)) returns ((1 4) (2 5) (3 6)) 00:56 freakazoid: Anyone know why calling (start) and then (stop) here from a REPL kills the REPL? http://ideone.com/jujP5 00:56 Pauan: zip is a Python function, that I implemented in Arc. 00:57 RackN00b: hmm 00:57 Pauan: I've found it lovely and useful and just plain awesome 00:57 RackN00b: hahanice 00:57 freakazoid: perhaps (break-thread ...) propagates the break upward? 00:57 Pauan: it shouldn't be hard to implement in Racket if it doesn't have it 00:57 Pauan: best part: if you apply zip, you unzip the lists 00:57 RackN00b: neat 00:57 Pauan: so (apply zip (zip '(1 2 3) '(4 5 6))) gives you back the original list 00:58 Pauan: anyways, that's not *quite* what you asked for 00:58 Pauan: but it's similar in structure 00:58 RackN00b: yeah... 00:58 RackN00b: I would still need to reverse each nested list but that's no problem 00:58 Pauan: yeah, that's just a matter of mapping reverse onto it 00:59 RackN00b: yep 00:59 Pauan: (map reverse (zip ...)) 00:59 ozzloy: Pauan, racket has zip http://docs.racket-lang.org/srfi-std/srfi-1.html?q=zip&q=append*&q=string-append*&q=display-to-file&q=file-%3Estring&q=to-file&q=display-*-to-file&q=rackunit&q=error&q=regexp&q=rackunit&q=case-fold&q=regexp&q=file-%3Estring&q=let&q=for/fold&q=foldl&q=display-to-file&q=foldl&q=let&q=foldl&q=for#zip 00:59 rudybot: http://tinyurl.com/6ucfnvr 00:59 ozzloy: whoa 00:59 Pauan: ah, nice 00:59 RackN00b: wild. that's pretty cool 00:59 ozzloy: well, scheme, i guess 00:59 Pauan: doesn't seem to be in racket/base though 01:00 ozzloy: i recently learned about racket having zip in this channel 01:00 Pauan: (also that implementation seems much better than the one I have in Arc) 01:00 ozzloy: no, not in racket/base 01:01 Pauan: yeah I'm gonna swap to that one right away, thanks 01:01 ozzloy: it's a pretty slick implementation 01:01 Pauan: it really is 01:01 Pauan: only 6 tokens 01:02 ozzloy: it makes me go "wait *think* ... *think* hahaha, awesome" 01:02 Pauan: RackN00b: (define (zip . lists) (apply map list lists)) 01:02 Pauan: there ya go 01:02 RackN00b: Haha... I just got it working... THat's a sweet sweet function! 01:02 Pauan: it sure is 01:03 freakazoid: hmm 01:07 (join) dnolen 01:08 eli: ozzloy: How about you subscribe to the list instead of being moderated? 01:09 Pauan: eli: are you referring to me? I was the one who sent the mail, after all 01:09 (join) jeapostrophe 01:10 eli: Pauan: Yes, and I saw that you subscribed. I was talking about ozzloy who had two messages waiting in the queue too. 01:10 Pauan: ah, I see, nevermind, then 01:10 eli: (Which makes for a confusing email delivery now.) 01:11 RackN00b: How do I ask rudybot to run something? 01:11 Pauan: random side note: that implementation of zip is not only 3 lines shorter and much much clearer, but it's also 57% faster. 01:11 ozzloy: sorry about that. i subscribed with the email ozzloy+[dev|users]_racket-lang_org@gmail.com but sent from ozzloy@gmail.com. i'll send from the right one in the future 01:11 eli: Pauan: BTW, I think that you have a typo, instead of #px"\\\\X" etc, you should have #px"\\X" etc. 01:11 ozzloy: RackN00b, you say rudybot, some code 01:12 RackN00b: neat 01:12 Pauan: no, it is \\\\X 01:12 Pauan: (regexp-match? #px"\\\\X" "\\X") 01:12 Pauan: is #t 01:12 Pauan: this is what I'm talking about: too many backslashes in regular expressions 01:12 Pauan: but that's a different matter 01:12 Pauan: to be handled afterwards 01:13 eli: But what you want is for #px"\\n" to match a newline, not #px"\\\\n". 01:13 Pauan: right 01:13 Pauan: I gave regexp notation 01:13 Pauan: but a string literal will have less backslashes 01:13 eli: So that is the typo. 01:13 Pauan: in other words, to match the literal string "\\n" you need the regexp #px"\\\\n" 01:13 eli: I'm not talking about any string literals here. 01:14 Pauan: I was using regexp syntax to specify what the regexp syntax should be 01:14 Pauan: sorry for the confusion 01:14 Pauan: it wasn't meant as a literal one-to-one 01:14 eli: Right, that's what you do now, and what you'll continue to do. What you want is to change #px"\\n" to match a newline. 01:14 Pauan: right 01:15 Pauan: to understand why I wrote it that way 01:15 Pauan: look at #px"\\\\u\\{[a-fA-F0-9]{1,4}\\}" 01:15 Pauan: what I'm saying is that the regexp syntax \\u{...} where "..." is 1-4 hexadecimals 01:15 Pauan: should match a unicode escape 01:15 eli: ozzloy: So you should subscribe with the other email too, then set the no-mail option to avoid getting email delivered there. 01:15 Pauan: but I'm writing the regexp syntax *in* regexp syntax form 01:15 Pauan: hence the seemingly unnecessary backslashes 01:15 eli: ozzloy: (I don't know why that feature is so obscure with mailman.) 01:16 ozzloy: eli, oh handy 01:16 Pauan: (side note: I should have written it in plain string literals rather than getting fancy) 01:17 (quit) jeapostrophe: Ping timeout: 244 seconds 01:18 eli: Pauan: That's an odd decision, my guess is that most people will miss it. I'd post just saying what you want to work, ie, say that you suggest that (regexp-match? #px"\\n" "\n") like . 01:18 Pauan: yeah, that sounds like a better idea 01:24 ozzloy: so a regex pattern of a newline matches a newline in a string, but a pattern of the two characters `\n' does not match a newline. things are weirder than i thought 01:24 Pauan: it's because of the separation between string escapes and regexp escapes 01:24 Pauan: in other words, \b is a backspace character in a string, but \\b in a regexp string is a word boundary character 01:27 ozzloy: i think i get that. i'm just surprised `\n' pattern isn't implemented in racket 01:27 Pauan: that's because you match a literal \n 01:27 Pauan: so it isn't really needed 01:27 Pauan: (otherwise somebody would have noticed and it would have been implemented long ago) 01:29 ozzloy: so right now when writing a regex in racket you sometimes use what looks like regexes in other languages, and sometimes use \\ 01:29 Pauan: well 01:29 Pauan: the situation is actually more complicated than that, but... 01:29 ozzloy: i think i only didn't notice it because i don't match newlines often 01:29 Pauan: point is: if it's with two backslashes, it's regexp syntax 01:29 Pauan: if it's with one backslash, it's string syntax 01:29 ozzloy: yeah, i get why it's the case 01:30 Pauan: (this is the same in JavaScript, when using the RegExp constructor, but not with actual regexp literals) 01:30 ozzloy: well, at that level, i get why 01:30 Pauan: (also the same in Python too, which doesn't have literal regexp syntax) 01:31 ozzloy: i'm still not clear on why this is even the case to begin with. why there wasn't separate syntax for regex literals from the get go 01:32 ozzloy: maybe at some point it meant less code? reusing more of the string parsing code? 01:37 Pauan: eli: dammit, somehow my e-mail got butchered, not sure how since I was in plain text mode. I hope it goes through okay 01:38 Pauan: no, of course it didn't 01:39 ozzloy: ^_^ great "clarification" 01:39 Pauan: (personally, I blame Gmail, since I edited it very carefully in my plain-text editor and then copy-pasted it in, in plain text mode... that worked fine for the *first* e-mail, but not the second) 01:39 Pauan: haha, I have to agree 01:39 Pauan: it has a sense of irony to it 01:40 eli: ozzloy: Less code has nothing to do with it. It's less syntax that is important: not coming up with yet-another-syntax-for-strings. (And they *are* strings.) 01:40 eli: Pauan: It's still clearer than the first email. 01:41 ozzloy: eli, ok, that clarifies some of the earlier conversation for me 01:41 ozzloy: that according to you regex patterns are strings and not merely representable by strings 01:42 Pauan: (which I disagree with) 01:42 eli: No, they're not strings -- but their syntax is a string syntax. 01:42 Pauan: right 01:42 Pauan: and I disagree with that :P 01:42 (part) RackN00b 01:42 ozzloy: ok now i'm back to being confused 01:43 ozzloy: if that's your stance, then why not just let go of the idea of a string syntax for representing regex patterns? 01:43 eli: Pauan: You cannot disagree with that. The syntax is a string syntax, period. What you want is now a different *string* syntax, even when you say that you want this syntax only for regexps. 01:43 ozzloy: that's not what's being suggested (by me at least) 01:44 Pauan: eli: would you consider /foo/ in JavaScript to be a string syntax, then? 01:44 ozzloy: but it is clearly not a string syntax, as evidenced by the example of \b which means totally different things in a regex and in a string 01:45 ozzloy: or i'm missing what you mean by "string syntax" 01:46 eli: Pauan: Sure it's *a* string syntax. It has text surrounded by delimiters, and it has escapes. 01:46 Pauan: okay then 01:46 Pauan: I consider it "regexp syntax" 01:46 Pauan: to me, string syntax is used only for strings 01:46 ozzloy: ah, i was missing what you meant then 01:46 Pauan: kinda like how (1 2 3) is "list syntax" 01:47 Pauan: and #\a is a "character syntax" 01:47 Pauan: so when I said I disagree with you, it was under the assumption that regexps are different from strings 01:48 Pauan: as in, more different than the difference between byte strings and non-byte strings 01:48 Pauan: but if by "string syntax" you mean "anything between delimiters with escape" then yes I'm proposing a string syntax 01:48 Pauan: but a string syntax specially designed for regexps, as opposed to the default string syntax which isn't 01:50 ozzloy: Pauan, maybe this conversation would be easier if we went and read the relevant code first 01:50 eli: Pauan: It's much closer than that, actually. You could apply the same thing to strings too -- which is exacly what '...' quotes in shells are trying to do. 01:51 (quit) dnolen: Quit: dnolen 01:51 Pauan: right, but they're still *called* strings 01:51 Pauan: but regexps are called regexps 01:51 Pauan: I like calling apples apples and oranges oranges 01:51 eli: *sigh* 01:51 Pauan: but as long as I understand what you mean by the words, then it's fine 01:51 ozzloy: Pauan, "patterns" i think is the word you want 01:58 (quit) freakazoid: Quit: Computer has gone to sleep. 02:01 jaimef: stdin::266: provide: not at module level in: (provide (contract-out (amount positive?))) 02:03 ozzloy: Pauan, https://github.com/plt/racket/blob/master/src/racket/src/regexp.c is slightly intimidating 02:03 ozzloy: 6k lines. dang. 02:03 Pauan: I would expect any regexp engine to be somewhat intimidating 02:04 Pauan: (that is a lot of lines, though) 02:04 ozzloy: yeah... i want the reader code, not the engine 02:05 (quit) noam: Read error: Connection reset by peer 02:06 (join) noam 02:06 (quit) EmmanuelOga: Ping timeout: 248 seconds 02:06 Pauan: looks like the code we want is around line 1415 02:07 (quit) jao: Ping timeout: 240 seconds 02:07 Pauan: assuming I'm right, it'd be a matter of adding in cases there to handle the various things like \\n etc. 02:07 ozzloy: https://github.com/plt/racket/blob/master/src/racket/src/read.c around line 1463 02:08 ozzloy: oh 02:09 Pauan: that looks like comment parsing :P 02:09 Pauan: (though that'd probably need to be changed if the regexp literal syntax were changed, but that'll be afterwards) 02:13 jaimef: not at module level? 02:13 Pauan: read.c line 1527 is regexp literal syntax 02:15 ozzloy: https://github.com/plt/racket/blob/master/src/racket/src/read.c#L1527 looks like a } that ends some reader handling code 02:16 ozzloy: is that what you're seeing? 02:16 Pauan: oh 02:16 Pauan: my github is broken 02:16 Pauan: subtract 177 lines 02:16 ozzloy: i'm looking at this line: str = scheme_make_regexp(str, is_byte, (orig_ch == 'p'), &is_err); 02:16 Pauan: line 1350 02:16 Pauan: yeah, that's the one 02:17 ozzloy: to me that looks like https://github.com/plt/racket/blob/master/src/racket/src/read.c#L1463 02:17 ozzloy: actually i have it cloned 02:18 Pauan: yeah my github is really borked 02:18 Pauan: the line numbers are alllll wrong 02:18 Pauan: in regexp.c: 02:18 Pauan: if ((parse_flags & PARSE_PCRE) && (c == 'b')) { 02:19 Pauan: that'd be where you'd put the \\ escapes, I assume 02:19 (join) freakazoid 02:20 ozzloy: i'm kinda surprised actually 02:20 Pauan: why? 02:20 ozzloy: i expected some flex and bison or ometa or something 02:20 ozzloy: not straight c 02:24 freakazoid: I found a bug in the docs 02:24 freakazoid: use of unquote not in a quasiquote 02:25 ozzloy: freakazoid, fork the github repo, make the fix, submit pull request 02:25 freakazoid: k 02:25 ozzloy: freakazoid, that's what i did! 02:25 ozzloy: it was amazing. included real fast and stuff 02:25 freakazoid: I'll do it tomorrow, since i'm about to go to bed 02:25 ozzloy: yeah, i should have gone to bed hours ago 02:26 freakazoid: the use of github is one of the many things that makes racket awesome 02:26 ozzloy: i actually don't know for sure that that was the recommended way of doing it 02:26 ozzloy: so ... proceed with caution 02:26 (quit) freakazoid: Quit: Computer has gone to sleep. 02:54 (quit) jonrafkind: Ping timeout: 276 seconds 03:23 ozzloy: Pauan, i think it depends on the escapes you're doing. a little below there's static int regcharclass(int c, char *map) 03:24 ozzloy: Pauan, i think that's where you'd want to put "the pattern `\n' matches the character '\n' in a string" 03:25 Pauan: hm... not sure 03:25 Pauan: those aren't really character classes 03:25 ozzloy: case 'n': map['\n'] = 1; 03:25 ozzloy: sure it is 03:25 ozzloy: it's the character class of a single character 03:25 Pauan: the whole point of a character class is that it is composed of more than 1 character :P 03:25 ozzloy: well, the code to put in seems obvious there 03:26 Pauan: but I agree it seems that's the easiest option 03:26 ozzloy: whereas it does not above 03:27 Pauan: that would get... at least 7 of them working 03:27 Pauan: maybe 8 03:27 Pauan: and 3 will need different handling 03:27 ozzloy: i'm totally not familiar with the \p regex pattern 03:28 Pauan: hm... how long does Racket take to compile...? 03:28 ozzloy: for me, a few minutes 03:28 ozzloy: man 03:28 Pauan: that's not bad 03:28 ozzloy: you have fun, i'm actually gonna go to sleep now 03:28 Pauan: kay, night 03:59 (join) Shvillr_ 03:59 (quit) Shviller: Disconnected by services 03:59 (nick) Shvillr_ -> Shviller 04:06 (quit) noam: Read error: Connection reset by peer 04:06 (join) noam 04:16 (join) avarus 05:52 (join) veer 05:55 (quit) mithos28: Quit: mithos28 06:01 (join) MayDaniel 06:41 (join) epsil 07:18 (join) masm 07:19 (part) micro 07:41 (quit) noam: Read error: Connection reset by peer 07:41 (join) noam 07:51 (quit) epsil: Quit: WeeChat 0.3.5 08:00 (quit) MayDaniel: Read error: Connection reset by peer 08:16 (quit) noam: Quit: Leaving 08:16 (join) noam 08:32 (join) jao 09:06 (part) avarus: "Leaving..." 09:27 (quit) snorble: Read error: Connection reset by peer 09:32 (join) malkomalko 09:51 (join) snorble 10:05 (quit) malkomalko: Remote host closed the connection 10:17 (quit) noam: Read error: Connection reset by peer 10:18 (join) noam 10:39 (nick) ec -> elliottcable 10:39 (join) jeapostrophe 10:46 (join) anRch 10:49 (join) dnolen 10:59 (quit) jeapostrophe: Ping timeout: 252 seconds 11:15 (quit) veer: Quit: Leaving 11:31 (join) keenbug 11:43 (quit) keenbug: Ping timeout: 252 seconds 11:51 (quit) anRch: Quit: anRch 12:23 (join) freakazoid 12:41 (quit) freakazoid: Quit: Computer has gone to sleep. 13:15 (join) RackN00b 13:19 (quit) masm: Ping timeout: 244 seconds 13:46 RacketCommitBot: [racket] plt pushed 7 new commits to master: http://git.io/_67R5A 13:46 RacketCommitBot: [racket/master] fix `current-memory-use' - Matthew Flatt 13:46 RacketCommitBot: [racket/master] fix printing of hash tables with chaperones - Matthew Flatt 13:46 RacketCommitBot: [racket/master] switch `codeblock' to strings instead of bytes - Matthew Flatt 13:47 (join) MayDaniel 13:58 (quit) MayDaniel: Read error: Connection reset by peer 14:03 (join) jonrafkind 14:04 (join) mithos28 14:31 ozzloy: Pauan, did you make the changes for those regex escapes? 14:42 (join) masm 14:43 RackN00b: Hey guys - having a tricky time telling why this isn't terminating. I'm ashamed to say it's probably glaringly obvious but I've had no sleep so.... anywho, here it is: http://pastebin.com/2UcvcfYs 14:45 RackN00b: Also, ozzloy - I mentioned the non-recursive powerset function... it took some time but: http://pastebin.com/0J2nc4K1 :D a little hard to follow! 14:48 RackN00b: I think it was something to do with how I am defining the local constant flattened...? 14:53 jonrafkind: looks ok to me 14:53 jonrafkind: put a printf in the aux function to see what its diong 14:58 asumu: RackN00b: I suspect it's because the "flattened" variable never changes. 14:58 asumu: Make sure you're using the right variable for your structural decomposition. 15:00 jonrafkind: oh yea hehe 15:03 RackN00b: But I don't want it to change do I? Oh wait.. of course I do.. I need to change with each recursion! haha. Thanks... Good old sleep deprivation! 15:18 RackN00b: Sometimes what seem like trivial problems are what drive you insane! Still can't get it to terminate! http://pastebin.com/ypYChZ1L 15:19 RackN00b: I'm defining the local constant flattened as something and then have a nested recursive function within that local - I can't see what this isn't terminating... The reduction of flattened to the base case of empty is handled by the nested function, isn't it? 15:20 jonrafkind: use 'grid' 15:21 (quit) dnolen: Quit: dnolen 15:22 RackN00b: For my recursive call? 15:23 RackN00b: Ah... wow - found it. thanks! 15:36 (quit) rgrinberg: Ping timeout: 245 seconds 15:43 (join) dnolen 15:54 ozzloy: RackN00b, awesome! glad you got it to work 15:54 ozzloy: jonrafkind, did you follow the conversation with eli earlier? i think i get what he was saying now, but i want to confirm without bothering him 15:55 ozzloy: jonrafkind, it was with me and Pauan 15:55 jonrafkind: well not really I guess 15:55 (join) freakazoid 15:55 ozzloy: k 15:56 ozzloy: i'm going to go back and read it again now that i have a different understanding of what was said 15:56 ozzloy: he's a guy, right? i think that's a guy' 15:56 ozzloy: s name 15:56 (quit) freakazoid: Client Quit 15:57 jonrafkind: eli? 15:57 ozzloy: yeah 15:57 jonrafkind: yea hes a guy 15:57 ozzloy: k 15:57 ozzloy: thanks for entertaining the idea 15:58 ozzloy: i like racket's cloisters 15:58 jonrafkind: it doesn't look like eli really likes the idea so if you really want it in racket you should ask on the dev or users list 15:58 ozzloy: not sure if other languages have that, but it's easy to see in racket 15:58 jonrafkind: cloister? 15:58 jonrafkind: whats that 15:59 ozzloy: jonrafkind, oh? i got the impression that he hadn't really decided on the idea and was trying to correct our term usage first before proceeding 16:00 ozzloy: cloister is where you can set flags for a group within a pattern 16:00 ozzloy: like case insensitive 16:00 ozzloy: for example. 16:00 jonrafkind: oh its a real word.. fancy that 16:00 jonrafkind: i vaguely remember hearing this word from playing diablo2 16:01 ozzloy: sounds like a seafood dish 16:01 ozzloy: crab oyster platter maybe 16:01 (part) mithos28 16:02 ozzloy: anyways, a quick look says ruby and python don't have it 16:02 (join) mithos28 16:03 ozzloy: Pauan and i found the relevant section of code for adding the regex escapes like "\\n", then i went to sleep. not sure if Pauan made any progress on it. 16:05 (join) jeapostrophe 16:08 ozzloy: jonrafkind, yeah he said "It's not really a "no". I'm trying to get you to find a way to face the syntax problem independently from the semantics problem. A suggestion that does that would be interesting, yet I didn't see such a thing, yet." 16:09 ozzloy: so i think there's still hope 16:09 jonrafkind: I don't see why a reader macro is not the answer 16:09 ozzloy: i'm totally going to do that 16:10 ozzloy: just to make it clear what i want to do 16:10 ozzloy: and because i can use it 16:10 jonrafkind: of course you can do the @ thing 16:10 ozzloy: i think maybe when i do that it'll be clear what he means by separating the syntax and semantics problems 16:10 ozzloy: yeah, i saw that, thanks for notifying me on that 16:10 jonrafkind: I guess the semantics issues are regex escapes vs string escapes 16:10 ozzloy: i'll have to read up to figure out what it means though 16:11 ozzloy: yeah, i had made a mistake on that earlier 16:12 ozzloy: i said \d was evidence that they're not the same syntax 16:12 ozzloy: but that's semantics 16:12 jonrafkind: you could just use a different escape character other than \ for regexes so as not to confuse them with strings 16:12 jonrafkind: but then you would confuse people who expect "standard" pcre syntax 16:13 ozzloy: or have exactly the same syntax, but with different semantics 16:13 (quit) jeapostrophe: Ping timeout: 244 seconds 16:13 ozzloy: well, slightly different syntax in that the delimiters would be / instead of " 16:14 ozzloy: but as he said it's still stuff with escapes between delimiters 16:14 ozzloy: which he calls "string syntax" 16:15 ozzloy: which i find a little misleading. that's like continuing to call the people who fight fires "firemen" even after women start doing it 16:16 ozzloy: i could see if that syntax was only used for strings, it'd be called "string syntax" 16:16 ozzloy: but if it can also represent regex patterns, then continuing to call it "string syntax" is a bit confusing 16:17 ozzloy: on the other hand, i can't think of something analogous to "firefighter" 16:18 ozzloy: a better name for the syntax that reflects the idea that it can be used in several ways 16:18 ozzloy: ... anyways, thanks for listening to my rant 16:20 ozzloy: or maybe you didn't and i'm talking to myself >_> 16:32 (join) epsil 16:45 (join) keenbug 17:00 RackN00b: Finally got everything working the way I need to but man is it ugly! I wish we had covered some more higher-order functions and abstract-list functions in class. Here's what I have thus far - it produces the coordinate representation (as Pos structure) of the first empty space in a grid representing a given polyomino. http://pastebin.com/fZqixx1R 17:02 RackN00b: I can't think of another way to attack said problem, but the works as required and passed all of my submission tests, I just wish there was a nicer way to write it, which I am sure exists, but I can't think of it - maybe it's to do with the approach I took in finding the location of the spot by first counting how far into a flattened list it is and then using mod and quotient... If anyone has some time, I'd be ve 17:02 RackN00b: interested in knowing if any similar functionality is already included in Racket (or other languages as I can then maybe learn from that as well!) Thanks! 17:04 ozzloy: RackN00b, can you add some rackunit tests? 17:04 RackN00b: rackunit tests? What be those? 17:04 ozzloy: should make it clear what the code accepts and is expected to return 17:04 RackN00b: Oh.. like check-expects? 17:05 ozzloy: rudybot, (require rackunit) (check-equal? "a" "a") 17:05 rudybot: ozzloy: I don't see why someone would write a script for that, but sure 17:05 ozzloy: rudybot, thanks 17:05 rudybot: ozzloy: thanks 17:05 ozzloy: rudybot, #lang racket 17:05 rudybot: ozzloy: but, of course, the "parse-and" function may call the RACKET procedure "and", and I don't want my DSL to interfere with that 17:05 ozzloy: ... 17:05 offby1: :) 17:05 offby1: rudybot: eval (require racket) 17:05 (join) EmmanuelOga 17:05 rudybot: *offby1: Done. 17:06 offby1: rudybot: eval (check-equal? "a" "a") 17:06 rudybot: *offby1: error: reference to an identifier before its definition: check-equal? in module: 'program 17:06 offby1: oops 17:06 offby1: rudybot: eval (require rackunit) 17:06 ozzloy: wtf 17:06 rudybot: *offby1: Done. 17:06 offby1: rudybot: eval (check-equal? "a" "a") 17:06 rudybot: *offby1: Done. 17:06 offby1: rudybot: eval (check-equal? "a" "egad") 17:06 rudybot: *offby1: ; stderr: "--------------------\nFAILURE\nname: check-equal?\nlocation: (# 1 0 1 25)\nexpression: (check-equal? \"a\" \"egad\")\nactual: \"a\"\nexpected: \"egad\"\n\nCheck failure\n\n--------------------\n" 17:06 offby1: how ugly 17:06 offby1: but at least it works 17:06 jonrafkind: nactual 17:06 offby1: rudybot: why are you so dumb? 17:06 rudybot: *offby1: are you as dumb as a box of hammers? 17:06 ozzloy: so you have to say "eval bla" now? 17:06 offby1: rudybot: no, you are 17:06 rudybot: *offby1: no, just straight php. It shows me the calling sites as well as the definitions of functions, eg 17:07 offby1: ozzloy: sometimes :-( 17:07 jonrafkind: rudybot, (check-equal? "a" "a") 17:07 rudybot: jonrafkind: error: reference to an identifier before its definition: check-equal? in module: 'program 17:07 offby1: ozzloy: he tries to guess if you've given him scheme code, in which case you don't have to type "eval", but the guessing is really crude 17:07 ozzloy: ic 17:08 offby1: I think the rule is: if everything after his name can be read as a single scheme expression, then you don't need "eval". In your case, you typed _two_ expressions. 17:08 ozzloy: RackN00b, anyways, yes. check-expect type thing 17:08 RackN00b: I've added three to the code on pastebin: http://pastebin.com/fZqixx1R 17:08 RackN00b: Should produce false if no empty is found or if an empty grid is supplied 17:11 RackN00b: Man, I'm really digging Racket - kind of bummed that we start transitioning to C next term :( 17:12 ozzloy: c is also good though 17:13 ozzloy: it's good to know it 17:13 offby1: I feel like I benefited from learning assembly language -- not that I ever intend to actually write any 17:13 offby1: C is the same 17:20 RackN00b: cool 17:20 RackN00b: I just feel like we're going to rush through a lot of Racket and I won't end up with a high-level understanding of too much of it, which is unfortunate... I'll have to play with it on my own though :D 17:28 asumu: RackN00b: If you want some ideas for using Racket, there's a list of mini-projects on github. 17:28 RackN00b: No kidding? I'll definitely check that out, thanks! 17:28 asumu: https://github.com/plt/racket/wiki/Intro-Projects 17:41 (quit) Shviller: *.net *.split 17:41 (quit) karswell: *.net *.split 17:41 (quit) wtetzner: *.net *.split 17:41 (quit) sethalves: *.net *.split 17:41 (quit) GeneralMaximus: *.net *.split 17:41 (quit) Shvillr: *.net *.split 17:41 (quit) dpritchett_: *.net *.split 17:41 (quit) bremner: *.net *.split 17:41 (quit) si14: *.net *.split 17:41 (quit) ozzloy: *.net *.split 17:41 (quit) ernestas: *.net *.split 17:41 (quit) acarrico: *.net *.split 17:41 (quit) rapacity: *.net *.split 17:41 (join) sethalves 17:41 (join) ozzloy 17:41 (quit) ozzloy: Changing host 17:41 (join) ozzloy 17:41 (join) wtetzner 17:41 (join) Shviller 17:41 (join) rapacity_ 17:41 (nick) Shviller -> 16SABNLGU 17:41 (join) Shviller 17:41 (join) ernestas 17:41 (join) GeneralMaximus 17:41 (join) acarrico 17:42 (join) bremner 17:42 (join) dpritchett 17:52 (join) si14 17:54 (nick) rapacity_ -> rapacity 18:06 (quit) keenbug: Ping timeout: 244 seconds 18:06 offby1: RackN00b: the docs are pretty good 18:06 RackN00b: For Racket? I know, they're pretty sweet. 18:11 Lajla offers offby1 a slice of pizza 18:15 offby1: yum 18:33 RackN00b: Is there a way to treat lists of lists as matrices in Racket? I'm trying to find a way to superimpose a polyomino represented as a list of lists onto a grid, also represented by a list of lists. I've written a function that does this nicely given two things: the grid describing the polyomino and the underlying grid are the same size and there is no offset. I need to be able to place a polyomino on the grid given 18:33 RackN00b: certain offset as well so I would first need to pad the polyomino with extra blanks spaces AND shift the existing non-blank spaces by the required offset - It seems like the whole thing would be easier if I could work with matrices - would I have to write a bunch of functions essentially translating lists to matrices and vice versa as well as functions to add these two matrices? 18:40 (quit) masm: Quit: Leaving. 18:40 asumu: RackN00b: You could use a matrix package e.g http://planet.racket-lang.org/display.ss?package=simple-matrix.plt&owner=wmfarr 18:41 rudybot: http://tinyurl.com/6pqeohw 18:41 asumu: Using sequences and for loops to convert from matrix to list and list to matrix. 18:44 offby1: I thought there was an array srfi, too 18:44 (join) rgrinberg 18:58 (join) jeapostrophe 19:00 (quit) epsil: Quit: WeeChat 0.3.5 19:07 (quit) dnolen: Quit: dnolen 19:21 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/dHOM5g 19:21 RacketCommitBot: [racket/master] doc correction - Matthew Flatt 19:21 RacketCommitBot: [racket/master] fix typo and text duplication - Matthew Flatt 19:22 RackN00b: Yeah, I don't think that will work - can't be installing additional packages... Hmm... I'll have to write everything to accept lists methinks. How I am gonna offset those, I have no idea :P 19:31 (join) freakazoid 19:59 (quit) jao: Ping timeout: 248 seconds 20:02 (quit) jeapostrophe: Ping timeout: 245 seconds 20:07 (join) jeapostrophe 20:22 (join) dnolen 20:23 (quit) cky: Changing host 20:23 (join) cky 20:24 (part) RackN00b 20:36 (quit) jeapostrophe: Ping timeout: 248 seconds 20:43 (nick) offby1 -> offby1_` 20:47 (nick) offby1_` -> offby1 20:48 (quit) rgrinberg: Ping timeout: 258 seconds 20:50 (nick) offby1 -> offby1_ 20:54 RacketCommitBot: [racket] plt pushed 6 new commits to master: http://git.io/rF7meA 20:54 RacketCommitBot: [racket/master] fix error message that is misleading on some platforms - Matthew Flatt 20:54 RacketCommitBot: [racket/master] doc clarification - Matthew Flatt 20:54 RacketCommitBot: [racket/master] doc clarification - Matthew Flatt 21:16 Pauan: ozzloy: No, but I was planning on it today. And yes, of course Perl has cloisters. Perl has just about everything. :P 21:17 Pauan: (I was also planning on hacking on my Arc compiler, though... so we'll see) 21:18 (nick) offby1_ -> offby1 21:20 (join) rgrinberg 21:35 (quit) Lajla: Ping timeout: 248 seconds 21:42 mithos28: has anyone had any experience with distributing a native library along with a racket library? 21:48 (join) realitygrill 21:58 (join) karswell 22:04 (quit) freakazoid: Quit: Computer has gone to sleep. 22:10 Pauan: hey, is it possible to make a struct that inherits from a hash table? Like, is there a struct for hash tables? 22:10 mithos28: Pauan: I don't think so, but there are impersonators/chaperones. What do you want to do? 22:11 Pauan: well, in my Arc compiler, I'm trying to wrap data types in a struct so I can specify their behavior in functional position 22:11 Pauan: in other words, if you call (foo 'a) where "foo" is a hash table, I want to specify what it should do 22:11 Pauan: I can do that with a struct property 22:11 Pauan: I just need to make the wrappers for hash tables, conses, etc. 22:12 Pauan: so I was wondering if there was already structs available for those types 22:12 Pauan: if not, I'll roll my own 22:12 mithos28: impersonators/chaperones can do want you want I think 22:12 Pauan: ah, great, thanks 22:13 Pauan: hm... impersonators don't apply to conses or strings though. 22:13 mithos28: no 22:14 mithos28: might using a different #%app work? 22:14 Pauan: I'm not sure 22:15 mithos28: how do you plan on having your language interact with other racket libraries? 22:15 Pauan: well, actually, that's a bit of a mess right now 22:15 Pauan: but I have a short-term plan and a long-term plan 22:16 Pauan: the short-term plan is what I have right now: you can import Racket libraries and use them, converting Racket types into Arc types and vice versa as needed 22:16 Pauan: but you can't really wrap an Arc file into a module and call it from Racket: it's one-way 22:16 Pauan: the long-term plan is to make it work both ways 22:16 Pauan: but that'll require a re-write of the compiler, fun fun 22:16 mithos28: ok, but a racket hash table will never be an arc-hashtable? 22:17 Pauan: well, right now they're the same thing 22:17 Pauan: the problem is... my compiler takes a function call like (foo 'a) 22:17 Pauan: and compiles it into (ac-funcall1 foo 'a) 22:17 Pauan: and the *only* reason for the ac-funcall1 part... 22:17 Pauan: is to make hash-tables and conses and strings in functional position work 22:17 Pauan: so I figured I might be able to get around that 22:17 Pauan: and then it could just output (foo 'a) 22:18 Pauan: I figured I could do that by wrapping Racket hash tables in a thin struct 22:18 Pauan: which then specifies a prop:procedure property 22:18 mithos28: so the possibilities are having an arc-hashtable be a applicable struct of some sort, or make the calling context do the work (as you do now) 22:19 Pauan: unless you have a better idea, yeah :D 22:19 mithos28: the benefit of doing it how you currently are is that arc-hashtables and racket-hashtables stay the same 22:19 Pauan: *that* doesn't worry me 22:19 Pauan: what worries me is conses 22:20 Pauan: Arc data types will already need to be converted into Racket types and back, so t will be #t and nil will be #f, etc. 22:20 mithos28: what does an arc list do in a function position 22:20 Pauan: so I'm not against a conversion layer 22:20 Pauan: it works on the index 22:20 Pauan: ('(1 2 3) 0) returns 1 22:20 Pauan: an index of 1 returns 2, etc. 22:20 mithos28: ok then why cannot arc-conses be different from racket conses 22:20 Pauan: basically, it's like list-ref 22:21 Pauan: mostly because that sounds like it'd be a big pain 22:21 Pauan: and because conses are *everywhere*, I suspect it'd have some overhead too 22:21 Pauan: but I think I won't be able to avoid some overhead no matter what I do 22:22 mithos28: I would go with the current way, because if your first check is (procedure? v), then in many cases that could be optimized to #t, and then you would only have the racket level function call, and no conditional at runtime 22:23 mithos28: and If racket cannot do that much optimization file a bug 22:23 (join) RackN00b 22:23 Pauan: hm... 22:24 RackN00b: Hey guys. It's official - I'm a dunce. I cannot for the life of me figure out how to "superimpose" two lists. There's got to be another way than flattening the lists and then trying to split them at their original spots...? 22:24 mithos28: because in most function applications, the function is bound to a module level variable which was defined as a lambda expression 22:24 mithos28: RackN00b: What do you mean superimpose? 22:24 offby1: what does "superimpose" mean? 22:24 Pauan: ah, see, there are no modules in Arc 22:24 offby1: jinx 22:25 Pauan: which I'm sure defeats many of Racket's fancy optimizations 22:25 mithos28: Pauan: is everything at the top-level? 22:25 Pauan: sorta 22:25 Pauan: an Arc file is read incrementally, eval'd one top-level form at a time 22:25 Pauan: and everything can be rebound 22:25 Pauan: *everything* 22:26 Pauan: by the way, I just did some timing tests 22:26 Pauan: it seems there's *no overhead* from ac-funcall 22:26 Pauan: in mzscheme 4, there was some overhead (actually quite a bit) 22:26 Pauan: but it seems Racket 5.1 fixed that 22:26 Pauan: so I guess I'll just stick with ac-funcall, thanks 22:27 RackN00b: offby1: yeah, sorry, that wasn't very clear was it? :P I'll frame the problem as what I'm trying to accomplish. I am looking to place one polyomino onto a grid. Both the polyomino and the grid are described by nested lists. As an example, the t-tetromino would be '((#\T #\T #\T)(#\. #\T #\.)) with the dot-character representing a blank space... My issue is how to place the polyomino onto the grid. I have figured out how to "superimp 22:27 mithos28: how do you build large programs with out a module system, is there another namespace control mechanism? 22:27 Pauan: yeah, I'm planning on having a different namespace system than Racket's 22:27 Pauan: but... 22:27 Pauan: I also had another idea 22:27 Pauan: to integrate Arc closer into Racket, and then use Racket's module system 22:28 RackN00b: THe problem is that I have to now "pad" the polyomino with extra blank spaces until it matches the underlying grid, which i"m having trouble doing :P 22:28 Pauan: it would feel a lot less like Arc... but it would have some major benefits 22:28 mithos28: RackN00b: If they were one dimensional lists you can use map (map + '(1 2 3) '(4 5 6)) -> '(5 7 9) 22:28 RackN00b: Also, the polyomino doesn't get placed always at the top left... I have to be able to place it given a certain offset of spaces from the top left... 22:29 Pauan: ...hm 22:29 RackN00b: mithos28: I agree.. problem is, what happens when I have to re-express that one dimensional list as a list of lists ? I can't figure out how to nicely recreate the grid/polyomino after I've flattened it... 22:29 Pauan: why does this sound suspiciously like Tetris? 22:30 mithos28: RackN00b: you could do one row at a time, instead of flattening the grid 22:30 RackN00b: Haha... not like tetris... I need a backtracking algorithm that will, given a state defined by a grid, find a solution based on what polyominoes I give it... It's a covering problem... 22:30 mithos28: since I assume that superimposing one square is independent of another square 22:31 Pauan: does the solution involve solving Tetris? 22:31 RackN00b: mithos28 - That's what my current function does, without a problem... but I don't know how to take into account the offset... 22:31 RackN00b: Pauan.. nope 22:31 Pauan: maybe you should do that next, then 22:31 RackN00b: Haha... 22:32 mithos28: well your representation of the piece already has blank squares, why not put more blank squares so that it is the size of the full board 22:33 RackN00b: mithos28 - that'd be great and that's what I would like to do so that my current function is simply superimposing one list onto a list of the same size... but how can I figure out where/how many blanks to add on each row of the pentamino list - you know what I mean? 22:34 mithos28: I think so, have you tried with examples? Say a 10 row, 5 column board with a T piece at row 1, column 3 22:42 RackN00b: No cause I'm not sure what the best way to go about taking into account the offset it... 22:44 RackN00b: I was thinking about flattening the lists and appending the t piece at the n-th empty space of the board that corresponds to the offset point but then my t piece gets messed up and is no longer a t :D 22:58 (join) freakazoid 23:32 RackN00b: Is there a built-in Racket function that would allow me to give it a list of, say, 20 elements and have it create a list of 4, 5 element lists? 23:35 offby1: hmm 23:35 offby1 rubs chin 23:35 Pauan: there's split-at 23:36 Pauan: you could try chaining that repeatedly 23:36 Pauan: though that seems pretty clunky... 23:36 RackN00b: Boourns. 23:36 RackN00b: This problem is oddly way more difficult than writing a non-recursive powerset function was! 23:37 offby1: I'd probably write something using for/list 23:37 ozzloy: rake 23:37 ozzloy: take * 23:37 Pauan: take doesn't give you the cdr, though 23:37 Pauan: split-at does 23:38 ozzloy: oic 23:38 ozzloy: Pauan, hey 23:38 ozzloy: did you end up making any headway on the regex escapes? 23:38 Pauan: nope :D 23:38 Pauan: I've been futzing around in my Arc compiler 23:38 RackN00b: Gonna have to write me own. schweet 23:39 ozzloy: Pauan, do you use arc? 23:39 Pauan: yes 23:39 ozzloy: i've looked into it far enough to see that it requires an old version of scheme which i don't know how to get 23:39 Pauan: no it doesn't 23:39 ozzloy: and that was it 23:39 ozzloy: oh? 23:40 Pauan: the main page is out of date 23:40 Pauan: Arc 3.1 should work even on the latest version of Racket 23:40 ozzloy: well that was a while ago 23:40 ozzloy: ohHOho 23:40 Pauan: and there's also alternate Arc compilers like ar or Anarki or my own Nu compiler 23:40 ozzloy: maybe that's how they keep out the riff raff 23:40 Pauan: (naturally I'm fond of my own compiler, though Arc 3.1 is generally faster) 23:41 ozzloy: icic 23:41 Pauan: I think it's only faster because it's written in Racket, though 23:41 Pauan: whereas my compiler is written in the Arc namespace 23:43 ozzloy: icic 23:44 Pauan: RackN00b: I wrote it. 23:44 Pauan: http://pastebin.com/Xyy5iDyP 23:44 Pauan: valid for an hour 23:44 (join) jeapostrophe 23:45 Pauan: (group '(1 2 3 4 5 6 7 8 9 10) 5) returns '((1 2 3 4 5) (6 7 8 9 10)) 23:45 Pauan: please ignore the probably terrible Racket style :P 23:45 RackN00b: Cool... I was just trying to write my own and it works, but only for the first block :P 23:46 RackN00b: Just looking it over... what is let-values? Never seem that before. BTW I need to apologize for being so clueless about everything! 23:46 Pauan: Racket functions are capable of returning multiple values 23:46 Pauan: it's kinda like as if the function returned a list 23:47 Pauan: except it's not a list 23:47 Pauan: so you use let-values to get the different parts out 23:47 Pauan: in this case, it returns 2 values: the first is the list of the size you requested 23:47 Pauan: and the 2nd is the cdr of that list 23:47 Pauan: in this case, I bound them to l and r 23:47 RackN00b: I see 23:47 Pauan: (this is like list destructuring in Arc, except, you know, without lists) 23:48 Pauan: in other words, (let-values (((x y) (values 1 2))) ...) 23:48 Pauan: within the "..." the value of x is 1, and the value of y is 2 23:48 RackN00b: I see... Much more succinct than what I do in those cases! 23:49 Pauan: in Arc it'd just be (let (x y) (list 1 2) ...) for reference 23:49 offby1: RackN00b: http://ix.io/1ZG is how I'd chunk items up 23:49 Pauan: pfffft just use split-at like I did 23:50 Pauan: though yours does handle lists that are less than the requested size 23:50 RackN00b: I'm gonna need to write my own split-at.. not available at my language level... seems like nothing handy is, although I guess that's the poing. 23:50 Pauan: (require racket/list) 23:50 offby1: RackN00b: pain is good 23:51 RackN00b: Hells yeah man... I've learned more in the last month than I have all year! There's nothing like being thrown in the deep end without a life-preserver to learn to swim.. .ALthough I guess you guys have helped me stay afloat a fair bit! 23:53 offby1: RackN00b: here's another way http://ix.io/1ZH 23:53 offby1: samth wrote that for me 23:54 RackN00b: Cool. Cheers guys