« first day (2229 days earlier)      last day (2702 days later) » 

4:00 PM
What is RoboGist?
run code from a gist by injecting to current page?
 
AIDS for your computer
 
it injects code from a gist into the current page
 
what is the "preferred" way to perform an action after another action? On the componentDidMount, or within the action itself?
 
@rlemon "RoboGist takes a gist ID and injects the code to current page. (it also accepts regex to match URL of page)
 
well, shit, #node.js is fucking dead
 
4:07 PM
What's an action?
 
Current regex part makes the sentence a bit confusing to me.
 
how
 
@BenFortune the issue I always faced with the tab api was it never wanted to consistently update when you switched to a tab. you had to click or focus or whatnot
don't even get me started on keyboard tab navigation
 
@rlemon This seems to work with clicking and ctrl+tab
I got it working, but it's spamming extensions::schemaUtils:112 Uncaught Error: Invocation of form runtime.connect(null, ) doesn't match definition runtime.connect(optional string extensionId, optional object connectInfo)(…) in the console
Wait, nvm
 
sounds like you're passing null when you should have 0 args
 
4:18 PM
chrome.tabs.onActivated.addListener(_ => {
	chrome.tabs.query({
		active: true,
		lastFocusedWindow: true
	}, tabs => {
		getSync().then(store => {
			const {list} = store;
			const [tab] = tabs;
			const {url} = tab;
			const usable = list.filter(item => {
				return item.active && new RegExp(item.matches).test(url);
			});
			chrome.browserAction.setBadgeText({
				text: usable.length.toString()
			});
		});
	})
});
 
4:30 PM
Can anyone tell why this regex doesn't work in practice? regexr.com/3enli
Works as expected there on regexr, then in practice is returning null with this code:
const axios = require('axios')
const $ = require('jquery')
const jsdom = require('jsdom')

axios.get('https://uel.ac.uk/pagelist')
        .then(response => {
            console.log(response.data)
            const pages = response.data.match(/^(\/.*)\n/gm)
            console.log(pages)
        })
 
I think you need to escape your \/ as \\/
 
@Psioniax nope
 
☝️
 
I think he's actually literally trying to catch /
 
Yeah, he is
But that's how it is in some other languages, so I just had a guess
 
4:33 PM
@BenFortune I wonder why they don't promisify the whole API
 
Yeah, I am matching all lines beginning with / - works as expected on regexr
 
try $ instead of \n (just a guess)
 
adding the extra backslash causes a syntax error
 
that's how it is, if your regex is actually a string, that will later become a regex.
 
I think Luggage is right
 
4:33 PM
@BenjaminGruenbaum It'd make sense wouldn't it 😛
 
You want the start and end, not the newline break most like.
 
@Luggage that did the trick, not sure why though
 
@BenFortune yes.
 
because maybe the line ending were'nt \n but instead \r\n
 
Ah, yeah, maybe
 
4:34 PM
$ means end of line, though, so just use that
 
Yup. Should have thought of that in the first place :p
cheers :)
 
@Billy Because you're flagging it as multiline, and $ signify the ends of a line.
 
@Trasiva You are slow. :)
 
@Luggage My 4 key is broken.
I have to mash it to get the dollar sign.
 
good god, this office wifi is <400kb/s right now
 
4:35 PM
@rlemon I don't even think I get the alt icon
 
@ssube quit
 
make a gist, add it, update the gist, refresh the page BUT NOT the options page
it's there to let you know that a gist has been updated and you haven't seen it
 
@Luggage I'll mention it in my exit interview.
 
Some account on Main called JavaScript is downvoting and commenting on answers I posted years ago
I would rename 'var id' in the first code line, since it is not an id - bad practice. — JavaScript 10 hours ago
 
Lol, how pedantic
 
4:42 PM
Yikes, he really doesn't like me
@MadaraUchiha halp I've been targetted
 
@SterlingArcher Maybe he's Steph's ex.
 
Wait sorry, system already reversed it. Sorry for the ping Madara
Oh my god, wow it keeps going
This is a bad case of targetting LOL what did I do to the poor guy there's like 30 answers downvoted LOL
42 downvotes in a night, some have yet to be caught by the serial reversal
 
@SterlingArcher Summon him, duke it out. Two men script, one man breaks.
 
flag it
 
TFW Oggy Groggy is still ignoring you xbenjii.co.uk/i/i8px8
 
4:46 PM
@JavaScript you got a problem with me?
 
or post on meta, but it might get closed
@SterlingArcher jfc this is how you get in trouble too
 
lmao he won't come
and idc :D
 
(removed)
 
@BenFortune Dude, Ignore Greg has probably 50% of the regulars on ignore. This is nothing new.
 
I don't think he ignores me. Should I be honored?
 
4:51 PM
not especially, that just means you get to warn them before their next kick
 
Lol
 
From last year when I found out his real name :D
 
I don't think I've ever kicked Greg.
 
s/k/l/
 
4:51 PM
He's well behaved, he just has a big head.
 
@BenFortune I can post the real version too, you know?
 
@BenFortune nah, they got kicked a few times
once for being a total creeper
 
haha
 
@SterlingArcher I don't thinl I've ever kicked Greg.
 
@BenFortune The problem is that you don't know which Greg it is.
 
4:52 PM
@Trasiva Oh shit, forgot about that lol
 
@AwalGarg Did you ever finish that guy's project? He's anxiously awaiting it.
 
@AwalGarg What do you mean?
 
In a Promise, how can I resolve to a boolean?
resolve(true); returns undefined
 
res(true)
of course it returns undefined, promises don't return results
you gotta use .then
 
thanks!
 
4:57 PM
@BenFortune Err, I think I confused you for cyril, nvm
 
@AwalGarg :(
Why don't you love me?
 
hey everyone, what am i missing here: stackoverflow.com/questions/40746661/…
 
@BenFortune you're complaining that they don't vamp you?
 
I wish Archer S8 would hurry up and get here
 
4:58 PM
error handling
 
you're either on ignore or getting vamp questions all the time
 
@BenFortune I am just curious - why bring this up multiple times when you already know the reality? Does this really bother you that much? I am honestly curious - not mocking you at all.
 
Just curious.
 
> I am now 22 years old and my eyesight is worsening, at what point do I get adult supervision?
lmfao
 
lol what?
> Election closes in 2 hours.
 
5:02 PM
lol what
 
@SterlingArcher man, I haven't had chicken in almost a day, when do I get vegan powers?
 
@BenFortune What is it that will satisfy your curiosity, other than what you don't already know? :)
 
@Loktar unfortunately I don't know the other people to be able to know if they are any better.
 
Shog reported early this morning that @Cerbrus is under FBI investigation for deleting comments off his answers.
 
I think I am sitting out this election.
 
5:03 PM
wat
 
@AwalGarg its going to get worse
 
@AwalGarg We definitely haven't talked about it, since you've had me ignored. I just want to know the reason to better myself. I don't like being unliked :(
 
#Cerbrus4Prison
 
Oh, those deleted comments on my private server?
 
@BenFortune please stop feeding the troll.
 
5:04 PM
@AwalGarg You can start a hunger strike
 
Hello there fellow JavaScripters, how do you closure! - @Cerbrus 2016
 
I think I'm missing the joke here.
 
You're the hillary of this election
 
he's making fun of that time the FBI threw the election
yknow, last week
 
but with the Demoneytization and other students not giving a fuck about anything. You'll end up as a lonely skeleton
 
5:05 PM
Sorry that was uncalled for, you're better than HIlldawg
 
@SterlingArcher Eeeh, wat
 
I TOOK IT BACK OMG
 
@SterlingArcher you mean an experienced, if unsavory, candidate?
 
he's clearly the trump of the election
 
I'm both. Guaranteed victory :D
 
5:07 PM
i.e. the winner
 
> Do spiders in europe have 2.4384 meters instead of 8 feet?
 
@SterlingArcher spiders only have 7 feet bruh
 
@BenFortune I am not ignoring anyone. You are trusting a userscript way too easily.
@Abhishrek They will laugh it off.
 
> but with the Demoneytization and other students not giving a fuck about anything. You'll end up as a lonely skeleton
 
@AwalGarg You know it's pretty easy to tell, right?
 
5:08 PM
@AwalGarg You can't do anything and its going to get worse
you know what TCS looks for in a software developer? An Electronics Degree is prefferred
 
You can't invite people who ignore you into room
 
@MadaraUchiha My ignore list sits on my VPS, not Stackoverflow's servers.
 
That's how the userscript detects
@AwalGarg And you, what, use that as a proxy to block messages from certain individuals?
How does that work?
 
Wouldn't change the settings on so.
 
@MadaraUchiha I have a custom chat client :)
 
5:09 PM
@ssube I'm genuinely curious.
 
it's mostly a ploy to stir up drama
@BenFortune but you won't get a genuine answer.
 
@Cerbrus Good luck bro, voted for ya :D
 
But I agree with ssube, this is offtopic for this chat. I don't understand why this matters to a lot of users.
 
Was worth a try.
 
@Sippy *Throws a cookie*
 
5:10 PM
@AwalGarg what? I said nothing like that.
 
nom
 
@Cerbrus bribes, now?
 
Wait, we get cookies for voting for Cerbrus?
 
Is it a bribe if he already voted?
 
It is if you're going for Pavlov conditioning.
 
5:13 PM
If it's public. It encourages other people to seek virtual cookies.
 
At what point in a bobcat's life, as it grows and matures, does it prefer to be called a robertcat?
7
Oh my god
cc @rlemon ^
 
Dinner :D bbl
 
@SterlingArcher bob is a stupid name #robert4life
 
bubba is the stupid version
 
Farmer Rob
 
5:15 PM
@SterlingArcher Just don't bring your richard into this
 
FINALLY
 
CATCH
 
managed to get the sprites working
 
5:15 PM
ON ERROR RESUME NEXT
 
...to?
 
I thought we were playing one word sentence
im sorry
 
WHY ARE WE TALKING IN FORTRAN
 
I was talking in VB
 
i was referring to the casing
 
5:17 PM
ThisIsPascalCasing
 
No, this_is_sparta
 
So, I was writing some PHP (yeah, I know), and had to concatenate some stuff. Due to my time with VB (yeah, I know), I used & to concat... and it caused me lots of pain.
I was like "why the hell am I getting '92394'" out of this?"
 
@RyanKinal oh god isn't & in PHP pass by reference?
 
> I was writing PHP... time with VB... pain.
yep, checks out
 
I think it's a bitwise AND in this context
 
5:18 PM
isn't & for pass by ref C++?
 
yep
 
Yea
 
well, take the reference of
 
this has gone places
 
& in .NET is bitwise though
 
5:19 PM
& in VB is string concatenation
Also .NET isn't a language
 
++ for string concatenation president
 
& A PARTRIGE IN A PEAR TREE
 
C#, my bad
 
;-)
 
I'm all over the place, DON'T YOU JUDGE ME PARACHUTE PANTS MAN
 
5:20 PM
STOP
 
@KendallFrey what's wrong with overloading add for strings (or just lists in general)?
 
HAMMERTIME!
 
@RyanKinal bitch it might be (it isn't)
 
lol
 
@ssube Are we calling jQuery a language too?
ducks
 
5:20 PM
@AwalGarg strong typing
 
@Trasiva oh hell no
 
jQuery is definitely a language
 
jQuery is a way of life
 
the point is, Haskell uses ++ for list concat
and strings are lists
 
Haha
 
5:21 PM
+ is reserved for numeric addition
 
calling jQuery a language is like calling flavored swishers a cigar
 
I mean...
 
@KendallFrey see, that makes good sense. Why can't other languages do that?
 
@KendallFrey I am not sure how that relates... are you saying type systems in 2016 can't deal with polymorphic functions/operators? :D
 
calling jQuery a language is like your mom
Everyone does it
 
5:22 PM
Burn
Seriously, though, that bitwise AND bug took me like 2 hours to debug. One of those days, man.
 
@AwalGarg Perhaps not having one symbol mean multiple distinct things allows for more expressiveness, not less
to be clear, + is still polymorphic
 
@RyanKinal I thought you were good :(
 
it applies to all numeric types
 
most operators are
 
@SterlingArcher Yeah, me too
 
5:23 PM
the bitwise operators are a notable exception to polymorphism, at least in JS, because they specify 32-bit integer operands
 
@KendallFrey Yeah, again, I've heard that argument multiple times. I just haven't seen any concrete example.
 
just took a contract from my last job... holy jesus they are a mess
 
I am not saying I disagree (or agree), I am neutral about it. But still...
 
trying to remember to take deep breaths and not get their panic on me
 
@SterlingArcher Just goes to show anybody can miss something simple
 
5:25 PM
@AwalGarg The first thing that comes to mind is implicit typing. If you use an overloaded operator/function, what type can the compiler infer it's using? If you have two distinct operators with the same name, that causes ambiguity.
 
@RyanKinal IMO, you know what you're doing when most of your mistakes are typos.
3
 
+1
 
So... a guy I was friends with in college is in jail for attempted rape right now...
What the fuck
 
@KendallFrey But that doesn't matter because the operator is, as you said, already polymorphic over all number types. And most polymorphic operations which are "accepted" will require some more static analysis for proper type checking.
 
@AwalGarg I'm thinking about an operator having multiple meanings, not polymorphism. Polymorphism is easy in Haskell.
 
!!afk what the fuck
 
@SterlingArcher dude looks like a creep
 
If you mean simply broadening the scope of the operator, well, that might not be useful
 
he's got that bad beard
@KendallFrey ever seen scala?
 
5:29 PM
!!s/lymor/rnogra/g
 
@Shmiddty @AwalGarg I'm thinking about an operator having multiple meanings, not pornographism. Pornographism is easy in Haskell. (source)
 
There are almost no situations where you need a single operator that can add numbers and concat strings, other than for good-looking code
 
@KendallFrey ok, I see what you mean and agree. But then this doesn't have much to do with type checking - and definitely does not matter at all for implementation of the type checker.
 
@ssube not really, no
@AwalGarg Type checking isn't really a problem either, it's type inference that becomes tricky in my example.
 
@KendallFrey it's exactly what you're complaining about right now. All style and form (to the point of having unicode operators) instead of practicality, so > and >> and >>> are all operators, all overloaded, sometimes not even attached to the classes they're operating on, and are allowed to run multiple operators until they reach one that is "ok" for the final set of inputs.
it's incredibly ambiguous and just makes the card less deterministic
 
5:31 PM
oh god
Speaking of unicode, have you ever tried APL?
 
@KendallFrey I am arguing that it doesn't in practice :D. Or atleast, that's my experience from writing a type-checker and having dealt with this exact thing ^_^
 
Need to batch promise based get requests. Brain's locking up. Any suggestions?
function processPages(pages) {
	console.log(pages)
	let promises = []
	let l = pages.length


	pages.forEach(p => {
		promises.push(
			axios.get(p)
				.then(processPage)
		)
	})
	return Promise.all(promises)
}
 
@KendallFrey seen, never used
 
Need to do n at a time instead of using forEach
(Just brought down our site xD)
 
@Billy bluebird has that built in
 
5:34 PM
Awesome, did not know that :D
New to bluebird
 
@AwalGarg Doesn't seem that uncommon. Take, for example, sum = foldr (+) 0. If numeric + and string + are distinct operators, how does the compiler know the type of sum?
it could either return a number or a string
 
@KendallFrey In this case it seems trivial, since 0 is numeric.
 
oh yeah whoops
I guess I was thinking about the version with no initial parameter
forget the name of that
foldr1, it is
sum = foldr1 (+)
 
@KendallFrey Didn't know about foldr1, just googled. Anyways, so surely sum is generic over any type which + applies to, now?
 
not sure if that would work
it would probably end up being two different versions of sum, just like +
that could snowball really badly
 
5:43 PM
that took way too long to find a good example of
really that is for anybody considering operator overloading and why you shouldn't do it
 
@KendallFrey I won't say that + has two versions (even if it was generic over only 2 types). I'd say it is generic over numeric types and lists, and so is sum. But yes, that could result in a mess, I'll give you that.
 
20 mins ago, by Kendall Frey
If you mean simply broadening the scope of the operator, well, that might not be useful
You can surely redefine + to be a single operator with a more generic meaning, but this will probably make it much less useful
 
Today sucks. All the people I hung out with a few years ago are in jail or addicted to drugs
Just found out another one of my old friends is going to jail for 10+years for distribution to undercovers
wtf happened to their lives man
 
They're trying to forget you
 
!! burn
 
2.9 bud
 
6:05 PM
It's clear to me that some forums discussing the EM Drive are little more than pseudoscience echo chambers. Or rather 'resonant cavities'.
oh, ohhhhh
 
Which of the many babel transforms does everyone use for async/await?
 
@SterlingArcher I have a bunch of friends like that and have spent time thinking about. Best I can tell, they're the ones who chose not to get their shit together and slowly get left behind until they're desperate, then things go horribly wrong.
 
> I give up
Cute!
 
I'm at my wit's end, but I don't want to give up on this program... after a certain size array of objects, JS just gives up on sorting items by a certain function
I'm not sure how to replicate the error and show it here, but... are there any known errors with classes and sort => {} functions?
 
@AlexMitan do you have 4GB of data or 4 billion items?
 
no way, I have about 30 objects that are quite small
 
6:26 PM
it should work
how do you call sort?
 
cand.sort((a, b) => {
        a.fitness() < b.fitness();
    });
 
you're not returning anything
return a.fitness() ... ought to do it
 
or don't have {}
 
I thought sort took input => -1, 0 or 1
not true/false
 
Election ends in half an hour. Prepare for impact.
 
6:33 PM
it should take all 3, although I think certain sorts will succeed with just 0/1 being outputs
maybe all will succeed, but not as efficiently?
 
assuming fitness is a number: (a, b) => a.fitness() - b.fitness()
or b - a, i forget
 
!!> [1, 9, 2, 8, 3, 7, 4, 6, 5].sort((a, b) => a < b)
 
@ssube [9,8,7,6,5,4,3,2,1]
 
!!> [1, 9, 2, 8, 3, 7, 4, 6, 5].sort((a, b) => a - b)
 
@Luggage [1,2,3,4,5,6,7,8,9]
 
6:35 PM
!!> [1, 9, 2, 8, 3, 7, 4, 6, 5].sort((a, b) => b - a)
 
@Luggage [5,6,4,7,3,8,2,9,1]
 
shit
 
@Luggage [9,8,7,6,5,4,3,2,1]
 
a poorly designed algo could sort forever
but in general, I think 0/1 are the only values you need
 
it won't. it just might not be stable.
JS sort is not guaranteed to be stable, so, I think you want -1, 0, 1, not 0, 1. another engine might not work with just 0, 1 (pulling this out of my ass)
 
6:37 PM
I don't have an example of it failing, but it probably will.
 
Nov 10 at 15:29, by rlemon
Mar 28 at 14:58, by rlemon
function sleepSort(stack) {
	return new Promise( (resolve, reject) => {
		let ret = [], len = stack.length;
		const org = item => setTimeout(adder.bind(null, item), item);
		const adder = item => ret.push(item) && ( (--len <= 0) && resolve(ret) );
		stack.forEach(org);
	});
}
guaranteed accuracy and stability
 
cv-pls stackoverflow.com/questions/40749174/… (no code, no errors)
 
6:54 PM
@ssube #homework
 
@Trasiva Now I really want to build an open PC. Not that weird thing, but something.
 
@KendallFrey build a pc in a vacuum
 
uh
why?
 
you could call it a space pc
 
I could built a PC inside a model of a rocket
that would be... tricky
 
6:56 PM
Sorry, had to be off for a bit, so basically what am I doing wrong with my fitness sort?
 
not if you make the 'stand' hold the mobo
 
It seemed to work fine for smaller arrays
 
scroll up
 
@rlemon good idea, actually
 
@KendallFrey you mean like this?
 
6:57 PM
@Trasiva saw that last week pretty neat but but disappointing the turret doesn't spin up.
 
I said rocket, not toilet paper
 
still love this
 
Also, WHO THE HELL MAKES A WEBSITE THAT SHITTY
 
@Loktar Oh I know, it'd be amazing if it did.
 
what's wrong with the website?
 
6:58 PM
the mac pro website is garbage
if I want to watch a video send me a youtube link
 
@Luggage try scrolling
 
Apple wanted Flash dead
 
I've seen worse sites.
 
and then makes crap like this
 
I found this website today.. it's the worst website I've ever seen
 
6:59 PM
!!burn
 
@SterlingArcher hah!
 
Whoever this loktar guy is should kill himself
;) jk <3 u
 
well that's the top of 2007 dude
 
lol, remember when he died?
 
6:59 PM
lmao the pinnacle of 2007
 
still brings me home a paycheck!
 
@Luggage I'm sure I have too, but... I can't think of any
 
@Loktar still?!
 
yea
 

« first day (2229 days earlier)      last day (2702 days later) »