00:00:13 @google site:haskell.org Oleg 00:00:16 http://www.haskell.org/pipermail/haskell/2004-June/014109.html 00:00:16 ... which seems to be the case still 00:00:16 Title: [Haskell] Re: how to write a list builder? fixpoint? 00:01:01 http://www.google.com/search?q=site:haskell.org/haskellwiki 00:01:02 Title: site:haskell.org/haskellwiki - Google Search 00:03:12 Good call 00:05:16 but at least now it the webmaster tools say that robots.txt allows it to index the wiki 00:05:50 hopefully the crawler will recrawl the wikipages a bit sooner than they'll look at the homepage ;-) 00:06:26 apparantly they last crawled http://www.haskell.org/ in july 2006... 00:06:27 Title: Haskell - HaskellWiki 00:10:06 variables are a misnomer in haskell 00:10:06 <- noob 00:10:41 whitenoyce: no more than in math 00:11:20 but why would a constant be called a variable if it does not vary? 00:11:36 Because it varies with the environment 00:11:48 C-- calls those things you are thinking of "registers" instead of "variables" 00:11:51 iirc 00:12:18 makes more sense, anyways. 00:12:40 whitenoyce: for example in (\x -> x + 5), x is a variable, even though whenever the lambda is actually applied, it remains constant through that application 00:13:07 (what the lambda gets applied to is really what varies) 00:13:44 whitenoyce: your computer finished upgrading? =) 00:17:02 why does yahoo's search results look so much like google's (in style, not content)... 00:17:13 byorgey, yes 00:17:28 E: Sub-process /usr/bin/dpkg returned an error code (1) 00:17:29 but ghci works 00:17:46 i like yahoo's search 00:17:47 whitenoyce: yah, I might expect some sort of glitch 00:17:56 live.com is pretty good too 00:18:13 whitenoyce: you should probably try running dist-upgrade again, and keep running it until it doesn't do anything 00:18:27 whitenoyce: or at least until it keeps returning the same error 00:19:42 yeah, its on a couple of unimportant packages 00:19:47 i'll just ignore it 00:20:07 or edit /var/lib/dpkg/status 00:21:37 ACTION whitenoyce pokes at haskell and gets surprises 00:21:42 whitenoyce: they're variables in exactly the same sense as variables in algebra 00:21:49 let n=[1,2,3] 00:21:57 the imperative use of the word is the deviant 00:21:57 let n=0:n 00:21:59 uh, oh 00:22:10 Malbolge rules'em all. 00:22:14 why does everyone use the same syntax for site search now? 00:22:28 > let n = 0:n in n 00:22:29 [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0... 00:22:40 perfectly valid Haskell =) 00:22:46 SamB_XP: To spite the guy who invented printf-format multisearch customization (in firefox eg) 00:22:49 ACTION is guessing 00:23:00 heh 00:23:10 well its not identical 00:23:18 p= for yahoo 00:23:23 nice idea tho sorear ;) 00:23:24 results.aspx for msn 00:23:31 whitenoyce: that made sense re variables? 00:23:32 n= for yahoo 00:23:37 a cookie for msn results 00:23:39 whitenoyce: within the variable 00:23:44 num= for google 00:23:53 yeah i got the variable thing 00:24:00 whitenoyce: ok, ok... =) 00:24:11 all of them use the site:haskell.org/haskellwiki syntax 00:24:22 SamB, oh that 00:24:26 msn doesn't 00:24:27 sorear: "madness" is feminine. you should say "mucha madness". 00:24:30 yahoo not really 00:24:36 siteexplore.yahoo.com 00:24:39 whitenoyce: live search does 00:24:50 SamB, they must've fixed it 00:24:58 they keep breaking it 00:25:00 and yahoo said it was redirecting my site: search to site explorer 00:31:48 unfortunately, not only do they all seem to use the same site: syntax, none of them seem to have any content from haskellwiki 00:33:13 huh. exalead has 00:33:25 (I learned of them through my own HTTP logs ;-) 00:33:26 SamB_XP: that's a known problem - see http://haskell.org/robots.txt ... 00:33:43 int-e: I got Igloo to append a ? this morning, though 00:34:53 google has the new robots.txt, both for www.haskell.org and for haskell.org 00:35:10 I see. hmm. 00:35:20 but they don't seem to have crawled any wiki pages yet. I'm obviously being too impatient. 00:35:39 now if only I'd checked exalead before Igloo changed robots.txt, or shortly afterwards... 00:36:13 how much of the search market has google by now? 00:38:07 @google inurl:Haskell_in_5_steps 00:38:09 http://www.haskell.org/haskellwiki/Haskell_in_5_steps 00:38:09 Title: Haskell in 5 steps - HaskellWiki 00:39:19 (but google has no contents for that page. the search finds a proxy though, funny) 00:40:54 hmm. I think exalead just doesn't throw stuff out when you restrict access using robots.txt 00:41:52 and they seem to have indexed a couple of pages since Igloo changed robots.txt 00:42:58 @google google 00:42:59 http://www.google.com/ 00:42:59 Title: Google 00:43:12 y0 00:43:19 x0 00:43:39 @google exabot 00:43:43 http://www.exalead.com/ 00:43:43 Title: Exalead - Internet search engine, image search engine, video search engine ... 00:44:17 one can't compose @ commands with > haskell results. that is sucky. 00:44:23 @eval 2+2 00:44:33 @. show run 2+2 00:44:34 " 4\n" 00:44:38 run? 00:44:40 no wait, exalead hasn't updated any of their index data... 00:44:54 well. maybe they have. 00:44:54 @. google run fix ("google":) 00:44:56 http://video.google.com/ 00:44:57 Title: Google Video 00:44:59 but I was misreading the dates... 00:45:34 @. google . read . run replicate 10 y 00:45:35 Plugin compose' failed with: IRCRaised Parse error: "replicate" 00:46:17 @read 2+2 00:46:17 Plugin dummy' failed with: IRCRaised Prelude.read: no parse 00:46:22 @show 2+2 00:46:22 "2+2" 00:46:45 heh 00:46:49 @. google . run replicae 10 y 00:46:50 Plugin compose' failed with: IRCRaised Parse error: "replicae" 00:46:56 @. google . run replicate 10 y 00:46:56 Plugin compose' failed with: IRCRaised Parse error: "replicate" 00:47:05 @help run 00:47:05 run . You have Haskell, 3 seconds and no IO. Go nuts! 00:47:10 @. google . read run replicate 10 y 00:47:10 Plugin compose' failed with: IRCRaised Prelude.read: no parse 00:47:18 @help read 00:47:18 read "". Print 00:47:20 @. google run replicate 10 y 00:47:22 http://blogs.msdn.com/wesdyer/archive/2006/12/26/reading-and-writing-queries.aspx 00:47:22 Title: Yet Another Language Geek : Reading and Writing Queries 00:47:28 there we go 00:47:56 @run replicate 10 y 00:47:57 Not in scope: y' 00:48:09 @show . run replicate 10 y 00:48:09 ". run replicate 10 y" 00:48:17 er, oops 00:48:20 @. show run replicate 10 y 00:48:21 " Not in scope: y'\n" 00:48:25 @. google run replicate 10 "y" 00:48:27 http://en.wikipedia.org/wiki/Y 00:48:28 Title: Y - Wikipedia, the free encyclopedia 00:48:31 isn't this preview the best: http://www.exalead.com/search/results?q=hugs+mode+for+emacs&x=0&y=0 00:48:35 Title: hugs mode for emacs - Exalead Search, http://tinyurl.com/yns2ry 00:49:09 the top thumnail on the left 00:49:27 @. quote quote 00:49:27 No quotes match. The more you drive -- the dumber you get. 00:49:35 @quote 00:49:35 SeanRussell says: [On the wmii (window manager) mailing list] Hah! That's a laugh. Since when does "it compiles" equate to "it will run (correctly)"? We're talking about C, after all... not 00:49:35 Haskell. 00:49:47 @quote 00:49:47 The says: alien rulers of the galaxy must surely use a statically typed language with type inference 00:49:54 @quote 00:49:54 malig says: I have to admit I'm still stunned when "tying the knot" actually works. it's like I just performed the kind of magic that normally requires a lot more goat's blood 00:50:14 @quote magic 00:50:14 malig says: I have to admit I'm still stunned when "tying the knot" actually works. it's like I just performed the kind of magic that normally requires a lot more goat's blood 00:50:19 ?quote magic 00:50:19 ghc says: magic number mismatch: old/corrupt interface file? 00:51:03 ?. quote . google . show run chr(181) 00:51:06 No quotes for this person. You speak an infinite deal of nothing 00:51:10 ?. quote . google . show run chr(65) 00:51:14 No quotes for this person. Are you on drugs? 00:51:21 @quote state 00:51:22 state says: ?. ++ . read . show . state ?. ++ . read . show . state 00:51:55 @quote drugs 00:51:56 LoganCapaldo says: @src fixIO Source not found. Are you on drugs? No Meanie 00:52:02 @quote drugs 00:52:02 dylan says: pugs, darcs, and lambdabot: gateway drugs to haskell. 00:52:13 @quote drugs 00:52:13 LoganCapaldo says: @src fixIO Source not found. Are you on drugs? No Meanie 00:52:49 @quote mean 00:52:50 edwinb says: I've just walked past a poster advertising a gig by a band called "The Awkward Squad". I assume this means they provide output, play concurrently, and people take exception to them. 00:54:15 @quote grep 00:54:15 Kahdloc says: why's it called filter and not grep? :/ 00:54:30 OH. that's a protontorpedoism if I ever saw one. 00:56:16 @seen dons 00:56:16 dons is in #xmonad, #haskell-soc and #haskell. I last heard dons speak 10h 38m 7s ago. 00:57:14 wth is haskell-soc? 00:57:22 soc=summer of code 00:57:25 @where soc 00:57:25 http://hackage.haskell.org/trac/summer-of-code/ 01:06:09 our channel about socks. socks are very important in haskell. 01:06:20 syntaxfull: are you the same as syntaxfree? 01:07:13 SyntaxNinja: he has the same userinfo, Diego Navarro 01:07:44 21:24 < syntax> sorear: "madness" is feminine. you should say "mucha madness". 01:07:53 21:24 -!- You're now known as syntaxfull 01:08:12 @seen syntaxfree 01:08:12 I haven't seen syntaxfree. 01:08:30 whew 01:08:38 @seen syntaxfull 01:08:38 syntaxfull has changed nick to syntaxfree. 01:08:38 syntaxfree is in #haskell-blah and #haskell. I last heard syntaxfree speak 45s ago. 01:08:39 @seen Syntaxfull 01:08:39 Syntaxfull has changed nick to syntaxfree. 01:08:39 syntaxfree is in #haskell-blah and #haskell. I last heard syntaxfree speak 45s ago. 01:08:43 I was afraid there was yet another syntax-something 01:08:45 22:08 -NickServ(NickServ@services.)- Password accepted - you are now recognized 01:08:48 @quote stereo 01:08:48 Cale says: Welcome to #haskell where your questions are answered in majestic stereo! 01:08:49 heh. 01:09:04 not only answered in stereo, but asked, too! 01:12:48 well, that was a conversation-killer 01:13:11 or did i get booted again? 01:13:27 conversations are not living entities. 01:13:31 they cannot be killed. 01:13:41 syntaxfree: you ruined it 01:14:34 syntaxfree, prove it 01:27:16 lots 01:28:39 straws 01:29:11 nuns 01:39:49 @tell kosmikus lhs2TeX doesn't typeset strict fields very well (probably unfixable) 01:39:49 Consider it noted. 01:44:47 tab made 01:45:34 ? 01:47:26 can i get the directory my program is executing in 01:47:48 i mean the path of the executable 01:47:59 as opposed to the $PWD 01:48:07 no 01:48:21 well you *can*, but it requires very deep hackery 01:48:30 strace? 01:48:35 deeper 01:48:45 deeper then strace? 01:48:49 read the code! 01:49:02 rabbitear: As in, using undocumented kernel features 01:49:10 sorear: strace doesn't do that? 01:49:11 ohhh. 01:49:19 which ondocumented features? 01:49:20 strace is at least documented, and uses ptrace which is also 01:49:25 you'll need to readlink /proc/self/exe 01:49:29 ... does linux have a ticket tracker? 01:49:43 SamB_XP: the documentation for things under /proc is woefully lacking 01:49:44 sorear: how is that undocumented 01:49:57 well, I mean, ls -l isn't documentation ? 01:49:58 I don't know 'this app' 01:50:04 to say. that.. 01:50:07 SamB_XP: afaict man 4 proc hasn't been updated since before 2.0.x 01:50:43 sorear: and ls -l doesn't count as documentation? 01:50:45 SamB_XP: by that logic the source code must count too 01:51:02 sorear: well, nearly 01:51:03 must count.. 01:51:27 you should be able to see where a file is being 'got' from the source 01:51:44 dancor: But if you're trying to access the directory of an exec, you are doing something very very un-unixlike 01:52:09 sorear: what is this app? 01:52:31 dancor: distributed programs are strongly encouraged to follow the Filesystem Hierarchy Standard, which says that your progam is in /usr/bin and none of your data files are there 01:52:36 rabbitear: no clue, ask dancor 01:52:48 rabbitear: oh, Linux 01:52:53 linux proper that is 01:53:00 sorear: the kernel itself? 01:53:02 yes 01:53:06 sorear: oh.. 01:53:32 sorear: I can't go there.. 01:53:56 rabbitear: Linux proper::has undocumented features No clue, ask dancor::can i get the path of the executable? 01:54:01 rabbitear: clarifies? 01:54:08 sorear: maybe he wants to know what prefix it is installed in 01:54:16 i.e. /usr vs. /usr/local 01:54:39 I really don't know the topic here. 01:54:43 dancor: if what SamB_XP says is true, @PREFIX@ 01:55:38 i'm reading the FHS. thanks 01:57:51 dancor: good idea 02:02:04 i have an executable and a bunch of png files. i have no immediate vision for how this would install onto /. but right now i have the executable progName in ~/p/progName and the images in ~/p/progName/data. i just want to be able to run the program as ~/p/progName/progName. what is the correct thing to do, link the binary to ~/bin (or ~/usr/bin) and the data dir to ~/lib/share/progName and the program has to guess if it should loo 02:03:45 images would go in PREFIX/share/progName/ 02:03:53 executable in PREFIX/bin/ 02:05:00 right ok. and how do you access PREFIX in the .hs? 02:05:27 dancor: you got cut off sat "it should look" 02:07:46 and so even when you guys are testing programs you have this structure in place (and PREFIX is like . or ~) ? 02:09:17 dancor: at compile/installation time you wire the prefix into the executable 02:09:43 it could be just a shell script which execs the real program and passes the prefix in environment or args 02:10:24 dancor: if its not for you re-read FHS 02:10:45 dancor: other wise, its not an issue 02:10:54 so, I'm trying to figure out how to take some text and return a list of all the URLs in it, and I check out Text.HTML and I see 'address :: Html -> Html' in , but this doesn't help me at all. where do I find the real documentation which actually describes what it does? 02:10:54 http://www.haskell.org/ghc/docs/latest/html/libraries/html/Text-Html.html> 02:10:55 is it possible to specify PREFIX and PROGNAME (?) in the .hs file to be filled in at compile time 02:12:10 It certainly is possible in a variety of ways. 02:12:23 yeppers 02:12:34 FHS would have people not complain 02:13:00 ddarius: but would i have to do something myself (sed 's/@PREFIX@/../g') 02:13:36 dancor: That's one possibility, or you can use CPP, or you can import a module that gets made, or you can use TH, or you can do a variety of other things. 02:14:37 how do you have Cabal tell you where your files will be? 02:14:48 well which one is the most unixlike since what i wanted to do, in this world of possibilty, apparently wasn't :) 02:14:56 also, it occurs to me that Cabal should support games ;-) 02:15:11 SamB_XP: ? 02:15:29 ddarius: games go in different places from ordinary programs 02:15:51 And Cabal doesn't support that? 02:17:56 i guess i'm confused how i can take the --prefix you give to ghc or cabal and replace strings in my source 02:18:12 The most unixy way would probably be to have an environment variable and/or commandline option to specify the directories. 02:18:21 I had momentarily forgotten about Cabal. 02:18:33 well, game binaries go in /usr/games, data goes in /usr/share/games, highscores go in /var/games 02:18:42 sorear is getting senile in his old age 02:18:58 Autoconf works by substituting information like the prefix for special tokens such as @PREFIX@ for the prefix, in a list of files. 02:19:11 In cabal, you use a Paths_ module, *finds url* 02:20:12 http://www.haskell.org/ghc/docs/latest/html/Cabal/authors.html#paths-module 02:20:14 Title: 2. Creating a package, http://tinyurl.com/yv8xjt 02:20:21 ddarius: he has old age remarkably early! 02:20:41 that is either out of date or deliberately vague; it does not document most of the Paths_ functions 02:22:32 sorear pasted "sample Paths_ module" at http://hpaste.org/235 02:23:17 ACTION whacks Text.Html out of frustration. I just wanted to parse some URLs out of some text! why is that so hard? :( 02:23:39 because Text.Html is a pretty printer 02:23:45 I think you wanted a parser 02:23:49 oh 02:23:56 lol 02:23:58 ACTION feels foolish now 02:24:17 that would explain why feeding 'address' a html document was not producing useful results. 02:24:25 ACTION smiles at relaxed "lol" policies 02:24:47 but, do you smile out loud? 02:25:05 Korollary: of course not 02:25:13 my face isn't broken, you know! 02:25:50 @where tagsoup 02:25:50 http://www-users.cs.york.ac.uk/~ndm/tagsoup/ 02:26:05 gwern: ^^^ ndm's pathetic attempt at parsing html 02:26:10 sorear: actually, I'm looking at the tagsoup manual now 02:26:18 :) 02:26:41 seemed like the only one on the wiki's list even remotely near my need :( 02:26:49 and speaking of the wiki, why is the #1 hit for 'haskell wiki' the *old closed* wiki? 02:27:05 gwern: because google is banned from indexing the new one 02:27:33 or rather "was", but the problem was fixed an hour or so ago, no time to reindex 02:27:40 oh. the stupid robots.txt issue again? 02:27:42 yeah 02:27:49 sorear: we updated robots.txt probably 12 hours ago 02:28:04 (sheesh, I mean you could just copy wikipedia's robot.txt if it's really that hard to write a good one) 02:28:06 google.com read the new robots.txt sometime after 4:00 PDT 02:28:52 gwern: but our urls are different and Igloo refuses to shorten them 02:29:02 07:31 < Igloo> That would break every external link for little gain 02:29:24 'refuses' in an exaggerated sense 02:29:29 Igloo also said it was an issue for the wiki administrator... 02:29:38 so do a search/replace then 02:29:58 gwern: you are going to go and do a search/replace on our irc logs? 02:30:04 that we don't manage? 02:30:47 @seen nef 02:30:47 I haven't seen nef. 02:30:50 heh 02:30:57 SamB_XP: 'twas referring to searh/replace the different links in robots.txt 02:31:01 I don't think I've ever seen nef 02:31:10 it's possible that I saw nef in #tunes, I dunno 02:31:12 just moving the scripts pages won't hurt references 02:31:21 Saizan: yeah. 02:31:54 but anyway I realized that if we stick a ? in the excluded path, it will only exclude scripty usage 02:32:17 see robots.txt ;-) 02:32:49 i was reading when you suggested this :) 02:33:19 @seen hcr 02:33:20 I haven't seen hcr. 02:33:20 @seen hcf 02:33:21 I haven't seen hcf. 02:33:36 > 29/30 02:33:40 0.9666666666666667 02:34:03 ... my mom was bugging me to calculate that... 02:37:31 huh, google didn't trademark SafeSearch ? 02:38:27 huh. search.live.com knows and uses the fact that I'm in Upper Darby? 02:38:37 I guess it isn't that hard to find from my IP address... 02:41:22 huh. for some reason when I clicked on "for site owners" at the bottom of my Live search results, the first thing on the list was about Daylight Savings Time issues, and apparantly to fix them I need to finally install SP2 :-( 02:41:31 ACTION lacks the harddrive space to do this 02:44:50 dist/build/autogen/Paths_Ta.hs:7:7: 02:44:50 Could not find module Data.Version': 02:44:51 it is a member of package base, which is hidden 02:45:27 dancor, what do you get from ghc-pkg list 02:45:38 I'm guessing it is a GHC bug 02:45:44 what GHC version? 02:45:52 6.6 02:46:08 no, wait. 02:46:11 chessguy: there is a lot of pkgs, what am i looking for 02:46:14 why is base hidden? 02:46:19 ACTION silly 02:46:27 danuh...Data.Version? 02:46:40 err, dancor 02:46:51 dancor: oh, maybe you need to say that your package uses base? 02:47:52 SamB_XP: yes of course.. thanks 02:48:22 it seems kind of silly that it is necessary to specify that you need base ;-) 02:49:15 not at all, base doesn't use base 02:50:24 Windows 98 requires *5* reboots to install? wow! 02:51:23 Debian requires 0. /me feels superior 02:51:45 *0*? 02:51:52 I thought it required 1. 02:52:09 it's *encouraged*, but there is an option to skip it 02:52:20 first boot: install stuff to harddrive (including, say, the kernel) 02:52:41 second boot: okay! (install anything else you missed the first time) 02:52:59 Turn on, boot from CD (which has a perfectly good kernel), install stuff, 02:53:11 third boot: oops! I need to do this and that with /etc/init.d before the system gets back to proper working order... 02:53:19 EITHER: reboot, load kernel from hdd, install everything else 02:53:40 OR: chroot and exec the second phase install scripts while still running off CD 02:53:52 can you keep it running like that indefinately? 02:53:55 is it a good idea>? 02:53:59 Yes, and No. 02:54:09 so, I still say that's one reboot. 02:54:31 no reboots would be if you didn't *need* to boot before installing 02:55:10 oh where's all the lovely code gone? *groan* 02:55:21 @botsnack 02:55:21 :) 02:55:57 arke, erousseau, tozefs, dureyes, NDP-Kubuntu, NDPTAL85, NDPMacBook, hb2 02:56:01 s/hb2/gb2/ 02:56:19 those are the freenode users coming from ~nef's ISP 02:56:38 something tells me the NDP* are bots 02:56:47 @src fix 02:56:47 fix f = let x = f x in x 02:57:08 well, okay, so maybe that takes care of the logs in ~nef 02:57:12 what about the ones on meme? 02:57:23 he's much less anonymous 02:57:31 hmm? 02:57:31 ACTION points at cmeme 02:57:33 @src type 02:57:33 Source not found. It can only be attributed to human error. 02:57:46 thats good 02:57:52 * Logs are available at ~nef/logs/tunes/, WWW-browsable at Kevin Rosenberg's Meme Log Interface. 02:57:52 so how do the ~nef logs get from clog to ~nef anyway? 02:57:54 you're absolutely right lambdabot :) 02:58:05 SamB_XP: ~nef has the same IP as clog 02:58:11 hehe 02:58:28 sorear: you didn't mention clog as one of the irc users from ~nef's IP... 02:58:44 yea, I filtered him out as a definite-bot :) 02:58:53 I'm sure all you irc users are okay 02:59:10 unfortunately ~nef (hcf) has a VERY dynamic IP, seen changing multiple times in an hour 02:59:36 the 9 users are from the class B subnet registered to the RCN corporation 02:59:47 rabbitear: you are a mathematician no? 02:59:50 sorear: wow 02:59:57 igli: no 02:59:59 mine doesn't change nearly that often 02:59:59 ? 03:00:17 i'm also googlestalking based on 7 year old logs :) 03:00:23 what I say here is not necessary what I'm saying here 03:00:39 isn't much, I have a purpose here... 03:00:41 sorear: um. 03:00:53 since when does bespin change IPs several times an hour? 03:01:08 ah ok 03:01:22 SamB_XP: he also comes in from RCN directly 03:01:28 huh. 03:01:57 cmeme is commercial and clog is non-profit, interesting 03:02:23 cmeme also doesn't have a RealName 03:02:53 and cmeme doesn't respond to CTCP version like CLOG does 03:03:08 CLOG is apparantly still at version 0 03:04:23 heh 03:04:55 MS suggests to keep site hierarchies fairly flat ;-) (one to three links from frontpage to other pages) 03:07:38 hmm, nef seems to have moved 03:07:47 2003 logs give a different ISP 03:08:06 great works internet, ME (what state is that?) 03:08:32 *nobody* within the /18 block is on freenode 03:09:02 ACTION goes back to hmenu hacking 03:10:35 maine 03:12:14 does RCN own the US now? 03:12:27 Royal Canadian Newbies? 03:12:57 what is RR? 03:13:10 Reading Responce 03:13:37 I'll have to kick you in the shin now 03:13:54 ACTION wants a pie chart of #haskell ISPs 03:14:00 or two 03:14:12 *:P* 03:14:20 is RCN an IRC network? 03:14:23 ACTION is clueless 03:14:24 rabbitear: Are you learning Haskell? 03:14:34 shapr: not really..... 03:14:40 RCN is Residential Cable Network 03:14:43 shapr: I'm learning the locals 03:14:51 shapr: there's a difference 03:14:54 they offer TV, phone, and internet 03:15:04 We get phone and 'net from them 03:15:04 rabbitear: Why are you learning the locals? 03:15:08 shapr: I have to sing sometimes without fear 03:15:38 rabbitear: The purpose of this channel is really to to learn and teach programming, with a specialization in Haskell. 03:15:56 I know C only 03:16:07 rabbitear: Do you want to learn Haskell? 03:16:23 I wrote a bunch when I was little, just going on a trip 03:16:27 if he hangs out here, he probably will 03:16:39 about other people, sick of the deadity 03:16:52 rabbitear: That sounds like randomly generated nonsense. That sort of thing will get you kickbanned if you continue it. 03:17:23 well, kick me then, I'm will say that to you next time too 03:17:42 it doesn't sound like MegaHAL 03:17:48 If you get kickbanned there isn't a next time? 03:17:58 MegaHAL would say things that were somewhat more related to other things 03:18:06 shapr: I don't know 03:18:10 (or somewhat less) 03:18:25 SamB_XP: RR is "roadrunner", Time/Warner's trademark name for their west coast cable internet offering 03:18:44 *bows* 03:18:45 rabbitear: Have you tried the Haskell tutorials? 03:19:01 no... just got here today 03:19:56 rabbitear: Try this: http://www.haskell.org/haskellwiki/Learning_Haskell 03:19:57 Title: Learning Haskell - HaskellWiki 03:20:43 @go Learning Haskell 03:20:44 http://www.haskell.org/learning.html 03:20:44 Title: Learning Haskell 03:20:47 hmm. 03:21:07 how old is that page? 03:21:14 did we even know it was still there? 03:21:25 shapr: where is your thesis statement? 03:22:12 interesting. a discordian influence in haskell. 03:22:38 555 page views since 2004? 03:22:44 not too popular sounding... 03:22:50 rabbitear: Seriously, please stay on the Haskell topic. 03:23:02 shapr: I will try 03:23:19 sorear: Road Runner isn't just on the West Coast...it's also here in Texas 03:23:27 SamB_XP, it can't be too old, it has SOE and COFP 03:23:55 rabbitear: If you want to chat about non-Haskell subjects with the people who frequent #haskell, try #haskell-blah, it's specifically for that sort of off-topic discussion. 03:24:01 Jaggederest: Hail Eris? 03:24:25 shapr: I was referring to the rabbitear :) 03:26:01 shapr: I'm nobody but I just got here, right? no thesis statement in your website 03:26:56 rabbitear: I wasn't aware that I needed one? 03:27:43 see? either discordian or linguistic barriers. 03:28:27 I'm trying to figure out if it's worth building a game in haskell. Are the libs/etc up to snuff? 03:28:35 rabbitear: I think my thesis statement would be "One day I will have a thesis." 03:28:50 say that!!! 03:28:55 it says " http://www.haskell.org/haskellwiki/Learning_Haskell 03:28:56 Title: Learning Haskell - HaskellWiki 03:29:02 sorry 1 sec 03:29:12 Jaggederest: You won't find a pygame equivalent, but there are bindings to OpenAL, OpenGL, SDL, Cairo, gtk, gtkglarea, and lots more. 03:29:21 rabbitear: That's not my website. That's the Haskell wikiwiki. 03:29:23 it says "This portal points to places where you can go if you want to learn Haskell." 03:29:32 Yes, it does say that. 03:29:46 this is a nice little site: http://www.haskell.org/complex/why_does_haskell_matter.html 03:29:47 Title: The Lambda Complex 03:29:54 so! is what they gonna not tell you 03:30:20 ok. I know haskell school of expression deals with GL/sound stuff, I'm thinking a game would be a fun project. 03:30:54 I'm a fifth party 03:31:00 plus one might entertain the notion of selling it. 03:31:07 Jaggederest: Some existing games written in Haskell are Frag (quake clone), Yampa Arcade (space invaders game implemented with arrows), and a tank game and a parachuting game I've seen around. 03:31:28 Jaggederest: SOE doesn't really deal with gamey stuff much... 03:31:42 rabbitear: Dude, you're pushing it. 03:32:16 ah proof of concepts. Do they come with code? No, but the core algorithms are the same and I've done some c# d3d stuff 03:32:27 shapr: yes I am, it doesn't like me 03:32:39 b&! 03:33:14 remind me to check the stats in a couple of days 03:33:55 Which stats? 03:34:01 @where stats 03:34:02 http://www.cse.unsw.edu.au/~dons/irc/ 03:34:05 those stats 03:34:16 I want to see if it still says "nobody got kicked" 03:34:19 hehe 03:34:52 Jaggederest: What sort of game do you want to write? 03:35:09 Jaggederest: Frag and Yampa Arcade come with sources. 03:35:20 sweet 03:36:14 I'm thinking a SDL-based tower defence game, since that type seems to be the next sudoku in terms of popularity 03:38:07 If you decide to do it as open source, I think I'd enjoy hacking on that. 03:39:26 yeah, these flash ones leave a lot to be desired. I keep wanting to fix bugs but oops, closed-source binaries. 03:39:49 Yup 03:39:55 well, effectively closed, since you can disassemble .swf but only poorly 03:40:13 I played a few of those tower defense games recently, they're fun. 03:40:30 Onslaught and desktop defence or something. 03:40:57 http://onslaught.playr.co.uk/ yup that's the best one so far 03:40:59 Title: Onslaught 03:41:17 desktop defence is fun also. 03:41:59 http://novelconcepts.wordpress.com/ apparently those two are making six figures off DTD 03:42:00 Title: Paul & Dave’s Novel Concepts 03:42:39 How? 03:42:50 Advertising? 03:43:15 yes. In-game mochiads 03:43:36 plus they are making custom versions for companies' sites 03:43:43 eg wrigley gum has one 03:44:35 Grumble, grumble. mplus v. mappend just wasted 10 minutes or so 03:44:36 Amazing 03:44:40 http://www.mochibot.com/shared/shared_swfdetail.html?key=7cc46d900ed3978e8a7af588dd20aa91 03:44:42 Title: MochiBot.com :: SWF Detail :: Flash Element TD, http://tinyurl.com/2y7bsy 03:44:53 Too bad Flash is closed source. 03:45:19 Someone was writing a Haskell to Flash compiler, but I think they dropped it and never released the source. 03:45:30 yup. Might be interesting to... yes that heh 03:45:31 @seen stepcut 03:45:31 stepcut is in #xmonad, #haskell-blah and #haskell. I last heard stepcut speak 1d 43m 3s ago. 03:46:33 I'm interpreting the copyright comment on the Haskell 98 report as allowing and encouraging this. http://www.cafepress.com/cdsmithus.139965523 Anyone disagree? 03:46:39 swf internally isn't that complicated compared to most bytecode formats, it's just the edge case stuff from the proprietarp back end 03:48:19 yes it's BSD, you can sell it 03:49:09 I did that so I could buy it myself. I just want to make sure no one thinks its on the shady side. 03:49:31 nope as long as it's all there you're legit. 03:49:34 http://www.amazon.co.uk/Haskell-98-Language-Libraries-Revised/dp/0521826144 03:49:36 http://tinyurl.com/24cc3h 03:49:37 cdsmith: ^^^ 03:50:07 sorear: oh, I missed that! :( But yikes, 45 pounds! 03:50:59 yeah, the cafepress one looks like a steal :) 03:52:06 Does buying the one from Cambridge Univ. Press get money to actual Haskell people, or is it all profit for unrelated publishing sorts? 03:53:34 ACTION doesn't know 03:53:47 probably at least 90% unrelated costs. 03:54:07 Okay, just checking for any possible reason to pay a lot more. 03:55:07 prolly rather you buy the cheaper one and give half the difference direct :) 04:04:44 I am using System.Directory library to handle some files. How can I test if a file is a symlink without execute a external command (using system in System.Cmd)? 04:08:16 haskell to flash wouldn't be that hard, same issues as compiling to javascript, but you get a faster runtime 04:08:30 in Posix at a guess, since symlink is a posixish thing 04:08:31 edwardk: Would you go from STG to flash? 04:08:42 yeah 04:08:45 same approach 04:08:58 i'd go stg to ecmascript 4, which gives me actionscript for free ;) 04:09:01 @hoogle getSymbolicLinkStatus 04:09:05 No matches found 04:09:25 and the side effect of not having expensive hash lookups for every single operation 04:10:23 mlh_: Yes, in Posix 04:11:40 edwardk: Did you ever find a way to get STG out of GHC? 04:13:15 i have an open feature request, ian punched it in for 6.8 04:17:10 hrm, yhc core *used* to uniquify all the variable names across all functions (as far as I could tell), but recently they added v_fail_0, v_fail_1, etc, which are only unique within a function :( 04:18:35 ACTION is compiling haskell -> flash at this very moment... 04:24:52 i just set up ubuntu, and i am looking for haskell-binary package, i found one here, http://www.lv.kernel.org/pub/mirrors/ubuntu/pool/universe/h/haskell-binary/, i am new to apt, so what repo would i need to add to /etc/sources.list for me to grab that package? 04:24:54 Title: Index of /pub/mirrors/ubuntu/pool/universe/h/haskell-binary, http://tinyurl.com/2h7fjm 04:25:39 aeyakovenko: feisty ? 04:25:55 stepcut, i am on feisty 04:26:59 probably the lines that contain universe on this page -> http://www.psychocats.net/ubuntu/sources#feisty 04:27:01 Title: Enabling Extra Repositories 04:30:36 why is there a pool/universe and a dists/feisty/universe? do i need to add pool as a source? 04:31:13 no 04:31:14 stepcut, are you the one working on the haskell-to-flash compiler? I'd be really interested in that 04:31:41 ubuntu stepcut 04:31:53 er sorry 04:32:03 ACTION wakes up 04:32:22 aeyakovenko: no. just the dist 04:32:56 aeyakovenko: the dist is a specification that says what files belong to that release (like feisty). The pool is where all the actual .debs live 04:32:59 stepcut, well i have feisty already enabled 04:33:20 oh i see 04:33:21 aeyakovenko: do you have the universe component enabled ? 04:33:36 hmm, eb http://us.archive.ubuntu.com/ubuntu/ feisty universe 04:33:38 Title: Index of /ubuntu 04:33:44 yea i think i do 04:33:45 Jaggederest: yes -- soon it may even work ;) 04:33:59 Jaggederest: and, then I can rewrite it to not suck :p 04:34:14 aeyakovenko: that looks correct to me 04:34:50 aeyakovenko: the binary deb you want to install is, libghc6-binary-dev 04:35:04 aeyakovenko: which comes from the haskell-binary source deb 04:35:49 hmm, E: Couldn't find package libghc6-binary- 04:35:57 hmm, E: Couldn't find package libghc6-binary-dev, i mean 04:36:26 i did an apt-get update, and it Hit http://us.archive.ubuntu.com feisty/universe Packages 04:36:26 Title: Index of / 04:36:33 aeyakovenko: can you join #haskell-overflow, I don't want to flood the channel with this conversation 04:36:41 sure 04:44:41 Jaggederest: my swf library is at: http://www.n-heptane.com/nhlab/repos/haskell-swf/ and the haskell->swf is at http://www.n-heptane.com/nhlab/repos/yhc/, but it is not really usable yet 04:44:43 Title: Index of /nhlab/repos/haskell-swf 04:45:19 i just wrote (+ a b) instead of (a + b) 04:45:29 this infix stuff is too difficult for me!! 04:46:39 well, (+) a b, would have worked :) 04:49:49 @google Typed Quote/AntiQuote 04:49:52 http://www.informatik.uni-bonn.de/~ralf/publications/Quote.pdf 04:49:57 who knew fixity decls where scoped? 04:50:02 stepcut: thanks, I'll check it out 04:50:07 It comes as a surprise everytime. 04:50:42 Jaggederest: good luck! It's a shameful mess at the moment 04:50:50 re. 04:52:00 no problem, it's better than the alternative(s) which are figuring it out myself or programming in SWF itself :) 04:52:14 :p 04:52:57 Jaggederest: well, currently the swf library works, but needs some API improvements. The haskell->swf does not yet work properly 04:53:15 Jaggederest: but hopefully in the next 1-2 months 04:53:58 that's soon enough for me :) I'm not trying to build a nuke sub :) 04:56:54 is there any way to get at hte value being propogated in a fold? 04:58:25 fuzan: you could try using a stateful function to fold over, or something. I bet there's a better way though 04:59:42 Jaggederest: yah, state'll do it. i'm just trying to simplify a simple tail-recursive func without having to use state 05:20:15 Is there a standard symbol for a monad in CT? 05:23:07 Chrono Trigger has monads? 05:24:20 gyhfrvegyrfegyfelgf 05:25:11 that's not a very good immitation of a kitty 05:25:16 no 05:25:26 @remember SamB Chrono Trigger has monads? 05:25:27 Done. 05:25:31 it's an imitation of forceful forehead/keyboard interaction 05:25:37 repeatedly 05:26:03 it might be a slightly better immitation of that 05:26:22 @quote monads 05:26:23 SamB says: Chrono Trigger has monads? 05:26:32 @quote monads 05:26:32 psykotic says: [monads aren't hard] they're just monoids on the category of endofunctors over some category, what's the big deal? 05:26:48 @quote monads 05:26:48 gimboland says: at present i'd say "tinkering with a nuclear bomb" is approximately where i am with monads... 05:47:40 so if one can program well in haskell then it is safe to say that person understands monads? 05:48:08 other way round 05:48:13 perhaps 05:48:18 but yeah 05:48:22 heh 05:48:40 maybe it is like a triangle 05:48:51 if there are three sides then it is a triangle 05:48:59 or if it is a triangle then it has three sides 05:49:10 #haskell-blah 05:49:14 its not a condition but a definition...? 05:49:33 sorry all i heard was "blah blah blah" ;) 05:49:59 yeah i blah a lot 05:50:03 lol 05:50:04 it has left me poor 05:50:05 sorear: The functor is usually name T 05:50:07 me 2 :) 05:50:26 whitenoyce: No. 05:50:41 ddarius: Is that an uppercase latin T or a \top ? 05:50:43 You understand how monads are applied to programming and semantics. 05:50:43 ACTION sits corrected 05:51:02 sorear: Usually a bold sans serif T 05:51:07 The letter 05:51:25 ddarius, could you clarify? 05:51:26 functor is class? 05:51:26 ok. 05:51:32 perhaps with an example 05:51:44 It is not uncommon to differentiate (the functor of) a monad from an arbitrary functor. 05:52:03 ah common idiom? 05:52:12 whitenoyce: Monads have many many other applications and properties that are not relevant to how they are used in Haskell. 05:52:19 hmm 05:52:23 how come? 05:52:34 ah app domain perhaps 05:52:40 Functor is a class and a thingy from category theory. 05:52:55 hehe who thought up thingy? 05:53:14 a meta-class? 05:55:55 Incidentally, a simple example of a monad that is not directly to Haskell is a closure operator in some poset. 06:06:10 ddarius, so even if you're a good haskell programmer you may still not understand monads? 06:25:57 <^buggy^> http://programming.linux.com/article.pl?sid=07/06/07/1654251&from=rss 06:25:59 Title: Linux.com | It is can be LOLCODE time plz?, http://tinyurl.com/2omrlz 06:26:30 the virus :/ 06:43:59 that introductory article is both longer and less entertaining than the project's actual front page 06:47:31 http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours <- much better :D 06:47:32 Title: Write Yourself a Scheme in 48 Hours - Wikibooks, collection of open-content text ... 06:50:24 :map :w \| :!ghc ./% && ./a.out <- ~/.vimrc :D 07:38:24 @seen dons 07:38:24 dons is in #xmonad, #haskell-soc and #haskell. I last heard dons speak 22m 37s ago. 07:39:14 Can someone tell me the status of data.binary? 07:39:35 I know you get ByteString free with ghc now but what about Binary? 07:39:57 @hackage binary 07:39:57 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary 07:40:13 cinimod: not included with ghc -- you can grab it there ^^^ 07:40:46 sjanssen: thanks. any plans for getBit and putBit or do I roll my own? 07:41:01 there are plans, but we've not come up with the best way yet 07:42:17 difficulties with white space 07:42:27 why do i need 10 spaces after starting a do block or else i get 07:42:33 The last statement in a 'do' construct must be an expression 07:43:41 this is very stressful 07:43:59 11 spaces no, 9 no, 8 no, tab no, 2 tabs no 07:44:02 10 spaces yes 07:44:12 main = do args <- getArgs 07:44:12 putStrLn ("Hello, " ++ args !! 0 ++ " " ++ args !! 1) 07:44:24 exactly ten spaces to putStrLn 07:44:57 why isn't tab working? 07:45:54 dons: IIRC NewBinary had a way of doing this. Can't you just copy? 07:47:08 whitenoyce, http://haskell.org/tutorial/patterns.html#sect4.6 07:47:08 kfish: You have 1 new message. '/msg lambdabot @messages' to read it. 07:47:09 Title: A Gentle Introduction to Haskell: Patterns 07:48:35 whitenoyce, http://haskell.org/onlinereport/syntax-iso.html#layout 07:48:36 Title: Haskell 98 Syntax 07:48:40 cinimod: its a very different library. the idea though, would be similar. we plan to support bit access soonish 07:48:58 but don't want to compromise speed to do it, the preferred idea is via a bit-level monad transformer 07:49:12 that would layer a bit access strategy over the current code 07:49:35 ?where arrows 07:49:35 http://www.haskell.org/arrows/ 07:49:45 dons: what should I do for now? State monad with getWord8 / putWord8? 07:50:09 yep, something like that. 07:50:31 Hm. Will I be duplicating anyone else's work if I figure out how to get c2hs to cough up a binding to Apple's Carbon? 07:50:38 ok but I don't want to re-invent wheels 07:50:41 I'm only starting to read up on how to do it, so it may turn out to be trivial... 07:50:48 ah ok i get it 07:50:54 kfish, thank you 07:50:54 ! 07:51:01 main = do args <- getArgs 07:51:01 putStrLn ("Hello, " ++ args !! 0 ++ " " ++ args !! 1) 07:51:04 works 07:51:45 cinimod: there are no wheels. you'll be the first. 07:51:58 dankna: hmm. sounds a bit like Mocha/HOC 07:52:09 dankna: google for those, they were the first serious bindings to cocoa 07:52:16 Yeah, I spent two days trying to do stuff with HOC. 07:52:42 It's a nice package except there are things that are just plain unimplemented... essential ones for nontrivial programs, like init methods and calling superclass methods. 07:52:48 (Of course, I bet by the time I've understood arrows, someone will tell me "Oh, we don't use arrows any more. We've generalised them to chipmunks.") 07:53:01 It might be that if I weren't so new to Haskell as well, I would be able to figure out how to go behind the type system's back. 07:53:13 But Carbon is a non-OO API so it should be a lot easier to bind against.... in theory. 07:53:17 dons: ok I may have a look next weekend. 07:53:17 You shouldn't go behind the type system's back. ;) 07:53:28 Right. :) 07:53:40 I'm finishing off Packed Encoding for integers (ASN.1) at the moment. 08:37:10 08:17 < sorear> Is there a standard symbol for a monad in CT? 08:37:10 08:18 -!- arjanb [i=borganis@borganism.student.utwente.nl] has quit ["bbl"] 08:37:10 08:20 < SamB_XP> Chrono Trigger has monads? 08:39:18 :D 08:40:42 Sorry, mispaste 08:40:57 fun anyways 08:40:59 (I found it amusing and stashed it) 08:41:15 ?help remember 08:41:15 quote 08:41:15 remember 08:41:15 Quote somebody, a random person, or save a memorable quote 08:41:37 ?quote chrono 08:41:37 SamB says: Chrono Trigger has monads? 08:41:43 ah 08:41:52 i was just about to ?remember the whole thing :) 08:43:18 @yow start 08:43:18 RHAPSODY in Glue! 08:43:33 sounds about right 08:43:49 @paste 08:43:49 Haskell pastebin: http://hpaste.org/new 08:44:29 Jaggederest annotated "(no title)" with "More TSP stuff" at http://hpaste.org/189#a3 08:45:43 problems: it's too fast, I'm not using the nice permutation code yet, and it's not true hillclimbing yet 08:46:36 unless 'evaluate all the possible combinations and find the best one-step change' is hillclimbing. 08:48:58 heh, I just noticed ghc jumped from version 6.4.2 to 6.6 08:49:24 hello 08:49:31 I bet there's a story to that :) oh well, all I need is for it to work. 08:49:32 i got quite an ugly problem... 08:49:32 ah, hi. 08:49:51 is there a way to block a thread? 08:50:05 i need to lock it to wait for input from a different thread 08:50:14 and then return the results 08:50:45 (spawning a gui, where the user asynchronously enters data) 08:52:46 its like 08:52:52 do -- IO () 08:53:06 dataRef <- newIORef 08:53:20 spawnUserThread -- sets dataRef 08:53:36 blockUntilDataRefIsSet 08:53:48 readIORef dataRef >>= return 08:54:48 hmm need dataflow extensions. Oz 'just blocks' 08:56:37 might it work using software transactional memory (STM)? 08:56:58 i'm not so fit with that, so it might take me an hour finding out ;) 08:57:25 yeah I'm not fit with any of this so...heh 09:05:35 hey that might work... 09:05:37 Igel: Use an MVar. 09:07:29 Lemmih: does readMVar block? 09:07:49 the documentation doesnt say 09:09:45 Igel: Yes, readMVar block on empty mvars. 09:10:00 well thats good news :) 09:10:02 thanks 09:10:05 Igel: And the documentation _does_ say. 09:10:28 hmm? 09:10:32 oops 09:10:37 :] 09:10:47 following the link of takeMVar, it does 09:10:52 i'm sorry 09:10:57 No problem (: 09:11:36 ah also there's Control.Exception block which is interesting 09:12:06 hmm maybe not 09:19:53 dankna: There is no story. 09:20:45 yeah, after I said that I figured out that you use the even-number-stable policy 09:20:47 which makes sense 09:21:23 whitenoyce: Put a newline immediately after opening a 'do', and, no, being a superlative Haskell programmer does not mean you know all that much about monads beyond how they are used in Haskell. 09:24:06 Lemmih, Jaggederest: i just wanted to tell you, i decided for software transactional memory 09:24:19 the stms TVar fits best 09:24:38 nonetheless thank you^^ :) 09:30:29 ok, so this one is a new one: ambiguous type variable 'a' in the constraints 'Read a' and 'Show a' 09:30:53 I'm trying to read a file in, parse it, and spit it back out 09:31:55 Jaggederest: Parse it to what? 09:32:30 a list of arbitrary stuff. in this case list of lists of Float 09:33:14 distance matrix for the TSP [[0, 1], [1,0]] in the trivial case 09:33:26 Jaggederest: Well, tell that to your Haskell compiler. 09:34:03 hmm so I have to wrap read up and tell it to do right, is all? 09:36:07 hmm, interesting, so you do have to specialize it like that. No general IO, I guess :) 09:38:21 Jaggederest: Well, 'show . read' is problematic. 09:39:05 so if I feed it into a typed function (not a -> a) it'll maybe figure it out? 09:40:51 hey, readStuff :: String -> [[Float]] readStuff = read works heh silly compiler. 09:40:58 thanks Lemmih 09:45:44 I got this GHC error message: „Could not find module IO': it is a member of package haskell98, which is hidden“; fixed by appending „-package haskell98“ to cmdline. Shouldn't this be the default? 09:46:33 mehrheit: How about using System.IO? 09:48:56 oh, yes. hoogle returned only IO.hFlush after a search for „hFlush“. 09:50:14 mehrheit: Alternatively, you can use --make to automagically include needed packages. 09:51:11 don't cabal build scripts do it by default? 09:51:38 mehrheit: No, not any more. That bug was fixed some time ago. 09:55:01 why is that a bug? 09:55:44 package conflicts, I think 10:42:15 why doesn't "instance Enum (Int, Int) where ..." work? 10:42:45 olsner: -fglasgow-exts 10:43:16 or data Foo = MkFoo Int Int 10:43:24 instance Enum Foo where ... 10:43:31 olsner: Enum (a,b) where? 10:44:20 glasgow-exts seemed to do it.. but what's up with that? Is (,) some special thing that can't have instances or something? 10:44:29 olsner: Haskell 98 doesn't allow you to declare instances for particular values of type parameters, only for all type parameters (possibly bound by a type class). I forget the reasoning. 10:44:55 olsner: you can always create your own datatype as above 10:44:57 So (Foo a, Bar b) => Enum (a, b) would be allowed, but (Int, Int) wouldn't. 10:45:26 mmkay, so it was specifying Int that didn't work 10:46:01 Yes. 10:46:13 @pl (\f (x,y) -> (f x, f y)) 10:46:13 (ap snd) . (. fst) . (flip =<< (((.) . (,)) .)) 10:46:17 (Enum a, Enum b) => Enum (a, b) would work I think (modulo me screwing up the syntax) 10:46:30 olsner: Isn't that one of the arrow operations? 10:46:50 ?type join (&&&) 10:46:52 forall (a :: * -> * -> *) b c. (Arrow a) => a b c -> a b (c, c) 10:47:00 ?type join (***) 10:47:02 forall (a :: * -> * -> *) b c. (Arrow a) => a b c -> a (b, b) (c, c) 10:47:12 ?type (><) 10:47:14 Not in scope: ><' 10:47:42 ?type (&&&) 10:47:44 forall (a :: * -> * -> *) b c c'. (Arrow a) => a b c -> a b c' -> a b (c, c') 10:48:23 seems *** is what I want 10:48:31 or rather (f *** f) 10:56:30 > (-1) div 2 10:56:32 -1 10:57:06 > (-1) mod 2 10:57:07 1 10:57:55 wait what? 10:58:39 Jaggederest: ? 10:58:59 cinimod's thing above. 10:59:14 mod returning the abs 10:59:15 2*(-1) +1 = -1 10:59:30 Haskells XHTML combinator library is great. It could even be improved by adding a readonly attribute... 10:59:32 Yes that's puzzling me but Saizan has said it already 10:59:41 ah right, long night. 10:59:50 forgot the mod identity 10:59:52 > ((-1) quot 2,(-1) rem 2) 10:59:54 (0,-1) 11:00:04 m = q*n + r 11:00:19 Ah so I need quot and rem not div and mod 11:02:25 it's impossible to rememeber which is quotrem and which is divmod 11:02:30 I have to check every single time :) 11:04:02 and i've seen many fail the checking because of the lower precedency of (-) 11:21:05 hm 11:21:37 is it correct that Data.FiniteMap disappeared from 6.4 to 6.6? 11:21:43 er, in ghc 11:22:12 or is the problem my local install 11:22:29 my best guess is that it was renamed, but it's not obvious to what 11:22:50 uh, this is me trying to build GreenCard, but it's pretty clear that's the reason it won't 11:24:46 to Data.Map i think 11:24:54 ACTION nods 11:24:55 ?docs Data.Map 11:24:55 http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html 11:25:25 let's see if the naive fix works, then... 11:33:30 hmm, interface differs.... the parameters to Data.Map.lookup are different from those to Data.FiniteMap.lookupFM. 11:34:09 ah. because it now uses monads. which must have been the point of the change. 11:45:04 if haskell is so functional, why do i see "do" in all the tutorial examples 11:45:11 http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours/Parsing 11:45:13 http://tinyurl.com/2yojoc 11:45:17 ecause you're reading the wrong tutorial 11:45:35 plus... do *is* functional 11:45:47 it's not just a "do this bit imperatively" keyword 11:45:58 it's syntactic sugar for a load of purely functional stuff 11:45:59 whitenoyce: you can always write the "do" expression without do 11:46:06 whitenoyce: Haskell is functional, no matter what anything/anybody says. If Haskell isn't, nothing is. 11:46:57 /me slinks back to whence he came ... 11:47:16 is it possible to write a funtion for map which can skip elements? 11:47:47 xpika: so you want mapSkip :: (a -> a) -> (a -> Bool) -> [a] -> [a] 11:47:48 ? 11:48:05 xpika: (\x -> if (cond x) then f x else x) 11:48:07 beelsebob: pretty much 11:49:04 xpika: mapSkip _ _ [] = []; mapSkip f c (x:xs) = if c x then (f x):(mapSkip f c xs) else x:(mapSkip f c xs) 11:49:23 should probably push the if inwards there 11:49:39 @undo do { x <- getLine; putStrLn x } 11:49:39 getLine >>= \ x -> putStrLn x 11:49:40 mapSkip _ _ [] = []; mapSkip f c (x:xs) = (if c x then (f x) else x):(mapSkip f c xs) 11:49:57 what is the (a -> a) for in mapSkip ? 11:50:08 bartw: the function being mapped 11:50:11 (a -> Bool) -> [a] -> [a] would seem enough ? 11:50:24 it needs a function to map over things 11:53:19 xpika: that of course is just a more general case of map 11:53:26 less general even 11:53:50 mapSkip f c = map (\x -> if c x then f x else x) 11:55:36 ?yow 11:55:37 There's a little picture of ED MCMAHON doing BAD THINGS to JOAN RIVERS 11:55:37 in a$200,000 MALIBU BEACH HOUSE!! 11:57:08 pretty cheap house 11:57:41 Yeah. Cheap. Zimbabwe dollars aren't that cool. 11:58:17 hmz ? 11:58:23 @let a=1 11:58:26 Defined. 11:58:38 @L.a 11:58:38 Not enough arguments to @. 11:58:42 > L.a 11:58:43 1 11:58:55 @let splitBy c xs = (filter (not . c) xs, filter c xs ) 11:58:55 Defined. 11:59:02 a shed costs about half that around here (nl) 11:59:07 splitBy odd [1..10] 11:59:09 > splitBy odd [1..10] 11:59:10 ([2,4,6,8,10],[1,3,5,7,9]) 11:59:33 @src break 11:59:34 break p = span (not . p) 12:00:01 beak odd [1..10] 12:00:01 > beak odd [1..10] 12:00:01 Not in scope: beak' 12:00:01 > break odd [1..10] 12:00:03 ([],[1,2,3,4,5,6,7,8,9,10]) 12:00:05 :( 12:00:15 splitBy! 12:00:20 ++ 12:00:25 hmmmmm, I got GreenCard half compiling, but it's generating one of its own source files with a wrong path to the matching header... 12:00:30 > groupBy odd [1 .. 10] 12:00:31 Couldn't match expected type a -> Bool' 12:01:24 sweet, a make replacement in Haskell 12:01:32 I've been wanting one for weeks! 12:01:51 eh? 12:01:51 hmake or Setup.hs? 12:02:09 http://ashish.typepad.com/ashishs_niti/2007/06/another_dsl_emb.html 12:02:11 http://tinyurl.com/2dxvoc 12:09:47 there's bunch of AI projects around... 12:10:33 which ones of them are of value? 12:11:30 and which of those mimics closest the way how human processes information? 12:11:39 that's an amazingly understated question 12:11:56 also, I don't know 12:12:47 yes, I'm going to find out, just wondering, whether anyone other here has look around these 12:19:51 compilers tend to make lossy translations from languages to another, they are, in fact, never more efficient in doing that than other translators written 12:20:20 also, as much inflexible 12:28:49 xpika pasted "constructor ?" at http://hpaste.org/237 12:29:08 @seen Shimei 12:29:08 Shimei is in #xmonad and #haskell. I last heard Shimei speak 1d 5h 42m 40s ago. 12:33:41 The advantage of writing a paper is that is forces you to realize *exactly* what you're talking about. Ouch. 13:01:56 @pl f c = gmapQ DataBox (asTypeOf (fromConstr c) x) 13:01:57 f = gmapQ DataBox . flip asTypeOf x . fromConstr 13:03:14 morning 13:04:22 evening :) 13:11:26 hmmm 13:11:51 I got GreenCard to compile under ghc 6.6, after a few changes and faking an entry for ghc-pkg 13:12:00 but when I try to build the examples that go with it, I get 13:13:04 dankna pasted "attempt to run GreenCard on its example after modifications" at http://hpaste.org/238 13:13:41 with and without version 13:13:57 pardon? 13:14:09 oh, 13:14:38 ghc-pkg problem then. go figure. 13:18:31 hm, where is that even coming from. maybe it's looking for a version 3.01 and getting a version 3.1.... 13:18:46 grepped that directory for any use of either number, found nothing, so it must be in how it's installed 13:20:56 updated that, now there are no references to 3.01 anywhere that it ought to be able to see... 13:21:00 surely the .hi file itself doesn't contain a version number 13:26:44 well, it doesn't contain it as text, anyway, since grep would have caught that, and I don't see anything in the build process that could possibly be passing it that info anyway 13:27:49 ..... I guess that's the problem, actually 13:28:59 oh! It *is* in the .hi file, the -package-name option to ghc 13:31:09 http://ertos.nicta.com.au/research/sel4/ 13:31:12 Title: NICTA | ERTOS - http://www.ertos.nicta.com.au/research/sel4/home.pml 13:31:13 nice 13:32:22 looks like an interesting project, definitely 13:34:28 all right! it runs its demo programs 13:35:12 yeah 14:05:35 ACTION discovers the joys of manually moving modules from the "hidden" list to the "exposed" list 14:06:13 not using "ghc-pkg expose"? 14:06:38 that seems to be for *packages* 14:08:22 oh, nice, our alex is number 10 on google... 14:38:19 I had an epiphany just now. 14:38:37 I grok how unsafePerformIO subverts the typesystem. 14:39:06 It makes sense once you make the foralls explicit 14:40:07 For example, if its input has type "forall a. IO (IORef a)", it is forcede to pretend that it actually has type "IO (forall a. IORef a)", in order to do its job. 14:40:51 but no values of that type exist, so one of its concrete subtypes will probably be picked, but still presumed to have the polymorphic value. 14:41:04 That is how one of the standard examples works. 14:44:17 kfish: available to translate? :-) http://d.hatena.ne.jp/tmatsuu/20070610#1181442828 14:44:18 Title: ¤â¤·¤â¤·¡¢matsuu¤Ç¤¹¤¬... 14:44:40 kfish: seems to be a pretty glowing review? 14:44:42 Be careful with the word 'subtype', people might interpret it different from the way you mean. 14:46:13 Is there a better term? 14:46:59 ACTION wonders if dons knows something about seL4 14:47:41 araujo: only a little 14:47:51 araujo: talk to Thomas2 14:48:03 nice 14:49:39 what does forall mean? 14:49:53 I notice it a lot, but can't find the description. 14:50:06 (or a description) 14:51:37 mehrheit: http://en.wikipedia.org/wiki/For_all 14:52:01 "forall a . foo" means "foo, for any possible value of a" 14:53:26 mehrheit: If it displays correctly, this symbol: ∀ 14:54:20 @type reverse 14:54:29 forall a. [a] -> [a] 14:54:38 good example there 14:55:00 consider how it is different from "(forall a. [a]) -> (forall a. [a])" 14:55:03 @type id 14:55:05 forall a. a -> a 14:55:08 so this means: "For any type, let's call it a, this is a function from [a] to [a]. 14:55:19 kpreid: yes, roughly 14:55:23 how does it differ from simple [a] -> [a]? 14:55:31 mehrheit: it doesn't; the forall is implicit 14:55:34 [a] -> [a] is an abbreviation 14:56:03 In Haskell 98, there's always an implicit forall just after the ::. 14:56:18 That's the effect of the specified rules of type variable scope. 14:56:29 Though in ghc if you put in explicit foralls in your top-level type signatures, that turns on lexically-scoped types, ISTR 14:57:14 which means that any types within the function do *not* have implicit foralls, but instead free type variables refer to, erm.... 14:57:40 ... other type variables of the same name, though I don't konw the exact rules 14:58:21 It's needed when the types in signatures within the function depend on the types of the arguments in a way too complicated for the compiler to figure out. 14:58:26 I think 14:58:35 i.e. very rarely 14:59:36 lexically scoped type variables are mostly (iiuc) interchangeable with sufficiently clever uses of asTypeOf 15:01:43 kpreid: yes, though the former is elegant and the latter is a slight hack 15:07:20 > x231C 15:07:24 Not in scope: x231C' 15:07:25 > 0x231C 15:07:26 8988 15:15:49 @pl forever a = a >> forever a 15:15:49 forever = fix (ap (>>)) 15:16:01 what is "fix"? i can't find it 15:16:05 @index fix 15:16:06 Control.Monad.Fix, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Error 15:16:16 aha, thanks 15:16:19 geezusfreeek: import Control.Monad.Fix 15:16:37 afaik, it's there just because having defined mfix, there ought to be a fix available too 15:16:48 @src fix 15:16:48 fix f = let x = f x in x 15:17:02 oh, it's that function 15:19:58 for f :: (a -> b) -> (a -> b), does changing the definition to "fix f = let x a = f x a in x" change the semantics? 15:25:44 I am currently passing a few functions a few levels through my code. If I put those functions in type classes, I don't need to do that anymore. What is better? 15:26:03 whichever is more natural 15:26:13 are they obviously global properties of the type in question? 15:26:19 you could also use implicit parameters 15:26:47 fasta: try it and see what it feels like :) 15:26:51 Heffalump: they set the fields of nodes in a tree of a specific type correctly. 15:27:16 Heffalump: for every type there are specific functions associated with it. 15:28:34 sounds like a job for typeclasses to me 15:38:16 I want to listen to mouse events on a remote computer. I've written some small functions converting the 3 byte data chunks (ps2 protocol) from /dev/../usb..mouse to some event datatype. 15:39:24 When a client connects I could open the device again and interprete the data stream again. But How is this done if I want to transform the data stream first and then duplicate it to send it to more than one client? 16:12:14 <|Jedai|> @source foldr 16:12:14 foldr not available 16:12:48 @src foldr 16:12:48 foldr k z xs = go xs 16:12:48 where go [] = z 16:12:48 go (y:ys) = y k go ys 16:12:49 <|Jedai|> @src foldr 16:12:49 foldr k z xs = go xs 16:12:49 where go [] = z 16:12:50 go (y:ys) = y k go ys 16:13:47 why the inner function 16:14:09 surely any sensible compiler can optimise out the passed-through parameter? 16:14:35 the definition may have been written before and not changed 16:16:03 @src foldl 16:16:04 foldl f z xs = lgo z xs 16:16:04 where lgo z [] = z 16:16:04 lgo z (x:xs) = lgo (f z x) xs 16:17:23 SimonRC: some sensible compilers will only do that after translating into a rather similar form anyway 16:18:53 if you want to look at it one way, it makes the loop invariants totally obvious 16:25:40 Philippa: true 16:30:55 it shouldn't be too big a surprise if you see library code written in a form that bears a close resemblance to one of the IRs involved 17:11:27 I'm not the first person to say this right? Shouldn't: ++ be generalized to equal mappend 17:15:05 clanehin: ++ used to be mappend, then it was specialized and mappend was created 17:15:24 clanehin: the argument against doing that is that the type confuses beginners 17:16:36 there were a number such changes in 1.4->98 17:18:05 I see. 17:22:57 ?where lazy bytestring 17:22:57 I know nothing about lazy. 17:23:01 Hm 17:23:38 @where fps 17:23:38 http://www.cse.unsw.edu.au/~dons/fps.html 17:23:50 that's what you want 17:28:15 Thankee. 17:34:57 @botsnack 17:34:57 :) 17:47:42 > sort ["20050507T111000Z","20050507T1010Z"] 17:47:46 ["20050507T1010Z","20050507T111000Z"] 17:50:42 @src fix 17:50:42 fix f = let x = f x in x 17:50:47 @botsnack 17:50:48 :) 17:50:58 there there lambdabot :) 17:56:31 'ello 17:56:51 'allo, 'allo 17:57:06 this could get boring ;) 17:57:09 yes, pardon my yankee accent 17:57:28 eh? 17:57:28 hi 17:57:42 #haskell-blah chessguy ;) 17:57:56 hm? 17:58:05 er 17:58:40 ah 17:58:47 .. 17:58:55 17:58:56 this is what i love about haskell, such deep, intellectual conversations 17:59:04 17:59:14 yeah well make some sense then :D 17:59:47 or talk crap in #haskell-blah ;) 17:59:53 chessguy: talk to the bot if we're not good enough for you 18:00:00 #haskell-blah chessguy ;) 18:00:13 :) 18:00:22 igli, we're not that strict usually 18:00:28 who's we? 18:00:39 i mean, if there's going to be an extended discussion, it's usually directed to -blah 18:00:44 we, the citizens of #haskell 18:00:45 me and the mice in my pocket 18:00:53 well direct it then 18:01:13 but there's no need to be a jerk about it 18:01:25 oh man, i do it so well ;D 18:02:44 ACTION really really tries 18:02:46 so DSLs keep coming up lately. what's a good example of a large DSL in haskell 18:03:01 meh is this haskell code then? 18:03:03 chessguy: yampa? 18:03:20 Vq^, was that a question or an answer? 18:03:44 #haskell-blah chessguy ;) 18:03:56 chessguy: an answer coupled with the question, "will this do?" :o) 18:04:14 ah, ok. 18:04:19 @where yampa 18:04:19 http://www.haskell.org/yampa/ 18:04:20 ACTION waits for some actual code 18:04:58 oh, that's the porting of the HSOE stuff to arrows, isn't it? 18:05:15 ACTION waits for some actual code 18:05:38 Go browse a darcs repo for actual code, if that's what you're looking for ) 18:06:09 ACTION waits for a kick ;) 18:06:14 er ni 18:06:18 no* 18:06:22 sorry :D 18:06:32 @seen sorear 18:06:33 I saw sorear leaving #ghc, #xmonad, #haskell-overflow, #haskell-blah and #haskell 10h 27m 53s ago, and . 18:07:12 What's #haskell-overflow? 18:07:22 Tanuk: an irc-channel 18:07:34 Vq^: Thanks. 18:07:34 Tanuk, for extended on-topic discussions about haskell 18:08:11 chessguy: on-topic= 18:08:16 s/=/?/ 18:08:26 meaning about haskell 18:08:40 chessguy: #haskell-blah isn't about haskell 18:08:46 class Foo a b where 18:08:48 foob:: a -> b -> a 18:08:48 18:08:48 some_code a = do 18:08:48 foob a 18:08:48 return False 18:09:01 chessguy: you must be confusing it with #haskell-overflow 18:09:01 as in real code you're having real probs with imo 18:09:02 Vq^, i never said it was 18:09:04 Is there any context where some_code should not give an error? 18:09:18 Vq^, either that or i'm answering the question about what #haskell-overflow is 18:09:20 chessguy: oh, i must have misinterpretted you, sorry 18:09:30 Is there any context where some_code should not give an error? 18:09:51 igli: foob is applied to one argument. 18:10:13 un-huh 18:10:57 why so? 18:11:28 fasta, what do yhou mean by 'context'? 18:11:46 @dict context 18:11:46 Supported dictionary-lookup commands: 18:11:46 all-dicts devils easton elements foldoc gazetteer hitchcock jargon lojban vera web1913 wn world02 18:11:46 Use "dict-help [cmd...]" for more. 18:11:59 @all-dicts context 18:12:01 *** "Context" gcide "The Collaborative International Dictionary of English v.0.48" 18:12:02 Context \Con*text"\, a. [L. contextus, p. p. of contexere to 18:12:02 weave, to unite; con- + texere to weave. See {Text}.] 18:12:02 Knit or woven together; close; firm. [Obs.] 18:12:02 [1913 Webster] 18:12:03 [64 @more lines] 18:12:09 @more 18:12:09 18:12:09 The coats, without, are context and callous. --Derham. 18:12:09 [1913 Webster] 18:12:11 18:12:13 *** "Context" gcide "The Collaborative International Dictionary of English v.0.48" 18:12:15 [59 @more lines] 18:12:26 Well, anyway, context as it's used in English. 18:12:36 Not the Haskell concept of context. 18:12:50 fasta, i'm not looking for a denotational definition of the wor 18:12:50 d 18:12:56 Read "situation". 18:13:26 I question whether there is any situation where one would want that that code is accepted by the compiler. 18:13:57 fasta: if a is of type IO something 18:14:27 which would not be unusual at all 18:14:47 or in fact if a is of type Monad m => m something 18:18:46 One thing I find annoying is that sometimes when you forget an argument, you get back something which compiles, but has some function type in a really weird place. The problem is that coming up with a formal definition of "weird" is difficult without introducing new syntax. 18:19:30 hmm 18:19:50 heya sjanssen 18:20:03 yeah, that's when you see things of types like a -> [b] instead of type [b] 18:20:20 > foldr (+) [1..10] 18:20:21 add an instance declaration for (Num [t]) 18:20:36 > foldr 0 [1..10] 18:20:37 add an instance declaration for (Num (a -> [t] -> [t])) 18:20:40 wheee 18:21:04 hello emu 18:21:08 @hoogle Alpha 18:21:08 Test.QuickCheck.Poly.ALPHA :: type ALPHA 18:21:08 Language.Haskell.TH.Lib.alpha :: [(Name, Name)] -> Name -> ExpQ 18:21:08 Text.ParserCombinators.Parsec.Char.alphaNum :: CharParser st Char 18:21:13 @hoogle Alphanum 18:21:14 Text.ParserCombinators.Parsec.Char.alphaNum :: CharParser st Char 18:21:14 Char.isAlphaNum :: Char -> Bool 18:21:29 (hello) 18:21:37 i managed to get a program to run in 2 seconds, but for some reason i'm stuck with WA (using Prim's) 18:21:38 !hi 18:22:25 igli: wrong channel 18:22:27 chessguy: A popular way to "solve" it, often given by people who only write simple programs, is to "add type annotations". 18:22:42 heh sorry sorear :) beg pardon 18:22:48 np 18:22:55 ACTION hides and listens to code 18:22:59 > isAlphaNum ':' 18:23:00 False 18:24:28 hi,all 18:24:45 emu: did you see that "The sum of all connections is not greater than 2^32-1."? 18:24:53 yes 18:24:55 (ie. use Word) 18:25:08 is that better than Int? 18:25:13 i'm using IntSets and IntMaps too 18:25:49 i mean it runs "fast enough" i don't know why it's incorrect. i can't find any examples where it is wrong. 18:26:02 How can I handle no-utf-8, e.g. GBK, GB2312 ? 18:26:54 emu: you need the extra precision Word offers 18:27:04 gogonkt1: what do you want to do with it? 18:27:20 ugh, Int is signed 18:27:25 Int only gives you 2^31 - 1 -- the problem says it might be as high as 2^32 - 1 18:27:50 0::Int64 18:27:51 > 0::Int64 18:27:53 0 18:28:02 I'm writing a bot read from a room u8, print it in windows control,win is GBK 18:28:16 (2::Int64)^63 18:28:21 sjanssen: Int give you a navtive integer size, not necessarily 32 bit. 18:28:25 > (2::Int64)^63 18:28:26 -9223372036854775808 18:28:41 > (2::Int64)^62 18:28:42 4611686018427387904 18:30:10 Any module can conver between utf-8 and GBK or other no-utf-8? 18:30:21 gogonkt1: not built-in, no. 18:31:02 roconnor: Int gives you -2^29 to 2^29-1. Overflow behavior is undefined. 18:31:19 roconnor: specifically chosen to allow tagged *non-native* formats 18:31:58 My bot must face this in china, :( 18:33:51 nope :( 18:35:21 I'm pretty sure Word only gives you 0 to 2^30-1... 18:35:37 > maxBound :: Word 18:35:39 4294967295 18:35:44 > 2^32 - 1 18:35:45 4294967295 18:36:02 emu: I meant that, if Word were in the report, the report would state that as the minimum range 18:36:07 sorear: even on a 64 bit machine? 18:36:14 that fucking sucks! 18:36:37 ahh 18:36:37 ?index Word 18:36:38 Data.Word, Foreign, GHC.Exts 18:36:38 roconnor: try Int32/Word32 18:36:43 roconnor: the available size of Int is platform independant 18:36:52 > maxBound :: Word 18:36:52 18446744073709551615 18:36:54 4294967295 18:36:57 might be 32 bit kerne; 18:36:58 (my box is a 64-bit box) 18:37:01 sorear: that's terrible. 18:37:07 sorear: not exactly... 18:37:20 roconnor: Remember what I said about undefined overflow behavor. 18:37:23 if I wanted platform independence I would have said Int32 18:37:37 sorear: oh, right 18:37:57 roconnor: if it helps, CInt is likely to be 32-bit on 64-bit systems too 18:38:00 so you can get maybe 2^64 on a 64 bit machine, maybe. 18:38:11 > 2^31 -- on dons' 32 bit box, GHC uses 32 bit Int's 18:38:13 2147483648 18:38:24 SamB, I don't want to incoporate C's failings into Haskell. 18:38:31 ?index CInt 18:38:32 Foreign.C.Types, Foreign.C 18:38:38 roconnor: well what exactly do you *want*? 18:38:56 I want Int to be the fastest available integer for whatever platform I'm on. 18:38:59 roconnor: C int can be anything 16 bits or more, again with undefined overflow? 18:39:05 Foreign.C> maxBound :: CInt 18:39:05 2147483647 18:39:07 roconnor: that's exactly what it is 18:39:08 roconnor: it should be so 18:39:14 that is the intent of the Report 18:39:16 yay! 18:39:20 that is the intent of the implementors 18:39:36 > bitsize (0::Int) 18:39:37 Not in scope: bitsize' 18:39:40 > bitSize (0::Int) 18:39:42 32 18:39:58 and I think that C's int is the same in most contexts 18:40:02 > bitSize (0::Integer) 18:40:04 Exception: Data.Bits.bitSize(Integer) 18:40:07 awww 18:40:19 hmm, on a trinary computer it would be pretty hard to implement instance Bits Int 18:40:35 sorear: hmm, yes. 18:40:52 C's int and Haskell's Int are basically the same, although Haskell requires 30 bits while C only requires 16 18:41:01 Haskell^XXVI is looking into it 18:41:19 sorear: how come? 18:41:26 sorear: "are similarly defined", it's a bad idea to assume that they're the same thing 18:41:30 yep 18:41:47 Philippa: by "basically the same", he means they are similarly vague 18:41:51 Philippa: I was talking equivalence of concepts, not sizes, sorry 18:42:07 sorear: yeah, just quibbling with the ambiguity :-) 18:42:14 ok :) 18:46:10 Are there any project about asia language handle? 18:56:38 gogonkt1: I'm not aware of any :( 18:57:19 Perl do well, but hs ... :( 18:57:41 Perl do it well, but haskell ... :( 18:59:09 gogonkt1: I suspect most of it's contingent on getting our IO story settled - nominally Char is a unicode character, but that's about it so far 18:59:28 you might want to talk to people working on GUI lib bindings about how they're handling the issues 19:00:22 Philippa: good news, Thx! :) 19:01:45 gogonkt1: there is nothing stopping you from writing your own encoding code in the meantime; implementing UTF8 requires ~10 lines 19:01:45 "Arguments exhausted after 13 tests." <- this means the 13 tests were distinct? 19:01:57 yes 19:01:59 fasta: yes 19:02:00 Why haskell don't let us handle any encoding? 19:02:08 en, yes 19:02:09 gogonkt1: it does 19:02:13 it does, it just doesn't provide the code to do it for you 19:02:27 gogonkt1: haskell lets you handle any encoding you want just fine 19:02:28 and that's because it's been far from obvious what the right way to do it's been until now 19:02:32 wow. the PDP-1 had both lower and upper case! 19:02:54 Philippa: "until now" - you mean someone's finally figured it out? 19:02:56 SamB: The wave of the future. 19:03:19 ACTION waits for mezanine case 19:03:31 hehe :D 19:03:39 unfortunately it uses multi-"byte" coding for them... 19:04:26 ACTION wonders what sorear means by "mezanine" 19:04:42 sorear: heh, you got me. Though at least we've got sufficient power that we know the Right Way ought to be expressible in GHC now 19:05:51 ddarius: It is a (misspelled) type of floor found between upper and lower ones, not extending the entire width of the building. 19:06:27 "We can embed the Calculus of Inductive Constructions into the type system, -surely- we can handle character encoding now... right?" 19:06:33 sorear: Yeah, I got that... 19:08:57 It seems to be a classic Haskell problem that people would much rather work on the cool theoretical stuff than getting the annoying practical details done. :) 19:09:02 ddarius: Right Way involves usability as well though - GADTs're a big improvement there 19:10:33 DRMacIver: That is not it at all, nor is that actually very typical of the language. It's the classic Haskell problem that people want to do it "the Right Way". 19:11:03 Fair enough. 19:11:35 sorear: Ah. When I look at the context I get what you meant, I thought you were still responding to Philippa. 19:12:11 sorear: Incidentally, have you taken a public speaking class? 19:12:21 No. 19:12:34 Does your high school offer one or something similar? 19:12:54 So I have a question about Data.ByteString.split. It takes a GHC.Word.Word8, how can I turn a '\n' into a Word8 for this function? I think newer versions of ByteString take Char instead now. 19:13:22 @hoogle Char -> Word8 19:13:23 No matches, try a more general search 19:13:34 ?index split 19:13:34 Data.IntMap, Data.IntSet, Data.Map, Data.Set, GHC.Exts, Language.Haskell.TH.Ppr, System.Random 19:13:38 Shimei: toEnum . fromEnum? 19:13:54 ?type Data.ByteString.Char8.split 19:13:56 Char -> Data.ByteString.Base.ByteString -> [Data.ByteString.Base.ByteString] 19:14:49 Ah, I see. I have that function. Thanks. 19:15:15 SamB: When I tried that it seemed to break something else. 19:20:11 Shimei: Data.ByteString is for bytes; if your bytestrings logically contain text, you should probably be using Data.ByteString.Char8 19:20:24 Shimei: which has a readymade 'lines' function 19:20:33 Is there a ghc extention that allows you to specify just part of a type, and let the compiler infer the rest, like "Int -> _ -> [Int]" or whaever? 19:20:56 No 19:21:03 odd 19:21:07 I see F# has it 19:21:27 F#? 19:21:56 microsoft's version of ML for .NET 19:22:06 quite good from what I have seen 19:22:39 it's largely derived from ocaml 19:22:54 looks not bad, but ultimately it's a .NET lang still 19:23:07 Which means? 19:23:34 ddarius: exactly what it says? 19:23:38 well, probably not too much given that it's also an ML :-) 19:23:44 but then I'm a purist, me 19:24:17 plus ML's type syntax is dreadful 19:24:33 Would a context-sensitive language parser make sense? 19:24:35 you can remove the "type" bit there 19:24:36 SimonRC: "it's a .NET language" is perfectly clear, I was asking about the "but ultimately" 19:24:55 centrinia: Most are. 19:25:20 ddarius: in the long run neither JVM nor CLR can become the One True VM for All Time 19:25:23 SimonRC: hugs has it 19:25:31 Oh. :p 19:25:31 and I'm picky 19:25:57 sorear: bah 19:26:02 (mutter, mutter) 19:26:07 What about a parser generator for context-sensitive languages? 19:26:29 can do 19:26:37 depends on the level of context-sensitivity you want 19:26:44 combinators're easier 19:26:46 I'm not sure that it wouldn't just be easier to write a Turing-complete language at that point. 19:27:04 ddarius: it's probably including snippets from one for semantics anyway, no? 19:27:43 2-level van Wijnngaarden grammars anyone? 19:27:49 s/nn/n 19:28:19 Obviously UM is the one true VM. 19:28:27 FWIW, I'd still like to write a nearly-arrow-flavoured parsing combinator lib that'd have an optional code generation pass for optimisation 19:28:39 why nearly arrow? 19:28:42 roconnor: it can't even /represent/ All Time :-) 19:28:46 Heffalump: want identity on computations 19:28:48 Just give something like: S -> a b c; S -> a S Q; Q -> b c; and a string such as aabcccc or accbbbb and it'll tell you acceptable and unacceptable respectively. :p 19:29:07 it wouldn't be (the equivalent of) ArrowApply, it would be ArrowChoice 19:29:20 I could write it as an arrow in an impure lang, I guess 19:29:22 Sometimes you don't have identity. 19:29:55 I don't follow. 19:29:59 centrinia: like when you're working in Haskell. But the EDSL I'm describing would have it, and it'd be viable because it doesn't do higher-order computation 19:30:23 Heffalump: then all the arrow combinators can bake identity into the computations as appropriate 19:30:38 or do you not follow why something Arrow-like?# 19:30:44 (or why I'd want identity?) 19:31:04 I don't follow why you can't do this with an arrow. 19:31:25 How can I raise the number of tests in QuickCheck? I already did defaultConfig{configMaxTest = 1000}, but it still is exhausted after 13 to 15 tests. 19:31:38 okay. Specifically why I can't do the identity, or what I could do with identity that I couldn't without? 19:31:56 why you can't do the identity 19:32:12 I assume you mean "identity" as in "unique name" rather than "\a -> a" 19:32:16 yeah 19:32:24 Oh. 19:32:42 and the answer is: because the arrow combinators (at least in a pure lang) don't have room for the necessary name supply 19:32:57 and if you don't do it at construction time, it's too late 19:33:07 isomorphism :: (a -> a) -> (a -> a) 19:33:10 you then can't deal with any loops 19:33:32 why not just pass around some state? 19:33:48 yeah, but you have to do that when you're building the computations, not within them 19:33:51 State? :O 19:33:52 State is bad. :( 19:34:12 so suddenly you're doing something that's like an arrow built from inside something with state, not an arrow 19:34:13 hey! google's indexed our wiki again! 19:34:13 How about an arrow construction language 19:34:32 hmm. You could build it as an arrow transformer constrained to arrows with state 19:34:42 I still don't see why the arrow can't have state in it. 19:34:50 Arrows can have state in it? :O 19:34:51 it can. It's just that that doesn't fix the problem 19:35:29 @google listt done right 19:35:31 http://blog.omnigroup.com/2007/05/14/omnifocus-pre-release-early-birds-get-the-bugs/ 19:35:31 Title: The Omni Mouth » OmniFocus pre-release: early birds get the bugs 19:35:49 it's not obvious to me why this isn't enough to do loop detection 19:36:13 it would be in a strict language 19:36:28 on account of any actual loops having fallen over for you neatly 19:36:34 ...no, wait, it's not 19:36:52 not unless you bake in various combinators you wouldn't have to otherwise, anyway 19:37:06 so you still don't get loop detection, you just get forced to avoid building any loops in the first place 19:37:26 consider many: 19:37:53 it calls itself 19:37:58 ACTION considers implementing van Wijngaarden grammars. 19:38:04 specifically, that loop's a haskell-level loop 19:38:14 so the recursion is present in the meta language, if you like 19:38:22 in the object language, you don't have recursion: you have an infinite graph 19:38:40 having state in the object language doesn't fix it 19:39:09 ok, then how does not being an arrow help? 19:39:41 depends on the value of "not an arrow" :-) 19:40:12 there still isn't a sufficiently pretty solution in Haskell at the moment 19:40:39 what's the ugly one? 19:41:12 build all your computations from inside something stateful, and mercilessly taunt anyone who writes a version of many where the recursion's on the raw haskell level 19:41:58 actually, if your value of "something stateful" is the IO monad and you're working with GHC then haskell-level recursion's okay... 19:42:12 because then you can use stable names 19:44:01 the bonus there is that you only need to build the computation in the IO monad - not its description. So you only need a "runParser" or "compileParser" function in the IO monad 19:44:54 So, I've been trying to re-write a script I wrote in ruby in haskell. However, I have been unable to make the haskell perform better than ruby. Anyone see any performance issues here? http://hpaste.org/239 19:45:46 centrinia: it sounds like you're in need of an explanation of one of the deeper 'mysteries' of Haskell, namely how things like Arrows and Monads can support state? 19:46:26 (also, it's unconstrained state that's bad: if a problem is inherantly stateful, making use of that directly can abstract away further possibilities for error) 19:46:27 ACTION wonders if that foldl is performed for every time or memoized 19:46:44 there is no automatic memoisation 19:47:03 Yeah, I guess I meant unconstrained state. 19:47:06 of functions, anyway 19:47:13 variables are implicitly memoised as you might expect 19:47:18 I think the rationale is that just about anything can be safely put in a variable if the programmer wants CSE 19:47:38 Shimei: my first reaction is that foldl is almost always wrong to use 19:47:40 SimonRC: whereas automatic memoisation is potentially unsafe for memory usage 19:47:48 Heffalump: as long as the monomorphism restriction is turned on. If you turn it off you can get a nasty suprise. 19:47:55 roconnor: What would be the idiomatic way around that? 19:47:57 you should definitely lift that foldl out 19:48:02 centrinia: okay. Want the explanation re monads and arrows? 19:48:17 does =~ fail early? 19:48:27 if so, you should definitely be using foldr. 19:48:32 I'll try to read up on it. 19:48:37 Thanks for the thought. :) 19:48:48 Shimei: foldr in this case, and foldl' in cases where you really want a left fold. 19:48:59 SimonRC: I just adjust my concept of what a "variable" is :-) 19:49:04 yeah, I can simplify it without having to explain monads as a whole though, let alone arrows - you're unlikely to get a neat answer to just that question if you read around 19:49:13 Shimei: wait 19:49:16 maybe I'm wrong 19:49:17 foldl' would be completely inappropriate here, since ++ is not nearly strict enough to help 19:49:27 @src concat 19:49:27 concat = foldr (++) [] 19:49:33 Okay, explain then. :) 19:49:51 is (|) the regex choice operator? 19:49:55 Shimei: My inexpert opinion is that you should use foldr here 19:49:57 centrinia: okay, supposing I wrote an interpreter for a stateful language in haskell - you'd say that programs run within it exhibit state, right? 19:50:04 Heffalump: Yeah, it is. 19:50:08 does it optimise stuff? 19:50:17 if not, why not do the comparisons individually? 19:50:24 Yeah. 19:50:35 Shimei: and maybe you want concat (intersperse "|" days) 19:50:45 Not sure how optimized the regex library is. 19:50:53 > concat (intersperse "|" ["foo","bar","baz"]) 19:50:54 "foo|bar|baz" 19:51:09 I would certainly try doing the comparisons separately, thus saving the regex library from having to parse stuff. 19:51:10 centrinia: okay. Monads and arrows are both related to the idea of programming by interpreting another language within Haskell - only for languages that happen to include haskell as well 19:51:39 Shimei: anyhow, you need to profile to find out where you are spending time. 19:52:00 in a sense, arrows and monads are one of the more interesting and odd examples of metaprogramming to actually see regular use 19:52:02 foldl and ++ are a huge waste anyhow 19:52:15 that make sense to you? 19:52:16 I never though of them as DSL related. Hmm. 19:52:38 Heffalump: as perhaps the on-duty Picky Person, any arguments with what I'm saying? 19:52:44 Shimei: Use foldr (and when, though that's not a performance thing) 19:52:48 @type when- 19:52:50 parse error (possibly incorrect indentation) 19:52:51 @type when 19:52:52 forall (m :: * -> *). (Monad m) => Bool -> m () -> m () 19:53:09 Yeah, it makes sense. 19:53:24 I was wondering whether to argue with your entire premise (about interpreting another language), but it's probably one way of looking at things. 19:53:30 So the monad features extend Haskell? 19:54:05 centrinia: the only monad 'features' in Haskell are syntactic sugar :-) That's the cute bit 19:54:06 Yes and no. 19:54:22 Ah. 19:54:30 Heffalump: *nod* - sufficiently so that I can 'defuse' monads like Maybe or [] into an AST/interpreter pair 19:55:12 Generically no less! 19:55:40 the IO monad extends "pure" Haskell 19:56:12 The list Monad is like having some of the power of Icon available. 19:56:41 Heffalump: yeah, fair point - sloppy phrasing on my part 19:57:02 but even then, it can be treated as pretty strictly an RTS feature 19:57:16 (or maybe *all* the power of Icon, though I presume that faking Icon's cool bits with the list monad won't *always* work.) 19:57:31 is there an informal article on concurrency/stm in the wiki? 19:57:48 the IO monad and related stuff is a minilanguage for describing IO actions and similar stuff 19:58:06 SimonRC: you'd have to describe Icon's semantics for me to comment, I guess - I won't be surprised if there's another monad or other structure that can do it 19:58:08 @tell dons Thanks for your help earlier! I have a few pages of the paper left to write, but the overall structure is clearly visible, and most of the material is there. Whew. 19:58:08 Consider it noted. 19:58:12 newsham: Ask Google! 19:58:18 i did, dd. 19:58:22 possibly even just layering transformers on top of list 19:58:22 i came up empty 19:58:54 @tell dons Your belly button sticks out too far. 19:58:54 Consider it noted. 19:58:55 references to the STM paper, and references to the GHC documentation (which is near nonexistant on stm) 19:59:22 Philippa, so ( a >>= b >>= c ) passes the state of a to b, and the state of b to c. 19:59:23 Icon has a "generators" concept, which as far as I can see is very like the nondeterminism given by the list Monad 19:59:41 generators are also present in python. 19:59:51 i would think they're more like lazy evaluation than anything else 20:00:01 coroutines that can yield a value one at a time 20:00:02 centrinia: in a stateful monad, yeah 20:00:17 newsham: Lazy evalution only leads to one answer being produced. 20:00:26 it can be a little more complicated, because sometimes the 'ordering' in a monad is still lazy 20:00:37 Ah. 20:00:57 http://www.thenewsh.com/%7Enewsham/x/machine/lazyFunc.py for example 20:00:57 ACTION wonders how best to discard the first line of a string... 20:01:06 To add expressive power to a language requires a global transformation, monadic style is a global transformation. 20:01:17 lines . head . unlines 20:01:27 ddarius: ITYM "tail" 20:01:37 ddarius: that doesn't seem particularly efficient 20:01:42 Er yeah tail 20:01:50 ddarius: monadic style as in changing pure code to be monadic? 20:01:54 newsham: Lazy -streams- are not lazy evaluation 20:01:56 or maybe "tail . dropWhile (/= '\n') 20:02:02 (as opposed to introducing do notation, which is purely local) 20:02:04 ok, perhaps i should have said lazy lists 20:02:06 Heffalump: Yes 20:03:06 Is it worthwhile for me to play with an arbitrary context sensitive language acceptor by generating more and more strings in the language and comparing with an input string. 20:03:27 It will not terminate unless it accepts. :( 20:03:32 centrinia: is it fun? 20:03:41 Yes. :D 20:03:54 centrinia: You should be able to get it to terminate either way. 20:04:06 yeah, context-sensitive doesn't imply turing-complete 20:04:14 Of course. 20:04:24 Turing Complete is implied by Chomsky type-0. 20:04:43 Eventually the only strings remaining will be longer than the input unless you're going to allow infinite input. 20:04:48 Type 0 is the most constrained of the Chomsky types, isn't it? 20:04:54 ACTION can't remember which way they went... 20:04:56 But then it won't accept either... 20:04:56 or an infinite character set 20:05:07 SimonRC: thanks 20:05:25 SamB: remember, Know Your Prelude 20:05:43 Of course, it may as well be non-terminating for as long as it will take on some inputs... 20:05:53 Is there an easy way to compare two grammars to see if they produce the same set of strings? 20:06:10 Wouldn't that be wonderful. 20:06:17 centrinia: Yes... for some grammars 20:06:20 It would. :) 20:06:25 Syzygy-: least constrained 20:06:36 centrinia: it can be done pretty easily for regular langs, but it undecidable for context free 20:06:38 anyone familiar with an informal article discussing concurrent programming in haskell? 20:06:50 centrinia: the magic computational class 8-ball says: That problem is NP-hard. 20:06:55 sorear: what's the result for unambiguous context free? 20:07:04 SimonRC: :) 20:07:04 I wouldn't trust me though 20:07:16 newsham, didn't Simon Peyton Jones write something about STM? 20:07:21 Philippa: unambiguity is undecidable itself, no need to add equality 20:07:22 isnt the question of grammar equivalence undecidable? 20:07:25 (or so WP says) 20:07:41 centrinia: yes, there's a good, fairly technical, paper on the STM 20:07:49 sorear: suppose for a moment that I've found a way to force it... 20:07:51 i was looking for something less formal and more programmer oriented 20:08:28 I guess I should see what theory's been done on PEGs 20:08:39 As a rule of thumb, most problems are either O(1), O(log n), O(n), O(n log n), O(n^2), NP-complete, or undecidable. 20:08:55 ... ? 20:09:19 what about O(n!) 20:09:20 Like type checking, or finding the dominators of a graph or... wait 20:09:21 ACTION inserts O(n^3) in there from linear algebra schooling. 20:09:28 sproingie: that's rare 20:09:34 what about O(n^2.78) ? 20:09:40 rare too 20:09:40 or O(2^n)? 20:09:42 rare too 20:09:47 A lot of O(n!) are reducible to O(2^n) 20:09:54 as a rule of thumb, we usually arent very exact when talking about O(...) 20:09:56 O(\alpha(n)n) 20:09:56 Schoenhage-Strassen! 20:09:56 actully, exponential should be in there too, probably 20:10:02 yes, it should 20:10:08 O(n log n log log n) 20:10:17 That's bit complexity. :p 20:10:17 where \alpha = inverse-ackermann? 20:10:26 sproingie: he did say "NP-complete" didnt he? 20:10:30 Yes, but I forget what the whole complexity is. 20:10:38 ddarius: heh 20:10:43 The arithmetic complexity of Schoenhage-Strassen is still O(n log n) I think. 20:10:44 ddarius: union-find? 20:10:47 newsham: the complexity of np-complete problems is not known 20:11:05 most people have a pretty good guess, though :-) 20:11:10 SimonRC: As applied to finding the dominators of a graph 20:11:15 The log log n is there is supposed to take care of instances where the input integers are on the order of 2^{2^n} 20:11:18 I am assuming that P!=NP, which is true in practice so far even if not actually true 20:11:24 i suppose NP covers it 20:11:26 ddarius: yeah 20:11:30 NPC /= EXPTIME has been proven 20:11:49 What????! 20:12:08 Is NPC subset EXPTIME? 20:12:18 Certainly. 20:12:25 Hmm. 20:12:36 Actually, undecidable problems are Busy-Beaver-time, but no-one konws what that is, because it's uncomputable. 20:12:49 because it's uncomputable. 20:12:53 hehe 20:13:32 [10:09] < sorear> NPC /= EXPTIME has been proven 20:13:34 url 20:14:20 (If you could calculate busy-beaver numbers, you could put an upper bound in the running-time of a halting turing machine given its size, which would allow you to tell non-halting machines from ones that just take a very long time.) 20:16:06 newsham: Forgot the "Says WP" qualifier 20:16:19 wp? 20:17:37 Says a MISREADING of WP at that. Sorry. 20:17:41 wikipedia 20:17:52 newsham: sorear has a problem of talking in acronyms 20:18:20 ACTION managed somehow to read that as "talking in oranges" 20:19:20 hmm. there is an undecidable problem with a scalar answer 20:19:35 heh. I was reading WP too and trying to figure out where it was incorrect given what sorear had said :-) 20:19:51 sorear: define "scalar answer" 20:19:53 some of the BB numbers are computable; for these there exists a proof BB(k) = foo 20:19:59 SimonRC: not an infinite list 20:20:05 or similar 20:20:12 within a space of size omega 20:20:37 but every list, pair, etc is a scalar! 20:20:53 see: Gödel's work 20:20:58 NP-complete == exp except its not, except it really is (except its not) 20:21:06 newsham: heh 20:21:06 now, suppose ALL of the BB numbers were computable. then by enumerating proofs, you would have a TM which generates all the bb numbers 20:21:40 by contradiction, there exists some BB numbers which cannot be decided. pick one, by the well ordering of N 20:22:03 sorear, how do you mean some BB numbers are computable? 20:22:31 pejo: that it can be proven that they're what we think they are 20:22:32 pejo: For some of the numbers, we've been able to compute them 20:22:57 hello ndm 20:23:16 sorear, for anything larger than 4? 20:23:18 hi sorear 20:23:43 pejo: Right. We haven't been able to compute them all 20:23:52 pejo: ANd there is no general way to do it 20:24:38 ACTION wonders why alex's "monad" wrapper doesn't report positions with errors... 20:24:39 pejo: but if you could prove , then there would exist a simple (arbitrarily slow!) algorithm for enumerating BB's 20:24:56 BB's? 20:25:01 ndm, busy-beaver 20:25:01 Can all mathematical proofs be turned into termination proofs? 20:25:05 pejo: ergo, ! 20:25:28 pejo: ergo, 20:25:29 irc channel finds proof for century old problem in 5 minutes. news at 11. 20:25:51 SimonRC: most can 20:26:23 SimonRC: I imagine constructivist ones can? 20:26:31 SimonRC: In what sense? 20:26:36 SimonRC: All can. Theorem proof is semidecidable, so P is provable == prover(P) terminates 20:27:06 you can also encode them all as potential pattern match errors 20:28:15 Would anyone disagree with me if I conjecture that an 3-CNF encodable with O(n) bits should not be equivalent to any DNF with O(2^n) bits? 20:28:45 > if all (\(xy,z) -> xy /= z) [(x^n+y^n, z^n) | n <- [3..], x <- [1..], y <- [1..], z <- [1..]] then True else False 20:28:51 Terminated 20:29:03 Terminated! 20:29:24 centrinia: Absolutely. I think you used the wrong quantifier for the second 'any' 20:29:35 Sorry, remove the O( ) in my statement. :) 20:29:45 if ... then True else False == ... 20:29:48 \b -> if b then True else False = id 20:29:58 DrHaskell picks that one up :) 20:30:50 centrinia: What you said parses as a restriction of: forall a. forall b. a == b 20:30:56 ddarius: that's a bit stricter 20:31:20 I guess I should have said, "a 3-CNF with n terms should not be equivalent to any DNF with O(2^{2^n}) ". 20:31:21 Heffalump: you sure about that? 20:31:30 id is strict 20:31:38 oh yeah, duh 20:31:40 sorry :-) 20:31:58 we really do need a 20:32:11 equational reasoner for haskell, just like the one demo'd at least years HW 20:32:49 centrinia: (a|b|c) & (a|b|c) & (a|b|c) is == to (a) | (b) | (c) disproof. 20:32:50 ndm: is there a way to write a relaxed comparison for the attributes of a TagOpen in tagsoup? like ~== TagOpen "a" [("href","?cat=")] that matches for any string w? or i just have to extract the attribute and check by myself? 20:33:15 Oh. 20:33:20 Saizan: there is no wildcard support in the patterns, yet 20:33:26 I should not have used big O notation. 20:33:42 Saizan: adding a regular expression thingy to it would be a sensible step forward, if Haskell had a reliable and cross-compiler regexp library 20:34:18 ndm: would parameterising on a matcher be viable? 20:34:32 ndm: does yhc support libraries yet? 20:34:36 assume that the matcher determines the pattern type 20:34:44 Isn't the upper bound on the size of the corresponding DNF of an n term 3-CNF supposed to be O(2^{2^n}) 20:34:48 Philippa: its already basically parameterised on the matcher 20:35:14 Philippa: the matcher is a HOF 20:35:16 (~==) :: (TagComparison a) => Tag -> a -> Bool 20:35:27 sorear, not really 20:35:40 oh, thats even more parameterisable :) 20:36:08 i haven't looked at tagsoup in a while, people send me patches, i apply blindly 20:36:21 heh, i thought regex-base was fairly standard 20:36:40 doesn't work on Hugs at all 20:40:58 sorear, the libraries support should be doable, actually - it doesn't support cabal, just if you have a directory under packages it will look their for libraries 20:50:46 I'm having a bit of a senior moment here - given a tagsoup list with entries like 'TagText "NGE",TagClose "i",TagText ", ",TagOpen "a" [("href","/wiki/Gainax"),("title","Gainax")]', how I do match on just ones starting with TagOpen "a"? I want to say something like 'match TagOpen "a" _ = True", but that doesn't seem to work 20:52:53 match (TagOpen "a" _) = True 20:53:16 patterns are like expressions, and apposition is infixl 10 20:53:16 why are the parentheses needed? 20:53:40 'apposition'? 20:54:01 because declaration tries to mirror use, and in usage match (TagOpen "a" foo) is completely different from match TagOpen "a" foo 20:54:04 ~== TagOpen "a" [] 20:54:08 or isTagOpenName "a" 20:54:10 i think 20:54:11 application by juxtaposition 20:54:23 its been too long since i looked at how tagsoup works... 20:54:32 ndm: didn't you write tagsoup? 20:54:39 gwern: yes... 20:55:01 gwern: but i've accepted quite a lot of patches since then, and not looked at it for a while 20:55:05 sorear: oh. I think I see. so without the parentheses it looks like I'm trying to do something, but with the parentheses it looks like a pattern? 20:55:26 ndm: I'm currently whacking on the googleTechNews example so I can get a list of http links out of wikipedia articles 20:55:29 gwern: without the parenthesis it looks like three patterns 20:55:47 ok. that does make a certain sense 20:55:50 gwern: that should be just a minor tweak to the googleTechNews example, i think? 20:56:41 hey, a newbie-question: I'm working through YAHT, and battling with an excercise about data-types. I've defined a datatype Tuple = Single a | (...) | Quad a b c d, and now I'm to write a function Tuple1 :: Tuple a b c d -> Just a. I've no clue at all about how it should look. Any helpers? 20:56:45 ndm: mm. it's proving harder than I expected. I'm sort of close to the end, though, I think 20:56:52 am I all wrong here? 20:56:53 gwern: Depending on exactly what you're doing, you might also be interested in downloading all of Wikipedia and processing it offline. 20:57:04 marcusf: It should pattern match against each of the cases 20:57:14 So it will look like: 20:57:15 all of wikipedia? wouldn't that be huge? 20:57:20 tuple1 (Single x) = ... 20:57:30 ... 20:57:33 ekidd: oh, I am very familiar with the database dumps. more than I want to be 20:57:37 tuple1 (Quad x y z w) = ... 20:57:40 Cale: So I need to write tuple1 (Single a) = Just a, ..., tuple1 (Quad _ _ _ d) = Just d 20:57:42 marcusf: You want to name it tuple1, not tuple1. :-) 20:58:01 ekidd: once I get it working in the googleTechNews example, I'm going to rewrite it to use interact so I can pipe through the XML article dump 20:58:11 chessguy: Yeah. But there's no other data set like it, unless you grab the entire web like Google. 20:58:17 chessguy: it depends on what you want of Wikipedia 20:58:17 marcusf: That may be a type error -- I think you want the first of the 4 values. 20:58:29 marcusf: but essentially, yes 20:58:31 Cale: Ofcourse, thanks. just a typo 20:58:33 ermm, why is it returning a Maybe a then? 20:58:45 I mean, all the links between all that knowledge. Fun with data mining! 20:58:55 chessguy: the full SQL dump is like 80 gigs and that's the really really compressed version. and let's not even talk about getting a dump of Commons/en's multimedia 20:59:13 only 80 gigs? that's not as bad as i thought 20:59:34 chessguy: presumably there will be a tuple2 and so on 20:59:34 Lemmih! 20:59:44 chessguy! 20:59:45 Cale, oh, duh 20:59:48 chessguy: it uncompreses to somewhere around 200gigs, I think 21:00:01 chessguy: the current content of WP uncompresses to 4gigs 21:00:14 heck, just mainspace's articles in XML when compressed is a good 2 gigs and change 21:00:18 gwern: That's still pretty small. I saw a 750GB external drive for $199 in a store recently... 21:00:34 chessguy: the 200gigs figure includes archive pages, which pretty much nobody wants 21:00:35 sorear: you sure? I was pretty sure the mainspace uncompressed to around 8 gigs 21:01:08 sorear: mirrors would want that. I know the internet archive uses the archive dumps 21:01:12 hmm. no, I'm not sure at all 21:01:16 in fact: 21:01:17 -rw-r--r-- 1 stefan stefan 19G 2007-04-08 19:48 /var/cache/stefan-downloads/enwiki-20070402-pages-meta-current.xml 21:01:47 ah, it's including the non-article space stuff as well? 21:02:00 yeah, that file includes Talk: foo etc 21:02:05 sorear: 19G? That's not bad at all. 21:02:28 OK, time to stop procrastinating and go back to paper writing. :-) 21:04:48 yay! 21:04:48 shapr: You have 1 new message. '/msg lambdabot @messages' to read it. 21:04:59 What's the standard symbol for return types (eg in CPS) - I know you use 'r' when you are restricted to Latin 21:07:58 r or a or whatever you want 21:08:35 It depends. Are you talking about a monomorphic return type of "answers" or an quantified type variable? 21:08:54 snd 21:08:59 Either way, there is no special treatment usually. 21:09:13 ok 21:28:46 sorear, is that CPS question related to anything i'm writing? 21:30:39 ACTION randomly darcs pulls xmonad 21:32:41 error, not enough interesting haskell posts in my google reader 21:33:12 wolverian: i assume you are already RSS'ing planet? 21:33:18 yup 21:33:43 you could always write an interesting post 21:34:05 ndm: No. 21:34:07 I'm better at reading 21:34:25 hm. aldor looks like an interesting language. too bad it's not free. 21:34:30 ndm: I'm writing hmenu, and having a little too much fun with lhs2TeX 21:34:50 sorear: what is hmenu, and why are you using lhs2tex? 21:35:07 i only use lhs2tex for papers and stuff, other stuff is much more pleasant in HTML 21:35:34 a haskell menu program, and uh ... uh ... uh ... 21:36:08 ala dmenu? 21:36:25 very different 21:36:33 same purpose? 21:36:39 similar 21:36:56 definitely intended to work with xmonad :) 21:37:09 sorear: oh, nice. How does/will it work? 21:37:22 yeah, i had wondered why people hadn't started cloning the things xmonad cooperates with closely 21:37:40 jcreigh: code or ui? 21:37:41 ACTION notes that not *every* existing tool is broken. :) 21:37:47 sorear: UI wise 21:38:04 ACTION notes that won't stop someone from rewriting everything in Haskell 21:38:25 Touché 21:38:27 jcreigh: pops up in the center of the screen, allows mouse and kb usage, 1 level at a time 21:39:03 ACTION remembers menu systems like that from Lotus 1-2-3 for DOS 21:39:14 ACTION doesn't :( 21:39:18 apart from the mouse usage of course 21:40:33 do these Haskell versions not take up more memory than C versions? 21:41:19 ndm: Suprisingly, no. 21:41:38 xmonad seems to take up an amount of memory comparable to dwm. (Maybe due to xlib overhead in both cases?) 21:41:39 i know Gtk2Hs programs are horrible compared to C programs using the Windows API 21:41:54 That's understandable. 21:42:00 ndm: Xlib contains enough data-segment bloat to dwarf the GHC RTS 21:42:22 xmonad doesn't build for me anymore. I think I need a newer xlib 21:42:23 ddarius: but means i still have to do C coding against the Win32 API, which is uber-ugly 21:42:50 What about using the Win32 API in Haskell? 21:43:18 ddarius: that sounds extra painful, using a half-implemented API which is completely mis-designed for the language... 21:43:20 Nanar, how about using another language's gtk bindings? 21:43:25 ddarius: you probably need a newer x11-extras 21:43:39 wolverian: ? 21:43:42 It was one of those things. 21:44:02 wolverian: i think its as much gtk, as it is gtk2hs - i'd rather not use gtk at all 21:44:11 Nanar, sorry, that was to ndm :) 21:44:13 wolverian: I suspect a completion typo, because I am begginer with haskell ;) 21:44:36 wolverian: no pb, that happen often, include me 21:44:42 ndm, gtk isn't supposed to be a horrible memory hog, certainly. please submit bugs if you spot bad offenses :) 21:45:06 wolverian: on Windows, its a lot slower than win32 api, and doesn't "respond" as quickly, very subjective 21:45:21 I can believe that. 21:45:31 though I have used gaim on win32, and it seemed ok. 21:45:33 Ah the README warns of exactly that. 21:45:37 er.. pidgin 21:53:45 Not that it's hard to figure out, but it would probably be beneficial to list the addresses of the X11-extras darcs repository somewhere. 21:54:17 ndm: Note, there is no graphical Debian-type menu program compatible with xmonad. 21:54:42 sorear, i'm sure whatever you come up with will be the one to use :) - i'm just curious why the use of lhs2tex... 21:55:00 but i don't think i'll be moving to xmonad until you've made your windows port 21:55:00 it's easier to read that way! 21:55:12 the manual for hmenu? 21:55:16 or hmenu itself? 21:55:19 snd 21:55:52 hmm, now i am curious 21:59:59 hey, ndm I think I've finally got the link-extractor right 22:00:10 probably should filter out the internal WP links though 22:00:51 yay! 22:01:47 gwern pasted "tagsoup - getting a list of URLs" at http://hpaste.org/240 22:06:06 gwern annotated "tagsoup - getting a list of URLs" with "modify wp to remove internal links" at http://hpaste.org/240#a1 22:06:31 ...oh dear. that's not quite right 22:07:21 hmm, looks like a list comp could really cut out the two maps 22:07:37 ndm: do you know what I'm doing wrong? It's filtering admirably, but an entire wiki page stuffed with links to other websites is only producing '["","http://wikimediafoundation.org/wiki/Fundraising","http://wikimediafoundation.org/wiki/Privacy_policy"]' when run through 22:07:38 http://wikimediafoundation.org/wiki/Fundraising","http://wikimediafoundation.org/wiki/Privacy_policy"]' 22:07:57 gwern: my knowledge of tagsoup is rather limited... 22:08:06 ndm: oh, I don't doubt list filters could improve it, but correctness first and then readability 22:08:24 gwern: why not filter (~== TagOpen "a" []) tags instead of filter (isTagOpen)$ concat $sections (~== TagOpen "a" []) tags ? 22:08:26 gwern: often readability makes the subtle bugs more obvious 22:08:27 ACTION would like to note ndm has considerably more understanding than myself 22:09:25 concat . sections seems just a waste 22:09:30 Saizan: I think that was because of the deuced nesting of tags within tags 22:09:49 [b | TagOpen "a" [(a,b),_] <- tags, "http://" isPrefixOf b] 22:09:51 deuced? 22:09:58 does that not do what you want? 22:10:15 ndm: I'll take a look 22:10:33 gwern: i think the nub, sections and concat are cancelling each other out 22:10:34 Saizan: yes, a more mild curse than d-mned and company 22:11:17 oh, you are requiring tags to have exactly two attributes 22:11:25 my guess is that is why some tags get skipped 22:11:43 i'd use lookup "href" anyway 22:11:43 [x | TagOpen "a" atts <- tags, (_,x) <- atts, "http://" isPrefixOf x] 22:12:03 yeah, I guess my 'match _' is doing that, since I was looking for the (href, "http://...") pair 22:12:19 [x | TagOpen "a" ((_,x):_) <- tags, ... 22:12:22 you don't mention href 22:13:05 wasn't sure how to mention it 22:13:10 i think there is a lookup attribute function, but not sure what it is 22:13:33 fromAttrib :: String -> Tag -> String 22:14:01 crashes on non-TagOpen, and returns [] if the attribute is not found 22:14:34 my haddocks obviously aren't updating themselves properly 22:14:40 i'll try and get that fixed tomorrow 22:14:41 near as I can tell, let links = [x | TagOpen "a" atts <- tags, (_,x) <- atts, "http://" isPrefixOf x] would work 22:15:29 should do 22:15:32 I don't see fromAttrib in http://www.cs.york.ac.uk/fp/haddock/tagsoup/Data-Html-TagSoup.html no wonder it didn't seem too helpful 22:15:34 http://tinyurl.com/ywpexa 22:15:52 gwern: the docs are out of date, i'll fix them monday - although they should be done by cron once a day 22:15:57 ACTION darcs getted and runghc Setup haddock 22:16:32 ACTION nods. I see. no big hurry I guess 22:17:27 http://www.cs.york.ac.uk/fp/haddock/tagsoup/tagsoup/ 22:17:36 thats where the correct documentation is... 22:17:42 must have screwed up the copying over script 22:20:41 fixed :) 22:20:45 Bleh. Trying to emulate Haskell in Java makes me sad inside. 22:22:29 imagine how java feels 22:22:44 It deserves it. 22:22:45 sad outside? 22:23:08 DRMacIver: but it's a good excuse to give all your classes really snarky and insulting names. 22:23:19 that's unprofessional 22:23:36 DRMacIver: class TheOtherSecondClassFunction extends IHateYouMisterMcNealy 22:23:54 McNealy didnt hold a gun to our heads 22:23:59 you hate your management 22:24:19 Believe it or not, this isn't work code. 22:24:21 Wait, no, if we're looking to reimplement Haskell idioms in Java, that should be class SecondClassFunction implements DamnYouAllToHell. 22:24:38 ooh. s&m action 22:25:24 Actually mostly what I'm tring to emulate is laziness and having recursion optimised in a sensible manner. 22:25:53 I've suffered enough without defining FunctionN interfaces. :) 22:26:44 use scala maybe. or get some aspirin. 22:27:10 DRMacIver: why? if not for work, why use java? 22:27:49 gwern annotated "tagsoup - getting a list of URLs" with "Cleaned up version of tagsoup program" at http://hpaste.org/240#a2 22:27:54 I increasingly find I don't have a good answer to that question. 22:28:21 Normally the answer is "Libraries". In this case it's "This was a proof of concept which I didn't realise when I embarked upon it that I'd be trying to write it like Haskell" 22:29:01 Plus practice at abusing Java helps for work related stuff. :) 22:29:16 (But that's a justification more than a reason) 22:29:41 ndm annotated "tagsoup - getting a list of URLs" with "never have IO [()]" at http://hpaste.org/240#a3 22:29:53 ndm: is it bad style? 22:30:06 gwern: usually it means you want to use mapM_ instead 22:30:44 gwern: only build up a complex IO result if you need it, or if its easier - in this case the use of mapM_ is more efficient (much more) and shorter 22:30:53 mapM_ is tail recursive, mapM isn't, i think 22:31:15 oh. didn't know that it made a difference, effiency wise 22:31:34 ndm: wait, I remember reading a long thread on haskell-cafe about how tail recursion doesn't really matter in haskell... 22:32:15 gwern: it doesn't really mean what it used to mean in haskell, but mapM_ is quite a bit more efficient than mapM - but of course just use the one that fits your purpose best - which is mapM_ 22:32:21 saves you that return () at the end 22:32:52 gwern: Tail recursion still matters, but you have think about it differently. Haskell is not just a lazy language. 22:33:03 ndm annotated "tagsoup - getting a list of URLs" with "shorter" at http://hpaste.org/240#a4 22:33:38 well, I don't really mind. it cuts off a line and a pair of brackets at the expense of another underscore, so it's a good buy length-wise 22:34:59 anyway, thanks for the help ndm 22:37:23 gwern: no probs, glad tagsoup is being of use 22:38:29 sure beats hacking together something with the old unix shell tools 22:38:46 ACTION tries not to think about how complex a regexp for matching http links would be 22:38:58 ndm: tagsoup would also work on xml, right? 22:40:08 gwern: it sees tags, be them xml, html or otherwise 22:40:35 ok. I was just musing about piping in the WP XML database dump 22:42:15 should be just fine 22:42:31 although i've not looked at the tagsoup code for a while... i know its definately lazy 22:44:52 mmh class Match a where match :: String -> a -> Bool with instances String, newtype Prefix = Prefix String, and (String -> Bool) might be nice for wildcard patterns.. 22:45:23 you shouldn't need tagsoup for valid XML 22:45:23 sorear: You have 2 new messages. '/msg lambdabot @messages' to read them. 22:45:28 @messages 22:45:28 kosmikus said 31m 1s ago: I'm afraid it's difficult to change -- I'm very reluctant to change the underlying formatting routine because it would affect all old documents. 22:45:29 kosmikus said 30m 8s ago: you can always work around such formatting problems if you're willing to use lhs2TeX as a preprocessor for both LaTeX and Haskell itself 22:45:53 sorear, you might not need tagsoup for valid xml, but when it comes to extracting all the links etc, it can often be faster to write and to run 22:46:00 ACTION wonders why happy produces superfluous states 22:46:15 it's state-happy? 22:46:19 SamB, are you 100% sure they are superfluous? 22:46:30 SamB, the states required changes as the actions are added/removed to productions 22:46:59 you have to remember that LALR(1) is incredibly fragile 22:50:50 are there any functions for printing strings which are lazy? 22:50:58 unreferenced states are probably not required for anything... 22:51:59 it's quite hard to print a string without forcing it.. 22:55:13 gwern: all of the standard string printing routines will print the beginning before computing the end 22:56:12 gwern: if you turn off buffering, you may see the behaviour more clearly 22:56:16 @hoogle setbuffering 22:56:17 IO.hSetBuffering :: Handle -> BufferMode -> IO () 22:59:44 ok. 23:00:09 another question: I know how to import particular typeclasses and functions, but what's the syntax for importing a data constructor? 23:00:34 The same. 23:00:54 Sorry, TypeConstructor(DataConstructor) 23:01:25 hmm. 23:08:13 and TypeConstructor(..) imports all of the data constructors 23:08:15 sigh 23:13:52 emu: ennui much? 23:15:55 just frustration 23:24:49 @where haskell-v8 23:24:50 I know nothing about haskell-v8. 23:25:08 What is haskell-v8? 23:25:34 nothing, afaik 23:25:47 http://darcs.complete.org/haskell-v8/ <- it's that 23:25:49 Title: Index of /haskell-v8 23:26:05 complete.org is CosmicRay's site 23:26:11 haskell for vegetarians? 23:26:15 sorear: I know 23:26:29 I just found something on my harddrive and wondered wth it was :) 23:26:55 it looks like some random project of his. 23:26:57 @ask 23:27:27 @pl pH = p (h s) 23:27:27 pH = p (h s) 23:27:32 sorear: AFAIK, the idea was to write some book on Haskell 23:28:58 > let ($) = (*) in 2 + 3 $4 23:29:00 14 23:29:32 > let a ($) b = a * b in 2 + 3 $4 23:29:33 Occurs check: cannot construct the infinite type: t = t2 -> t -> t1 23:29:33 ... 23:29:53 > let a$ b = a * b in 2 + 3 $4 23:29:54 14 23:30:07 hmm. http://darcs.complete.org/haskell-v8/monads-v8.txt looks interesting 23:30:27 I'd have expected 20. Oh well.. 23:41:18 @seen cosmicray 23:41:18 I haven't seen cosmicray. 23:53:29 > let infixr 0$; ($) = (*) in 2 + 3$ 4 23:53:30 20 23:53:56 How do you make your backups of your homedir? 23:54:12 (including source code, etc) 23:54:33 All the GUI programs assume that the user has ordered his data perfectly. 23:55:35 Writing it directly against cdrecord would take quite some time, I think. 23:58:21 fasta: rsync. ;) 23:58:51 int-e: Right. I'm just surprised that 0 isn't the default.