« first day (597 days earlier)      last day (4350 days later) » 

3:00 PM
web app, mobile app, desktop app.... they're all the same shit in a different pile.
 
web app = glorified website
 
web app (too me) === website with function; like jsfiddle.
 
so pretty much all websites
 
something I can now do online, that was previously limited to desktop
 
@Esailija PhoneGap and Titanium both have a WebKit object that "wraps" your html website. It's essentially like they rewrote Mobile Safari to interact with their code specifically.
 
3:01 PM
no, i wouldn't call any blog site a web app
 
That way, you write with Javascript but can access GPS, Camera, Contacts, make the phone vibrate, etc.
 
I see
I just call everything a website, cos you know, it's a website that just runs a little bit more javascript than a blog
 
PhoneGap stores the app (pretty much a website html/css/js) on the device then exposes an API for device level functionality that is accessible via javascript.
 
and you could do jsfiddle for 12 years now I think
when did iframes come?
 
I wasn't sure if PhoneGap runs it's own browser or uses the devices
 
3:03 PM
@Esailija true, and we could have web apps then too
i'm not putting a timeline on them
 
it runs its own browser. Neither of them actually convert anything to native code.
 
just trying to make a distinction
 
but how do you define previously then
 
website and web app
there is no previous
 
but you said something that was previously limited to desktop
 
3:05 PM
..."You are subject to the limitations of the browser and the JavaScript engine that comes with your device. "... taken from: radar.oreilly.com/2011/10/phonegap-mobile-development.html
 
previously meaning "not done on the web yet"
like it wasn't a technical limitation (for some) it was that no one had decided to put these things online, and now they are so we need a distinction between websites and web based applications.
webapps was born.
 
so if anyone has experience with PhoneGap: stackoverflow.com/questions/10883371/…
 
like Google Docs, sure it's a website... but it's also a web based application
 
if I make an app that runs on excel, is that an excel app or a spreadsheet
 
excel app
:)
technically a VB6 app in excel
if I write an application in Access it's an Access Application
 
3:07 PM
@rlemon lol
 
so with phonegap you can write whatever you want since you are always in a browser... with titanium you need to write in the certain way so that it can be transformed for all the platforms
 
Basically
though, if I remember correctly Titanium can also release to desktop OSes as well
 
well it's good to be up to speed, even if I will never develop for mobile
 
So, if no one is a PhoneGap person......who knows much about Mobile Safari then?
because the same code also doesn't work when simply viewing the website in Safari
 
leaky abstraction?
 
3:13 PM
@Esailija Luckily with things like PhoneGap and Titanium "Develop for mobile" simply means "know JS and learn some APIs"
0
Q: Phonegap code working in Chrome but not iOS Simulator

James P. WrightI've got a templating system that I copied from somewhere (can't remember right now) and it essentially loads templates from html files like this: var loadTemplate = function (index) { var name = names[index]; console.log("Loading " + name); $.get('templates/'...

That's the actual problem I'm encountering
a single line of code that apparently doesn't work in iOS but does in Chrome
if I try to console.log on what is being loaded by the template, the iOS browser hates it (some error about can't do JSON of cyclical blah blah blah) but Chrome does it just fine
 
does it still log console.log('getting ' + name);
 
yep
right after that is where the error happens
so I think the Catch in "initialize" is catching the error
I've tried putting a catch in "get" and it doesn't happen there
I just updated the question to include the html from the template as well in case that's the problem
 
hmm so the only code that could cause it is console.log(this.template);
 
no
because console.log("Got Login Template"); doesn't fire
I'm 99% certain the error is happen at
 
can you separate it more
 
3:17 PM
this.template = _.template(tpl.get("login"));
 
    var asd = tpl.get("login");
console.log("something");
    this.template = _.template(asd);
that way you will see if it's _.template or tpl.get?
 
good idea
 
maybe you are trying to fetch tpl.get too early
and it returns undefined
 
it's definitely coming from "this.template = _.template(something here)"
 
there is nothing in tpl.get function to ensure that the template has been fetched
it just returns this.template[name]
 
3:21 PM
True, but I can tell from my console log messages that the template was definitely loaded much earlier than the call to get it
the callback function has a console.log in it as well
 
if you know this doesn't work in Safari either, couldn't you do more detailed debugging from there?
 
ok so need to follow the trail in _.template
 
I have only checked it in Safari on iOS
will check it on local Safari too
it works in desktop Safari
 
@JamesPWright LOL aww, sorry. i was hoping that would help.
 
I would normally be using weinre (a Phonegap debugging tool) but it doesn't connect until AFTER this code is run
no problem used2could
 
3:24 PM
_.template = function(old) {
	return function() {
		console.log( "_.template arguments" + arguments );
		var ret = old.apply( this,arguments);
		console.log( "_.template return value" + ret );
		return ret;
	};
}(_.template);
 
Are you saying I should try using that?
 
well if tpl.get works then it must be in _.template
this hooks some console logs to it
 
@Esailija Great idea!
 
that gives me this: _.template arguments
as a consolelog
but no actual arguments. :P
 
hmm
 
3:26 PM
phonegap probably overrides console.log
 
normal console.log takes any number of arguments and just logs them
 
changed it to:
console.log( "_.template arguments" );
console.log(arguments);
and I get: {}
so arguments is a blank object
 
wtf
 
my office smells like pea soup
:S
 
if I run that in Crhome
arguments is my template html
 
3:27 PM
i like pea soup.... just odd that my office smells of it
 
sooo.....the template is definitely not being loaded
now I have to figure out why
 
unicorns
 
I would refactor your code to use promises
tpl.get( "whatever").then( function(){})
 
could it be a permissions issue on iOS?
 
I don't know a thing about promises
:P
 
3:28 PM
well now you have kind of race condition thing going on
 
used2could....it could....
 
I haven't touched an iOS device in 5 years so my knowledge is extremely limited when it comes to these kinds of details
 
I stole the templating thing from this guys github github.com/ccoenraets
it was specifically in use with apps using jQuery Mobile and Backbone.js
but maybe not Phonegap
going to try something
 
basically all code you need should be this unless I'm missing something
get: function( name ) {

	if( this.templates[name] ) {
		return this.templates[name];
	}

	return this.templates[name] = $.get('templates/' + name + '.html' );
}
you would then call tpl.get( "template" ).then( function(data){})
and it will only fetch it the first time
and there is no race conditions because you are always using callback interface
when a template has been fetched, all pending promises will be resolved and future promises for that template will immediately fire
I mean callbacks
 
That's probably true
but used2could wins
 
3:34 PM
what do i win?
 
I changed the code to just have a simple string with some Divs in it for the template (i.e. don't grab a file) and it works
so the problem IS a permission issue
 
you could even do $.when( tpl.get("template1"), tpl.get( "template2) ).then()
then will fire when all listed templates are fetched
 
is that a built in jQuery function?
 
yes all this promises bullshit i'm talking about is built in in jQuery and its ajax interfaces
 
Iknow I need to learn promises anyway
but since this is a file permission issue, this probably isn't the time (stupid deadlines). :P
 
3:35 PM
caching a result like that is textbook use of promises
 
I promise to get around to learning promises. :P
 
well yeah if it's permission issue then even promises won't help
;p
 
it still could be a promises issue though if the template hasn't yet been loaded.
 
now I'm just trying to figure out if it really is permissions. It does seem to be the case.
that's true I suppose
I'll look into the jQuery promises
 
A good read on promises, skip down to the promises heading. blogs.msdn.com/b/ie/archive/2011/09/11/…
"One pattern is a promise, which represents the result of a potentially long running and not necessarily complete operation. Instead of blocking and waiting for the long-running computation to complete, the pattern returns an object which represents the promised result."...
 
3:39 PM
I haven't found any other use for them other than caching or $.when, even though that I have never personally used
it's pretty awesome that after the promise is done, adding further callbacks will still be fired normally
 
I know I'll need to have experience with it, especially with a mobile app that might be slow anyway
 
@FlorianMargaine , that looks to me like a blog post .. not code
 
@Esailija using $.when() with Backbone is apparently not easy so I'm heading away from it for now. That code is in the initialize, which means using $.when causes render to be called too soon....it would take too much effort right now to rework it
 
so I'm going to keep assuming it's a permission issue and stop trying to load templates from files
thank you for your help Esaillja and used2could
 
3:51 PM
that's a misunderstanding, they probably mean the backbone library methods don't return promises so you have to rewrite it in order to use it
 
@Feeds That's a really poor title......"5 compelling reasons to use semicolons..." or "5 compelling reasons you should use semicolons..." etc would be much better
 
writing a function yourself that returns $.get (I.E. a promise)
is just fine
 
@tereško "here is a news with a commit linked"
 
@Esailija I just meant that's what it looks like to me. I tried doing that and it probably WOULD work, but I'd have to do some more rewriting and I'm pretty sure the issue is not because of promises but a permission thing.
 
@JamesPWright np, i hope yout get it all worked out
 
3:53 PM
well you don't have to use promises with backbone methods themselves, they are pretty much only useful for template caching anyway
 
I'll definitely get around to looking at it, just not today. :)
 
@JamesPWright here is what promises basically is stackoverflow.com/questions/10358750/…
 
I'm pretty sure I get what promises are, I just haven't had a chance/reason to learn/use them
 
and @Esailija : phonegap is a WebView (so yes, a browser) with some phone functions available (such as camera) through an API
 
@FlorianMargaine LOL wtf at my answer in there.. look at my edit :D
 
3:55 PM
uh? that's completely different :D
 
it was shitty before
 
yeah, I was looking at the revisions
but it doesn't use deferred
 
jQuery ajax interface is all deferred
$.get returns a promise
that's why $.deferred was overkill there
because all jQuery ajax stuff already do it
 
oh, cool
 
did you know this is the only problem where using promises is actually worth it
:D
 
4:00 PM
what, the template loading?
 
not template loading specifically
but some async action that becomes sync after first call
well not after first call necessarily
 
yeah, that's the point of promises :p
 
cos you might make 10 calls before the resource is first fetched and after that it becomes sync
 
alright
afk lol
(lol = league of legends :p)
 
:P
 
4:03 PM
@FlorianMargaine so I need a little bit of Wiki, a little bit of document editing, a bunch of CRM, and some inventory control (which I don't mind implementing any of this btw, however it is all so monumental having a solid starting point would be nice) is there any distro's that you can recommend?
i'm reading up on them and openPublic / openEnterprise look promising
 
he apparently creates web browsers in java
 
he updated - reopen
 
Hi, i want to list files with javascript
And make the rows clickable
When clicked, buttons at the top will become active and data can be carried over
Should i still use tables?
 
@rlemon Have you considered Drupal?
 
4:16 PM
Hi, I'm wondering if this is the correct way to parse JSON. The first file is how the search bar currently works, the second is my attempt at using JSON.parse. The reason for doing this is because I want to show the merchant image along with the the title(text), instead of just the title (as it currently is). gist.github.com/2869105
 
@used2could read up, i'm looking for a drupal distro
:P
^ thinking for the gf.
she needs one she can play D3 on as well. :P
 
2000$ for a notebook? are you serious?
 
@rlemon Drupal 7 + (CiviCrm, simplewiki, Ubercart)
 
gaming notebook
so yes
she must has a laptop
 
i'd never spend that much on pieces of hardware that are outdated a year later
 
4:20 PM
I don't agree either.
but hey, happy wife === happy life
I got the same hardware in a desktop for $1000 cheaper :P
 
About 24 working hours
and finally C++ has stopped being a bitch!
 
no it hasn't, when it says "it's fine" it never is.
C++ is like a woman that way
 
really, talk to her about if this is really necessary
 
watch, three months from now it'll throw this back in your face
 
lol
 
4:23 PM
@GNi33 i have, she doesn't care, needs a laptop
 
hehe, oh well.... women
 
I have setup one of my pc's for her (put windows on it and everything) and she still 'needs a laptop'
 
Hi, anyone here knows phonegap video plugin?
 
@rlemon buy her a chromebook :3
 
"why" I ask
"farmville in bed" is her response
 
4:24 PM
tell her its brand new! :O
 
@Abhishek needs to play D3 60fps+
 
then you are out of options lol
 
no i'm not
got one right there
 
You want to debug lots ?
 
2000$ farmville-machine -> instant win!
 
4:26 PM
How do i make it so when a row is selected in a table, javascript will detect it
 
@GNi33 lol
 
Like an onclic
onclick
 
;)
 
@rlemon lol, that's not a webbrowser
 
Macs can do more then that
lets see what macs can doo
.. wait other then being apple product , sync ipod / pad / phone and make apps for em they cant do much can they ?
 
4:28 PM
ASUS G75VW-TS71 Gaming Notebook - 3rd generation Intel Core i7-3610QM 2.3GHz, 12GB DDR3, 500GB HDD, Blu-ray Player/DVDRW, 2GB NVIDIA GeForce GTX 660M, 17.3" Display, Windows 7 Home Premium 64-bit
^ that is $1300
 
2.3 GHZ .. slow man
 
what do you need to play diablo nicely?
 
i think an i3 or i5 can handle it easily
wait dell sells this ?
3rd Generation Intel® Coreâ„¢ i7-3920XM (8MB Cache, up to 4.1GHz Overclocked*)
4.1 GHZ !!! WTF
 
hm
problem being, that laptops are so expensive compared to desktop systems when it comes to good hardware :/
 
true
But alienware is just expensive as a whole
 
4:38 PM
yes. I'd never buy a pre-assembled desktop system anyhow
 
+1
but Overclocking an i7 at home is kinda sorta bad idea
 
I only buy alienware laptops
My last one was only 1k
 
@Loktar o/
 
the M11x r2
 
long time no see!
 
4:39 PM
yeah I idle, but have been working hard to finish this app at work :?
 
:D
Wanna see my work ?
 
sure
 
linking ss on fb ^_^
 
(Idlers for the win)
 
ah ok, Ill try and check.. client is near
they dont like when we get on FB :P
@RyanKinal yeah you have been idling way longer than me even
 
4:41 PM
@Loktar true :P
 
I feel kinda bad, because I mostly come out of idle to complain about terrible contractors and ASP.NET
 
oh hey thats nice @Abhishek
 
:?
^_^
its ugly at backend LOL
 
@RyanKinal haha meh whatever, I do the same
so you did the UI @Abhishek
 
yeap
well have to htmlify parts of it
 
4:43 PM
oh is that a comp or something currently?
 
comp ? (whats the full form ) ?
 
composition, basically just the graphical representation
 
competitor, computer, compensation
 
not the actual web page
just the design
 
its an actual webpage
 
4:44 PM
damn, none of the above.
 
ah ok cool
 
but loads to work on it
 
only thing I notice that might look cool is changing the default scroll bar style
 
aaah, i suck at math :(
 
its supposed to support IE 7
lol
 
4:44 PM
eww that sucks
 
hahaha
why you think i am writing more then half (nearly whole) my program on server ?
 
user1385191
so I got a Windows 95 VM up last night
 
user1385191
and tested out IE 4
 
respect mate Big Respect
 
user1385191
the unit test had two SyntaxErrors
 
4:50 PM
lol
 
user1385191
1. use of throw
 
user1385191
2. use of try
 
Matt can you send me that image for windows 95 ? I need it for TC 3.1 to be able to pass the next semester
 
user1385191
wat
 
0
Q: Using Backbone.js with Raphael and handling nested views

BrandonI'm trying to create an application similar to a floor plan editor in Backbone.js and Raphael. I'm not sure if what I'm doing is structured correctly or not. I'm not using the Backbone routing, just the basic Models/Collections/Views. My views are simple enough. A Building contains a collection...

 
user1385191
4:53 PM
I should also mention that IE 4 took about an hour to install
 
user1385191
and required me to install the TCP/IP protocol in order to connect to the Internet
 
:o
fun!
 
user1385191
oh, you want the ISO?
 
yes
 
user1385191
win9x project on ThePirateBay
 
4:55 PM
I have windows 7 and Linux { Fedora 17 }
tys
 
user1385191
 
lol
 

« first day (597 days earlier)      last day (4350 days later) »