« first day (1035 days earlier)      last day (3913 days later) » 

2:00 PM
and what probably that????
 
probably that english spoken not but who understand am right you
 
devdocs.io - Just keeps getting awesome!
 
@mikedidthis thanks a lot for letting me know about that dang compo
I spent my whole day yesterday working on entries lol
 
I saw a few I could probably make... but who has the time :/
web development is such a PITA
 
user1125394
document.getElementById('o'+i).getElementsByClassName('value')[0].innerText=new‌​value;
 
user1125394
2:04 PM
hope it's acceptable, else screw you
 
you gotta buy me dinner before that happens.
 
@Loktar not a problem. I saw this one: jsbin.com/akorem/5 that really messes with my eyes.
 
@mikedidthis wwhat's wrong with that fine crosshatch pattern?
JK, I can see the flicker
 
@JanDvorak does it not make you sleepy?
 
nah
maybe I don't have a powerful enough GPU
 
2:10 PM
@Loktar Fun, isn't it? :D
 
idea: each time a line scrolls out of view, randomly change a few characters to visually similar ones, then force them to reread that line
 
@Mokkun hi
 
@Somnath yo
 
@ going to conference room wait 5 min
 
Yeah its pretty fun
 
2:21 PM
nasty hacky code is the best kind
 
Hahaha
 
@RyanKinal Really just an issue with our representation of base 10 numbers.
 
@IvoWetzel Also true
 
@Mokkun hi..
 
Scala is also not compiled... — Florian Margaine 12 mins ago
am I the one who's wrong there? (read the comments)
 
2:32 PM
@FlorianMargaine It's compiled. :P
In order to run a Scala program, you have to first compile it.
No such compilation needs to happen before a programer can run a Javascript program.
 
@FlorianMargaine You're wrong. It's not (necessarily) fast though
 
Some automated compilation process may happen in the background to improve performance, as happens with Chrome's V8 engine, but no explicit action must be taken by the programmer.
 
@Mokkun yes you can use this.parent()
@Mokkun i will meet u tomm ..u known jquery i tooo hv interest in jquery in know it
 
i'm pulling out !important more than I would like
these guys wrote the most effed up CSS
 
bloop
@rlemon did you finally get a deliverable from those guys?
 
2:43 PM
@rlemon in future, just tell us what these guys did correctly :D
 
@Michael JS is compiled
it's just done by the browser
 
omfg I love the command line
 
You're almost 30 and realize that now?
 
It just dawns on me from time to time
 
@FlorianMargaine That's up to the browser. The browser is not required to compile Javascript code. It's just that most (all?) modern web browsers do it for performance reasons.
 
2:48 PM
I've loved it for a very long time now, it's just that the power of it reveals itself sometimes.
 
@Shmiddty tl;dr - we did. it didn't include a backend. and 99% of the content had to be changed (fixed) and 40% of the layout
@mikedidthis nothing it seems
 
@Michael so... it's compiled. You could write a scala interpreter too, you know.
 
their responsive code is fucked.
 
For instance, we're having some mercurial repository issues because people refuse to learn how it works. With the GUI, my coworkers were unable to fix it. With the command line, I'm making progress.
 
they assume first mobile, then they adjust for larger widths. I'm used to seeing it the other way around
 
2:49 PM
@FlorianMargaine Javascript is (often) compiled, but it is not a compiled language.
 
@rlemon that's how it should be done though
 
ohh, let us not forget they didn't realize you could group rules.
 
@rlemon @FlorianMargaine speaks the truth.
 
@Michael what's a compiled language then? not a language that runs through a compiler?
 
@media (min-width: 40em) {
  .tablet { display: none; }
}
@media (min-width: 40em) {
  .tablet-text { display: none; }
}
 
2:50 PM
Progressive enhancement.
 
@FlorianMargaine A language where you have a compile step
 
@FlorianMargaine A compiled language requires the programmer to compile the program before he/she can execute it.
 
@rlemon yeah thats how I would do it.
 
eh, I know. but it is so hard to alter their styles.
maybe it is not how they did the progressive enhancements - just the sloppy css.
it just all looks so wrong
 
@copy what if the compilation step is automatic?
 
2:51 PM
yeah, maybe.
 
i.e., run by a computer, not you
 
@FlorianMargaine -_-
 
@FlorianMargaine Then no
 
@copy so if I run a watcher on my C code, C is not compiled anymore?
 
@rlemon maybe your boss will just go to you from now on
 
2:52 PM
@FlorianMargaine But you still have to run the watcher.
 
@Michael you still have to run the browser.
 
That is a manual step that you have taken in order to automate the compilation.
 
@FlorianMargaine It's actually hard to say. There are C interpreters and there might be JavaScript to machine code compilers. I guess what counts is the most commonly used tool
 
@copy that's what I'm saying... any language is compiled according to your definition
 
@FlorianMargaine There is no way to check your code for errors without running your code.
A compiled language checks your code for errors before it is executed.
 
2:54 PM
@mikedidthis I mean, there shouldn't be cases where I have to use !important; to fix their stuff.
but if I do not, I have to re-structure/factor all of the code
 
@Michael you're going out of your way there
because any code is syntaxically checked before being executed
 
@FlorianMargaine The definition: There is a necessary human compile step works
 
@copy Meh. Doesn't suit me.
 
Except if a language is shipped with interpreter and compiler
 
What about automated build processes?
 
2:55 PM
@RyanKinal my point exactly...
 
I give up
 
Hooray!
 
@FlorianMargaine What's that have to do with anything? I'm talking about checking your code before the programmer executes it.
 
for me, a compiled language is one that has a compiler going through the code to machine code right away, generating a binary that can be run
 
As in dynamic vs. compiled.
 
2:57 PM
@rlemon yeah, its a lesser of two evils I suppose
 
@envysea Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
meh... Scala is just as compiled as my browserify-code then, it doesn't have its place in the question
 
@Esailija wat?
@Benjamin, OCP is not just for classes. It applies at the function level too. If you unnecessarily require code at any level to be changed in order to be extended, that's an OCP violation. — Karl Bielefeldt 44 mins ago
 
LOL
I am writing a reply
 
I don't even..
 
2:59 PM
> In other words, prefer adding code to changing code.
...
I'm not sure :|
 
"I read uncle Bob so I must use things like SOLID everywhere, although I don't understand them"
 
I am thinking of replying this
First of all, in Javascript you get OCP for free everywhere. You need to do some serious
deliberate actions to make something in JS not extensible from outside. Secondly, OCP being applied
to non classes is completely irrelevant to `==`. Explain how for example having
unnecessary null checks either violates OCP or is any different from having unnecessary strict check?
 
I don't think javascript could really be considered 'closed for modification' though
 
infact don't you get most SOLID for free.. OCP and ISP at least. Especially ISP since anything always uses a minimum implicit interface
 
@Luis Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
3:02 PM
@Esailija LSP pretty much too
@CharlieBrown How so?
 
You can create a class, but not much you can do to prevent a client from modifying it
 
it's not modification but extension from outside
you are unable for example to modify jQuery referenced from a global CDN
 
except you can swap out the internals of a javascript class
 
"Closed for modification" does not mean that someone can't hack their way around modifying it, it means that the approach of someone coming from the outside and wants to add functionality is to extend the original and keep the API consistent, and not modify the original
 
@BenjaminGruenbaum thats fair, i would agree with that
 
3:05 PM
It's a very simple and powerful concept and has nothing to do with what that dude at programmers is saying
@Esailija OP accepted your answer
 
yeah, i dont understand the == thing going on
 
someone said that == breaks OCP
which made no sense, other than sounding cool
it sounds really cool to say "x breaks the open/closed principle" with a link to wikipedia
it's like stackexchange porn
2
 
Oh yeah, baby
Say it again
Slower this time.
 
in that case im using alternating equality
==
 
3:07 PM
@CharlieBrown Please don't post the same thing more than once in a short period of time. If it's a question, try again in a few hours.
 
caprica laying the smack down
 
hah
oops the claim was that === breaks OCP -- specifically when == would have given the same result...
with the implication that necessary === doesn't violate ocp
 
i dont see how its related, == has to do with the intepreter and how it views equality
java and c# have similar concepts
 
@Esailija If we start doing that here we become the PHP room, that's basically what they do all day.
 
@BenjaminGruenbaum LOL
hahaha
so true actually
 
3:11 PM
Is Express the better Node module for json rest api?
 
@Esailija I can envision it "rep cap me, rep cap me hard. @Neal me all around with duplicate jQuery and regex answers"
 
=D
 
@CharlieBrown I've had success with Sails, it's on top of express. Express is very widely used, it's well built on top of connect and uses a nice middeware architecture.
If I just want a basic REST API then probably yes, express works. I use it a lot of time for testing my C# code.
 
nice, thx
 
Gotta love how " " coerces to true as a boolean but coerces to 0 as a number and "" evaluates to false (as a boolean) :)
 
3:16 PM
I <3 our quirky little language
 
My ISP is such shit at work
 
~~+str
 
500ms ping to Google.
 
@JanDvorak Yay for making up operator names for language smell (Yes, I'm looking at you PERL)
 
3:19 PM
does <> for gets propmpt count as language smell?
err... I meant !!+str
 
hello all
 
is there any sensible reason why running tracert would speed up my slow connection?
you know it is bad when speedtest.net is too slow to even run :/
 
Why do people think this is Yahoo answers? stackoverflow.com/q/18276856/1348195
 
C:\Users\rlemon>ping google.ca

Pinging google.ca [184.150.153.30] with 32 bytes of data:
Reply from 184.150.153.30: bytes=32 time=10ms TTL=59
Reply from 184.150.153.30: bytes=32 time=10ms TTL=59
Reply from 184.150.153.30: bytes=32 time=12ms TTL=59
Reply from 184.150.153.30: bytes=32 time=10ms TTL=59

Ping statistics for 184.150.153.30:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 10ms, Maximum = 12ms, Average = 10ms

C:\Users\rlemon>ping stackoverflow.com
 
@rlemon no reason at all.
 
3:25 PM
wtf is this?!
 
404 error
 
google is the only site that gives me a good ping
 
because they're eeeverywhere
 
bell is my isp.
 
europe, america (several centres), canada (I guess)...
 
3:27 PM
C:\Users\rlemon>ping bell.ca

Pinging bell.ca [204.101.196.48] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
 
@BenjaminGruenbaum removed :(
 
tracert shows hangups after it leaves montreal
 
@MartijnPieters is it true that Jeff Atwood gets an automatic downvote by Community♦ on every answer that he posts under the feature tag? — Jan Dvorak 4 mins ago
 
user1125394
!!google mobile page width
 
3:31 PM
3
A: What is the design best practice for setting the page width for mobile web pages?

lexuIMHO the best practise is to get along without too many assumptions about width and resolution of the clients device. Mostly those devices have browsers geared towards displaying/flowing/reducing webpages. If at all possible, let the browser do the work.

 
user1125394
ya thx
 
@AkshitKhurana Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
That's the best answer, imho.
 
@JamilHneini Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@BenjaminGruenbaum another crypto argument stackoverflow.com/a/18273848/995876 :P
 
user1125394
3:37 PM
@mikedidthis yet I'm still putting a small width, bu default, it's really meant for mobiles only: ns311381.ovh.net:8888
 
hmm okies.
 
I don't understand why this has so many upvotes or why such a knowledgeable respected user would answer something like that when modern browsers implement the Crypto API which solves this problem. "Cryptography in JavaScript" is problematic if you rely on it on a server . — Benjamin Gruenbaum 6 secs ago
DV'd his answer, UV'd yours, left that comment ^
 
The cryptography considered harmful is actually completely invalidated by CSP... when was it written
 
CSP doesn't solve the corrupt environment problem
 
Liskov did though
 
3:41 PM
@copy how not
 
PBFT ftw
Like in BitCoin and stuff
 
Uint32Array = function() { /* Hi, this is copy. I'm reading your keys */ }
 
under CSP, that code would have to have been written by you
 
What keys?
 
that is the entire point... without CSP an extension or other script could be run on the page and do that override
 
3:43 PM
Oh... oh god... WTF
This was designed in 2010
 
with CSP only your code can do the override.. which is pointless of course
 
WTF? fixed-width above 1024?
 
btw, when I say you, I mean any code you have explicitly expressed trust upon with CSP
 
@Esailija Oh that. Well you can still have DOM XSS. Or bad ad networks
 
only if you allowed ad networks in your CSP
second-order xss are bugs in your code, not relevant to the theoretical security
which reminds me... downvote this post.. let me find it
1
A: JavaScript or jQuery dynamically show form input

AlienWebguy$('#myField').on('keyup', function() { $('#myTableCell').text($(this).val()); }); Demo: http://jsfiddle.net/seancannon/K8qZ9/7/

 
3:46 PM
@SLaks So your argument is that he does not understand the underlying principles to be allowed to use JS crypto so we should tell him it can't be done because otherwise it'd do more harm than good? Getting cryptographically secure numbers is a solved problem in JavaScript with the crypto API - this is exactly what it's for. The only argument I see against it is that only modern browsers implement it. — Benjamin Gruenbaum 6 secs ago
 
lol nvm it has been edited
 
$("td td td td").length => 20 == EEEK
 
@Esailija Ian fixed it
 
yeah but the author even argued against it
lolol
 
1
Q: How Would You ReWrite This Function

Tzury Bar YochayThis function is simple, it gets a number of bytes and returns its representation in either Bytes, KB, MB, GB and TB. As simple as it is, I am sure there are other (and perhaps better ways) to write it. function kmgtbytes (num) { if (num > 0 ){ if (num < 1024) { return [...

 
4:05 PM
@JanDvorak anything greater than 0 is bad.
 
@Shmiddty also, 69 td td td's
 
@JanDvorak td td should also be zero.
 
I'm going to write a statistical scriptlet
should I enumerate all paths, or only homonymic paths (td td td ...)?
 
you know what, it should be enforced that td's and th's may only contain anchor tags and text nodes.
if only.
 
but, SO uses TD's
even TDTD's
 
4:09 PM
where?
 
when rendering posts
(answers)
 
oh man
 
@Esailija var f = Float64Array(a.buffer); return f[0]
 
!!have you returned?
 
@Shmiddty That didn't make much sense. Use the help command to learn more.
 
4:11 PM
@copy needs to be [0,1[
 
Hmm
 
just reinterpreting 2 uint32s as a float will get you anything, including 2^48 (or whatever it was) NaN values
 
Yeah
 
2^53-2, n'est-ce pas?
the size of mantissa, minus two infinities
 
You could clear out the sign bit and set the exponent to something (but I don't know what)
 
4:14 PM
max exponent, nonzero mantissa = NaN
max exponent, zero mantissa = infty
 
0x3ff; // maybe
 
min exponent, nonzero mantissa = denormalized float
min exponent, zero mantissa = zero
 
it is amazing how you don't need 64 bit integers for this
consider the biggest possible result
!!> 0x3FFFFFF * 134217728 + 0x7FFFFFF
 
@Esailija 9007199254740991
 
anyone with knowledge of require.js
 
4:16 PM
!!> 9007199254740991 / 9007199254740992
 
@Esailija 0.9999999999999999
 
D
 
But if he wants to do crypto, he'll need integer random numbers anyways
 
well the crypto supports integers directly
it's the doubles that are hard to get
there is completely useless answer with 4 upvotes anyway
:(
these cliches are not useful to anyone and not really true either
 
@Esailija Welcome to SO :)
He added a link to crypto too
 
4:25 PM
but the crypto api has no nextDouble
and it is hard to do
my initial answer was wrong
 
The only right answer to how do I do this crypto in JS is 1. Don't do it 2. Don't do it 3. DON'T DO IT 4. Ok, since you're doing it anyways, here's the answer: ...
 
hah
I hate that slaks guy
in many ways he reminds me of Neal
:D
 
function nextDouble() {
    var a = new Uint8Array(8),
        f = new Float64Array(a.buffer);
    crypto.getRandomValues(a);

    a[7] =  0x3f;
    a[6] |= 0xf0;

    return f[0] - 1;
}
Seems to work
 
dependent on endianess
run it on AMD machine and see the results :P
or what processors are big endian?
 
4:32 PM
yepp
 
0
A: How Would You ReWrite This Function

Michaelfunction kmgtbytes2 (num) { if (num <= 0){ //"fail fast" (less indentation in the function body) return num; } var suffixes = ["Bytes", "KB", "MB", "GB", "TB"]; for (var i = 0; i < suffixes.length; i++){ if (num < Math.pow(1024, i+1) || i == suffixes.lengt...

 
@RyanKinal this is why musicians cannot design their own websites
 
!!stat 179736
 
@rlemon TIMEX has 17167 reputation, earned 15 rep today, asked 1313 questions, gave 56 answers. avg. rep/post: 12.53. Badges: 60g 237s 491b
 
4:43 PM
some are here to ask, some are here to answer.
@BenjaminGruenbaum screenie?
I'm missingout on the fun
 
how do I do javascript?
 
1
Q: How can I capitalize the letters of my domain name using javascript?

TIMEXSuppose my domain name is www.hello.com How can I use jQuery/JavaScript to make the browser's URL bar look like "www.HELLO.com"?

 
@BenjaminGruenbaum you need a better screencap utility
 
4:44 PM
?
 
I could have screen cap the whole thing, but that would be hard to see
 
I regret having stat'd the sirsy webpage
the most common path is html > body > div > table > tbody > tr > td > div > center > table > tbody > tr > td > div > table > tbody > tr > td > div > table > tbody > tr > td
yep, that's 4 tables nested inside each other
there are even nested fonts
for comparison, the SO homepage is html > body > div > div > div > div > div > div > div > div > div
 
is anyone interested in the stat code?
 
@JanDvorak We have worse on our site on the payments section :P It's external HTML we can't change, there are 8 levels of nested tables
And fonts
 
EEEK
link pls
 
I have CSS that does b { font-weight: normal; } and center { text-align:left; }
 
WTF
 
Not my choice, I can't change the HTML, it's the vendor's
I have one line of JS there that exploits an XSS
 
4:51 PM
O_O
 
I wrote that horrible body.onload because that's the only place I could put JS
 
239 html > body > div > div > div > div > div > form > table > tbody > tr > td > table > tbody > tr > td > table > tbody > tr > td > font > select > option
239 html > body > div > div > div > div > div > form > table > tbody > tr > td > table > tbody > tr > td > table > tbody > tr > td > table > tbody > tr > td > font > select > option
still better than SIRSI
 
ah lol the good old center tag
 
copy uses it
 
Do I?
 
Oh ... yeah
 
LOL
 

« first day (1035 days earlier)      last day (3913 days later) »