Experimental IRC log happs-2007-12-15

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.

19:37:53<mmmdonuts>Anyone here? (And ready to speculate about a weird problem?)
19:43:47<Saizan_>which problem?
19:47:46<mmmdonuts>I'm trying to use 'system' from within HAppS to run an external program (Graphviz "dot"). It works, but after running dot it waits for input from the console before continuing.
19:47:49<mmmdonuts>However, dot doesn't normally ask for any input, and if I run the same Haskell code outside of HApps, it works without pausing.
19:48:53<Saizan_>same exact code?
19:48:57<mmmdonuts>Yes.
19:49:06<mmmdonuts>Same module.
19:49:58<mmmdonuts>Loading and running it under ghci works fine; under HAppS, it pauses and the web request is suspended until a key is pressed on the console.
19:50:33<Saizan_>which platform?
19:50:42<mmmdonuts>Debian stable.
19:50:50<mmmdonuts>6.8.2
19:50:53<mmmdonuts>(ghc)
19:51:06<mmmdonuts>HAppS from the repos in the last few days.
19:51:28<Saizan_>how big is the relevant code? can you paste it? (on hpaste.org if you wish)
19:53:25<mmmdonuts>Ok, will paste shortly
19:53:28<mmmdonuts>(Thanks!)
19:56:39<Saizan_>Loading and running it under ghci works fine <-- have you also tried in a compiled program?
19:56:55<Saizan_>or, do you compile your HAppS application with -threaded?
19:58:52<mmmdonuts>No, haven't tried compiled. Good point. I'm not compiling HAppS with -threaded afaik - the only option is -fglasgow-exts
20:00:11<mmmdonuts>Something else I need to try is to run some command other than dot.
20:00:28<Saizan_>yes, that may help
20:00:46<Saizan_>HAppS shouldn't affect system in any way
20:02:42<mmmdonuts>I wouldn't have thought so either.
20:02:54<mmmdonuts>Here's a paste of the relevant code: http://hpaste.org/4519
20:04:35<Saizan_>runCmd misses an argument or the signature is wrong?
20:05:48<mmmdonuts>Sorry, I changed it slightly for the paste because there's some irrelevant detail. The original constructs a filename from a base name and an extension.
20:07:12<mmmdonuts>I'm going to try the things we've discussed - may take a little while.
20:07:50<Saizan_>k, i'm seeing if i get that problem too
20:09:33<mmmdonuts>Thanks! BTW, after dot runs the renderEx function generates some HTML (via Text.XHtml.Strict) to return something like <img src="/filename.png">
20:09:35<Saizan_>ehm, the paste misses renderEx
20:10:00<mmmdonuts>There's some messy other stuff but I'll paste a stripped down version of renderEx in a minute
20:16:48<Saizan_>ok, testing with a dummy one that just return the path and uses "echo " ++ path as command to run seems to work if interpreted
20:18:34<mmmdonuts>Under HAppS, or standalone?
20:18:48<Saizan_>under HAppS
20:19:19<mmmdonuts>Hmm, interesting. BTW, you've given me lots of good ideas for debugging so if you wanted to wait until I have more info, that's fine with me. I don't want to waste your time.
20:19:37<Saizan_>renderEx path = do runCmd $ "echo "++ path; return path
20:20:37<Saizan_>okit also works compiled without -threaded, i.e. ghc --make Main.hs && ./Main
20:21:56<Saizan_>mmmdonuts: yeah, we need more info :)
20:22:38<mmmdonuts>Thanks very much. I'll post once I have some more results. I'm probably doing something dumb.
20:25:04<Saizan_>it seems like system interacts in some strange way with dot
20:25:29<Saizan_>can you point me to a dot file to test?
20:26:53<mmmdonuts>paste coming up...
20:29:45<Saizan_>k
20:30:55<mmmdonuts>I've annotated that paste.
20:31:42<mmmdonuts>btw, how do you control where hpaste announces go? don't want to spam #haskell
20:34:09<Saizan_>you can't, but you can deselect announce
20:34:51<mmmdonuts>That's what I've been doing, thx.
20:39:39<mmmdonuts>Guess what: I get the same behavior with the 'echo' version, running happs interpreted instead of compiled. I'm going to try it on another machine.
20:40:28<Saizan_>ah, i don't get it even with dot :)
20:41:05<Saizan_>can you try with my renderEx? so that we're checking the same thing
20:41:47<Saizan_>running happs compiled works fine?
20:42:01<mmmdonuts>Nothing works fine, yet. :)
20:42:33<mmmdonuts>I ran your renderEx, under happs interpreted, the echo doesn't take place until I press a key. However, I'm running this as part of a bigger program. I'm going to try a stripped down version just with the code I pasted plus your renderEx.
20:43:05<Saizan_>k
20:50:56<mmmdonuts>Still get the same behavior with stock happs plus my pasted code plus your renderEx. It pauses after my putStrLn in runcmd but before "echo" runs. I'm about to try on another machine.
20:52:11<Saizan_>k
21:13:50<mmmdonuts>Aha. It worked fine on another machine that already had a slightly older version of happs (from before the repo breakage that happened in the past few weeks).
21:13:53<mmmdonuts>I'm trying to install the latest repos now, but I'm getting things like "failed to find HAppS.Data.Xml.Instances" from searchpath.
21:14:11<mmmdonuts>"failed to find HAppS.State.ComponentTypes"...
21:18:11<Saizan_>weird
21:19:17<Saizan_>but i use cabal
21:21:16<mmmdonuts>I normally use cabal, it just tends to take longer to get everything going in a new set of repos with cabal. But I'll try that now.
21:23:04<Saizan_>configuring with --disable-optimization should speed things a little
21:24:37<mmmdonuts>I just meant that (afaik) you have to install each repo, and configure and build them separately, whereas sp is just one step, then you sit back and hope it works :)
21:25:06<Saizan_>heh, true :)

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