Haskell pt.1
functional.html
21:09:56
vixey: http://hpaste.org/11927#a1 Note the count 2 in there, I
am going to change that so I can find out how many = there are in a row. BTW, I
would like to know if there is a better syntax styling then I used.
21:10:01 actually I suggest _not_ reading that banas thing
21:10:12 there is a much much better text which contains that as one of
the chapters
21:10:18 Calculating Compilers
21:10:39 What does it mean when I can compile & run something fine, but
when I ghci it I get a unknown symbol error?
21:11:03 camio: hpaste.org or it didn't happen :p
21:11:29 jdrake: It is a simple GLUT example program.
21:11:43 camio: can you show us what you are doing in ghci?
21:12:01 jdrake: runhaskell test
21:12:18 \HSGLUT-2.1.1.2.o: unknown symbol `__imp__glutGetProcAddress'
21:12:22 how can i (using lambdabot or whatever) find out how type X
implements class Y
21:12:34 vixey: cool, i'll check it out. pretty sure i need Maps,
though - i'm thinking about 60000 distinct symbols
21:12:46 hmm, beyond my experience
21:12:51 blackdog, yeah probably just need to change one line or
something
21:13:00 jdrake: length `liftM` many1 (char '=')
21:13:05 jdrake: It seems like ghci isn't linked with the .a library. I'm
not sure how that works.
21:13:36 conal: I created a trac account but I have no idea how to
make a ticket
21:14:20 roconnor: are you looking at http://trac.haskell.org/fieldtrip/
21:14:23 Title: fieldtrip - Trac
21:14:23 roconnor: ?
21:14:29 camio: which OS?
21:14:44 conal: yep
21:15:08 roconnor: logged in?
21:15:12 RayNbow: windows
21:15:13 yep
21:15:21 roconnor: do you see a "New Ticket" button near the upper right?
21:15:30 nope
21:15:49 roconnor: oh! glad to know. i'll poke around.
21:16:33 camio: I managed to get OGL+GLUT working today with 6.10.1
thanks to this guide: http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/
21:16:37 Title: Less Sugar/More Meat В» Blog Archive В» freeglut +
Windows + HOpenGL + HGLUT, http://tinyurl.com/5ualsl
21:16:59 conal: the examples on FieldTrip look great, but are missing
module imports.
21:17:23 RayNbow: i'm writing a blog to do it an even easier way for
windows now ;)
21:17:24 RayNbow: That's for the pointer. I wrote that ;) It looks like
it might not be complete.
21:17:28 dons: I found there was a module FTest in reactive-fieldtrip
already which contained the example code.
21:17:31 roconnor: hm. i guess i'll have to learn more about trac.
21:17:34 ah ok.
21:17:54 dons: i'm doing the deed we talked about yesterday
21:18:04 snk_kid: What's the secret to doing it easier?
21:18:15 dons: Cale, do you still see "FTest.hs"? I renamed it to Test.hs
a few days ago.
21:18:17 camio: cabal-install :D
21:18:29 conal: Did you upload that to hackage?
21:18:38 Test.hs
21:18:39 conal: That's where I get my packages from ;)
21:18:42 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/reactive-fieldtrip-0.0.2
21:18:45 Title: HackageDB: reactive-fieldtrip-0.0.2, http://tinyurl.com/6xscy4
21:18:45 ah
21:18:59 camio: oh... :p
21:19:01 that's newer than what cabal install pulled in... I'll update
then :)
21:19:04 Botje: nice
21:19:05 snk_kid: something easier?
21:19:08 woo!
21:19:10 Cale: ok
21:19:12 conal: works lovely
21:19:16 snk_kid: That'll download and install freeglut too?
21:19:21 dons: :)
21:19:49 camio: i doubt it will go that far but i mean get packages in
general
21:20:25 snk_kid: Ah I see. GLUT with freeglut is a bit complicated. I
don't think cabal install is quite there yet.
21:20:35 camio: anyways that blog helped me a little so
21:20:51 camio: i'm gonna write one on building fraps
21:21:01 camio: i mean frag
21:21:08 just curious, is there a default operator/function that makes a
pair out of 2 elements?
21:21:31 > (,) 1 2
21:21:32 (1,2)
21:21:33 (,)
21:21:45 great thx :)
21:21:52 > (,,) 1 2 3
21:21:54 (1,2,3)
21:22:27 how bout
21:22:34 > (,(,)) 1 2 3
21:22:34 : parse error on input `('
21:22:56 I don't think it supports cross sections
21:23:11 @type (((,) .) . (,)) 1,2,3
21:23:12 parse error on input `,'
21:23:14 @type (((,) .) . (,)) 1 2 3
21:23:16 forall b a a1. (Num b, Num a, Num a1) => ((a1, a), b)
21:23:25 @type (((,) .) . (,)) 'a' 'b' 'c'
21:23:27 ((Char, Char), Char)
21:24:05 > (,) 1 $ (,) 2 3
21:24:10 (1,(2,3))
21:24:11 good ways to piss off your co-workers
21:24:17 > (,) ((,) 2 3)
21:24:20 Overlapping instances for Show (b -> ((t, t1), b))
21:24:20 arising from ...
21:24:44 > (,) 1 ((,) 2 3)
21:24:49 (1,(2,3))
21:24:53 > (,) "sa" "ya"
21:24:56 ("sa","ya")
21:25:06 > (,) ((,) 1 2) 3
21:25:07 ((1,2),3)
21:26:24 Who can recommend text on category theory?
21:27:34 I have a weird issue with Parsec that I can't figure out. That
said, I am pretty new to Haskell as well
21:27:47 is it reasonable to ask a question in this channel? Or am I
best off using a mailing list?
21:28:49 andys, I'm sure it's fine to ask that here
21:28:56 im trying to concat a Maybe String with a String but I keep
getting errors saying it should be a "Maybe a" when Im returning a String. Any
ideas? http://hpaste.org/11855#a3 code in question is at the bottom of hCodeAux
21:29:07 f4lcon, you can use mappend,
21:29:14 > Just "foo" `mappend` Just "bar"
21:29:15 Just "foobar"
21:29:19 > Nothing `mappend` Just "bar"
21:29:20 Just "bar"
21:29:35 How can I filter all values with a Foo constructor? filter (==
Foo{}) doesn't work. Or do I have to defined p Foo{} = True;p _ = False?
21:29:42 define*
21:29:55 hmm will try that
21:30:00 f4lcon, but maybe mappend doesn't quite suit in your case
though..
21:30:03 filter (\f -> case f of Foo{} -> True; _ -> False)
21:30:13 conal: http://www.youtube.com/watch?v=WNB5V9Z7Obc
21:30:15 how would i do (\x y z -> (x,(y,z)) with just operators? (just
for the sake of having unreadable code :))
21:30:17 Title: YouTube - 3D spinning torus: FRP FieldTrip demo
21:30:17 f4lcon, but why aren't you using the fold? :)
21:30:22 @pl \x y z -> (x,(y,z))
21:30:23 (. (,)) . (.) . (,)
21:30:28 I found this way to suit my noobish ways xD
21:30:33 :o
21:30:38 I'm trying to write a very basic parser that looks for a lower
case letter first, followed by any regular letter
21:30:41 so I did
21:30:57 f4lcon, oh.. I only use folds and so on because they make
everything much easier
21:30:59 unenough: what's your mathematical/CS background?
21:31:05 @pl \x y z -> ((x,y),z)
21:31:06 ((,) .) . (,)
21:31:06 atom = do { schar <- lower ; rem <- (many letter) ; return
schar : rem; }
21:31:24 ill probably use them as i learn more haskell but I couldnt
get my head around it last night so i decided to stick with this stuff
21:31:26 dons: i just made http://haskell.org/haskellwiki/FieldTrip more
explicit about how to run the example.
21:31:26 unenough: I recommend Awodey's text, regardless of your existing
background :)
21:31:29 Title: FieldTrip - HaskellWiki
21:31:41 f4lcon, well I can help you to understand it if you like
21:31:44 and it gives me a type whinge that it's expecting [m Char]
rather than [Char]
21:31:51 @pl ((,) .) . (,)
21:31:52 ((,) .) . (,)
21:32:03 maybe another time but atm I just want to finish this work :P
21:32:12 byorgey, i've done stuff like complex analysis, linear
algebra / fourier analysis, undergrad level
21:32:14 conal: very impressed at the performance just in ghci alone.
21:32:15 I've been playing with ghci trying to look at types, and it
looks like it should be fine. But my Haskell is well, not great
21:32:15 dons: hey, neat!
21:32:22 dons: just not portable, since vector-spaces doesn't work on my
system.
21:32:26 unenough: It has not much in the way of prerequisites, and
contains exposition on some of the most important examples of categories.
21:32:27 conal: added a link to the video of the demo at the bottom.
21:32:32 pozic: hm?
21:32:50 MarcWeber: i've come up with a small example that illustrates the
problem, from end to end
21:32:57 http://cale.yi.org/share/Category%20Theory%20-%20S.%20Awodey%20(Clarendon,%202006)%20WW.pdf
21:33:00 Title: cache:http://cale.yi.org/share/Category%20Theory%20-%20S.%20Awodey%20(Clarendon,
..., http://tinyurl.com/4jav6v
21:33:01 dons: cabal: Package vector-space-0.4.1 can't be built on this
system.
21:33:01 pozic: vector-spaces looks straight forward. you might need ghc
6.10
21:33:07 pozic: yes, but why... ?
21:33:10 dons: then Cabal should say that.
21:33:19 pozic:
21:33:19 pozic, so fix cabal
21:33:20 if impl(ghc < 6.10) {
21:33:20 buildable: False
21:33:20 }
21:33:27 pozic: portable. but dependent on new ghc.
21:33:31 vixey: or not look at the demo.
21:33:32 Cale, woohoo exactly one copy in the library :)
21:33:40 vixey: problem solved :)
21:33:43 pozic: you need ghc 6.10...
21:33:43 dons: it is awfully fast. thx for that video link.
21:33:50 unenough: There's that PDF there as well.
21:33:53 conal: yes. i'm amazed at how well ghci holds up.
21:34:26 dons: of course reactive & FieldTrip are compiled in this case.
21:34:32 yup
21:34:47 and thats at full 1600x1200 too
21:34:50 Cale, two questions. A. is it interesting? (e.g. surprising
results? any results at all?) B. useful/important for understanding haskell (or
just 'extra')?
21:34:56 wowzers
21:35:00 @pl \x y z -> (x,(y,z))
21:35:01 (. (,)) . (.) . (,)
21:35:03 and too bad the video can't show the actual frame rate.
21:35:05 note my dual head setup in that screencast
21:35:41 dons: how did you make the movie?
21:35:54 using 'recordmydesktop'
21:36:00 then uploading the .ogv file to youtube
21:36:48 whats the video about?
21:37:08 dons: cool. now that i'm working in linux (blisfully), i get to
pick up all these toys from my haskell friends.
21:37:14 yay :)
21:37:23 unenough: It's useful but not important for understanding
Haskell. There are a number of interesting results in the book, including the
best exposition I've found on Yoneda's lemma (which ought to be called Yoneda's
completion theorem), and lots of connections between category theory and
mathematical logic.
21:37:50 Cale: is the pdf's contents equal to the contents of the
hardcover book?
21:38:05 MarcWeber: http://hpaste.org/11922#a3
21:38:09 It should be, but I haven't had a chance to get hold of the
hardcover book, so I don't know.
21:38:51 snk_kid: http://www.reddit.com/r/programming/comments/7cijd/fieldtrip_purely_functional_realtime_3d_graphics/
21:38:53 Title: FieldTrip: Purely functional real-time 3D graphics
using reactive programming : ..., http://tinyurl.com/5qveng
21:38:54 Cale, thanks. i'm hoping it will also help me with haskell
and designing languages
21:39:01 ACTION prefers reading from paper rather than from screen...
21:39:09 ACTION too
21:39:11 I think it may have even come from the original author. I
mentioned that I was looking for that book to my friend, and he procured a copy
of that PDF. (But it didn't appear in any of my usual places to look for books
online)
21:39:26 but I don't feel like printing 266 pages... nor do I have the
money for the book :p
21:39:50 unenough: which languages do you want to design?: )
21:39:51 http://www.cs.man.ac.uk/~hsimmons/BOOKS/books.html
21:39:58 dons: nice :D
21:39:59 Title: Books
21:40:02 vixey, i'm working with Peaker
21:40:02 also has some books relevant to functional programmers
21:40:09 on what?
21:40:21 i thought he told you
21:40:23 RayNbow: just another reason to buy an eink reader ;)
21:40:28 conal++ i'm so glad to see this stuff coming to fruition. its
been a long path, but looks like its mostly in place now.
21:40:28 Lambda calculi, Category theory, and Model theory.
21:40:34 high level, high perf declarative 3d woo!
21:40:53 dons: thx. :) and thx for the reddit love, too.
21:41:14 luite: nah, I actually could afford to buy the book... it's
just that I don't want to spend money on books while I have a reading queue :p
21:41:15 I'm actually curious about what the performance will be like for
more complex scenes :)
21:41:17 . o O ( is there a lambdacat pic involving "mewtype"? )
21:41:32 int-e: haha! there isn't.
21:41:35 AWW
21:41:37 vixey, it's hard for me to explain :) for now, just learning
haskell. later, building a system that includes a programming environment
21:41:44 I really hope that it scales well, because I can imagine this
being attractive to game developers.
21:41:44 most of the model theory stuff is not finished
21:41:49 RayNbow: that would mean you couldn't spend any money on any
book, ever?
21:41:59 unenough, ah, excellent
21:42:17 Cale: i'm excited. if ghci can run high level descriptions like
this, there's some room yet just by compiling it.
21:42:37 Cale: you should start playing with it. The more experience, the
better.
21:42:40 luite: well, I don't mind having a queue... but I don't want
the queue to become too large :p
21:42:40 do some pretty mathy things
21:42:40 dons: yeah
21:42:44 :)
21:42:52 ACTION should continue reading TaPL some time :p
21:42:54 a programming environment where the actual code (not text)
is constructed on-the-fly as you edit, allowing many neat features that are
currently horribly hard to implement, such as refactoring easily, etc...
21:43:04 but that's just Step 1 (tm)
21:44:03 I already have a programming environment where the actual
AST is created on the fly as I edit. It's called Liskell. :P
21:44:13 RayNbow: my queue is always too large, it's a lazy list, as
some elements get evaluated, new elements get appended to the end automatically
21:44:24 There's another surprisingly good one called DrScheme, too.
21:45:19 I like paredit for lisp
21:45:21 MyCatVerbs, i mean that the code AST exists in memory and
the text on the screen is just a 'gui'. is that what you have?
21:45:31 or do you compile text?
21:45:32 unenough, you use paredit?
21:45:51 vixey, nope, googling it now
21:46:01 http://www.amazon.com/review/RTRDVINF2JXW0/ref=cm_cr_dp_cmt?%5Fencoding=UTF8&ASIN=0198568614&nodeID=283155#wasThisHelpful
<-- there's a sigfpe on Amazon talking 'bout Category Theory! :p
21:46:08 jsn: So what? Does my example work?
21:46:09 http://tinyurl.com/649hvg
21:46:10 ah, emacs mode
21:46:25 editline related? "Linking dist/build/haddock/haddock ...
/usr/bin/ld: cannot find -ledit"
21:46:33 jsn: Why do you have dropped waitForProcess?
21:46:36 (while trying to install haddock 2.4.1)
21:46:59 Heh
21:47:02 haddock
21:47:10 MarcWeber: i was advised that it can lead to a race condition
21:47:11 Haskell has the best names
21:47:18 :)
21:49:32 MarcWeber: also, waitForProcess seems to make the problem show up