00:00:00 --- log: started haskell/02.01.26 02:07:31 --- join: dennis_ (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 02:24:30 --- quit: dennisb (Read error: 110 (Connection timed out)) 03:21:10 --- nick: dennis_ -> dennisb 03:43:14 * shapr awakens 03:44:38 Heh. 03:58:24 My haskell is getting better! 03:58:29 I just solved two problems tonight. 04:00:41 awesome! 04:02:13 http://www.loganh.com/haskell/decoder.hs is what I just did. 04:02:16 It's not _too_ ugly. 04:02:45 http://www.acm.inf.ethz.ch/ProblemSetArchive/A_FINALS/1991/prob_f.html 04:02:47 Is the problem it solves. 04:06:42 In retrospect I wrote more code than necessary. 04:06:53 I didn't need those takeWS/dropWS functions, but I misinterpreted the problem at first. 04:07:01 I could've just simply filtered out newlines. :P 04:07:07 I wrote a WardNumber solver in Joy last night :) 04:07:32 http://c2.com/cgi-bin/wiki?WardNumberInManyProgrammingLanguages 04:07:35 at the bottom of the page 04:07:38 Cool, what algorithm did you use? 04:07:59 brute force head banging 04:08:02 ;) 04:08:27 I think you called it breadth first searching of connected graphs 04:08:30 Sort of a breadth-first traversal. 04:08:36 right 04:08:38 * Logan nods. 04:09:03 there's not a Haskell version up there either 04:09:29 Maybe I'll write one once I get some practice implementing graph algorithms in haskell. 04:09:35 That's really holding me back right now. 04:09:50 I need to get over to campus and make some copies before I sit through 5 hours of programming team practice. :P 04:09:51 BBL. 04:09:58 * shapr waves 04:10:34 what's up with the the function and then function' names? 04:10:40 * shapr thinks 04:10:52 er, that's like first derivative or something, right? 04:10:59 They're just used privately by the function without the ' 04:11:01 I noticed that style in other programs. 04:11:07 In mathematical notation it sometimes is. 04:11:12 But not necessarily. 04:11:21 Sometimes you use ' and '' and so on to denote similar but separate objects. 04:11:25 It's used for child functions that do all the work in functinos or new values in values 04:11:41 Like "Let persons P and P' be two individuals that have pair programmed together." 04:11:48 oh 04:12:17 nifty! 04:12:17 So you might have sort :: [a] -> [a]; sort xs = sort' (length xs) xs if your real sort function needed to know hte length of what it was sorting 04:12:34 Yeah, exactly. 04:12:43 I suppose you can define the function in the where clause. 04:12:48 But I'm not comfortable with the syntax yet. 04:12:50 Later. 04:12:54 seeya 04:12:54 Or step :: State -> Input -> State; step s i = s' where s' = f i 04:13:05 interesting 04:13:09 that makes sense 04:13:22 thanks 04:14:23 Yeah, I'm liking the (c:c') notation for taking the head of a list. 04:14:40 xs@(x:xs') is quite common too 04:14:55 I'd use (c:cs) for the above, though 04:15:13 (or (c:_) if I really just wanted the head) 05:02:19 --- quit: shapr ("bbl") 05:29:44 Hmm. 05:29:55 Why xs' instead of xs? 05:30:01 Or instead of x'? :P 05:33:07 Where? 05:33:33 In xs@(x:xs')? 05:34:05 xs' is generally the next xs 05:57:03 --- quit: Logan (Remote closed the connection) 05:57:03 --- join: Logan_ (~logan@up112.blacksburg.ntc-com.net) joined #haskell 06:13:38 --- quit: pHa (Read error: 104 (Connection reset by peer)) 06:13:41 --- join: pHa (sjh@207.164.213.120) joined #haskell 08:25:30 --- quit: pHa (Read error: 104 (Connection reset by peer)) 08:25:53 --- join: pHa (sjh@Riverview31.tbaytel.net) joined #haskell 09:15:28 --- nick: Logan_ -> Logan 10:30:52 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 10:32:29 ahem 10:34:02 ? 10:34:29 hi Igloo 10:34:30 what's up? 10:34:45 Not much 10:38:37 * Logan yawns. 10:48:14 * shapr chortles 10:48:27 Programming contest in 10 minutes. 10:48:35 cool! where? 10:52:54 topcoder.com 10:53:12 You have two minutes to create an account and register for the contest. :P 10:53:17 Well, less than that actually. 10:53:22 But the next one's on Wednesday. 10:54:00 * shapr creates 10:55:56 I think I'll miss it :) 10:56:21 geez they want a lot of info 10:56:25 I'm not convinced of the value of a programming competition whose web page uses JS to simulate links 10:56:34 * Logan nods. 10:56:46 Though they have their "beta" site rewritten to not use it as much. 10:56:59 They only support C++ and Java. 10:58:11 suckage 10:58:13 forget that 10:58:28 geez, they want to know everything about me 11:13:09 Logan: crap, must be a US resident 11:13:14 I don't live there anymore. 11:52:38 Where do you live? 12:06:45 --- part: jsw left #haskell 12:12:35 Logan: Tornio, Finland 12:12:45 where sweden, finland, and the gulf of bothnia touch 12:32:29 --- quit: shapr (Read error: 104 (Connection reset by peer)) 12:38:35 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 13:08:13 --- join: discobob (discobob@slc1205.modem.xmission.com) joined #haskell 13:08:17 whee 13:08:19 hi discobob 13:08:35 hola 13:08:40 como est as? 13:08:53 bien, e tu? 13:09:44 pas mal 13:09:57 por que? 13:12:53 Mr. Scruff - Get A Move On is a great song by the way. 13:15:32 --- nick: Logan -> LoganZzZz 13:20:36 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 13:20:46 hi 13:20:58 yo 13:21:56 guys, I'm wondering - will it be hard to study Haskell having some experience with Ocaml and Erlang? 13:24:46 * Yurik is downloading latest ghc.. 13:24:56 No harder then for someone with a C background, I would think. 13:25:17 I have C background, too :-) 13:25:22 --- quit: shapr (Read error: 113 (No route to host)) 13:25:30 BTW, as I can understand, GHC is the best implementation of Haskell? 13:25:49 GHC's really the only one I've tried. 13:25:52 It seems very nice. 13:26:15 yep, I've installed it yesterday at home but haven't played with it yet (only simple Main.hs ;)) 13:27:00 as I saw, it compiles haskell programs to native binaries. How fast these binaries? 13:27:52 I haven't benchmarked. 13:27:58 I'd say it depends on how you write your code. :P 13:28:07 hehe :-) 13:28:22 I'm guessing it's comparable to whatever the C analog for what you're doing would be. 13:28:42 hm, sounds great 13:28:45 Keeping in mind that some things in haskell aren't necessarily as efficient as you may think (like appending to lists). 13:29:51 What do you mean? list append is a slow operation in Haskell? If yes, I got accustomed with this issue in Erlang :-) 13:31:44 Well, you have to know how the functions you are using are implemented if efficiency is your goal, that's all. 13:31:50 True of any language, really. 13:31:54 I need to go to sleep. :P 13:32:42 good night 13:33:55 --- join: jadrian_ (~none@dial-b1-206-79.telepac.pt) joined #haskell 13:33:58 hi all 13:34:20 hi 13:34:29 hi discobob 13:34:36 * jadrian_ has got a couple of questions 13:35:05 (besides "who stole my nick?!!") 13:35:46 I coding a simple algorithm, and I got to do something like 13:35:51 If it's registered, you can ghost the person using it. 13:36:18 wn+1 = wn + deltaW 13:36:32 where wn+1, and w are vectores 13:37:23 I decided to use Arrays and not lists 13:37:56 that way I get to access the elements faster, I can check the arrays dimensions, 13:38:15 and was thinking about optimising it later using DiffArrays 13:38:49 (so I'd get wn+1 from wn using accum) 13:39:07 I'm getting some nasty stack overflows 13:39:13 (damn lazyness) 13:39:41 but how can I force the evaluation of the array contents? 13:40:03 are you using GHC? 13:40:09 yeap discobob 13:40:17 I know about seq and $! 13:40:38 and I'm using it... 13:41:15 but not really working... arrays are functions... 13:41:36 not really sure how to force the evaluation of the array elements 13:41:43 (I think that's the problem here) 13:41:48 hmm 13:42:13 in fact I'm making the whole stuff quite simple... it's a lil bit more complicated than this, but I think the problem is here 13:43:56 Is the error msg giving you any more info the 'stack overflow'? 13:44:18 Stack space overflow: current size 1048576 bytes. 13:44:19 Use `+RTS -Ksize' to increase it. 13:44:25 eh just the usuall 13:44:49 you got experience with ghc? 13:45:17 I teeny tiny bit, I use Hugs for most of the playing around with Haskell that I do. 13:45:36 yeap... i see... you don't have that kind of problems with interpreters 13:46:21 nick jadrian 13:46:23 opss 13:46:24 --- nick: jadrian_ -> jadrian 13:47:03 registered :-) 13:47:21 so... no ideas? 13:47:22 :( 13:47:27 nope, sorry. 13:47:57 have you looked thru the archieves of the mailing list? 13:48:18 I've read them before when I had issues with lazyness 13:48:28 but seen nothing array related 13:48:39 heh 13:49:41 would it be hard to change your code to be list instead of array based? 13:50:10 nope, and I might try that, but my guess is that it is even worst that way 13:51:35 is wn+1 happening in a recursive function anywhere? 13:52:31 kind of 13:52:45 I got a "until p learn" 13:52:54 the learn function performs one iteration 13:55:38 mm let me check something 13:57:37 nahh... 13:57:42 don't really know what to do 13:58:13 I think the problem is that $! only evaluates your data to head normal form 13:58:27 and wanted it to evaluate the whoel array 13:58:38 then again maybe I'm wrong and the problem is somewhere else 13:58:59 yeap... Doubles are faster then Float :-) 13:59:13 about how many elements are in the array? 13:59:23 the arrays are small 13:59:38 it is not about the size of the arrays 13:59:45 it's about suspensions 14:00:35 try making: foldl (+) 0 [1..100000] 14:00:38 in ghc 14:00:46 you'll get a stack overflow 14:00:56 because you'll get 14:01:09 heh, ya, It kills Hugs too 14:01:19 yeah, you'll get a suspension 14:01:21 of 14:01:37 0+1+2+3+4+5+.... 14:01:51 (not putting the parenthesis... ) 14:01:58 and it will get evaluated in the end 14:02:07 I think that might be happening with my arrays 14:02:28 I probably have a suspension in each position 14:02:41 but: 14:02:44 doh 14:02:47 1. I'm not really sure how arrays work 14:03:09 and that's it 14:04:17 one sec 14:04:31 * Yurik installed ghc-5.02.2 14:05:34 hi Yurik 14:05:49 jadrian: do you have access to 'The Haskell School of Expression'? It has a few pages on arrays that look helpful. 14:05:51 * jadrian installed it too... and all my programs broke lol 14:06:13 discobob: I don't think that book goes into those details 14:06:36 mm 14:06:42 Yurik: now it won't flush the buffer before getting input 14:06:53 Yurik: like it did in 5.00.2 14:07:45 jadrian in ghci? 14:08:09 sorry, I'm very newbie in haskell, just after ocaml&erlang :-) 14:08:42 Yurik: in both ghc and ghci... but if your newbie you won't notice it ;-) 14:08:51 :-) 14:09:37 ah! 14:09:52 think I'm might got it 14:10:00 bbl 14:10:02 --- quit: jadrian ("Client Exiting") 14:22:08 * Yurik is studying haskell 14:55:23 --- quit: discobob (Read error: 104 (Connection reset by peer)) 15:11:48 --- join: jadrian (~none@dial-b3-96-144.telepac.pt) joined #haskell 15:11:54 hi all 15:12:04 again 15:12:21 any one tryed using Diff array yet? 15:19:51 --- join: nodie (~nodie@213-99-67-246.uc.nombres.ttd.es) joined #haskell 15:19:56 hi 15:19:56 hi nodie 15:20:10 tell me nodie, ghc user? 15:20:18 hummm 15:20:24 yes.... 15:20:36 experience with arrays? 15:20:41 (not lists) 15:20:47 no 15:20:52 oh well 15:21:07 guess I'm the only one who actually tried the damn thing :( 15:21:33 i don't know 15:21:51 * jadrian hates the monomorphis restriction, lazyness, pure languages... 15:22:05 I guess I'm starting to hate haskell lol 15:22:05 but arrays don't look like a functional solution... 15:22:27 why not 15:22:31 this is the first step to love it :) 15:22:33 ? 15:22:39 why not? 15:22:42 well 15:22:44 yeap why not 15:22:52 there is nothing unfunctional about it 15:22:55 functional programming works with lists 15:23:03 that makes no sense 15:23:21 you can use whatever ADTs you want 15:23:31 Binary Trees 15:23:40 Queues 15:23:41 yes 15:23:45 Stacks 15:23:49 *Arrays* 15:24:02 but you don't like works with finite lists 15:24:12 has nothing to do with it 15:24:29 I just need to have a set and get random elements from that set 15:24:40 so Arrays seemed like a nice solution 15:24:53 and the elements are vectors 15:24:58 constant size 15:25:09 so arrays seemed a nice solution too 15:25:26 anyway Arrays are even part of Haskell Std libs 15:25:29 not in haskell 15:25:38 why not? 15:25:53 because haskell works with infitite lists 15:26:08 it is more efficiente with infinite lists 15:26:13 nodie, Arrays are even part of the Standard Libraries 15:26:17 ??? 15:26:19 yes 15:26:20 more efficient? 15:26:44 can't you access an array position in O(1)? 15:26:45 more efficient by lazyness 15:27:02 ? 15:27:13 arrays in haskell not have O(1) complexity in access 15:27:21 no? 15:27:38 this is not C or pascal 15:27:39 here 15:27:52 the language make more comprobations 15:27:56 I know... but what is the point of having arrays then 15:28:09 becaue 15:28:24 because they could be usefull porting algorithm 15:28:34 from imperative langauges... 15:28:42 (i think) 15:28:48 I was even thinking about using Diff arrays to make non destructive updates 15:29:05 for example 15:29:07 destructive updates even 15:29:36 trasparent referencing don't permit updates 15:30:01 (i don't know if it is called of this form in english :( sorry) 15:30:15 well it doesn't really destructs them but it relies on internal updates 15:30:23 anyway you are not write 15:30:27 look, from the manual: 15:30:43 "So if a diff array is used in a single-threaded style, i.e. after (//) application the old version is no longer used, a!i takes O(1) time" 15:30:52 O(1) 15:31:31 ok 15:31:38 excuse me 15:32:27 the diff array is just different from 'normal' arrays because when using the // operator 15:32:30 like 15:32:46 w // 'list with associations' 15:33:19 its contents are physically updated in place 15:33:36 and that's exactly what I wanted 15:33:43 but I'm having some problems 15:34:25 oh well... bbl 15:34:35 --- quit: jadrian ("Client Exiting") 15:51:10 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 15:54:27 --- quit: shapr (Read error: 32 (Broken pipe)) 15:56:19 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 16:47:54 --- quit: nodie ("a dormir") 19:53:57 --- join: qbert (~mmrmiagi@12-238-239-84.client.attbi.com) joined #haskell 20:12:54 --- join: PragDave (~dave@pragdave210.august.net) joined #haskell 20:26:53 --- join: abiwanu (abiwanu@64.92.76.208) joined #haskell 20:27:23 --- part: abiwanu left #haskell 21:21:18 talkative bunch 21:51:23 --- join: nucoder (nucoder@hoi-tx7e-179.rasserver.net) joined #haskell 21:52:01 hello, (this seems like an appropriate place to ask the question)... 21:52:18 does anyone here know anything about VW grammars? 21:52:28 in the context of parser generation? 21:58:59 --- part: nucoder left #haskell 21:59:54 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 21:59:54 --- quit: Heffalump (carter.openprojects.net irc.openprojects.net) 22:02:09 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 22:02:09 --- join: Heffalump (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 22:26:16 --- join: discobob (discobob@slc1416.modem.xmission.com) joined #haskell 22:34:51 shapr! 23:09:25 --- nick: Yurik -> Yuri 23:09:30 --- nick: Yuri -> Yuri\ 23:10:48 --- nick: Yuri\ -> Yurik 23:41:35 --- nick: LoganZzZz -> Logan 23:59:59 --- log: ended haskell/02.01.26