00:06 micaeked: lewis1711: i'm not sure what's going on here, but if you're looking for the reason that regex does not match, perhaps it's because of the space between the two groups 00:07 (join) jeapostrophe 00:07 (quit) jeapostrophe: Changing host 00:07 (join) jeapostrophe 00:07 lewis1711: micaeked: you mean (regexp-match #px"([:alnum]+)([:space],[:alnum]+)" "a, a") instead? still no luck. hmm. 00:10 micaeked: this seems to work, although i'm not sure if that's what you are trying to do: (regexp-match #px"([:alnum]+)(, [:alnum]+)" "a, a") 00:10 micaeked: lewis1711: ^^ 00:20 lewis1711: micaeked: hmm thanks. It appears [:space] does not do what I think it does 00:20 lewis1711: also, I asked this in #scheme, but racket is verboten :) 00:20 lewis1711: http://pastebin.com/dGJbgzrd once the while condition on line 10 is false, the whole thing freezes up. at that point, I expect it to return new-states at 53. However it does nothing but does not terminate. help? is my loop macro incorrect? 00:26 Daemmerung: lewis1711: racket is certainly not verboten there, but when you post in #scheme without preamble, we must assume R5RS 00:27 lewis1711: fair enough 01:03 (join) jesyspa 01:14 (quit) jeapostrophe: Ping timeout: 244 seconds 01:17 (quit) jesyspa: Quit: leaving 01:17 (join) jesyspa 01:55 (quit) arbn: Read error: Connection reset by peer 01:56 (join) arbn 02:00 (quit) jackhammer2022: Quit: Textual IRC Client: http://www.textualapp.com/ 02:22 (quit) billyoc: Ping timeout: 252 seconds 02:23 (quit) micaeked: Ping timeout: 246 seconds 02:28 (quit) jao: Ping timeout: 246 seconds 02:34 (join) bitonic 02:39 (join) micaeked 03:04 (join) xonox 03:17 (quit) yoklov: Quit: computer sleeping 03:21 (join) MingJie 04:01 (quit) jonrafkind: Ping timeout: 260 seconds 04:05 Gertm: Is typed racket faster (or supposed to be faster) than vanilla racket? 04:05 Gertm: Or is it just the advantage of the static checking you get from it? 04:09 (quit) xonox: Read error: Connection reset by peer 04:20 (join) Jeanne-Kamikaze 04:30 arbn: Gertm: http://docs.racket-lang.org/ts-guide/optimization.html 04:31 Gertm: arbn: thanks, found that myself in the mean time. Very interesting. 04:36 (quit) MingJie: Remote host closed the connection 05:17 lewis1711: I still don't get along well with typed/racket. often don't understand what the errors mean. also, idk why they don't use the contract syntax for functions (-> type type type) instead of the weird (type type -> type) 05:18 (join) gciolli 06:23 (join) MayDaniel 06:28 (quit) mithos28: Quit: mithos28 06:30 (quit) arbn: Read error: Connection reset by peer 06:30 (join) arbn 06:34 (quit) micaeked: Ping timeout: 246 seconds 06:49 (join) masm 07:10 bremner: the "weird" on is closer to that used in languages like Haskell, fwiw 07:23 lewis1711: I know. but it's not very LISPy 07:25 bremner: racket is unLispy in this way in several places. 07:25 bremner: I guess the others are optional fake infix operator type things 07:28 bremner: personally I like the infix type notation. 07:29 bremner: but then I'm used to it from other contexts. 07:30 Haffe: It would be really cool with an intro to openGL taught in RACKET. 07:30 Haffe: Wonder if there is such a beast somewhere. 07:32 lewis1711: I prefer consistancy 07:34 bremner: lewis1711: in the abstract, I understand your argument. 07:34 Gertm: Racket makes a few compromises to improve practicality. Can't be a bad thing, right? 07:34 (join) dzhus 07:34 (join) jao 07:35 (quit) jao: Changing host 07:35 (join) jao 07:35 lewis1711: I'll just write a macro, ->* :) 07:36 Haffe: These macros. 07:36 Haffe: They are said to be very powerfull and usable. 07:36 Haffe: How does one become friend with them? 07:36 Gertm: Haffe: learn them last. :) 07:37 Gertm: People have very different opinions on them. Some think they are the best thing since sliced bread, other think they should be removed. 07:37 Gertm: Just don't overuse them, is what I say. If you find an abstraction you can't make with the other stuff, macros are there to help you. 07:38 Gertm: ( ^ these are all my personal views, ymmv ) 07:39 bremner: do macro-haters have some other ideas about how to make extensible syntax? or they want "python with parens"? 07:39 Haffe: I heard that the macro language in C++ is really horrible. 07:39 Haffe: With something like O(n³) complexity. 07:39 Gertm: Haffe: don't compare those systems. 07:40 bremner: Haffe: it's turing complete, so O() doesn't really make sense 07:40 bremner: (the C++ one) 07:40 Gertm: Macros give you the freedom to shape the language to match the problem you're trying to solve. 08:29 (quit) gciolli: Quit: Leaving. 08:31 (quit) lewis1711: Quit: Leaving. 08:56 em: when a file is written as a 'binary file' how is that done? 08:57 em: its not as if it is a text file of zeros and ones. 08:57 em: how is the computer doing that 09:10 (quit) Jeanne-Kamikaze: Quit: Did you hear that ? 09:13 (join) Jeanne-Kamikaze 09:18 (part) snorble_ 09:19 (join) jeapostrophe 09:19 (quit) jeapostrophe: Changing host 09:19 (join) jeapostrophe 09:28 (join) snorble_ 09:38 (join) getpwnam 09:39 (join) hash_table 10:06 (join) mye 10:08 (quit) dzhus: Ping timeout: 268 seconds 11:01 (quit) Jeanne-Kamikaze: Quit: Did you hear that ? 11:10 (quit) Fare: Ping timeout: 246 seconds 11:48 (join) yoklov 12:04 (quit) jeapostrophe: Ping timeout: 248 seconds 12:37 (join) Fare 13:17 (join) jonrafkind 13:18 (quit) arbn: Read error: Connection reset by peer 13:18 (join) arbn 13:37 (join) jackhammer2022 13:47 wtetzner: i have a problem with defining a match expander 13:47 wtetzner: i have a function called point that creates points 13:47 wtetzner: and i would also like the match expander to be called point 13:47 wtetzner: is this possible? 13:48 wtetzner: how does this work for list? or is list a special case in the match code? 13:49 (join) Aune 13:53 jonrafkind: yea its a special case 13:54 jonrafkind: if you create your own then you have to have a unique name since there is only a single namespace 13:55 wtetzner: is it possible to have point behave as a function and a match expander? 13:56 jonrafkind: hm, not sure but i doubt it 13:57 wtetzner: i know for structs, you can have a struct info and a constructor function bound to the same name 13:57 wtetzner: but i don't understand how it works 13:57 jonrafkind: yea thats because the struct info is used at phase 1 while the constructor is used at phase 0 13:58 jonrafkind: so they can be bound to different things 13:58 wtetzner: should be similar for match expanders, right? 13:59 wtetzner: they're run at compile time 14:01 wtetzner: i guess it's not that big of a deal, i can just use make-point for my point-making function 14:01 wtetzner: but it would be nice if the names were the same 14:08 jonrafkind: true, i dont know why define-match-expander creates a phase 0 binding 14:14 jonrafkind: ok define-match-expander expands to (define-syntax id ...), I think this is because match is analyzing phase 0 code at phase 1, to do that it needs to look at phase 0 bindings 14:16 jonrafkind: but of course it needs to get phase 1 values because it is going to actually execute the match-expander at phase 1 14:20 wtetzner: oh 14:21 wtetzner: ok 14:21 wtetzner: i guess i'll just use different names then :) 14:26 wtetzner: thanks 14:49 jonrafkind: ok i was curious how (struct a ()) works, it defines a macro named `a' and if you expand it then it turns into a reference to the struct constructor called `a1', if you don't expand a but instead extract the phase 1 value from the phase 0 binding then you get the struct info 14:49 jonrafkind: so the transformer for a and the struct info are combined into a single thing 14:51 jonrafkind: this is only really possible because `struct' itself defines `a' such that it contains both things, so you can't somehow separate the expansion of a from the phase 1 value of a 14:52 jonrafkind: I mean normally if you do (define-syntax a (lambda (stx) ...)) like it was a regular transformer and you did (syntax-local-value #'a) at phase 1 you would get back the (lambda (stx) ...) function part 14:53 jonrafkind: but (struct a ()) turns into (define-syntax (a) (make-struct-ctor-thing ..stuff...)) where the transformer (lambda (stx) ...) is part of the result of (make-struct-ctor-thing) 14:54 jonrafkind: and the way that works is that `make-struct-ctor-thing' (ok its really called make-self-ctor-checked-struct-info) creates a struct with a prop:procedure property so that it can contain stuff (like the struct info itself) and can still be applied as a regular procedure (transformer) 14:57 wtetzner: huh 14:57 wtetzner: i guess that makes sense 15:04 (quit) Fare: Ping timeout: 276 seconds 15:07 wtetzner: so it wouldn't work for match expanders 15:07 wtetzner: because both values are procedures 15:09 dca: i'd like to ask for an advice. should i go for using classes and OOP stuff while writing program for studying racket? or use types? or macros? or ... (got some scheme knowledge) ? 15:09 (join) micaeked 15:10 wtetzner: dca: depends on what program you're writing 15:10 dca: basic raytracing 15:10 wtetzner: objects are nice for encapsulating state 15:10 dca: render a scene using scene description language 15:10 wtetzner: but if you don't have state (you're writing things functionally), then go with structs and functions 15:11 (quit) jesyspa: Quit: Lost terminal 15:11 wtetzner: and use macros when you can't find another way to create the abstraction you want 15:11 wtetzner: or if you want take an existing abstraction you have, and give it prettier syntax 15:12 dca: is using macros with classes a good practice? 15:13 wtetzner: using macros with classes is fine 15:13 wtetzner: just be aware that there are disadvantages to using macros over functions and objects 15:14 wtetzner: for example, they are compile time constructs, so you can't pass them around at runtime 15:14 jonrafkind: my advice is to use classes, functions + structs can be sort of annoying 15:15 wtetzner: jonrafkind: what do you find annoying about it? 15:16 jonrafkind: well the namespace issue for one, you have to have a foo_do_x instead of just class Foo{ x() } 15:16 jonrafkind: also inheritance is pretty useful 15:17 jonrafkind: imo classes are a superset of structs+functions and can do more stuff like inheritance and encapsulation 15:18 Araq: who needs inheritance when there is dynamic typing? 15:18 (quit) cdidd: Read error: Connection reset by peer 15:18 wtetzner: what i prefer about functions is that i can use them with other higher-order functions 15:19 wtetzner: like map and curry 15:19 jonrafkind: i find such things not so useful in practice 15:19 wtetzner: hmm 15:19 wtetzner: i use them often 15:19 jonrafkind: ok :) 15:19 wtetzner: different programming styles, i guess 15:23 wtetzner: dca: so try them all, see what you like, i guess :) 15:24 dca: wtetzner: okay 15:24 dca: thanks for advises! 15:24 Araq: don't use inheritance :P 15:24 Araq: nor OO :P 15:24 wtetzner: Araq: what do you have against inheritance? 15:24 Araq: I almost never saw it used properly 15:25 Araq: sum types are much better anyway 15:25 Araq: and yeah they are not extensible 15:25 Araq: that's a *feature* 15:25 wtetzner: well, in terms of subtyping, i agree 15:25 wtetzner: but inheritance can be useful way to share implementation 15:25 Araq: use delegation for that 15:27 Araq: caring for extensibility is often just a huge waste of time, the extensions won't fit into your carefully designed hierachy anyway 15:29 Araq: there is a reason nobody needed a word like "refactoring" (and the extensive non local code transformations the term describes) before OO became en vogue 15:31 dca: how does racket implement sum types? 15:32 dca: any dynamic variable is infinite sum of types :3 15:32 Araq: yeah that's the next point 15:32 Araq: inheritance is unnecessary if you already have dynamic typing 15:34 dca: well if you have an objectDrawable that implements draw you cant (send objectDrawable draw). and if you send draw by mistake to unsupported object it'lll complain, isn't it? 15:34 (join) Jeanne-Kamikaze 15:35 dca: but (draw-object badObject) is gonna fail somewhere inside isn't it? 15:36 (quit) arbn: Read error: Connection reset by peer 15:37 (join) arbn 15:39 (join) jeapostrophe 15:39 (quit) jeapostrophe: Changing host 15:39 (join) jeapostrophe 15:49 (quit) jeapostrophe: Ping timeout: 240 seconds 16:02 (join) RacketCommitBot 16:02 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/mva2PQ 16:02 RacketCommitBot: [racket/master] Integers include inexact single-float integers. - Vincent St-Amour 16:02 (part) RacketCommitBot 16:05 (join) mye_ 16:09 (quit) mye: Ping timeout: 244 seconds 16:15 Araq: dca: I don't know, I never used Racket :-) 16:16 Gertm: Araq: Try it. It's great :) 16:17 Araq: I would if I had the time ;-) 16:29 Cryovat: ...single float integer? 16:29 Cryovat: How does that work? 16:42 (quit) Jeanne-Kamikaze: Ping timeout: 276 seconds 16:55 (join) Jeanne-Kamikaze 17:00 (join) Sonderblade 17:01 (quit) Sonderblade: Quit: L?mnar 17:02 (join) dzhus 17:05 (quit) MayDaniel: Read error: Connection reset by peer 17:07 (quit) Jeanne-Kamikaze: Quit: Did you hear that ? 17:08 (quit) micaeked: Quit: WeeChat 0.3.8 17:32 (join) Sonderblade 17:39 (join) xonox 17:59 (join) anRch 18:05 (join) dzhus89 18:06 (quit) dzhus: Ping timeout: 252 seconds 18:21 (quit) xonox: Remote host closed the connection 18:33 (join) cdidd 18:47 (quit) anRch: Quit: anRch 19:13 (quit) bitonic: Read error: Operation timed out 19:14 (quit) Sonderblade: *.net *.split 19:14 (quit) Daemmerung: *.net *.split 19:14 (quit) duckinator: *.net *.split 19:15 (join) Sonderblade 19:15 (join) Daemmerung 19:16 (join) duckinator 19:16 (join) scott_ 19:26 (quit) Aune: Quit: L?mnar 20:02 (join) mye__ 20:06 (quit) mye_: Ping timeout: 272 seconds 20:07 (join) yw0 20:07 yw0: hello 20:08 yw0: I'm trying to make some "overloading" work in Racket, but don't know how to fight the module system ;-) 20:22 (nick) dzhus89 -> dzhus 20:26 (join) jeapostrophe 20:26 (quit) jeapostrophe: Changing host 20:26 (join) jeapostrophe 20:34 yoklov: does anybody ever use mpairs? 20:44 (join) ennk 20:50 (quit) yw0: Quit: Leaving 20:50 (join) neilv 20:58 (quit) masm: Quit: Leaving. 21:01 neilv: it's been a year or two since i used the racket web server. time to re-learn everything i forgot 21:02 Daemmerung: s/racket web server/Racket/, sigh 21:07 (join) dnolen 21:32 (quit) ennk: Read error: Connection reset by peer 21:43 (quit) jeapostrophe: Ping timeout: 245 seconds 22:08 (quit) dnolen: Remote host closed the connection 22:09 (join) dnolen 22:19 (join) nnxk 22:40 (quit) hash_table: Ping timeout: 246 seconds 22:40 (quit) getpwnam: Ping timeout: 246 seconds 22:53 (quit) Shvillr: Ping timeout: 246 seconds 22:53 (join) Shvillr 23:30 (quit) arbn: Read error: Connection reset by peer 23:31 (quit) cataska: Quit: leaving 23:44 (quit) dnolen: Ping timeout: 260 seconds 23:58 (join) cataska