00:01 Qaxz: I figure that is the intention, it hasn't yet warmed up on me. 00:01 Qaxz: http://codepad.org/AuWjx906 now, ths, this makes sense. 00:02 Qaxz: Do note how my definition of compose does indeed accept functions which consume and return multiple values. 00:02 asumu: AlbireoX: Implementing a totally new language just because you dont' like one language feature is a waste. 00:02 asumu: And it's why there are so many bad languages. 00:02 asumu: Every time you do that, you re-invent 50 other features. 00:02 Qaxz: rudybot, eval (compose) 00:02 rudybot: Qaxz: your sandbox is ready 00:02 rudybot: Qaxz: ; Value: # 00:03 Qaxz: I knew I could count on you. 00:03 asumu: Like lexical scope, parsing, compiler optimizations, and so on. 00:03 Qaxz: rudybot, eval (eq? value (compose)) 00:03 rudybot: Qaxz: error: reference to an identifier before its definition: value in module: 'program 00:03 Qaxz: rudybot, eval (eq? values (compose)) 00:03 rudybot: Qaxz: ; Value: #t 00:03 Qaxz: My mistakes 00:05 jamessan: Qaxz: this section should help explain what you were seeing http://book.realworldhaskell.org/read/defining-types-streamlining-functions.html#deftypes.offside 00:05 rudybot: http://tinyurl.com/ca6y7t7 00:10 AlbireoX: asumu: Doesn't have to be totally new 00:10 AlbireoX: Fork 00:11 Qaxz: My name starts with a Q and has an x in it 00:11 Qaxz: Look at me being trendy. 00:11 Qaxz: AlbireoX, well, that's a lot of effort for something you an do with a macro right? 00:11 asumu: AlbireoX: Why do that when, with a macro system, you can just do that *within* the language? 00:11 asumu: Also, now you have two mutually incompatible languages. 00:11 asumu: I can't link my old code written with Python with Python-fork. 00:12 Qaxz: asumu, you know what I dislike 00:12 asumu: (or at least, there's not obvious way to do this) 00:12 Qaxz: THat the ... in syntax case and syntax rules is not a user defined identifier 00:12 Qaxz: As in say 00:12 Qaxz: (let loop ((x 3) (y 3)) ...) 00:12 Qaxz: you choose the name for loop 00:12 Qaxz: instead of it being a fixed thing 00:12 Qaxz: Why can't you (syntax-rules ... () ) 00:12 Qaxz: hmm 00:12 Qaxz: think about it 00:13 Qaxz: it would solve awkward things like (... ...) 00:13 (quit) veer: Quit: Leaving 00:13 Qaxz: You'd just use ...-inner for the inner epilipses or something, you know I'm right. 00:14 jonrafkind: ... is an identifier 00:15 jonrafkind: (require (rename-in racket/base [... my-ellipses-thing])) 00:15 jonrafkind: (... ...) would be required no matter what you named the identifier 00:15 Qaxz: No 00:15 Qaxz: I mean 00:15 offby1: rudybot: (define ... 'dotz) 00:15 rudybot: *offby1: your sandbox is ready 00:15 rudybot: *offby1: Done. 00:15 offby1: rudybot: ... 00:15 rudybot: *offby1: eh? Try "rudybot: help". 00:15 Qaxz: THat you have to name it in each individual syntax-rules 00:15 offby1: rudybot: eval ... 00:15 rudybot: *offby1: ; Value: dotz 00:15 Qaxz: Like ehh 00:16 Qaxz: If you want a macro to expand to another macro 00:16 jonrafkind: you are trying to get around the (... ...) right? 00:17 offby1: rudybot: ((... ...) "now what") 00:17 rudybot: *offby1: ; Value: "now what" 00:19 mithos28: Qaxz: Read http://barzilay.org/misc/stxparam.pdf . The solution you propose has just as many problems 00:19 Qaxz: You can do like (define-syntax define-syntax-rule (syntax-rules ... () ((define-syntax-rule name epilipses (keywords ...) (pattern ...) (body ...)) (define-syntax name (syntax-rules epilipses (keywords ...) ((name pattern ...) (body ...)))) 00:21 Qaxz: mithos28, I'm not sure how it relates to my problem. 00:22 mithos28: you want to introduce explicit names for sub forms of the macro right? 00:22 mithos28: that paper explains the problems introduced by that mechanism 00:27 Qaxz: No, I don't want to do that. 00:27 Qaxz: Like 00:28 Qaxz: the symbol '...' it has a special meaning in syntax rules and syntax case right? 00:28 Qaxz: The identifier, it doesn't capture as ordinarily as other arbitrary identifiers like say foo and bar do. 00:28 mithos28: yes it does 00:29 Qaxz: Quite, so, you have a syntax like (syntax-rules () ((let ((name value) ...) body ...) ((lambda (name ....) body ...) value ...))) 00:30 Qaxz: Basically, all I want is for this to become (syntax-rules ... () ((let ((name value) ...) body ...) ((lambda (name ....) body ...) value ...))) 00:30 Qaxz: Where this would be identical to say (syntax-rules carwash () ((let ((name value) carwash) body carwash) ((lambda (name carwash) body carwash) value carwash))) 00:30 mithos28: which is explicitly naming … as your macro subform for repitition 00:31 Qaxz: As in, you can define for every syntax rule individually what the idenfier is which stands for your epilipses 00:31 Qaxz: Yeah 00:31 Qaxz: Basically. 00:31 mithos28: which is exactly why I told you to read the paper 00:31 Qaxz: I'm not sure which part of the paper even addreses this. 00:31 mithos28: also you are missing the fact that syntax-rules is not a core form 00:32 mithos28: and that syntax or as it is more commonly written #' uses the binding of … specially 00:34 Qaxz: Yes, so you have to in that case define your epilipses in both syntax-case and in syntax I suppose. 00:48 (quit) Qaxz: Ping timeout: 255 seconds 01:00 AlbireoX: Then that's not coding in racket 01:00 AlbireoX: that's in some weird language 01:00 AlbireoX: That's the problem 01:01 AlbireoX: Code samples aren't consistent ampngst people 01:01 AlbireoX: Therefore not as good support 01:34 (join) veer 01:44 (quit) yoklov: Quit: Leaving. 02:08 (quit) dnolen: Quit: dnolen 02:51 (join) karswell 02:51 (quit) jonrafkind: Ping timeout: 240 seconds 03:16 (quit) mithos28: Quit: mithos28 03:17 (quit) Shviller: Read error: Connection reset by peer 03:18 (join) Shviller 03:18 Shviller: Bah, Miranda crashed. 03:24 tauntaun: Shviller: hasn't that long been superseded by Haskell? 03:25 Shviller: tauntaun: I meant the IM client. That message was meant for a different channel, sorry for the non sequetur. :) 03:29 (join) malkomalko 03:36 (quit) malkomalko: Remote host closed the connection 03:38 (join) Blkt 03:41 (join) Shvillr_ 03:41 (quit) Shvillr_: Read error: Connection reset by peer 03:42 (join) Shvillr_ 03:42 (quit) Shviller: Disconnected by services 03:42 (nick) Shvillr_ -> Shviller 04:44 (join) sindoc 05:12 (join) masm 05:36 Blkt: good morning everyone 05:39 noelw: Yo dawg 05:41 (join) keenbug 05:56 (quit) wtetzner: Remote host closed the connection 06:05 (quit) Shvillr: Quit: bye 06:07 (join) Shvillr 06:09 (join) sindoc1 06:09 (quit) sindoc: Read error: Connection reset by peer 07:02 (nick) chaozzbubi -> ChaozZBubi 07:20 (join) sindoc 07:20 (quit) sindoc1: Read error: Connection reset by peer 07:21 (part) sindoc 07:24 (quit) masm: Quit: Leaving. 07:25 (nick) ChaozZBubi -> chaozzbubi 07:52 (join) acarrico 08:05 (quit) karswell: Ping timeout: 252 seconds 08:29 (join) sindoc 08:35 (quit) sindoc: Ping timeout: 248 seconds 08:37 (quit) keenbug: Ping timeout: 248 seconds 08:38 (join) sindoc 08:53 (join) keenbug 09:36 (quit) keenbug: Ping timeout: 244 seconds 09:42 (join) EmmanuelOga 09:42 (join) anRch 10:09 (join) karswell 10:18 (quit) snorble: Ping timeout: 240 seconds 10:47 (join) MayDaniel 10:56 (nick) chaozzbubi -> ChaozZBubi 11:05 (quit) MayDaniel: Read error: Connection reset by peer 11:17 (join) mithos28 11:18 (quit) anRch: Quit: anRch 11:21 (quit) mithos28: Client Quit 11:24 (quit) veer: Quit: Leaving 12:08 (join) sindoc1 12:08 (quit) sindoc: Read error: Connection reset by peer 12:24 (quit) Blkt: Quit: cya 12:24 (part) sindoc1 12:24 (join) malkomalko 12:27 (join) anRch 12:43 (quit) anRch: Ping timeout: 240 seconds 12:45 (join) freakazoid 12:50 (join) anRch 12:55 (quit) anRch: Client Quit 13:07 (join) anRch 13:11 (quit) anRch: Ping timeout: 240 seconds 13:15 (join) anRch 13:52 (join) sindoc 14:15 (join) jonrafkind 14:16 (join) Qaxz 14:17 (join) Nanakhiel 14:19 (quit) anRch: Ping timeout: 248 seconds 14:21 (quit) Qaxz: Ping timeout: 248 seconds 14:24 (quit) Nanakhiel: Ping timeout: 252 seconds 14:36 (join) sindoc1 14:36 (quit) sindoc: Read error: Connection reset by peer 14:40 (join) dzhus 14:52 (join) jao 15:09 tauntaun: Anyone want to critique a couple of lines of code? At https://gist.github.com/1511569 I use syntax-rules to implement list comprehension ('for'). Feedback appreciated. 15:14 (quit) malkomalko: Remote host closed the connection 15:28 (join) yoklov 15:49 tonyg: tauntaun: it needs some examples :) 15:49 tonyg: tauntaun: also, why "(val ...)" rather than "val"? 15:54 tauntaun: tonyg: thanks for responding. I'll add examples right now. 15:55 tauntaun: tonyg: done. 15:55 tauntaun: (just reload the gist page) 15:55 tonyg: cool, looks good 15:55 tonyg: so why the (val ...)? 15:58 tauntaun: tonyg: in order to enforce the syntax. 15:58 tauntaun: How else might I require a list after a variable? 16:04 (join) mceier 16:06 tonyg: tauntaun: you can't 16:07 tonyg: tauntaun: the position where you have (val ...) is syntactically an expression 16:07 tonyg: tauntaun: in your examples, you have '(1 2 3) in that position, which is sugar for (quote (1 2 3)) 16:08 tonyg: tauntaun: if you don't change "(val ...)" to "val", your syntax rules out for example (let ((xs '(1 2 3))) (for ((x xs)) (* x x))) 16:09 asumu: tauntaun: Combined with tonyg's suggestion, you can require "list-ness" dynamically. 16:09 asumu: s/require/enforce/ 16:09 (join) masm 16:31 (join) gcentauri 16:40 (quit) sindoc1: Quit: Leaving. 16:48 (join) samth 17:02 (join) snorble 17:06 (join) sindoc 17:11 (quit) masm: Quit: Leaving. 17:20 (join) malkomalko 17:26 (quit) malkomalko: Remote host closed the connection 17:27 (quit) gcentauri: Remote host closed the connection 17:39 (join) anRch 17:40 (join) MayDaniel 17:48 (nick) ChaozZBubi -> chaozzbubi 18:01 (quit) mceier: Quit: leaving 18:04 (quit) MayDaniel: Read error: Connection reset by peer 18:24 (quit) freakazoid: Quit: Computer has gone to sleep. 18:29 (quit) samth: Read error: Operation timed out 18:37 (quit) anRch: Quit: anRch 18:49 (join) freakazoid 18:54 (quit) jonrafkind: Read error: Operation timed out 19:05 (quit) yoklov: Quit: Leaving. 19:06 (join) yoklov 19:07 (part) sindoc 19:18 yoklov: Hey, the docs for the racket/class say "A generic can be used instead of a method name to avoid the cost of relocating a method by name within a class". How significant is that cost? Significant enough so that i should use them often? 19:19 yoklov: err, *the docs for racket/class 19:21 yoklov: or is it a "only if it becomes a problem" sort of thing 19:38 tauntaun: asumu & tonyg: sorry for the delay. I've revised per your suggestions, giving three different versions. Again, I'd be grateful if you commented on it: https://gist.github.com/1512503. 19:39 tauntaun: And this time I'm not trying to do other things simultaneously, so I should be more responive :) 19:39 tauntaun: responsive* 19:44 (quit) dzhus: Remote host closed the connection 19:50 (join) RPR 19:51 RPR: There is coding ... and then there is coding to Joe Satriani. 20:01 yoklov: there is coding … and then there is coding to Daft Punk 20:01 yoklov: :p 20:22 tauntaun: There is coding ... and then there is coding to the sweet sounds of a hundred chipmunks being slaughtered in a Satanic ritual next door. 20:23 (quit) Oxryly: Quit: leaving 20:26 (join) samth 20:28 yoklov: sounds metal as heck dude \m/ 20:30 tauntaun: Don't you mean \w/ ? 20:35 yoklov: ? its like the devil horn fingers 20:37 tauntaun: Yes, you're knuckles have to line up. 20:37 tauntaun groans 20:37 tauntaun: you're -> your 20:38 jamessan: which is why it's an m 20:38 yoklov: its just pointer and pinky 20:38 yoklov: not thumb and pinky 20:38 yoklov: if thats not what its supposed to be then i dont know 21:10 (join) mithos28 21:25 (quit) mithos28: Quit: mithos28 21:27 tonyg: tauntaun: looks v good (the for macros). Only minor thing I'd change, aesthetic only, is instead of ". r" I'd use "..." 21:27 tonyg: e.g. ((v0 xs0) (v xs) ...) 21:28 tonyg: And I'm not even sure that's really any kind of improvment, so yeah 21:31 (join) mithos28 21:35 (quit) freakazoid: Quit: Computer has gone to sleep. 21:39 tauntaun: tonyg: thanks for checking it! 21:42 tauntaun: tonyg: but ... would require a bit more verbosity, no? 21:43 tauntaun: as in ((v1 xs1) (v2 xs2) ...), to specify "at least one". 21:43 tonyg: tauntaun: yeah, probably. it might be a wee bit easier to read, though. i don't know; and ymmv! 21:44 tauntaun: tonyg: ok, I can't keep up with all the latest acronyms :0 21:44 tauntaun: ymmv? 21:45 mithos28: your mileage? may vary 21:47 tauntaun throws up his hands. 21:47 tauntaun: mithos28: what does that *mean*? 21:47 tauntaun looks up in stupid urban dictionary 21:47 mithos28: that you may not get the same effect 21:54 tonyg: :-) 22:03 (join) RPR` 22:05 (quit) RPR: Ping timeout: 240 seconds 22:32 (quit) mithos28: Quit: mithos28 22:40 (quit) noelw: Quit: noelw 22:45 (quit) samth: Ping timeout: 252 seconds 22:49 (join) freakazoid 22:51 (quit) jao: Ping timeout: 240 seconds 22:51 (join) jonrafkind 22:52 (quit) freakazoid: Client Quit 23:01 (join) veer 23:13 (join) yin 23:55 (quit) RPR`: Ping timeout: 240 seconds