Experimental IRC log happs-2008-03-08

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

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

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

00:26:02<Lemmih>MarcWeber: Swapping is no doubt much slower than databases.
00:27:13<Lemmih>MarcWeber: We plan on dealing with the issue by supporting partitioning.
00:53:16<stepcut>Lemmih: cool, I'll give that a shot
01:21:02<stepcut>hrm, if I make a new, data SimpleType = Winner, I get some weird results.
01:21:10<stepcut>*Main> (toResponse Winner)
01:21:16<stepcut>Response {rsCode = 200, rsHeaders = fromList [("content-type",HeaderPair {hName = "Content-Type", hValue = ["application/xml"]})], rsFlags = RsFlags {rsfContentLength = True}, rsBody = Chunk "<?xml version='1.0' encoding='UTF-8' ?>\n<winner/>" Empty}
01:21:23<stepcut>that part seems fine
01:21:33<stepcut>*Main> (toContentType Winner)
01:21:33<stepcut>"application/xml"
01:21:35<stepcut>as does that
01:22:02<stepcut>but,
01:22:04<stepcut>*Main> (toContentType (toResponse Winner))
01:22:04<stepcut>"text/plain"
01:22:21<stepcut>which, I guess makes since -- but it means that xslt processing does not work if I do,
01:22:43<stepcut>ok (toResponse Winner), I have to do, ok (toResponse (toXml Winner))
01:24:10<stepcut>which is far less cool than just doing, ok Winner, :)
01:28:57<stepcut>the generate xml is also different:
01:28:59<stepcut>*Main> toResponse (toXml Winner)
01:28:59<stepcut>Response {rsCode = 200, rsHeaders = fromList [("content-type",HeaderPair {hName = "Content-Type", hValue = ["application/xml"]})], rsFlags = RsFlags {rsfContentLength = True}, rsBody = Chunk "<?xml version='1.0' encoding='UTF-8' ?>\n<winner haskellTypeVersion=\"0\" haskellType=\"SimpleType\"/>" Empty}
01:34:40<stepcut>actually, ok (toReponse (toXml Winner)) does not seem to work either
02:35:36<stepcut>hrm, I could do, ok =<< doXslt ...
10:30:05<MarcWeber>Lemmih: I'm not sure wether I know enough haskell to really help, but I'd like to support you at least by testing if you like. So will all this end up in a RDBMS beeing implemented in haskell? This would be pretty cool! Why? Because haskell really can compile the queries (I hope).. so maybe you'll get even more speed than using any traditional db system?
10:36:48<Lemmih>We'll end up with something like Hadoop/Hypertable.
10:37:24<Lemmih>Relational databases aren't very scalable.
16:30:09<mae>mae pasted "ARGH! can't install happs with sp" at http://hpaste.org/6204
16:30:11<mae>please help!
16:32:20<Lemmih>mae: Install this package: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hslogger-1.0.5
16:32:54<mae>thank uj ; )
16:32:58<mae>you *
16:33:15<mae>yay so far so good
16:33:53<Lemmih>Note that it won't start on port 5000. It'll run on port 8000.
16:52:44<mae>it ran on 5000 for me ; )
16:53:33<mae>is there something more uptodate / complete than http://code.google.com/p/happs/wiki/TheBasics
16:55:53<Lemmih>http://haskell.org/haskellwiki/HAppS_tutorial2
17:10:23<mae>thanks much ; )
17:12:28<Lemmih>mae: See also: http://hackage.haskell.org/packages/archive/HAppS-Server/0.9.2.1/doc/html/HAppS-Server-SimpleHTTP.html
17:13:44<mae>ok and state?
17:14:08<Lemmih>You can find the docs on hackage.haskell.org
17:15:16<mae> thank u
17:16:44<fxr>uhm distributed computing category ?
17:17:20<mae>so with happs does the memory use equal the amount of state you have?
17:17:40<mae>or does the laziness prevent this? .. or virtual memory?
17:18:51<Lemmih>mae: You can either use foreign storage systems or add more machines.
17:19:20<mae>ok..
17:19:31<Lemmih>(when data grows bigger than the available memory, that is)
17:19:42<mae>right..
17:19:42<Lemmih>fxr: Indeed.
17:20:03<mae>so no way to put some of this data on disk
17:20:12<mae>in exchange for longer lookup times
17:20:12<Lemmih>No built-in way.
17:20:24<mae>ic
17:20:26<mae>do you think this might happen in the future?
17:20:39<Lemmih>Not really.
17:20:50<Lemmih>Too much trouble, too little benefit.
17:20:54<mae>i mean, to be honest, if your using linux it has a really smart virtual memory manager
17:21:07<mae>so "dead" memory will be put there if you add alot of vm
17:21:35<fxr>mae: and you can add more swap space
17:21:45<Lemmih>You still wanna avoid swapping at all costs.
17:22:59<Lemmih>HAppS tries hard not to pay for harddisk seeks.
17:23:40<akamaus>hi
17:23:55<Lemmih>Buying more machines is a cheap way of adding more RAM and it also solves other problems.
17:24:03<mae>Lemmih: swapping isn't the end of the world if the data is uncommonly accessed
17:24:14<mae>is multimaster working fully yet?
17:25:19<Lemmih>No, it has been temporarily disabled while the component system was refurnished.
17:25:31<mae>ah
17:25:56<akamaus>i have troubles with happs app crashing with "getNameInfo: does not exist (Temporary failure in name resolution)" error while serving some users. Is there some typical reason for this?
17:26:10<mae>dns problems..
17:26:20<mae>try manually using dig on your system
17:26:22<mae>see if it works
17:26:24<Lemmih>A simplified version of multimaster should be in head within a few days.
17:27:06<Lemmih>akamaus: It may have something to do with IPv6.
17:27:42<akamaus>Lemmih: is there a way to debug it?
17:27:56<fxr>Lemmih: http://hpaste.org/6205 any help? I tried to modularize my app but I'm getting "overlapping instances for Methods State".
17:28:55<Lemmih>fxr: Don't call $(methods) more than once.
17:29:25<fxr>hmm
17:29:42<fxr>you mean mkMethods?
17:30:13<mae>whats the url for that facebook example app
17:30:30<akamaus>Lemmih: i dont use getNameInfo function im my program, moreover, i cant find it with grep in happs sources. So i'm puzzled
17:31:32<Lemmih>fxr: Er, yeah, mkMethods.
17:31:48<Lemmih>akamaus: getNameInfo is used by the base libraries, I believe.
17:32:19<akamaus>Lemmih: sounds like i'm in trouble, eh?
17:32:19<Lemmih>akamaus: Does localhost resolve to an IPv6 address?
17:33:05<Lemmih>akamaus: Do you have "::1 localhost" in your /etc/hosts file?
17:33:58<akamaus>Lemmih: no i dont. I'll try add it
17:34:00<Lemmih>fxr: mkMethods makes your component an instance of the Methods class. That means you can only use it once in your application.
17:34:45<Lemmih>akamaus: Oh, I'd recommend removing it if you had one.
17:34:47<mae>ok dumb question, how can i get a ghci for my happs app
17:34:58<Lemmih>akamaus: Sorry, I don't know what's wrong.
17:35:11<fxr>Lemmih: ok thank you
17:35:11<Lemmih>mae: The naive approach doesn't work?
17:36:48<sclv>hmm... take a look at the accept funtion here
17:36:50<sclv>http://www.haskell.org/ghc/docs/latest/html/libraries/network/src/Network.html
17:37:46<mae>does search path have an interactive mode?
17:38:00<sclv>getNameInfo isn't wrapped in an exception handler. bleh!
17:38:53<sclv>looks to me that this is a bug in the network libs.
17:39:22<mae>HappS had a native dns thing i thought
17:39:29<mae>so you didn't have to rely on system calls
17:39:53<sclv>ACTION furiously hints for someone else to take up the baton of investigating this and filing a report, and also for the happs foax to maybe cook up a workaround.
17:40:13<fxr>oh it compiles :) I don't believe
17:40:40<sclv>mae: I think happs does, but the accept call is used a number of places as a basic system primitive.
17:41:50<akamaus>Lemmih: I most strange is what server fail for come clients and work without problems with others. So i guess problem is somehow related to remote ip address, not local. I'll try strace on app.
17:42:08<sclv>akamus: I seriously suspect ipv6
17:42:25<sclv>again, take a look at this: http://www.haskell.org/ghc/docs/latest/html/libraries/network/src/Network.html#accept
17:42:37<fxr>oh panic! (the 'impossible' happened) again
17:43:21<sclv>there's only one call to getnameinfo in the network library, and it's for ipv6, and it doesn't wrap the call in an exception handler...
17:45:04<sclv>whereas the standard ipv4 handler, which has obviously gotten more exercise, does wrap its lookup in a handler...
17:47:41<fxr>Lemmih: could you please tell me about your development cycle? I'm unable to use ghci because the main thread keeps running even I'm pressing c-c, and after loading files to ghci, I'm unable to run Main with sp (I'm getting impossible happened messages).
17:48:56<Lemmih>fxr: I'd use cabal instead of sp. We depend on a few foreign bindings that mess up GHCi.
17:49:59<akamaus>i tried straceing.. There was no calls to getnameinfo as far as i see.
17:50:01<Lemmih>fxr: I use Cabal and it works perfectly with GHCi.
17:50:29<fxr>Lemmih: I'm using cabal too, how do you terminate your main?
17:50:54<mae>is there an example app somewhere i can study to learn?
17:51:18<fxr>mae: I'm woring on that, a modular example
17:51:48<fxr>mae: you can check out mightybyte's blog
17:52:17<fxr>mae: http://softwaresimply.blogspot.com/
17:52:27<Lemmih>fxr: C-c. With a bracket to run closeTxControl.
17:52:56<mae>lol
17:52:59<mae>server error
17:53:03<fxr>Lemmih: oh sure
17:53:10<fxr>Lemmih: thanks
17:54:26<fxr>mae: retry
17:54:33<mae>i did
17:54:37<mae>man google of all people
17:54:40<mae>buncha lamers
17:54:47<mae>i wonder what the blogspot backend is
17:55:12<fxr>so here is the paste: http://hpaste.org/5958, http://hpaste.org/5957 and http://hpaste.org/5959
17:55:32<mae>thank you ; )
17:55:34<fxr>mae: you can take a look at these examples
17:56:03<fxr>mae: it demonstrates persistent sessions
17:58:05<fxr>mae: oh by the way, you can find some more examples here: http://www.haskell.org/haskellwiki/HAppS_tutorial2
17:58:06<Lemmih>mae: There are also a few smaller examples in the darcs repository for HAppS-State.
18:01:27<mae>getting an error
18:01:28<mae>http://hpaste.org/6207
18:01:34<mae>from that code
18:02:14<MarcWeber>mae: This is the example from mightybyte right?
18:02:25<mae>yeah i think so
18:02:30<mae>fxr pasted it
18:02:34<mae>a few lines up
18:03:13<MarcWeber>mae: svn co http://happs-tutorial.googlecode.com/svn
18:03:20<MarcWeber>Thats' the whole example
18:05:25<fxr>sorry I couldn't use google
18:12:15<MarcWeber>fxr: I had this trouble as well :) You're welcome..
18:12:39<fxr>MarcWeber: :)
18:16:06<mae>how can i troubleshoot this nonworking example
18:16:08<mae>i get
18:17:21<mae>http://hpaste.org/6208
18:17:22<mae>lsof is:
18:17:35<fxr>mae: do you have curl?
18:17:52<mae>yes
18:17:53<fxr>oh, sorry, it is working
18:18:10<mae>http://hpaste.org/6209
18:18:15<mae>commplex link is port 5000
18:18:27<fxr>mae: nope, you can take a look at localhost:8001
18:18:49<mae>no dice
18:18:55<fxr>mae: the port is defined in Main.hs, check out.
18:19:34<mae>oh duh 5001
18:20:37<mae>whats the diff between this method
18:20:39<mae>and the nullConf method
18:22:53<fxr>mae: I don't understand your question
18:23:44<mae>Config and nullConf
18:29:18<fxr>mae: take a look at HAppS-HTTP/src/HAppS/Server/HTTP/Types.hs
18:36:59<mae>ok
19:04:08<akamaus>sclv: i added an exception handler for ipv6 case in network library and rebuilt it and my app. But i see no changes so far. Should i also rebuild happs? I thought it's not needed since network library code gets linked directly to webapp
19:05:17<sclv>akamaus: wish I could give you better advice. all i can tell you is that after going through that trouble, I really hope this works for you. :-)
19:24:10<Myriad>hello there
19:27:00<Lemmih>Hiya.
19:27:29<Myriad>I'm making my first steps with haps, and I'd like to write a handler that writes some info about the request to a file or to her terminal and then dispatches to another handler
19:27:53<Myriad>I was thinking about something like this:
19:27:58<Myriad>withLogger :: MonadIO m => WebT m a -> ServerPartT m a
19:27:58<Myriad>withLogger x = withRequest (logRequest x)
19:28:21<Myriad>but I cannot figure out how the logRequest function would need to look like
19:29:33<Myriad>all I could come up with was this:
19:29:35<Myriad>logRequest x req = do
19:29:36<Myriad> liftIO $ putStrLn req
19:29:36<Myriad> return x
19:30:22<Myriad>which doesn't compile
19:31:11<Lemmih>One moment.
19:31:14<Myriad>any pointer how would be great
19:31:40<Myriad>err, any pointer on how to do this would be great
19:31:44<Myriad>=)
19:32:39<Lemmih>logRequest :: ServerPartT m a
19:32:40<Lemmih>logRequest = withRequest $ \r -> do liftIO (print r); noHandle
19:33:16<Lemmih>Usage is: [ logRequest, other handlers here ]
19:34:23<Myriad>let me think about that for a minute... I'm a real newbie as far as haskell is concerned and still need some time to work out what's going on...
19:35:56<Lemmih>It prints the request and then fails.
19:39:12<Myriad>ok... I think I can 'parse' his one now (btw, the sig needed to be logRequest :: MonadIO m => ServerPartT m a)
19:39:49<Lemmih>Right.
19:40:16<Myriad>but how can I chain in some other handler :: WebT m a -> ServerPartT m a that gets run instead of noHandle
19:40:53<Lemmih>Replace 'noHandle' with 'x' (no 'return').
19:41:00<Lemmih>But why would you want to?
19:41:12<Lemmih>Also, there's a
19:41:31<Lemmih>Also, there's a 'debugFilter' in HAppS.
19:41:59<Myriad>hat I'm aiming at is to check some information in the request against an existing database and only let it through to he actual handler when some check suceeds
19:42:35<Myriad>so logRequest is just my try to get an IO action that uses the request into the game
19:43:12<Lemmih>You can chain it using lists.
19:43:26<Myriad>oh
19:44:04<Lemmih>noHandle tries the next item in the list.
19:44:07<Myriad>is there an example in the repo somewhere?
19:44:13<Myriad>ah k
19:45:18<Myriad>and when I evaluate to error instead of noHandle it would respond with that error, right?
19:45:40<Lemmih>Yeah.
19:46:13<Myriad>ok, this is great stuff... gives me some more to play with
19:46:21<Myriad>thanks a load for your help
19:46:30<Lemmih>You're welcome.
19:53:07<mae>where can i find an example on how the xslt works
19:53:13<mae>do i have to explicitly call a method
19:53:18<mae>or how does it work
19:56:21<Lemmih>xslt xsltproc/saxon "stylesheet" [methods]
20:04:19<mae>methods being
20:04:28<mae>what i mean to say is
20:04:45<mae>do i have to explicitly add the xslt to the response
20:04:53<mae>or is it put inbetween "magically"
20:10:34<Lemmih>Just return something with content-type application/xml.
20:11:17<mae>ah ok
20:11:18<mae>so
20:11:33<mae>[methods] would be the usual fileserve and whatnot
20:15:21<Lemmih>Yeah.
20:16:54<mae>http://hpaste.org/6215
20:16:59<mae>error ; \
20:18:17<Lemmih>Add '[' and ']'.
20:18:24<mae>oh yay it compiled
20:18:26<mae>heh
20:18:34<mae>thanks ; )
20:18:41<Lemmih>No problem.
20:22:41<mae>any particular folder the stylesheet has to be in?
20:26:02<Lemmih>I don't know.
20:26:15<Lemmih>I usually use libxslt and libxml.
20:26:47<mae>hm

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