19:06:18 <NervousNelly> hello
19:26:52 <NervousNelly> why can't i find Happstack.Server.RqData ??
19:27:45 <NervousNelly> It's used in the crash course and Happs tutorial, but I can't find it on hackage
19:28:02 <NervousNelly> Is it no longer being used?
19:42:47 <stepcut> NervousNelly: it's only available in darcs at the moment. It won't be in the stable release until 0.6 is out (which should be soon)
19:43:18 <stepcut> NervousNelly: there should be a comment in the crash course mentioning that that section reflects the dev version of happstack?
19:43:38 <stepcut> RqData exists in 0.5, but it just comes from SimpleHTTP, and has a slightly different API
19:44:34 <stepcut> the darcs version should be pretty stable if want to get started learning the new stuff..
19:50:28 <NervousNelly> yes, there is a comment in the crash course, in red, i'm new to this so i guess i didn't clue in.
19:53:31 <NervousNelly> I'm wondering if you can help me out, because I feel pretty defeated right now.  I'm just trying to make a basic one page website that parses a string that is given to it, makes a calculation on the backend and then returns a result to the user.  Shouldn't this be relatively straightforward?
19:54:28 <NervousNelly> The crash course only seemed to help a little and I tried the old Happs tutorial and that wasn't very helpful.  Am I missing something?
19:59:02 <stepcut> should not be too hard
19:59:14 <stepcut> where does the string it parses come from ?
20:00:16 <stepcut> I guess I want to clarify how it is given.. there are a few possible ways.. it could be part of the url, like http://localhost:8000/?string=hello+world
20:00:17 <NervousNelly> from a user that types it into a textbox
20:00:24 <stepcut> ah, so from a form
20:00:30 <NervousNelly> yes
20:02:04 <stepcut> do you have some code already ?
20:03:06 <NervousNelly> I have none, I've just been trying to understand how everything is setup, but all the examples involve Hello, World
20:05:14 <stepcut> I think this example is similar to what you want to do, http://www.happstack.com/docs/crashcourse/RqData.html#rqdatacheckrq
20:05:39 <stepcut> though, it just gets the parameter from the url instead of a form.
20:06:24 <stepcut> but, using a form is not much different.. the 'look' stuff all works the same, but you also have a form
20:06:33 <stepcut> this is the only example with a form at the moment
20:06:34 <stepcut> http://www.happstack.com/docs/crashcourse/RqData.html#rqdataupload
20:07:03 <stepcut> the basic plan is like this:
20:07:24 <stepcut> you have one page which creates a form
20:07:37 <stepcut> the action=url for that form points at a second page
20:07:53 <stepcut> that page uses one of the look functions to find the field name from the form
20:08:44 <stepcut> the examples on that page all require darcs head though
20:09:08 <stepcut> the basic approach is the same in 0.5, but the function types are a little different :-/
20:11:17 <NervousNelly> I'll be back, give a couple of minutes. I have more questions.
20:13:26 <stepcut> k
20:13:31 <stepcut> happy to help
20:13:38 <stepcut> and get feedback on the crash course
20:13:57 <stepcut> the crash course is still a bit high level (hence the 'crash' part)
20:14:33 <stepcut> the goal is to first get everything at least somewhat documented, and then work on making it even more accessible to new comers
20:29:53 <NervousNelly> wtf!
20:31:34 <NervousNelly> okee
20:33:50 <NervousNelly> stepcut: So i'll only need 2 pages in total? I'm guessing I have to read haddock in order to find out about different types? Will I need to d/l BlazeHtml to create the pages?
20:37:00 <NervousNelly> also, how do i get 'darcs head' ?
20:39:49 <stepcut> one moment
20:40:05 <stepcut> http://www.happstack.com/download
20:40:14 <stepcut> the section 'Getting the development versions'
20:47:41 <NervousNelly> okay I did that, now how do i check if it actually worked?
20:49:37 <stepcut> um
20:50:24 <stepcut> you could run ghci
20:50:32 <stepcut> and then do, :m + Happstack.Server.RqData
20:53:32 <NervousNelly> it can't find it
20:54:04 <stepcut> :-/
20:54:46 <stepcut> did you start a fresh ghci session, or try to reuse an old one ?
20:55:08 <NervousNelly> fresh
20:55:42 <stepcut> did the build-install-test-all script report any errors ?
20:56:20 <NervousNelly> nope
20:56:30 <NervousNelly> wait let me check again
20:57:00 <NervousNelly> nope
20:57:19 <stepcut> mysterious
20:57:36 <NervousNelly> is the build-install-test-all something that is done automatically or something i have to do?
20:57:49 <stepcut> it is something you have to run..
20:58:20 <NervousNelly> oh dear, i missed that line
20:58:25 <stepcut> :p
20:59:13 <stepcut> the box shows the 4 steps. First you use  darcs get to get the source code, and then you cd into the happstack directory, change the install script to be executable, and then run the install script
20:59:28 <stepcut> assuming you are on unix-like platform.. the steps will be slightly different under windows..
21:00:06 <NervousNelly> i'm unix
21:00:20 <NervousNelly> for some reason my cabal isn't working
21:00:40 <NervousNelly> removed from my path i guess, though i didn't do anything like that
21:00:52 <stepcut> make sure ~/.cabal/bin is in your PATH
21:01:20 <stepcut> what error are you getting?
21:03:46 <NervousNelly> cabal isn't in my path
21:03:59 <stepcut> :-/
21:04:31 <stepcut> did you use cabal when you originally installed happstack ?
21:05:09 <NervousNelly> yup
21:05:17 <stepcut> how odd
21:05:30 <stepcut> if you run cabal by hand, it is not found either ?
21:06:50 <stepcut> also, I think there is a broken test in head, so you might want to use the build-install-all.sh script instead of the build-install-test-all.sh version
21:30:10 <NervousNelly> okay here's another problem i came across:
21:30:13 <NervousNelly> [3 of 3] Compiling Text.Hamlet      ( Text/Hamlet.hs, dist/build/Text/Hamlet.o )
21:30:13 <NervousNelly> Registering hamlet-0.4.1...
21:30:13 <NervousNelly> Installing library in /home/peter/.cabal/lib/hamlet-0.4.1/ghc-6.12.3
21:30:13 <NervousNelly> Registering hamlet-0.4.1...
21:30:13 <NervousNelly> Downloading happstack-hamlet-0.2.1...
21:30:14 <NervousNelly> Configuring happstack-hamlet-0.2.1...
21:30:16 <NervousNelly> Preprocessing library happstack-hamlet-0.2.1...
21:30:18 <NervousNelly> Building happstack-hamlet-0.2.1...
21:30:20 <NervousNelly> Happstack/Server/Hamlet.hs:13:7:
21:30:22 <NervousNelly>     Could not find module `Text.Hamlet.Monad':
21:30:24 <NervousNelly>       Use -v to see a list of the files searched for.
21:30:26 <NervousNelly> cabal: Error: some packages failed to install:
21:30:28 <NervousNelly> happstack-hamlet-0.2.1 failed during the building phase. The exception was:
21:30:30 <NervousNelly> ExitFailure 1
21:30:32 <NervousNelly> peter@peter-laptop:~/happstack$ cabal install happstack-wai
21:30:34 <NervousNelly> cabal: There is no package named happstack-wai. Perhaps you need to run 'cabal
21:30:36 <NervousNelly> update' first?
21:32:36 <stepcut> yeah, happstack-hamlet is a little out of date, you don't really need it though
21:32:48 <stepcut> nor do you need the wai support
21:32:56 <stepcut> those are both  experimental features
21:35:26 <NervousNelly> okay sounds good
21:38:42 <NervousNelly> I can't run the HelloBlaze.hs code from the crash course
21:38:54 <NervousNelly> it gives me a bunch of errors
21:39:04 <stepcut> like what ?
21:39:22 <NervousNelly> HelloBlaze.hs:21:8:
21:39:22 <NervousNelly>     No instances for (Data.Generics.SYB.WithClass.Basics.Data
21:39:22 <NervousNelly>                         happstack-data- (H.Html ()),
21:39:22 <NervousNelly>                       Happstack.Data.Default.Default (H.Html ()),
21:39:22 <NervousNelly>                       Data.Generics.SYB.WithClass.Basics.Data
21:39:23 <NervousNelly>                         Happstack.Data.Normalize.NormalizeD (H.Html ()))
21:39:25 <NervousNelly>       arising from a use of `toResponse' at HelloBlaze.hs:21:8-17
21:39:37 <NervousNelly> just one error :/
21:40:18 <stepcut> :-/
21:41:37 <stepcut> that is referencing happstack-data- if you have the new version installed, it should be 0.5.1
21:42:21 <stepcut> if you do, ghc-pkg list, does it show happstack-data-0.5.1 installed in ~/.cabal
21:42:48 <stepcut> I mean, ~/.ghc
21:44:58 <NervousNelly> here's the problem:
21:45:17 <NervousNelly> a new problem with cabal upgrade happstack-data:
21:45:21 <NervousNelly> strict-concurrency-0.2.3 failed during the building phase. The exception was:
21:45:21 <NervousNelly> ExitFailure 1
21:45:22 <NervousNelly> time- failed during the configure step. The exception was:
21:45:22 <NervousNelly> ExitFailure 1
21:45:22 <NervousNelly> peter@peter-laptop:~/cs4z03/happstack$ cabal upgrade time
21:45:22 <NervousNelly> Resolving dependencies...
21:45:24 <NervousNelly> <command line>: cannot satisfy -package Cabal-
21:45:26 <NervousNelly>     Cabal- is unusable due to missing or recursive dependencies:
21:45:28 <NervousNelly>       process-
21:45:30 <NervousNelly>     (use -v for more information)
21:45:32 <NervousNelly> cabal: Error: some packages failed to install:
21:45:34 <NervousNelly> time- failed during the configure step. The exception was:
21:45:36 <NervousNelly> ExitFailure 1
21:46:15 <stepcut> what happens if you cabal install process ?
21:47:04 <NervousNelly> that worked
21:47:28 <stepcut> and then cabal install time ?
21:48:01 <NervousNelly> doesn't work
21:48:27 <NervousNelly> here's what i get:
21:48:29 <NervousNelly> Resolving dependencies...
21:48:30 <NervousNelly> <command line>: cannot satisfy -package Cabal-
21:48:30 <NervousNelly>     Cabal- is unusable due to missing or recursive dependencies:
21:48:30 <NervousNelly>       process-
21:48:30 <NervousNelly>     (use -v for more information)
21:48:30 <NervousNelly> cabal: Error: some packages failed to install:
21:48:32 <NervousNelly> time- failed during the configure step. The exception was:
21:48:34 <NervousNelly> ExitFailure 1
21:52:12 <stepcut> what about cabal install Cabal ?
21:59:08 <NervousNelly> let me try
22:02:37 <NervousNelly> that worked
22:02:49 <NervousNelly> i'll try time again
22:03:01 <NervousNelly> i mean process
22:03:38 <NervousNelly> so far so good, i'll try time now
22:04:42 <NervousNelly> okay that worked
22:10:46 <NervousNelly> when i tried 'cabal upgrade happstack-data' i got:
22:10:49 <NervousNelly> Installing library in /home/peter/.cabal/lib/HaXml-1.13.3/ghc-6.12.3
22:10:49 <NervousNelly> Installing executable(s) in /home/peter/.cabal/bin
22:10:49 <NervousNelly> Registering HaXml-1.13.3...
22:10:49 <NervousNelly> Configuring strict-concurrency-0.2.3...
22:10:49 <NervousNelly> Preprocessing library strict-concurrency-0.2.3...
22:10:51 <NervousNelly> Building strict-concurrency-0.2.3...
22:10:53 <NervousNelly> [1 of 2] Compiling Control.Concurrent.MVar.Strict ( Control/Concurrent/MVar/Strict.hs, dist/build/Control/Concurrent/MVar/Strict.o )
22:10:58 <NervousNelly> Control/Concurrent/MVar/Strict.hs:63:12:
22:11:00 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:02 <NervousNelly> Control/Concurrent/MVar/Strict.hs:65:26: Not in scope: `rnf'
22:11:04 <NervousNelly> Control/Concurrent/MVar/Strict.hs:74:15:
22:11:06 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:08 <NervousNelly> Control/Concurrent/MVar/Strict.hs:83:11:
22:11:10 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:12 <NervousNelly> Control/Concurrent/MVar/Strict.hs:93:12:
22:11:14 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:16 <NervousNelly> Control/Concurrent/MVar/Strict.hs:105:12:
22:11:17 <stepcut> what version of ghc are you using ?
22:11:18 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:20 <NervousNelly> Control/Concurrent/MVar/Strict.hs:120:12:
22:11:22 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:24 <NervousNelly> Control/Concurrent/MVar/Strict.hs:134:15:
22:11:28 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:30 <NervousNelly> Control/Concurrent/MVar/Strict.hs:146:14:
22:11:32 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:11:34 <NervousNelly> cabal: Error: some packages failed to install:
22:11:36 <NervousNelly> happstack-data- depends on strict-concurrency-0.2.3 which failed to
22:11:38 <NervousNelly> install.
22:11:40 <NervousNelly> happstack-util- depends on strict-concurrency-0.2.3 which failed to
22:11:42 <NervousNelly> install.
22:11:44 <NervousNelly> strict-concurrency-0.2.3 failed during the building phase. The exception was:
22:11:46 <NervousNelly> ExitFailure 1
22:12:39 <NervousNelly> how do i check?
22:13:06 <stepcut> ghc -V
22:14:05 <NervousNelly> 6.12.3
22:17:34 <stepcut> hmm
22:17:37 <NervousNelly> :]
22:18:10 <stepcut> dons: any idea what strict-concurrency is failing to find NFData? I see other reports on the web of the same failure..
22:18:36 <stepcut> maybe it is the new version of parallel
22:19:22 <stepcut> what does, ghc-pkg list parallel show ?
22:19:34 <stepcut> ghc-pkg list parallel
22:19:38 <NervousNelly> let me see
22:20:20 <NervousNelly> WARNING: there are broken packages.  Run 'ghc-pkg check' for more details.
22:20:20 <NervousNelly> /usr/local/lib/ghc-6.12.3/package.conf.d
22:20:20 <NervousNelly> /home/peter/.ghc/i386-linux-6.12.3/package.conf.d
22:20:20 <NervousNelly>    parallel-
22:20:20 <NervousNelly>    parallel-
22:20:44 <stepcut> try, cabal install strict-concurrency --constraint 'parallel < 3'
22:21:56 <NervousNelly> Resolving dependencies...
22:21:56 <NervousNelly> No packages to be installed. All the requested packages are already installed.
22:21:56 <NervousNelly> If you want to reinstall anyway then use the --reinstall flag.
22:23:05 <stepcut> let's back up a bit, you can't do, cabal upgrade happstack-data, anyway.. that is going to try to pull it from hackage, but you want the version you got from darcs
22:23:40 <NervousNelly> okee dokee
22:24:00 <NervousNelly> so i should try running that script check thingy again
22:24:04 <NervousNelly> ?
22:24:06 <stepcut> yes
22:24:15 <NervousNelly> okee
22:24:16 <stepcut> or you can cd into each directory by hand and run cabal install
22:24:28 <stepcut> like, cd happstack-util ; cabal install
22:24:42 <stepcut> if you don't give cabal install an argument it tries to install the cabal package in the current directory
22:26:31 <NervousNelly> okee i'll try that
22:28:04 <NervousNelly> Registering hslogger-1.0.10...
22:28:04 <NervousNelly> Installing library in /home/peter/.cabal/lib/hslogger-1.0.10/ghc-6.12.3
22:28:04 <NervousNelly> Registering hslogger-1.0.10...
22:28:04 <NervousNelly> Configuring strict-concurrency-0.2.3...
22:28:04 <NervousNelly> Preprocessing library strict-concurrency-0.2.3...
22:28:05 <NervousNelly> Building strict-concurrency-0.2.3...
22:28:07 <NervousNelly> [1 of 2] Compiling Control.Concurrent.MVar.Strict ( Control/Concurrent/MVar/Strict.hs, dist/build/Control/Concurrent/MVar/Strict.o )
22:28:10 <NervousNelly> Control/Concurrent/MVar/Strict.hs:63:12:
22:28:12 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:14 <NervousNelly> Control/Concurrent/MVar/Strict.hs:65:26: Not in scope: `rnf'
22:28:16 <NervousNelly> Control/Concurrent/MVar/Strict.hs:74:15:
22:28:18 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:20 <NervousNelly> Control/Concurrent/MVar/Strict.hs:83:11:
22:28:22 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:24 <NervousNelly> Control/Concurrent/MVar/Strict.hs:93:12:
22:28:26 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:28 <NervousNelly> Control/Concurrent/MVar/Strict.hs:105:12:
22:28:30 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:34 <stepcut> ok, so try, ./bin/build-install-all.sh --constraint 'parallel < 3'
22:28:34 <NervousNelly> Control/Concurrent/MVar/Strict.hs:120:12:
22:28:36 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:38 <NervousNelly> Control/Concurrent/MVar/Strict.hs:134:15:
22:28:40 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:42 <NervousNelly> Control/Concurrent/MVar/Strict.hs:146:14:
22:28:44 <NervousNelly>     Not in scope: type constructor or class `NFData'
22:28:46 <NervousNelly> cabal: Error: some packages failed to install:
22:28:48 <NervousNelly> happstack-util-0.5.1 depends on strict-concurrency-0.2.3 which failed to
22:28:50 <NervousNelly> install.
22:28:52 <NervousNelly> strict-concurrency-0.2.3 failed during the building phase. The exception was:
22:28:54 <NervousNelly> ExitFailure 1
22:30:16 <NervousNelly> Building and installing all cabal packages
22:30:17 <NervousNelly> ./bin/build-install-all.sh: 11: cabal: not found
22:30:29 <stepcut> :-/
22:30:48 <NervousNelly> :~[
22:31:15 <stepcut> what if you just do, cd happstack-util ; cabal install --constraint 'parallel < 3'
22:32:24 <NervousNelly> working so far :)
22:32:47 <NervousNelly> worked
22:33:02 <NervousNelly> now?
22:34:20 <stepcut> do the same thing for the, happstack-data, happstack-ixset, happstack-state, happstack-server, and happstack directories
22:34:23 <stepcut> in that order
22:34:40 <stepcut> that is mostly what the script does, except having to add this extra constraint is throwing things off
22:34:55 <stepcut> that is really a bug in strict-concurrency, I am reporting it to dons so it wil just work in the future
22:35:32 <NervousNelly> oh okay, i tried cabal install again and it didn't work, but i shouldn't worry about this, just do what you just said?
22:35:51 <NervousNelly> ahhh i see
22:37:26 <NervousNelly> i tried it in data and this is what i got:
22:37:31 <NervousNelly> cabal: dependencies conflict: happstack-util-0.5.1 requires directory
22:37:31 <NervousNelly> == however
22:37:31 <NervousNelly> directory- was excluded because happstack-util-0.5.1 requires directory
22:37:31 <NervousNelly> ==
22:38:15 <stepcut> cabal is making me sad
22:38:37 <stepcut> one moment
22:39:05 <NervousNelly> lol...me too :(
22:39:47 <NervousNelly> I'll be back i have to go home and eat some food
22:40:14 <stepcut> ok