четверг, 8 января 2009 г.

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
earlier
21:49:39 jsn: Than you should ask them about how to solve the
problem cause they do know more than I do
21:49:48 okay
21:49:50 there's a difference between a fancy text editor and an
editor that transforms the executable AST in memory on the fly, where the text
is just a view on the screen
21:50:06 unenough: it's called TeXMacs.
21:50:06 jsn Does it show up in my example as well (even if it does
contain a race condition) ?
21:51:15 pozic, isn't that specifically for latex?
21:51:42 unenough: nope, It's made from scratch
21:52:17 when I use TeXmacs always want to rewrite it in Haskell.
21:52:22 i don't get it
21:52:30 doesn't it edit only tex?
21:52:49 nope it has it's own format
21:53:02 what format?
21:53:11 other than the vague ability to export to latex, I think it
is totally unrelated to TeX
21:53:22 TeXmacs format
21:53:24 .tm
21:53:46 it's a generic AST editor?
21:53:57 hmm
21:54:28 doesn't have to be generic, even a specific AST editor of
some programming language (not typesetting language...)
21:54:29 say i want to time the evaluation of a pure value, I want
something like timeComp :: a -> IO TimeDiff. In timeDiff i get the current time,
then do the computation, then get the time again. How do I force the computation
to take place between the other two IO actions without printing it?
21:54:30 possibly I mean it has buildin tags for chapter, sectoin,
tables, etc.
21:55:35 ttfh_: I don't think it can be done like that though
21:55:57 ttfh_: I used Control.Concurrents rnf thing to time sort
algorithms
21:56:13 ACTION is writing his thesis in TeXmacs at the moment
21:56:43 unenough: it edits a weird scheme thing
21:56:57 well anyway, the idea is to have the editor understand the
meaning of the AST it's building, so that it can do things like show you the
type inferred in real-time as you edit, prevent you from ever creating broken (uncompilable)
code, do all sorts of lambdabot tricks easily.
21:57:04 unenough: they made a special kind of scheme to store TeX
21:57:14 roconnor: nice
21:57:21 jsn, i think the scheme is an extension language to create
plugins for texmacs, no?
21:57:26 it's called a structure editor
21:57:31 unenough: it is both
21:57:38 ot: is there a common name for a collection that is
ordered and has only distinct elements (compared with set, bag, list)
21:57:46 unenough: texmacs format is actually full of parens
21:57:48 pozic: It fills me with hate due to all its little problems
21:57:59 roconnor: that too ;)
21:58:05 Plareplane: I heard of FreshList
21:58:06 roconnor: I used it for several weeks.
21:58:20 unenough: i guess they have an XML format, as well
21:58:34 I think TeXmacs is a great idea, but it has some design
flaws.
21:58:40 the format is not the issue.. :) the issue is that the
editor will understand the programming langauge's semantics as it edits the AST
21:58:42 vixey: maybe it can't, I get 0 timediffs because the value is
evaluated later
21:58:53 hence my urge to rewrite it ;)
21:58:54 ttfh_, yeah, that's why I used rnf
21:59:13 MarcWeber: thank you for your help, i have posted my question to
haskell-cafe
21:59:16 But I hate LaTeX even more, so I use TeXmacs.
21:59:24 heh, i tried using texmacs once and it was so slow i ended
up learning some latex instead and using plain emacs
22:00:02 it's kind of cool that you can plug it in to Matlab and so forth
22:00:14 conal: note the response to the article is much stronger when
there's images and now a video link.
22:00:29 strongly recommend videos for all demos :)
22:01:00 dons: http://www.youtube.com/watch?v=RT87JfTYIvo
22:01:01 Title: YouTube - GraphUI
22:01:04 jsn Can't you just run it and tell me wether it you'll get
md5sum missmatch?
22:01:12 I'mt interested in it.
22:01:23 MarcWeber: okay
22:01:24 hey nice, unenough
22:01:38 MarcWeber: i've got another suggestion to try, as well
22:01:42 unenough: is it on hackage yet?
22:01:53 dons, when it will be rewritten, in haskell, it will be.
22:02:07 ah, so still in the rewrite stage?
22:02:15 it was written in python
22:02:41 oh, i was getting confused with sarasvati
22:02:42 unenough: re: your video link --- This is UNIX. I know UNIX!
22:02:47 hehe
22:02:48 MarcWeber: allberry_b seems to think i should just fork like
crazy -- worth a shot
22:02:57 UNIX is written in python ???
22:03:07 jsn: If you remember that was my first suggestion.
22:03:07 vixey: LOLz
22:03:10 dons, using a library that resembles a primitive Reactive
22:03:17 roconnor, huh?
22:03:27 jsn: But I'll jsut forget about it.
22:03:41 MarcWeber: i must have missed that, sorry
22:04:00 unenough: did you ever watch Jurassic Park? ... Am I getting
to old?
22:04:15 roconnor, I caught the reference... :P
22:04:15 roconnor, oh ok :) heh yeah
22:04:19 ahaha that's where it's from
22:04:30 ACTION over my head until you explain it though
22:04:31 it does look like that 'unix'
22:04:38 jsn: you only need the one, not both sides. the key point
is that you can't write in a big chunk and then read in a big chunk because
ifeither input or output is larger than PIPE_BUF (512 bytes in most unixen, but
IIRC linux uses the size you're seeing problems with) it'll deadlock
22:05:08 http://code.google.com/p/enough/wiki/Graphui
22:05:10 Title: Graphui - enough - Google Code - A generic graph
editing gui
22:05:14 your write will be blocked waiting for the subprocess on
the other end to read, but it's blocked waiting for you to read from the other
pipe
22:05:43 unenough: that is neat
22:05:48 We made something called Observable, that's I guess like a
Reactive value only much less refined. It simply calls a callback when the value
changes.
22:06:12 so when the graph object changes , the gui updates
automatically (and calls dot to re-format it)
22:07:33 my first mission in haskell will be to re-implement it using
FRP
22:08:31 conal: Is plasmat a function in fieldtrip or a just a
definition for that example? If the former, what's wrong with plasticMaterial?!
22:09:04 ddarius: it's defined in the test module
22:09:10 ACTION pulls out his plasmat rifle.
22:09:17 conal: Whew.
22:10:33 dons: what response are you noticing?
22:11:26 Cale, i discovered category theory after writing this: http://code.google.com/p/enough/wiki/DeltaAlgebra
and later realizing i'm re-inventing the wheel (in a really crooked way)
22:11:27 conal: oh, just after linking to the video, we get 10/1 upmods v
downmods. while it was 1/1 before hand.
22:11:27 Title: DeltaAlgebra - enough - Google Code - Formal
definitions for deltas
22:12:03 dons: oh, nice!
22:12:06 unenough: :)
22:12:23 i tried to invent an algebra of functions with inversion and
composition operations
22:12:30 unenough: There's also some rather good videos on category
theory on YouTube, once you have a few of the basic definitions under your belt.
22:12:48 conal: the mass media is very results focused. they want to see
a demo before they'll read on.
22:13:40 hmm is there something in haskell about invertible
computations? (or invertible functions)
22:13:52 there's something.
22:14:12 ACTION wants a type for bijections too.
22:14:26 there's the paper "there and back again".
22:14:42 http://www.youtube.com/user/TheCatsters
22:14:43 Title: YouTube - TheCatsters's Channel
22:14:48 also Data.Bijection in the TypeCompose package
22:15:36 Cale, thanks. i'll read the book first :)
22:15:43 bookmarked
22:15:46 conal: perfect. Is TypeCompose H98?
22:16:23 unenough: Well, once you get to natural transformations, the
videos should start to become accessible.
22:16:48 roconnor: no.
22:17:08 aww
22:17:18 I want my lib to be portable.
22:17:36 I'll just use a record type :)
22:17:46 roconnor: portable to what?
22:18:14 dons: hugs, jhc, yhc, or any other haskell compiler that I
don't know of.
22:18:42 just document the extensions you use, and stick to h' compat
ones.
22:19:18 Data.Bijection itself looks Haskell 98
22:19:49 i don't understand arrows at all, though
22:20:12 can't there be a simpler formulation of bijection, at least
in some cases?
22:20:30 does this mean Data.Bijection ought to be in it's own
package?
22:20:43 unenough, data Bijection a b = Bijection (a -> b) (b -> a) ?
22:21:48 roconnor: Data.Bijection uses an infix type op
22:22:03 oh right
22:22:14 is that not H98?
22:22:38 roconnor: hm. i'm not sure.
22:24:09 hmm looks like you are right
22:24:40 roconnor: too bad. they're pretty. i'm also hooked on infix
type variables.
22:25:11 ``Unlike data constructors, infix type constructors are not
allowed (other than (->)).''
22:25:36 such a stupid restriction
22:25:39 its almost 2009. we can afford a few LANGUAGE pragmas these days.
22:25:46 H98 is obsolete.
22:25:48 roconnor: i wonder if there's a sort of conditional compilation
trick one can play to get the functionality for h98 but nicer notation for >98.
22:26:09 conal, well there's C pre processor
22:26:50 anyone here experienced with trac? i don't know why roconnor
didn't get permission to create a ticket when he registered on the fieldtrip
trac.
22:27:14 Gleetings, earthrings.
22:27:14 maybe I can use some sort combination of compile options and
preprocessor and type synonyms.
22:27:48 screw h98!
22:27:57 it's last millenum .
22:27:58 i removed the create & modify permissions from the "anonymous"
user, to preclude geting trac spammed.
22:28:31 psnively, A Greener Light Stings
22:28:33 conal: Awesome work on Reactive and FieldTrip, and thanks so
much for "Simply efficient..."
22:28:47 psnively: :) :)
22:28:52 I have dreams of implementing the concepts from "Simply..."
in OCaml. :-D
22:29:06 (I know, I'm in the wrong channel.)
22:29:14 psnively: you need to get where the action (and community) is ;)
22:29:36 Hi Don! Yeah, well, with 6.10.1 out, it's pretty seductive,
all right. :-D
22:29:38 psnively: go for it. the ideas aren't bound to haskell, though
laziness seems pretty key.
22:29:41 Is there a normal form for types closed under product,
coproduct, and mu.
22:29:45 yay 6.10.1 !
22:29:47 dons: I'll switch when either haskell' is published, or
Caleskell is published.
22:29:50 psnively: hear that? laziness is *key*
22:29:57 Yeah. Well, I will no doubt have to use the "lazy"
declaration a lot.
22:30:02 luqui, what do you mean by normal form?
22:30:08 my math teacher always said: if man was not lazy, he wouldn't
have invented the wheel.
22:30:11 dons: The virtues of a programmer, even... ;-)
22:30:29 vixey, eg. a textual representation such that the same type
gets the same representation
22:30:30 To Larry Wall's point, it would seem.
22:30:59 turns out there's a #trac channel. ain't irc wonderful?
22:31:07 I do read on proggit that OCaml is dying. ;-)
22:31:39 it does feel like its heyday was about 5 years ago.
22:31:56 it seems like a prefix form with de bruijn indiced would work,
but I worry about showing well-kindedness of them
22:31:59 before the multicores, and before F# stole some of the momentum
22:32:07 dons: the Extensions: field is blank in http://hackage.haskell.org/packages/archive/TypeCompose/0.5.1/TypeCompose.cabal
22:32:09 http://tinyurl.com/5llklr
22:32:14 should that be filled in?
22:32:17 ACTION isn't sure
22:32:26 If as a testbed for new concepts, that might be so. But with
support for shared libraries, Batteries, etc. it's actually starting to feel
like: hey, I could use this instead of C++!
22:32:31 roconnor: if any pragmas are need for individual modeuls, imo
they should be in the .cabal too
22:32:56 psnively: it'll be interesting to see if the batteries guy can
unify the tribes of ocaml.
22:32:56 It'd be nice to see the parallel GC stuff make it in, yes.
22:33:03 ACTION isn't too impressed with larry wall's language design
nostrums :-)
22:33:06 "Unite the clans!"
22:33:40 it seems that some ocaml users have replaced the standard library
wholesale. i wonder how they'd fit into a batterified world.
22:33:42 dons: I'm intensely interested to see where Disciple and
YNot go, too.
22:34:06 bos: Yeah. It'll be interesting to see how Jane Street Core
and Batteries play.
22:34:07 they're research prototypes, so i don't think DDC at least is
going anywhere.
22:34:12 psnively, just anything with esoteric type systems :))
22:34:18 BTW, bos + dons: Thank you for "Real-World Haskell." :-D
22:34:25 ?users
22:34:26 Maximum users seen in #haskell: 559, currently: 531 (95.0%),
active: 21 (4.0%)
22:34:26 psnively: our pleasure
22:34:35 vixey: I'm beginning to get Coq, which is kinda scary.
22:34:36 off to the printers!
22:34:41 psnively, yay!
22:34:47 psnively: sounds rude
22:34:58 pumpkin_: I blame the French.
22:35:04 psnively, every time I write haskell I see these pre/post
conditions everywhere..
22:35:14 (after doing some programs in Coq)
22:35:37 but yeah ... It will be cool when the next Ynot is out
22:35:57 And I'm playing with Ur/Web. Where does the time go?
22:36:11 you're a ferment of functional fiddling
22:36:19 Ain't that the truth.
22:36:30 Yeah, really tempting to write sort :: forall xs:[a], { ys:[a]
| sameelems xs ys /\ sorted ys }
22:36:45 dcoutts: Should documentation upload be a flag to 'upload' or
'haddock', or should it perhaps be its own command?
22:36:48 bos: And the day job's in Python and we use Mercurial. So
you've got me coming and going!
22:37:08 well, with a super-editor that knows what the code is about,
such annotations might be much easier to implement
22:37:23 psnively: it's a small hackerly world!
22:37:27 unenough, you're not extending Yi?
22:37:39 Lemmih: I wasn't thinking of adding it directly to cabal-install
but instead using the same infrastructure for other more specialised hackage
clients
22:37:46 bos: I give you credit for straddling the dynamic/static
worlds without losing your sanity. ;-)
22:37:48 vixey, currently just learning haskell :) i'm dreaming aloud
22:38:05 Lemmih: eg making a hackage-buildbot program that imports
cabal-install as a lib
22:38:21 psnively: :)
22:38:25 roconnor: i learned some about trac permissions and tweaked
them. would you please refresh (and logout & login if necessary) and see if you
can see "New Ticket"?
22:38:26 dcoutts: Can the buildbots be expected to build documentation?
22:38:27 psnively: what are you doing in python?
22:38:35 vixey, and no. Yi is a text editor, right?
22:38:53 Lemmih: not random ones on end users machines, but we can set
up a dedicated client
22:39:07 bos: http://www.virgincharter.com
22:39:11 dcoutts: Why not get the authors to upload the documentation.
We know for sure that they can build the software.
22:39:16 conal: hey, new ticket!
22:39:31 psnively: wow, specialised!
22:39:41 Lemmih: I fear it'd be horribly inconsistent, but in
principle they should be able to do so
22:39:48 We like being on the fringe. :-)
22:39:55 roconnor: :) i'm just learning the ropes.
22:40:12 I'll ask one more time, since I'm not sure where to look. Is
there a normal form for types (product, coproduct, mu), such that I can tell
when two types are the same by syntactic equality?
22:40:14 Lemmih: but they can already do that just using curl, we do
not need special support in cabal-install
22:40:37 dcoutts: To me it seems natural to upload the documentation
together with the release.
22:40:40 dcoutts: We need a bunch of things to make it play nice with
the other documentation.
22:40:46 luqui, you can have Mu down at any level?
22:40:56 vixey, yeah presumably
22:41:04 luqui, huh?
22:41:27 dcoutts: The documentation files need to link to each other (between
libraries).
22:41:32 luqui, so do you have an example of isomorphic types where
multiplying out the products doesn't give you syntactic equality?
22:41:48 Lemmih: yes, all the more reason to have it generated by a
dedicated client builder
22:42:04 Hey, I'm trying to compile some relatively old haskell, but I'm
running into a wall as it's trying to import "GHC"
22:42:11 luqui, I wonder if that would work, but I'm not sure how it
would interact with Mu
22:42:12 Anyone know how to get round this?
22:42:18 Running into a -Wall?
22:42:22 dcoutts: It's quite easy to do. It would just be a few lines
in cabal-install.
22:42:30 vixey, it's actually the free variables that are giving me
problems
22:42:32 Lemmih: that's not the point :-)
22:42:36 Failed to load interface for `GHC':"
22:42:43 That's the error I'm getting.
22:42:49 Something about it being hidden.
22:43:00 vixey, so I'll describe it more fully.
22:43:04 luqui, can you show me an example (I'm not sure where free
variables can come into it)
22:43:07 luqui, ah that would be better
22:43:14 dcoutts: Why should we wait hours after a new release to get
the documentation?
22:43:29 Lemmih: it need not be that slow
22:43:44 Lemmih: but it'll take a similar time for other metrics
22:44:03 dcoutts: The author can supply it at once.
22:44:13 vixey, I have some type functor T :: * -> * (injective, so it's
not a synonym), but I don't know how it's implemented, just some hash of it.
Then I want to compute a hash of Mu x. T x
22:44:24 Lemmih: I'm not saying we should ban authors uploading docs,
just that I don't think we want it to be the standard thing, for reasons like
getting the right haddock version, getting the links right etc
22:44:27 dcoutts: I don't see why there should be a time where we have
the code but not the documentation.
22:44:39 Lemmih: it needs quite a bit of configuration of the
environment to get it right
22:44:55 dcoutts: It does?
22:44:59 vixey, so yeah, I'm hashing types, without knowing the
implementations of some of the components, just their hashes.
22:45:00 Lemmih: then lets delay the publishing of the code ;-)
22:45:19 (naturally I will have to rehash at every level or something
like that)
22:45:33 luqui, why is Mu a binder, i.e. why not (Mu T) ?
22:45:46 Lemmih: just making sure the links work is non-trivial
22:45:50 dcoutts: This would be so easy and fast: 'cabal upload &&
cabal upload-documentation'
22:46:01 vixey, that makes sense. How do I represent Mu x. T x y ?
22:46:31 would I just make an injective Flip, and say that Flip (Flip T)
/= T
22:46:34 dcoutts: It is very trivial.
22:46:58 dcoutts: It fails to compile if the links don't work.
22:47:14 conal: I made a ticket! http://trac.haskell.org/fieldtrip/ticket/2
22:47:15 Title: #2 (Replace Graphics.FieldTrip.Color with Data.Colour.)
- fieldtrip - Trac
22:47:27 Colour?
22:47:53 the library.
22:47:53 conal: So... when do we see the Quake 3 port to reactive-fieldtrip?
:-D
22:47:54 I don't understand why you are hashing types
22:48:00 Lemmih: the docs generated by cabal haddock are not by
default suitable since the urls will be to file:///usr/local/share/doc. etc
rather than to the other html docs on hackage
22:48:02 psnively: oh, instead of yampa?
22:48:04 dcoutts: Haddock will never point to X.Y.Z from package A if
such function doesn't exist. And it's very easy to check whether package A has
documentation available.
22:48:26 dons: Or maybe something more aggressive, if the point is to
show off "Simply efficient..."
22:48:32 dcoutts: Haddock has wonderful flags for changing the urls.
22:48:32 psnively: the existing port of quake 3 to haskell used frp based
on yampa, fwiw.
22:48:37 vixey, uh, because... that's what... I'm doing? I'm building a
global distributed object model, so there is one data structure shared
throughout the whole world.
22:48:49 psnively: http://uk.youtube.com/watch?v=0jYdu2u8gAU that one.
22:48:50 Title: YouTube - Frag - 3D FPS game written in Haskell
22:48:51 dcoutts: I've tested them. They work. It's just a bother to
write them by hand.
22:48:51 I don't want each part to have to know about all the types in a
substructure of an object it has part of
22:48:52 dons: I'd forgotten about that, actually.
22:49:06 Lemmih: yes, it is obviously possible, I'm just pointing out
that the defaults are not right, it needs some fiddling
22:49:08 we have all the fun in #haskell
22:49:21 Oh, Frag. I was hoping for a real port of Q3. Or is Frag a
full port?
22:49:24 dcoutts: Right. Hence my original question.
22:49:24 Lemmih: and it's better if the .haddock files for different
packages are generated by the same haddock version
22:49:29 #haskell :: IO [Fun]
22:49:31 luqui, must you implement this? This is already done in Oz
22:49:35 dcoutts: Where should I put the code that does the fiddling.
22:49:37 its a port of the scenes, but uses its own engine.
22:49:53 vixey, well, it's an experiment, so in some sense, yes I must.
but I will look at Oz.
22:50:00 roconnor: thanks for the ticket. i don't track detail very well,
so i'm glad for the help.
22:50:03 I have seen it briefly, but never really dug in
22:50:06 what is "Moo" called if I say data Baa = Moo Int | Nothing;
22:50:07 dcoutts: What? Haddock version?
22:50:09 ?
22:50:11 can you tell me what I should look for, vixey?
22:50:14 luqui, the CTM book covers how it all works in detail
22:50:30 pumpkin_: a data constructor
22:50:31 conal: what do you mean by "don't track detail"?
22:50:37 dons: Of course re: engine. And I'd not seen the video,
thanks. Good stuff.
22:50:39 Lemmih: yes, .haddock binary files are not necessarily
compatible across haddock versions
22:50:42 Where can I find a compiler that "flattens" a whole program into
combinators?
22:50:53 Saizan: thanks, and "Baa" is a data type (name)?
22:50:55 Lemmih: as I've said I think into a separate client is the
right place
22:50:55 kniu: Isn't that GHC?
22:50:56 kniu: ghc?
22:51:01 kniu, I thikn there's one in the Monad.Reader
22:51:05 what
22:51:16 dcoutts: #haskell-overflow?
22:51:24 vixey, thanks much. I'll have a look.
22:51:25 Hey, I beat dons! LOL
22:51:29 :t liftM
22:51:30 forall a1 r (m :: * -> *). (Monad m) => (a1 -> r) -> m a1 ->
m r
22:51:30 pumpkin_: just "type" usually
22:51:35 I thought ghc implements the STG Machine.
22:51:40 Saizan: thanks a lot! :)
22:51:49 roconnor: i mean i get overwhelmed with trying to remember
details.
22:52:07 kniu, II was thinking of this one www.haskell.org/sitewiki/images/0/0a/TMR-Issue10.pdf
22:52:07 Maybe I'm misunderstanding either your question, or what the
Spineless, Tagless G-Machine is.
22:52:13 roconnor: that's why i work so hard to make things at making
things simple
22:52:13 what's up with yampa?
22:52:16 vixey, thanks.
22:52:17 conal: oh of course. That's what trac is for :)
22:52:58 aw man, mozart doesn't build on amd64. bleh.
22:53:01 unenough: arrows are up.
22:53:15 luqui, binaries don't work?
22:53:25 luqui, in any case the theory is all on paper
22:53:28 It doesn't?
22:53:33 conal: heh. If there is anything I've learned, it's that
dealing with colour is not simple :P. That's why I'm writing a lib.
22:53:37 dons, yampa was before arrows?
22:53:47 monads were before arrows
22:53:57 unenough: yampa is arrowized frp
22:54:17 unenough: *an arrowized frp
22:54:37 ah. and Reactive doesn't use arrows? excuse my newbieness
22:54:57 psnively: the existing port of quake 3 to haskell
used frp based on yampa, fwiw. <- I didn't think it was actually a port of Q3 as
opposed to an engine capable of rendering the maps and models?
22:55:07 (there's a /big/ difference between a graphics engine and a
game engine)
22:55:27 Indeed.
22:55:46 unenough: exactly. reactive is more like the original fran in
being built on functor & applicative.
22:55:55 I struggle with whether to write a scene graph API, e.g. as
a stunt, or just bind to, e.g. Horde3D.
22:56:46 ok, i have a superficial preference for things that don't
use arrows (less to understand)
22:56:50 Regardless, I think writing games in C++ is INSANE.
22:56:50 psnively: scene graph APIs are usually pretty imperative and
representational (traversal-oriented).
22:57:08 Philippa: correct. haskell engine that can read Q3 descriptions
and draw them
22:57:16 conal: Seems like a good application for a ZIpper, no?
22:57:42 frag is a one liner main = putStrLn "Bus Error"
22:58:05 vixey: cabal install frag ?
22:58:09 psnively: if one wants to traverse a data structure, rather
than work with meanings.
22:58:11 yeah
22:58:18 kids these days, don't debug their own bugs.
22:58:34 conal: You lost me (what a surprise).
22:58:51 dons, Yi seems to depend on alex but cabal install yi doesn't
know about it (it fails)
22:59:07 unenough: cabal install alex
22:59:17 psnively: that's one of my gripes with scene graph APIs: they
encourage programmers to think in terms of a *representation* (graph) rather
than a meaning (geometry).
23:00:09 dcoutts, i know... :}
23:00:12 conal: Ah. Yes, I see that FieldTrip is different. Hmmm.
23:00:14 psnively: also, they usually impose a very stateful semantics --
modification of graphics state during traversal.
23:00:46 Well, another reason why a Zipper sounds helpful to me. But
I confess to having given the issues no more than about a day's thought.
23:00:55 unenough: is alex not in your $PATH ?
23:01:14 dcoutts, i was just saying that maybe cabal should know that
automatically
23:01:44 Eh, I have given http://www.hyperfun.org/F-rep.html a tiny
bit of thought. But only a tiny bit.
23:01:46 unenough: it's a known issue that build-tools are not tracked
yet
23:01:47 Title: F-rep Home Page. Shape Modeling and Computer
Graphics with Real Functions
23:02:14 ok
23:02:54 conal: I'd love to develop a map editor using FRP and F-Rep.
I just have no clue where to start. :-D
23:03:14 Start in the beginning, and when you get to the end, stop.
23:03:31 Heh.
23:03:48 [Alice in wonderland]
23:04:21 conal: Quick question about FieldTrip, actually. Where are the
dimensions of your rendering defined? Things like udisk & sphere are "unit"
sized, but how does that translate to the screen?
23:05:21 wchogg: not in any clearly defined way. FieldTrip is very much
work-in-progress.
23:05:39 can FieldTrip render projections of higher dimensional
manifolds?
23:06:09 conal: How "work in progress"? Would you prefer if I didn't
try to use it yet?
23:07:18 profmakx: i suspect it can. the surface type is very simple/general:
it's just R^2 -> R^3. i expect you can make some useful higher-order functions
to project your manifolds. i'd love to the the result.
23:07:39 wchogg: no -- play all you want. just a warning.
23:07:59 hm. i will try something out tomorrow
23:08:36 It seems like making at least a stab at a 3D modeler should
be easier than it is.
23:08:45 profmakx: s/the the/see the
23:08:51 (Maybe because the domain is inherently complex? Ya think?)
23:09:10 GUIs are hard
23:09:40 I think the underlying data structures and algorithms are
hard, in this case.
23:09:40 psnively: The thing is, all the good ones rely heavily on
meta-information.
23:09:46 i also think 3d modelers should be stabbed *duq*
23:09:48 Actually getting OpenGL to render stuff is pretty easy.
23:09:52 The data structures and algorithms are actually the easy
bit.
23:09:59 In the sense that you can grab them off the shelf.
23:10:04 conal: it's based on manifolds? neat :)
23:10:10 Pseudonym: A good point.
23:10:26 one could bring in all the machinery
23:10:42 It's also pretty hard to evaluate a 3D modeler usefully (or
so I would think)
23:10:58 That's true.
23:11:10 Generally speaking, what people want is flexibility.
23:11:20 And that's VERY hard to evaluate.
23:11:45 I've been writing a 3D modeller in C++ for about 10 years
now.
23:11:50 what's wrong with blender? other than needing a 34 button mouse
23:11:58 Yes. In fairness, I think of this in a specific context:
wanting to write a portable replacement for UnrealEd. ;-)
23:12:06 vixey: Have you looked at the Blender code?
23:12:07 what does 'evaluating a 3d modeller' mean? rendering?
23:12:26 no
23:12:27 evaluating whether it is good or bad?
23:12:31 ah
23:16:20 It does just seem like we should have a good 3D graphics
kernel for exploring various modeling/rendering/animation approaches...
23:16:46 I think that is too general to be usefulk
23:16:48 OTOH, maybe that's Inventor/OpenSceneGraph/something else I
haven't found.
23:16:51 Yeah.
23:16:56 one should first explore ideas
23:17:02 something like flash 4 but for 3D
23:17:05 and then abstract from there i guess
23:17:05 Right.
23:17:05 oh that exists
23:17:49 Would someone be so kind as to help me with an HXT problem I'm
having? http://hpaste.org/11929
23:18:42 In short, calling processFile transforms as I expect.
processURL, however, does not. The content of the file and the data at url are
the same.
23:18:44 psnively: as i mentioned, most scene graph libs (inventor etc)
are heavily stateful. my hope is that functional programmers would explore a
functional style instead.
23:19:04 conal: I agree completely. I just don't know quite what that
looks like.
23:19:31 it would be most useful _not_ knowing the scenegraph
approach ;)
23:19:32 conal: There's also the modeller written in Erlang.
23:19:44 Which is also inherently stateful.
23:19:56 profmakx: agreed. it's a deep rut.
23:20:02 But node == thread in Erlang.
23:20:23 The thing is, I suspect that 3D modelling is inherently
stateful, in the sense that you're modifying a database.
23:20:24 So OK, we all grab our copies of Okasaki and meditate? :-D
23:20:31 hehe
23:20:31 ==Pseudonym
23:20:58 All this talk of "But that's stateful!" to me misses the
mark, kind of. Is a functional data structure with a Zipper "stateful" or not?
23:21:22 bltrout: maybe it's related to this dummy "/" root
element hxt uses?
23:21:23 Computer graphics only really took off in mainstream film/whatever
when graphics programmers realised that a collection of data is a database.
23:21:37 Not a relational database, of course, but a database
nonetheless.
23:21:52 Or could be a relational database, SQL notwithstanding. ;-)
23:21:56 heh
23:21:58 i think of modeling as being programming with an unusual UI.
programming is generally a stateful activity, but the resulting programs needn't
be.
23:22:00 psnively: Erm, no.
23:22:18 conal: Well, most high-end 3D modellers actually have a
dataflow model internally.
23:22:40 Pseudonym: of course it COULD be. It just HASN'T been.
23:22:52 (Rightly or wrongly.)
23:22:53 You don't really modify, say, a 3D manifold. Rather, you
interpose operations into the pipeline.
23:22:53 FunctorSalad_: If that were the case would not parseFile
return an empty result as well?
23:23:11 Pseudonym: yep. there are other examples as well of modeling/authoring
as being an ad hoc programming language & environment in disguise.
23:23:19 Yes.
23:23:23 most of 3D modelling is mutating an object?
23:23:32 ~~> stateful is a good approach
23:23:36 Famously, Pixar's MEnv is essentially a programming
language environment.
23:23:36 vixey: not necessarily.
23:23:36 Coming back to denial of operational semantics in one's reasoning
while keeping big-O, I've come to the conclusion that the best and most natural
understanding arises by grokking swarm algorithms.
23:23:37 (Incidentally, this is only my second week seriously using
Haskell so please forgive anything silly I might say.)
23:23:52 s/keeping/keeping awareness of/
23:24:05 bltrout: mabe one of readDocument / getDocumentContents
skips the root node and the other doesn't
23:24:12 ksf, operational semantics is great
23:24:13 :)
23:24:13 @hoogle (f a,f b) -> f (a,b)
23:24:14 No results found
23:24:20 bltrout: just try printing out the name of the root
node with both options :)
23:24:22 vixey: conal's point (if I'm not mistaken) is that
analogously "most of programming is mutating a source file." That doesn't mean
your code needs to be imperative.
23:24:24 @hoogle f a -> f b -> f (a,b)
23:24:25 Prelude zip :: [a] -> [b] -> [(a, b)]
23:24:25 Data.List zip :: [a] -> [b] -> [(a, b)]
23:24:25 Language.Haskell.TH strictType :: Q Strict -> TypeQ ->
StrictTypeQ
23:24:46 hmm, zip
23:24:58 ddarius: yes, thx.
23:25:20 FunctorSalad_: How would I do that in and around arrows? I
don't understand them yet... I'm just using them.
23:25:23 the mutation aspect has nothing to do with 3D. it's just about
modeling/authoring/programming
23:25:42 vixey: At one point my wife studied 3D modeling and
animation (hey, we're an LA couple). Imagine my surprise when she asked me to
help her with her homework, and that help consisted primarily of demonstrating,
with clay, the relationship among Boolean algebra, Set Theory, and 3D modeling.
23:26:24 bltrout: I think replacing "getAAWS" with "getName" at
the bottom should work
23:26:45 aka "
23:26:53 Er, "Constructive Solid Geometry."
23:27:06 bltrout: the special/tricky thing with hxt arrows is
that they generally "fan out" one thing to a list of things
23:27:51 FunctorSalad_: Replace at the bottom? I'm sorry, I'm not
following.
23:28:06 seriously, consider stuff like http://en.wikipedia.org/wiki/Ant_colony_optimization
23:28:07 bltrout: in processURL and processFile
23:28:08 Title: Ant colony optimization - Wikipedia, the free
encyclopedia
23:28:13 FunctorSalad_: HXT has been a real trip.
23:28:14 psnively, oh there's loads of fun to be had in that area :)
23:28:22 bltrout: *nod*
23:28:34 it perfectly maps to the brain, which runs fastest if not
constrained but let loose.
23:28:51 vixey: Indeed.
23:28:59 psnively: You should look at the F-Rep stuff more.
23:29:09 ksf: Sadly, the brain is a very inefficient system to emulate
on a serial computer. :P
23:29:14 So at least intuitively, even though I can't get very
specific yet, I'm with conal: 3D modeling should be functional.
23:29:23 FunctorSalad_: Replacing getAAWS to getName returns "/" for
both functions.
23:29:30 ddarius: I will... but it's frustrating that there's such a
paucity of code to learn from.
23:29:44 i dont really get what you mean by functional
23:29:51 well, computers are also very inefficent at emulating brains, so
there you go.
23:29:52 bltrout: ok, then that shouldn't be the problem
23:30:43 erikc: Presumably (handwave handwave), that composition of
shapes and materials should be implemented by composition of functions. One can
imagine a kind of "partial evaluator" for a model so composed that reduces it to
some "normal form."
23:30:45 ksf: Only somewhat. A serial system may not be the best for
emulating a parallel one, but just try it the other way around..
23:30:58 bltrout: hmm another difference is that you pass "a_validate"
to readFile but not to parseXML
23:31:06 ah, ok
23:31:08 psnively: I actually agree that 3D model generation is
inherently functional.
23:31:10 Baughn, you just have to analyse the data dependencies.
23:31:18 SOmetimes there are circular dependencies.
23:31:22 But yes.
23:31:28 ksf: And when it turns out your algorithm is inherently serial?
23:31:31 Yes. So laziness might be key. :-)
23:31:31 The problem is that modifying that function efficiently is
hard.
23:31:31 FunctorSalad_: Oh, indeed.
23:31:34 that's a deadlock.
23:31:46 ksf: That problem is insanely hard. If it wasn't,
parallelizing compilers would be easy. ;)
23:31:47 bltrout: (I meant "readDocument" not "readFile")
23:31:57 ksf: (For "frequently impossible" values of "hard")
23:32:02 So the model that you usually use is like a spreadsheet.
23:32:07 Spreadsheets are inherently functional, too.
23:32:18 Mmmmmmm... dataflow. FRP!
23:32:22 But you want to save as much recomputation as you can.
23:32:24 And now the circle is complete.
23:32:29 heh
23:32:29 nah it's rather the decisions (or just a good heuristic) of
granularity and optimality that's hard.
23:32:39 And also, you want efficient ways to modify the system.
23:32:43 FunctorSalad_: Changing from [] to [(a_validate,v_0)] in
processURL still returns [].
23:32:48 Mmmmmmm. Zippers! Maximal sharing!
23:32:49 the brain is self-optimizing in that regard.
23:32:53 Gotta run.
23:33:12 Fare well./
23:33:19 Zippers are nice, but they're hard to make concurrent.
23:33:38 ...as are swarm algorithms. that's the point for their existence.
23:33:58 they don't give you any proof, but darn good results in quite
acceptable time.
23:33:59 The brain is good at avoiding the problem. It still can't do
many serial algorithms well (like proof verification), and it uses something
like a million times the neurons it should for motor control just because it has
to avoid loops...
23:34:03 Pseudonym They're good for going for a pee when you can't be
bother to pull your pants down.
23:34:10 I'm not trying to be a naysayer, BTW. I've spent an obscene
amount of time thinking about this.
23:34:45 If the geometry database is read-only, such as in a
raytracer, then a functional style is almost ideal.
23:34:48 Or rather, avoid any algorithms that would need a request/response
to be routed through more than a couple dozen neurons at most before going back
out
23:34:50 Baughn, yes, but then I don't plan to obey my computer, but have
my computer obey me.
23:34:58 Baughn, what do you mean proof verification?
23:35:05 so he gotta learn to think more like me, not the other way round.
23:35:07 If it can be modified, I can't see a neat way around local
mutable state.
23:35:09 Baughn, like type checking ..?
23:35:22 vixey: Just a random example. Anything that can't easily be
done in parallel, the brain is bad at..
23:35:36 oh interesting
23:35:43 forall practical purposes, fitness equals proof.
23:35:55 Running a couple trillion neurons at 200Hz each will do that
23:35:58 bltrout: a workaround would be to download the file
seperately (say, with the 'download' package) and pass the string to readString
23:35:58 is that why we own at pattern recognition?
23:36:23 telexicon: A similarly powerful serial computer would do that
too. No, that's just insane computing power on a problem that /is/ easily
parallelizable
23:36:37 bltrout: does the program say whether it was able to
download the url?
23:36:52 Baughn, what else could we use brains for?
23:36:58 FunctorSalad_: It does not say it isn't.
23:37:18 bltrout: maybe "(a_trace, 4)" or so would say
23:37:20 Baughn, I can tell you for sure that the meaning of life isn't
looking for one.
23:37:34 ksf: I didn't mean to bring in proofs like that. My point is,
the brain's algorithms are often highly suboptimal in a computer - there are
often much better algorithms when you *can* do things in serial
23:38:02 Emulating nature only goes so far
23:39:05 vixey: N processors at M Hz each can usually run an algorithm
meant for N*2 processors at M/2 Hz pretty easily. The reverse is, of course, not
true
23:39:12 FunctorSalad_: No more output than before.
23:39:14 well a computer modelled after the brain doesn't subconsciously
worry about the floor collapsing while solving a problem.
23:39:30 iff the model's good, that is.
23:39:38 see marvin.
23:39:55 Marvin. An excellent example of emulating humanity too well.
^^;
23:40:44 ksf: "all models are wrong, but some are useful" -- George
Box
23:41:35 ksf: as for collapsing datacenter floors, maybe
23:41:45 bltrout: :( can't think of any more reasons at the
moment
23:41:53 goal-awareness and finding an optimal solution seem to be
mutually-exclusive for these kind of algorithms. too much thick-headedness.
23:42:34 rherrmann, we just need to provide the machines with backup tapes
to make them stop worrying about it ;)
23:42:43 how do I resolve this: cabal: cannot configure HUnit-1.2.0.2.
It requires base ==4.*
23:43:07 luqui: cabal update and use the next release of hunit
23:43:08 luqui: cabal update, iirc
23:43:11 FunctorSalad_: Well, thank you for your help. I still learned
a bit. :)
23:43:19 in the ant example, that corresponds to lacking evaporation of
traces.
23:43:25 dcoutts, ok thanks :-)
23:43:31 yay!
23:44:00 it also effectively prohibits adaption.
23:44:19 bltrout: you could use this function to download the
file explicitly http://hackage.haskell.org/packages/archive/curl/1.3.3/doc/html/Network-Curl.html#v%3AcurlGetString
23:44:21 Title: Network.Curl, http://tinyurl.com/63l4po
23:44:37 bltrout: the curl package should already be installed
since it's a dependency of hxt
23:44:57 FunctorSalad_: Thanks.

Back to channel and daily index: content-negotiated html turtle

Комментариев нет:

Отправить комментарий