09:13:40 <ninegrid> hello
15:15:44 <stepcut> ninegrid: hello
16:44:25 <donri> ohai
17:08:38 <tazjin> Oh, the new platform is out
17:10:01 <stepcut> ooo
17:14:33 <Haskler> Hello
17:15:16 <stepcut> hello
17:16:12 <Haskler> I was wondering if you could help me with a Happstack + JMacro question?
17:16:27 <stepcut> definitely!
17:17:08 <Haskler> I can't seem to directly declare an object literal in jmacro.. like "var Options! = { zoom: zoom, center: latLng };"
17:17:18 <Haskler> I get a "Not in scope: `jhFromList'
17:17:22 <Haskler> error back
17:17:25 <stepcut> hmm
17:17:38 <stepcut> one moment
17:17:55 <donri> Haskler: the ! goes first IIRC
17:17:57 <donri> var !Options
17:18:15 <Haskler> ah.. even if I don't use the ! though, I get the same errror
17:18:17 <Haskler> *error
17:18:23 <donri> Haskler: did you import hjFromList?
17:18:40 <donri> jmacro generates code that needs some things imported to compile
17:20:53 <stepcut> this seems to work fine for me, http://hpaste.org/69461
17:21:36 <stepcut> but, if I use qualified imports like, import Language.Javascript.JMacro (renderJs, jmacro)
17:21:50 <stepcut> then I get errors about missing jhFromList, etc.
17:21:54 <Haskler> ah.. it seems to compile now if I add hjFromList
17:22:00 <Haskler> ><;;
17:22:03 <Haskler> thanks a lot
17:22:16 <stepcut> as donri says.. the quasi-quoter adds extra function calls. But it can't really add additional imports
17:22:24 <Haskler> been struggling with this for days T_T
17:22:37 <donri> also if you have template-haskell <2.7 you also need to import the types and constructors for the ast
17:22:41 <stepcut> so you have to do it by hand, or just import JMacro with out an explicit import list
17:22:49 <donri> for some reason that's handled magically by 2.7
17:23:27 <Haskler> is there a good resource for learning more about this stuff? I google'd around but its hard to find a lot of jmacro docs other than the wiki and the happstack crashcourse
17:23:52 <stepcut> Haskler: not yet. But I am adding a blub to the crash course on this right now :)
17:24:00 <Haskler> :D
17:24:10 <donri> blub?
17:25:20 <stepcut> blurb
17:30:00 <donri> blurb?
17:30:55 <stepcut> hmm. actually, I guess that is incorrect usage of the term
17:31:09 <donri> ACTION not native english speaker :)
17:31:09 <stepcut> "blurb - A brief publicity notice, as on a book jacket."
17:31:21 <stepcut> that is not what I did :)
17:31:33 <stepcut> I added a paragraph talking about import lists
17:32:17 <donri> :)
17:32:54 <donri> https://github.com/dag/happstack-yui/blob/master/src/Happstack/Server/YUI.hs#L47
17:35:51 <stepcut> :)
17:40:59 <stepcut> ok, added a paragraph to the jmacro chapter right before the import list, http://www.happstack.com/docs/crashcourse/Templates.html#jmacro
17:41:55 <donri> same applies to hsx
17:42:01 <donri> (but not harp: it adds its own imports)
17:42:34 <donri> stepcut: build yui docs? pretty please, sugar on top?
17:46:49 <Haskler> I noticed that when I ran your code, I get "Options = { 'center': latLng, 'zoom': zoom };"
17:47:02 <Haskler> is it possible to make it so 'center' doesn't have ' symbols?
17:51:23 <stepcut> do they mean something different ?
17:54:31 <Haskler> basically, I'm trying to use the google maps api through jmacro.. but when I copy paste the simple api example into jmacro and reword it, it doesn't render
17:54:35 <Haskler> https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple
17:56:49 <stepcut> are you using chrome?
17:57:18 <Haskler> firefox
17:57:29 <stepcut> are you using firebug ?
17:57:41 <Haskler> nope
17:58:13 <stepcut> personally.. I would use chrome, and then hit F12 to bring up the developer console so you can see javascript errors, etc..
17:58:24 <stepcut> unless you are already using something similar
18:02:54 <Haskler> k, thanks for the advice
18:03:05 <Haskler> so far I've seemed to rule out jmacro generated code as the issue
18:03:15 <ninegrid> so whats the general consensus regarding compiling haskell to javascript
18:03:49 <stepcut> ninegrid: no consensus!
18:03:58 <ninegrid> then your preference?
18:04:39 <stepcut> ninegrid: depends what you are trying to do. Haskell-to-JS is nifty if you can live in a closed Haskell eco-system on the client side. But interfacing with existing javascript libraries on the client side is not very fun
18:05:34 <donri> Haskler: adding ' only makes it safer
18:05:37 <stepcut> ninegrid: elm looks interesting as a Haskell-like language which targets javascript.. works with Happstack with no special support. There is a link around somewhere to a simple demo
18:06:08 <donri> Haskler: if you want to set it to the value of a center variable, you can't use object literal notation AFAIK
18:07:34 <stepcut> https://github.com/tazjin/Elm/blob/master/Examples/elm-happstack/Main.hs
18:07:56 <ninegrid> stepcut: thank you.  i come from the .net world (the F# language for the most part) and it has interesting projects itself for compiling to javascript.  I considered using ruby for web development but haskell is a better language for me...
18:08:34 <ninegrid> brb
18:08:40 <stepcut> ninegrid: there is also work on ghcjs, which uses ghc to compile to javascript. and some other projects which compile a subset of Haskell to javascript
18:08:49 <stepcut> but everything is still experimental at the moment
18:08:59 <stepcut> perhaps 6 months to a year
18:09:13 <donri> i say compiling to js is interesting for largely client-side and js-heavy apps
18:09:53 <stepcut> I am all in favor of not writing javascript code by hand :)
18:10:09 <donri> but jmacro is probably better for simple call-into-some-library kind of things for more traditional server-backed apps
18:12:28 <donri> stepcut: yui is commented with type information (for api docs) that could probably be used to generate ffi bindings in something like ghcjs... re "But interfacing with existing javascript libraries on the client side is not very fun"
18:12:38 <donri> i'll bet jquery has something similar too
18:13:56 <donri> still, it's going to be somewhat unnatural i guess
18:14:31 <Haskler> finally! I've got it working!
18:14:53 <donri> like, libs are designed for passing object literals to functions for configuration...
18:15:22 <Haskler> the problem was that I was feeding a <div> tag to the toResponse <$> defaultTemplate "" part of the code for the body, which wrapped the map div inside another div
18:15:36 <Haskler> using <%> and </%> instead for the body fixed everything
18:15:57 <Haskler> ><;
18:16:00 <donri> :)
18:16:06 <Haskler> thanks a lot
18:17:03 <stepcut> no problem
18:17:27 <Haskler> speaking of javascript, there's a funny short talk on ruby & javascript ( https://www.destroyallsoftware.com/talks/wat ) it made me LOL
18:17:45 <donri> nananana
18:17:53 <Haskler> :D
18:20:21 <Haskler> what's the difference between [jmacro| and [$jmacro| ?
18:20:35 <donri> the latter works with older ghcs and haskell-src-exts
18:21:04 <donri> and spews a deprecation warning in more recent ghcs
18:21:38 <Haskler>     Warning: Deprecated syntax:
18:21:39 <Haskler>                quasiquotes no longer need a dollar sign: $jmacro
18:21:41 <Haskler> ah.. I see
18:21:42 <donri> the latter is also useful if you're from a perl background and can't read code unless it looks like <% [$jmacro| ... |] %>
18:21:59 <stepcut> ACTION should probably update the tutorial now that [jmacro| |] works
18:22:19 <donri> stepcut: and DecQ without $()
18:23:05 <stepcut> http://www.happstack.com/docs/happstack-yui-7351.4.1/doc/html/happstack-yui/index.html
18:23:08 <donri> yay
18:23:16 <stepcut> I like DecQ and $()
18:23:21 <donri> it shows hidden modules?
18:23:37 <stepcut> I think I may have mentioned it in the docs though (not needing $()
18:23:47 <stepcut> it ?
18:23:52 <stepcut> i just ran haddock
18:23:55 <donri> haddocks on happstack.com
18:24:05 <donri> ah you don't call into cabal
18:24:22 <stepcut> I don't ?
18:24:29 <stepcut> let me rephrase
18:24:35 <stepcut> I use cabal haddock to build the docs
18:24:42 <donri> hm, weird
18:24:49 <donri> Bundle and Paths are hidden modules
18:24:52 <donri> "other-modules"
18:25:12 <ninegrid> stepcut: in F# there are a couple projects that address it, one being websharper, the other being pit...
18:27:53 <stepcut> donri: apparently I call --internal.. maybe that is what is doing it
18:28:18 <donri> yea that sounds likely
18:28:40 <stepcut> donri: I think I was hoping that wouldn't show up in the overview
18:29:05 <donri> ah yea because happstack-server links to some internal modules otherwise hidden
18:29:07 <donri> IIRC
18:29:17 <donri> which 404's on hackage
18:30:14 <stepcut> yeah
18:30:30 <stepcut> I like to be able to get to all the source via the haddock docs
18:30:53 <stepcut> sometimes you have to chase things pretty deep to find out what is going on
18:31:02 <stepcut> but.. it would be nice if it was a bit more hidden
18:32:18 <donri> maybe first build once with --internal then once without? :D
18:36:43 <stepcut> uh
18:36:51 <stepcut> I'm going to go to a BBQ instead
18:36:59 <stepcut> we can work this out as part of the GSoC project :)
18:37:31 <donri> :)
18:37:41 <donri> when does gsoc "start"?
18:37:52 <donri> i've probably asked before
18:38:36 <stepcut> May 21
18:51:22 <donri> have fun at bbq