« first day (418 days earlier)      last day (4524 days later) » 

9:02 PM
Anyone who knows Sencha Touch here?
 
user1385191
I know anything Sencha touches is crap
 
haha, why?
 
@Zirak you know () { ... } is a bitch right?
 
In what way?
 
wow... its pretty tough to deal with textNodes within a css-perspective environment. Since it gets hardware rendered, fonts look .. uahhh dunno pretty "blurry"
I tried to workaround that with usag of text-shadows, but it still looks.. not so nice :p
typeofnan.com -> about
 
9:11 PM
"Andy frequently talks about himself in the third-person."
 
its doesn't look quite right does it
@Zirak: well :P
 
in Microsoft .NET, ASP.NET and ASP.NET MVC, 15 secs ago, by Incognito
All of this _VTI_*** stuff, can I delete it or what? I don't publish files with microsoft whatever.
 
btw @Raynos: finally, I've added some events github.com/jAndreas/typeof-NaN-2.0/blob/master/js/modules/…
 
\o/
@jAndy is it live?
 
9:20 PM
I like how it doesnt work in chrome :D
@jAndy it falls for the tab trap
 
is now pseudo overloading the $$ and does the lookup on all calls (at least, from a module)
 
this is what you get for using setInterval :3
 
@Raynos: what do you mean with 'live' and what is a tab trab :P
 
You know a switch like that is Rage right?
 
I like switches
 
@Raynos: I had the idea myself to use the ev name to call a function, but I dunno
 
I prefer that
 
I feel its pretty ugly
and you have to do more checking
 
it allows for inheritance
What if you want to inherit the event handler?
and only overwrite a few cases?
It's open to extension
 
I am in a strict modular system
there is no inheritance
between modules
its like rule #1, modules don't have knowledge from other modules
I'm still a little annoyed that textNodes look so... hardware'ish
remove the text-shadows, then it really looks like DOS
 
9:27 PM
@Raynos Don't use a break ;)
Hahaha :)
 
actually, switch statements are pretty neat if used well
in my case I could easily need and use
    'someevent':
    'someotherevent':
         code;
         break;
 
@jAndy ...
You need inheritance
 
I do?
 
Im sorry but the thought of not re-using other modules through inheritance or composition is rage
It's not inheritance you need, it's module re-use
 
I don't get that
modules must not know anything about each other
is would be a tight relationship
 
9:30 PM
We may be talking about the wrong term then
A module cannot know anything about modules it does not own
 
I hope so ^^
 
A module is allowed to own modules
It makes sense to construct modules that are a union of some other set of modules
 
well yes.. that might be right
 
then the top level module owns those modules
the top level module itself might be owned by other modules
 
I didn't really follow such constructs so far, since a "module" in this environment, describes a part of a website
 
9:31 PM
Except a module does not need to know it is owned or whether it is top level
But a part of a website might be a union of some smaller parts of a website
 
there might be helper modules which do certain other stuff, but at this point, it makes so sense to have toplevel and child modules
 
for example I have a tiny subset that wraps a few form elements
that are used in multiple forms
I call that tiny module by some name and re-use it
It's aggressive code re-use
 
hm
I hate the idea that a BarFoos module explicitly requires another module by name
that is like rage for the system
 
For example my index module knows about item and view module knows about item
@jAndy ... the only reason your not loading modules by name
 
I know what you're talking about and in general this makes a lot of sense
 
9:35 PM
is because BarFoos is a god object
 
but in this case here, a module is supposed to be 100% independent
 
Your solution to not loading modules by name is dump everything on the god object
 
of course it is
 
@jAndy it's not 100% independant, it relies on everything on the god object
 
true
 
9:36 PM
it would be nicer if it loaded a few modules by name that it actually needed
 
that is the one relationship which needs to be there
obiviously.. without the core nothing would work
 
I'm just saying it's better to have multiple smaller relations
then a single god relation
 
sec
 
"One module needs X", ok lets write a BarFoos plugin that dumps "X" on the core.
Because that's what a BarFoos plugin is right? Dump stuff on the god object?
To me it just sounds like your solve the problem with "GLOBAL ALL THE THINGS"
 
well no
actually the Core just loads the module
there is do 'dumping' into the core
its loads the module and passes it the sandbox in
 
9:39 PM
what if a module needs a canvas library?
do you inject a canvas library into barfoos core?
 
the module would need to load it on its own
 
isnt that loading it by name?
Again I think this a name clash here
I think everything is a module :D
 
I agree
 
you think a module is a specific file you load into barfoos
 
a modules is described in a file, yes. But again, I guess you're a little confused by the term module here
 
9:41 PM
@jAndy what construct does barfoos provide for loading "components"
 
its a complete independent piece of code, which has no clue about anything, it just knows its own purpose
 
and what exactly is a "module"
 
and has a special object, which allows for certain tasks
 
I agree with that definition, except I think it's allowed to own child modules which it knows things about
So rather then having a fat core which it uses for certain tasks it loads child modules for certain tasks
It just seems more scalable to me
 
the fat core isn't that fat :p it just takes care take about, dom/ajax abstraction, module loading/unloading and communication between modules as mediator
that is.. what barfoos is. a hopefully "rocksolid" platform, which allows to write pieces of code (called a module there) which can plugged in and out into any other barfoos environment
since there is absolutely zero tight coupling
 
9:46 PM
sure there is :D
theres 100% hard coupling to barfoos core
It'd be much more elegant if a module can just load its own dom abstraction
 
that works out great if you follow some rules, like not touching anything beside your own DOM as module, always use the sandbox for any task, etc.
 
Also if your hard coupling to barfoos core library there is no problem hard coding to modul8 as your module loader :D
 
@Raynos: well, I would not call it a tight relationship. the core is just "there", it is the heart of everything, it needs to be there to have the whole architecure make sense
even there, its no real tight coupling since a module gets registered and loaded, but never has any direct communication with the core
 
...
The fact your Sandbox.$$ has some API is hard coupled
 
your approach would require each module to have all the stuff the core offers in its own
 
9:49 PM
When I say hard coupled to Core I mean hard coupled to the Sandbox.$$ object
if your hard coupling to Sandbox.$$ why not hard couple to Sandbox.require :D
 
I don't really understand it. from the "barfoos modules view", its like this: I only know about my sandbox (which is well defined, also the $$) and thats it
I have no clue about the webapp as a whole
 
True
 
I have no clue about other modules
 
It's just your sandbox is larger then it needs to be
 
I have no clue how to do anything, but using the sandbox
 
9:51 PM
Your sandbox contains everything any module might ever need
I say let require be the sandbox
 
@Raynos: yes, that was a harsh decision. Actually I could provide many sandbox objects
I know, I know...
 
It's fine as it is.
 
the original approach from Nicholas said, that any module should have its own sandbox
preferably
 
I just think in terms of modules as being things that use and compose smaller modules
like its building blocks all the way up
For example you could make all your UI widgets modules
 
but its the same thing here
 
9:52 PM
and then have website modules that combine UI widgets
 
just in a bigger scope
for instance, the box3d module, I could just load that in any other barfoos app and it would to its job (rotating :p) you only would need to fire the correct events to communicate with it
and if its not there... so what
 
@Raynos (or anyone else that read the syntax thought) Any comments before I perish?
 
@Zirak it maed me puke
I was liek this is PHP isn't it? and then I was liek sadface
 
I thought it'd make you puke
 
@jAndy I see. So an app owns a set of modules
What owns a set of apps?
 
user1385191
 
or do you create a new app that owns the sum of those of modules the other apps owned
 
@Raynos: division by zero / not defined
 
C was the one who made me lurvz ->. So I took the idea of using arrows for nearly everything, and {} for nearly everything else.
 
@Zirak secondly () { ... } wont ever work
Try writing a compiler that doesnt balls on that syntax
 
@Raynos: but yes, an app owns a set of modules. The best way to write modules. of course there will be specific modules, but anyway it can get used anywhere else
 
9:58 PM
I appreciate that, it's just these modules are higher level building blocks then I want :p
 
but there should be a lot of modules for a 'general website using' which can just get shared
@Raynos: I guess that hits it pretty much
you actually want to split the module into modules
 
It wasn't really explained well but I thought of Smalltalk and Self when doing that. The real idea of it is two-fold: 1)everything is code, 2)everything is dynamic (except for constants. I'll probably remove the ability to declare them anyway).
 
what.. might be an option for me too. I guess I will re-write the sandbox core, without factories all over the place, but hopefully only object composition with a little inheritance
I guess I will need you there :p
 
If {} is just a piece of code, then all the compiler does it find what it relates to.
 
@Zirak I agree, just your syntax is fugly and not compiler friendly
@jAndy want me to fork barfoos :D
 
10:01 PM
It's just a first idea. I really dislike ~> and <=.
 
@jAndy oh wait. it doesnt have unit tests. HOW I REFACTOR NAOW >:(
 
@Raynos: indeed, its a little too early :p
 
@Zirak I also hate languages that use = for comparison and x= for assignment
maples := pisses me off
= is assignment, === is equality
 
That's why I use =x :D
 
@jAndy ugh, massiv effort :(
@Zirak I hate =x more
 
10:02 PM
anyway, I don't think it will be that much work. Actually the discussion a few days ago made up my mind. too much factories with too much closures really are too memory costly, especially if you make such a heavy use of it like I do
 
Seriously though...I also dislike the == and ===. They need a better replacement if = is assignment
 
so my next approach will be on pure composition, along with some es5 magic
 
It was really just based on the idea of value vs reference. x=y means value, x-y means reference. I need to shine that idea a bit, play with it some more.
And :something has to go.
Yeah, it's a terrible idea.
@MattMcDonald Disregarding anything technical or logical, the conclusion of the article is "New is bad, staleness is good"?
 
How to check if a value is an object (should work for native objects and browser host objects)?
 
user1385191
it's so much fun reading major news outlets report on technology
 
user1385191
10:13 PM
they're so woefully out of touch
 
@ŠimeVidas Define "object". Not null/undefined?
 
@Zirak If it's a native value, then I want to check if its type is Object. If it's a host value, I'm not sure what the definition of an object would be there...
native value = ECMAScript language value
 
> “As the 90s demonstrated such “features” are bad for developers, and bad for the open web.”
Dart is bad for developers
 
@ŠimeVidas For native values, you can do use Object.prototype.toString
 
@Zirak No, that returns the [[Class]]... I'm not interested in that.
 
10:19 PM
Object.type = function _type( obj ) {
		var res = ToStr.call( obj ).split( ' ' )[ 1 ].replace( ']', '' );

		if( obj === window ) {
			res = 'Window';
		}
		else if( res === 'Window' || res === 'Global' ) {
			res = 'Undefined';
		}
		else if( res.indexOf( 'HTML' ) === 0 ) {
			res = 'Node';
		}
           return res;
	};
:p
 
@jAndy Where's that from?
 
aahhhh messe with this little chatbox
 
@ŠimeVidas typeof x === "object" :D
 
> "I'm trying to make a list or useful jquery things. I'm writing cover functions for them." ~ A friend of mine
 
@Raynos But some objects return 'function' and what not...
 
10:23 PM
:-(
 
@ŠimeVidas: I use that on many projects, I wrote that along with a co-worker quite a while ago
 
Ok try Object.prototype.isPrototypeOf(x)
ugh that's annoying
@jAndy "college" ?
 
@Raynos: well, co-worker
 
@Raynos Would that work for all host objects (in Chrome for instance)?
 
what are you trying to do and what browsers does it need to work in
 
10:25 PM
(Do all host objects inherit from Object.prototype?)
 
You can't know.
Host objects don't have to be js-like or js-accessible objects.
 
user1385191
> Every object (including host objects) must implement all of the internal properties listed in Table 8
 
@Raynos I just tested this and Object.prototype.isPrototypeOf(x) returns true for all global objects in Chrome.
I guess, that's the definitive way to test object-ness...
 
Note that that means [[Prototype]] === Object.prototype
it wont work if anything is in between the two in the chain
so it doesnt work on function () { } and "foo" etc
 
Uh...
 
10:29 PM
seems to work for me
 
@Raynos See here: jsfiddle.net/yrryz
It returns true for a function object...
 
Object.prototype.isPrototypeOf(new String("string"))
I see. IT does work
it just doesn't work for natives like "str", 4, true etc
 
those aren't objects
 
@ŠimeVidas also note I doubt isPrototypeOf is shimmable in ES3 engines
 
10:32 PM
@Raynos Yea, yea, who cares... :) If it works in one browser, I'm happy.
I'm just testing, and I need a working browser...
@Esailija I'm printing global values by type... just for education
 
@ŠimeVidas just warning people about the unshimmable subset of ES5 ;)
 
just do object prototype to string and assume object if it's not js
not js, as in not object Null, object Undefined, object String, object Array and so on
 
That's [[Class]]
I also believe [[Class]] is being removed in ES6
 
so
it's infinitely better than typeof
 
So this is it...
function isObject( value ) {
    return Object.prototype.isPrototypeOf( value );
}
works for both host values and native values...
 
10:37 PM
you might as well say anything but undefined, null, primitives
no need for function
 
10:50 PM
wtf is it just videos
 
@Esailija which one?
 
I am learning how to use inline styles
from a video
 
:D
 
user1385191
ew, tutsplus is terrible
 
yes , most of us already knew that
 
user1385191
 
user1385191
(more than you'll ever need to know about CSS)
 
True
People should learn shit the real way
 
you mean I shouldn't be watching these videos
I'm on day 29
 
you cannot learn css by watching videos
you can learn "what are the parts" in 2-3 days
but to learn how to write css , you have to actually do it , at least for couple month
 
You know if I wasn't sarcastic, what I would be doing in javascript room anyway
 
11:07 PM
and preferably show what you made to someone to point out the errors
 
I just have no idea why @Raynos linked the videos
 
I dont know
 
@Esailija , i guess because css and html channels are dead
 
some of those looked like they might be useful
 
user1385191
the problem with sites like tutsplus is they let any old teenage schmuck write for them
 
user1385191
11:08 PM
that, and the code quality is really low
 
yeah but you just randomly linked them
 
Yeah basically
I like re-linking useful things I find
 
so far the videos have been only useful for lulz
 
Like the web reference docs
 
oh yeah, you have that link again?
 
11:09 PM
its pinned
 
lmao, true
video 29 spends more time in photoshop than css
wtf I didn't sign up for photoshop
 
11:23 PM
well . you kinda did
 
I did? :P
 
Contributing to open source is awesome \o/
 
11:39 PM
hi everyone
i need to understand backbone
 
what about it
 
backbone is a library.
next.
 
i have problem in understanding how to make a fetch() call to my server.php and update the view
 
it's a framework that actually changes how you write javascript
=D
 
Thats easy
use .fetch
Implement a REST API on the server
next.
 
11:41 PM
well the fetch updates the model attributes, which fires an event that your view catches and then you can update
you need to specify an url for the model that uses fetch, have you done that
 
pre-emptive:
 
exactly but
Thanks so much Esailija can you please have a look at my code
 
That totally needs bigger text
 
@Raynos true
@MianKhurramIjaz, you don't do ajax in views
you don't do ajax at all, you use fetch remove update etc
which do ajax in the background yes
but I mean you are explicitly using jQuery.ajax which you shouldn't need to do
 
11:43 PM
I will contribute to the rest of the conversation by using Y U NO images
 
i know but how to pass token and container name in fetch() request of backbone
Raynos :)
good thats what i was at that i am doing it wrong cuz lack of understanding had i knew how to send two params in fetch() call i would never do ajax
 
I need to refresh my mind by reading backbone docs :P
I am actually using home made rewrite of it because it had many issues out of the box
 
fetch is easy :\
you fetch the model
Look a Model is a really simple thing
its bound to an url
and when you fetch you just call GET url and mix the returned JSON data into the model instance
if it doesnt work it means the url returns something thats not sensible json on a GET request
which means fix the damn url or fix the damn server
 
how do you pass arguments to fetch( {name: 'name', token: 'token' }) in fetch
?
 
11:48 PM
via options
 
Yeah just like that
 
like you just wrote
 
ok lemme try
 
.fetch({ data: { ... } })
You need it to be in data so it sends it in the GET request
the data will probably be encoded as query strings
 
i ok with POSIT request as well
 
user1385191
11:50 PM
...and so concludes an afternoon of learning and depression
 
user1385191
lesson learned, use git on company projects instead of nothing
 
@MattMcDonald \o/
So did we learn that no backups & no version control === RAQEQUIT
 
what happened :(
 
user1385191
I replaced a folder
 
user1385191
without backups
 
11:51 PM
well the POST failed to pass the params now i will try wraping it in data: {..}
 
user1385191
and had to rewrite from an older copy
 
@MianKhurramIjaz, yes use .fetch( {data: {name: "name", token: "token" } } );
it should work if im reading the source right
 
@Esailija you are.
It passes it to Backbone.sync and it then passes it to jQuery.ajax
 
can you point me out to where are u reading this source from ?
 
11:53 PM
sorry no luck
 
user1385191
so I wanted to get a grasp on it before implementing it
 
user1385191
the problem is I don't know much about git aside from the basics, and I'm the only "tech" person here
 
@MattMcDonald, same for me when I started
it's pretty quick to get the basics working - haven't needed the super advanced stuff yet
 
success
thanks i do receive them at my server through get request
 
cool
 
11:54 PM
Esailija: love u
 
u should love Raynos as well =)
btw how does jQuery change the way one writes javascript... it just becomes less verbose that's all ?
 
@MattMcDonald install git on linux, then just use git add. git commit etc
then search frantically on the internet if you ever need to roll back
 
Anybody know of a good resource for getting up to date on all the new flashy trendy coding ideas and standards of the last 3 years?
 
@Esailija nah it promotes spaghetti
 
@Raynos yeah that's what I mean... you have verbose spaghetti which changes to less verbose spaghetti :P
 
11:58 PM
so using jQuery changes the way you write javascript. You used to write elegant modular applications, you know herp derp your entire app into a single jQuery spaghetti code file
@Anfurny js specific? I can't tell you how to catch up, but I can tell you how to stay current
 
jQuery doesn't exclude you from using OOP frameworks
 
but the view never gets populated with this new fetch()
 
like BarFoos :p
 
@MianKhurramIjaz is that because the view doesn't listen on the fetch event ;)
@jAndy talking of BarFoos I was going to fix that :D
 
@Raynos: fix what :o
 
11:59 PM
exactly how to make him listen what syntax i.e.
change: function() {
 

« first day (418 days earlier)      last day (4524 days later) »