00:00 (quit) mithos28: Quit: mithos28 00:50 (join) Sgeo 00:51 Sgeo: Which is generally used more/preferred? swindle/setf, or srfi-17? 00:51 (join) PLT_Notify 00:51 PLT_Notify: racket: master Stephen Bloch * 79778e0 (3 files in 3 dirs): Added some illegal-argument tests to map-image.rkt. ... - http://bit.ly/mreQ0S 00:51 (part) PLT_Notify 01:07 eli: Sgeo: They're pretty different -- the swindle thing is like CL's `setf', and does the dispatch syntactically. As in CL, it's faster (no runtime lookup), but more limited (can only be used with syntactically known identifiers). 01:28 (join) completenoob 01:28 completenoob: what does { } mean? 01:29 jonrafkind: nothing special, just alternate syntax for () 01:29 jonrafkind: rudybot: {+ 1 1} 01:29 rudybot: jonrafkind: your sandbox is ready 01:29 rudybot: jonrafkind: ; Value: 2 01:29 completenoob: can i redefine it? 01:29 jonrafkind: you want to redefine what {+ 1 1} means? using {} as an application? 01:30 completenoob: i mean just using syntax-case or something 01:30 jonrafkind: are you saying you have macro where one of the sub-expressions uses {} and you want to detect that? 01:30 completenoob: nope I want to redefine what expressions inside of { } mean 01:31 completenoob: although 01:31 completenoob: can i detect it? 01:31 jonrafkind: you can but its not trivial, you to inspect the syntax object, detect that it uses {} using (syntax-property expr 'paren-shape) and then transform it 01:31 completenoob: whoa 01:32 completenoob: what about the first case, where I just want to redefine the syntax to look for a { } pattern and transform the code between them? 01:32 jonrafkind: rudybot: (syntax-property (with-input-from-string "{1}" read-syntax) 'paren-shape) 01:32 rudybot: jonrafkind: ; Value: #\{ 01:32 jonrafkind: rudybot: (syntax-property (with-input-from-string "(1)" read-syntax) 'paren-shape) 01:32 rudybot: jonrafkind: ; Value: #f 01:33 jonrafkind: so just run that over each syntax object that you get in your macro 01:33 completenoob: regular parens are false? 01:33 jonrafkind: (syntax-case expr () [(_ stuff ...) (map (lambda (s) (syntax-property ... s ...)) (syntax->list #'(stuff ...))) 01:33 jonrafkind: right, regular parens are #f 01:34 jonrafkind: brackets are #\[, and { are #\{ 01:37 completenoob: I'm kind of new to Scheme in general 01:37 completenoob: is there a way to introduce new bindings with a macro? 01:37 completenoob: (by 'kind of new' i mean 'an hour ago') 01:39 jonrafkind: yes 01:39 jonrafkind: this stuff is sort of advanced for someone new to it.. 01:39 jonrafkind: but anyway (define-syntax-rule (foo name value) (define name value)) 01:39 jonrafkind: (foo x 2) is the same as (define x 2) 01:40 completenoob: (I'm not new to Lisp, just Scheme) 01:40 jonrafkind: oh ok 01:40 jonrafkind: yes, in scheme macros are hygienic by default, i gather in lisp thats not the case 01:41 completenoob: right, in Lisp you can make a version of "when" that lexically binds the identifier 'it' to the result of the test, expression, for instance 01:41 jonrafkind: so using the above example, if you had (define-syntax-rule (foo value) (define x value)), that would define a name 'x' that no one can use because its defined by the macro 01:41 jonrafkind: which is why i had to pass the 'name' variable in 01:41 jonrafkind: yes, that sort of binding 'it' is unhygienic, which you can do in scheme as well 01:42 jonrafkind: (with-syntax ([it (datum->syntax stx 'it stx)]) #'(... it ...)) 01:42 jonrafkind: datum->syntax imbues the syntax object with whatever lexical properties you want 01:42 jonrafkind: actually maybe using syntax-local-introduce is better, i forget.. 01:43 eli: Not. 01:43 jonrafkind: how is it any different? 01:44 completenoob: I noticed that the "Swindle" language has a 'defmacro' that is supposedly totally unhygienic, but I tried using it and it didn't seem to work the way I was used to... 01:44 (quit) dnolen: Quit: dnolen 01:44 jonrafkind: I suppose if the source expression has compltely different lexical context than the current macro usage then it might matter 01:44 eli: To break hygiene, use this: http://blog.racket-lang.org/2008/02/dirty-looking-hygiene.html 01:45 jonrafkind: 404 01:45 completenoob: worked for me... 01:45 jonrafkind: oh now it works, very wierd 01:45 eli: completenoob: the `defmacro' in Swindle is almost the same as the `mzlib/defmacro' -- they're both pretty bad. 01:46 eli: jonrafkind: Some blogspot problem. 01:46 completenoob: are [] and {} a part of the Scheme standard or are they just Racket? 01:47 eli: completenoob: In R6RS []s are also specified to behave the same as ()s, not {}s though. 01:47 completenoob: hmm... 01:48 jonrafkind: the last paragraph in that blogpost refers to 'if' when it looks like it should refer to 'if*' 01:48 jonrafkind: im confused.. 01:49 completenoob: what's the most idiomatic way to do partial application? just writing a lambda inline? 01:49 jonrafkind: oh its simalteanously talking about if* -- the implementation, and 'if' the rename provided thing from the implementing module 01:50 jonrafkind: damn eli, thats the most confusing thing ive ever seen 01:50 jonrafkind: completenoob, theres a curry library if you want 01:51 jonrafkind: http://docs.racket-lang.org/reference/procedures.html?q=curry#(def._((lib._racket/function..rkt)._curry)) 01:51 eli: jonrafkind: No, I think that it's a typo. 01:51 jonrafkind: oh ok 01:52 eli: Uh, actually maybe you're right, and I did talk about the provided renamed `if', since the point was to make an arc-like language. 01:52 completenoob: the example in that article was notreally satisfactory. I WANT 'it' to be lexical. 01:52 eli: completenoob: It is. 01:53 completenoob: at the end of the article he claims it's global, so any lexical definition above the if will take priority 01:53 jonrafkind: if*'s `it' is in an outer scope compared to the let-bound `it' 01:53 completenoob: hmmm 01:53 completenoob: it's a minor issue for sure 01:53 jonrafkind: I suppose if you really want to overwrite the scope of `it' no matter what then use syntax-local-introduce or datum->syntax, but in general using syntax-parameterize is probably the 'right' solution 01:53 eli: completenoob: `it' is globally bound to a special kind of macro, which is rebound by `if*'s. 01:54 completenoob: yeah now that I'm sort of trying it on in my head, the hygienic solution does feel... better. 01:55 eli: completenoob: If you're just coming from Lisp, then this might work out better: http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html 01:56 completenoob: I'm getting the image of "CL = buddha is fat with hairy armpits and laughs, Scheme = buddha is thin and serious" 01:56 eli: completenoob: You've probably spent time on c.l.l 01:56 eli just hates all of these vague analogies 01:57 completenoob: haha 01:57 jonrafkind: supposedly racket is sufficiently different from scheme that you should just call it racket 01:57 eli: Things always go downhill when they're pulled out. 01:57 jonrafkind: namely, (equal? (- Racket Scheme) (- Scheme Lisp)) => #t 01:58 eli: (I've seen so many arguments on c.l.l degrade to discussions about latin.) 01:58 completenoob: hmmm, then Racket might be a good starting place 01:59 completenoob: my problem with them is you say "I have an idea for an object system what do you thi-" "CLOS is superior." 01:59 jonrafkind: ive never felt a need to modify my object protocol, do people do that in CLOS a lot? 01:59 completenoob: well they use the MOP to change the object protocol sometimes 01:59 completenoob: but see you said "my object protocol" 01:59 eli: completenoob: (FWIW, that budha argument is usually used when comparing CL the standard to Scheme the standard; if you consider racket specifically, then it's way larger than CL.) 02:00 completenoob: not "the object protocol" 02:00 jonrafkind: sorry, i mean the object protocol 02:00 eli: jonrafkind: IME, rarely -- as much as I love the whole concept... 02:00 completenoob: well, I've got an idea for an object system :p 02:00 eli: completenoob: CLOS has a bunch of big problems, idolizing it is ... questionable, IMO. 02:01 jonrafkind: I suppose synchronous method dispatch is sort of nice sometimes 02:01 eli: What's that? 02:01 completenoob: eli: I ahven't used it extensively. If it really is the best thing ever, I'll be glad to reinvent it and then accept it. I like to learn by reinventing 02:02 jonrafkind: where all the arguments are checked to find the most specific method, instead of just checking the first one 02:02 eli: jonrafkind: I've never heard that name for what you're talking about... 02:02 jonrafkind: i read it in some OO papers 02:02 eli: completenoob: I have. I worked hard for my opinion... 02:03 (join) Nican_ 02:03 jonrafkind: anyway my eyes are bleeding, cya 02:03 eli: jonrafkind: So early? 02:03 completenoob: eli: good for you! :D I mean, I'd still be using C++/Java if I didn't have this attitude, right? 02:04 eli: completenoob: Yeah, well, looking at C++ makes everything looks ideal... 02:04 (quit) chemuduguntar: Remote host closed the connection 02:05 eli: completenoob: BTW, I made swindle since I loved the idea so much... But some of the problems are impossible to iron out. 02:05 completenoob: eli: yep, but it wasn't until I accidentally reinvented a bizarre smalltalk-lisp hybrid with YAML files that I decided to abandon it 02:05 eli: Abandon C++? 02:06 completenoob: yeah 02:06 completenoob: not completely, but as the language I think in 02:06 (quit) Nican: Ping timeout: 240 seconds 02:06 eli: Heh, in that case it does sound like a good case of someone who learns through his feet. 02:07 completenoob: so you made Swindle? 02:07 eli: Yes. 02:07 (quit) Nican_: Ping timeout: 240 seconds 02:07 (quit) jonrafkind: Ping timeout: 252 seconds 02:08 completenoob: cool! that's a lot of stuff in there. I didn't even realize that the lets didn't work the way yours do >.> 02:09 eli: You mean the extended `let' syntax? 02:09 completenoob: yeah 02:09 eli: Heh, I was just having fun playing with the freedom of making my own language... 02:09 completenoob: do you write in Swindle? 02:10 eli: Not any more. 02:10 eli: The CLOS problems make it too bad. 02:10 completenoob: what would you say are the biggest weaknesses of CLOS? 02:11 eli: The biggest problem IMO is that it inherently relies on side-effects when you add methods to generic functions. 02:12 eli: It's just a mess, and there's no way to guarantee any kind of safety. 02:12 eli: But of course CLOS advocates put that lack of safety on a shrine... 02:12 eli: (There's some quote on CLOS being for nice people and C++ for thieves, or something like that.) 02:13 completenoob: erik naggum? 02:13 eli: Yeah, he made it. 02:13 completenoob: well doesn't 'defun' have the same sort of problem? really any non-lexical definition is a side-effect. 02:13 eli: Yes, using a toplevel to develop code is bad in a similar way. 02:14 eli: Same way that `load' is much worse than using modules. 02:14 eli: But CLOS takes the whole thing to another level. 02:14 completenoob: but it's idiomatic in CL to use the toplevel for so much. That's one of the least attractive things abotu it to me 02:14 eli: It's not idiomatic to do that -- it's the only way to work in CL. 02:15 eli: And yes, there's a whole bunch of problem that that leads to... 02:15 completenoob: I tend to use 'labels' but then I haven't really written a whole lot of CL. 02:15 eli: This is a nice horror story: http://fare.livejournal.com/146698.html 02:15 completenoob: sweet 02:16 eli: `labels' won't help that much -- CL makes it too awkward to write large chunks of code this way. 02:17 completenoob: (I've written a lot more Lua than Lisp, btw.) 02:18 eli: (I have almost zero experience with it.) 02:20 completenoob: Lua is just an adorable little language... 02:20 eli: Can you specify some reasons that make it cuter than JS? 02:21 Sgeo: The other day (yesterday I think), I asked something about Racket, someone said that Racket isn't good for long-running programs where things get redefined. Can I have some more information about that, and pointers to Schemes where it's not a bad thing? 02:22 completenoob: metatables, which allow for programmable dispatch like CLOS, smaller language definition, unification of all data structures as associative arrays (which are optimized under the hood with a vector and hash part) 02:22 completenoob: also semi-continuations with coroutines 02:22 completenoob: (basically you could implement call/cc with something like 20 lines of code in the default implementation) 02:23 completenoob: the big win for Lua though is the C_API is very very easy to use 02:23 completenoob: (over JS or Python) 02:24 eli: completenoob: The first sounds like the usual complaint about the prototype classes, the second will probably be gone when JS gets continuations, and the third is probably the deal breaker... 02:24 eli: Sgeo: Racket should be fine with redefining stuff, provided that you know what you're doing... 02:25 Sgeo: Define "know what you're doing". What issues could I come across? 02:25 eli: What are you trying to do, exactly? 02:26 Sgeo: Want to use Racket as a substitute for Smalltalk, I guess 02:26 eli: (To clarify, "know what you're doing" holds in any language that allows runtime evaluation of new code.) 02:26 Sgeo: Ah 02:27 eli: What aspects of smalltalk do you need? 02:28 Sgeo: Not really "need", just thinking about. I think just the comfortable environment, the ability to modify things as it's running 02:29 eli: Sgeo: You mean a continuous REPL, right? 02:29 Sgeo: Yeah 02:29 Sgeo: Maybe the ability to connect to a REPL on a Racket process running remotely 02:29 eli: That's perfectly doable. 02:30 eli: Did you ask a question about it recently on SO? 02:30 completenoob: I forget, does JS have mutable strings? . 02:31 completenoob: (because one thing I think is neat about Lua is that it does not) 02:31 Sgeo: eli, no 02:31 eli: completenoob: I use them so rarely I don't even know... 02:32 eli: Sgeo: Then see this: http://stackoverflow.com/questions/5946380/racket-repl-over-tcp 02:32 Sgeo: ty 02:45 (join) leo2007 02:53 (quit) realitygrill: Quit: realitygrill 02:56 (join) hkBst 03:28 (join) Tabemasu 04:28 (part) Tabemasu 04:50 (join) Andrew_ 04:50 (nick) Andrew_ -> Guest97951 04:51 (join) Andrew2_ 04:51 (nick) Andrew2_ -> Andrew55 04:52 Andrew55: hi 04:53 Andrew55: I'm having a problem with regex, this line fails to return a result : (regexp-match* "[\\s]+" " ") 04:53 Andrew55: I think it might be a bug in the library 04:56 (quit) Guest97951: Ping timeout: 252 seconds 04:58 (quit) Andrew55: Ping timeout: 252 seconds 05:04 ohwow: ah 05:04 ohwow: he quit :( 05:56 (quit) Nightwolf: Ping timeout: 240 seconds 05:58 (join) Nightwolf 06:37 (join) Demosthenes 06:46 (join) masm 07:05 (quit) leo2007: Quit: rcirc on GNU Emacs 23.3.50.1 07:13 (quit) Demosthenes: Ping timeout: 276 seconds 07:14 (join) Demosthenes 07:15 (quit) masm: Ping timeout: 260 seconds 07:31 (join) masm 07:38 (join) leo2007 08:02 (quit) tildedave: Read error: Connection reset by peer 08:04 (quit) masm: Ping timeout: 252 seconds 08:13 (join) lucian 08:14 (quit) Nightwolf: Ping timeout: 240 seconds 08:15 (join) Nightwolf 08:26 (quit) Nightwolf: Ping timeout: 248 seconds 08:28 (join) MayDaniel 08:34 (quit) MayDaniel: Read error: Connection reset by peer 08:43 (quit) Demosthenes: Quit: leaving 09:05 (join) masm 09:39 (join) Nightwolf 10:26 (join) realitygrill 10:31 (quit) lucian: Remote host closed the connection 10:37 (quit) realitygrill: Read error: Connection reset by peer 10:37 (join) realitygrill 10:54 (join) PLT_Notify 10:54 PLT_Notify: racket: master Kevin Tew * c9c02f3 (2 files in 2 dirs): duplicate and cycle detection for places_deserialize_worker - http://bit.ly/jxYrVv 10:54 (part) PLT_Notify 10:56 (join) mithos28 11:09 (join) ckrailo 11:10 (join) jonrafkind 11:15 (join) lucian 11:17 lucian: is there a racket foundation/org or somesuch? i need to reference something in the racket docs in my dissertation and i'm not sure what entity to ref it to 11:18 jonrafkind: PLT 11:20 (join) jessopher 11:23 (join) anRch 11:28 lucian: jonrafkind: PLT foundation? thanks 11:28 jonrafkind: its not foundation, i forget what its supposd to be. Probably something like PLT Inc. 11:29 (nick) elliottcable -> ec|detached 11:29 bremner_: still called PLT Scheme Inc. according the web site 11:29 (join) dnolen 11:30 lucian: bremner_: i see. thanks 11:37 (quit) Sgeo: Read error: Connection reset by peer 11:39 (quit) realitygrill: Read error: Connection reset by peer 11:39 (join) realitygrill 11:40 lucian: btw if anyone is interested, i'm referencing racket's reader docs as an example of very nice lisp reader docs 11:43 (quit) realitygrill: Read error: Connection reset by peer 11:43 (join) realitygrill_ 11:53 (quit) anRch: Quit: anRch 11:53 (nick) samth_away -> samth 11:57 samth: lucian, if you need to cite Racket, see here: http://racket-lang.org/tr1 11:58 lucian: samth: does that go for racket's docs too? 11:59 (join) anRch 11:59 samth: yes 11:59 lucian: i see. thanks 11:59 samth: although if you're citing some specific bit of research, a citation to the relevant paper is appropriate 12:00 samth: that page has instructions on the right way to cite a specific section in the racket reference 12:01 samth: lucian, what's your dissertation on? 12:02 lucian: samth: building mobile applications directly from mobile devices 12:02 samth: cool 12:03 lucian: meh, it ended up being rather lame :) 12:03 lucian: think app inventor, on html&js and very simple 12:05 lucian: heh, 64 references 12:08 lucian: any ideas on articles treating exploratory programming? i think my markers might not be familiar with it 12:21 (quit) mithos28: Quit: mithos28 12:21 (quit) hkBst: Remote host closed the connection 12:29 (quit) anRch: Quit: anRch 12:38 (join) sstrickl 12:41 samth: hmm 12:42 samth: not sure 12:42 samth: might look at johnathan edwards 13:03 (quit) EM03: Quit: EM03 13:03 (quit) completenoob: Quit: Page closed 13:12 (join) Fare 13:15 (join) mithos28 13:24 (quit) sstrickl: Quit: sstrickl 13:24 (join) sstrickl 13:25 (join) EM03 13:25 (quit) EM03: Changing host 13:25 (join) EM03 13:47 (join) anRch 13:49 (join) PLT_Notify 13:49 PLT_Notify: racket: master Stephen Bloch * 7597d2c (1 files in 1 dirs): Fixed a typo that crashed the nightly build :-( - http://bit.ly/mdXpd6 13:49 (part) PLT_Notify 14:20 lucian: samth: dodged it in the end. thanks for all the help 14:21 samth: happy to help 14:21 samth: i spent a bunch of time on the bib for my dissertation, so i know the feeling 14:54 (quit) anRch: Quit: anRch 14:58 (quit) jessopher: Remote host closed the connection 14:58 (join) jessopher 15:01 (quit) jessopher: Remote host closed the connection 15:01 (join) jessopher 16:23 (quit) leo2007: Ping timeout: 260 seconds 16:32 (join) Sgeo 16:32 Sgeo: Racket's printf/format doesn't have an equivalent for Common Lisp's format's ~{ and ~}? 16:33 jonrafkind: nah 16:36 Sgeo: Um 16:36 Sgeo: Does Racket's Make Executable generally just include the Racket environment? 16:36 Sgeo: http://pastie.org/1894499 resulted in a 4.5 MB .exe 16:36 (join) tauntaun 16:39 Sgeo: And the version for distribution results in a .zip file, which contains a .exe and some .dlls 16:40 jonrafkind: yea 16:40 jonrafkind: the exe is the racket binary + some collects + your bytecode 16:41 Sgeo: collects? 16:41 jonrafkind: the racket libraries 16:41 jonrafkind: the directory that contains them is called 'collects' 16:41 jonrafkind: its a 'collection' of code 16:44 (join) yoklov 16:45 (join) yoklov1 16:45 (quit) yoklov: Read error: Connection reset by peer 16:54 (quit) jessopher: Ping timeout: 252 seconds 17:25 (quit) Sgeo: Ping timeout: 246 seconds 17:48 (quit) sstrickl: Quit: sstrickl 17:57 EM03: Hello everyone 18:03 (quit) yoklov1: Quit: Leaving. 18:11 (quit) dnolen: Ping timeout: 252 seconds 18:12 (quit) realitygrill_: Quit: realitygrill_ 18:12 (join) yoklov 18:18 (quit) Fare: Remote host closed the connection 18:29 (join) Fare 18:37 (quit) mithos28: Quit: mithos28 18:40 (quit) masm: *.net *.split 18:44 (join) masm 18:46 (join) mithos28 18:47 (quit) lucian: Remote host closed the connection 18:50 (join) lucian 18:51 (quit) mithos28: Client Quit 18:53 (quit) Fare: Quit: Leaving 19:13 (quit) masm: Quit: Leaving. 19:18 (quit) DT``: Ping timeout: 240 seconds 19:19 (join) DT`` 19:19 (join) dnolen 19:23 (nick) samth -> samth_away 19:25 (join) realitygrill 19:30 (quit) lucian: Remote host closed the connection 19:33 EM03: Documentation question: blog : (listof post?) Would this be legal syntax / some sort of definition or is that just the docs breaking down what the result of blog should be? 19:35 DT``: it's valid, it returns a contract that accepts a list of `post?'. 19:38 DT``: (if you're talking about the infix :, it's not legal syntax, but you can enforce types with contracts) 19:40 EM03: (struct post (title body)) 19:40 EM03: title : string? 19:40 EM03: body : string? 19:40 EM03: doing this returns errors 19:41 DT``: yes, I misunderstood the question. 19:42 EM03: http://docs.racket-lang.org/continue/index.html?q=file/gif 19:42 EM03: those examples in blue 19:42 EM03: what is the purpose just to show what you want ....or is that actual legal syntax 19:42 DT``: just to show what you want. 19:43 EM03: its almost like its being presented as legal syntax 19:43 DT``: I thought you were talking about `(listof post?)'. 19:43 EM03: well thats a blue example as well 19:43 EM03: and it looks like title and body should be a string but if that is not legal syntax how is the program as they are showing it doing just that? 19:45 DT``: well, there are contracts to enforce types on procedures (and constructors). 19:45 DT``: but no, the `x : t' thing is not legal. 19:46 EM03: I'm curious what the purpose was 19:46 EM03: it seems like its being presented as legal syntax 19:47 DT``: well, probably to just say that that should be a string. 19:47 EM03: hmm i guess so 19:47 EM03: but to a new user it easily looks like thats some sort of code to enforce it....which it should be enforced but if that is not doing it then yea it can be anything as is 19:49 DT``: those signatures are almost everywhere in the docs, they are there just to show the types. 19:49 DT``: runnable code never appears inside the blue boxes afaik. 19:49 EM03: thanks for the helpful note 19:49 EM03: I assumed so but then I was like ok maybe its trying to enforce it as a string here 20:03 (join) mithos28 20:10 (join) PLT_Notify 20:10 PLT_Notify: racket: master Eli Barzilay * 387b6c5 (3 files in 3 dirs): Added Mac OS X build for x86_64. ... - http://bit.ly/mcBFTt 20:10 (part) PLT_Notify 20:12 EM03: DT``: how long have you been using racket yourself? 20:14 DT``: dunno, 3 months? 20:16 (quit) ckrailo: Quit: Computer has gone to sleep. 20:22 (join) rpr 20:31 EM03: DT``: seems like most people have either used scheme for a very short time or a long time. I was on a campus today and the teacher was teaching scheme with MIT scheme using edwin .....racket probably would have been a better idea 20:33 (quit) jonrafkind: Ping timeout: 248 seconds 20:35 DT``: EM03, using SICP? if so, it was (IMHO) a good idea, since it has everything SICP requires built-in (e.g. cons-stream). of course, any Scheme{,-like} system would do too, but I'm of the idea that starting with a small Scheme with just conses, lists, symbols and basics will teach you better habits (to not abuse of features). 20:36 DT``: of course then you would move to something more complete when doing real-world stuff. 20:36 EM03: but i bet most of those people will never even find out about racket 20:37 DT``: if they'll get interested in Scheme, they surely will. 20:45 EM03: hopefully 20:48 EM03: some professors seem to teach scheme as a language that you will never use again after they are done with it in the class 20:52 DT``: well, it's not exactly as widespread as java or c#. 20:52 DT``: but it has the potential (just like, you know, any other language other than java and c#) 20:53 EM03: the non standard functional nature of the langauge makes picking it up much more difficult. 20:54 (quit) mithos28: Quit: mithos28 20:54 DT``: it all reduces to parens, EM03. there's CL for a non-strictly-functional-style Lisp. 20:56 (join) mithos28 21:05 (quit) mithos28: Quit: mithos28 21:23 bremner_: DT``: scheme/racket is hardly strictly function. Mutation is quite natural. 21:25 bremner_: but, I guess it is true that CL is even less strictly functional in style 21:26 bremner_: although that is just hearsay for me. 21:27 DT``: bremner_, FP in Scheme is natural enough that you can switch to immutable conses without having to rewrite *everything*. 21:27 DT``: but, of course, this is not haskell, we have set-*! 21:27 bremner_: so what is missing from CL that makes it harder? or is it just a culture thing? 21:28 DT``: I guess it's a culture thing, and CL's funcall. 21:28 bremner_: yeah, I guess haskell is my reference when people talk about purely functional languages (although of course it has unsafeLaunchMissiles) 21:29 bremner_: right, I guess lisp-2 makes it a bit more clunky, but it's surprising that makes such a difference 21:30 bremner_: I guess libraries can also make a big difference 21:30 DT``: well, compare: (λ (f) (λ (x) (f (f (f x))))) vs (λ (f) (λ (x) (funcall f (funcall f (funcal f x))))). 21:30 DT``: yeah, libraries too. 21:30 DT``: *funcall 21:50 (join) Sgeo 21:51 Sgeo: Does DrRacket not have any indication of the arguments for the function currently being typed in? 21:51 Sgeo: The way SLIME does for Common Lisp? 22:03 rpr: geiser does. geiser is slime for racket/guile. Its really pretty darn good. 22:11 Sgeo has been relying on LispBox and ClojureBox. I should probably just install a full emacs at this point 22:12 (quit) tauntaun: Quit: Ex-Chat 22:15 Sgeo: Does Racket have a way to distinguish between optional arguments that were provided with a value and optional arguments that weren't, the way CL does? 22:17 (join) Demosthenes 22:19 Demosthenes: yoklov: hey! i did it ;] 22:20 bremner_: Sgeo: maybe you want case-lambda? 22:20 Sgeo: That wouldn't work with keyword arguments 22:20 bremner_: nope. 22:21 yoklov: yeah? 22:22 yoklov: what'd you end up doing? 22:23 Sgeo: Well, Practical Common Lisp has an example where if you provide some searching function with a true or false, then it will look for records that have that property, but if you don't provide it, it won't care 22:25 Sgeo: "Note that you need to use a three-item list to specify the keyword parameter ripped because you need to know whether the caller actually passed :ripped nil, meaning, "Select CDs whose ripped field is nil," or whether they left out :ripped altogether, meaning "I don't care what the value of the ripped field is."" 22:25 Sgeo: http://www.gigamonkeys.com/book/practical-a-simple-database.html 22:28 Demosthenes: yoklov: got that parser going 22:28 yoklov: yeah? 22:28 yoklov: right 22:28 Demosthenes: was trying to figure out if i ought to try and modularize it and share 22:28 DT``: Sgeo, I'd do (define my-secret-optarg (gensym)) and compare to that. 22:29 DT``: with eq?. 22:29 Sgeo: Ah 22:29 Sgeo: Wait, what? How would you get that entirely inside one define? 22:29 yoklov: i mean if you think it's useful and good then yeah i'd say you probably should 22:30 DT``: (define my-function (let ((optarg (gensym))) (lambda ((opt optarg)) (unless (eq? opt optarg) (display "and nothing of value was passed here"] 22:31 DT``: s/unless/when/ 22:31 Sgeo: Ah 22:31 Sgeo: ty 22:32 Demosthenes: yoklov: http://bazaar.launchpad.net/~rladams/+junk/RacketParser/files 22:33 Demosthenes: the unit tests roc 22:33 Demosthenes: k 22:33 Sgeo: "; you need to get all your code in order, make sure it'll run, then execute. And that's it. If you need to make changes (like, while developing web apps) you need to tweak the code, then restart the server, then re-navigate to the page you were just on because it auto-generates new urls each time." 22:33 Sgeo: [about Racket's web stuff] 22:34 Demosthenes: yoklov: if you have suggestions, i'm open to criticism ;] 22:34 Sgeo: Is there no way around that? That's the sort of thing I was trying to get at a while ago: Can Geiser prevent you from needing to do that?] 22:36 yoklov: it looks very good 22:36 yoklov: no suggestions I can think of, to be honest 22:36 Demosthenes: the tests rocked. 22:36 Demosthenes: found some great edge cases 22:36 yoklov: yeah? 22:37 yoklov: awesome 22:37 (quit) rpr: Read error: Connection reset by peer 22:37 yoklov: i like rackunit a lot 22:37 Demosthenes: i'm planning on adding validators and pre/post processors per line next, yeehaw. 22:39 Demosthenes: wish i could find a better logging solution 22:39 Demosthenes: i don't like the built in logger, even when you can change it dynamically between runlevels 22:40 Sgeo pokes 22:41 yoklov: wait, for what? 22:41 Demosthenes: logging, for everything racket 22:42 yoklov: i see, it's never actually been a thing i've done a ton of 22:42 yoklov: to be honest 22:43 Demosthenes: i'd really like a logger with multiple logging levels, function specific logging, dynamic level changes, output options... 22:44 yoklov: hm, yeah that does sound pretty resonable, I've just never come into a situation like yours where i'd need/want to log that much 22:55 Demosthenes: logging is essential... thats one of the issues with parsing with regexp, its hard to debug why something didnt work 22:55 Demosthenes: perl you can turn on a debug mode where every regexp operation is verbosely dumped, but i've never found that in racket 23:10 ASau: eli: I remember it, but I've got no time to deal with it. 23:11 (quit) ASau: Quit: off 23:16 (join) leo2007 23:19 (nick) ec|detached -> elliottcable 23:36 (join) mithos28 23:38 EM03: blog : (listof post?) how would you write this? this is obviously not legal syntax but wouldn't you need to pass blog to listof as well? 23:39 EM03: or does it only check if the list derives from a struct in this case post? 23:40 DT``: EM03, http://docs.racket-lang.org/guide/contracts-struct.html?q=contract%20struct&q=contract 23:40 rudybot: http://tinyurl.com/3qysedh 23:41 EM03: its funny that the docs are implying that the code should have these contracts but yet I don't see any of them 23:43 DT``: it's more a simple annotation (just for clarity) than something enforced there. 23:44 EM03: I keep thinking that with those blue examples that since its so in depth that it should function that way as well 23:44 EM03: oh well maybe I'm over analyzing 23:53 (quit) mithos28: Quit: mithos28