edubkendo
8/14/2012 - 6:23 AM

Installing tower.js development branch...an irc log

Installing tower.js development branch...an irc log

Aug 04 02:49:46 <e_dub> what branch should i use to start working on docs? i had trouble building the development branch the other day, though you've pushed quite a bit since then so i might try again Aug 04 02:50:39 use the development branch. You'll probably have issues, this is everything we'll have to work through to release though so just let me know. Aug 04 02:52:17 <e_dub> ok cool Aug 04 03:08:31 <e_dub> viatropos, ok, first problem i am having: https://gist.github.com/3255778 Aug 04 03:09:30 what did the terminal say? Aug 04 03:09:49 <e_dub> npm ERR! Aug 04 03:09:49 <e_dub> npm ERR! Additional logging details can be found in: Aug 04 03:09:49 <e_dub> npm ERR! /home/eric/git/community/tower/npm-debug.log Aug 04 03:09:49 <e_dub> npm ERR! not ok code 0 Aug 04 03:09:51 you have node >= 0.8? Aug 04 03:09:54 <e_dub> yes Aug 04 03:10:06 what was this from, npm install? Aug 04 03:10:08 <e_dub> yes Aug 04 03:12:02 so you cloned tower and ran npm install (not npm install tower)? Aug 04 03:12:08 <e_dub> yes Aug 04 03:12:39 it might be from forever: they were having issues when node 0.8 just came out https://github.com/viatropos/tower/blob/development/package.json#L86 Aug 04 03:13:05 try changing that to >= 0.10.1 Aug 04 03:13:17 or whatever forever version can install on your computer Aug 04 03:13:42 <e_dub> ok cool will try Aug 04 03:14:16 k Aug 04 03:15:13 npm comes installed with node now, very nice didn't realize Aug 04 03:16:17 <e_dub> yeah, really a big step in making it easier to use Aug 04 03:20:46 <e_dub> ok like this worked: "forever": "~0.10.0", Aug 04 03:20:46 <e_dub> "coffee-script": "~1.3.3" Aug 04 03:20:56 <e_dub> otherwise both of those mess it up Aug 04 03:22:59 k, well you need that version of coffeescript though b/c of the different javascript it outputs, did it still install the other coffeescript in the postinstall hook? Aug 04 03:23:38 oh, it looks like there's 2 coffeescripts specified, maybe remove the one in devDependencies Aug 04 03:27:32 <e_dub> ok yup this works: https://gist.github.com/3255913 Aug 04 03:27:52 nice Aug 04 03:28:12 <e_dub> you can take out the two design.io things, i just went ahead and threw them in cuz i knew it would be needed to compile Aug 04 03:28:28 Hey if you wouldn't mind maybe posting the irc logs you were talking about on a gist that would be cool Aug 04 03:28:41 <e_dub> sure Aug 04 03:29:05 thanks Aug 04 03:33:12 <e_dub> get this error trying to create a new app https://gist.github.com/3255968 Aug 04 03:34:06 op, yeah I don't think i've tested the app generator since the new changes. should be a quick fix Aug 04 03:37:43 <e_dub> https://gist.github.com/3256039 and https://gist.github.com/3255998 logs Aug 04 03:38:20 sweet, thank you! Aug 04 03:38:25 <e_dub> np at all Aug 04 03:40:44 alright pushed generator fix Aug 04 03:40:53 <e_dub> awesome Aug 04 03:40:53 * GitHub164 (~GitHub164@sh3.rs.github.com) has joined #towerjs Aug 04 03:40:53 -GitHub164/#towerjs- [tower] viatropos pushed 2 new commits to development: https://github.com/viatropos/tower/compare/bb0eece686aa...9dce9d12658c Aug 04 03:40:53 -GitHub164/#towerjs- [tower/development] processors todo - Lance Pollard Aug 04 03:40:53 -GitHub164/#towerjs- [tower/development] package.json update from @edubkendo ; update generator - Lance Pollard Aug 04 03:40:53 * GitHub164 (~GitHub164@sh3.rs.github.com) has left #towerjs Aug 04 03:42:43 a lot in the generated app is probably not going to work : p, I haven't generated one in a while Aug 04 03:49:32 the other thing is it needs a compiled version of tower for the client, what is a good way to do that do you think? Aug 04 03:50:01 one way is to put it on gh-pages, another is on the site but I don't want to mess with that atm, maybe a starter kit like ember too? Aug 04 03:50:37 * GitHub177 (~GitHub177@sh3.rs.github.com) has joined #towerjs Aug 04 03:50:37 -GitHub177/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/3e4314e9d9da9c1afbe66cf67ce8ef5b47aa0ebb Aug 04 03:50:37 -GitHub177/#towerjs- [tower/development] update ember on generated app - Lance Pollard Aug 04 03:50:37 * GitHub177 (~GitHub177@sh3.rs.github.com) has left #towerjs Aug 04 03:51:15 <e_dub> hmm pulled changed, verified they went in, but still getting https://gist.github.com/3256150 Aug 04 03:51:31 <e_dub> i really like ember's starter kit Aug 04 03:51:43 <e_dub> also could put something on cdnjs Aug 04 03:51:53 try saving the file again (probably wasn't recompiled) Aug 04 03:52:04 <e_dub> ah right Aug 04 03:53:02 yeah, we need a way to compile the dev version too which I don't think cdnjs would accept. will think about it more Aug 04 03:53:20 <e_dub> ok got further lol Aug 04 03:53:33 for now, you can run cake build and copy/paste the file in dist/tower.js Aug 04 03:54:11 Haven't fully tested the client version yet though Aug 04 03:54:25 with the new changes in the last day or two Aug 04 03:55:03 <e_dub> it generated a bunch of the app then https://gist.github.com/3256158 Aug 04 03:55:48 <e_dub> anyways, I'll keep messing with this , make the errors available to you, and if I fix anything along the way, put in a PR Aug 04 04:02:26 * GitHub58 (~GitHub58@sh2.rs.github.com) has joined #towerjs Aug 04 04:02:26 -GitHub58/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/4f0c5140895355011ae29e614c2ce9ef570e4ac4 Aug 04 04:02:26 -GitHub58/#towerjs- [tower/development] fix client build - Lance Pollard Aug 04 04:02:26 * GitHub58 (~GitHub58@sh2.rs.github.com) has left #towerjs Aug 04 04:03:22 k it's working for me now Aug 04 04:04:04 you good with that wiki/home error? Aug 04 04:04:38 or does that file even exist? maybe it's ignored in the tower .gitignore Aug 04 04:04:58 <e_dub> i just made a blank one Aug 04 04:05:06 <e_dub> it also wanted a _sidebar.md Aug 04 04:05:10 <e_dub> made a blank of that too Aug 04 04:05:17 <e_dub> and it finished generating Aug 04 04:06:00 * GitHub37 (~GitHub37@sh2.rs.github.com) has joined #towerjs Aug 04 04:06:01 -GitHub37/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/ceefa80f21661d0deba39ba41faf437bf7d25cea Aug 04 04:06:01 -GitHub37/#towerjs- [tower/development] only ignore top level wiki - Lance Pollard Aug 04 04:06:01 * GitHub37 (~GitHub37@sh2.rs.github.com) has left #towerjs Aug 04 04:09:48 <e_dub> alright, now the generated app has errors when i run npm install lol Aug 04 04:12:29 <e_dub> oh ok i see Aug 04 04:12:47 <e_dub> its trying to install the version of tower used to build it, and that's not on npm, i think Aug 04 04:14:15 <e_dub> changed that in the app's package.json to : "tower": "0.4.0-13" and everything is installing Aug 04 04:15:50 in the generated app you can run npm link tower; npm install, that makes it so you can use the cloned one Aug 04 04:16:12 <e_dub> oh ok dope Aug 04 04:17:41 <e_dub> alright got it running, no welcome page anymore though, just a blank page Aug 04 04:22:10 <e_dub> yeah that seems weird none of the views are coming through, like, the server side stuff Aug 04 04:30:43 * GitHub97 (~GitHub97@sh2.rs.github.com) has joined #towerjs Aug 04 04:30:43 -GitHub97/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/ceba11e8bc677bc28f4c5dd76bbda7103954f4f4 Aug 04 04:30:43 -GitHub97/#towerjs- [tower/development] Tower.connections wasnt getting socket.id - Lance Pollard Aug 04 04:30:43 * GitHub97 (~GitHub97@sh2.rs.github.com) has left #towerjs Aug 04 04:30:57 are there errors in the console? I started making the main view an ember view so if there's an error it won't render Aug 04 04:31:04 try building it again with those changes Aug 04 04:31:23 just the client part Aug 04 04:32:23 Once you get it working, mess around with stuff like App.Post.create({title: 'asdf'}), and App.Post.where({createdAt: {'<=': new Date}}).fetch() Aug 04 04:32:32 .getEach('title') Aug 04 04:33:15 I just set async:false in development mode in that last commit, which makes it so fetch, which calls the server, returns in the web console the records synchronously, which is nice when debugging Aug 04 04:33:34 <e_dub> https://gist.github.com/3256372 Aug 04 04:33:48 <e_dub> this is trying to do cake build to get the client side tower Aug 04 04:35:09 looks like you have to make the dist directory Aug 04 04:35:45 <e_dub> ok cool. I've never messed with cakefile stuff yet, so I just wasnt sure what it wanted Aug 04 04:36:57 no worries Aug 04 04:37:04 * GitHub34 (~GitHub34@sh2.rs.github.com) has joined #towerjs Aug 04 04:37:05 -GitHub34/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/bdc2b1bf568c39d557d4f9ff1e51381267a474ae Aug 04 04:37:05 -GitHub34/#towerjs- [tower/development] mkdir "dist" for cake build - Lance Pollard Aug 04 04:37:05 * GitHub34 (~GitHub34@sh2.rs.github.com) has left #towerjs Aug 04 04:38:05 I'm getting this weird issue where I can't close the browser window unless I stop the server, looks like maybe a socket issue. Aug 04 04:38:17 <e_dub> Error: ENOENT, no such file or directory './test/example/public/javascripts/vendor/javascripts/tower.js' Aug 04 04:38:38 I don't have that in the other app I'm working on so I'll get it tomorrow Aug 04 04:38:45 k Aug 04 04:39:28 oh I think if you run the test client it will generate the folders, I'll remove that for now, haven't used in a bit Aug 04 04:39:35 just comment out Aug 04 04:40:26 * GitHub25 (~GitHub25@sh2.rs.github.com) has joined #towerjs Aug 04 04:40:26 -GitHub25/#towerjs- [tower] viatropos pushed 1 new commit to development: https://github.com/viatropos/tower/commit/94a7d273021004369a84316c6e744cd9772961a0 Aug 04 04:40:26 -GitHub25/#towerjs- [tower/development] comment out writing tower.js client for test server - Lance Pollard Aug 04 04:40:26 * GitHub25 (~GitHub25@sh2.rs.github.com) has left #towerjs Aug 04 04:42:11 <e_dub> eric@edub:~/git/community/tower/dist (development) $ ls Aug 04 04:42:11 <e_dub> tower-application.coffee tower-controller.coffee tower-middleware.coffee tower-model.js tower-store.coffee tower-support.js Aug 04 04:42:11 <e_dub> tower-application.js tower-controller.js tower-middleware.js tower-net.coffee tower-store.js tower-view.coffee Aug 04 04:42:11 <e_dub> tower.coffee tower.js tower-model.coffee tower-net.js tower-support.coffee tower-view.js Aug 04 04:42:24 <e_dub> is what it makes Aug 04 04:47:16 yeah, just grab the tower.js and put it in vendor/javascripts Aug 04 04:47:21 in the app Aug 04 04:47:59 <e_dub> cool thats what i thought Aug 04 04:49:10 <e_dub> just overwrite the one it sticks in there? Aug 04 04:49:16 yeah Aug 04 04:50:02 <e_dub> and success Aug 04 04:50:29 nice Aug 04 04:51:21 <e_dub> http://ubuntuone.com/1qcTdWKGp4JESJl2faFh8U Aug 04 04:51:39 Nice Aug 04 04:51:46 <e_dub> browser window closes for me fine Aug 04 04:52:07 ok cool Aug 04 04:52:24 <e_dub> where did you want me to put the app.post stuff? client side controller? Aug 04 04:52:33 just in the web console Aug 04 04:52:45 <e_dub> ah right, sorry, getting drowsy lol Aug 04 04:52:58 tower generate scaffold Post title:string body:text Aug 04 04:53:02 i know me too ha Aug 04 04:53:50 learning to code on my side with eyes closed, you know ; ) Aug 04 05:01:36 <e_dub> sorry made a dumb mistake, had to do something over Aug 04 05:04:39 very excited about this one, try it out at some point: https://gist.github.com/3256493. If you try the webConsole example and look at the controller param logs on the server, they happen sequentially. Happy that hasmanythrough work on the client Aug 04 05:05:21 <e_dub> App.Post.create({title: 'asdf'}) Aug 04 05:05:21 <e_dub> Class Aug 04 05:05:21 <e_dub> App.Post.where({createdAt: {'<=': new Date}}).fetch() Aug 04 05:05:21 <e_dub> undefined Aug 04 05:06:19 Make sure this is set in app/client/config/bootstrap.coffee: Tower.StoreTransportAjax.defaults.async = false Aug 04 05:08:32 <e_dub> yup looks like it fetched it Aug 04 05:09:40 nice Aug 04 05:09:53 <e_dub> posts = App.Post.where({createdAt: {'<=': new Date}}).fetch() Aug 04 05:09:53 <e_dub> [ Aug 04 05:09:53 <e_dub> Class Aug 04 05:09:53 <e_dub> , Aug 04 05:09:53 <e_dub> Class Aug 04 05:09:53 <e_dub> , Aug 04 05:09:53 <e_dub> Class Aug 04 05:09:53 <e_dub> ] Aug 04 05:09:53 <e_dub> posts.objectAt(0) Aug 04 05:09:53 <e_dub> Class Aug 04 05:09:53 <e_dub> post = posts.objectAt(0) Aug 04 05:09:53 <e_dub> Class Aug 04 05:09:53 <e_dub> post.toJSON() Aug 04 05:09:53 <e_dub> Object Aug 04 05:09:53 <e_dub> body: null Aug 04 05:09:53 <e_dub> createdAt: "2012-08-04T10:03:08.712Z" Aug 04 05:09:53 <e_dub> id: "501cf35c3ac92e0d03000001" Aug 04 05:09:53 <e_dub> title: "asdf" Aug 04 05:09:53 <e_dub> updatedAt: "2012-08-04T10:03:08.712Z" Aug 04 05:09:53 <e_dub> proto: Object Aug 04 05:10:04 There's a whole JSON api for pagination as well Aug 04 05:10:04 <e_dub> ack lemme throw that in a gist Aug 04 05:10:11 posts.getEach('title') Aug 04 05:10:23 <e_dub> oh really? Aug 04 05:10:25 <e_dub> sweet Aug 04 05:12:03 <e_dub> so, it no longer makes the links to everything and stuff when you generate a scaffold? or is that something that can be turned on and off? I mean, in a real app, you'd definitely want to customize that stuff anyways, but it was pretty sweet for doing these kinds of tests Aug 04 05:12:41 Yeah, so when you call .all() or .fetch() it returns a Tower.ModelCursor (now it's an array with those cursor methods added, may need to change b/c ember removed accessor support). With the cursor you can do .page(4).fetch(), or .nextPage().fetch() and .previousPage().fetch() and it will fetch in chunks. Aug 04 05:13:09 Yeah I'm not sure what happened to the navigation, it should still be there Aug 04 05:13:26 probably b/c it's all ember templates, haven't tested it yet Aug 04 05:14:57 <e_dub> man this is awesome. like, I watched yehuda's play by play like about ten times lol, and, you could make the app he made with rails/ember using tower instead in about fifteen minutes i think Aug 04 05:15:30 haha that sounds cool, send me a link to that Aug 04 05:16:36 <e_dub> i'll throw the vids up on mediafire Aug 04 05:17:15 We gotta finish the last bit of pagination, so it also grabs the totalRecordCount and/or totalPageCount, so you could then do var posts = App.Post.page(1).fetch(); while posts.get('hasNextPage'); posts = posts.nextPage(); It's like 5 lines of code on the server in model/cursor/finders, but it's tricky : ) Aug 04 05:17:47 sounds good Aug 04 05:21:37 <e_dub> i really want to see the new play by play with creationix. i love watching those things because you get to learn everyone's debug methods, that's probably the single most valuable part of the play by play series on peepcode. even though, of course, everyone gets all embarassed at their buggy code. Aug 04 05:22:41 Oh nice, yeah that's a great idea, need to do that! Super valuable Aug 04 05:24:40 <e_dub> anyways, good deal, i think we worked out a lot of the kinks tonight/today lol Aug 04 05:25:41 <e_dub> this upload is gonna take about a half hour, but i'll DM you the link or something if you have gone to bed Aug 04 05:27:10 One last thing. You can mess around with data-syncing, though I haven't tested it in a few days and need to document it (kind of forgot). Basically, you define scopes on both the client and server controllers, which just creates a global collection of cursors, and when you create a record, it gets tested against all those cursors and added if it matches. https://gist.github.com/3256583 Aug 04 05:27:43 Oh no worries, didn't realize it was a peepcode, I may just get them now that you mention it, sounds like a good thing to learn from Aug 04 05:28:23 Yeah, thanks for powering through, it's been fun/productive Aug 04 05:28:54 <e_dub> they are really awesome. like I mentioned the other night it's thanks to all the educational material on the internet that I've been able to re-tool myself from english teacher to hacker in about six months Aug 04 05:30:23 haha that's so crazy... wait so you were an english teacher? I see japanese symbols or something on a lot of your stuff, what's your story? Aug 04 05:30:55 <e_dub> there was something that used to be in the tower wiki, something like "to new developers" or something like that, i cant find it anymore, and i wish i had saved it, but man, that was a really motivating roadmap for me when i started Aug 04 05:31:24 interesting, I'll look for it Aug 04 05:31:49 <e_dub> well long story short i developed chronic pain about ten years ago, and had to go on hardcore painkillers, which i got addicted to, got off of, but then was left without relief for the pain Aug 04 05:32:07 <e_dub> so i started learning japanese because i could no longer work and had all this free time Aug 04 05:32:15 <e_dub> that gave me this great idea for a japanese learning app Aug 04 05:32:23 <e_dub> so i started learning to program and bam Aug 04 05:33:04 wow that's so random haha. how do you do it? Aug 04 05:33:27 with pain that seems tough Aug 04 05:34:11 <e_dub> well, i am stubborn as hell. and i pretty much just refuse to spend a life watching soaps on the couch. i am really passionate about education, and if i cant teach, i want to build something that can teach for me Aug 04 05:35:03 really cool Aug 04 05:35:49 <e_dub> a lot of the techniques i was using to learn japanese, like constant immersion, using spaced repetition software, etc also made it possible to plow through lots of material on programming really quickly. what I still lack is the experience most people get from taking years to learn what i shoved into about six months, but that will catch up with time Aug 04 05:35:50 I'm really into education as well, we'll have to dig into that one day Aug 04 05:36:15 <e_dub> yeah, i noticed that on your twitter profile. i think that might be what caused me to look into tower Aug 04 05:36:18 you probably have a background in it though, I just kind of like learning Aug 04 05:36:28 <e_dub> cuz the brunch.io dude had retweeted you or something Aug 04 05:37:14 you really have only been programming for 6 months? Aug 04 05:37:23 <e_dub> well, i dropped out of high school (another long story lol) so when i kind of got my shit together, it really made me want to reach out to others Aug 04 05:37:45 <e_dub> yeah for real. i had some classes in high school where we did some stuff with BASIC and pascal on apple IIe's Aug 04 05:37:50 <e_dub> but nothing in between Aug 04 05:38:09 no f*cking way, that's insane Aug 04 05:38:15 haha Aug 04 05:38:17 <e_dub> lol Aug 04 05:38:49 I thought I was moving fast, playing catch up, but now it's been almost 5 years! Aug 04 05:39:05 <e_dub> heh, well i am nowhere near your level dude. tower is amazing Aug 04 05:39:14 <e_dub> i read through the source code in awe Aug 04 05:40:01 lol Aug 04 05:40:53 it's crazy though, kids in like 10 years are going to be so hardcore Aug 04 05:41:16 it's like, just prepare the ground : ) Aug 04 05:42:13 <e_dub> hey, thats the coolest thing though. like, people forty years ago wrote all this really fucking hard assembly and c code, and now i can write in sweet sweet ruby and coffeescript and never have to think about that junk lol Aug 04 05:42:26 for sure Aug 04 05:43:29 alright, checking out now. talk to you later... your real name's eric? Aug 04 05:43:39 <e_dub> yup eric Aug 04 05:44:15 cool. night man. Aug 04 05:44:20 <e_dub> night!