00:10:34 <mekeor> goodbye. see you.
00:45:51 <tazjin> Is there any short documentation on how to get hslogger up and running?
00:49:02 <donri> tazjin: https://github.com/dag/happaste/blob/master/src/Main.hs does that help?
00:49:35 <tazjin> Yep, thanks.
00:50:38 <donri> tazjin: http://darcsden.com/dag/happstack/browse/happstack-init/templates/project/src/Logger.hs
00:53:50 <tazjin> I think it wouldn't hurt to have a small chapter about this in the crash course
00:54:40 <donri> agreed, but i think stepcut wants to replace hslogger eventually
00:55:43 <tazjin> Well, that would be even better :P
02:49:04 <stepcut> tazjin: I would happly apply a patch to add a chapter on hslogger.. though i do want to try to get  rid of it in happstack 8
02:50:13 <tazjin> stepcut: Well, I would write a temporary chapter for it - but I don't have any experience using it so I don't even know if I'd get done with that before you release happstack 8 :P
02:50:57 <stepcut> :)
03:34:31 <dsfox> ghc builds faster on the thinkpad x220 than on my desktop
03:34:56 <dsfox> oops, wrong room
03:35:15 <stepcut> :)
03:35:46 <stepcut> dsfox: everyone in that room is in this room as well .. and more!
03:39:11 <dsfox> yeah, but only a few know how many cpus are in my desktop
03:40:20 <stepcut> :)
03:40:28 <stepcut> ACTION has no idea
04:06:03 <dsfox> I thought computers had stopped getting faster.
04:06:28 <stepcut> certain parts have
04:07:05 <stepcut> the CPU frequency isn't going up much.. but they are figuring out how to remove other bottlenecks I think
04:07:21 <stepcut> now it is all talk about north bridges or something
04:07:43 <dsfox> http://www.technologyreview.com/business/40016/?ref=rss
04:12:32 <stepcut> yeah
11:57:23 <mekeor> how do you test how many requests/second your happslication can serve?
12:15:38 <donri> ab, httperf
12:18:05 <mekeor> yea, ab is nice and simple. httperf is powerful but complex. just discussed that on #haskell-blah, too. thanks anyway.
12:26:38 <donri> you might want to compile with something like -O2 -rtsopts -with-rtsopts=-N -threaded
12:29:18 <mekeor> donri: what does that do?
12:30:09 <mekeor> donri: do i have to launch the server-application with special command-line arguments then, too?
12:40:36 <donri> ghc <opts> app.hs; ./app
12:41:07 <donri> most people use cabal but you seem to be using runhaskell?
12:41:58 <donri> which is fine, but cabal is better once you have multiple modules, need to manage dependencies and want to configure builds flags etc
12:43:25 <donri> -O2 enables the second level of optimizations, -threaded builds with the multicore runtime and the rest specify the number of cores (in this case "all available cores")
12:44:19 <mekeor> donri: i use makefile atm.
12:45:31 <mekeor> donri: unfortunately, my server only has once core. so, probably this won't have an effect. but anyway, i will use it.
14:28:38 <stepcut> mekeor: the docs show how to bind to port 80 and then drop root privs, http://www.happstack.com/docs/happstack-server-7.0.0/doc/html/happstack-server/Happstack-Server-SimpleHTTP.html#v:simpleHTTPWithSocket
14:30:16 <stepcut> mekeor: httperf is the usual tool of choice.. but it can be tricky to get the right options to actually get good results. generally people use the options, --num-conns=100 --num-calls=1000 --burst-length=20 --rate=1000 --hog
14:31:04 <stepcut> but .. I am pretty sure no browser every makes 1000 calls over a single connection.. so those numbers are a bit  bogus
14:31:19 <mekeor> stepcut: cool. that's great.
14:31:53 <mekeor> i mean, dropping root privs.
14:33:46 <mekeor> stepcut: but anyway. i'd still have to launch the happ with root-privs, right?
14:42:36 <tazjin> I use the tool privbind to run Happstack on port 80 without giving the process root-privs
14:42:41 <tazjin> Works nicely
17:22:41 <luite> hmm that's interesting, is that linux only?
17:24:57 <mekeor> luite: DO YOU USE WINDOWS?
17:27:34 <luite> well sometimes, but my Windows PC is dead... but I think the issue is irrelevant for windows actually, i think it doesn't have the port bind restriction at all?
17:28:01 <luite> but for development i usually have a combination of linux and os x
17:28:29 <mekeor> i think so, too. also, windows doesn't have a strong user/group-system as linux, AFAIK. does it?
17:28:32 <luite> (where linux is by far the best for haskell)
17:28:40 <mekeor> ACTION agrees.
17:29:21 <luite> uh, windows does have users and groups, and quite a detailed policy system
17:30:02 <luite> but I don't know that much about the details, so I can't say whether one is stronger that the other
17:30:18 <mekeor> luite: i think it depends on the windows version. windows 7 doesn't have a bad user-policy but xp and older have.
17:30:44 <mekeor> me neither. let's just stop that discussion. i hate windows.
17:31:24 <luite> oh I'm not sure that they actually added much to the users/groups themselves, but yes you do log in as a less priviledged user by default in 7
17:31:58 <mekeor> ok.
17:32:58 <luite> OS X 10.8 might not be supported by ghc for a while
17:33:24 <luite> unless apple changes the linker behaviour from the beta version
17:33:43 <donri> luite: oh dear yesod list just had me realize julius is much much *worse* than i previously thought. why don't you guys use jmacro?
17:34:04 <donri> accept jmacro into your heart as your lord and savior
17:34:26 <stepkut> yeah.. in fact, why not use, happstack+hsx+jmacro+web-routes :p
17:34:27 <luite> donri: right, the security implications of the interpolation?
17:34:34 <donri> stepkut: agreed! ;)
17:34:34 <mekeor> donri: what's julius?
17:34:56 <donri> mekeor: yesod's answer to javascript "templating"
17:35:04 <mekeor> hsx?
17:35:09 <mekeor> jmacro?
17:35:19 <donri> yes, like jmacro (but nothing like jmacro)
17:35:27 <mekeor> heh
17:35:27 <stepkut> mekeor: hsx is a system that allows you to embed literal XML markup inside Haskell code
17:35:41 <mekeor> hm, okay.... hmm.
17:35:53 <donri> basically julius is just string interpolation as seen in ruby/perl etc
17:35:56 <mekeor> http://hackage.haskell.org/package/hsx
17:36:06 <stepkut> mekeor: jmacro allows you to embed literal javascript into your Haskell documents. Or do javascript generation, embed Haskell values into javascript, etc
17:36:35 <mekeor> neat.
17:36:44 <mekeor> http://hackage.haskell.org/package/jmacro
17:36:48 <luite> donri: right, except that it runs the generated string through a minifier and combines the fragments in one script
17:36:54 <mekeor> @package hsx-jmacro -- what is that??
17:36:54 <lambdabot> http://hackage.haskell.org/package/hsx-jmacro -- what is that??
17:37:22 <mekeor> http://hackage.haskell.org/package/jmacro is undocumented ;(
17:37:52 <mekeor> ACTION has to learn much.
17:38:07 <luite> donri: but I agree that something could and should be done about this, it's far less secure by default than hamlet, and that's not obvious to new users at all
17:38:34 <donri> stepkut: though i think hsx *does* provide the same thing as julius? <script>alert("oh dear <% "\"); yay code injection!; \"" %></script>
17:39:30 <stepkut> mekeor: http://www.happstack.com/docs/crashcourse/Templates.html#jmacro
17:39:38 <donri> actually scratch that, <% %> is safer than #{}
17:39:43 <stepkut> donri: :)
17:39:47 <luite> donri: have you worked with jmacro? does it support easy interpolation?
17:40:00 <donri> luite: sure?
17:40:07 <stepkut> luite: http://www.happstack.com/docs/crashcourse/Templates.html#jmacro-antiquotes
17:40:23 <donri> easi*er* than julius even because you get a haskell type class and access to generated variable names
17:41:29 <luite> stepkut: hm, I skimmed that page, but don't see it
17:41:53 <stepkut> luite: what do you mean by interpolation?
17:43:06 <stepkut> weather <- liftIO $ randomRIO ((Weather minBound (-40)), (Weather maxBound 100))
17:43:10 <stepkut> var w = `(weather)`;
17:43:34 <luite> stepkut: say you have mkF = [jmacro| f = function(x) { return x+1; } |], but actually you want f n = [jmacro| f = function(x) { return x+#{n}; } |]
17:43:40 <luite> the latter is made-up syntax
17:43:50 <luite> is something like that possible with jmacro?
17:44:09 <donri> x + `(n)`
17:44:12 <stepkut> f n = [jmacro| f = function(x) { return x+`(n)`; } |]
17:44:16 <luite> ah, tnx
17:44:47 <donri> [jmacro| var f = \x -> x + `(n)` |]  ;)
17:44:54 <donri> yay syntax sugar
17:45:23 <luite> what type must n have?
17:45:36 <donri> ToJExpr a => a
17:45:52 <stepkut> luite: http://www.happstack.com/docs/crashcourse/Templates.html#jmacro-tojexpr
17:46:37 <mekeor> all those libraries which allow to include literate FOOBAR-code into haskell-code are written using template-haskell, right? or, how are they implemented? how does that work??
17:46:47 <mekeor> i mean, internally..
17:47:17 <donri> mekeor: [bla| |] is QuasiQuotes which is part of TemplateHaskell
17:47:32 <mekeor> ah
17:47:33 <donri> mekeor: hsx though is a preprocessor
17:48:18 <mekeor> oh. that's not good.
17:48:37 <donri> it has some issues yes, though a lot of them were fixed recently
17:48:54 <luite> stepkut: tnx, looks promising. I hope that jmacro exposes some of its parser internals so that it's easier to make a drop-in replacement
17:49:01 <donri> the preprocessor now understands haskell2010 and most (all?) ghc extensions
17:50:20 <stepkut> donri: I think it understands everything, except maybe some stuff introduced in 7.4.. like those new type class alias things?
17:50:36 <stepkut> donri: though, maybe it supports that too.. I have not tried
17:50:48 <luite> donri: are you dag.odenhall@gmail.com ?
17:51:17 <donri> maybe :$
17:52:00 <mekeor> the maker of pandoc, texmath and gitit (John MacFarlane) is a philosophy-professor. wtf?
17:52:12 <donri> that explains the gpl
17:52:15 <donri> ACTION ducks
17:52:19 <mekeor> hehe :D
17:52:28 <donri> isn't the darcs creator some physicist
17:53:01 <mekeor> Lemmih: oh. *you* are JGM, right? oO
17:53:39 <donri> isn't the creators of haskell some alien overlords with intelligence and productivity far superior to the collective capacity of the human race?
17:53:50 <mekeor> i seem to mix up people. howbeit.
17:56:14 <parcs`> what is surprising about that
17:57:03 <mekeor> parcs`: idk. i wouldn't expect that.
17:59:39 <stepkut> donri: .. and a fondess for comic sans
18:02:11 <donri> hah
18:02:46 <donri> spj?
18:03:35 <luite> donri: anyway I think jmacro's approach is good, the safety of hamlet comes from knowledge of the tag structure, but it's not possible to implement route interpolation with @{...} directly, so it might require a few changes
18:04:35 <luite> but maybe inserting things as JSON values would work just as well, not sure
18:08:20 <donri> luite: make a ToJExpr instance for your routing type?
18:08:26 <Lemmih> JGM?
18:08:42 <luite> donri: the problem is that that isn't pure
18:09:27 <stepkut> luite: yeah
18:09:32 <donri> ah yea
18:10:03 <donri> would be nice if ToJ* were monadic
18:10:18 <donri> i think i wanted that at some point?
18:10:38 <stepkut> donri: seems plausable to implement..
18:11:18 <luite> donri: hmm, that would make the return value monadic, perhaps a jmacrom quasiquoter would be better, keeping the existing pure one?
18:12:00 <donri> sure, somesuch
18:12:54 <donri> or just an Identity wrapper or something
18:12:56 <luite> but I'm still not sure that this would actually solve the problem mentioned on the mailing list better than the proposal for json values in julius
18:13:18 <stepkut> my work-around is to call, do somePath <- showURL SomePath, and then `(somePath)`. Which is not too bad.
18:13:27 <donri> shrug, i think jmacro brings more to the table. but porting julius to it would be a big change probably.
18:13:43 <donri> stepkut: but it's not superawesomely ultracute :(
18:13:56 <stepkut> actually
18:13:58 <stepkut> you could do:
18:14:14 <luite> donri: yeah the additional jmacro functionality would be nice anyway, but then it would be better to have a second quasiquoter
18:14:15 <stepkut> do showFn <- askRouteFn
18:14:32 <stepkut> and then do, var url = `(showFn SomePath [])`;
18:15:16 <luite> right, that's more or less what yesod does with the extra @{ } syntax
18:15:24 <donri> luite: hey what minifier does julius use? can't see a dependency
18:15:30 <luite> donri: hjsmin
18:16:14 <donri> hjsmin could use some love too :(
18:16:21 <luite> looks like the actual minification is done a bit further down the pipeline
18:16:48 <luite> the widget code that combines the scripts and caches the result probably does the minification
18:16:51 <donri> hjsmin basically just strips redundant whitespace
18:17:12 <luite> right, actually having a javascript AST also makes minification a bit easier
18:17:30 <donri> well hjsmin does parse js
18:18:21 <donri> though you can get some "minification" directly out of jmacro because it renders into a pretty Doc that you can render in one line mode
18:18:44 <donri> but that still adds some redundant whitespace
18:19:18 <donri> and a smarter minifier can do things like shorten (privately scoped) variable names
18:19:44 <stepkut> donri: but, using the gzip compression filter should remove the redundancy anyway?
18:19:54 <donri> some even automatically reduce code duplication i think...
18:20:07 <luite> stepkut: you can rename lots of local variables to 'a' with a good minifier
18:20:32 <donri> stepkut: that sounds true intuitively but the numbers seem to disagree (though haven't looked into it *that* closely)
18:20:38 <luite> or remove dead code entirely
18:20:49 <donri> that is, first minifying improves the overall compression
18:20:57 <donri> (noticably)
18:21:22 <stepkut> luite: try
18:21:24 <stepkut> luite: true
18:21:38 <donri> catch lie
18:21:41 <luite> :)
18:21:49 <stepkut> a native minifier for jmacro would be neat
18:21:53 <stepkut> I'll add it to the list
18:21:56 <donri> :)
18:22:19 <luite> yeah that would be interesting. though I think for yesod, that would still require it to parse everything twice
18:22:58 <donri> if you do integrate jmacro you really should let it handle the "concatting" so the lexical scoping works properly
18:23:01 <luite> otherwise you're stuck with requiring jmacro AST as the type for javascript in widgets, I'm not sure that's desirable
18:23:24 <donri> you could have a ToJavascript class :P
18:23:40 <donri> JSRenderable
18:23:59 <luite> probably better to have some AST JSData = JMacro ... | JSText ...
18:24:23 <donri> but extensibility!!1
18:26:29 <luite> hm, not sure about that, you could have typeclasses everywhere but they should add enough value
18:26:39 <stepkut> http://code.google.com/p/happstack/wiki/JMacroWishlist
18:28:11 <alpounet> you'll soon need a wiki on its own for wishlists
18:28:51 <stepkut> alpounet: :)
18:37:55 <luite> donri: hm I'm afraid the result would be sligthy incompatible with julius, guess a new name would be in order, juliet maybe, or are there other "shakesperean" names with a j?
18:38:06 <luite> pearean
18:50:59 <stepkut> yesod-jmacro?
18:51:01 <stepkut> ;)
18:52:47 <luite> well, shakespeare-jmacro could be a package name, but the quasiquoters all need to have 'cute' names from shakespeare, like julius,hamlet,cassius,lucius
18:53:55 <stepkut> jmacrius
18:55:41 <luite> hehe from an undiscovered play? :p
18:57:08 <stepkut> not to be confused with j. mascis the guitarist/songwriter
19:05:46 <alpounet> luite, or just make up some name and write a play in the shakespearean style to justify that
19:54:57 <donri> luite: https://en.wikipedia.org/wiki/Shakespeare_Characters#J
19:55:30 <luite> hehe thanks
19:55:40 <luite> enough names for a few more revisions ;p
19:55:56 <donri> just don't go with "juno" xD
19:57:01 <luite> why not?
19:57:23 <donri> makes you think of the movie
19:57:30 <donri> how about macbeth
19:57:33 <luite> haven't seen it
19:57:33 <donri> "jmac...beth"
19:57:40 <luite> haha
19:57:56 <luite> not beth ;p
20:36:57 <mekeor> :D