Tuesday, 2013-12-31

*** uncleserg has joined #storyboard02:21
*** uncleserg has quit IRC02:29
*** SergeyLukjanov has joined #storyboard04:35
*** SergeyLukjanov has quit IRC04:35
*** SergeyLukjanov has joined #storyboard04:37
*** SergeyLukjanov has quit IRC05:15
*** SergeyLukjanov has joined #storyboard05:16
*** SergeyLukjanov has quit IRC05:57
*** SergeyLukjanov has joined #storyboard07:49
*** SergeyLukjanov has quit IRC08:34
*** SergeyLukjanov has joined #storyboard11:10
*** SergeyLukjanov has quit IRC11:19
*** drdee has joined #storyboard12:20
*** SergeyLukjanov has joined #storyboard14:46
*** SergeyLukjanov has quit IRC14:53
*** drdee has quit IRC15:41
*** djelektronik has joined #storyboard15:49
*** djelektronik has quit IRC16:01
*** SergeyLukjanov has joined #storyboard16:34
*** SergeyLukjanov has quit IRC16:34
*** krotscheck has joined #storyboard17:34
mordredkrotscheck: any luck on any of the above ^^ sorry, I've been, well road tripping18:02
mordredalso, I ate a pig head last night18:02
krotscheckI saw. It looked tasty18:02
krotscheckReference project currently on github.18:03
krotscheckTrying to figure out how to structure a pecan/wsme and js project.18:03
mordredkrotscheck: I'd love to think further about how pbr can do more with building/minifying js artifacts at build/sdist time, btw18:03
krotscheckAnd rather frustrated.18:03
mordredah! well ... I can imagine that that probably sucks18:04
mordredyou want to put the pecan/wsme and the js in the same project?18:04
krotscheckIt's like starting from scratch without documentation.18:04
krotscheckWell, sortof.18:04
mordredyup. sounds lke it18:04
krotscheckSo, the actual client application doesn't really need any API layer.18:04
krotscheckWith one exception: The google scraper bot.18:04
mordredcan you explain "The google scraper bot" better assuming I'm stupid?18:05
krotscheckFor tickets to show up in google when someone searches for it, google's crawler needs to be able to find them18:05
mordredah18:05
krotscheckExcept google's crawler doesn't have a javascript engine.18:05
krotscheckBut they've published an API with which we can tell that crawler where to look.18:06
mordredso would that just be additional pecan/wsme api calls things non-authenticated?18:06
krotscheckPhilosophical separation: Client app should know about client app, api should not know about client app18:07
krotscheckSo the client app needs a really thin API layer that serves up that contant18:07
krotscheckcontent18:07
krotscheckBasically, the crawler recognizes that it's a javascript app via a header tag, and then says: Hey- , I'm just going to ask for the HTML using a querystring (?__encoded_url__=/my/hashbang/url18:07
krotscheckAnd it expects scrapable HTML in return.18:08
mordredgotcha. so ...18:08
krotscheckSo the client app needs a thin python layer that does this.18:08
mordredwhy not just put the python layer into the existing api app18:09
mordredis it purely that that would mean the api app would need to know something about he client app?18:09
krotscheckI'm not entirely happy with the idea of making the API do things that are related to a client.18:09
mordrednod18:09
krotscheckYeah, basically. Say we want to build a different javascrpit client that serves as a customer service portal.18:09
krotscheckSo now we have two clients consuming the same API... which of the two should the API serve up to google?18:10
mordredah18:10
mordredso - given the existence of the python app...18:10
mordredwhat would the thin python app be communicating with?18:10
mordredwould it make rest calls itself back to the api?18:11
krotscheckWell, it would make an HTTP call to itself - say, to get /#!/foo/bar, with a virtual browser environment.18:11
krotscheckIt waits for the JS to render, then dumps the resulting HTML and sends it back.18:12
mordredGOTIT18:12
mordredthat makes sense to me18:12
krotscheckThe docs is here: https://developers.google.com/webmasters/ajax-crawling/18:13
mordredso that app thing doesn't really need to know specifics about the client app per se - it just need to know which client app to proxy to18:13
krotscheckBasically, it just serves up HTML snapshots18:13
krotscheckExactly18:13
mordredok. SO - being mainly stupid and making knee-jerk suggestions ...18:14
krotscheckSo this could be a super easy library to write and just drop into a project.18:14
krotscheckAnd then reuse it whenever18:14
mordredI'd say that we just want a separate repo with a simple pecan/wsme app in it18:14
krotscheckI just don't know enough about python yet on how to do that.18:14
mordredand part of the "install js client" for production use stuff would be "also install one of these on the server"18:15
krotscheckSo, explain wsgi to me.18:15
mordredto get yourself started, you want to use cookiecutter to make yourself a new repo:18:15
mordredhttps://github.com/openstack-dev/cookiecutter18:15
mordredoh god. I have no idea how wsgi works - I generally wave my hands wildly and then run away and hope no one notices18:16
krotscheckFrom my understanding, request comes in to apache, apache checks its virtual hosts cnofig for request routing, then sends that request to the virtualenv of the app, and serves back what's received?18:16
mordredyes. that's basically it18:16
krotscheck'cause if that's the case, we can make ajax scrapability into a completely separate project.18:16
mordredyes18:16
mordredthat's what I'm thinking18:17
krotscheckAnd then I don't have to worry about it anymore18:17
krotscheckWell.18:17
krotscheckCool18:17
krotscheckOk18:17
krotscheckYou know, that's an EXCELLENT starter project for me to learn python18:17
krotscheckGiven that the JS reference project is already done18:17
mordredyes. very self-contained18:17
mordredoh - point me at the JS reference project?18:17
krotscheckhttps://github.com/krotscheck/storyboard-webclient18:18
mordredironic uses pecan/wsme, btw, so it might be possible to cargo-cult something about how that works18:18
krotscheckYou're on windows/18:18
krotscheck?18:18
mordredgod no18:19
mordredubuntu18:19
krotscheckThank goodness. Does your distro have a recent nodejs build?18:19
mordred0.10.15~dfsg1-418:20
mordredis that recent?18:20
krotscheckRecent enough18:20
mordredcool18:20
krotscheckDo you want to run it locally or do you just want me to host the client off of github pages for now?18:21
mordredoh - I just wanted to poke at it, because I know nothing about js toolchains18:21
* mordred is currently looking at jshint in your gruntfile and thinking that we should potentially use that to do with js stuff what we use pep8 for for python...18:21
krotscheckGot it.18:22
krotscheckLet me forward the install instructions to you18:22
mordredneat18:23
krotscheckI'm going to go rip out all the python specific stuff now.18:23
krotscheckOh, also, with clarkb I was able to get headless selenium tests running. Super sexy.18:23
mordredsweet!18:23
mordredI'm hoping that once we learn more about how to do some of these things with storyboard, we can apply the lessons back to horizon too18:24
krotscheckAnd jeblair suggested a way to get nodejs into our project without screwing with devstack-gate18:24
krotscheckOh, dude. Horizon is...18:24
mordredoh yeah? what was that?18:24
mordred:)18:24
krotscheckWell, they just sent a patch that sets the spaces to 2.18:25
krotscheckI'm like: Uh, what's wrong with pep8?18:25
mordredwait - horizon is moving to 2-space indentation? or just for their js?18:27
krotscheckJust for their JS18:27
krotscheckBecause "of how deeply nested javascript tends to be"18:27
krotscheck....18:28
mordredhrm18:28
mordredoh - so they're doing jshint tests in horizon/static/horizon/tests/jshint.js18:28
krotscheck... which is _sortof_ true, because it's a functional language and people tend to love to create functions that return functions that return functions...18:28
* mordred really needs to grok more about what they're doing18:29
krotscheck...but then you realize that for every nested closure, the JS engines actually create three memory references...18:29
mordredhaha18:29
krotscheck...for each nested nesting...18:29
krotscheck... and then you realize that maybe prototypical inheritance is the way you want to go.18:29
krotscheckblah blah i'm familiar with this language ego ego blah blah18:30
mordredyou sound lke me talking about mysql :)18:30
krotscheck:)18:33
mordredhow do I run jshint from the command line (I'm starting slowly here)18:38
mordredbtw - I do not need the ln  -s /usr/bin/nodejs /usr/bin/node step on ubuntu saucy18:39
krotscheckOh?18:39
krotscheckgrunt jshint18:39
krotscheckInteresting.18:39
krotscheckFor some reasno that was necessary on raring18:40
krotscheckBut then the ubuntu crowd and the node crowd usually don't see eye to eye18:40
mordredyah18:43
mordredneat! I have done that and it worked18:47
mordredand then I messed something up and verified that it was unhappy18:47
krotscheckSee, now I feel sheeping wasting a couple of days trying to make python and node behave together18:50
krotscheckNice!18:50
krotscheckTry grunt server18:50
krotscheckOr just go through individual commands in the Gruntfile.18:51
krotscheckThey should be reasonably well documented.18:51
mordredgrunt server gave me an error19:03
mordredGENERAL USE: $ recess [path] [options]19:03
mordredfwiw19:04
mordredoh - I seem to have not run bower install first19:05
mordredneat. that worked19:06
mordredI do not understand all of the tihngs that happened19:06
mordredbut things happened19:06
mordredkrotscheck: oh - so, another task to put on the plate potentially ...19:08
mordredkrotscheck: it looks like there are javascript unittest and/or testing framework things happening19:08
krotscheck...yes?19:09
krotscheckYou mean in my project, right?19:09
mordredyeah19:09
krotscheckRight, and those should be streamed, right?19:09
mordredyeah - or, I think what probably wants to happen is that we want to teach the thing that runs them how to output subunit19:09
krotscheckWell, karma's got reporter plugins we can work with. Clark seemed to be ok with the current junit output though19:10
mordredyeah. I think it's fine for right now19:10
krotschecks/work with/extend/19:10
mordredjust on down the road it would be neat if we could use testr to drive it - and as testr is a test runner runner, it _should_ all just magically work and stuff19:10
mordred(there's a lot going on here that I get to learn now)19:11
mordredneat. I have run unittest19:12
mordredI like this, it's fun19:12
krotschecktry grunt test:functional19:12
krotscheckand then grunt test:functional:headless19:12
mordredsweet19:13
mordredis it possible to run just a single test? or is it always the suite?19:13
krotscheckYes, I don't have that parameterized yet though.19:15
mordredalso - so 'grunt package' makes all of the files and puts them into /public, yeah?19:15
krotscheckWell, your versino does, yes.19:15
krotscheckI ripped that out, it'll put it into /dist instead (more in line with js conventinos)19:15
krotscheckBut anyway19:15
krotscheckSo, grunt compile creates a fully functional app, except it's not minified19:15
krotscheckgrunt package takes that app and minifies it19:15
mordredso in theory, a way of thinking about this would be that on a build host (wahatever that means) we could run grunt package, and the tar that up and deploying it onto the webserver is just deploying those files, yeah?19:16
* mordred working on wrapping head around the toolchain - so I might get some of the concepts wrong19:16
krotscheckYup19:16
mordredneat19:16
krotscheckThat output directory is hostable.19:16
krotscheckWe'll want to parameterize some configuration elements, like which API host to talk to.19:17
krotscheckBut that's basically it.19:17
mordredyah19:17
mordredI _think_ there are really great corrolaries to all of the things we do on the python side ot things19:17
mordredof19:17
mordredI'm not 100% that we _need_ all of those things, tbh19:17
krotscheckI'm curious on how we're going to run the client integration tests, since those'll require a running API.19:19
krotscheckI _suspect_ I can add a couple of calls in the gruntfile to set up a virtualenv with an install and just spin that up.19:20
mordredyeah. that's an option. or maybe parameterizing it so that the client integration would just expect a running api and we rely on jenkins/zuul to do that for us19:21
mordredI'm not sure which will be the thing that will ultimately be more betterer19:21
mordred(we'll want to be able to test changes to both things against each other - so we'll want to make sure that zuul can set up the git repos like it does for other integration things)19:22
mordredbut that would really just mean that even if we had grunt do the venv, we'd want to be able to tell it where to find the git repo with the api stuff19:22
mordredok. gotta run errands. but I'm excited - I feel like I'm learning a lot about things!19:24
krotscheckGo go.19:24
krotscheckGo forth and eat some cheese for me tonight.19:24
krotscheckSay hi to Ben for me :)19:24
mordredoh. I'm gonna eat cheese - and will say hey to ben19:24
*** krotscheck has quit IRC20:21
*** krotscheck has joined #storyboard21:41
*** krotscheck has quit IRC22:03
*** krotscheck has joined #storyboard22:05
*** krotscheck has quit IRC22:45
*** krotscheck has joined #storyboard22:49
mordredkrotscheck: around still?23:08
krotscheckNope.23:09
krotscheckI am a turing machine23:09
krotscheckWhat's up?23:09
krotscheck(fyi, did a commit --amend on the remote repo with a slightly different project structure now that I didn' tneed the python foo)23:09
krotscheck(No functinoal changes though)23:09
mordredkrotscheck: k. I'll fetch/reset23:09
mordredI have questions about accessbility via your js-client approach23:10
mordredas in - how does it fare with things such as screen readers or whatnot?23:10
krotscheckDepends on the annotations.23:10
mordredso, it's possible to write both good and bad apps wrt accessibility?23:11
krotscheck...and how old the screenreader is.23:11
krotscheckIndeed. The older screenreaders don't pay attention to DOM changes.23:11
krotscheckOr, well, they don't read modified content until they reach it.23:12
krotscheckDo we have statistics on launchpad re: screen readers?23:13
mordrednot to my knowledge - I think just having some conversations about wanting to make sure we understand the ramifications of technology choices23:14
krotscheckPoint.23:14
mordredand that we might, at some point, want to figure out how to get some screen reader testing figured out, to be good humans23:14
krotscheckYou know, if we've got the API out there to render and cache google-crawlable static versions, I don't think it's a far leap for us to create an entire shadow site that's no javascript static pages.23:15
krotscheckThat's the brute force, but doable, approach23:16
krotscheckMore subtle approaches would then be to make one of us sit down with a blindfold and a screenreader.23:17
krotscheckOne warning though: As I recall, most commercial screen readers are ActiveX based.23:19
krotscheckWait, I'm wrong23:20
krotscheckThe annoying ones are windows based because they're annoying. Apple's screen reader is baked into the OS.23:20
mordredew. activex23:29

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!