00:00:00 --- log: started haskell/02.01.18 00:29:33 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 01:40:06 --- join: jewel (~jleuner@57.66.12.99) joined #haskell 02:08:46 re jewel 02:50:45 yo 02:50:55 what's up? 02:51:52 I'm pissed off with the immigration office, I went there to find out that people have been queueing since 1am for "tickets", once you get a ticket they tell you how many hours to wait 02:52:04 yikes! 02:52:10 that's terrifying 02:52:15 it's Ireland 02:52:49 here I walked into the local post office, Bea said "I'm an EU citizen, and he's my sigificant other." 02:53:21 then we paid $15 USD and waited two weeks. 02:53:34 and my 5 year residence and work permit arrived. 02:54:00 * Heffalump remembers that it's Norway and not Finland that isn't currently in the EU and unconfuses himself 02:54:42 your circumstances are different, yes? 02:55:22 whose, mine? 02:55:51 er, jewel 02:55:53 :) 02:56:11 you, Heffalump told me that you've been living in .uk your whole life. 02:56:13 right, just checking cos he didn't answer :-) 02:56:14 yep. 02:56:39 therefore, I suspect that you're a legal .uk citizen with all right, privs, obligations, etc 02:56:50 shapr: do you have to be married for that? 02:56:55 jewel: not in .fi 02:57:02 'life partner' 02:57:06 but is that EU wide? 02:57:36 are they allowed to have different policies in each state? 02:58:18 er, I think so 02:58:56 for example, 'life partner' in .fi includes gay and lesbian couples who have been only recently allowed to marry. 02:58:59 Damn, that would make it much easier. Did you have to prove that you were 'significant'? 02:59:06 no, not really. 02:59:12 we have the same address 02:59:20 still do 02:59:34 I have to notify the immigration ppl when I move 02:59:42 cool 02:59:50 and if you didn't live together? 02:59:55 I don't know 03:01:13 Heffalump: are you familiar with Joy? 03:02:22 I'm trying to find comparison info between Joy and Forth 03:06:18 shapr: nope, sorry 03:35:22 --- quit: jewel (SendQ exceeded) 03:35:34 --- join: jewel (~jleuner@57.66.12.99) joined #haskell 03:36:15 --- quit: jewel (SendQ exceeded) 03:36:27 --- join: jewel (~jleuner@57.66.12.99) joined #haskell 04:30:34 --- quit: jewel (carter.openprojects.net irc.openprojects.net) 04:30:34 --- quit: dennisb (carter.openprojects.net irc.openprojects.net) 04:30:57 --- quit: dblack ("[x]chat") 04:35:23 --- join: jewel (~jleuner@57.66.12.99) joined #haskell 04:35:23 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 05:30:01 --- join: dblack (~dblack@shunat236-80.shu.edu) joined #haskell 05:47:05 --- quit: dennisb (Read error: 113 (No route to host)) 06:04:35 --- join: Vutra_ (~ss@port-212.169.142.179.flat4all.de) joined #haskell 08:37:33 --- quit: dblack ("[x]chat") 08:39:39 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 08:43:03 * shapr chortles merrily 08:43:24 * Heffalump looks worried :-) 08:45:00 ;) 08:45:31 I'm playing with Joy 09:40:31 --- quit: dennisb (Read error: 110 (Connection timed out)) 11:12:21 --- quit: Vutra_ (Read error: 104 (Connection reset by peer)) 11:12:41 --- join: Vutra_ (~ss@port-212.169.142.179.flat4all.de) joined #haskell 11:13:01 --- quit: Vutra_ (Read error: 104 (Connection reset by peer)) 11:13:17 --- join: Vutra_ (~ss@port-212.169.142.179.flat4all.de) joined #haskell 11:20:54 --- join: jsw (scott@12-234-202-177.client.attbi.com) joined #haskell 12:43:18 --- nick: Vutra_ -> Vutral 12:56:38 --- quit: xbill (carter.openprojects.net irc.openprojects.net) 12:56:38 --- quit: smkl (carter.openprojects.net irc.openprojects.net) 12:58:03 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 12:58:58 --- quit: jsw (carter.openprojects.net irc.openprojects.net) 12:58:58 --- quit: Vutral (carter.openprojects.net irc.openprojects.net) 12:59:01 --- quit: kepler (carter.openprojects.net irc.openprojects.net) 12:59:01 --- quit: jlb (carter.openprojects.net irc.openprojects.net) 12:59:19 --- join: jsw (scott@12-234-202-177.client.attbi.com) joined #haskell 12:59:19 --- join: Vutral (~ss@port-212.169.142.179.flat4all.de) joined #haskell 12:59:19 --- join: kepler (~kepler@adsl-81-160-231.asm.bellsouth.net) joined #haskell 12:59:19 --- join: jlb (~ktk@jeremeydsl-3.mylinuxisp.com) joined #haskell 12:59:54 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 12:59:54 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 12:59:54 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 12:59:59 --- quit: Heffalump (Read error: 104 (Connection reset by peer)) 13:00:09 --- join: Heffalump (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 13:00:11 --- quit: Heffalump (carter.openprojects.net irc.openprojects.net) 13:00:11 --- quit: xbill (carter.openprojects.net irc.openprojects.net) 13:00:11 --- quit: smkl (carter.openprojects.net irc.openprojects.net) 13:00:19 --- join: Heffalump (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 13:00:19 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 13:00:19 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 13:02:30 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 13:03:13 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 13:03:29 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 13:05:43 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 13:07:23 --- quit: xbill ("Leaving") 13:14:07 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 13:34:39 --- quit: kepler (Remote closed the connection) 14:03:16 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 14:03:24 --- join: nefph (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:03:49 hi 14:03:52 --- nick: nefph -> dmiles 14:04:43 --- quit: dmiles (Read error: 54 (Connection reset by peer)) 14:04:46 --- join: nefph (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:05:12 --- nick: nefph -> dmiles 14:14:37 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 14:14:46 --- join: nefph (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:15:24 --- nick: nefph -> dmiles 14:31:52 --- quit: dmiles (Read error: 54 (Connection reset by peer)) 14:32:09 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:41:24 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 14:41:44 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:44:23 --- join: nefph (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:44:26 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 14:45:19 --- quit: nefph (Read error: 104 (Connection reset by peer)) 14:45:52 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:46:57 --- quit: Heffalump (carter.openprojects.net irc.openprojects.net) 14:46:57 --- quit: smkl (carter.openprojects.net irc.openprojects.net) 14:50:14 --- join: Heffalump (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 14:50:14 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 14:55:41 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 14:55:56 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 14:57:17 --- quit: dmiles (Read error: 54 (Connection reset by peer)) 16:34:09 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 16:41:47 --- join: Vutra_ (~ss@212.169.153.72) joined #haskell 16:59:29 --- quit: Vutral (Read error: 110 (Connection timed out)) 17:06:06 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 17:06:33 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 17:08:16 --- join: kepler (~kepler@adsl-81-160-231.asm.bellsouth.net) joined #haskell 17:26:54 --- quit: kepler (Read error: 113 (No route to host)) 17:27:13 --- join: kepler (~kepler@adsl-81-160-231.asm.bellsouth.net) joined #haskell 17:27:18 f00 on a stick 17:32:30 --- join: jemfinch (~jemfinch@rpat-100-139.resnet.ohio-state.edu) joined #haskell 17:32:49 f00 I say 17:33:00 shapr: you're into haskell now? 17:33:47 yah sure 17:34:03 I'm like a fun guy 17:34:18 hard to stop my expansion ;) 17:34:22 :) 17:34:25 hey, you know something about Haskell? 17:34:32 not much, nothing specific. 17:34:39 I know of its general features, though. 17:34:42 oh 17:34:55 I'm trying to do something relatively convoluted 17:35:00 splitY char tokens string = splitY char 17:35:00 (tokens ++ [first_chunk char string]) 17:35:00 (drop 1 (second_chunk char string)) 17:35:03 but it's not working 17:35:07 first_chunk char string = (takeWhile (/= char) string) 17:35:15 second_chunk char string = (dropWhile (/= char) string) 17:35:26 what are you trying to do in english? 17:36:00 string.split in python 17:36:11 string.split('this is a test',' ') 17:36:24 what's what you're trying to write in haskell? 17:36:38 eh? 17:36:39 s/what's/that's/ 17:36:42 yes 17:36:48 and I realize it already exist 17:36:57 and I know several other ways of doing it 17:37:00 and you only want to be able to split on a character? 17:37:02 PragDave showed one earlier 17:37:04 right 17:37:11 * jemfinch has written it in O'Caml. 17:37:13 and I want to fix *this* one 17:37:22 conceptually, how are you trying to do this one? 17:37:35 * jemfinch can't read haskell incredibly well, especially in unformatted irc. 17:37:37 you know takeWhile and dropWhile? 17:37:44 can't say I do :( 17:38:22 takeWhile testfun list 17:38:36 it takes until testfun returns false? 17:38:39 so each time it pulls a Char from the list, it tests that Char 17:38:40 right 17:38:50 it has an opposite number, dropWhile 17:38:57 which is.. 17:39:04 obvious :) 17:39:07 :) 17:39:15 so 17:39:21 what's the /= char do in this case? 17:39:24 s/char/operator/ 17:39:28 means not equal 17:39:49 so (/= ' ') means "not equal to a space character" 17:40:03 I don't know if you can use an operator as a function just like that. 17:40:09 you can 17:40:21 that seems ambiguous. 17:40:25 it's not 17:40:29 I know functions can be used as operators with backticks... 17:40:41 yah, but that's not my problem 17:40:50 but how would "10 /= 10 45" be parsed? 17:41:06 is that (10 (/= 10 45)) or ((10 /= 10) 45)? 17:41:09 it would try to call the function true on 45 17:41:19 space means function application in Haskell 17:41:27 you'd get True 45 17:41:32 and then it'd complain at you 17:41:34 I know *that* :) 17:41:45 remember, I program in O'Caml. 17:41:48 do you have an interactive Haskell shell handy? 17:41:50 I can show you. 17:42:06 ghc is my preference, because I can do the let x = stuff there 17:42:23 does ghc have a shell comparable to python's or O'Caml? 17:42:30 dunno O'Caml 17:42:41 well, is there an interactive shell like Python's? 17:42:50 not quite that good, but decent 17:43:09 what do I have to type to get it? 17:43:12 * jemfinch has ghc installed. 17:44:05 ghci 17:44:24 hmm, I don't have that. 17:44:44 ghci rules 17:44:49 you using debian? 17:44:49 * jemfinch doesn't have it. 17:44:52 hi xbill! 17:44:57 no, FreeBSD, installed ghc from ports. 17:45:00 oh 17:45:02 dunno about that 17:45:13 hey xbill, any idea what my problem is? 17:45:39 so does anyone here know about phantom types? 17:45:40 Cannot unify the type-signature variable `a' with the type `[a1]' 17:45:41 Expected type: [a1] 17:45:41 Inferred type: a 17:45:41 In the first argument of `(++)', namely `tokens' 17:45:41 In the second argument of `splitY', namely 17:45:44 phantom? 17:46:29 http://pauillac.inria.fr/bin/wilma_hiliter/caml-list/200109/msg00097.html?line=3#hilite 17:47:40 no clue 17:47:42 have you heard of Joy? 17:47:54 what is it? 17:47:56 (no, I haven't) 17:48:19 it's a stack based concatenative functional lang 17:48:29 wow, I've never heard of it. 17:49:06 linkage? 17:49:06 not that great though 17:49:07 http://www.latrobe.edu.au/philosophy/phimvt/joy.html 17:49:07 I like it 17:49:07 it has a nice feel to it 17:49:07 dash says it has some resemblance to Forth 17:49:16 xbill: you know it? 17:49:24 * jemfinch never liked forth, it seemed forth focuses too much on being ugly. 17:49:27 I liked the idea, though. 17:49:48 shapr: more on phantom types: http://www.cs.uu.nl/~daan/papers/dsec.html 17:49:49 xbill: the language is not that great? or its resemblance to Forth? 17:50:12 the language is not that great 17:50:18 oh 17:50:23 what don't you like about it? 17:51:54 is it strictly typed? 17:52:00 In particular we apply this idea to implement Haskell/DB, a domain specific embdedded compiler that dynamically generates of SQL queries from monad comprehensions, which are then executed on an arbitrary ODBC database server. 17:52:02 * shapr grins 17:52:04 cute 17:52:30 I don't know what strictly typed means. 17:52:40 shapr: it means that typechecking happens at compile time. 17:52:46 and improperly typed programs can't be compiled. 17:52:59 I don't think so 17:53:07 it's one of the things that makes programming in languages like O'Caml and Haskell so safe. 17:53:27 I'm not convinced that strict typing is useful. 17:53:33 if you continue programming in haskell, you'll soon discover that when your program compiles, it has a much smaller set of possible runtime errors than your python programs. 17:53:45 * shapr shrugs 17:53:54 I rarely ever have runtime errors in Python 17:54:05 if only everyone was as good a programmer as you, shapr :) 17:54:33 it has more to do with test first 17:54:33 do you have runtime errors in testing? 17:54:45 only purposeful ones 17:55:12 well, think of strict typing as a kind of testing that does complete code coverage tests for certain classes of bugs. 17:55:21 yah, I know what it is :) 17:55:29 Python is by no means the only language I use. 17:55:44 * jemfinch checks what channel he's in. 17:55:45 I'm still not convinced it has any advantages. 17:56:04 shapr: there are certainly advantages. 17:56:04 it has tons of advantages for optimizations 17:56:16 ah, now *that* I can believe 17:56:24 shapr: there are also disadvantages, and deciding whether they're worth it or not is *your* decision. 17:56:25 but types can be inferred 17:56:38 for me, the advantages of static typing far outweigh their disadvantages. 17:56:55 right, I'm not sayng that *you* should you dynamically typed languages 17:57:02 just talking about what works for me 17:57:07 shapr: dynamically typed languages are almost invariably type inferring. O'Caml and Haskell both are type inferring too, you know :) 17:57:17 yup 17:57:19 I like that 17:57:49 though I am also aware there are situations where explicitly typing a function will greatly improve performance 17:57:50 it's not that static typing doesn't have advantages, it's just that for you, the decreased flexibility might not be worth the extra safety. 17:58:23 shapr: in O'Caml, there's not too much a difference in performance between polymorphic and specifically-typed functions, I don't think. 17:58:38 shapr: I'm having trouble following which languages you're talking about when you're making statements about stuff :) 17:58:53 yah, I can understand that. 17:59:19 of course, strictly typed languages are less reflective than dynamically typed languages. 17:59:30 but they're also faster, because they don't have to carry around type information. 18:00:44 so maybe the solution is to write dynamically type languages in strictly typed languages 18:00:54 and just use whatever level appeals to you at the moment. 18:00:58 well, then you lose the safety of the strict typing. 18:01:33 really, if you're comfortable enough to write a dynamic typesystem in a strictly typed language, you'll almost always feel more comfortable in the strictly typed language :) 18:01:46 ? 18:01:59 which part are you questioning? 18:02:22 that sounds you're saying "if you wrote Python in C, you'll be more comfortable in C" 18:02:40 --- quit: smkl (Read error: 60 (Operation timed out)) 18:03:05 shapr: you'd be at least as comfortable in C, definitely...now, there's a very large difference between the *level* of Python and C, though. 18:03:33 at least in the case of O'Caml, there's not a significant difference in the level of the dynamic language and O'Caml itself. 18:03:58 because O'Caml has almost all those facilities Python offers, sans the reflection. 18:04:00 I suspect that depends on the language you write 18:04:25 I suppose so, but to get much higher level than O'Caml, you'd probably have to restrict your language to a smaller domain. 18:04:36 * shapr disagrees 18:04:46 I'm not saying I know of a better language 18:05:06 I'm just saying that programming in general has a long way to go till we're past the assembly level stage 18:05:39 shapr: my only point is that if you implemented Python in O'Caml, you really wouldn't gain any new capabilities -- you might make a few small decreases in LoC, but aside from that, you wouldn't have any really sigificant features that O'Caml doesn't have already. 18:06:10 whereas with C, Python provides significant facilities that C doesn't -- resizeable lists, lots of cool string ops, etc. 18:10:25 so no one here knows about phantom types much? 18:10:35 not me 18:10:50 C's a sugared assembler dressed up to look machine independent (which it isn't). 18:11:02 * shapr agrees 18:11:52 hmm 18:12:01 ghc compiles on linux and windows 18:12:11 I wonder if it could compile binaries for the SymbianOS 18:12:16 that runs on the Psion 18:33:51 --- quit: kepler (Remote closed the connection) 18:34:01 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 18:42:43 perhaps try an extra set of []' around [first_chunk char string] in your example. 18:43:37 just guessing. I think that ++ wants to add two lists toghether, but the rhs isn't the 18:43:44 same kind of list as the lhs. 18:44:07 s/[]'/[]'s/ 19:12:03 maybe someone can help me with a question? Inspired by the conversation, I wrote a tail recursive split function like 19:12:10 split :: Char -> String -> [String] 19:12:10 split sep s = split_ s [] [] 19:12:10 where 19:12:10 split_ :: String -> String -> [String] -> [String] 19:12:10 split_ [] hunk acc = reverse ((reverse hunk):acc) 19:12:10 split_ (x:xs) hunk acc 19:12:12 | sep == x = split_ xs [] ((reverse hunk):acc) 19:12:14 | otherwise = split_ xs (x:hunk) acc 19:12:48 but noticed that Prelude.lines does something similar, in a non-tail recursive way. 19:13:32 the tail recursive method requires that the lists be re-scanned, but that seems to undo the advantages of the tail recursion. 19:14:00 (re-scanned to do the reverse) 19:14:31 but I was wondering which is usually the better way to go in a case like this? 20:45:55 --- quit: Vutra_ (Read error: 54 (Connection reset by peer)) 22:15:15 jsw: as long as you stay under the stack limit, the non-tail-recursive, non-reversing way is almost always faster. 22:38:50 anyone here know about phantom types? 22:47:22 thanks! 22:47:34 bye for now 22:47:37 --- part: jsw left #haskell 23:19:52 --- join: kepler (~kepler@adsl-81-160-231.asm.bellsouth.net) joined #haskell 23:36:53 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 23:59:59 --- log: ended haskell/02.01.18