« first day (1818 days earlier)      last day (3129 days later) » 

12:00 AM
I was about to check my chrome version in the About tab before I realized it would start an update automatically
 
That extension in the top right just crashed after I took that
 
obviously photoshopped as you're still chatting with us
 
THE ONLY BROWSER THAT EXISTS IS CHROME
ALL HEIL THE HYPNOGOOGLE
 
2 TRU
can't stand those hipsters who use firefox now
or edge
or opera
why use opera? it breaks everything
 
I'd use edge if it didn't freak the fuck out on low memory
have a game open? Edge unloads any tab not in focus
 
12:03 AM
i freak out on low memory, too
 
I only use mobile safari in an iOS6 emulator
 
@phenomnomnominal fuck you
 
@ʞɔᴉN please
 
can I join? I'm bored.
 
I'm in
 
12:04 AM
@Cereal yeah I heard chrome is taking a similar approach now, read somewhere it'll kill old tabs and refresh it later
 
I'm just waiting for tomorrow, and it's boring
@ʞɔᴉN In canary right now, if you switch tabs while a tab is loading, it won't finish loading until you switch back to it
 
alright you 3, my house
 
I close tabs when I can't see the icons anymore because there are so many
 
slightly annoying
 
@Luggage I open a new window lol
@Cereal that's terrible, I have crap internet
it would be like using iphone apps before multitasking came out
 
12:09 AM
if I fullscreen a flash video on my laptop's monitor in edge, the graphics driver fails
if I have an external monitor connected
 
> 2015, still has flash player installed
 
12:33 AM
> 2015 things still use flash
 
> 2015 but what if the world was perfect
 
> 2015 where are my pants?
 
12:49 AM
console.fuck = function () { console.log('fuck'); };
should I open source that ^
 
@phenomnomnominal needs more options
 
nah, does one thing well
 
console.fuck = console.log.bind(console, 'fuck');
 
overengineered
 
@phenomnomnominal no way
 
12:53 AM
not enough test coverage
 
console.fuck("phenomnomnominal")
 
:P
see mines useful
 
right, he's so easy
 
!!> console.fuck = console.log.bind(console, 'fuck'); console.fuck('me');
 
@rlemon "undefined" Logged: "fuck","me"
 
1:05 AM
@SomeKittens adding tests now
 
1:17 AM
No-policy vacation policy ... wh-what does it even mean?
 
As the HR department for the company in question, I shall answer..
 
@corvid possibly, that they don't track vacation days taken
 
mine was better..
 
pull requests accepted
 
i'm working on dark theme
do you dark theme?
 
not for chat
 
:(
 
1:48 AM
It's too round for me
 
missing out on awesome code mode
it isn't round anymore
dammit
wrong tree
just added language support for code-mode
 
yeah but ugly
 
2:04 AM
:(
 
I do. I use dark theme when I don't have a pink theme.
I think the colour lines separating the messages is a nice touch.
And I really like how it enhance the contrast of "who's in this room" avatars.
I personally prefer less vertical gaps and paddings, but I am pretty sure it is my personal preference as a coder who can never get enough vertical spaces.
@rlemon So when can we start using the dark theme? :)
 
Oh Chrome. Ok. Thanks for the effort...
 
2:24 AM
@Sheepy like I've told other FF users, fork it, run the gulpfile, look at manifest.json to see what is loaded, and include all files
*until I get that worked into the gulpfile
 
Or we can wait a few months for Firefox to finish their Chrome compatible addon API. Which is a very good direction. O:)
 
i love waiting
 
They did fix the 14 years old CSS sharing feature request from Adblock. Be patient. :)
 
Sheepy's not one to want things rammed thru
 
hi guys
 
2:37 AM
@AshleyBrown 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.
 
@rism haha
 
@AshleyBrown Like the comment said, you can't. JavaScript is unable to wait for external asycn event, and attempts to do so in the past (see openModelDialog) has caused lots of headaches and cans of worms.
 
The design of your code seems good.
 
0
Q: Chat Dark Theme Plus

rlemon About work in progress theme for StackExchange chats, also includes 'plugins' for additional features. Features include: 1) Inline webm/gifv 2) user colours 3) code-mode (see here) activated with ctrl + k 4) Syntax Highlighting 5) Other stuff I can't think of. Download Install for chro...

dark theme on stackapps
 
3:07 AM
Yeah someone explained a little dumbed down for me in another chat room and now I've fixed it and it' all working fine. Thank you for your advice!
 
3:21 AM
Good Evening people
 
3:53 AM
1
Q: How to pass the method defined on prototype to Array.map as callback

TusharI have an array var arr = [' A ', ' b ', 'c']; and I want to trim the spaces from each of the element from array. It can be done by using Array.map as arr.map(function(el) { return el.trim(); }); I'm curious about passing the trim/toLowerCase function directly to the map as callback fu...

 
How do i get all variables defined in a scope ?
 
4:30 AM
static analysis probably
 
hello all
i am not getting response from API when i use gencode. please help
 
1 message moved to Trash can
@MuneemHabib Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
this is my code if i remove header then i am getting compressed response but when i use header then i am not getting response at all
my code
 
4:48 AM
@Abhishrek Programmatically?
If not, debugger.
 
@ivarni yes
 
Then I've no idea, I'd suggest brute force dictionary attack in a loop with try-catch but it's too early in the morning to attempt being funny
 
5:03 AM
You can't. Not in JavaScript.
 
fk
maybe abuse error ?
 
Error has stack trace but does not reveal scope bindings.
 
:-x darn
okay then i am out of luck\
 
In fact, your "current scope" may be narrower than you thought - for example loop body has its own scope - otherwise your let in it will just be the same with your var.
Or default parameter, which introduce another scope between a function's outside scope and inside scope.
 
5:24 AM
Q: how to set a node app to dev or production? #express
 
5:52 AM
@deostroll what have you tried?
 
So I guess you've to set the NODE_ENV environment variable...
its not a standard so to speak...but I guess it will do...
 
It's pretty much what everyone uses
as far as libraries and frameworks go anyway
 
But...in the absence of that variable...what do we assume? Production/Development?
 
6:07 AM
@BenjaminGruenbaum
 
user3119231
morning!
 
user3119231
6:25 AM
Maybe someone knows this -> I have an input where a user can enter a value. A string must be splitted where the value is found.
 
6:48 AM
guys is pattern matching coming in ES7
 
@deostroll development/staging/production
I've also seen testing used for integration tests
 
@ivarni Knock, knock
 
@Cerbrus Who's there?
 
undefined.
Yea, too early
 
user3119231
uhm is document.getElementFromPoint not working if I scroll?
 
7:00 AM
There is no such thing as document.getElementFromPoint
That does not exist.
!!mdn document.elementFromPoint
 
That however, does.
 
user3119231
Yeah but even this has an issue _>
 
user3119231
target = document.elementFromPoint(e.pageX - window.pageXOffset, e.pageY - window.pageYOffset);
 
user3119231
this solves the scroll problem.
 
user3119231
7:02 AM
no need for a "thank you!" - I know you love me.
 
Eh?
If that was an attempt at being funny: We just established it is too early for that :P
 
user3119231
 
user3119231
@Cerbrus you got a snippet for selecting a whole column on click? o.o
 
Nope
 
user3119231
Okay, brb.
 
7:08 AM
hi ! anybodyknow which format is this ?
<link(?:\\s+href=\"([^\"]*)\"|\\s+[a-z\\-]+=\"[^\"]*\")*\\s+type=\"application/rss\\+‌​‌​(?:xml|atom)\"(?:\\s+href=\"([^\"]*)\"|\\s+[a-z\\-]+=\"[^\"]*\")*?\\s*/?>
 
user3119231
regex?
 
user3119231
excuse me, mr. I just wanted to say: Regular Expressions.
 
thank you . @Maurize . so , i want to find url in this format of any rss feed . and rss feed comes like this
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://feeds.abcnews.com/abcnews/topstories" />
so, can you help me to set url format ?
like this way .
4
Q: Android: How to download RSS when a website contains: link rel="alternate" type="application/rss+xml"

jclovaI am making a RSS related app. I want to be able to download RSS(xml) given only website URL that contains: link rel="alternate" type="application/rss+xml" For example, http://www.engaget.com source contains: <link rel="alternate" type="application/rss+xml" title="Engadget" href="http://www.en...

 
crl
you want any http url? or the ones of abcnews?
 
any.
 
7:15 AM
Don't manually parse an RSS feed.
There's a lot of libraries out there that can do that for you.
 
an RSS feed is easy enough to parse tbh
using an XML parser, that is
don't try to parse it with regex...
 
@BadalShah Use a HTML parser to extract the RSS tags from the HTML document. Then use a XML/RSS parser to parse the RSS document.
 
Even with RegExp it's like 10 LoC :D
 
yes there are many library to parsing but i want to also implement the function for searching rss feed with just typing url name not the url of rss but url of website .
 
@BadalShah At that point you just do a HTTP get, load the HTML document, parse the HTML document, and extract the RSS feeds. I don't get even begin to comprehend why there would be a problem with parsing instead of using some god awful regex.
 
7:20 AM
like, users will search abc.com and they fidn the rss link of abcnews.com in result
 
@FlorianMargaine how do we choose an index from a-b without using a for loop? For example array[1-3]
 
    .mdl-layout__header--transparent.mdl-layout__header--transparent {
      background-color: transparent;
      box-shadow: none;
    }
something is wrong there isnit it ?
 
@Abhishrek could be. It is weird that you have double underscores and stuff like that
 
thank you all for help . actually for search the link, i need to implement it with character-set. means i have used the class which will recognize regex as character-set.
 
css values are ok
 
7:24 AM
@Asperger Its called bem.
 
am I the only one that thinks trying to design an HTML template representing a keyboard is asinine?
 
@Abhishrek I see. What is the reason for using bem?
 
Google search for bem
and you will know
 
@Abhishrek sure
 
@Claies Usually, yes, but sometimes, it may serve a purpose.
 
7:51 AM
o/
 
Hello everyone!
 
@Burdock 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 have been working on a set of performance oriented micro libraries for building large dom web apps. Or hybrid mobile apps. Anyway, seeing as this is my first public general purpose library, I was wondering if anyone had some tips for documentation and api?
 
Look at other libraries and see how they do it. :P
 
XD well, this is not quite so simple sadly.
 
7:57 AM
sadly, nothing is simple
 
@Burdock Why not?
@Mr_Green Nothing is simple? Hah! I am simple!
 
sadly, you are not programming language
 
The first release of the batch is the base selector module. It's fast, really fast. But the reason it is fast is due to a major restructuring from something like jQuery.
jsperf.com/get-js-performance/79 (current build test)
As you can see, the API is quite different. And I have no idea if it makes sense :P
@Mr_Green Roel van++?
(FYI the jsperf is bugged in firefox)
 
8:12 AM
@Burdock nothing just a small joke
not related to your query
 
flex: 3 0 calc(@breakpoint-md - 2 * @app-margin ~"*" 0.3);
washes hands
 
@ivarni is this css4?
 
@Mr_Green It's Less
and flexbox which I believe is CSS3
 
SCSS > less....
(/s)
 
^ agreed
 
8:15 AM
Yeah, we got the memo but change takes time in a big org
 
using flex and those calculations looks really ugly
 
@Mr_Green css4 isn't a thing.
 
and I feel as it is unnecessary
 
Subclassing is awesome...
I wish it was easier
 
@phenomnomnominal yeah not good in english
 
8:16 AM
No idea why it didn't make it into ES6
 
@Burdock because es6 classes are just syntactic sugar over existing es5 prototypes
 
Not what Im talking about.
 
Is extends not in ES6?
 
ofc it is
 
you cant inherit Arrays (and some other types) in javascript
 
8:19 AM
@Mr_Green Well we have a flex container that needs to wrap only once the parent is smaller than a given breakpoint. I'm open to other suggestions of how to achieve that
Since you're saying using flex-basis and calc is not nessescary I assume you know a better way?
 
*Without using iframe injection or manual injection
 
@ivarni I never used flex but made many responsive layouts. that is why I am assuming so. can you tell me what exactly it is?
 
@Burdock IIRC, subclass was too complicated to meet the ES6 deadline safely.
 
maybe a small fiddle?
 
I don't have time to make a fiddle right now :)
 
8:21 AM
You can do responsive without flex. But flex makes your life and the maintainer's life much easier.
 
^ agree
I still need to learn flex for sure
@ivarni so what should happen exactly?
 
This is the first time I've come across something that wasn't a breeze to do with flexbox
 
I am getting to the point of full flex layout now - layout whole page in flex. It is not magic, but it make sense.
 
@she Would fixing array subclassing be that complicated? It's just .length that is broken. iframe injection fixes this but it's a bit advanced for most people
 
I don't use flex because of old browser support
 
8:23 AM
^
 
@Mr_Green It's a 3-col layout on big screens with a 30%-50%-20% split. On small screens the last 20% row should wrap
@Mr_Green We feature-detect and fall back to no-flexbox implementations on browsers that dont support it
which in practice is only IE9 at this point
 
@ivarni "should wrap" means?
 
@Mr_Green I set the flex-basis so that it's 30-50-20 of the container minimal container width before it should wrap, allow them to grow in the same proportions but disallow them from shrinking
@Mr_Green break to next line
 
@Burdock Language features are interlinked. ES6 already introduce many new things, which when combined with subclass can be interesting. For example, Proxy.
 
@Sheepy Ah, I was not thinking about that. Thanks for the info :)
I guess iframe injection still works.
 
8:33 AM
@Burdock ofc you can
just not with babel atm
 
I am pretty sure iframe injection works with babel
 
should work in chrome right now
idk what that even means
it doesn't work out of the box
 
iframe injection is basically extending base types in a subscript. then "injecting" them in the parent script.
 
@Burdock what do you even want to "subclass" arrays for?
 
Faster array operations. better chaining. better api
most just for the performance.
mostly*
 
8:38 AM
and code that doesn't work anywhere else
 
Yes is does
 
what are you doing that needs such crazy performance
 
user3119231
I need to test my website on an android-device -> Is there a simulator? It needs to use touch events and stuff
 
Hmm. I don't get the faster/performance part. Would you mind explaining your idea?
 
@Maurize browserstack.com
 
8:39 AM
There's more to consider than just browsers these days. iframe injection is a horrible hack from 10 years ago, surely you can't seriously be considering using it.
 
^ concur
 
user3119231
@Mosho whats this shit? :D
 
Why is it a horrible hack?
 
@Burdock are you serious?
 
Yes, I am.
 
8:40 AM
You are borrowing and extending an object chain from another global context. Is that not bad enough?
 
@Maurize excuse me?
 
creating an iframe to get around a bug in an ancient browser, by stealing a reference from a second global context.
Does that scream "elegant" solution to you?
or does, myFunction.call(myArray) seem more reasonable.
 
No it does not. But it does work quite well for making clean modules.
 
myArray::myFunction :D
 
Abstract away the API and use the power of a language that doesn't depend on traditional OOP bull.
 
user3119231
8:41 AM
@Mosho browserstack.com <- does not work | does work -> browserstack.com
 
@Burdock "clean" is apparently relative.
 
@Maurize ah, I see
 
Well, the injection is contained in the module.
It's a hack. But it is the only way to sub-class arrays ATM
 
and that module would never work in node, because it is abusing an external API to change the behaviour of the languae. Fucking awful.
 
Yeah. Thanks to the bug and the people who use it, browsers now have to keep this hack alive while trying to enforce cross origin security and achieve high performance and keeping low memory overhead.
 
8:46 AM
@Burdock I still wonder why you want to subclass arrays
 
Me too. Native Array is pretty fast. Just slower than TypedArray. I am very curious how subclassing it can make it faster.
 
Morning
 
And what additional functions you really need to add to some subclass to improve the API
 
user3119231
Is there a tool or something to test website on android via usb?
 
It does not make arrays faster. But it does make chainable function calls much faster with single prototype clones
That being said, there are some close seconds
Creating array-like objects is quite useful.
 
8:49 AM
@Maurize Depends on your definition of 'test website'.
 
user3119231
show it on android browser, to test for example events.
 
@Maurize just serve it from your computer.
 
user3119231
how? It has php elements and stuff.
 
do you run it on your computer?
 
user3119231
yes, but I can't access it via ip because companys network.
 
8:52 AM
Stock browser I don't know, but both mobile Chrome and mobile Firefox can be remote debugged.
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_with_WebIDE
 
@Sheepy stock browser has been chrome for a while
 
Not on my G2 Pro.
 
user3119231
I don't get why I can't load content via ip :D
 
Where remote means you use your F12 tools on desktop to monitor and/or debug the real mobile browser on real device.
 
user3119231
8:54 AM
@Sheepy thank you but this isn't enough. I have to display it on my mobile to see how design looks like.
 
user3119231
and to test events.
 
Lo all :)
 
If it is offline functional you can always push the files to the device and open it.
Otherwise I'd say you need to use simulator.
 
hey could anyone help me with performing a regex?
i have a string containing a few lines:
--
1 x item1
2 x item2
etc
--
I want to get the first number before keyword "x item2", but "item2" is a dynamic value store in a variable. Any suggestions?
forgive my inexperience with regex, i've tried searching but having hard time figuring out my use case, especially with having to include a variable in the regex search
 
@Maurize chrome does that
 
8:57 AM
@sudosoul parseInt( "1x item1" )
 
@Sheepy ty, but the haystack string has multiple lines
 
Totally unrealted but anyone here knows how to play sheet music ?
 
Sheet music? What do you want to do?
 
str.match(/\b(\d)+/)
 
8:58 AM
I can play shit music if that helps
</lame>
 
@Abhishrek I do
 
@Mr_Green I think you need a g flag. And it will match the items
 
@Mr_Green ty, i need to only get the digit though before the keyword i provide (item2).
So in that list, if i input 'item2' i need to get '2' to the left of 'item2' (2 x item2)
 
'1 x item1\n2 x item2'.match( /(^|\n\r?)(\d+)(?=\s*x)/g )
'1 x item1\n2 x item2'.split( '\n' ).map( function(e) { return parseInt( e ) } )
Make your choice.
 
@Sheepy yes g flag and maybe multiline flag as well
 
9:05 AM
Regx is a dark path. It is brute force. It is full of pitfall. It brings power that controls you rather than giving you control. Walk in the light if you can.
 
*Regex
 
See? Even the very *name* of it can befall you. Oh the horror...
(I prefer `regx`, by the way, thanks!)
 
do you prefer java too
 
Check out my answers. You will find lots of Java :) Don't forget to vote up~
 
user3119231
Someone find this useful?

function event(dom, trigger, callback){
	mobile_events = {"mousedown": "touchstart", "mouseup": "touchend", "mouseout": "touchleave", "mousemove": "touchmove"};
	for(key in mobile_events){
		if (key == trigger){
			dom.addEventListener(mobile_events[key], function(e){
				if (mobile_events[key] == "touchmove"){
					e.preventDefault();
				}
				callback({pageX: e.changedTouches[0].pageX, pageY: e.changedTouches[0].pageY});
			});
		}
	}
	dom.addEventListener(trigger, function(e){
 
9:13 AM
@Mr_Green @Sheepy hey thanks yall. i've always heard of regex but just began to work with them and seeing how powerful it can be. i'm sorry to bother y'all, but i think i was asking my question wrong.
does this make more sense: http://jsfiddle.net/nhj38avg/ (it's short, i promise)
^assume that the html content has already been gotten, assigned to 'var s'
 
this shoud work str.match(/hash(\d)+/g)
 
And hash1\2\3 is...? Do they have fixed format?
 
@sudosoul Try something like ' hash1 10 x Apple iPhone '.match(/^\s+?(.+?)\s+?(\d+)\s+?x\s+?([\w\W]+)\s+?$/)
 
hashes are random.
the entire string is contents of a div:
abc 23 x xyz
def 3 x zyx
--
how can i get just the number 3, given we know its the first digit before 'zyx'
 
The regex above outputs [" hash1 10 x Apple iPhone ", "hash1", "10", "Apple iPhone"]
@sudosoul So, in your case, skip 'stuff' and then capture digits like /^\s+?(.+?)\s+?(\d+) if you don't need more.
 
9:24 AM
@sudosoul If it is random, you must say how it random. Will it has number? Will it has space? Will it has Chinese? How long can it be? How short can it be? You must answer these before you can build a correct regx.
 
If at least the "digit x stuff" is static you can capture from the end.
 
I have an array of values, however on looping over each value, it is starting with the order inwhich the array was defined, and not the first value in the array (which was added at a later date) how can I loop over in new order (non defined)
for(var x in y)
 
@Ebikeneser for (var i = 0; i < y.length; i++) { var x = y[i]; ... }
@Ebikeneser Refer to developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/… as to why for..in is bad in the first place
 
ok thanks
 
@IanClark so this is where you hide out? :p
 
9:39 AM
hmm thanks yall, i think i may have been overcomplicating and too inexperienced for regex, but i'm reverting to method of just getting the number by index, since it seems in my case to always 3 chars to the left of a given name_keyword. ty though, very helpful and much appreciated
 
@Sheepy what do i owe u for this?
but ah wait it messes up if theres say more than one space between the words
 
Hey, I made this today, you should use it: console.fuck
 
@sudosoul Then you need a better - more comprehensive - demo fiddles.
I'm leaving to attend a wedding. Have a nice day every one!
 
im sorry @Sheepy, if i could send u a tip i would. peace
 
9:46 AM
@phenomnomnominal I could just say console.log("fuck") right?
 
@Mr_Green that's not very modular
 
@JonClements runs
Hah
 
@IanClark ooo... hide and seek... okay - I'll count to ten! :p
 
:D
 
const fuck = () => console.log('fuck');
@phenomnomnominal much useful
 
9:49 AM
@FlorianMargaine you're welcome
 
@phenomnomnominal No i18n? :p
 
@ivarni pull request plz :P
 
touché
 
ivarni, was my fiddle helpful?
 
@Mr_Green I'm not going to use floats
I've already solved this with flexbox, I was just having a giggle at the less calc syntax
 
9:55 AM
but was that the same as you wanted?
 
@Mr_Green At first glance, yes
 
@phenomnomnominal @Sheepy I know how to play the notes but I have no idea what each symbol means (also i understand the quater, half and full notes)
 

« first day (1818 days earlier)      last day (3129 days later) »