« first day (382 days earlier)      last day (4583 days later) » 

9:00 PM
Below your inclusion of the jquery library, above the script block that contains ready... that would be marginally faster, but risks executing before the DOM tree is built
You are best off doing as Matt suggested and hiding the elements via CSS
 
I’m just thinking about where I can do that.
I have a bunch of divs inside one big div,
they are hidden, and then they slideDown() when a link is clicked
if I set that div to display:hidden; it won’t allow the user to see the nested divs when JS is off.
 
user1385191
right
 
Tell people with javascript turned off to stop being pussies
 
I’m well aware of that hahaha
 
user1385191
when JS is off, you need to fall back to a static "default state"
 
9:03 PM
Yes, Matt - that’s the idea.
@Chris Tempted to “star” this haha
 
user1385191
so, is this behavior critical to the page, or is it sugar?
 
well, this is one problem - the other is the drop downs
they are a pain
you can clearly see them flash on page load.
by “flash” I mean suddenly appear then disappear.
 
user1385191
some sites tend to work better with JS turned off
 
user1385191
which means erroneous design
 
well, technically it all works fine
except for one piece of code which i genuinely can’t get to work.
 
user1385191
9:06 PM
you need to decide how important hiding these elements is
 
I might have to just use CSS drop downs for now.
the flickering effect does annoy me...it’s kinda messy.
 
user1385191
it's the flash of unscripted content
 
user1385191
because you're loading a lot of js
 
I’ve got 4 includes after the jQuery (from google)
 
...
 
9:11 PM
and then about 40 lines of very loose code,
 
<noscript>Turn your javascript on, pussy</noscript>
 
user1385191
you're relying on JS to style your page
 
which will eventually be one line when I’m done.
 
user1385191
which is wrong
 
Tellin' ya.
 
9:11 PM
Meh.
Cant we just write nice HTML & CSS
 
No
 
where is the fun if nothing slides around?
 
That's just what your mom was telling me last night
:P
 
I thought this was JS, not a comedy chat room? :P
 
user1385191
keep the flashy effects to where they're actually meaningful
 
user1385191
9:13 PM
for example, twitter slides out a "pane" when you click a user instead of just going to their profile
 
They are...just allow for better sorting of content
 
user1385191
it's an oft-buggy feature
 
and a couple of sliders.
and drop downs that slide? It’s pretty basic stuff?
 
What do you actually need?
 
Hi Raynos, I would just like the JS to take effect faster.
Do you think the load from Google will slow it down much?
I really have no idea.
(obviously)
 
9:16 PM
What do you guys think of this approach: learningjquery.com/2008/10/…
That would solve the "flash" problem for javascript-driven content areas, but I think it is adding a pretty wonky workaround
And it doesn't really "solve" it... just mitigating it slightly. Things could still take long enough that it doesn't work.
 
It works with JS off and seems to hide it instantly to me, I don’t see the yellow list.
 
That's what I'm saying... it is mostly effective in addressing the problem you're working on, but the way they achieve it is somewhat questionable
 
yes, I see....it’s different from what I currently have that’s for sure.
 
@Dan define "faster"
 
I’m using .hide() to hide a few large divs, and I’m also adding some CSS to drop downs to hide them. There is a momentary flicker while this takes place. On a slow connection speed it looks very bad though.
 
9:25 PM
This is nasty and probably not WC3 valid, but I believe it works: <style>.initiallyHidden { display: none; }</style><noscript><style>.initiallyHidden { display: block; }</style></noscript>
 
I see
is this flicker because your the javascript kicks and restyles the thing?
@Chris ew, hack.
The real way to avoid such "flashes" is not to hide content with javascript
 
Yes, hack
 
Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic HTML markup, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth, more advanced browser software or more experience an enhanced version of the page. History "Progressive Enhancement" was coined by Steven Champeon of [http://www.hesketh.com hesketh.com] in a ser...
 
Ideally, a progressively enhanced menu would simply be visible for users without javascript enabled
His issue is that he wants to avoid the hide-with-script flicker and progressively enhance the menu
 
Yes, I’d say that fix is a step too far haha
My issue is a combination of trying to be a perfectionist and having a fussy client.
Recipe for late nights and disaster generally.
 
9:28 PM
No, this does come up frequently enough
I think most developers would either go with a "meh" or "people without scripts on are pussies" response. There does have to be a middle way that doesn't involve a hack
 
@Dan again why hide things with javascript? :S
 
so I can make them slide open when clicking on something else.
 
why not hide them with css
 
Because then they're hidden from people who don't have javascript
CSS hidden - no javascript to remove the hiding... not visible
Thus the noscript hack
 
Oh then the fix is easy
 
9:33 PM
Do go on... :P
<noscript>Turn your javascript on, pussy</noscript>?
 
lmao
 
That was a very anti-climatic announcement, Raynos
 
Indeed, I’m still holding my breath.
 
Oh, I know the answer!
/leaves room
 
Well, don’t worry there is more than one problem ; )
Perhaps you could tell me why .stop() breaks some of my animations?
 
9:37 PM
<head>
    <script>
        var sheet = document.styleSheets[0];
        sheet.insertRule(
            ".js-hide { display: none; }",
            0
        );
    </script>
</head>
I had to double check I got the API right.
You basically add a new class/rule into the sheet using javascript before the <body>
and slap "js-hide" class on everything that only needs to be hidden using js.
Of course there are edgecases like the sheet needs to writable. (Some third party style sheets might not be writable, like google fonts declarations)
Oh and I would not be suprised if .insertRule balls in IE
 
0
Q: <select> has extra blank <option>'s and I have no idea why. please help me get them out.

Simon![this is the result of the code it has extra option tags no idea why.][1] i.stack.imgur.com/Y5AZJ.png please help I have no idea why It produces the extra option box. Below is the result of the query. correct number of rows correct response... ParentID Parent 1 Pipe 2 Valv...

0
Q: Firefox generating error?

LyndaI run Firebug on my computer since I develop websites. And I have been noticing this error consistently with every page I go to and I am lost as to what it is and believe it might be Firefox causing this error. Has anyone seen it before? Here is the error: An exception occurred. Traceback (most ...

 
Sounds promising, really :P
 
Yep insertRule balls in IE8
 
in 8?
No hope for 7 then : \
 
That is sort of the solution presented in that article I linked to
<style type="text/css">
  .js #flash {display: none;}
</style>
<script type="text/javascript">
  document.documentElement.className = 'js';
</script>
 
9:42 PM
@Dan it means you need a different API call ;)
 
@Raynos Just remember, you know more about this than me ; )
But what I lack in skill I make up for in enthusiasm ; )
 
All you need is a CSSOM shim :D
Meh, ill try being cross browser
var ss = document.createElement("style");
ss.type = "text/css";
.... screw this. I hate IE.
@Dan use the one @Chris linked :D
 
the “pussy” one?
Or the other option?
 
The .js #flash one
 
The pussy one, the pussy one!
 
9:47 PM
ok, I’ll take a look through that in more detail once I have tidied up my code a little more
any idea on the other issue I mentioned envolving .stop();?
 
Also add browser detection and tell anyone on IE < 10 that they are responsible for the death of their most recent family member that died.
That'll teach 'em
 
How about displaying nothing but a picture of a goat?
or maybe a goldfish?
 
Make it goatse and we're talkin'!
 
That would make them feel exactly the same as me,
“wtf"
 
9:49 PM
(if you don't know what that is, do not check)
 
(click resume)
(have webgl)
 
@Ivo
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.getContext]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://dl.dropbox.com/u/2332843/Ikar/Three.js :: <TOP_LEVEL> :: line 8969" data: no]
console.error( error );
Three.js (line 8985)
_gl is undefined
[Break On This Error] _gl.clearColor( 0, 0, 0, 1 );
Balls
No GL
 
dun dun
 
Who does have webGL implemented right now?
FF Nightly?
 
FF, Chrome and hm
nobody else I guess
you also need a graphics card with support
and it doesn't work on XP
the white "LASER" rotates to show that it stops at red boxes (enemies)
the other "stuff" is good old bullet hell... bullets
 
9:55 PM
Things that don't work in XP are not interesting
 
Oh dear god
I've been sucked into the es-discuss "hurr durr class" dance
@Zirak you should get on es-discuss and rage about class and why its the devil
 
@Raynos QUick! On which side do you stand!!!!
You've got 3 seconds before...
 
<-- pro-classes
kind of
 
@IvoWetzel that is broken
@IvoWetzel I dont use classes
I want object examplers
 
@Raynos es-discuss @ mozilla?
 
9:59 PM
var Child = Parent <| {
  constructor(a) {
    super(a);
  }

  method() {
    ...
  }
}
@Chris yes
 
user1385191
that operator is so terrible
 
What is that? <|?
 
user1385191
it looks like a white flag, literally
 
Fine.
Parent beget { ... }
or Parent protos { ... }
 
It looks like my 9th grade math teacher standing sideways
 
10:00 PM
hasn't the real stuff been moved into a gist by eich?
 
thats the classes stuff.
im talking about needing moar object exemplars
object exemplars are more important
 
If there were a simple mechanism to extend one prototype with another without having through loop properties and junk, I think I'd be satisfied with no additional "class" paradigm
 
who was the one here what did stuff with particles etc et i html5 and javascript?
Wasnt it you @Raynos?
 
@Chris its called <|
 
What could one achieve with "classes" that is not achievable through function constructors? You've got the ability to do private and public methods through closures/this.myFunc... what else is there?
 
10:04 PM
// this
var Child = Parent <| { ... }
// same as
var Child = Object.create(Parent, Object.getOwnPropertyDescriptors({ ... }))
@Chris nothing, classes are sugar. thats it.
 
Sugar, maybe, also a sort of way to namespace code
We already have it all
I've changed my mind, I do not support classes
 
but closures and prototypes and all that stuff confuse classical oop'ers :P
 
I think the prototype system is as clear as inheritance/interface, and I think it suits DOM better
 
@raynos ,if i was correct it is you who liked this stuff: lights.elliegoulding.com
 
This all seems to come from some mistaken idea that all languages must achieve OOP in the same fashion, I think that's a misnomer.
 
10:07 PM
truth be told, javascript object stuff can be pretty confusing -- mostly because it tried to cater to the people who have to have a class in order to understand anything
if it fully, obviously and exclusively supported prototypes from the start, things would be a lot clearer than they are now
 
@Chris ...
classes still use prototypical OO
// sugar
class Foo {
  constructor() { ... }
  method() { ... }
}
// same as
function Foo() {
  ...
}

Foo.prototype.method = function () {
  ...
}
 
you could be like "this is how you do oop in javascript. don't like it? go back to java." and people could still use it without the oop aspects, and in large part wouldn't have to care whether they're prototypes or classes
 
Yeah, as you said, they're sugar. As such, it would be frustrating to see a bunch of BS added to the API to essentially translate existing functionality into a different terminology that might even be creating false analogies
 
^
 
@Raynos - I am pretty familiar with the class-in-javascript ideas... looks like it is exactly like mootools does it
That code you posted (the class declaration) could be copy/pasted into mootools
 
10:13 PM
Yeah it can be
But I find function.prototype a pain in the ass.
 
new class Foo ({
extends: Bar,
initialize: function () { ... },
method: function () { ... }
})
That's a valid mootools class, extending Bar()
initialize is called as the constructor
No way to make private methods there
 
You dont need private in prototypes.
Because there is no private
 
If the whole "class" thing happens, there would have to be private entities or it isn't "class-like" enough and again not even worth the effort
 
...
 
user1385191
from idiomatic python:
 
10:21 PM
No.
 
user1385191
> There's a concept in Python: "we're all consenting adults here". If you use the __private form, who are you protecting the attribute from? It's the responsibility of subclasses to use attributes from superclasses properly, and it's the responsibility of superclasses to document their attributes properly.
 
That's not how it works
"class" in javascript is not hurr durr java
"class" in javascript is a poorly named construct which is sugar for making prototypical OO
 
"class" in javascript doesn't technically exist. it's just fluff to appease class weenies.
 
Well something needs to exist
I've written pd because ES5 OOP is not good enough
 
I'm with you on that... but I'm saying that if ES is going to bother adding this class-to-prototype effigy for the slow swimmers, the lack of private entities is going to make the simulation incomplete and thus more pointless
 
10:24 PM
its not for the slow swimmers.
Thats not what class is for.
Class is simply a mechanism to make javascript oop easier
it has nothing to do with classical OO.
When we say "class" we don't mean "Hey we made it like Java for you"
 
Imagine that.
 
I want privates ._.
 
I want your privates
 
@IvoWetzel: ES5 can do privates, apparently: gist.github.com/1269991
Should be useful to you, since you play around with Node a lot, right?
 
@IvoWetzel no. You no get privates
 
10:27 PM
@Raynos - If classes are prototypes, if classes are sugar, then you aren't making OOP easier or even different, you're just putting a clown suit on it so it looks more like code some developers are more familiar with. Nothing is changing, and nothing is "easier", just different, and pointlessly so
 
@Chris it is easier :\
I dont want to clown around with two objects.
The problem is we have a constructor function and a prototype object.
 
Clown privates
 
I dont want to write .prototype ever.
 
@Raynos aren't you kind of in the wrong language for that?
 
ConstructorFunction.prototype is a pain in the ass.
@AndyE that's not how it works.
Again I'm just going to point people at the prototypes as classes article.
 
10:31 PM
Again, I'm just going to say "clown privates" because I think that is hilarious. Goodnight guise, see you later.
 
user1385191
I have a video of Dr. Rockso floating around in my head right now
 
user1385191
thanks to that phrase
 
Wow, that was fun
5 hours later and i'm home, with nothing accomplished.
they shipped the wrong device to the client.
 
10:52 PM
Maby this is a stupid question and i might not ask it correctly,if you understand it,if i dont ask it right,i would apreciate if formulize it to others so they also understand:
as for what i know , why isnt there a inbuild function for a categorie structure? in for javascript or even php (i dont know if there are other languages what do this)
like a menu navigation
 
they are called arrays.
;) but seriously. In other languages that have these in built features, they are not native to the language, but a feature someone or some magical company has offered and has made its way into a library or IDE as a drag and drop.
 
"common things" why arent they inserted to the primary used language, as discussed above abouth the oop and think in class methode coding.
as how i see it, when browse a website what have common information delivered like "news,downloads,web-links,surveys,faq" maby i think as an idiot but wouldnt it be easyer to multi-level stuff like that and intregate this to the mainly used libary, what ofcourse could be any language
 
so make the library :P
if you think it is a good idea and people will find it useful and time saving.
 
No you maby get me wrong, i currently dont now of any of these in-builded functions, but i am aware php inserted some of these to make the coding more effectively.but this is just some php resource.I could imagine any other kanguage could do
 
11:08 PM
if you think about it no language has what you are talking about integrated into the base language. if you are thinking about .net, remember that is a series of libraries.. not a language. php was first derived as a tool not a language. it has packages/libraries loaded into it
i think i understand you. which is you want some sort of RAD libs
 
We all have our own libraries of code we reuse. If you find yourself reusing it alot, add it to your's.
 
i try to find example what is php related...
 
uhh.
 
Did anyone else get a forced ie9 upgrade today?
 
php has a ton of libraries that made their way into it's base distribution much the same way ES is going to be integrating some functions first made popular by libraries like mootools and cowbell.
however i don't know of any in php that will generate a menu for you.
 
user1385191
11:11 PM
I think you mean DOM, not ES
 
yes sorry matt.
 
i got a voluntary ie9 update ages ago
 
user1385191
and the damage has already been done in regards to the DOM
 
disabled ie when he installed windows
 
just to give an idea of what i ment: What has changed in PHP 5.3.x

Most improvements in PHP 5.3.x have no impact on existing code
 
user1385191
11:12 PM
ES right now is being victimized by coffeescript
 
I hope everyone gets one, especially ie6 users ;-}
 
@wHiTeHaT that depends largely on what version you are upgrading from.
 
but in earlyer versions i read they "added" stuff to make specificly things easyer to generate.
 
don't know and don't care about people who can't be bothered to update stuff
 
11:13 PM
try to find some changelogs ;)
 
yes ofcourse @rlemon, but thinkng of beeing current
 
I only use it for testing, so was running an older version. It upgraded without asking. Maybe it is the "forced upgrade" I have heard they were planning to kill ie6 once and for all!
 
about fucking time.
 
   Added misc. new functions:

    ldap_sasl_bind(). (peter_c60@hotmail.com, Jani)
    imap_getacl(). (Dan, Holger Burbach)
    file_put_contents(). (Sterling)
    proc_nice() - Changes priority of the current process. (Ilia)
    pcntl_getpriority() and pcntl_setpriority(). (Ilia)
    idate(), date_sunrise() and date_sunset(). (Moshe Doron)
    strpbrk() - Searches a string for a list of characters. (Ilia)
    get_headers() - Returns headers sent by the server of the specified URL. (Ilia)
    str_split() - Breaks down a string into an array of elements based on length. (Ilia)
 
11:15 PM
God I hope so. It would be the greatest thing ever!
 
Yes stuff like that i mean @rlemon
 
ie6 has been a pimple on the ass of web dev for...what..10 years?
more?
 
they are all just lazy functions. or uprgades to the language as the server technologies and supporting technologies evolve.
 
Yes! Yes! I was running 8 and my system suddenly rebooted and installed 9 without asking me this morning!
 
php is not unlike jQuery in that respect.
@SinthiaV Microsoft has also named and fathered your first born son.
 
11:17 PM
maby it is justme thinking abouth some "lazy" function for navigating true a website
 
@wHiTeHaT but what do you mean by navigating? like a sitemap?
some fancy menu
you have to be much more specific
 
I would just be happy not to support old versions any more
 
no i mean, if i have sections like a news or a downloads or a FAQ and yes even a sitemap, my idea is that they all can run by calling "1 function" but just identify them as what they represent
 
@SinthiaV then quit bitching about updates and be glad they're getting automated :)
ie9 can emulate 8 and 7
so, no point in staying with 8
 
@wHiTeHaT surf php.net for a class that will do that.
phpclasses.net
 
11:19 PM
@cHao I don't think you understand I'm celebrating, if it is what I think it is
 
lol
 
in my oppinion it could reduce a website to more as 60 procent of server capicity
 
you'll have to support ie7/8 for a while still
 
@wHiTeHaT and where do you come up with these mystic numbers?
if you already have the code then why are we having this discussion? :P
 
I think they are going to do it to everyone. Now.
 
11:20 PM
yes a class for it is whati had in mind... but i wonder why such commonly used "classes" arent intregrated
what mystic numbers you mean @rlemon
 
because as much as you think it would be an improvement it is still too localized of a function to make its way into the distribution.
 
@wHiTeHaT php already has too much crap in it.
 
@cHao thankyou!
 
lol
 
@cHao , i never here you giving some positive feedback
 
11:22 PM
i love the language but the more and more i think about it the more i see php === cowserver with bells.
 
@SinthiaV IE9 doesn't run on XP - IE6/7/8 still have a few more years in them
 
@wHiTeHaT when there's positive feedback to be given, i'll give it. but frankly, you're asking for php to make coffee for you.
 
@rlemon yes it is what i also thought, but i think this could be somehow minimized? , just my opinion
 
@wHiTeHaT but are you not currently suggesting we add to the bloat
 
it can't have one function to do everything that anyone and their goldfish might want to do in a web site. it already tries, and fails miserably. it needs to be cut back rather than added to.
 
11:24 PM
Y U CONTRADICT?
 
I've been hearing a rumor for about a year now. I think most of the corporations and governments that are running old versions aren't on xp, but some NT build.
They are the ones I worry about
 
til recently i was taking care of a server that was still running nt4 :P
 
i have a work server on qnx4
 
Yeah. Ouch.
 
WHY U TALK ABOUT PHP
WHY U CLAIM ONE GOD FUNCTION IS A GOOD IDEA
WHY U CLAIM MAKING ANYTHING LOOK LIKE JQUERY IS A GOOD IDEA
 
11:26 PM
lol
 
WHY U MAKE ME CAPSLOCK
 
@cHao i understand that , but in speaking of "categories" how much differences in it there are, and wich one excist what is based on the most obivious working of the mind, i mean what is the easyest to understand for the mind?
 
@Raynos good questions
@wHiTeHaT That's your job to figure out.
 
it isnt php i discus , i just took it as an example
 
11:27 PM
@MattMcDonald by damage you mean QSA?
 
@wHiTeHaT for one, i haven't heard of this "categories" stuff til now. so obviously, there's something different about it than how i do stuff.
 
lol
 
user1385191
you know it
 
QSA isn't that bad.
At least it's efficient
 
user1385191
it's more of a philosophical problem
 
user1385191
11:29 PM
the API does what it's supposed to, but it caters to a base that really just needs to learn the DOM
 
point i mean is , some stuff makes simply sence couse that is how a humans brain works, the idea abouth "categories" is that this spicific lol 'categorie' isnt added somehow to any language (that i'm aware of)
 
user1385191
that post didn't make "sence"
 
user1385191
or sense
 
@wHiTeHaT there's a reason for that. probably a bunch of reasons. biggest one i can see is, people aren't going to agree on what these "categories" are
can you even explain it?
 
@chao i think you understand exactly what i mean but you make a point of that people going to be agree
or not going to agree
 
11:34 PM
@wHiTeHaT actually, i don't. what you're talking about isn't making much sense to me at all.
 
user1385191
I just see a bunch of typos and "categories"
 
it is ok... you will go see.. sooner or later it will be go added.and you go use it
it is a psychological decission what go be taken
like an on/off button
 
0
A: javascript class inherit from Function class

RaynosYour trying to inherit from Function. This is a right pain to do. I suggest you do the following instead Live Example var Proto = Object.create(Function.prototype); // for some value of Object.extend, see example. Object.extend(Proto, { constructor: function () { // this is your construct...

@MattMcDonald are you sure?
I mean. do we really need to walk the DOM to find objects?
sure if you can use gebcn or gebtn then use them.
But sometimes its convenient to use a selector API to get a set of elements then do manual tree walking.
Its also faster to use the selector API then to do the manual tree walking
 
Weird, the Microsoft site says you are supposed to get the option to refuse the IE9 update, but that it will be offered to all administrators. I wonder why I didn't get the option.
 
i better stop predicting lol
 
11:43 PM
Why doesn't someone who can compose an english sentence pick a topic.
 
@SinthiaV what topic?
 
0
Q: Colision detection between a sprite and rectangle in canvas

AndyI'm building a Javascript + canvas game which is essentially a platformer. I have the player all set up and he's running, jumping and falling, but I'm having trouble with the collision detection between the player and blocks (the blocks will essentially be the platforms that the player moves on)....

 
@SinthiaV whats wrong with IE9?
 
Nothing. I wish they would get on with it. I prefer Firefox, but I am just sick of supporting ancient browsers
I got excited for a minute thinking maybe they are going to force it on people still holding onto ie6
Their site says you are supposed to get the option, but I didn't.
 
11:59 PM
I'm thinking about adding a notification div to a page that only shows sometimes (like StackOverflow). Do you think it's worth adding the JQuery overhead just for the fade-in/out?
 
... it's never worth adding jQuery overhead
 

« first day (382 days earlier)      last day (4583 days later) »