Experimental IRC log happs-2007-10-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.

13:05:37<Rumata>Hello. I'm new to HAppS. Was trying to build simple blogger from HAppS-Begin. Downloaded some packages adn got message "Could not find module `MyEntries'"
13:06:54<Rumata>I created empty module with that name and now I receive error message like this: Could not find module `System.Posix'
13:07:50<Rumata>I'm working on WindowsXP and I cannot find that package to install.
13:14:34<Saizan>it's the unix package, however an empty MyEntries is not going to work
13:16:03<Rumata>I commented posix dependencies in my Daemonize, and something is working hard =)
13:17:03<Rumata>Oh, it doesn't. Not in scope: data constructor `MyEntry'
13:19:38<Rumata>What is MyEntries for and what can use there for example?
13:21:36<Saizan>good question
13:21:53<Saizan>shapr: ping
13:58:31<Rumata>btw what is that construction: $( deriveAll [''Ord,''Eq,''Read,''Show,''Default] ... ?
14:01:21<Saizan>it's template haskell syntax
14:01:56<Saizan>template haskell (TH in short) is a macro system, an extension supported by GHC
14:02:46<Saizan>specifically deriveAll derives the listed instances for all the types defined in its second parameter
14:04:34<Rumata>I got to go. See you tommorow ;-)
14:04:59<Rumata>Thanks for help =)
14:05:09<Saizan>you're welcome :)
14:19:59<shapr>Saizan: ?
14:23:19<Saizan>shapr: HAppS-Begin lacks the module MyEntries so it's unbuildable, i've also sent an email to alex -at- happs dot org
15:44:32<shapr>@yow !
16:17:40<Saizan>IsState could just dispatch on the return type.. class IsState st where interface :: [Handler st]
17:28:44<nbarterd>http://rafb.net/p/D3IITT91.html
17:29:06<nbarterd>my .91 served page displays with no formatting, just raw html
17:29:39<bakert>nbarterd: happs wise i have no idea but that's just got to be the Content-type header.
17:29:53<bakert>you want text/html and you've got text/plain, or no header.
17:30:12<bakert>when you open locally the browser probably guesses instead of listening to a server as there is no server in that case.
17:30:19<bakert>makes sense to me :)
17:30:27<alexj>Saizan: good point. will fix shortly.
17:30:33<nbarterd>is there an easy way to get raw html to display correctly?\
17:30:51<bakert>nbarterd: Saizan wrote a hello world yesterday. so you could start from that.
17:30:56<bakert>hang on i'll get it
17:31:20<bakert>import HAppS
17:31:20<bakert>main = stdMain $ simpleHTTP app :*: (End :: StdPart ())
17:31:20<bakert>app = [method GET $ ok "hello world"]
17:31:26<bakert>not sure if that will work or not for html
17:31:33<bakert>not sure how you sent headers
17:31:36<bakert>:)
17:31:55<nbarterd>me neither! :)
17:32:18<nbarterd>but this seems to me like the second most simple thing after hello world, just hello world with some formatting.
17:32:35<bakert>yep well try that hello world with <h1>hello world</h1> in there. it may do the trick
17:32:39<nbarterd>so there's gotta be an example for it
17:32:49<nbarterd>awesome lemme try...
17:34:29<bakert>nbarterd: there are NO simple examples for 0.9.1 ... until Saizan kindly provided this hello world for me :)
17:34:57<bakert>i hope to have some up some time soon. but it's slow going when you don't know what Monad State Readers are and have never used haskell macros.
17:38:14<nbarterd>I get usererror, mzero. sure this works? do i need to darcs update?
17:38:35<nbarterd>oh never mind
17:38:36<nbarterd>forgot do
17:38:46<bakert>nbarterd: "forgot do"?
17:39:12<nbarterd>uh...
17:40:34<nbarterd>i keep getting that...
17:40:44<bakert>well i have to say i didn't check Saizan's work!
17:40:47<bakert>let me try
17:42:45<bakert>hmm ... no
17:42:53<bakert>back to the drawing board nbarterd
17:42:58<bakert>same error as you go
17:43:00<bakert>got
17:43:28<bakert>?seen Saizan
17:43:34<bakert>oh .. no lambdabot
17:44:34<nbarterd>hmmm... i'm gonna post to the list as well.
17:52:36<nbarterd>posted to the list...
17:54:28<Saizan>that hello world worked for me
17:54:55<nbarterd>browser?
17:55:14<Saizan>firefox
17:55:21<nbarterd>and... what hello world? did you use my list post?
17:55:25<bakert>Saizan: perhaps we need to pull the v latest
17:55:34<bakert>nbarterd: he means the one i showed you that he wrote yesterday
17:55:44<bakert>but he is definitely up to date with darcs
17:55:52<bakert>and i am a couple of weeks out
17:55:57<nbarterd>me too.
17:56:06<bakert>Saizan: did you compile it or use that sp thing to compile-run it?
17:56:40<nbarterd>i just use runghc
17:56:40<Saizan>bakert: in the very latest HAppS-Begin there's an hello world example, with another way to start up the application
17:56:46<Saizan>i've compiled it.
17:56:51<bakert>ooh la la!
17:56:52<nbarterd>the last time I tried sp i got into a horrible state.
17:57:03<bakert>this is what you get for not darcs-ing enough
17:57:18<bakert>i have to work at the mo but i will definitely try and get that soon
17:57:20<nbarterd>and it was icky to back out of
17:57:20<nbarterd>but i thought sp basically is darcsing
17:57:38<bakert>oh, is it? i am treating it like a magic box (with less than signs)
17:58:10<Saizan>sp doesn't update the repos that are yet in .haskell_cache i think
17:58:34<nbarterd>er, so what does it do?
17:59:57<Saizan>it still darcs get them at the beginning
18:01:17<nbarterd>ah, so if i rm .haskell cache and then do sp, then it darcs gets. ?
18:03:35<Saizan>yeah, however i don't use it so..
18:03:58<Saizan>s/so/
18:04:03<nbarterd>sp crapped out. not in scope, mbrefs.
18:05:00<nbarterd>it would be great if alex would clarify how we mortals should update after a fix.
18:05:30<nbarterd>eat your own dog food?
18:06:04<nbarterd>the main disadvantage to sp, far as I can reckon, is just that it's slow. since you have to recompile everything.
18:06:42<nbarterd>so there's the temptation to not use it even if it's the "official" way.
18:06:52<Saizan>aren't previous .o and .hi reused?
18:07:11<nbarterd>i dunno. it always seems real slow to me.
18:07:26<nbarterd>and it appears that alex is announcing fixes without a clear update path.
18:07:34<nbarterd>assuming that sp is the update path.
18:07:40<nbarterd>which I'm not sure of.
18:08:06<Saizan>i just darcs pull every repo and recompile them in order..
18:08:32<nbarterd>alex, when you announce a fix, do you have a clear idea of what upgrade path we should be using to get it?
18:09:32<nbarterd>sp crapped out... hey could it be I'm missing an sp drcs path or something?
18:09:51<nbarterd>died on not in scope mbrefs
18:18:34<nbarterd>i reinstalled sp but same result.
18:20:43<nbarterd>assuming the update path is vanilla darcs and runghc install... trying that...
18:22:16<Saizan>i use --disable-optimization to speed up compilation, btw
18:28:39<Saizan>a little while after starting the demo i get "thread blocked indefinitely" even if the application continue to work
18:29:16<nbarterd>so, it's usable, and that's a spurious warning?\
18:32:09<Saizan>it's usable, but it doesn't close on the first ^C
18:36:04<nbarterd>is there another repo now for HAppS-Store ?
18:36:10<nbarterd>that I have to darcs get?
18:36:20<alexj>right now HAppS-Store is in HAppS-Server.
18:36:29<alexj>it should probably be moved to another repo, but have not gotten to that yet.
18:36:58<alexj>will push one more cleanup of the Store API in the next hour.
18:41:43<nbarterd>hoorah, updated happs begin installed :)
18:54:05<nbarterd>but...
18:54:13<nbarterd>http://hpaste.org/3308
18:54:34<nbarterd>when tried to run it, ambiguous occurrence ownerDataType.
18:56:31<Saizan>weird i didn't get that
18:56:55<nbarterd>try it with sp.
18:57:07<nbarterd>maybe my repo is now newer than yours?\
18:58:24<Saizan>"no changes to pull"
19:00:05<nbarterd>oh i think i see.
19:00:34<nbarterd>i need to hide something... what?...
19:02:20<nbarterd>oh crap line 22 is a $( derive ...
19:02:24<nbarterd>what the hell does that do?
19:02:36<Saizan>there are 2 HAppS modules, one in -Server and one directly in -Begin, the later is supposed to have precedence
19:03:17<Saizan>nbarterd: ownerDataType is a term used in the instance of SYBWC.Data iirc
19:03:35<alexj>nbasterd: multiple things are declaring an owner.
19:03:38<alexj>an Owner
19:04:22<nbarterd>the main thing is why can't
19:04:28<nbarterd>saizan reproduce what I have?
19:04:56<nbarterd>saizan, mv .haskell_cache to .haskell_cache.bak ?
19:05:03<nbarterd>and then sp ghc make ?
19:05:36<Saizan>nbarterd: i don't use sp and i'm going afk, sorry
19:05:57<nbarterd>afk? :)
19:08:05<nbarterd>saizan: when I run ghc make without sp it builds, with sp it croaks.
19:08:13<nbarterd>bad sp. no biscuit.
19:09:34<nbarterd>ulp.
19:09:47<nbarterd>it worked with sp now.
19:12:32<nbarterd>it runs. however when I try to "submit" a blog entry from ...:8000/blog/edit it fails with server error: this is the first actual state
19:13:09<nbarterd>I guess I could test that formatted hello world thing.
19:19:05<nbarterd>inhapps-begin/haskell/main.hs, helloworld is misspelled. (missing an l.)
19:30:47<nbarterd>>
19:30:49<nbarterd>
19:36:32<shapr>heh
19:44:40<nbarterd>formatted hello world still doesn't work. http://hpaste.org/3309
19:47:10<Saizan>the ToMessage instance for String specifies text/plain ad Content-Type
19:47:15<Saizan>so it's no wonder..
19:48:32<Saizan>you need to either make a newtype with a different instance or edit the headers of the Result returned from ok
19:48:59<nbarterd>wouldn't this be easier if content type was an argument?
19:49:12<Saizan>for ok?
19:49:26<nbarterd>um... I'm not sure.
19:49:35<Saizan>heh
19:50:13<Saizan>it's weird that there's no HTML type, though, even if the focus is on xml+xslt
19:50:22<nbarterd>I don't care.
19:50:25<nbarterd>xml is cool.
19:50:39<nbarterd>just show me how to get there from renderHtml $ whatever.
19:50:48<shapr>The basic idea these days is that the state comes out as xml, and you xslt it into whatever you want.
19:50:50<nbarterd>(text.xhtml)
19:51:01<nbarterd>nolo comprende
19:51:02<nbarterd>:)
19:52:06<Saizan>Text.Xhtml has an Html type, right?
19:53:24<Saizan>so i'd write instance ToMessage Html where toContentType = pack "text/html"; toMessage x = pack $ renderHtml x
20:46:58<alexj>Saizan: if you use XML to produce HTML then it will come out correctly through the xslt.
20:47:48<alexj>just return a data type that has the information you want to appear in the html. Use xslt to convert from the xml representation of that datatype to html.
20:53:37<nbarterd>alexj: don't you think this is asking a lot of people who want to test drive the framework? not everybody uses xslt. i don't get it.
20:55:14<nbarterd>but if this is the way to happs nirvana, there needs to be an easier example than the blog function.
20:55:23<bakert>HAppS definitely has a lot of love for xslt
20:55:34<bakert>i'm not sure i get it either :
20:55:36<bakert>:)
20:55:55<nbarterd>like i said, fine, but then give us nubes a way to use it without having to create new instances.\
20:56:20<nbarterd>for something as trivial as formatted html.
21:01:47<alexj>ok. what is the favored html lib?
21:02:06<nbarterd>text.html ?
21:02:15<nbarterd>that's what I'm using.
21:02:33<nbarterd>i mean .xhtml
21:03:07<nbarterd>jeff polakow says hi by the way.
21:03:59<alexj>nbarterd, you work with jeff?
21:04:08<nbarterd>yeah he's my boss.
21:04:09<alexj>narterd: does text.html support fbml?
21:04:34<nbarterd>if that's an acronym I don't recognize it
21:05:55<alexj>can you add your own tags?
21:06:05<alexj>fbml=facebook markup language.
21:07:18<nbarterd>ah, don't know. you doing facebook dev by the way?
21:07:49<alexj>yes.
21:08:04<alexj>hence all the extra facebook stuff appearing in HAppS.Server
21:08:06<nbarterd>cool
21:08:13<nbarterd>this is all i want
21:08:19<nbarterd>http://rafb.net/p/UuZToU15.html
21:08:29<nbarterd>currently this gives me everror mzero
21:08:32<nbarterd>error mzero
21:09:09<nbarterd>don't need no stinkin fb tags
21:09:30<nbarterd>jeff was kind of irked that you import two kinds of bytestrings by the way
21:09:46<nbarterd>when he was helping me get this to at least compile
21:10:50<nbarterd>oh wait a sec
21:11:12<nbarterd>that's missing instances
21:13:51<alexj>pushed html support.
21:13:56<alexj>your example should work now.
21:14:05<nbarterd>without the instances?
21:20:03<bakert>nbarterd: do report your success/failure here won't you?
21:20:38<nbarterd>of course i will.
21:21:01<nbarterd>you know how long it takes to darcs get, sp, and compile all this stuff :)
21:24:16<nbarterd>alexj: I get user error mzero.
21:24:43<nbarterd>same as I did before for that hpaste (that was missing an instance decl for ToMessage)
21:28:51<alexj>oh just noticed that you are using xhtml.
21:28:56<alexj>hold on I'll suport that too.
21:30:26<nbarterd>the ideal thing would be to have a function (maybenot ok) that takes an argument for content type and a string, and displays it. seems to me.
21:30:36<nbarterd>i mean, the ideal thing for a nube who just wants to get started
21:30:43<nbarterd>fooling around
21:31:55<alexj>you can always return a Message yourself.
21:32:03<alexj>xhtml pushed in anycae.
21:32:05<alexj>case.
21:37:16<alexj>nbarterd, you can easily make your own tomessage instance if you have something interesting. now String, Html, and XHtml are supported directly.
21:37:37<alexj>and if you use any other type, it is automatically converted to a reasonable xml representation.
21:37:57<nbarterd>I'm getting undefined reference to (mess) ... do I need to clear my happs cache or something?
21:37:59<alexj>did the push work? are you buildig with sp or cabal?
21:38:07<alexj>wipe _local.
21:38:09<nbarterd>both actually
21:38:24<nbarterd>I'm pretty confused about the best update path
21:38:39<nbarterd>so I darcs pull, cabal install, and then do sp in my working directory
21:39:53<nbarterd>what's _local do?
21:41:15<alexj>_local stores the current version of state.
21:41:38<nbarterd>i seemed to have wiped all the obvious things -- _local, stuff starting with a . -- but still get undefined ref to (mess)
21:42:01<nbarterd>in function sb9R_srt ... ?
21:42:42<alexj>hold on. testing
21:46:57<alexj>just pushed
21:47:07<alexj>just pushed HAppS-Begin that has a working example of xhtml
21:47:19<alexj>switch main to point to the correct hellowworld.
21:47:23<alexj>and wipe your _local directory.
21:47:44<alexj>also wipe your .haskell_cache
21:47:50<nbarterd>ok...
21:48:03<alexj>sp, by default refreshes repos every few hours.
21:48:40<alexj>is it working for you?
21:48:58<nbarterd>i'm slow pulling changes.
21:49:12<nbarterd>you never really said what you consider the best way to do this.
21:49:22<alexj>do which?
21:49:27<alexj>(I don't use cabal)
21:49:29<nbarterd>do you rely solely on sp or do you do darcs get and then runghc install ?
21:49:33<nbarterd>ah, sp only.
21:49:49<nbarterd>so theoretically I could skip the darcs get and runghc install
21:50:00<alexj>the best way is to pull HAppS-Deploy into the directory and then do sh HAppS-Deploy/dev-start.sh
21:50:26<alexj>after the first time it starts up, it auto-recompiles every time you change code and if the compile succeeds it restarts.
21:50:34<alexj>if the compile doesn't succeed it shows you the compiler error message.
21:50:39<alexj>on the web browser.
21:50:50<nbarterd>is HApps-Deploy its own darcs url?
21:50:59<alexj>http://happs.org/HAppS-Deploy.
21:51:11<alexj>look in the docs in HAppS-Begin and it says to do that.
21:51:41<nbarterd>ah
21:52:29<nbarterd>but even without darcs deploly I should be able to just use sp in my working dir without worrying about updating my libs right?
21:52:34<Saizan>alexj: using daemonize seems to cause a "thread blocked indefinitely" shortly after the start of the application
21:53:13<nbarterd>as long as I wipe my .haskell_cache first right?
21:54:41<alexj>nbarterd, yes sp will just periodically check online for updated versions of repos.
21:54:58<alexj>Saizan: thats interesting. what platform are you on?
21:55:05<nbarterd>but you need to wipe the .haskell_cache manually, correct?
21:55:27<alexj>nbarterd: only if you are trying to keep up minute by minute.
21:55:29<Saizan>alexj: debian/x86
21:56:03<nbarterd>does that mean that if you push a bad change and don't notice for several hours, your change could break my working application?
21:56:08<alexj>use --newest and it will check for new repos for all files more than 2 minutes old.
21:56:21<alexj>use --newer 3600 if you want one hour old.
21:56:23<alexj>etc.
21:56:47<alexj>nbarterd: yes it will break your app if you restart it.
21:56:56<alexj>you can also tell sp not to refresh once things are downloaded.
21:57:10<alexj>sp --newer 1000000000
21:58:09<nbarterd>i am groping towards a strategy
21:58:44<alexj>Saizan: daemonize should not block your thread indefinitely.
21:58:53<alexj>can you give more info about what is going on?
21:59:18<alexj>are you using recent code (by recent, I mean the updates from the weekend which fixed a zillion bugs in this stuff)
21:59:48<Saizan>alexj: well the application continue to work normally, but i get that message from the RTS
22:00:03<alexj>which ghc?
22:00:06<nbarterd>http://rafb.net/p/G7h3Ac64.html ... i ahve this cache in my working dir, which got created by sp. but I usually run without sp.
22:00:14<Saizan>alexj: yes, i've everything up to date
22:00:20<Saizan>6.6.1
22:00:28<alexj>saizan: weird.
22:00:45<alexj>can you put debugging in daemonize to figure out which thread is blocking? I am not seeing that message.
22:00:49<alexj>how are you starting up?
22:00:51<nbarterd>when the happs team claims there are some good fixes I darcs pull and install via cabal, and test my code without the include cache dir
22:01:09<nbarterd>if it's cool, I back up the cache dir and run sp.
22:01:21<Saizan>alexj: compiling with cabal and just calling Main
22:01:49<alexj>Saiazn: what does your Main look like?
22:02:16<Saizan>alexj: ah, sorry, i'm running the demo in HAppS-Begin
22:02:45<alexj>nbarterd: sp lets you define your own map files and override the default so you can have your sp point to the copies of HAppS repos that you maintain and trust.
22:03:15<nbarterd>yeah but locally I'm not working darcsy enough.
22:03:17<nbarterd>we use svn.
22:03:57<alexj>sp doesn't use darcs. it just pulls from urls.
22:04:28<nbarterd>how? don't understand.
22:04:29<alexj>this is the default map file that you can override http://searchpath.org/default.map
22:04:51<alexj>nothing in happs assumes darcs.
22:04:52<nbarterd>yes I got that... oh but sp does trigger something that results in darcs being run right?
22:04:58<alexj>no
22:05:06<alexj>sp just uses curl to pull from the urls.
22:05:26<nbarterd>but the url is generally the current darcs head.,
22:05:53<alexj>nbarterd: yeah, but you can make another url that is something else.
22:05:58<alexj>and use a mapfile that points to that URL.
22:06:12<alexj>you can give sp multiple map files so you can just override what you want.
22:06:14<nbarterd>i see.
22:06:19<alexj>it works like -i
22:06:35<alexj>Saizan: can you give me the exact set of steps you are using to see the threadblock?
22:09:51<alexj>nbarterd: where are you working?
22:10:25<Saizan>ah weird, i see that only if i run the Main that cabal has installed in /usr/local/bin, the one in ./dist/* works fine, so i guess is a permissions problem
22:10:52<nbarterd>new york
22:11:17<nbarterd>deutsche bank, 50th n park
22:11:26<nbarterd>yourself?
22:12:30<nbarterd>you know, this install is complaining about Text.XHtml
22:13:11<Saizan>nbarterd: add xhtml to build-depends if you're using cabal
22:13:22<nbarterd>claiming it's a member of package xhtml-3000.0.2 which is hidden. but it's not in parens with ghc-pkg
22:13:24<nbarterd>oh yeah, i forgot
22:13:26<nbarterd>about that
22:14:32<nbarterd>happs server and happs begin need their cabal file changed
22:19:18<shapr>What's missing?
22:19:29<shapr>Ah, xhtml?
22:20:51<Saizan>uhm, maybe a version of sp that uses darcs would be handy to develop happs, so you keep the repo in the right form but ghc can judge what to recompile
22:22:36<shapr>Or if cabal-install could take a directory of darcs repos as a package source
22:24:08<Saizan>yeah but for example if i rebuild and install HAppS-Server, then ghc doesn't necessarily refresh the binary when i go to rebuild -Begin
22:26:58<nbarterd>HApps-Begin still doesn't compile: http://rafb.net/p/ZGrUMf81.html
22:27:57<Saizan>that's because of the recent patches in HAppS-Server by Lemmih
22:28:46<nbarterd>so i should be rolling back happs-server bit by bit and eventually it'll work?
22:30:23<nbarterd>in happs server, the last change I see is alex, * added xhtml support
22:30:29<Saizan>Mon Oct 15 22:11:39 CEST 2007 Lemmih <lemmih@vo.com> * Generalize SimpleHTTP over any monad.
22:31:21<Saizan>which is before the patches on xhtml, and it seems you've to unpull them to unpull this one
22:31:22<nbarterd>alex, were you able to run the sample app in HApps-Begin ?
22:33:15<nbarterd>saizan, could you run that by me again in easier language?
22:33:25<nbarterd>what do I have to unpull then pull for this to work?
22:33:30<nbarterd>i've never unpulled anything before
22:35:34<Saizan>it's a bit hard.. since alex's patches to support xhtml depend on Lemmih's one, for what i see, so you need to unpull all of them, but then you lose xhtml support..
22:36:02<nbarterd>so there's no way I can magick darcs into letting me use alex's changes
22:36:24<nbarterd>so should I edit HApps-Begin?
22:36:32<nbarterd>and leave server alone?
22:37:43<Saizan>imho the thing to do is update HAppS-Begin to work with the generalized ServerPart if that is possible
22:38:10<nbarterd>by update, you mean "edit". make changes, in simple speak. right?
22:38:24<nbarterd>or something more darcsy?
22:38:29<Saizan>yes, edit
22:38:43<nbarterd>okay, lemme see if I can finagle it.
22:38:59<nbarterd>previously nonmonadic code needs to be made now monadic if I understand correctly.
22:40:10<Saizan>mmh, i'm not sure
22:43:33<nbarterd>if I comment out faceblog and blog it works
22:43:37<nbarterd>or at least it compiles
22:44:30<nbarterd>i'd argue that change should be pushed until these 2 fxs work again. to protect nubes out for a stroll with the last checkout of happs
22:44:54<nbarterd>oh shite
22:45:15<nbarterd>spoke to soon. undefined reference to (mess) again
22:45:26<nbarterd>in function eg s1hk6_info... ugh
22:46:14<Saizan>those are linking error
22:46:23<nbarterd>meaning ?
22:46:40<Saizan>i suggest a runghc Setup clean on all the repos
22:46:45<Saizan>and rebuild
22:47:35<Saizan>nbarterd: it means that those symbols are not defined in the binary form of the library you're linking in your executable
22:48:09<nbarterd>that's runghc Setup.hs clean; runghc setup.hs configure etc?
22:48:21<Saizan>yes
22:48:31<nbarterd>ok i'll try that
22:55:23<alexj>happs-begin works for me.
22:55:28<alexj>I am just using sp
22:58:23<nbarterd>have you tried it with sp grabbing for the newest as you explained before?
22:58:58<Saizan>i think the problem is that ghc didn't rebuild Faceblog/Blog because it doesn't check interpackage-deps
22:59:23<nbarterd>ah, so everything would have worked if i had done clean first
22:59:39<nbarterd>or if happs was n one big package as before
23:00:54<nbarterd>or if there was a clean arg to sp
23:01:29<alexj>sp --newest
23:01:54<nbarterd>has a "clean" type effect?
23:02:40<Saizan>do you need to clean with sp? ghc should be able to understand what to rebuild when given all the sources
23:03:14<nbarterd>well, if I were to adopt alex' way of workinhg
23:03:31<nbarterd>now I'm kind of with one foot in both
23:03:58<Saizan>i see
23:04:07<alexj>sp --newest checks if files are newer than two minutes old.
23:04:27<alexj>it pulls all files older than 2 minutes from the internet.
23:04:47<alexj>it is equivalent to sp --newer 120
23:07:18<nbarterd>i got my wish
23:07:30<nbarterd>formatted hello world!
23:07:52<nbarterd>much obliged alexj and co.
23:08:52<alexj>nbarterd, you are welcome. I still think for production apps you are better off with xslt.
23:09:11<alexj>html on a per-request basis does not make it easy e.g. to have a standard header on all your pages.
23:09:20<nbarterd>i'm open to doing as you think best but I just don't get it.
23:09:38<nbarterd>the only sample code that i saw that does this is the blog
23:09:47<nbarterd>function and that was too complicated for me to understand
23:10:08<nbarterd>particularly since I don't grok xslt
23:10:22<Saizan>maybe we could desing a better language than xslt, since the translation is done server-side
23:10:50<nbarterd>i want to know where the moving parts are and I can't tell from the code
23:11:19<nbarterd>i mean with regards to xslt. other things too but xslt in particular.
23:11:55<Saizan>moving parts?
23:12:21<nbarterd>in other words, where you have to make a change to get the effect you want.
23:12:56<nbarterd>in my case, if there had been an argument for "content type" somewhere -- or even a comment saying where you had to go to get it to be html i would have been ok.
23:13:51<alexj>nbarterd, how do you guys feel about passing a function of type Html->a->Html rather than returning Html directly?
23:14:31<nbarterd>you mean html the type or html, formatted text ?
23:14:50<nbarterd>confused.
23:14:53<alexj>I am thinking about how to define headers/footers.
23:15:26<alexj>I imaging that you define an Html object that contains you header and footer and that the handling of any request involves modification of that Html base type.
23:15:27<nbarterd>if you want it to be nube friendly you want something like #include
23:15:38<nbarterd>or whatever they call it in apache/php/etc
23:16:12<nbarterd>should allow you to include from a file... do it heredoc style (type in the html yourself) or something more fancy
23:16:14<alexj>xslt has include.
23:16:35<alexj>the reason for xslt is that it has all this functionality already.
23:16:35<nbarterd>xslt qua xslt, or xslt as used via happs?
23:16:45<alexj>you want to be in haskell so I was thinking about how to make that nice.
23:16:57<alexj>xslt qua xslt.
23:17:56<nbarterd>my impression is that most of the guys that have come along and tried to do a blog entry on happx v.whatever havent been able to get xslt work for them.
23:18:23<nbarterd>is there any tutorial that touches on this?
23:18:25<alexj>yeah, that is my impression as well. I think I need to make it more well documented.
23:19:04<nbarterd>definitely. but meanwhile, if you would provide a few mechanisms for those of us who aren't clued into xslt to do something useful with happs, you'll get a lot more users.
23:19:09<alexj>I am game to go pure haskell because I think it is easier for a lot of people.
23:19:18<Saizan>someone got in trouble with the Xml representation given via generics
23:19:29<alexj>Saizan?
23:19:31<nbarterd>i think a lot of us really want to try it but there are just so many things that should be dirt easy that aren't.
23:19:39<alexj>well lets make them easy.
23:19:49<alexj>part of the push this weekend was intended to make it much much easier.
23:19:57<alexj>e.g. main is now a lot simpler.
23:20:09<alexj>Components are not more modular. etc.
23:20:15<alexj>and a bunch of bugs were fixed.
23:20:24<alexj>but lets make it as easy as possible.
23:20:45<alexj>haskell is already a powerful transformation language.
23:21:27<alexj>so perhaps we should use haskell to transform types into html rather than xslt.
23:21:56<nbarterd>if you've done a lot of work doing something cool with xslt you shouldn't abandon it
23:22:12<alexj>I personally like xslt, but am not committed to it.
23:22:20<nbarterd>but you should realize that there's a lot of low hanging fruit going unharvested with regards to getting new users to try this
23:22:31<alexj>yup. so lets grab that fruit.
23:23:02<Saizan>alexj: e.g. nominolo had problems with things like data Foo a = F [a] [a] becuase there was no way in the xml to distinguish the two lists, also you need a lot of newtypes to get some descriptive tag name
23:23:17<nbarterd>i need to be able to spit out html without thinking about typing.
23:23:27<nbarterd>when i see the necessity to create a new instance i get scared.
23:24:07<nbarterd>i think there are things that make instancing in happs particularly opaque, but even if that wasn't the case...
23:24:09<alexj>nbarterd: now html and xhtml are fully supported so you don't have to worry anymore. the next step is to support templates so you can ge header/footer.
23:24:14<nbarterd>i like functional programming because of functions
23:24:21<nbarterd>not typing.
23:24:36<nbarterd>eventually i have to get the type stuff sorted out but for now i try to use it as little as possible
23:24:51<nbarterd>that makes happs pretty challenging to say the least
23:25:39<nbarterd>if you would just make heredoc easy it's solved
23:25:45<nbarterd>people can start using it today.
23:25:51<nbarterd>sure, there may be invalid html
23:25:55<nbarterd>but browsers are forgiving
23:26:31<nbarterd>with more people using it you'll start getting traffic on #happs and blog entries where people are bragging about things that they use that is better than heredoc.
23:26:33<nbarterd>\
23:27:05<Saizan>nbarterd: haskell in general is a LOT about typing, and from my experience to understand happs you've to understand the interaction of the typeclasses
23:27:48<nbarterd>i admit you are right but even my boss has problems with the haskell type stuff and he's had years doing this.
23:28:08<nbarterd>i mean the happs type stuff
23:28:54<nbarterd>he *likes* to abuse the haskell type system, as he says, but happs just has too many...
23:29:00<nbarterd>well look at it this way.
23:29:14<nbarterd>you made all these fixes this weekend, it's more modular, it's more easy to use.
23:29:25<nbarterd>so you say.
23:30:01<nbarterd>but even if the type stuff had stayed as convoluted as pre weekend
23:30:05<nbarterd>but i had heredoc
23:30:27<nbarterd>and when i "ok" a formatted html string it does what I expect
23:30:30<nbarterd>I'm having fun\
23:30:43<nbarterd>great, now I've got formatted html :)
23:30:51<Saizan>by heredoc you mean something like php? where you have inline html?
23:30:55<shapr>yay!
23:30:57<nbarterd>sure
23:31:07<nbarterd>people will USE it. even if it's not "the right thing"
23:31:57<nbarterd>i'd like a heredoc type tying. a "read from an actual file" type thing like you currently have with index.html
23:32:31<nbarterd>... yeah, can't think of anything else actually.
23:32:42<Saizan>so, basically Haskell Server Pages :)
23:32:52<nbarterd>if you say so.
23:32:55<nbarterd>perhaps the problem is
23:33:04<nbarterd>s/problem/issue/ :)
23:33:18<nbarterd>my boss really likes happs,
23:33:22<nbarterd>for whatever reason
23:33:36<nbarterd>and we've got lots built in it.
23:33:56<nbarterd>but he's frustrated with v.8.1 or whatever early thing he was using
23:34:33<nbarterd>i was supposed to get us upgraded to the latest and greatest
23:35:12<nbarterd>but it's been difficult due to all the changes
23:35:36<nbarterd>8.8 seems essentially "abandonware".
23:35:48<nbarterd>make a version to throw away, right?
23:35:57<nbarterd>but all the documentation, the little there is, is for that.
23:35:57<nbarterd>mess.
23:36:05<nbarterd>this is getting longwinded.
23:36:43<nbarterd>my point is that a little "worse is better" would really be good for me personally, at this point.
23:37:21<nbarterd>i've never tried hsp, and i think happs has more mindshare. more projects
23:37:25<nbarterd>being done in happs, seems.
23:37:47<nbarterd>i think this has to do with macid and speculations about magic bullets.
23:37:55<nbarterd>fine. maybe it even is a silver bullet.
23:38:57<nbarterd>but the silver bullets will become valuable to me at some future point, maybe it comes, maybe not.
23:39:11<nbarterd>it would be great if i had an app that actually needed S3 or whatever.
23:39:26<nbarterd>easy scaling, sure.
23:39:36<nbarterd>but what I need *today* is just, basically php.
23:39:45<nbarterd>except this office has committed to haskell. and happs.
23:39:53<nbarterd>which is good.
23:39:57<Saizan>implement php in haskell and you're done :)
23:40:03<nbarterd>not smart enough!
23:40:21<nbarterd>and i don't mean literally php.
23:40:33<nbarterd>i just mean the things that are nice about php that make it easy to start using it.
23:40:43<Saizan>heh, which interface would you like for this heredoc? would you permit the inline code to access the state?
23:40:55<nbarterd>hmmm...
23:41:14<nbarterd>my gut answer is no.
23:41:25<Saizan>mine too
23:41:37<nbarterd>you could have a rule: guys, if you want the magic bullet that comes with state
23:41:45<nbarterd>you have to suck it up and do things the "right way."
23:41:47<nbarterd>no more heredoc.
23:42:26<Saizan>i was thinking more like each page takes some input, like xslt takes an xml
23:42:38<nbarterd>templates?
23:42:47<nbarterd>or input for state?
23:42:58<Saizan>input for the templates
23:43:41<Saizan>and you can generate the input from the state using current technology, but you can also ignore it if you want
23:44:23<nbarterd>ignore the state you mean. ok.
23:44:30<Saizan>yes
23:44:56<nbarterd>i was barely able to grok the state stuff in 8.8. 9.1 I have no clue.
23:45:07<Saizan>i don't know if this would be any easier than using Text.Xhtml
23:46:31<nbarterd>it would be easier from the point of view of the new user.
23:46:46<nbarterd>everybody knows vanilla html.
23:46:51<nbarterd>you type it, you get a formatted page.
23:47:14<nbarterd>you make some templates, they do what you expect, instant gratification.
23:47:29<Saizan>yeah, but i generally dislike to write html :) i prefer the internal logic part
23:47:31<nbarterd>you then transition to using xhtml with renderHtml, which gives you a string.
23:47:57<nbarterd>then eventually you say, screw it, I'm going to do it the way the pros do, define a new instance or whatever.
23:48:04<nbarterd>but there's a much less steep learning curve.
23:48:41<nbarterd>a less steep learning curve for using state would also be most welcome.
23:49:35<nbarterd>but I'm less sure how I'd approach that.
23:50:04<Saizan>uhm
23:50:54<Saizan>this heredoc pages should refresh without needing to restart the server i imagine
23:51:11<nbarterd>if they're reading in a file via io, yes.
23:51:30<nbarterd>if heredoc from inside .hs file, no.
23:51:54<nbarterd>and again, this would provide a good learning path.
23:52:05<nbarterd>simple example for seeing how happs deals with and without io.
23:53:36<nbarterd>maybe my intuition is that if team happs would provide crude tools (heredoc), that would enable us less slick folks to get started with haskell
23:54:02<nbarterd>you'd get sharing on the wiki and the newsgroup and blogs of better ways to deal with the template stuff.
23:54:04<Saizan>but you don't want to reread the file via io every time.. also interpreting the code requires an haskell compiler/interpeter on the server
23:54:21<nbarterd>it depends.
23:54:37<nbarterd>happs already lets you read in from under the public dir in the example.
23:54:39<nbarterd>that's io.
23:54:40<nbarterd>so what.
23:54:51<nbarterd>for some purposes, it's the easiest fastest route.
23:55:32<nbarterd>purity is great but you shouldn't force it on people :)
23:55:34<Saizan>i mean reparsing it for every request is quite wasting
23:55:51<nbarterd>but what if you *do* want to change your template.
23:56:00<nbarterd>what if your app is slow to compile n load.
23:56:08<Saizan>i'm not talking about purity, your application is in the IO monad all the time :)
23:56:27<nbarterd>purity of templates though if i get your drift
23:57:08<Saizan>well more like efficiency, but maybe i'm overestimating the cost
23:57:11<nbarterd>maybe reparse every time is a waste but who cares.
23:57:17<nbarterd>totally.
23:57:42<nbarterd>when you notice a performance drag, you move the templates out of io and into stuff that loads up at compile.
23:58:07<nbarterd>but when you're just messing around with haskell -- or to be honest, 99% of what most websites do -- doesn't really matter.
23:58:37<nbarterd>most important point being it's easy to go from less to more pure.
23:58:41<nbarterd>that's what's so great about haskell, and happs.
23:59:19<nbarterd>haskell gives you the option. you're happy to know it's there. \
23:59:44<nbarterd>but if you're used to developing web apps in a certain way... why kill yourself doing things totally differently?
23:59:48<bran_>re: xslt, i think a separate template language is cool, but maybe xslt is kind of odd?

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