IRC Logs for #cmvt Tuesday, 2013-04-30

prologicso today I'm going to try and make my play books work on nectar vm00:06
prologicwhat are you working on?00:06
prologicif I finish that up easily/quickly00:06
prologicI'll work on fixing the backend and it's version stuff00:06
DanielBairdsry standup now.. bbl00:06
prologicyou back?00:42
DanielBairdback (also had a "lifting things" session to attend)01:10
DanielBairdtoday I'm getting d3 wrangled.01:10
DanielBairdit's surprisingly low level01:10
DanielBairdas in, it's not su much a graphing library as a dom/data linking library01:11
DanielBairdso all the actual graphing you do manually with SVG01:11
DanielBairdthen you link your data array to the svg elements so they get adjusted to the right size and position01:12
DanielBairdnot sure how supported svg is across IEs, but meh problem for later01:12
prologicit'll work at least for IE9+01:17
prologicI don't care for this application to work on anything less01:17
prologicsimply because I'm aware of how poor IE < 9 is with processing JSON01:17
DanielBairdagree, and chrome frame might be enough for the poor corporate prisoners01:21
DanielBairdit's the ie-to-os lockin that is the problem01:21
DanielBairdif you're running on XP, can you even get ie9?01:22
DanielBairdgoogle says no.  so chrome frame for those guys01:24
prologicoh well01:35
prologicI'm not sure that our target audience would necessarily be Windows XP users in strictly controlled corporations :)01:36
DanielBairdthey'll have IT departments though.  but i agree, academics are more likely to have their own say over their hardware02:04
DanielBairdi remember a friend who worked at a city council, when IE 6 came out, had to work out a deployment strategy to get it onto their Windows 3.11 machines :)02:04
prologictesting the deploy on a nectar vm now03:17
ircnotifier52fa0ee894e0 by prologic: Updated shebang(s) to usr /usr/bin/env python2.7 explicitly and to call python2.7 explicitly04:36
ircnotifier0502e6f51d68 by prologic: Fixed pip command in bootstrap05:20
prologicI hope you don't feel too badly about the AngularJS thing :)05:56
prologicHow do you feel about utilizing RequireJS to help structure better code though?05:56
prologicI think I've almost convinced Gerhard it's probably a good thing05:56
prologicit seems to satisfy all his requirements05:57
prologicadds value05:57
prologicshallow learning curve05:57
DanielBairdi've used requirejs before.. it does want your code in a special form05:57
DanielBairdin the end you're supposed to use their compiler to roll it all into one big file05:57
DanielBairdbut yes i'm for it. i don't often get code loading ordering problems but whe you do they're fricking terrible to debug05:58
prologicrequireje implements AMD (loading) and the module pattern05:59
prologicwhich are two quite standard things05:59
prologicand well accepted ihmo05:59
DanielBairdon the project I worked on it was a bit of a fuckaround getting the 3rd party libraries to work in requirejs though.. i think it was backbone and underscore.  mostly because they had been made require-compatible in the past (when the docs were written) but that had been retracted just before the latest release05:59
prologicat least our javascript code will/should be modular06:00
prologicyes this was my experience too06:00
prologicwe tried to use requirejjs + dojo06:00
prologicoh sorry that worked well06:00
prologicwhat didn't was requirejs + dojo + esri arcgis ja api06:00
prologicthe 3rd party part kinda was a bit awful06:00
prologicbut somehow we managed it in the end06:00
prologicI know requirejs + jquery play nice06:01
prologicI guess it depends whether d3 does too06:01
prologicand leaflet06:01
DanielBairdwas this recently?  there was some new way to shim 3rd party stuff in, or something.06:01
prologicit was about 18months ago or so06:01
DanielBairdi'll have to go back to the require docs06:01
DanielBairdyeah there's something newer than that i think06:01
prologicyeah looks like we'd have to shim d3/leaflet in06:08
prologicmaybe requires isn't such a good idea06:08
prologicon the other hand06:10
prologicrequiresjs is good06:10
prologicbecause it means we can only use parts of the libraries we're actually using06:10
prologicmeaning the resulting app.js06:10
prologicis often smaller06:10
prologicI remember why it's good to use requirejs06:10
prologicand AMD06:10
DanielBairdi like require but we're probably okay without it, particularly since we already have a compilation step pasting all our js together.06:12
prologiclooks like Leaflet is AMD compatible now06:12
prologicat least 7 days ago06:12
DanielBairdi'm just looking at the commit that did it.. will that work in require?  amd doesn't necessarily mean requirejs, right06:14
prologicit's not just about compiling javascript and minifying it down to a single file06:14
DanielBairdoh no it's fine, i see the thingy06:14
prologicrequirejs/amd offers better structured code06:14
prologicmodule pattenr ;)06:14
DanielBairdthey test for the define function, and use it if it's there06:15
prologicyeah it will work06:15
prologicwhich is fine06:15
prologicwhen requirejs's and loader loads leaflet06:15
prologicit evaluates the javascript06:15
prologicessentially running it06:15
prologicbecause define will be defined as a function06:15
prologicleaflet gets exported as a proper module06:15
DanielBairdbut it looks like they still set window.L at the end.  which i think is probablty against policy for a well-behaved require lib06:16
prologicand all is well in the softwaresphere06:16
DanielBairdwon't stop it from working with require anyway, it's just more namespace-leaky than it should be06:17
prologicstrictly speaking that doesn't matter I don't think06:17
prologicyou could delete it06:17
prologicin the loader callback06:17
DanielBairdanyway.. that's edge Leaflet, might be a bit risky06:18
prologicbtw are you set on using coffee script to write your javascript? :)06:19
prologicgerhard and I both don't like some aspects of coffee script either06:19
prologicsome aspects are good06:19
prologicbut others like the way it defines functions are awful06:19
prologicreminds me of ML06:19
DanielBairdlol you don't like the arrow?06:19
prologicor other functional languages06:19
prologicuggh :)06:19
prologicnot at all :)06:19
prologicit gets confusing very quickly06:19
prologicespecially for a vision impaired guy :)06:20
prologicdef foo(a, b, c):06:20
prologic   ...06:20
prologicis far more readable than coffee script's version06:20
DanielBairdfor stuff like the d3 wrangler, i'm definitely going to use coffee.  it's not so important for the rest of the site06:20
prologicfair enough06:20
prologicI saw some of the coffeescript you wrote initially06:21
prologicit'll take some getting used to06:21
DanielBairdI'd've thought you'd be okay with06:21
DanielBairdfoo = (a,b,c) ->06:21
DanielBairdas a pretty close analog to python's defs06:21
DanielBairdmost of the coffee in the current code is a line-by-line rewrite of some other guy's leaflet angular connector.  it's not a very good example of coffeescript you'd actually write yourself06:22
prologicnah not so much06:23
prologicthe indentation is good :)06:23
prologicbut the awful syntax otherwise not so good06:23
prologicfunction foo(a, b, c) {06:23
prologic   ...06:23
prologicis way better06:23
prologicyou've done perl right?06:23
prologicit's syntax is just as horrible :)06:23
DanielBairdi think the coffee func syntax is mainly to look good when writing the endless callbacks06:24
DanielBairdcoffeescript is _great_ for jquery06:24
prologicyeah I guess so06:24
prologiccallback chains can be fun06:24
DanielBairdindentation is also awesome for callbacks06:24
prologicand don't really work very well with indented langauges06:24
prologicthat don't support anonymous function blocks06:24
prologiclike Python06:24
prologicbetter suited to C-style lgnguages06:24
prologicwith blocks06:25
DanielBairdnah indentation-blocks is what you want when you are defining inline functions as arguments to function calls.06:25
DanielBairdall the lines where you'd have to have });}); in normal js just go away06:26
prologicanyway all good :)06:27
prologicgo nuts with the coffeescript06:27
prologicI'm outta here dude06:27
prologictalk in the morning :)06:27
prologicyeah except that you end up with many levels of indentation06:27
prologicI'm not sure which is worse :)06:27
prologicmany levels of indentation06:28
prologicor many };'s :)06:28
prologicall good mate :)06:28
prologichave a good night!06:28
*** DanielBaird has quit IRC07:11
*** DanielBaird has joined #cmvt22:56

Generated by 2.11.0 by Marius Gedminas - find it at!