00:00 (join) kreol[Ukr] 00:09 (join) Kaylin 00:17 (quit) kreol[Ukr]: Ping timeout: 260 seconds 00:23 (join) jeapostrophe 00:23 (quit) jeapostrophe: Changing host 00:23 (join) jeapostrophe 00:28 (join) kvda 00:31 (quit) jeapostrophe: Ping timeout: 252 seconds 00:32 (quit) noam_: Read error: Connection reset by peer 00:33 (join) noam_ 00:46 (join) Shambles_1 00:48 (quit) Shambles_: Ping timeout: 260 seconds 00:48 (join) kreol[Ukr] 01:05 (quit) Kaylin: Read error: Connection reset by peer 01:09 (quit) ssbr: Ping timeout: 252 seconds 01:21 (join) ssbr 01:24 (quit) getpwnam: Ping timeout: 244 seconds 01:26 (quit) noam_: Read error: Connection reset by peer 01:26 (join) noam_ 01:27 (quit) noam_: Read error: Connection reset by peer 01:27 (join) noam_ 01:36 (quit) kvda: Quit: x___x 01:36 (quit) dnolen`: Quit: ERC Version 5.3 (IRC client for Emacs) 01:38 (join) snearch 01:44 (quit) Shvillr: Ping timeout: 255 seconds 01:44 (join) Shvillr 01:50 (quit) kreol[Ukr]: Ping timeout: 245 seconds 02:09 (join) hkBst 02:09 (quit) hkBst: Changing host 02:09 (join) hkBst 02:13 (join) jeapostrophe 02:13 (quit) jeapostrophe: Changing host 02:13 (join) jeapostrophe 02:18 (join) sestisr 02:33 (quit) jonrafkind: Ping timeout: 256 seconds 02:36 (quit) jeapostrophe: Ping timeout: 240 seconds 02:36 (join) nilyaK 02:36 (quit) ashish: Read error: Connection reset by peer 02:37 (quit) Shviller: Ping timeout: 250 seconds 02:37 (join) Shviller 02:39 (join) ashish 02:53 (quit) gciolli: Quit: Leaving. 03:21 (join) scvrory 03:23 scvrory: hi, can someone help me out with writing lex-trans syntaxes? https://gist.github.com/8a3e7fd73f7a29b1daca i'm pretty new to racket 03:24 (join) bluezenix 03:31 (quit) nilyaK: Quit: Leaving. 03:36 (join) nilyaK 03:59 (join) noelw 03:59 (join) bitonic 04:07 (quit) snearch: Quit: Verlassend 04:39 (quit) bitonic: Ping timeout: 272 seconds 04:44 (join) mceier 04:47 (join) ahinki 04:50 (join) nilyaK1 04:50 (quit) nilyaK1: Client Quit 04:52 (quit) nilyaK: Ping timeout: 252 seconds 04:52 (join) bitonic 04:54 (join) bitonic_ 04:57 (quit) bitonic: Ping timeout: 272 seconds 05:07 (quit) bitonic_: Quit: WeeChat 0.3.7 05:13 (quit) ambrosebs: Ping timeout: 245 seconds 05:20 (join) ambrosebs 05:36 (quit) jhemann__: Ping timeout: 240 seconds 05:59 (join) antithesis 06:08 (join) gciolli 06:18 (join) RacketCommitBot 06:18 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/cx4eXA 06:18 RacketCommitBot: [racket/master] Minor improvement, and recognize a ".plt" suffix in any case. - Eli Barzilay 06:18 RacketCommitBot: [racket/master] Switch to `racket', and a bunch of code cleanups. - Eli Barzilay 06:18 RacketCommitBot: [racket/master] Warn when a given collection has nothing to compile, abort with an error all are empty. - Eli Barzilay 06:18 (part) RacketCommitBot 06:22 Cryovat: eli is on fire :) 06:27 (quit) sestisr: Ping timeout: 250 seconds 06:30 eli: Cryovat: No, I just had an accumulation of patches... 06:32 (join) bitonic 06:51 (join) plobzik 06:53 (quit) plobzik: Read error: Connection reset by peer 06:55 (quit) jrslepak: Quit: This computer has gone to sleep 07:06 Cryovat: Hehe :) 07:07 (join) masm 07:08 (join) kvda 07:13 (join) snearch 07:17 (quit) snearch: Client Quit 07:21 (join) tim-brown 07:22 tim-brown: are there any date utilities kicking about, especially "add a month" to a racket date or an srfi/19 date? 07:31 tim-brown: what's wrong with these? 07:31 tim-brown: rudybot: (struct-copy date* (current-date) [month 2]) 07:31 rudybot: tim-brown: your sandbox is ready 07:31 rudybot: tim-brown: error: #:1:35: struct-copy: accessor name not associated with the given structure type at: date*-month in: (struct-copy date* (current-date) (month 2)) 07:31 tim-brown: rudybot: (struct-copy date (current-date) [month 2]) 07:31 rudybot: tim-brown: error: reference to an identifier before its definition: current-date in module: 'program 07:32 tim-brown: rudybot: (require racket/date) 07:32 rudybot: tim-brown: Done. 07:32 tim-brown: rudybot: (struct-copy date (current-date) [month 2]) 07:32 rudybot: tim-brown: error: car: expects argument of type ; given: #f 07:33 tim-brown: (that's a new one on me) 07:33 (quit) gciolli: Ping timeout: 255 seconds 07:33 tim-brown: rudybot: (struct-copy date* (current-date) [month #:parent date 2]) 07:33 rudybot: tim-brown: error: #:1:50: struct-copy: identifier not bound to a parent struct at: date in: (struct-copy date* (current-date) (month #:parent date 2)) 07:34 (join) djcb 07:36 tim-brown: i want to use date logic to add a month to a date, as in: 07:36 tim-brown: (define (add1-month dt) 07:36 tim-brown: (let ((old-m (date-month dt))) 07:36 tim-brown: (struct-copy 07:36 tim-brown: date dt 07:36 tim-brown: [month (add1 (modulo old-m 12))] 07:36 tim-brown: [year (+ (date-year dt) (quotient old-m 12))]))) 07:36 tim-brown: except, this will convert my (current-date), a date* to a plain date 07:37 (quit) kvda: Quit: Computer has gone to sleep. 07:41 (join) sestisr 07:42 (join) kvda 07:43 sestisr: stamourv: if you refere in a definition to a syntax class that has not been defined yet an error is reported ... 07:43 sestisr: so for mutual syntax classes you will be smoked... 07:44 sestisr: with the set! version it will basicaly compile the syntax class as before but not change anything for the syntax class if the metadata is the same ... 07:44 sestisr: appart from set! ing the parser function with the new one and if the meta data is not the same 07:45 sestisr: an error is outputed showing what the difference is 07:45 sestisr: with this you can define the interface first as usually and later clobber the parser with the correct one ... 07:46 sestisr: and you can have mutual recursive syntax class patterns. 07:46 sestisr: does this make sense? 07:48 sestisr: the use case is to design the racket match following the documentation 07:49 sestisr: e.g. define one syntax class for patterns and another for quasiquoted patterns and the will refere to each other 07:50 sestisr: comming to think about it though I suppose that you can pass a parameter to the syntax class 07:50 sestisr: and dispatch depending on that parameters value which is a bit unclean. 07:54 eli: sestisr: You should ask about it on our mailing list -- I know that Ryan had something to say about it, and a post on the list would make it easier for him to reply. 07:55 sestisr: ok! 07:59 (join) jeapostrophe 07:59 (quit) jeapostrophe: Changing host 07:59 (join) jeapostrophe 08:05 (join) gciolli 08:11 (join) kanak 08:14 (join) RacketCommitBot 08:14 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/X9ooMw 08:14 RacketCommitBot: [racket/master] add some example code showing how to bind a menu to a key via the keymaps - Robby Findler 08:14 (part) RacketCommitBot 08:21 (join) snearch 08:24 (join) zyoung_ 08:25 (quit) gciolli: Ping timeout: 250 seconds 08:25 (quit) zyoung_: Remote host closed the connection 08:28 (quit) zyoung: Ping timeout: 245 seconds 08:36 (join) gciolli 08:40 (join) dnolen 08:48 (join) zyoung 08:55 (join) netrino 08:58 (join) getpwnam 09:10 (join) kreol[Ukr] 09:28 anonus: is it possible to select language in command-line racket shell like it is possible in drracekt ? 09:30 bremner: racket -l typed/racket -i 09:30 bremner: for example. 09:32 (quit) djcb: Read error: Connection reset by peer 09:32 anonus: so for example if i want algol60 i need to run racket -l algol60/lang/algol60 -i and for every language i need to explore what module to load by hands? 09:33 (join) djcb 09:36 (quit) getpwnam: Ping timeout: 265 seconds 09:37 anonus: or i misunderstood something ? 09:38 bremner: anonus: as far as I understand, you can take whatever you would put after "#lang" and pass it to -i. Of course, it is probably better just to add the #lang line at the top of your file. 09:39 anonus: i know that it's better to use #lang in file 09:39 anonus: but 09:39 (join) jhemann__ 09:39 anonus: i need some developing environment and i can't use drracket because i'm developing on remote machine using ssh all the time 09:40 bremner: I don't see the connection between using #lang and not using drracket 09:41 anonus: i can't just type #lang in REPL 09:41 bremner: oh, ok. 09:41 anonus: but i can choose language in drracekt 09:43 bremner: I suggest you experiment a bit with -i ; maybe also see the docs for xrepl on docs.racket-lang.org 09:46 anonus: i'm doc about xrepl but only one that i found is that there are problems with it and you should use expanded form of #lang 09:48 bremner: anonus: personally I use geiser in emacs; this might work for you if you know emacs. 09:49 anonus: unfortunately i have allergy to emacs 09:49 (join) jao 09:49 anonus: i've almost died after 2 years it's use 09:50 anonus: *its 09:50 (quit) jao: Changing host 09:50 (join) jao 09:50 anonus: but anyway it's a bit strange that all of developing tools can select language and xrepl can't, i think there should be some trick here 09:51 bremner: I don't understand what your difficulty with -i is 09:51 bremner: is is the interaction with xrepl? or something else? 09:52 (join) mithos28 09:55 (quit) hkBst: Quit: Konversation terminated! 09:59 asumu: anonus: racket -I language 09:59 asumu: Also, not all languages have REPL capabilities. 09:59 (quit) gciolli: Ping timeout: 250 seconds 10:01 (quit) snearch: Quit: Verlassend 10:05 anonus: asumu: thanks, it works like i expected :3 10:14 tim-brown: hints on simply adding one month to a date, anyone? given as date has a day-of-week and day-of-year that need to be kept up to date? 10:14 tim-brown: (and I don't really want to encode "thirtie daes hath september...") 10:16 (quit) jeapostrophe: Ping timeout: 260 seconds 10:29 (quit) kreol[Ukr]: Ping timeout: 260 seconds 10:44 (quit) ahinki: Quit: ChatZilla 0.9.88.2 [Firefox 13.0/20120501201020] 10:47 (join) getpwnam 10:53 bartbes: tim-brown: there's an add-duration in srfi 19 10:56 (join) tfb 10:59 tim-brown: bartbes: it adds a time-duration to a time... what is the duration of a month though? 10:59 bartbes: a date object with 1 month set? 11:00 tim-brown: won't that be the length of January 0AD (or Jan 1970), in either case 31 11:01 bartbes: I'd hope not.. 11:03 tim-brown: i think i'll have to (make-date (date-nanosecond old) ... (add.1%12 (date-month old)) (add.1/12 (date-year old)) ...) 11:03 tim-brown: i can't seem to use copy-struct on an srfi/19: date 11:04 tim-brown: in fact some deviant has closed my drracket session! 11:08 (join) anRch 11:09 tim-brown: rudbot: (require srfi/19) (struct-copy tm:date (current-date)) 11:10 tim-brown: rudybot: (require srfi/19) (struct-copy tm:date (current-date)) 11:10 rudybot: tim-brown: (require srfi/19) (struct-copy tm:date (current-date)) 11:10 tim-brown: rudybot: (current-date) 11:10 rudybot: tim-brown: error: car: expects argument of type ; given: #f 11:10 tim-brown: anyone know what this robot's on about? 11:13 (quit) spanner: Remote host closed the connection 11:13 (join) spanner 11:29 (join) gridaphobe 11:38 (quit) djcb: Read error: Connection reset by peer 11:39 (join) djcb 11:46 (quit) dnolen: Ping timeout: 252 seconds 11:58 (quit) anRch: Quit: anRch 12:00 (join) jeapostrophe 12:00 (quit) jeapostrophe: Changing host 12:00 (join) jeapostrophe 12:05 tim-brown: have a nice weekend everyone 12:06 (join) gciolli 12:06 (part) tim-brown: "Leaving" 12:18 (quit) bluezenix: Quit: Leaving. 12:20 (nick) noelw -> noelw_away 12:30 (join) anRch 12:30 (join) plobzik 12:30 eli: sestisr: The message about the mailing list is from me, if you want, I can subscribe you without email so you won't to go through moderation. (I prefer that over the chance that I'll miss future emails in the usual sea of spam.) 12:32 (quit) plobzik: Read error: Connection reset by peer 12:37 (quit) kvda: Quit: Computer has gone to sleep. 13:01 (join) _gcr 13:03 (quit) tfb: Quit: gone 13:06 (quit) gciolli: Quit: Leaving. 13:06 (quit) anRch: Ping timeout: 252 seconds 13:06 (quit) sestisr: Ping timeout: 265 seconds 13:08 (join) jacius 13:09 (quit) spanner: Read error: Connection reset by peer 13:10 (quit) _gcr: Remote host closed the connection 13:15 (join) jonrafkind 13:22 (join) nilyaK 13:26 (join) nilyaK1 13:29 (quit) nilyaK: Ping timeout: 260 seconds 13:31 (quit) noam_: Ping timeout: 250 seconds 13:32 (quit) djcb: Read error: Connection reset by peer 13:32 (join) aalix 13:32 (join) djcb 13:34 (join) bluezenix 13:40 (join) kreol[Ukr] 13:45 (join) spanner 13:45 (join) stis 13:47 (join) noam 13:47 (quit) noam: Read error: Connection reset by peer 13:48 (join) noam 13:48 (quit) noam: Read error: Connection reset by peer 13:49 (join) noam 13:50 (quit) noam: Read error: Connection reset by peer 13:50 (join) noam 14:00 jschuster: is there any easy way to say "do the following N times" in Racket other than "for ([i (build-list N values)]) ..."? 14:00 (quit) getpwnam: Ping timeout: 256 seconds 14:00 jschuster: I think I really just want something like (do-n-times N body) 14:00 jschuster: which is easy enough to write on my own, just thought I'd check if there's something built in 14:02 (quit) noam: Read error: Connection reset by peer 14:03 (join) noam 14:05 bartbes: yes, you use recursion, not for loops ;) 14:07 jschuster: ok, sure, I can obviously do that, too 14:07 jschuster: I was just hoping for something built in that's just a little simpler, but it looks like that doesn't exist 14:09 bartbes: because you're not supposed to have it 14:09 jacius: How about just "(for ([i N]) ...)" ? 14:09 jacius: Where N is the number of repetitions 14:10 bartbes: it exists? 14:10 jacius: Yep 14:11 bartbes: still doesn't mean it should be used 14:11 jacius: Heh 14:11 bartbes: but good to know 14:11 nilyaK1: use cond, it loves you 14:11 jschuster: oh nice, that's basically good enough. thanks 14:12 jrslepak_neu: rudybot: (sequence? 12) 14:12 rudybot: jrslepak_neu: ; Value: #t 14:12 jacius: Well, since we don't know anything about jschuster's purpose, it's hard to judge whether this is the most appropriate way 14:12 jschuster: to provide some context: I'm writing a method that wraps the test-predicate Redex test method 14:13 jschuster: and I want to say "Run this test N times, using random input each time" 14:13 jschuster: I guess I could generate the input first as a list and then iterate over it 14:13 jschuster: but somehow just saying "do N times" just made more sense to me 14:14 jschuster: it's a completely stateful operation (I'm expecting something printed to the screen), so I'm not working in a purely functional setting 14:14 bartbes: I normally use a named let for stuff like this 14:15 jacius: In this case, there doesn't seem to be any benefit to trying to cram it into a functional style 14:15 bartbes: indeed 14:18 jacius: Although, I would caution against using random values for testing. The test might pass today, then fail tomorrow. 14:20 bremner: well, pseudorandom numbers are one solution to that. 14:20 asumu: jschuster: there is a `do` form but TBH I find it harder to use than `for` anything. 14:20 asumu: rudybot: doc do 14:20 rudybot: asumu: your sandbox is ready 14:20 rudybot: asumu: http://docs.racket-lang.org/reference/for.html#(form._((lib._racket%2Fprivate%2Fmore-scheme..rkt)._do)) 14:20 jschuster: yeah, I know. I'd like to find a better way to test this, but basically I'm testing a non-deterministic semantics, so testing every possible reduction path takes a _long_ time 14:20 (join) anRch 14:21 jacius: Ok :) 14:27 (quit) noam: Read error: Connection reset by peer 14:28 (join) noam 14:28 (join) jtpercon 14:29 (quit) noam: Read error: Connection reset by peer 14:30 (join) noam 14:32 (quit) gridaphobe: Remote host closed the connection 14:37 (join) roelof 14:38 roelof: anyone home here ? 14:38 jacius: Hi roelof 14:39 asumu: roelof: best to ask a question than to ask if anyone is around. :) (on IRC people don't respond immediately) 14:40 roelof: oke, I have on the ML start a discussion with the name : left boundary problem 14:40 roelof: there Matthias makes a comment I don't understand complety and I hope someone here can help me 14:43 asumu: What was the comment? 14:43 (quit) ambrosebs: Ping timeout: 256 seconds 14:44 roelof: asumu : This was his comment : 14:44 roelof: >> ;depend constants 14:45 roelof: sorry , something went wrong . This is his comment : Perhaps you should define the above two constants first and then make the others depend on them? 14:48 jacius: Here is the ML discussion roelof is referring to: http://article.gmane.org/gmane.comp.lang.racket.user/12093 14:48 jrslepak_neu: I think he's saying that (define workspace (empty-scene 1000 200)) ... (define lengte (image-width workspace)) is backwards 14:52 roelof: jrslepak_neu: On what way do you mean that ? In my opinion you first have to make a image and then you can make checks on the properties 14:53 jrslepak_neu: or you define what those properties should be and then make the image based on them 14:53 roelof: oke, that way 14:56 roelof: Then I can try to make this exercise again and hopefully it works then without hardcoded numbers 14:58 (join) getpwnam 14:58 roelof: Thanks for the insight 14:58 (join) dzhus 14:58 (quit) karswell: Read error: Connection reset by peer 15:01 (quit) anRch: Quit: anRch 15:05 roelof: someone else a remark about the function that I have made 15:09 (join) karswell 15:09 (quit) noam: Read error: Connection reset by peer 15:09 (join) noam 15:10 (join) untrusted 15:11 Shambles_1: I'm going through the tutorials and I am confused about one thing. I understand the difference between "let" and "let*", but I don't understand how "local" is different. Can anyone help? 15:12 (quit) Shambles_1: Quit: Leaving. 15:12 (join) Shambles_ 15:15 danking: Shambles_: local has some superficial differences i.e. (let ((y (lambda (x) 3))) ...) is the same as (local ((define (y x) 3)) ...). But it also is subtle in another way. 15:16 Shambles_: What is the other way? 15:18 danking: Local works the way you expect top-level definitions to work, so you can write (local ((define (odd? x) (even? (sub1 x))) (define (even? x) (or (= x 0) (odd? (sub1 x)))))) ...) 15:19 danking: Which you couldn't do with let. (note: odd? here is defined for n > 0 and even? is defined for n >= 0) 15:19 Shambles_: Meaning you can refer to something before it's defined? 15:19 jonrafkind: you can just do (let () (define (even?) ...) (define (odd?) ...)) so you dont need local anymore 15:20 (quit) roelof: Quit: Page closed 15:20 danking: Shambles_: Correct. With let you can only refer to things which are lexicall "above" the let form. 15:20 danking: Shambles_: With let* you can also refer to variables that were bound earlier in the same let form. 15:20 Shambles_: danking: Since you can do everything with let/let*, and most people use it, would it be best to use that rather than local in my own code? 15:21 (quit) noam: Read error: Connection reset by peer 15:22 danking: Shambles_: Well, you can't really do everything with let/let*. Mutually recursive definitions have to be done with letrec or local. What jonrafkind is referring to are internal definitions which are similar to an implicit local. 15:22 (join) noam 15:22 danking: Though, I guess I'd say for the Racket community, internal definitions seem to be more popular than (local (...) ...) 15:22 Shambles_: danking: I'm not used to "more than one way to do it" in a programming language. I'm trying to find reasons for when to choose one thing over another. 15:23 danking: Shambles_: If you're just binding/defining values use let. If you find yourself nesting your lets (let ((x 3)) (let ((y (sqr x))) ...) then use let*. 15:24 danking: Beyond that, I'm not certain what the prefered way is. 15:24 Shambles_: danking: Thank you. 15:24 danking: no problem. 15:26 (quit) noam: Read error: Connection reset by peer 15:26 (join) noam 15:30 (quit) nilyaK1: Quit: Leaving. 15:32 bartbes: danking: I'll add one: if it complains, try letrec 15:35 (join) jhemann_ 15:38 (quit) jhemann__: Ping timeout: 255 seconds 15:43 (join) jhemann__ 15:46 (quit) jhemann_: Ping timeout: 248 seconds 15:47 (join) jhemann_ 15:47 asumu: Shambles_: most people don't use local except in the teaching languages AFAIK. 15:48 asumu: Here's a reason for why to use internal definitions rather than let: it prevents right-ward indentation creep. 15:48 (part) untrusted: "ERC Version 5.3 (IRC client for Emacs)" 15:49 asumu: e.g. (define (my-function x) (define (helper) ...) ...) indents shorter than (define (my-function x) (let ([helper (lambda () ...)]) ...)) 15:50 asumu: It's a purely aesthetic reason, so use what you are comfortable with. 15:51 (quit) jhemann__: Ping timeout: 250 seconds 15:52 Shambles_: asumu: Do most Racket programmers use define internally rather than let forms? 15:52 bartbes: asumu: thanks for clearing that up, btw, I should try that sometime, those lets get awfully long 15:53 Shambles_: asumu: And do I need to worry about anything, like the order of definitions, or mutually recursive definitions? 15:53 asumu: Shambles_: I can't speak for most programmers, but the encouraged style amongst the core development team is using internal defines. 15:53 asumu: And yes, you do need to worry about order. 15:54 asumu: rudybot: (let () (define x y) (define y 3) y) 15:54 rudybot: asumu: ; Value: 3 15:54 asumu: Oh, or maybe not. 15:54 asumu: rudybot: (let () (define x y) (define y 3) x) 15:54 rudybot: asumu: ; Value: # 15:54 asumu: Ah, there we go. 15:54 Shambles_: So it needs to be ordered like let* ? 15:55 asumu: Yes, unless they are functions, which can refer to each other. 15:55 asumu: (because they are delayed comptuations) 15:55 Shambles_: asumu: Got it. Thanks. 15:57 asumu: Shambles_: if you're curious about what "good Racket style" is, you may be interested in this document: http://www.ccs.neu.edu/home/matthias/Style/style/ 15:57 bartbes: while on the topic, what's a good way to shorten lines while keeping proper indentation? 16:01 Shambles_: asumu: This is very helpful, thank you. 16:15 (join) yoklov 16:16 (join) gridaphobe 16:20 (join) snearch 16:24 (quit) djcb: Read error: Connection reset by peer 16:25 (join) djcb 16:43 (quit) noam: Read error: Connection reset by peer 16:44 (join) noam 16:47 danking: bartbes: That's an awfully vague question. What are your constraints? I usually start by adding newlines after all the arguments to a procedure. 16:49 (join) RocksHound 16:54 (part) RocksHound 17:04 (quit) jacius: Remote host closed the connection 17:06 bartbes: damming: I had a few long function names for string manipulation, and even with newlines, it became very long very quickly 17:06 bartbes: sigh, autocorrect 17:07 bartbes: danking: ^ 17:16 Shambles_: What is the significance of "/" in a identifier? I see that contracts always seem to end in "/c" and in the tutorial there are some functions like "send/suspend/dispatch". 17:17 (join) jrslepak 17:17 Shambles_: I thought they had something to do with directories when reading the explanation of how to use and make modules. 17:18 bremner: Shambles_: Others can tell you more about the conventions used in racket, but from a syntactic point of view, it's just another character in an identifier 17:26 Shambles_: I'm also finding the part where send/suspend/dispatch is being used rather difficult to understand. Apparently it uses continuations. I understand the idea of a generator, and think of a continuation as a 'snapshot' of a stack frame (instruction pointer and local variables and whatever the references point to at the time). 17:28 Shambles_: I'm not sure what the 'parts' of the expression does, or how to use it intelligently. It looks like maybe embed/url creates the continuation and causes the function to return, a lot like 'yield' in most generators? 17:33 asumu: Shambles_: You don't need to understand continuations to use send/suspend/dispatch AFAIK. embed/url just takes a function that handles requests and embeds it as a URL. 17:34 asumu: And send/suspend/dispatch lets you dispatch to other handlers. 17:35 danking: Shambles_: I believe foo/bar is often used to mean foo-WITH-bar or foo-VERSION-FOR-bar. 17:37 Shambles_: Well, I'm going through the tutorials to try to understand the language better, not because I'm just aching to write the next Twitter. It's just what they went with to try to explain things for some reason. 17:39 asumu: If you want to understand continuations in detail, I'd read the chapter in PLAI on it: http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/ 17:39 Shambles_: The 'parts' that always seem to be involved are send/suspend/dispatch, response/xexpr, and embed/url. I think response/xexpr is just used to send HTML back to the client. At least I've seen it before continuations were involved. I don't understand what the other two parts 'do' exactly. 17:40 Shambles_: asumu: Do I have it wrong? Continuations aren't 'a snapshot of the stack frame'? 17:41 scvrory: is there any more complicated example of using parser-tools? the lexer documentation is great, but the parser documentation is very terse and i haven't yet got the hang of it 17:42 asumu: scvrory: https://github.com/plt/racket/tree/master/collects/parser-tools/examples 17:42 scvrory: asumu: seen those, they don't do anything very complicated at all in the parser sections 17:43 asumu: Shambles_: That is one way to think of them, but I don't know how useful it is to think of them that way. 17:43 asumu: Also, yiels is a highly restricted and specialized form of a continuation operator. 17:43 asumu: *yield 17:43 Shambles_: asumu: I found it very easy to understand generators that way, since it would 'pick up where it left off' naturally, if it preserved the instruction pointer and values of the variables. 17:45 scvrory: for instance, i'm parsing css. per the spec http://www.w3.org/TR/css3-syntax/ they use a catchall CHAR token, then in the parser they define the syntax like '{' ... '}' and i have no idea how to match on just that CHAR ('{' or '}') 17:45 asumu: Shambles_: That's a very machine-oriented way of thinking about it. In terms of the language syntax, the continuation is just the rest of the program that hasn't been run yet. 17:46 asumu: e.g., in (+ 1 2 (call/cc (lambda (k) ...))), 'k' is (+ 1 2 []) 17:46 asumu: That is, the rest of the program that you'll return to (passing it some value) if you call 'k'. 17:47 Shambles_: asumu: I get rather disturbed when I can't think of things in terms of 'what it does in the machine'. It's also the only way I know to implement things (I want to make the machine do ___, and I have these parts to do it with), and judge the efficiency. And it's some 'common ground' amongst all languages. 17:47 asumu: There are very many ways to implement continuations. You can allocate them on the heap, use the stack, and so on. So then you have to choose which representation you mean. 17:48 asumu: So in reality, you're thinking about a very abstract machine anyway. 17:48 asumu: Might as well abstract to the language then. 17:48 danking: scvrory: I would bet that the CSS syntax is defined using ANTLR or something similar. the parser-tools are based on the earlier Lex and YACC/BISON tools which don't have characters right in the syntax. 17:48 Shambles_: asumu: I think however you did it, it'd still break down to saving the instruction pointer and variables, even if they could be stored different places. That is, unless there's something else it does I don't know about. 17:49 danking: Which is a long way of saying, you'll have to change the grammar so that everywhere a '{' appears you have an LBRACK token and then your lexer must produce LBRACKs. 17:49 asumu: Shambles_: That may be how it's implemented, but that doesn't really tell you how to use it. 17:49 danking: I realize this is incredibly annoying, and I sympathize. Unfortuantely, I'm mired in the middle of a project attempting to improve that situation. 17:50 Shambles_: asumu: I'd use it whenever I wanted to "pick up where I left off", I'd think? I know you can have multiple 'copies', so you can effectively 'go back in time' (with some issues with 'pointed to' things, I believe). Is there something else it's good for? 17:52 (quit) kreol[Ukr]: Ping timeout: 244 seconds 17:54 asumu: I think that's probably a good high-level intuition. There are plenty of subtleties such as how your continuations are delimited (i.e., where you jump to/how far you can jump) and so on. 17:54 asumu: Note that that high level intuition doesn't depend on knowing how its implemented though. 17:57 Shambles_: asumu: Well, the "how it's implemented" part made it easier for me to understand why, if I keep a continuation around, and then 'run it' to 'go back in time' I may not see *everything* going back in time, because if something it had 'ahold of' (not inside that stack frame) via a reference was also manipulated outside, it would not be the same as it was when the continuation was taken. 17:58 Shambles_: Unless I somehow understand that wrong. 17:59 scvrory: danking: the syntax is defined using YACC actually 18:00 scvrory: danking: i'm trying to figure out how to link it to you 18:00 scvrory: danking: thanks for your help though! 18:00 danking: scvrory: I scrolled up to your link 18:01 scvrory: http://www.w3.org/TR/css3-syntax/#grammar0 18:01 scvrory: danking: no that code is old, if that's what you're taking about 18:01 scvrory: i'm taking about the actuall css grammar 18:01 danking: scvrory: Ah. Well. 18:02 danking: Yeah, the trouble is the guy who wrote parser-tools didn't bother to include those literal token strings. 18:03 asumu: Shambles_: Right, but you can also see that from the syntax. The continuation that's saved is just the rest of the program, but the program notably does not include the heap. 18:04 asumu: (hence why continuations don't rewind changes you make on the heap) 18:04 scvrory: danking: i mostly was drawn to racket because the lexing bindings are pretty awesome. and if i'm not wrong it looks pretty easy to compile binaries for popular operating systems 18:05 Shambles_: asumu: I actually found it surprising originally, since I consider "the program" to be the code and all it's state (stack, heap, etc.). I suppose it's also one of the arguments for avoiding mutation where possible, since I can't imagine most people would want that behavior. 18:07 danking: scvrory: The parser-tools are rather nice thanks to the ability to tightly integrate, using macros, the syntax of the lex and yacc tools with the surrounding Scheme program. 18:08 Shambles_: asumu: I've gotten down to "Advanced Control Flow" in this part of the tutorial: http://docs.racket-lang.org/continue/ 18:08 Shambles_: asumu: I'm having trouble understanding the code since I don't 'see' the continuation. I assume something to do with send/suspend/dispatch or embed/url is "returning" the continuation, but without understanding it I don't know how to write expressions to do what I want (say, multiply two numbers), then show the result on the next page. 18:08 (quit) snearch: Quit: Verlassend 18:09 asumu: There's no need to think about continuations there. All of the control flow is being handled by what functions you call. 18:09 asumu: i.e., the functions you pass to embed/url control where you end up next via the URL. 18:10 asumu: It's really about higher-order functions than about continuations there. 18:10 (quit) scvrory: Read error: Connection reset by peer 18:11 (quit) jeapostrophe: Ping timeout: 256 seconds 18:12 (join) scvrory 18:13 (quit) dzhus: Read error: Operation timed out 18:13 Shambles_: asumu: Hmm. So, so long as I pass it a function that contains the old value (in the counting example), and takes a argument (or just always adds 1), it will work? I don't need to worry about 'where it returns to' or anything else special? 18:14 (part) jtpercon 18:15 asumu: Shambles_: you shouldn't need to, as long as the function takes a request and returns a response. 18:15 asumu: In any case, try it and see. :) 18:17 Shambles_: asumu: I'd tried to read the description of send/suspend/dispatch http://docs.racket-lang.org/web-server/servlet.html#%28def._%28%28lib._web-server/servlet/web..rkt%29._send/suspend/dispatch%29%29 and saw the add and subtract options. I couldn't figure out the control flow in them. 18:17 rudybot: http://tinyurl.com/c6aezse 18:17 (quit) netrino: Quit: Ave! 18:19 Shambles_: I've tried naively pasting that in so it gets called by (start request) and just get a stack trace. 18:20 asumu: Shambles_: the control flow there is again basically all via function calls. The reason it keeps going forever is because of the recursive call to count-dot-com. 18:20 Shambles_: Looks like I have it working now (I'm just ignoring the 'request', and start it with a 0. 18:24 Shambles_: asumu: That would make some sense, but I don't see where it calls itself. That's why I thought I had to care about the continuations. It looks like maybe it 'yields' around the (embed/url (lambda (req) (sub1 i) part. The define calls itself on the first line. But I'm not sure where the argument (previous number) is being passed? 18:27 Shambles_: Maybe that's just inserting the URL that causes it to be called again? I don't know. I admit to finding it rather confusing despite trying. It might be easier if I understood the internals of website scripting, but I've never had to care before. I just stuck to sysadmin type stuff (messing with files and directories) and regular offline programming. 18:33 (quit) yoklov: Quit: computer sleeping 18:34 (join) yoklov 18:35 (quit) karswell: Remote host closed the connection 18:36 (quit) yoklov: Client Quit 18:45 (join) karswell 18:46 (join) yoklov 18:47 (join) zyoung_ 18:48 (part) stis 18:50 (quit) zyoung: Ping timeout: 244 seconds 18:54 (quit) zyoung_: Remote host closed the connection 19:06 asumu: Shambles_: it calls itself at the top of the function. 19:06 (quit) scvrory: Quit: leaving 19:06 asumu: Right after (define (count-dot-com i) 19:07 Shambles_: asumu: so all the stuff down from there is returning the 'i' to be used on the next invocation, which will happen every time "start" is run, which is every time a page is loaded? 19:07 asumu: Yes. 19:08 Shambles_: asumu: The "embed/url" somehow 'magically' stores what code to run when the link is clicked, right? 19:10 asumu: Yes, and the magic part is done with continuations. 19:11 asumu: But this isn't important to use it (you just need to know its interface). 19:12 Shambles_: asumu: If that's the case, what does send/suspend/dispatch do? Is that where control flow goes after a link is used? It 'picks up where it left off' in send/suspend/dispatch, which just returns the value? 19:28 asumu: Shambles_: it does all of the bookkeeping with continuations and the like. After all, the embed/url function is provided by it. 19:29 Shambles_: asumu: So I was right about control flow going there after one of the embedded URL's is used? It's kind of like 'cond' for scripted URL's? 19:31 asumu: According to the documentation, whatever embed/url returns will be what send/suspend/dispatch returns. That's all its interface says. It may be that control flow ends up going back to send/suspend/dispatch, which immediately returns it or not. (I don't actually know) 19:31 asumu: (and it's an implementation detail that shouldn't matter) 19:32 asumu: It's like cond in a superficial sense, in that both do a kind of dispatching. 19:33 (join) nilyaK 19:34 (quit) ashish: Quit: Whenever we are together, it's always estatically palpitating! 19:36 (join) ashish 19:38 Shambles_: asumu: Thanks. I think I understand it now. 19:39 asumu: Shambles_: :) 19:41 (quit) antithesis: Remote host closed the connection 19:42 (quit) jonrafkind: Ping timeout: 245 seconds 19:44 (quit) aalix: 19:59 (quit) nilyaK: Quit: Leaving. 20:16 (quit) yoklov: Quit: computer sleeping 20:28 (join) jeapostrophe 20:28 (quit) jeapostrophe: Changing host 20:28 (join) jeapostrophe 20:33 (join) dnolen 20:37 (join) jacius 20:48 (quit) bluezenix: Quit: Leaving. 21:04 (join) elliottcable 21:08 (quit) mceier: Quit: leaving 21:23 Shambles_: asumu: Picking apart the second one, does "make-url" behave the same as "embed/url". I can't seem to find any indication in the documentation which to use for things like making a link clickable. 21:23 Shambles_: asumu: It looks like make-url might be a constructor for a URL class. 21:26 (join) zyoung 21:27 (quit) zyoung: Read error: Connection reset by peer 21:27 (join) zyoung 21:29 jeapostrophe: hm? 21:29 jeapostrophe: you are talking about my biz 21:29 jeapostrophe: Shambles_: what code are you looking at? 21:31 Shambles_: jeapostrophe: I'm looking at the last version under Advanced Control Flow, the one with the line that reads ",(make-url insert-post-handler)))" where I would have expected to see embed/url 21:31 (join) kvda 21:32 jeapostrophe: embed/url & make-url are NOT library functions from the Web server 21:32 jeapostrophe: those are bound by the first argument to the 'response-generator' function in that code 21:32 jeapostrophe: and 'response-generator' is passed, in both cases, to send/suspend/dispatch 21:32 jeapostrophe: so those functions (e/u and m-u) are the same, because it's the function that s/s/d gives them 21:33 jeapostrophe: you get to pick the name you give it 21:33 jeapostrophe: make-url, proc->url, embed/url are all common names 21:33 jeapostrophe: just like send/suspend's function's argument is often k, k-url, cont-url, or something 21:33 Shambles_: That's... really confusing, especially in a tutorial. I also managed to find a definition for make-url, and thought that's what it referred to. 21:34 jeapostrophe: library functions in racket docs are always links and those aren't links 21:34 jeapostrophe: you need to understand racket at least a little bit to read the tutorial... and those functions are clearly bound in the first argument of the response-generator function 21:34 jeapostrophe: (define (response-generator embed/url) 21:35 jeapostrophe: (define (response-generator make-url) 21:35 Shambles_: I think I understand it a little bit. I've gotten through the first tutorial with no problems. Some of the difficulty in this one is due to the way it's written (things are defined in strange orders, and the control flow gets rather cute). Some is that you need to understand how a web server works somewhat, which is beyond understanding Racket. 21:36 Shambles_: I'm trying, but I don't think the fault is all on my end. It is a tutorial after all. 21:36 jeapostrophe: okay, in this case, the thing to take away is to track where things are bound when you want to know what they mean 21:36 jeapostrophe: in DrRacket you could press Check Syntax 21:36 jeapostrophe: and then put your cursor next to make-url 21:36 jeapostrophe: and it will draw an arrow to the right place 21:37 (quit) jao: Ping timeout: 260 seconds 21:37 jeapostrophe: that's a useful way to learn about racket code 21:37 Shambles_: I can't come up with a good reason to change the names of identifiers mid-tutorial with no explanation either. If it was embed/url before, and you're just making the changes necessary to allow it to store the blog posts, it seems like that's all that should change. 21:39 jeapostrophe: i'll change it to reduce the chance for this kind of confusion 21:39 Shambles_: jeapostrophe: Actually, looking at the documentation you suggested, it says "Calls make-response with a function (embed/url)" 21:40 Shambles_: jeapostrophe: I understand I can use whatever variable names I want, but when something is called one thing and suddenly changed in the process of adding a feature, I believed it was related to the feature being added. 21:44 Shambles_: jeapostrophe: So "send/suspend/dispatch" always calls a function (which you can call whatever you want, but is "make-dispatch" in the documentation), that takes another function (which you can call whatever you want, but is "embed/url" in the documentation), which calls the function you use to process what the user did. 21:44 Shambles_: Is that right? 21:44 jeapostrophe: yup 21:44 jeapostrophe: although you meant 'make-response' rather than 'make-dispatch' 21:44 jeapostrophe: but ya, that's the idea 21:45 jeapostrophe: the contract is informative --- make-response : (((request? . -> . any) . -> . string?) . -> . can-be-response?) 21:45 Shambles_: jeapostrophe: I understand that you can 'get away with it' but some of the functions are defined before they're used, and some are defined after. Also, the first and second 'static' blog posts (the ones that are hard coded) appear in the wrong order (not the order you'd get if you inserted them manually). I mention this in case you decide to fix up the tutorial some. 21:46 jeapostrophe: which functions are in the wrong order? 21:46 (nick) godless_ -> Quetzalcoatl_ 21:46 Shambles_: Just makes it a bit harder to follow than it would be otherwise, along with the stuff I already mentioned. I many not be a really slick lisp programmer, but I'm not new to programming either. If I'm having trouble, I'm sure people that are starting out on Racket will have a hard time. 21:47 Shambles_: This is actually probably not the best thing to start beginners on, due to dependencies on understanding HTML and basic web server behavior (forms), and then there's the 'mystery control flow' that uses call/cc in the background, but I digress. 21:48 asumu: Shambles_: I think the Quick tutorial is intended to start off beginners. http://pre.racket-lang.org/docs/html/quick/index.html 21:48 jeapostrophe: ya, the Continue tutorial is not a tutorial on Racket or on how the Web works 21:48 jeapostrophe: it is a tutorial on using Racket to write Web apps assuming you know some Racket and some Web 21:48 Shambles_: jeapostrophe: parse-post is defined above the code that does most of the work, which I would expect in a bottom up language like Forth or Joy, but the other lower level functions are defined after, as I'd expect in most top down languages. 21:49 Shambles_: jeapostrophe: You can do it either way, I understand, but having it mixed makes for a lot of scrolling. 21:49 jeapostrophe: i don't understand what you mean... 21:50 Shambles_: jeapostrophe: The beginner tutorial directs you to that, and a huge textbook that covers mostly material I already know (and would really like to avoid having to read something that bulky to pick up the other things). Since I wasn't going to read that textbook, this is what I went to. 21:51 jeapostrophe: Re: order --- the first example has start, then can-parse-post?, then parse-post, then render-blog-page... and you expect it to be what order? 21:51 Shambles_: jeapostrophe: I did learn some Racket-relevant things, like the different ways of defining things locally. I got to see a practical use of call/cc. Still, it'd be nice to have a tutorial that basically started off from "so, you know what variables and functions are, and you understand the basics like basic mathematics and assigment, but you don't know about Scheme-style macros and continuations " 21:52 jeapostrophe: that could be interesting 21:52 Shambles_: jeapostrophe: I'd expect the 'variables' to be defined first, as they are, then start (the 'main' function) to come next, then the bulk of the code, then the subroutines it uses. Granted, that's top down bias. Bottom up would be fine too. 21:53 jeapostrophe: mmm, okay 21:54 Shambles_: jeapostrophe: I was hoping that was what these tutorials would cover, since, while I'm interested in graphics, I find the 'pict' system awkward, and not very compatible (appears to be no ties to SVG which would have made it more usable), and I'm quite interested in writing regular GUI or fullscreen applications, and ratty scripts to do things like manipulate text files and directories 21:54 asumu: I don't see how SVG is relevant here. Picts can render to SVG. 21:55 asumu: Or virtually any backend that you want (as long as you code it---PDF, SVG, PS, and bitmaps exist). 21:55 Shambles_: and talk to COM to administer Windows machines (e.g. via WMI). I already know several other languages. Most of the basics aren't difficult for me, but the features in Scheme that don't exist in most languages are what I'm trying to master. 21:55 jeapostrophe: I think you would find reading through the Guide to be useful 21:55 asumu: It's true that a GUI tutorial is a missing gap. 21:56 Shambles_: asumu: Trying to build a picture using the pict system 'by hand' is pretty impractical. It appears to be vector based. Being able to import a SVG would have made it useful for things like icons and full vector games. 21:56 asumu: Shambles_: Why is it impractical? 21:56 jeapostrophe: asumu: the GUI manual starts with a long example 21:56 jeapostrophe: Shambles_: I suggest you read the Guide for "racket-specific stuff" and the first chapter of the GUI manual for a little intro to that 21:57 Shambles_: asumu: Let's say I want to draw Mario, doing his 3 frame walking animation (basic, practical, real world game stuff). You want to do this by layering circles and whatnot on top of each other manually. I sure don't. I'd rather fire up Inkscape. Draw it, and import it. 21:57 asumu: jeapostrophe: I know, but it's still a far cry from something like Continue but for GUIs. 21:57 jeapostrophe: asumu: ya, but it's something 21:58 jeapostrophe: Shambles_: An SVG import would really be a full implementation of SVG, which is a pretty big thing. It's on my list, but not near the top 21:58 jeapostrophe: Shambles_: importing raster graphics is really simple though... (bitmap file) 21:59 Shambles_: jeapostrophe: I'd used the guide as a 'friendlier' reference, but it didn't seem to be structured for teaching, except maybe teaching a certain feature after you've already gone through some tutorials. I suspect Realm of Racket may fill the need for a tutorial but right now I was going down the path that seemed to be provided. The basics (the pict tutorial), which directs you to How to Design Programs and Continue 21:59 Shambles_: Which directs you to "More" (systems programming, which actually appears to be more web programming rather than what I'd think of as systems programming, like making compilers, or at least doing admin scripts). 22:00 jeapostrophe: Shambles_: the Guide is very much supposed to be a tutorial once you know the basics of programming 22:00 Shambles_: jeapostrophe: I'd asked before and was told SVG import didn't exist yet. I can appreciate it's not a small task. I brought it up since asumu asked why I thought using 'pict' for such things was impractical. 22:01 jeapostrophe: Shambles_: making a network server is a systems problem, not a web problem, so the More tutorial is definitely about "systems" software 22:01 Shambles_: I'd find it impractical for much the same reason I'd find making pictures by coding them with putpixel, or using GIMP's scripting interface (only) would be. 22:01 asumu: Picts are far more high-level than either of those. 22:02 asumu: That said, I agree that you won't get someone who uses Inkscape to convert to it. 22:02 Shambles_: asumu: I have no doubt it's higher level than putpixel, but GIMP's scripting interface, really? It has shape primitives, vectors, and lots of transformations. It actually seems very similar, only it's raster rather than vector. 22:02 asumu: But that's not really its target audience. 22:04 asumu: Shambles_: Core picts, maybe. However, libraries for picts approach the power of things like TikZ, which is very high-level. 22:04 Shambles_: asumu: It may not be the target audience. I was just answering your question as to why it wasn't practical for me. Even if I was making, say, graphs, I'd find it hard to work with, since it's too low level, and there's no import for SVG or Flash. 22:04 asumu: There's a graphing library. 22:04 asumu: That is built on picts. 22:04 asumu: (or rather, racket/draw) 22:05 asumu: So it's really a library you can build on top of. 22:05 jeapostrophe: The pict and racket/draw libraries are basically just Cairo, which pict being a delayed series of calls 22:05 Shambles_: asumu: A graphing library would be fine for those tasks, yes, and would be what I'd likely use. That, or just try to throw things at Dia, Gnuplot, or Graphvis. 22:06 Shambles_: I'm kind of surprised. I thought Cairo was pretty heavily tied to SVG. I haven't messed with it but I know Inkscape uses it as its back end. I think it may be what Firefox uses for handling vector graphics too. 22:06 Shambles_: The surprise being there wasn't something akin to 'load a SVG'. 22:07 jeapostrophe: Ya, there isn't. 22:07 jeapostrophe: cairo is a drawing API like what SVG is based on 22:07 jeapostrophe: but librsvg and cairo are separate 22:08 Shambles_: I guess I'll keep trying to wade though these tutorials. Someday I may need to know how to make a scripted website. I'm a bit uneasy 'skipping around', and not having something that "all Racket programmers should know this stuff" thing to go through. :P 22:08 jeapostrophe: That's the Guide 22:09 jeapostrophe: although it's a WIP (especially wrt continuations, for example) 22:09 Shambles_: I guess after I get through them I need to go through the macro stuff, because I know that's foreign, and probably stare at the call/cc stuff too. I can't think of anything else that's likely to be really alien coming from most languages. 22:09 Shambles_: The Guide is really big, and doesn't seem to have a 'order' to it. 22:10 Shambles_: As for basic understanding, is there anything other than continuations and macros I'd probably need to understand to grasp most of what I'd run into? 22:10 jeapostrophe: I would say you should read 1-7 in order and then the rest by interest 22:11 jeapostrophe: I don't think you need to understand macros or continuations to understand anything except implementations that use them 22:11 jeapostrophe: the whole point of both those is to create abstractions that don't require knowledge of implementations 22:11 jeapostrophe: so if you needed to know about them, we'd have failed 22:11 asumu: Structs, modules, and `for` macros are pretty much everywhere in Racket code (chap. 5, 6, 11). 22:11 jeapostrophe: that's why the web tutorial, for example, doesn't even really talk about continuations 22:12 jeapostrophe: because you can think about send/suspend on its own terms 22:13 Shambles_: Well, actually the reason I started messing with Racket was I ran into a situation where I actually *needed* deep recursion, that is, stack frames on the heap, not the stack. This pretty much only exists in functional languages (as far as I can tell). 22:13 (join) RacketCommitBot 22:13 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/q-egoQ 22:13 RacketCommitBot: [racket/master] Clarifying the use of the name of the argument in s/s/d - Jay McCarthy 22:13 RacketCommitBot: [racket/master] Better error messages, plus fix for the tag syntax - Jay McCarthy 22:13 (part) RacketCommitBot 22:14 Shambles_: I personally can't stand intrusive type systems that, aside from causing a lot of aggravation trying to get things to compile, and usually being documented in a fashion that only mathematics graduate students would understand, aren't sufficient to fully verify programs. 22:14 jeapostrophe: Shambles_: that doesn't have to do with continuations; it sounds like you're referring to tail call optimization 22:15 Shambles_: Soooo that basically left me with languages like Forth and Lisp, and Lisp is pretty much the 'end of the road' language wise. If you want stack based execution, you can make a DSL. If you want something weirder like dataflow, you can make a DSL for that too. 22:15 (quit) bitonic: Ping timeout: 248 seconds 22:15 Shambles_: I'm getting older and don't feel like hopping languages forever, so I thought if I got though this I might be able to do whatever I felt like, in one language, from here out. 22:16 Shambles_: jeapostrophe: I never said it had anything to do with continuations. I was quite explicit. I needed a /large/ call stack. Deep recursion. The kind of thing that makes C, C++, and Python crash, or forces you to demand a huge stack permanently. 22:17 jeapostrophe: Sorry, i thought you were responding to my earlier comment 22:17 jeapostrophe: I don't think thinking about frames on the stack vs heap is helpful 22:17 Shambles_: jeapostrophe: I was trying to parse a big tree. And while I got pretty far by manually managing a stack, the code was hideous. That lead me to consider a language deep recursion wouldn't be a problem in. 22:17 jeapostrophe: "deep recursion" is typically really about tail call optimization 22:17 Shambles_: jeapostrophe: Oh it's quite helpful. If you don't do it on the heap, you get stack overflow, since it'll be fixed size. 22:18 jeapostrophe: you can srbrk and grow the stack region 22:18 Shambles_: jeapostrophe: No, tail call position doesn't help you traverse large trees, since you can't 'go back' to where you were. 22:18 Shambles_: tail call position is just a glorfied loop, and those are easy to write in most anything. 22:18 jeapostrophe: ya 22:19 Shambles_: By deep recursion I mean "I need a @#$*ton of stack frames, and I don't feel like managing them myself". 22:20 jeapostrophe: any language that doesn't actually provide a function call abstraction is just broken as far as I'm concerned, and what you're talking about means the language doesn't abstract functions 22:21 Shambles_: jeapostrophe: Well... I guess that depends on what you mean. Python has lambdas, for instance, and generators. There's no call/cc though, and the stack is fixed size. C and C++ have pointers which you can aim at both functions and data. They still have a fixed stack. While you could get them to do the same tasks, believe me, the code doesn't look pleasant at times. 22:22 jeapostrophe: If you can only make a finite number of function calls based on the language (vs the machine) then the language doesn't provide function calls as an abstraction... the implementation is exposed 22:22 Shambles_: jeapostrophe: Actually, I was doing this in Python, and it was the first time anything I'd written *had to be* ugly. That, or I had to make the stack huge, and hope it didn't fail on unknown hardware/OS combinations. 22:23 Shambles_: jeapostrophe: Well, yes, the implementation is exposed. This could be argued to be a good thing, except for the fixed stack size. You can do really disturbing, but occasionally useful, things by directly screwing with stack frames in Python. Most debugging tools work that way, as do things like the Design by Contract modules (which, sadly, aren't standard). 22:24 Shambles_: jeapostrophe: I don't think anything but (predominantly; yes, I know Lisps and OCamel aren't 'pure') functional languages tend to allow you to ignore the implementation all the time. 22:43 (join) jonrafkind 22:43 (quit) jonrafkind: Changing host 22:43 (join) jonrafkind 22:44 (quit) jeapostrophe: Ping timeout: 252 seconds 22:55 (quit) dnolen: Quit: ERC Version 5.3 (IRC client for Emacs) 23:05 (join) bitonic 23:08 (join) RacketCommitBot 23:08 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/6Srz_w 23:08 RacketCommitBot: [racket/master] adjust struct/c so that it just expands into struct/dc - Robby Findler 23:08 (part) RacketCommitBot 23:08 (quit) jhemann_: Ping timeout: 245 seconds 23:10 (quit) gridaphobe: Remote host closed the connection 23:11 (quit) kvda: Quit: Computer has gone to sleep. 23:20 asumu: sizz: moving this from #scheme. re: cheatsheet, that's an interesting idea. 23:20 asumu: Do you think it helps more than documentation? 23:27 (join) jeapostrophe 23:27 (quit) jeapostrophe: Changing host 23:27 (join) jeapostrophe 23:28 sizz: Not initially; I think it'll be best to read e.g. HtDP and the Racket Guide first. But cheatsheets are useful once you reach an intermediate stage i.e. after you know the 'big picture' stuff, but before you have memorized all the details. 23:29 ashish: hi 23:29 ashish: Anyone aware of any from-scratch article/explanation about continuations in Scheme? 23:31 jeapostrophe: ashish: you could read the continuation chapters of PLAI 23:31 ashish: PLAI? 23:31 jeapostrophe: just google PLAI, it's the first hit 23:32 jeapostrophe: Programming Languages: Applications and Interpretation 23:32 (join) ambrosebs 23:32 ashish: thanks! 23:32 jeapostrophe: np 23:34 (quit) masm: Quit: Leaving. 23:36 (quit) jeapostrophe: Ping timeout: 244 seconds 23:37 (join) random_malice 23:39 (quit) getpwnam: Ping timeout: 255 seconds 23:42 (quit) mithos28: Quit: mithos28 23:46 (quit) random_malice: Ping timeout: 265 seconds 23:48 (join) sizz 23:52 (quit) sizz: Ping timeout: 248 seconds 23:53 (join) sizz