00:01 Demosthenes: second test uses the key from the text as the symbol key for the hash 00:01 yoklov: yeah i figured that out 00:01 yoklov: i dont think my method will be any more efficient, but it might give you a different way to think about it or something, who knows. 00:01 yoklov: sec. 00:01 Demosthenes: i appreciate the review, this has been eating at me ;] 00:02 Demosthenes: i was thinking of a recursive parser... processing a list of directives like '((a "regexp")(b "regexp")(c "regexp)) 00:02 yoklov: no problem, i should be studying for a differential equations exam lol 00:02 yoklov: yeah 00:02 yoklov: okay 00:02 yoklov: that actually helps me out 00:02 Demosthenes: if you get to the end of the directives successfully, keep the record 00:02 yoklov: basically the way i was doing it was 00:03 yoklov: a list of regexps, and a tail recursive function that if the list is null 00:03 Demosthenes: but then by specifying that, i got back to (match ....) 00:03 yoklov: return a hash 00:03 yoklov: if uh, they match 00:03 Demosthenes: kinda same line of thought there 00:03 yoklov: then set the hash, and call the next part of the function 00:03 yoklov: with cdr list cdr regexp list 00:03 Demosthenes: i just had the impression match might save writing a function using an existing feature 00:04 yoklov: honestly i have no idea what match does. 00:04 yoklov: hold on i'll look 00:04 Demosthenes: look at the doc. 00:04 Demosthenes: its slick... if my data were lists... i think it could match it all 00:05 yoklov: hm 00:05 yoklov: oh wow 00:05 yoklov: thats pretty cool. 00:06 yoklov: its like haskell pattern matching 00:06 yoklov: possibly older who knows 00:06 yoklov: though 00:06 yoklov: i dont really know if its what you want. 00:06 Demosthenes: did you look at TXR? ;] 00:07 yoklov: clearly not 00:07 yoklov: looking now 00:07 Demosthenes: somewhere i think there's a happy middle, between recursion, named capture (missing in racket but in perl), txr, and match 00:07 (quit) tauntaun: Quit: Ex-Chat 00:08 yoklov: i guess to be honest, i dont understand any of this. 00:08 yoklov: it seems fairly slick though. 00:09 yoklov: either way dude 00:09 yoklov: what you want to do doesnt seem that hard with recursion 00:10 yoklov: wait i didnt go far enough in txr 00:16 Demosthenes: its basically what txr summarized, reversing printf ;] 00:17 Demosthenes: imagine being given business records in text format from an app you don't control 00:17 Demosthenes: its like reading a report back into rows... 00:17 yoklov: here, basically this was my idea http://pastebin.com/16yiwwQ0 . you'd have to design the noise and out of order functions. noise should porbably be a regexp or something that checks if a string has a particular thing that you know makes it not noise, out of order you could define by having some other ugly mutable variable in your function 00:17 yoklov: or by having a 'seen' variable be passed along with iterate 00:17 yoklov: and maybe pass that to out-of-order? 00:18 Demosthenes: i think the recursion is the answer 00:18 Demosthenes: also lets me do things like "lookahead" 00:19 yoklov: i mean, if you do non tail-call recursion you'll have a significant performance hit 00:19 Demosthenes: thing is, perl's regexp engine you can put in debug mode, and it'll print verbatim the processing of a regexp, but racket doesn't seem to do that anywhere.... so if a regexp fails its a mystery 00:19 yoklov: especially if your text to parse is long enouhg 00:19 yoklov: it returns false i thought 00:19 Demosthenes: sure, but in a long complex regexp, how do you know where it failed? 00:19 yoklov: you could define somethign like 00:19 yoklov: oh 00:19 yoklov: i see. 00:20 Demosthenes: one of the reasons i'm looking for false positives or failures is to detect new record types when they change their code.... 00:20 yoklov: well, hm 00:20 yoklov: i mean. 00:20 yoklov: there's a solution to this problem 00:20 yoklov: and i think that solution may be macros. 00:20 Demosthenes: it may be 00:21 Demosthenes: but i think recursion and a directive list is a great start 00:21 Demosthenes: really, its designing a general purpose event driven parser 00:21 yoklov: i see. 00:21 Demosthenes: not that i was thinking that when i started :P 00:21 yoklov: lol 00:21 Demosthenes: it was more of "oh, this is text. i ought to be able to parse it out easy" 00:22 Demosthenes: anyhow, afk for a bit 00:22 yoklov: yeah i'm out too 00:22 Demosthenes: thanks for the input and perspecive 00:22 yoklov: no problem 00:22 yoklov: thanks for the distraction 00:22 yoklov: catch you later. 01:22 (join) realitygrill_ 01:25 (quit) realitygrill: Ping timeout: 250 seconds 01:25 (nick) realitygrill_ -> realitygrill 01:41 (quit) yoklov: Quit: Leaving. 01:54 (quit) geoffhill: Quit: geoffhill 02:49 (part) cpach 03:08 (quit) ckrailo: Quit: Computer has gone to sleep. 03:19 (quit) em: Ping timeout: 260 seconds 04:02 (quit) realitygrill: Quit: realitygrill 05:18 (join) PLT_Notify 05:18 PLT_Notify: racket: master Mike Sperber * d582dd5 (2 files in 2 dirs): Fix bug in vector signatures. - http://bit.ly/mUj8jx 05:18 (part) PLT_Notify 06:00 (join) MayDaniel 06:01 (join) dzhus 06:09 (quit) MayDaniel: Read error: Connection reset by peer 06:16 (quit) dzhus: Read error: Operation timed out 06:46 (join) lucian 07:03 (join) mceier 07:26 (join) lucian_ 07:29 (quit) lucian: Ping timeout: 264 seconds 07:38 (join) masm 07:40 (join) yoklov 07:45 (nick) lucian_ -> lucian 07:46 (quit) Demosthenes: Quit: leaving 08:47 (quit) lucian: Ping timeout: 276 seconds 08:50 (join) lucian 08:50 (join) tauntaun 08:52 (quit) tauntaun: Client Quit 09:08 (quit) Triplefault: Quit: Leaving 09:08 (join) MayDaniel 09:16 (quit) yoklov: Quit: Leaving. 09:35 (quit) hyko: Read error: Connection reset by peer 09:35 (join) hyko 09:57 (join) mithos28 10:05 (quit) mithos28: Quit: mithos28 10:10 (join) yoklov 10:34 (join) anRch 10:35 (join) tauntaun 11:01 (quit) DT``: Ping timeout: 250 seconds 11:12 (quit) anRch: Quit: anRch 11:14 (join) DT`` 11:15 (quit) dnolen: Quit: dnolen 11:27 (join) emma 11:32 (nick) emma -> em 12:04 (quit) MayDaniel: Read error: Connection reset by peer 12:19 (join) dnolen 12:20 (join) realitygrill 12:59 (join) jonrafkind 13:35 (join) ckrailo 14:11 (quit) qha: Ping timeout: 260 seconds 14:16 (join) qha 14:53 (quit) realitygrill: Ping timeout: 240 seconds 15:19 (join) realitygrill 15:34 (join) PLT_Notify 15:34 PLT_Notify: racket: master Robby Findler * 551c686 (1 files in 1 dirs): add in the supported ->i forms 15:34 PLT_Notify: racket: master Robby Findler * d6ef130 (13 files in 3 dirs): cleaned up framework docs 15:34 PLT_Notify: racket: master commits d582dd5...d6ef130 - http://bit.ly/jnRZlU 15:34 (part) PLT_Notify 15:42 (join) MayDaniel 15:46 (quit) yoklov: Quit: Leaving. 15:50 (quit) MayDaniel: Read error: Connection reset by peer 15:59 (join) yoklov 16:17 (quit) chemuduguntar: Remote host closed the connection 16:51 (join) lucian_ 16:51 (quit) lucian: Read error: Operation timed out 17:08 (nick) lucian_ -> lucian 17:14 (quit) yoklov: Quit: Leaving. 17:22 (quit) rekahsoft: Ping timeout: 240 seconds 17:24 (join) rekahsoft 17:28 (quit) rekahsoft: Ping timeout: 240 seconds 17:34 (quit) mceier: Quit: leaving 17:48 (quit) realitygrill: Quit: realitygrill 17:55 (quit) masm: Quit: Leaving. 17:58 (join) masm 18:07 (quit) masm: Quit: Leaving. 18:08 (join) masm 18:09 (join) yoklov 18:16 (quit) DT``: Ping timeout: 250 seconds 18:30 (join) DT`` 19:04 (join) chemuduguntar 19:16 (join) mithos28 19:24 (quit) ckrailo: Quit: Computer has gone to sleep. 19:28 (join) PLT_Notify 19:28 PLT_Notify: racket: master Robby Findler * 2bba4e1 (6 files in 2 dirs): fixed up the graphics/ collection's docs 19:28 PLT_Notify: racket: master Robby Findler * bc9c44a (2 files in 1 dirs): graphics/turtles: fixed up for an 'xor-less world ... 19:28 PLT_Notify: racket: master commits d6ef130...bc9c44a - http://bit.ly/kn5hvk 19:28 (part) PLT_Notify 19:45 (join) lucian_ 19:48 (quit) lucian: Ping timeout: 260 seconds 19:53 (join) rpr 19:56 rpr: Ok Typed Racket is just the best thing I've seen in a loooong while. O U T S T A N D I N G 19:58 (nick) lucian_ -> lucian 20:00 yoklov: really? 20:00 yoklov: i don't 'get' it 20:01 yoklov: it seemed like a bit of a hassle. 20:01 jonrafkind: types are a hassle? 20:01 yoklov: well, i mean, to someone who doesn't know about them, they seem that way 20:02 jonrafkind: I suppose, you've never used a type language before? 20:03 yoklov: some C, but i dont think thats what you men 20:03 yoklov: mean* 20:04 yoklov: oh, and the first two chapters of a Haskell book 20:04 jonrafkind: yea any complex program in C basically abuse the type system 20:04 yoklov: that talked a ton about how awesome types were but didnt get to the point 20:04 jonrafkind: you should try writing some programs in haskell or ocaml 20:05 jonrafkind: if you can get the program to type check there are lots of benefits 20:05 jonrafkind: of course, if you have a type error sometimes it seems like a waste of time trying to fix it 20:05 yoklov: yeah, thats the problem i usually had 20:05 yoklov: in typed racked 20:06 jonrafkind: yes perhaps typed racket is not mature enough yet to be useable by more people, i dont really know 20:06 yoklov: racket*. all my programs had a whole mess of bugs 20:06 yoklov: which is probably personal more than the maturity of typed racket 20:09 (join) rekahsoft 20:14 (join) geoffhill 20:17 yoklov: hm, i had wondered if monads were a thing that you could implement in racket 20:18 yoklov: says they're type classes on wikipedia so it would seem like that could be doable in typed racket 20:18 yoklov: not that i actually understand monads :/ 20:19 (join) ckrailo 20:23 (quit) lucian: Ping timeout: 240 seconds 20:25 (quit) mithos28: Quit: mithos28 20:25 (join) lucian 20:26 rpr: There is something special happening in Typed Racket that I don't have enough horsepower to put my finger on. But the type system is pretty damn sophisticated. Reminds me of Scala's. AND they seamless merge in runtime contracts into typed racket. Its all far more than I expected. 20:30 rpr: FWIW today I've been converting all my code over to typed/racket. Going ok in general. 20:30 yoklov: have you found that typed racket takes longer to load up initially? that was another reason that i was turned off by it 20:31 yoklov: i'm just wondering if that's just my system or whatever 20:35 rpr: Yes a somewhat slower. I use emacs + geiser and its fast enough for me. I have a decent amount of code. 20:38 (quit) masm: Ping timeout: 240 seconds 20:40 (join) realitygrill 20:40 rpr: Once loaded, while converting a module of developing, once the typer is up to speed I've found type checking to be good enough. 20:46 bremner_: jonrafkind: fyi 5.1.1 uploaded to debian 20:48 yoklov: yeah, the reason I wanted to write in typed racket in the first place was that something in the docs had mentioned typed racket having better performance, and I was unsatisfied with the performance of my mandelbrot set drawer lol 20:49 yoklov: the slowdown on loading it initially was enough to make me not end up figuring it out though. 21:12 (join) mithos28 21:18 (quit) tauntaun: Quit: Ex-Chat 22:29 (join) wwwd 22:46 (quit) mithos28: Quit: mithos28 23:05 (quit) lucian: Remote host closed the connection 23:05 (quit) wwwd: 23:27 (quit) ckrailo: Quit: Computer has gone to sleep. 23:30 (quit) rekahsoft: Ping timeout: 276 seconds 23:30 (join) mithos28 23:35 (quit) yoklov: Quit: Leaving. 23:41 (join) ckrailo 23:41 (quit) rpr: Remote host closed the connection 23:51 (join) rekahsoft