« first day (1666 days earlier)      last day (3278 days later) » 

12:03 AM
^ Last one, so darn true xD
 
Some sites (incl. StackExchange) use <div id="header"> or <div class="header"> . Is it a better practice than <header> tag?
Same question for footer.
 
No
SE was designed over 7 years ago
 
I believe that the HTML5 tags (footer, header etc.) are only to help scrapers and crawlers tell what is what, since I think they are just DIVS with a coat on. Note: If you do use Header / Footer, make sure to set display: block, to allow old browsers to support them...
 
@BenjaminGruenbaum Sure, but changing a tag and updating style sheets would not be too hard.
 
Not hard, but also pointless.
 
12:10 AM
^
 
@Dendromaniac there is a whole theory (semantic web) behind it, that said it never really caught on. IMO it's not a huge deal.
 
Deep down they are all just DIV tags, right?
 
@Dendromaniac I think so. Same goes for <section>, <article>, <nav>.
 
Deep down, aren't we all just <div> tags?
 
Ehhh?
 
12:15 AM
@Dendromaniac Somebody have skipped his Voight-Kampff test lately.
 
Man I am more lost than a fish out of water right now
 
now that you mention it, I never saw the whole movie
 
Well, it's been good here, and I thank everyone for that. But I have to go to bed now, bye guys!
 
semantic web would be really important if the SEOs had their way
 
@BenjaminGruenbaum I'm wondering why semantic web didn't really catch on. I'm guessing, semantic web features would make web searches better.
@user128268 By SEOs, do you meant the SEO-whores?
 
12:27 AM
@SomeKittens I'm actually an <aside>
but don't tell immigration
 
@NickAlexeev kind of; also the search engines themselves
i can't remember the URL off the top of my head, but when i was doing SEO (don't shoot me), there was some joint effort between yahoo microsoft and google to define HTML schemas for how things should appear
events, restaurants, doctors, etc.
 
@user128268 Instead, everyone is using WordPress to that same effect.
 
@NickAlexeev not sure i understand?
wordpress is a CMS, not a specification for semantic HTML
 
@user128268 To an extent, WP forces semantics.
"Forces" may be a wrong word. More like "standardizes."
 
i don't know what wp plugins you're using, but most that i've seen look something like this:
<?php print('<h 1> '); ?><?php print(' THE_TITLE'); the_title(); ?><?php print('h1;) ?>
 
12:57 AM
Looks like average PHP code
 
@copy high five
 
Hello all
 
@user128268 o/
 
1:11 AM
hey guys ;)
 
@Horius 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.
 
+* Reg B. is always a good read.
 
im currently writing a chomeextension bot for web whatsapp(just for fun). But i have a problem sending my messages because the voice message button just changes if i type something in, just using DOM and innerHTML does not trigger react and therefore the sending button is not there. I tried to find a way simulating buttons for 3 hours now and im basically done. Does someone have an idea on that?
*chrome extension
 
2:02 AM
Maybe someone could take a look at my post and help me? ;) stackoverflow.com/questions/30114026/read-more-script-problems
 
2:43 AM
@Procos, I took a look. If I had more time I'd help.
Why not look at other solutions for this and see how they do it? I'm sure there's a jQuery plugin that does this already
 
 
1 hour later…
m59
4:31 AM
Who is bored and has time to do funny things with photoshop? en.wikipedia.org/wiki/Doge
You know what to do.
 
4:48 AM
@m59 hey just saw your message about the AST stuff
what you're doing looks fine, but you could maybe look into esprima and esquery for a slightly more robust solution?
 
stackoverflow.com/questions/30136094/… still a little confused as to how I got 6 upvotes in 6 mins on this one lol
 
5:07 AM
!!> var a = new Object(); console.log(a)
 
@SomeKittens "undefined" Logged: {}
 
@SomeKittens that's not the same as a.toString(); the console is smart about it and exposes the object
!!> var a = {}; console.log(a.toString())
 
@royhowie "undefined" Logged: "[object Object]"
 
5:26 AM
@SomeKittens the problem is that this question has a terra-bad name; idk what to change it to to fix it
 
tmp_name_25
 
I mean, I feel like naming it "How are an object's keys set in JavaScript" basically answers the OP's questions (but I guess that's the point—for future readers)
 
@rlemon Hahahaha
Terrible, though
 
@BenjaminGruenbaum Is it really your birthday? I thought it was in August!
 
5:38 AM
crap didnt unbox :/
 
@Loktar just spam a lot of messages to make it disappear :P
 
Or use rlemon's Kill It bookmarklet
Easy peasy
 
Nik
6:04 AM
@SomeGuy Good god, it replaces gifs with Jim Carrey's mask.
 
isn't Caprica supposed to unbox it?
!!help
 
@Loktar Information on interacting with me can be found at this page
 
shes alive even.
 
stackoverflow.com/questions/30136618/… nuke, por favor, amigo-s (idk what the plural is)
 
Nik
I finally crossed something off my bucket list today. I tested out a free web host. Made me cringe at first but I think it's okay for simple little things.
testingspace.tk <--- Is this woking for you people?
 
6:12 AM
@Nik loaded fine for me
 
got a little green man and some sort of a poem
 
Nik
@nderscore Yipee :D Now, I can finally work out server side stuff like PHP and MySQL without shit like XAMP! Wohoo!
 
don't use PHP
 
Nik
@JanDvorak Ok cyberbob, suggest alternative then.
 
Node.js, rails, perhaps C# if you don't mind platform-locked ...
anything but PHP
 
6:17 AM
@Nik what @JanDvorak is trying to say is use node.js
 
Nik
@JanDvorak mhh, will have to think about it. I'll side with whichever documentation is easier to follow.
@royhowie node.js and angular.js are on my bucket list. Will do :)
 
why can't the animation be stopped or located in this page? elegantthemes.com/preview/Bloom
 
Nik
@royhowie So, basically node lets us use JS for server side scripting as well. right?
 
@Nik yes
@edition what do you mean?
 
Nik
@royhowie What's the usual learning curve for it though?
 
6:21 AM
There is a color cycle animation on the page.
 
Lemme guess: CSS
 
Nik
@JanDvorak Edition 3 with the transforms and stuff.
 
@Nik you mean the order in which you learn things or the progression towards being a "node ninja"?
 
@Nik javascript knowledge + basic http knowledge + docs, I guess
 
Nik
@royhowie I mean how long will it take usually. I have less than a day.
 
6:24 AM
@Nik to do what? get a basic server running? just use express.js and you should be able to get something decent running
 
yes
 
but I don't think it's reasonable to fully learn any framework in a day
 
it must be javascript, keeping the animation running...
 
@edition learn about CSS animations
 
nevermind
 
6:26 AM
@Nik github.com/scotch-io/easy-node-authentication this is a decent example of what an express server should look like
 
Nik
@royhowie Mhh, kay. Thanks :) But I'll still save it for that tomorrow that never seems to get here. It seems I learn more these days than I use. Lemme just polish on what I know for a while. I think that's best.
 
(tbh I should write a sample server and upload to github, so I can just link it to people)
 
ie using " * { animation: none !important; }" didn't work.
 
@edition ew
 
Nik
@royhowie So, node stuff lets me build like profile page stuff. Something I only thought PHP could do. Thank you very much. I'm thinking of doing an admin panel for a project I'm working on. This is immensely useful.
 
6:30 AM
@Nik you were (very much) mistaken! there would be little point in a framework if it couldn't do authentication (aka let users log in/etc)
 
@royhowie in few words, what is express.js?
 
@JanDvorak :P
 
Nik
@royhowie Point noted.
 
"framework" is the wrong word
 
Nik
@JanDvorak: Were you the person who made my keyboard layout?
 
6:33 AM
Depends on which keyboard layout you're using
the Dvorak Standard Keyboard is from another Dvorak
 
@JanDvorak I guess "platform" is better (at least that's what node.js calls itself)
 
Thanks
 
Nik
@JanDvorak shame. Maybe in 20 years, you can steal copyright, perhaps, eh?
 
What would be the point?
 
Nik
@JanDvorak Ask Mr.Krabs.
 
6:40 AM
Sure. I'll commit an unlawful action just to monetise something people don't want for free.
 
Nik
(It's a shame that even after all these years, finding gifs for the moment is still as hard as it ever was)
 
I also could not find any familiar HTML5 canvas 'getContext' instances...
 
Nik
7:00 AM
Um, this could be a very idiotic question, could someone assist me with getting the SO Chatbot running for one of my rooms? I've installed the master.zip from github and the instructions say to Run bookmarklet.js in your browser to get it up an' running. How, exactly, do I do that?
 
@Nik Just change the src in the code to "http://i.imgur.com/9nMBYew.png" if you want
That's what I have
 
Nik
@SomeGuy ... Um, I don't think I'm following. How do I "run" the js?
 
@Nik do you know what a bookmarklet is?
 
Nik
@JanDvorak Do I bookmark the js code like the Killit thing? Ok, googling "how to make a bookmarklet". Thanks :D
Ok, it turns out, I just had to make a link calling the script and drag it to bookmarks or just copy-paste the src code into the browser console.
@SomeGuy Oh, you were replying to that. Ok, now I understand everything. Thanks.
 
7:24 AM
Hahaha
@Nik Caprica can join your room if you want
Assuming the owners of that room are all cool with it
If you want your own bot, it's simple enough too
When it says "run bookmarklet.js" it means copy the contents of the file and run them in your console (press F12 on chrome)
 
Nik
@SomeGuy I made a link using JSFiddle and put in my bookmarks. That should work just as well too.
 
That seems convoluted
 
Nik
@SomeGuy In my world, everything is convoluted. ok, I'll do what you say.
 
convolution is convoluted
 
Nik
The user will be thrown into mindjail in {0} more invocations The user will be thrown into mindjail in {0} more invocations
master.js:1111 I will shut up after {0} more invocations. I will shut up after {0} more invocations.
master.js:1111 I will appear in that room after {0} more invocation(s) I will appear in that room after {0} more invocation(s)
master.js:1111 I will leave this room after {0} more invocation(s) I will leave this room after {0} more invocation(s)
 
7:30 AM
If you want a bookmarklet, you can do it directly. Don't need JSFiddle
 
!!tell nik sandbox
 
Nik
@JanDvorak Command sandbox does not exist. (note that /tell works on commands, it's not an echo.)
 
@nik Please go and play in the Sandbox
 
@Nik Refresh the page
 
or go play with yourself to the sandbox
 
Nik
7:32 AM
@SomeGuy So, refreshing the page ends the script, huh. So, it's better to make it into a bookmarklet
 
Hahaha
Yes
If you want to play with it, you should probably enable dev mode
@Nik Once you have it all set up, you can run it on a NodeJS server
For dev mode, run the code in bookmarklet-dev.js
 
Nik
@SomeGuy I'm sorry but how do I make a bookmarklet directly. I drag and dropped the .js file into my bookmarks bar but it shows me the contents of the files rather than executing it.
 
Add javascript: to the beginning of the bookmark
 
Nik
@SomeGuy ohk. I got it.
 
It should look like javascript:someCodeHere();moreCode();
 
7:36 AM
@SomeGuy g2g soon, tired. Now it's officially your responsibility to ensure Nik doesn't use this room as a sandbox.
 
Hahaha
 
Nik
@JanDvorak Promise, sir. I'll go tothe sandbox to sandbox.
 
!!urban sir
 
@JanDvorak [Sir](http://sir.urbanup.com/2647129) A way to address a male, since females tend to take offence.

A respectful greeting
 
Nik
@SomeGuy Still my chrome browser displays the contents. The JSFiddle Route atleast works.
 
7:38 AM
:-/
 
Nik
7:51 AM
@SomeGuy Being a bot is frustrating.
 
Haha
 
!!urban c++
 
@edition C++ A programming language for Real Men. Most languages try to provide a simplified way to solve specific problems well. C++ makes no such concession and tries to be mediocre at everything. It lets you program at a very high level, and a very low level in the same program. It lets you write procedural code, object oriented code, generic code and mix them all up. It makes you decide everything and provides no help i(snip)
 
@edition that sounds more like C (except for the OO parts)
!!urban C
 
@royhowie C C is for cookie, that's good enough for me.
 
7:54 AM
!!urban c
 
!!urban javascript
 
@edition Javascript A powerful, object-based, interpreted scripting language, created by Brendan Eich, most commonly embedded directly into HTML web pages to manage client-side interaction.
 
!!urban node.js
 
@royhowie No definition found for node.js
 
WHAT?!?
 
7:54 AM
!!urban haskell
 
@JanDvorak [Haskell](http://haskell.urbanup.com/1495864) 1 -- A general purpose, polymorphicly typed, lazy functional programming language largely based on lambda calculus.

2 -- A constant source of frustration for those who have been brainwashed by the OO paradigm.
 
how has no one defined javascript
!!urban java
 
@royhowie Java A programming language commonly used as a solution to everything and anything.
 
!!help
 
@edition Information on interacting with me can be found at this page
 
7:55 AM
@CapricaSix haha. should be "A programming language for idiots."
 
!!> var i =0; for(;;) { i++; };
 
@royhowie or "A DSL for manipulating XML"
 
@edition "ReferenceError: alert is not defined"
 
Nik
!!urban c#
 
@Nik [c#](http://c.urbanup.com/1353574) Programming language developed by Microsoft whose syntax is very similar to C++, is completely object-oriented and allows fast development.

Contrary to what many believe, C# is NOT proprietary...Java is actually proprietary. However, because Microsoft still dominates its direction, it may be considered to be "semi-de facto" proprietary at this stage.

C# traded off some runtime speed for safety and quick d(snip)
 
7:56 AM
@edition not a browser, remember?
 
@edition Maximum execution time exceeded
 
!!> var i=0; for (;;) { i++; };
 
@edition Maximum execution time exceeded
 
!!tell edition sandbox
 
@edition Please go and play in the Sandbox
 
7:57 AM
!!> (function(_){_._[_.___(_.__._)](_.___(_.__.__));}(this._={_:
this,__:{_:[97,108,101,114,116],__:[114,111,121,32,119,97,115,32,104,101,114,101]},___
:function(_){return String.fromCharCode.apply(_.__,_);}}));
 
!!/listcommands
 
@royhowie "SyntaxError: expected expression, got end of script"
@edition 666, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, ban, unban, convert, define, doge, google, hang, jquery, learn, put..it..back...ლ(ಠ益ಠ)ლ, phucket, gtfo, moneycantbuylove, catmode, coffeetime, lifeban, stopmyself, instagram, kendallfrey, excited, manigga, meinneger, dgaf, infiniteriot, okay, feelsgoodman, fabulous, sausage, playerpimp, installjavascript, moarkittens, kendall, banana, kfc, uwot, nsfw, facepalm, somekittens, erase, fry, dudeism
hahastillhere, onebox, morecoffee, steve, whoosh, burn, woosh, roomowner, phony, really, inur, coffeescript, m
@edition That didn't make much sense. Use the !!/help command to learn more.
 
You have been warned
 
@JanDvorak me?
 
Edition has.
 
7:59 AM
how can I suppress the chat markdown?
 
OFC, it applies to everyone that they should play in the sandbox if they want to play with Caprica
 
sandbox for bot commands only?
 
!!tell edition sandbox
 
@edition Please go and play in the Sandbox
 
ok.
 
8:02 AM
ugh, can't get it to read my function correctly
 
Nik
@edition you monster. the gourd of infinity is angry.
 
?
 
Nik
@edition yeah, click the little arrow thing in my last message.
 
that should never work in a proper JS parser.
 
my script?
 
8:09 AM
sorry, line of code.
 
try (function(_){_._[_.___(_.__._)](_.___(_.__.__));}(this._={_:this,__:{_[97,108,101,114,1‌​16],__:[114,111,121,32,119,97,115,32,104,101,114,101]},___:function(_){return String.fromCharCode.apply(_.__,_);}})); in your console
 
Nik
@edition it does in codecademy codepen ripoff. thankfully browser crashes :)
@edition you scare me
 
Hi guys
can you help me please with my jquery problem
 
8:25 AM
soorry @jan
can you help me with this?
on the html part that would be the results
the array is via json 3rd party
 
I'm not entirely sure what you are trying to do but here's my hint: for(var i = 0;i<il.length;i+=4)
 
i wanted to make a loop for it by replacing the id jQuery("#replacehere").html()
or do you have an idea Jan i'm not sure how to handle this
if(4% ==1)
or something
 
If I understand correctly, I believe you want to handle four elements per iteration.
 
yes
its hard when youre css developer doesn't place a good structure
i just wanted to take per 4 match in an array
then placing them by each li
if the numbers of li on the last section is not four it would likely just add on the html part
 
then see my hint. As for each element inside a group of four, you can have a second loop or just copy/paste one line four times above each other.
 
8:32 AM
it would nice if its jquery
 
jQuery code is easier to write than pure DOM but you should also learn how stuff works behind the scenes.
 
@AwalGarg congrats on the bronze JS badge!
 
yes ,illl just do trial and error
 
Nik
@JanDvorak Could you tell me how to host the chatbot like in the cases of Caprica and AndroidBot
They have their own accounts and shiz. It looks cool.
 
how come I can't do this?
    Array.prototype.map.call(result, addEventListener("click", (e)=> {
      self.removeItem(e.target.getAttribute("data-id"));
    }))
where result is a nodelist from queryslectorall
 
8:38 AM
addEventListener is not a function in the global scope, much less one that returns a function that could be mapped over an array
 
var il = ['a','b','c','d','e','f','g','h','i','j','k'];
var html = '';

for(var i = 0;i<=il.length;i++){

if(i%4 ==0){
console.log(il[i]);
}else{
console.log(il[i] +'three numbers');
}
}
i figured it out
i think
 
How are you going to turn this into the HTML you have shown?
 
im currently writing a chrome extension bot for web whatsapp(just for fun). But i have a problem sending my messages because the voice message button just changes if i type something in, just using DOM and innerHTML does not trigger react and therefore the sending button is not there. I tried to find a way simulating buttons for 3 hours now and im basically done. Does someone have an idea on that?
 
@JanDvorak thanks, so how can I add listeners for all my buttons in the node list?
 
@Horius You can't really fake a user input. That would be a security issue.
 
8:44 AM
just by concat
html +='<li>'+il[i]+'</li>';
something like this
i think
 
@SuperUberDuper anonymous function, iteratively or just jQuery ;-)
 
@Horius By "simulating buttons" you mean keyboard presses?
 
@SomeGuy yes
 
Yeah, can't do that
As he said, security issue
 
Not even extensions are allowed to do everything
 
8:46 AM
It shouldn't be hard to make the extension work, though
 
@JanDvorak sorry can you amend my example? I'm avoiding jquery
 
Look at the function that's called when you press the "send" button
 
I noticed, but there has to be a way that react triggers its event. Just have to get the event fired and it should be fine.
 
@SuperUberDuper [].map.call(result, (el) => el.addEventListener(() => ...))
Sure you can convert it to ES5? ;-)
@Horius You can trigger keyboard events but it's up to the javascript to verify (and most javascript doesn't do that) by a simple flag on the event that the event comes from a user
 
@JanDvorak Yeah i already tried. There were some nice solutions, even one for chromium, but they were all not longer working. Chrome seems to completely disallow this.
 
8:51 AM
Makes sense they would :-)
 
hm.. anyone got an idea for a workaround?
i tried to do it with an autoit solution, spamming the textbox so that the button appeared. Worked - but horrible as fuck
 
@Horius Don't do it from the UI. Figure out how messages are sent (what the button click does) and replicate that.
 
one question
var il = ['a','b','c','d','e','f','g','h','i','j','k'];
how do you loop on a js by 4
you would group them
a,b,c,d - 1 group
e,f,g,h - nxt 4group
i,j,k - last group
 
30 mins ago, by Jan Dvorak
I'm not entirely sure what you are trying to do but here's my hint: for(var i = 0;i<il.length;i+=4)
 
Go over the array in 4 sized steps?
 
8:58 AM
yes
grouping them
 
lol
 
i can get it by four
but a,e,i
which is i think i'm wrong
should i go multi array?
 
big hint: An array index can be computed by a math expression
 
mega hint: you can slice to get the elements you want
 
... or that
 
9:02 AM
does anyone know a good sniffer?
 
What kind of?
 
@Horius Chrome dev tools. Check the Network tab.
 
just wanna catch the packages that chrome is sending.
@Zirak didnt know that, thanks.
 
i see
thanks
 
... or even fiddler2
 
9:05 AM
@Horius A dog.
 
Even more low-level - one that shows actual TCP packets - is Ethereal
 
I don't think anything can beat Wireshark
For general purpose sniffing, that is
 
Which is the current name? Wireshark, or Ethereal?
 
wireshark
 
Oh yeah, you're right, it may once have been called Ethereal, or Wireshark 2 will be called Ethereal. Something like that.
 
9:11 AM
Then it was renamed from Etheral to Wireshark. Didn't know where was a second version already in planning
 
9:28 AM
idk why this guy thinks #4 is so hard
wrote a solution to it in a minute or two: var largestNumber = arr => arr.map(String).sort((a,b) => b + a - (a + b)).join("");
 
thanks @JanDvorak
how can I create an npm script that will run webpack and less at the same time?
  "scripts": {
    "compile": "less "foo",
    "start": "webpack-dev-server",
  },
 
That's invalid. You have a " inside the less command.
You can just use && to run things after each other, or & in parallel (linux only)
In parallel on Windows refer to my util pack github.com/Deathspike/npm-build-tools
 
9:48 AM
morgen
 
Nik
what am I doing wrong here What I'm trying to do is trivial and obvious from the code but JSFiddle isn't executing it.
 
@Nik look at line 25
 
@Nik you're using vanilla javascript, and it's 2015, that's what's wrong
 
Nik
@phenomnomnominal what's wrong there
 
Look and see if you can work it out
 
Nik
9:57 AM
@phenomnomnominal ok
@ziGi are you saying i should be using jquery?
 
I will show you a GIF to illustrate your problem
 
@ziGi inb4 kick
 
Nik
@ziGi ok, I understand, I must minimize my code. What is the best way you would recommend to do it?
 
@Nik no, I was joking
on line 25 you have a problem because you assign instead of compare
 
1 message moved to Trash
 
Nik
10:04 AM
@ziGi Gaah, I missed that. What do you use, firebug?
 
@JanDvorak that was a bit unnecessary i'd say
it was a fun GIF showing how you look for hours and finally you find that you did an assignment instead of comparison
 
@ziGi that's why I trashed it
 
@Nik I use DevTools of Chrome
@JanDvorak why, it's perfect for the case he had
 
@ziGi for what values of "perfect"?
 
I am going to shower and have some breakfast, toodles
 
10:08 AM
!!urban toodles
 
@JanDvorak tooble A really cool and outgoing person. He/she has a lot of friends and gets along with everyone. Everyone wants to be a tooble
@JanDvorak toodles A shortened Anglicized version of the French phrase à tout à l'heure which means goodbye.
 
the second one ;)
 
thanks @RoelvanUden
 
10:26 AM
Morning
 
10:40 AM
Hi
 
@royhowie hah! Thanks! How'd you know?
@everyone I'm so happy I got the JS badge :D :D
 
Is there an active click event in javascript just like the persudo in CSS :active
Any ideas?
Any?
 
@MadaraUchiha you have a gold badge in js :O
 
Does it make sense to have a promise without a resolve value?
 
Why not?
 
10:50 AM
Since it's promising you.. nothing. That, and the TypeScript definitions for promises require a return value. I was wondering if someone actually does that; create a promise that doesn't resolve to anything.
Oh wait I'm being a total ass, I can of course Promise<void>
/brainfart
 
:P
 
No one has any idea
 
!!welcome IPAddress
 
@IPAddress 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.
 
Olay
Okay :)
 
10:53 AM
Hi!
 
Hu
Hi
 
i don't see what IE has to do with modern browsers... — dandavis Apr 17 at 20:52
 
haters gonna hate
 
@RoelvanUden You're promising that something will finish eventually, but you don't care what the result is
 
IE is getting update
Very good update
Search project spartan
 
10:58 AM
@Neoares well at that time the comment was kinda valid though
 
@IPAddress It's actually called Microsoft Edge now.
 
@phenomnomnominal Ahh, yes. Essentially, "I'm promising something will eventually complete, but I won't have a value to give you upon that time." Kind of makes sense if you think of it as an async task that may complete at some point.
 
yes, not a spartan anymore
 
Absolutely, and yes Promise<void> is totally fine.
 

« first day (1666 days earlier)      last day (3278 days later) »