« first day (1415 days earlier)      last day (3525 days later) » 

12:03 AM
he
 
12:14 AM
ha
 
12:31 AM
what the fuck is wrong wtih chrome for no smooth scroll ?
 
no issues here
 
@SomeKittensUx2666 chrome - windows probably
<!-- build:js(.) scripts/oldieshim.js --> ... oldie shim or old ie shim :?
 
 
3 hours later…
3:18 AM
Hey guys, do you know how to get Wikipedia references in BibTeX format?
 
4:08 AM
@Mosho if you do that - call Gilad first.
Whatever floats your goat though
 
4:31 AM
Has been here before, but I just rediscovered it
 
 
2 hours later…
6:36 AM
tomorrow's the exam!
 
Time to learn
 
It's more like time to keep the stress out
 
Time to start drinking beer
 
ok, a bit better
what did you use to do the day before exams, other than studying?
 
Program
 
6:42 AM
anything in particular?
 
Nothing comes to mind
 
6:55 AM
film?
 
Departed
 
already suggested and seen
 
Dirty Rotten Scoundrels
 
I'll try it, thanks
 
And Catch Me If You Can
 
7:23 AM
morning and happy sunday
 
probably the worst sunday of my life
 
my usb mouse sucks.
and so does my keyboard.
 
7:42 AM
I just saw that for every inline block, facebook adds the class inlineBlock to the element which contains code for old browser support (zoom: 1; *display: inline-block;). Is this recommended?
I wish css had a feature so we can do something like:
.myClass1{
    display: something;
    otherRule: otherValue;
}
.myClass2{
    //command to include all from .myClass1 automatically
    someOther: ruleValue;
}
without having loads of classlist values in the html code.
 
shouldn't this be closed as opinion based?
13
Q: Why should I use OpenID for Authentication rather than OAuth?

Alex ChurchillI've read repeatedly that OpenID is better for authentication than OAuth (which is for authorization), including several other posts on SO. The case also seems to be made in this often-cited article. However, I'm a bit unclear on why I should favor OpenID for authentication, vs. an honest OAuth...

 
8:44 AM
element.className returns undefined
 
@ShubhamGoyal 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.
 
I know for sure that the element is in DOM because I am trying to see the classes on the console after the page is loaded
Anybody has any ideas on why this is the case?
 
http://pastebin.com/MeLrxU3N Can anybody explain to me why I'm getting the error

app.set('port', process.env.PORT || 3000);
    ^
TypeError: Cannot call method 'set' of undefined
 
@ShubhamGoyal fiddle please.
 
Nvm I know why, damn asynchronous
 
9:05 AM
@A
I do not know yet how to see the console in jsfiddle
 
@ShubhamGoyal If you are using chrome/IE/FF, hit F12 and switch to the console tab.
 
Yup, but that is on chrome
I do not know how to show you the error on jsfiddle
 
I don't see any (related) error in the console for that page.
But I see an error if I click on any of the box.
$("#Malaysia_div").className
^this is the problem I think.
You are seeing the property className of a jQuery object.
I don't think this is allowed.
The former part of that statement returns you a jquery object, not a simple DOM element, and I am not sure if it contains the class in the className property.
Try $("#Malaysia_div").attr('class') instead.
 
Nope, jQuery objects don't have a className property.
 
@SecondRikudo thanks for confirming :)
would the attr thing work? I wrote that but I am not sure since I don't know jquery.
 
9:15 AM
Yeah, it would
 
\o/
Thank god me I don't use jquery!
 
I despise jQuery
@AwalGarg No need to thank me you.
 
@SecondRikudo I think it was originally @JanDvorak who motivated me to learn Vanilla JS and not look for ways (like jquery) of avoiding it.
 
@AwalGarg jQuery was useful, and still is if you need IE8- support.
 
9:18 AM
But no longer. Not in 2014.
 
@SecondRikudo More downsides than the usefulness.
 
jQuery hides the warts of the DOM. I think most of these were smoothened out over the years.
 
@SecondRikudo @AwalGarg So, how do I achieve the same effect? I want to remove the class and its associated effects
 
@ShubhamGoyal node.classList.remove("name")
 
@ShubhamGoyal replace all of that .className with .attr('class')
 
9:19 AM
(Although I don't have context)
 
@SecondRikudo haha! that's vanilla and he is using jakeUeerie
 
@AwalGarg Could you edit the JSFiddle to demonstrate?
 
Holy crap
@ShubhamGoyal what exactly do you want to accomplish?
Almost surely, that monster bloat is unneeded.
Also read about the XY problem
 
@ShubhamGoyal jsfiddle.net/ak87nryz/1 This solves the problem that you listed. (not others)... and you better rewrite all that code from scratch with vanilla js.
 
@AwalGarg But he won't... Now that you've given him the solution.
 
9:24 AM
@SecondRikudo I actually did that for my benefit (practice).
 
@AwalGarg Once you understand VanillaJS, jQuery is incredibly simple.
But everything that jQuery does can be deprecated by the different features we have today.
 
!!s/incredibly simple/unnecessary/
 
@AwalGarg @AwalGarg Once you understand VanillaJS, jQuery is unnecessary. (source)
 
^I think that, but I might be wrong.
 
Animations used to be jQuery's killer feature, it's now deprecated in favor of CSS3 animations
jQuery was praised for being cross-browser compatible, even they realized their mistake and released the 2 branch which drops older IE support.
 
9:26 AM
But for now, atleast, I would stick with vanilla. I am happy I have now got rid of my fear for JS (ain't sure why it originated in me).
 
@AwalGarg I think JS is one of the most beautiful languages that exist for the web,
 
jQueries simplicity for handling the DOM was phenomenal at first glance but when you're concatenating like 20 functions in a row it just looks hideous
imo
 
I don't really have a problem with method chaining in this regard.
You can make hideous looking code without it just as eassy.
 
@SecondRikudo absolutely, and its not specifically difficult to learn if you come from a programming background.
 
My problem is that epic bloat you're introducing for your page for a class selector.
For no good reason, you include jQuery, your browser parses it, and it just sits there, for one operation that could have been easily done without it.
 
9:29 AM
Other than the long object names of the DOM API, I don't find anything really troubling in JS...
document.getElementby... this message is too long to type
 
@AwalGarg document.getElementById()
Also, with most decent text editors and IDEs, doc TAB .getEBI TAB (...)
 
I'm currently facing problems with RequireJS with the latest Express x.x, first time making an app with the new 'npm start' stackoverflow.com/questions/25590505/…
 
It still does sit in the code, making it unnecessary long. But you just adopt to it with time.
@SecondRikudo haha I tried that in sublime and it puts DOCTYPE instead :P
 
@AwalGarg Firstly, I usually have modules so
(function(doc, win) {
....
})(document, window);
if needed.
 
That's not fair!!! :P
 
9:35 AM
Second, so docu whatever.
 
9:58 AM
@copy that was quite a nice watch
 
10:13 AM
TIL style guides are awesome!
 
Good morning awal
 
good morning
 
> Opened the task manager
> to test force killing my app.... saw like 5 nw process there :-/
This is what u get when u use chromium for your app ... more processes then u expected :D
 
@AbhishekHingnikar use chrome's built in task manager.
 
nope can't in node-webkit. but meh i can kill using taskmanager :P the almighty
 
10:19 AM
ahh
 
10:33 AM
small improvements:
a little bit more shading, body more proportional..
shadings a bit more realistic
might not be awesome, but still much better than I expected I could do
 
and do what?
 
Why don't you just use your real pic?
 
@towc create an 8 bit version of you ?
138 x 138 -> 640 x 640 pic should be trivial
you just need to find average color
and then find the closest color in HSL
 
@AwalGarg not sure... I still don't like my real face too much, and I'm still plenty of acne, probably when I'll have a real face I'll use that
 
10:38 AM
IMO, the default gravatar is fairly unique for everyone...
 
ui / ux
is it okay if i open a small window for you to login ?
and then the app opens in a full screen or bigger window ?
 
@AbhishekHingnikar no please. don't open extra windows unless extremely necessary.
 
no dude like you start the app on the first run
a relatively small window opens
you login, it transforms into a bigger one ?
 
like an alert box?
or rather like, prompt("username");?
!!afk
 
link to a good working 8-bit converter?
 
10:45 AM
@AwalGarg no
 
@AbhishekHingnikar AwalGarg is afk.
 
like this
am looking for login patterns
but desktop apps are gone things.
 
11:11 AM
> Welcome to Imgur!
You've found your new Internet home. Be forewarned, time has been known to quicken in this realm.
@SomeGuy , @rlemon is there some app which adapts to my music listening choices and automatically plays songs
 
, @RI to you too
 
other then grooveshark, cause there i have to pick songs myself :-x
 
Well, Google Music does
You pick one song you like, and "start a radio"
 
relaxing online minigames anyone?
 
The radio of that song will play similar songs
 
11:16 AM
Google Music*
 
SoundCloud automatically plays recommended songs, I think, which are usually similar in taste
 
haven't tried soundcloud
 
@AbhishekHingnikar What are you correcting?
 
i am impressed by iTunes Genius
@SomeGuy its not avialable here yet.
 
Yeah, I liked Google Music more than iTunes Genius
 
11:17 AM
iTunes genius does excellent job with the music library
then i have tried virtual dj auto dj
which is even better :x
but.. they are all local :-/
 
@AbhishekHingnikar Oh, yeah. I activated mine in America, so it worked
 
I am listening to iTunes Pop Chart
fuck this shit... it played taylor swift :-/
2
finally hearable music
 
Hahaha
 
why on earth is bass cannon on dubstep ?
 
11:36 AM
I use Spotify
 
11:58 AM
@AbhishekHingnikar youtube :P
@AbhishekHingnikar This is a common design pattern, so... why not?
 
tried to make a minigame I could enjoy myself, because I wasn't in the mood of looking for some, in 30 minutes, and I still have 5 minutes
game is theorically done, but of course there is that little bug
 
Can we create a new css class with JS? (I guess not?)
 
@AwalGarg yes
 
@towc how?
 
12:04 PM
oh by creating a new 'style' element... ofcourse.
 
yes
or modifying a previous one
read that article, it's good
 
nice
!!afk
 
and of course it was just a rendering glitch and the logics were fine -_-
aaaand of course I got the formula for calculating the distance between 2 points wrong
given 2 points a and b
        var distX=a.x-b.x,
            distY=a.y-b.y,
            dist=Math.sqrt((distX*distX)+(distY*distY));
right?
yes, the problem was another one
 
12:36 PM
not proud
but it works, and it's almost fun to play
at the end it took exactly one hour
my best was 22 out of 25
 
1:23 PM
hey
would you like to participate in a simple test?
 
@BartekBanachewicz sure
 
in PHP, 5 mins ago, by Bartek Banachewicz
What, on your first glance, wil this line of code do:

filter ((== Redosia) . (^. owner)) units

?
I asked PHP guys already
would be nice to get a JS guy opinion :) (well Florian sits there but Florian is special :D)
 
I haven't got the slightest idea
. is concatenation or has it got the js meaning?
filters through all of the owners of something called Redosia?
that would be my answer
 
@towc hm, it's actually backwards.
@towc neither. It's function composition.
 
@BartekBanachewicz sets the units to the owners of Redosia?
or actually sets all of the units to be owners of Redosia
what language even is that?
 
1:39 PM
@towc Haskell
@towc it filters all units that are owned by Redosia (which owner is equal to redosia)
 
oh
close enough
what did the PHPers say?
 
@towc no clue / nearly got it
 
ok
 
I have $(document).scroll(function () {//Code Lines}) in a <script> tag.
 
watch out! he's got a $(document)!
 
1:45 PM
I want to run that codes when my window resizes too.
how can I do that?
 
window.onresize=function(){//codelines}
or
window.addEventListener('resize', function(){//code})
 
@towc I don't want to write codes again
 
then set the function to whatever function you need
window.onresize=functionNeeded
$(document).scroll(functionNeeded)
 
@towc so, how can I call function() of $(document).scroll from $(window).on('resize', function () {});?
 
@MRS1367 ?
you just reference it to a function that you've already defined
function needed(){//codez};
window.onresize=needed;
document.onscroll=needed;
don't use 'onresize' actually
 
1:50 PM
@towc -> tnx
 
function needed(){//codez};
$(window).resize(needed);
$(document).scroll(needed);
this I guess is what you should do if you want to stick with jquery
 
@BartekBanachewicz Throw a syntax error?
2
 
@DJDavid98 ha ha ha :P
it compiles just fine.
 
I'd like to know how you "compile" PHP
 
@DJDavid98 it's haskell
 
2:00 PM
Oh, nvm then
 
0
Q: ES6 Promise polyfill based on jQuery Deferred

ThomasI recently downloaded a library that uses ES6 Promises. Since I want to deploy to browsers which don't support Promises I also downloaded a polyfill. Since I've got jQuery included anyway I thought about writing a polyfill for Promise which internally uses jQuery's Deferred. I wrote this simple...

 
2:20 PM
!!> ++[[]][+[]]+[+[]]
 
@towc "10"
 
da hell?
!!> (![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]
 
@towc "fail"
 
this should be a language on it's own 0.o
 
2:28 PM
@ircmaxell ಠ_ಠ
 
TIL flexboxes are superb!
 
deep is back!
 
Hi...
 
hi
 
:-P
 
2:33 PM
hi
 
I wanted to ask a quick question

http://deepschool.kd.io/feeder

I have this simple css 3 animation, can I get js to play a random sound file in a folder on page load?
 
@Deep sure
 
What should I use?
 
let's say you have 9 sound files, name 1.m4a, 2.m4a ecc
then you get a random number from 1 to 9
add .m4a
buff it and play it!
 
Its the whole fetching and playing bit that im confused about
 
2:38 PM
it's actually simpler to put audio elements with that src, then get a random one through them and do el.play
if you get an audio element, you can call it's play method, and it will play
so you don't need to use any audio context thing
 
oh ok
 
var a = new Audio();
a.src = '/folder/file.mp3';
a.autoplay = true;
 
also, that
 
is that "native" js?
 
yes
 
2:40 PM
for lack of the right word
oh ok
 
Just tested it in chrome console
 
so that you don't have to put anything in the html to confuse any reader
 
thanks
 
I think any browser that supports <audio> should have the Audio constructor too
 
can I use the audio of youtube videos without downloading and uploading it?
 
2:43 PM
@Deep yes. absolutely!
 
How would I?
 
just embed it, set its display: none and set autoplay to true.
 
oh ok, thanks
 
but it won't work for videos which can't be embedded.
 
ok
 
2:46 PM
also, the browser would still download the entire file and not just the audio.
 
oh ok
There, finished :)

http://deepschool.kd.io/Feeder/
 
@Deep good job
 
Cheers
 
@Deep FYI, 90% of people hate automatically playing hidden music which can't be paused, the rest are deaf.
 
10% of people are deaf?
that sounds like a lot
 
2:53 PM
Those are made up, but whatever.
 
Yeah, I know, but nobody's going to be touching that again
 
@Deep Also, fix your margins, that right scroll bar is annoying
 
@DJDavid98 Enable the experimental chrome overlay scrollbar... You would never ever wish to revert, I promise you that. And you won't find such scrollbars annoying again.
(assuming you are using chrome/chromium)
 
@AwalGarg Yes, I am. Pretty much everyone uses chrome nowdays, pretty safe assumption.
Still, a scrollbar is pointless on that page
 
@DJDavid98 chrome://flags/#overlay-scrollbars
 
3:01 PM
node password hashing recommendations?
 
@DJDavid98 Yeah, but you can't do anything in many cases.
 
@Connor Use jQuery
 
tit
@ircmaxell have you done any hashing for node?
 
@AwalGarg This scrollbar is almost invisible, turning it off
 
@DJDavid98 eh? It is meant to be almost invisible... so it doesn't annoy you.
 
3:06 PM
@AwalGarg I'm all in for a solution like this, as long as it's able to predict when a scroll bar is in place because you want to use it or because a lazy programmer forgot to disable it.
 
@DJDavid98 hahahaha... That is not possible ofcourse.
 
Okay i really need to work on my fitness @Jandy he;p ... i will never beat you in the Game
 
@Connor hashing for node???
 
@ircmaxell he means hashing libraries
@Connor not specific to node. SHA-256 + Salt is platform-independent
I know that python has some crypto-specific hash things, so maybe node has them too
 
please no
 
3:15 PM
bcrypt
 
yeah that
 
stick to bcrypt, pbkdf2+sha512 or scrypt.
 
OK I shouldn't talk about security because I admit I have no idea.
I use bcrypt every time.
 
you are using sha256 === you are retarded
 
eh... some people would say that if a language needs "===" it's retarded :P
 
3:17 PM
@BartekBanachewicz those people are retarded then. :P
 
oh. well.
 
What's so wrong about sha256?
 
@DJDavid98 You give me a sha256 hash and I break it like a matchstick. You give me a properly salted bcrypt hash, I would 'think' before trying to break it.
 
Oh really?
Even if I cleverly incorported a salt into it? :3
 
yep, it's too short.
 
3:20 PM
Wat
 
that's what she said.
 
the hash ofcourse.
 
Sha256 isn't that easily breakable, use bcrypt though
 
ofcourse for most hackers, just getting that hash from your db is very difficult (unless you are using it for hashing cookies ofcourse)
 
Well, here, decrypt this: 28ef132529c503305a869655fc0f9a23b67797614d63987b3ac06e2cd5021c6d336cea73bc5c2d5‌​3
 
3:24 PM
why?
 
To prove that it's so easily crackable
 
@BenjaminGruenbaum it's quite easily breakable, because it can be run billions of times per second on modern hardware. So brute-forcing it is quite easy...
 
@DJDavid98 I am not a cracker, but a determined cracker would definitely decrypt it far more easily than when you would have given him a bcrypt hash.
 
Even if 20 chars of salt are scattered in the string?
 
@DJDavid98 did you see the hashguesser game? Every one of those was broken, even though they were quite obscure
 
3:28 PM
@DJDavid98 Why go through so much heck when you can just use bcrypt (and specially starting with PHP 5.5, even salting is made so easy). Better be on the safer side than challenging the real players out there (not me ofc).
 
password_hash is since 5.5 only?
or hash_password, don't remember
 
yes, 5.5+, but I maintain a library back to 5.3
 
It wasn't in 5.3, and I missed from upgrading to 5.4 so not sure...
 
posted on August 31, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {}

 
@ircmaxell But why? Isn't using older versions of PHP discouraged?
 
3:32 PM
Reading through password_hash's docs, as I understand it, it's an alternative to the crypt function, which I don't think is safe considering parts of the hashed password are neatly separated with $ signs
 
@AwalGarg yes, but people still do. So he lets them still use it even if their php version is ancient.
AFAIK, php still maintains php-5.3
 
My goal was to avoid that separation
 
@DJDavid98 @ircmaxell is the one who wrote the function, he's the best to answer you :P
 
@DJDavid98 You would notice why if you read user-contributed notes there.
 
@DJDavid98 why don't you think that's safe?
@FlorianMargaine 5.3 is EOL, 5.4 is security-only
@DJDavid98 why?
 
3:35 PM
@ircmaxell To make the hash less crackable by hiding away different parts of the salt in the string
 
@DJDavid98 and that hash guesser research project proved that doing so is nothing more than security-through-obscurity
salts are not cryptographc secrets. Hiding them does not add security
 
hi @rlemon
 
if you want to add security, encrypt the entire crypt() result using AES-128-CTR with a MAC. But designing your own algorithms is bad, because the chances that you got it better than an expert are slim...
 
hello
 
> ...what I think of as Schneier's Law: "any person can invent a security system so clever that she or he can't think of how to break it."
 
3:38 PM
So in other words, If I were to store the salt in a coloumn next to the hashed pasword would not be more secure than hiding it in the hash?
And I'm still using sha256, i'm only doing the salt hiding with custom methods
 
it would not be less secure than hiding it in the hash
@DJDavid98 and that's why you're weak. Because you're using a non-iterated hash
so when someone does find the salt pattern (which they will, you can bet 100% on that), then the vast majority of your hashes fall quickly because they can trivially brute-force them
 
@Jandy no seriously bro help me get fit :x
relatos-salvajes.com ... just wow
 
@AbhishekHingnikar Lovely autoplaying music, my personal favorite
@ircmaxell Technically, any password can be brute forced through a login form, no?
 
3:56 PM
user image
3
 
@DJDavid98 no, I am talking about offline brute-forcing using GPU or ASIC farms
 
@ircmaxell Well, if someone's enthusiastic enough to break into my hosting company's control panel just to get a copy of my site's database consisting of about 10 users max, then all I can say is go ahead.
 
@DJDavid98 famous last words
 
@DJDavid98 lolwut
 

« first day (1415 days earlier)      last day (3525 days later) »