--- Log opened Wed Feb 11 00:00:06 2009
16:36 < lanaer> so if I had HAppS-Server installed, and just installed happstack-server... how do I import HAppS.Server without ghci yelling at me?
16:39 < Saizan> lanaer: :set -package happstack-server-0.1
16:39 < lanaer> thank you
16:40 < Saizan> lanaer: or "ghc-pkg unregister HAppS-Server" to remove that
16:40 < lanaer> ah, excellent
16:44 < lanaer> I am going to try (though perhaps this is not a good idea considering my newness to haskell & happstack/HAppS both) to write up a tutorial for happstack as I figure things out.
16:47 < wchogg> lanaer : Have you taken a look at the happs-tutorial up on Hackage?
16:48 < lanaer> wchogg: I have, and most of what I currently understand comes from there. I found that it didn't really help me figure out where to begin when trying to write my own app, though
16:48 < lanaer> and also didn't make particularly clear what functions used were actually a part of HAppS, and which were part of the tutorial
16:49 < lanaer> though maybe the problem is just that I'm not comfortable enough with haskell yet ;)
16:49 < lanaer> either way, I figure more documentation can't be a bad thing
16:49 < wchogg> lanaer : Well, no, I think that's an apt criticism & something I want to work on.
16:50 < Saizan> code.haskell.org/hackage-server is not a tutorial but it's quite nicely written
16:51 < lanaer> Saizan: thank you
16:52 < lanaer> wchogg: thanks for the tutorial, then. if I have any more specific suggestions, I'll let you know, or maybe figure out darcs and send you patches ;)
16:55 < lanaer> hm, I overlooked http://www.haskell.org/haskellwiki/HAppS_tutorial before.
16:56 < lanaer> looks like that might give me the basics I need to go back to happs-tutorial and not get lost
16:57 < stepcut> in 6.10 you can also do, import "happstack-server" HAppS.Server
17:02 < lanaer> or it would be if it weren't out-of-date
17:02 < lanaer> stepcut: thanks
17:05 < wchogg> lanaer : actually what might help you is reading over http://articles.bluishcoder.co.nz/Haskell/NotAHAppSTutorial
17:06 < wchogg> Despite it not being a tutorial, it might help cross that gap from understanding what's happening in principle to starting your own app
17:06 < lanaer> cookbooks tend to be good at that sort of thing
17:07  * lanaer has an expanding collection of bookmarks
20:29 < mae_> hello !
21:07 < dancor> searchpath should be deprecated now that cabal-install exists right?
21:50 < mae_> dancor: yep
22:54 < sm> evening all
22:56 < sm> how do you serve a whole directory or tree of files ?
22:56 < rovar> what do you mean serve?
22:57 < sm> like fileServe
22:57 < rovar> render each file as HTML? or list the directory contents on index and make each file available for download
22:57 < mae_> sm, fileServe does it i think 1 sec
23:02 < mae_> actually no, that is not built in
23:02 < mae_> i assume you mean the directory browsing, like in apache
23:03 < sm> exactly.. thanks for looking mae_
23:03 < mae_> np
23:03 < mae_> good meeting you yesterday :)
23:03 < sm> likewise!
23:03 < mae_> i think we did it for patch tag
23:03 < mae_> but its custom
23:03 < mae_> let me see if i can pastebin it for you
23:04 < sm> that would be great
23:04 < sm> I'm trying to hook up a happs ui to my ledger program
23:05 < mae_> ahh
23:05 < mae_> its part of the library thomas made
23:05 < mae_> ./HAppS/Helpers/DirBrowse.hs
23:05 < sm> awesome, thank you
23:06 < mae_> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happstack-helpers
23:06 < mae_> this works with 0.1  I think, wchogg updated it
23:06 < mae_> no prob
23:06 < sm> I even looked in there.. but I was looking for something else at the time
23:06 < mae_> ttyl :) still trying to get the video on youtube.
23:06 < sm> (a way to extract query vars from request)
23:06 < sm> good luck, see you
23:06 < mae_> oh I see
23:07 < mae_> class FromData I think is what you want
23:07 < sm> that's way too hard for me right now :) but later.. I was able to scrape it out of rqInputs though
23:08 < mae_> sm, the basic template I am creating might help you understand how this works at the basic level
23:08 < mae_> its not finished but here you can see the code
23:08 < mae_> http://patch-tag.com/publicrepos/happstack/happstack/templates/project/src
23:08 < mae_> here are the data types
23:09 < mae_> http://patch-tag.com/publicrepos/happstack/happstack/templates/project/src/AppState.hs
23:09 < mae_> and here is the "controller" (to steal a rails term) code
23:09 < mae_> also a FromData instance is defined here
23:09 < mae_> which grabs parameters from a post request
23:09 < mae_> http://patch-tag.com/publicrepos/happstack/happstack/templates/project/src/AppControl.hs
23:09 < mae_> instance FromData GuestBookEntry where
23:10 < sm> thank you
23:10 < mae_> yep
23:10 < mae_> iif you look at the code for postEntry on that same file
23:10 < mae_> the withData function
23:10 < mae_> makes use of the FromData class
23:11 < mae_> so this way it knows how to create a GuestBookEntry data instance from the post request
23:20 < sm> dancor, btw searchpath's auto-rebuild feature is phenonenally useful for haskell coding generally.. nothing to do with happs per se
23:23 < dancor> sm: mm
23:23 < dancor> anyone estimates how much work it would take to use the happs facebook api these days for a simple app?
23:24 < dancor> or are there functioning examples
23:24 < dancor> and if "lots" and "no", are there haskell things besides happs that are better to look at for that currently
23:35 < stepcut> dancor: http://src.seereason.com/happstack-facebook/
23:36 < stepcut> dancor: not done yet, but is usuable
23:36 < stepcut> dancor: I want to read in the the XML for the API and generated data types for making the calls and repsonse type safe
23:37 < sm> stepcut: would you happen to have mime-aware directory-tree-serving code ?
23:38 < sm> that you could share ?
23:38 < stepcut> sm: I have none
23:38 < stepcut> sm: not even super secret code
23:38 < sm> ack
23:40 < stepcut> I have an open wishlist item that there should be a good function for serving a single file with a specific mime-type. Additionally the name of the file you are serving should not have to be the same as the name of the file on the disk.
23:40 < stepcut> with that function, it would be easy to write a directory browsing module
23:41 < stepcut> the code to do that lives inside fileServe, but it needs to be hacked into shape so that you can call the parts you need
23:42 < stepcut> I have a decimal library though that would be appropriate for currency :)
23:43 < sm> hey! thanks! :)
23:44 < sm> plenty of cleanup and fun usability tweaks ahead I think
23:47 < stepcut> I once wrote a double entry bookkeeping program using WASH/CGI and MySQL. I think I discovered happs shortly after that (back in in the 0.8.4 days), and realized it was a much better way to go :)
23:47 < sm> ah interesting.. I'm hooking happs up to a double entry bookkeeping program right now
23:50 < stepcut> ;)
23:50 < sm> it seems everyone does it :/
23:51 < stepcut> but, almost no one does triple entry!
23:51  * stepcut goes to bed
23:51 < sm> night
23:53 < dsrogers> triple entry, yes because every credit is a debit from two places!
23:56 < dsrogers> that's like bugs bunny counting out the dollars for yosemite sam.
23:56 < dsrogers> 1 for you, one for me.  two for you, one-two for me...
23:57 < stepcut> :)
--- Log closed Thu Feb 12 00:00:09 2009