« first day (864 days earlier)      last day (4102 days later) » 

12:00 AM
then it isn't an arrow
 
rlemon, you're drunk
3
 
0
Q: Including Javascript options

Ben JacksonFor a Wordpress Theme I know javascript files (ending in .js) must be included using wp_enqueue_script in functions.php but how do I include additional javascript code, for example say I need to add this: jQuery(function($){ jQuery.supersized({ slides: [ 'http://...

 
yes i am
 
Ha, i just got a job offer in San Fran
 
@phenomnomnominal Jerk
 
12:01 AM
I'm not going to drop my masters and move halfway round the world for a startup haha
 
I never get job offers. I did just get an email from an arabian prince telling me he would split a large sum of money provided I help him launder it. I was reluctant at first but as soon as he told me all I needed to do was give him my banking and credit card information I was sold. Easy Money ;)
 
@IvoWetzel It's interesting but it's not finished, I actually like the way he explains things although I'd be a little more graphic with the Huffman tables
@rlemon do you watch community (specifically the last episode)
 
@rlemon did you see the last community?
@BenjaminGruenbaum, haha ninja'd
 
Wait Woah :O How did that even work?
@phenomnomnominal would you for 80K (a month)? (move halfway around the world)
 
@BenjaminGruenbaum, obviously haha
Even if the startup only lasted a month haha
 
12:04 AM
If they're handing out 80k, they deserve to last a month
 
If I left now, I'd have to pay back my Masters scholarship so that's a bit of a downer
 
What about 40?
 
40k a month?
 
no I do not
 
12:05 AM
If I wasn't doing my Masters I'd move for 10k a month
 
if it is not on netflix - I haven't seen it
 
I actually think it is on netflix
 
checking now
 
@rlemon, do yourself a favour, watch the whole damn series. It is by far the best thing in the world.
 
o_O
 
12:06 AM
Well, I just remembered it because of the Nigerian prince :)
 
by "some features" they mean all search and category functions
 
@rlemon, you broke Netflix!
 
thats enough interwebz for me
 
What about 20k but they make you code in vbscript for IE6, you get a pentium 4 computer and a 17" CRT screen?
 
2,573 hits today on Recoding. Thanks guys!
@BenjaminGruenbaum absolutely in 1998
 
12:09 AM
You may use javascript, but only stuff that is in ECMAScript 1
 
season 1, episode 1, 1 minute in - i'm not disappointed
 
The unsigned right shift operator ( >>> )
Wait, JS has that?
 
Yes
 
But not an unsigned left shift, or roll operators
 
Because unsigned left shift doesn't exist
 
12:13 AM
that makes sense :P
>>>= also in JS (actually it is)
 
> I discovered at an early age that if I talked long enough I could make anything "right"; So either I'm god or the truth is relative.
 
@rlemon, you are honestly in for a treat.
 
ProTip: Don't get drunk while sitting at the pc and forget you busted up your knee - getting up to get a beer just got bad real quick.
 
!!s/while sitting at the pc and forget you busted up your knee - getting up to get a beer just got bad real quick.//
 
@copy ProTip: Don't get drunk (source)
 
12:24 AM
but @SOChatBot it's so much fun!
no it's not: it's just full of despair and misery, Rap music videos lied!
 
And it causes mood swings
 
Wow, the first ECMAScript standard contains some serious mistakes :)
All fixed in 5.1 (well, obviously)
 
Why can't Elvis Presley drive in reverse? Because he's dead
 
Stop flagging the bot! (/゚Д゚)/
 
OK: am I going nuts, or is checking for a numeric length property on a variable of unknown type not a sensible way to determine if that variable is an array?
I mean, if an approach can be broken with trivial inputs then surely it's inadequate, right?
 
12:38 AM
....yes?
 
Its sensible if its not important...
well even then its lazy...
 
Specifically, it's how Underscore does it
 
@Dancrumb What if that variable holds a reference to a HTMLCollection?
 
@twiz my thoughts exactly; it's lazy and doing it the right way is pretty much a one-liner
@OctavianDamiean well now, there's a good counterpoint
 
Or a NodeList.
 
12:42 AM
however, the flip side to that is, what if it's an object describing a sports field and length is its length in yards
 
@rlemon: pretty nice css alerts there. only real caveat in my mind is that we can't remove elements from the DOM without js, so, for intense/long running apps, we still need a little js for that reason
 
you have a numeric length, but don't have numeric indexes
 
@Dancrumb or that yea
 
Well, I'm not sure it is so bad...
 
What if we are all just ketchup packages and the universe put two for one fry deal?
 
12:43 AM
It would be easy to have a problem with it, but you shouldn't be putting something stupid into each() to begin with... haha
 
@jAndy yea, there is that :P
 
@rlemon I thought about that possibility a lot. Many sleepless nights ...
 
@rlemon You mean there is a chance that we aren't?
 
the only answer for that is.... 42
 
Then I asked myself, what if unicorns didn't exist.
 
12:44 AM
thats just blasphemy
 
@OctavianDamiean you know, you've got me thinking... maybe there's no way to make a function that can take truly arbitrary entities with numeric indexes and iterate over it
 
I sometimes lay awake at night wondering whether or not we live in the universe, or the universe exists around us.
 
@Dancrumb If that's all you want then there is.
 
Which is: Does the universe exist because we will observe it? or do all possible universes exists and if not appreciated it would be like they never did.. but they still do.
Quantum Mechanics is really a mindfuck.
 
@rlemon Had a similar thought one night. I was wondering if the universe we're living in isn't inside of the stomach of a giant pony.
ping-a-pong
 
12:47 AM
it's possible.
 
@rlemon: you should give anthropology a shot
 
I have a buddy getting his masters in the subject. (ish, I'm not too sure his exact major, but when I ask he says that)
 
What should I give a shot then? The next psychiatric clinic?
 
its pretty much the science of.. "the fact that we exists, is an indicator of that our universe has to be exactly like it is.."
thats almost the same brainfuck as quantum mechanics, but on a much higher abstraction level :P
 
@jAndy Is that like a JavaScript to C relationship? :D
 
12:50 AM
of course
 
@jAndy my questions are stemmed on the quantum mechanics principal that matter is in an indeterminate state until observered (or loosely appreciated at least), therefore if a universe fails to lead to conscious(or sentient) life then it would fail to actually exist and remain in a state of flux.
 
the guys are crazy.. at first glance, its sounds pretty obvious .. "things have to be like that because we are here".. but... if you digg into it, there are some prettttyy ppretttyy awesome theories around it
 
I'm drunk that is the best explanation you'll get right now.
 
@rlemon: don't mess with schrödinger
 
It's not that it would fail to exist though
It would both exist AND not exist at the same time.
 
12:51 AM
@rlemon Who says you need to be conscious to be an observer?
 
@KendallFrey prove that you do not ;)
it's our the authors i've reads best guess.
 
When a photon interacts with (observes) a particle, does that mean the photon is conscious?
 
if no conscious observer appreciates it, does it interact with the particle?
 
Yes.
 
lol :p
 
12:53 AM
Quantum entanglement is a finicky thing thus yet not fully understood. so I'll give you that.
 
I think you got the A thus B backwards.
 
@rlemon Isn't that a bit like Schrödinger's cat?
 
I <3 drunk rlemon
@OctavianDamiean, it's all like Schrodinger's cat
 
@phenomnomnominal spoiler: rlemon past 7pm is usually drunk rlemon.
 
if I close my eyes... the world is gone... if I open my eyes again.. its instant there again, damn light must be lightening fast
 
12:55 AM
@jAndy, prove that it isn't
 
How the fuck is it possible for someone to find scientific evidence that the universe wont exist without observers?
thats a rhetorical question I suppose...
 
@jAndy On the other hand, you can't know for sure if what you observe exists if it is far enough away.
 
How do we know that the world we perceive, including all the history and backstory of everything and anyone we know or encounter or observe isn't created at the exact instant that we observe it?
 
@twiz from the best I can understand it's that all particles are in a state of flux until forced to act by an observer - I figure this means not an individual observer in all cases. but a observer able to appreciate their existence without actually observing them.
So the question is: if a universe exists void of life, does it actually exists (based on these rules of quantum physics)
 
Technically, people can only observe light and I duno.. friction? and certain traits of particles within nose/mouth...
 
12:59 AM
@rlemon That would imply that if there is no observer there would be no matter.
 
@rlemon life observes very little of the universe though...
 
you know whats funny... one of the most fundamental theories for the "big bang theory" is probably the "expansion of our universe". The nice thing is, that this expansion is just an interpretation of some folks, which is today like dogma. Even more funny is, that the founder of "red-shifting" in light spectrum, didn't believe in that theory of expansion
 
0
Q: Render arbitrary jade in express

SomeKittensWe've got a "catch-all" in app.js that renders a .jade file if it exists: app.get('*', routes.render); index.js render: function(req, res) { fs.exists('views' + req.url + '.jade', function(exists) { if (exists) { //substring: "/admin" -> "admin" res.render(req.url.sub...

 
@rlemon seriously some asshole just wrote that in a book so he could make money and the theory is too complicated for anyone to bother proving him wrong...
 
and I'm off. Fwoosh!
 
12:59 AM
no but this is based on assumptions that sentience is somehow tied into an ability to appreciate yourself in your environment and that there is a larger existence that you cannot observe around you. It's all mixed up from Hawkings and Einstein offered back by Kurzweil in his books.
 
even better, he wrote several papers and books about it.. that .. the red-shift of light, can never be called a "proove" of expansion
that is e. hubble of course
 
@jAndy yep. I consider science to be nothing more than a new kind of religion.
 
@twiz that is silly.
 
of course it tend to be more reliable than most religions... haha
 
@twiz: nah thats wrong
 
1:02 AM
Blindly following science, yes, maybe.
Just like blind faith.
 
Science is noting but faith that something will continue to occur the way it has been repeatedly observed to occur
 
@twiz That just because we got better at describing what we observe.
 
at least, we accept the fact that we don't describe "reality" or "truth", we rely on saying, that something is not "wrong"
which is way beyond any religion
 
Faith is the wrong word
 
some of this shit is atm only theories but it is based on scientific observations. It is still claimed only as theory however. not fact.
 
1:02 AM
Faith implies a lack of reason
 
Religions are toted around as fact.
 
@phenomnomnominal All I am implying is that it would be unreasonable to believe any science 100%, 99.9999% might be ok though... haha
 
"What I believe" is all for yourself. I have just told you what I believe and you are free to scrutinize it. However I do not claim it to be the one truth.
 
as I said, there is no truth in science
 
(not unless it is proved to be and accepted by the community)
 
1:04 AM
There is no reason to believe that gravity wont disappear tomorrow other than the fact that it never disappeared before.
 
just "its not entirely wrong", based on theory and experiments
 
That we know of...
 
Mass and gravity have a certain relationship we know of. This will not change unless some other factor changes the relationship or the mass changes.
the fact that we can prove time and time again the relationship is the science.
the unknown that said relationship CAN change is not being debated.
 
@rlemon yes, but you can't prove the future
 
but it would be unlikely.
no but I can prove the now
 
1:06 AM
@rlemon hence my 99.999% comment. ha
 
no, it's 100% NOW.
i'm still onthe ground
proven :)
 
Well first you need to prove that NOW exists... haha
 
you know spaceballs ? :p
"we are now in the now"
 
1:07 AM
 
The conversations in here get a bit crazy with a drunk lemon...
 
!!s/drunk//
 
@rlemon The conversations in here get a bit crazy with a lemon... (source)
 
!!s/crazy/crazier/
 
@twiz @rlemon The conversations in here get a bit crazier with a lemon... (source) (source)
 
1:12 AM
0
Q: Render arbitrary jade in express

SomeKittensWe've got a "catch-all" in app.js that renders a .jade file if it exists: app.get('*', routes.render); index.js render: function(req, res) { fs.exists('views' + req.url + '.jade', function(exists) { if (exists) { //substring: "/admin" -> "admin" res.render(req.url.sub...

 
Peggy had many valentine cards while I only had one. Peggy is a whore
 
Care to have your life ruined? games.337.com/en/gameplay/cat_mario_
 
1:31 AM
is this the correct way to create a cookie? document.cookie='name=firstCookie; val1=randomValueText; expires='+50*365+'; path=/';
 
ppk?
 
In related news, Googling for "PPK cookies" results in three cookie recipes and then the above article.
Peter-Paul Koch
 
Any graphic designers in the house?
 
Your mother.
 
1:41 AM
:o
 
@phenomnomnominal Actually, quite true.
 
lol
 
Problem is, she doesn't know how to design .png files
 
What, exactly, are you looking for?
 
do you design png files?
 
1:45 AM
@Howdy_McGee I can sort of design things that could be .png files
 
hey guys does anyone no how to change the width value of a div from pixels to percentages in a minified code?
 
@RyanKinal Like a street sign, except one end's an arrow. goDormless is the "street name"
That help?
 
Yep
 
(though I want a white border, like an actual street sign)
I thought it'd be easy. GIMP said otherwise.
 
ROT13 is sufficient encryption
 
2:13 AM
 
@Neal fine, fine. you?
 
@SomeKittens
 
My Paint skills are once again outdone.
 
@RyanKinal one tweak, if you don't mind. Can the text be goDormless
 
Yep, changing that now
 
2:17 AM
I like the font you picked
 
It's Arial :-P
I was surprised too, lol
 
Bold, obviously, because mine is Arial too.
 
Do you mind if we use it?
 
Wouldn't have posted it if I minded ;-)
 
2:20 AM
I thought so. Thanks!
 
No problem
 
This is probably the best art I've ever made.
 
@KendallFrey That's pretty sweet
 
Oh my god, I've spent an entire week dealing with config issues in Eclipse and Visual Studio. How tf do people work like this?
 
2:27 AM
@ErikReppen The give me beer at my workplace.
 
vim + gcc + make = anything
 
If I didn't have beer, Visual Studio would be far worse.
... on the other hand, if the MS devs didn't have beer, VS would be far better.
 
So far, I've written a Node.js app that converts tokenized versions of 21 config files I can use to swap out all the repeated BS in the config files but now VS just randomly reverts files and settings on me. It's like every success I have against this beast is just an open door for new BS to begin.
 
Don't forget the Ballmer peak.
 
@KendallFrey Remember Windows ME?
 
2:29 AM
I would have been about 5.
 
@RyanKinal Well it didn't help that for some fucking reason the original jackasses who put this app together decided to make it a multi-solution app which I discovered is actually advised against by MS themselves.
 
(no)
 
@KendallFrey It's a quote from the Ballmer Peak comic ;-)
@ErikReppen Ah. I see. My condolences.
On another note:
> if you’re ever feeling lazy just remember that the ancient greeks believed their gods lived on top of a very climbable hill but no one even bothered to check
 
Looking at some of their old docs they're all hyped up about making everything highly scalable. This was their solution. A triple-stack of .NET, Java, and Ruby all put together with every freaking conceivable pattern designed to make their code completely unintelligible and pointlessly compllicated.
 
lol, yep. Sounds like the MS stack to me!
 
2:32 AM
A single component of a web service, like 20 classes. WTF?!
Hang on... beer... Ahhhh.
 
Hello there! I think either I'm blind and there's an error with the following code, either Flash (doing ActionScript; pretty similar to Javascript) is having problems computing "minus a negative number" (because in this example, deplBase = -3).

if(voiture.y>=stage.stageHeight/2-deplBase*1.1 && voiture.y<=stage.stageHeight/2+deplBase*1.1) { [...] }

So uhm,

1. Do you see an error?
2. If not, how can I circumvent the issue of the program not being able to read "minus negative number"?
 
@ErikReppen Cheers!
 
The Java's just as bad. Building a single modal involves six config files and at least a dozen JSPs, JSPFs, etc.. The Ruby was just... I don't even know. Resume fodder I guess.
@RyanKinal Skaal
And what am I doing? I'm wrapping the config process in Node. That's just sick and wrong. Node should be lopping pieces of this behemoth off and replacing it, not helping it to live on.
 
@Ariane Could it be operator prececdence?
 
Why would it have a problem subtracting a negative number though?
 
2:36 AM
@ErikReppen It's the enterprise way. All hail enterprise.
 
@Kendall You mean, how * is treated before +, for example? Doubt it. The result is "NaN" anyway, so.
 
@Ariane Which result?
 
@Erik Dunno. It's Flash. Maybe it sees minus, and then another minus, and decides it's a string. Flash isn't very smart in general.
 
Waitaminute
 
@RyanKinal I've actually seen worse. 200 offshore guys from Infosys jumping up and down on a server-side mostly built on a modified version of websphere without version control. Entire sections of the site that nobody was working on would just sorta mutate. It was the UI team's job to bend fold and mutilate everything back into place every day.
 
2:38 AM
If deplBase is negative...
Then your condition can't be true
 
@SomeKittens I like the amount of effort you put into the current logo you have up. haha
 
@Ariane I would try wrapping the math in parens to separate it from the logic. I wouldn't expect trouble from order of operations in that scenario but just in case something is trying +,/,*,- a true or a false somewhere.
 
Wait, no. I'm wrong.
 
@twiz Yep. See why we needed a new one?
 
Or maybe I'm right
 
2:41 AM
The MSN Enterprise, Don't touch those DLLs or it's evil bizarro universe for you.
 
@Ryan When I trace (=alert) it asking it to calculate values with the following:

trace('if(voiture.y>='+stage.stageHeight/2+'-'+deplBase*1.1+' && voiture.y<='+stage.stageHeight/2+'+'+deplBase*1.1+')');

I get the following:

if(voiture.y>=200--3.3000000000000003 && voiture.y<=200+-3.3000000000000003)
 
Math is confusing when I've had a bit to drink.
 
@Ariane What result?
 
@Ariane Wait a minute, what's that '-' in the middle there?
 
@Ariane Which is approximately equivalent to "greater than 203 and less than 197"... which is impossible
 
2:43 AM
@SomeKittens yea, might be a good idea. How much you have done with the site so far?
 
Oh, NM. the trace. Sorry. Drinking.
 
@Erik Cuncatenation, to display a '-' instead of calculating it.
And if I ask it to do the results further in, with the following:

trace('if(voiture.y>='+stage.stageHeight/2-deplBase*1.1+' && voiture.y<='+stage.stageHeight/2+deplBase*1.1+')');

I get the following:

NaN && voiture.y<=200-3.3000000000000003)
 
Yeah, just figured. Sorry.
Ah NaN my old friend.
 
So the evaluation of 200 -- ~3.3 is NaN.
 
@twiz Quite a bit, but still a long way to go
 
2:44 AM
Whilst it should be ~203.3.
 
Can you reproduce it with a test case?
 
You mean, directly putting the numbers inside another If? Sure.
 
@Ariane In your trace, parenthesize your mathematical calculations. They might interact with concatenation in strange ways.
 
I really hope flash disappears very soon.
 
@twiz Soon, but not "very" seeing as I'm still seeing it at school right now.
 
2:46 AM
and they don't try to prolong the death of AS3 by making it some kind of converter to HTML5 canvas or something...
@Ariane what do you mean by seeing it at school
?
 
Being taught ActionScript 3.
 
Sometimes, streaming hockey sucks.
 
@Ariane, -- doesn't really make sense there. That's like saying (return 199) ~3.3
 
@Erik -- = + no?
 
well that's still reasonable anyway. Its still useful since I assume lot of people will be wanting flash converted to canvas.
 
2:49 AM
No. It's a decrement.
Take the thing and return it's value - 1
 
Quite contrary to my mathematics notions
 
You'll see ++ and -- in code a lot.
 
actually value-- is "take thing thing, set it to value - 1, but return value"
while --value is "take thing, set it to value - 1, then return it"
 
But in any case, this should cause a silly calculation, not a NaN, right?
 
This is true. That's why while(i--) works with array lengths. I figured I'd dumb it down in step 1.
 
2:51 AM
But that's not even the problem. Or, at least it shouldn't be in any sane implementation.
 
Actually I take back what I said about the death of flash. I just want AS to be replaced with JS.
 
All proprietary plug-in tools on the web must !@#$ing die. And yes, JS should crush them and hear the lamentation of their women.
 
Update.

trace('if(voiture.y>='+200-(-3*1.1)+' && voiture.y<='+200+(-3*1.1)+')');

gives

NaN && voiture.y<=200-3.3000000000000003)

Note how it displayed "200-3" instead of displaying 197. Having a problem here as well it seems. It cuncatenates instead of adding properly.
 
Generally speaking @Ariane -- doesn't make much sense on a non-var unless you're really really lazy.
 
Ariane: can you give me some example values for your voiture.y, deplBase and stageHeight?
Erik: ++ and -- generally don't even work on non-vars in JS
 
2:54 AM
@Erik Well, it's "minus the movement value" which can be positive or negative, considering it can be moving up or down. :/
 
Check it out: It's not the result that's NaN, it's the concatenation that's NaN. jsbin.com/ezumec/1/edit
var stageHeight = 400,
    base = -3;

console.log(stageHeight/2-base*1.1); // 203.3
console.log('if('+stageHeight/2-base*1.1+')'); // NaN
 
@Daiz Ah, good point. I just assumed they would.
 
@Ryan Then what should I do?
 
var stageHeight = 400,
    base = -3;

console.log(stageHeight/2-base*1.1); // 203.3
console.log('if('+(stageHeight/2-base*1.1)+')'); // 203.3
 
@ErikReppen I like the way I used to use flash back in the day when doing everything programmatically with AS3 wasn't the cool thing to do. It was a weird/awesome blend of programming and graphic design.
 
2:56 AM
parenthesize :-D
 
Here's one of my favorite WTFs in JS:

200..constructor.name;

"Number"

WTF?!
 
@Ryan I did.
 
And it's still NaN?
 
@Erik: You can do some funky things with them, though - open your browser's JS console and run the following: ++[0][0]
you'll get 1
 
Well, 200-(-3*1.1) is NaN.
 
2:57 AM
@twiz I have nothing but respect for people who were/are badass at Flash. But I hate the proprietary plug-in factor.
 
@ErikReppen You know whats even more WTF... someone putting 200..constructor.name; in javascript.
 
@Ariane Are you sure?
 
@Ariane No, ""+200-(-3*1.1) is NaN.
 
@Erik that's not even much of a wtf, it's like being surprised that "str".constructor.name is "String"
 
Update.

trace('if(voiture.y>='+200-(-3*1.1)+' && voiture.y<='+200+(-3*1.1)+')');

gives

NaN && voiture.y<=200-3.3000000000000003)

Note how it displayed "200-3" instead of displaying 197. Having a problem here as well it seems. It cuncatenates instead of adding properly.

Quoting what I said above. Quite sure. oo'
 
2:57 AM
@twiz Number literal is just an object like anything else. You just have to trick it into letting you use the . property access on it.
 
@ErikReppen for sure. Just saying I used to really like the software, but the proprietary plugin non-sense is just awful
 
Parenthesize the entire numeric expression.
 
^ that
 
I'll try
 
('if(voiture.y>='+(200-(-3*1.1))+' && voiture.y<='+(200+(-3*1.1))+')');
 
2:58 AM
It... Works! In the trace. Gonna try it in the actual if now.
 
Because 'if(voiture.y>=200'-3.3 is NaN.
 
@ErikReppen I meant why would that ever cause someone a problem. If I ever consider ".." to be a good idea, jsut kill me haha
 

« first day (864 days earlier)      last day (4102 days later) »