« first day (2228 days earlier)      last day (2942 days later) » 

18:01
@ThiefMaster aw, that's a shame. Got any advice for an evening+morning in Geneva?
Besides the fountain and the clock garden, anything else in the bucket list?
@jAndy.... she's currently working at our upper elementary so I really hope that's not the case
or she won't be working there much longer lol
Can anyone here give an example of where you might actually use a Cartesian product?
:D
Hey @copy why do you use one in your game? I can't figure out it's use
@Loktar Or maybe she'll get a raise.
18:13
@lix How do you use what?
A Cartesian product :-)
I was reading through the source code for your game as it was kinda fun and just wondered, what there for
Oh, I don't remember
@Zirak I'm rarely going out in geneva so not really
@ThiefMaster You're useless!
CERN's also closed so no chance to get a tour there either
18:17
NNNOOOOO
But but but but but
What if I say please?
@ThiefMaster living in Geneva?
say please to your bolt cutters?
@jAndy almost (french side of the border, less than 1km away from it)
I was just there a couple of weeks ago, pretty impressive fountain and pretty impressive prices :P
(I don't even want to know how much power/electricity that thing consumes per day)
@jAndy a lot - but luckily france has pretty cheap power thanks to lots of nuclear power plants ;) (and the main power supply is from france, swiss power is just a fallback)
18:21
so if the CERN eventually creates a black hole which doesn't vaporize... I'll ask you about it...
...quickly.... before....
@jAndy it's created thousands of them
iirc you can create a black hole with a piece of fiber cable and some lasers
ninja'd
I don't know... according to the Romulans you can use a blackhole as a power source instead of matter/anti-matter reactions - so could make the nuclear power stations redundant... :p
@JonClements Not if they unionise
@ssube There's a guy in Isreal who's making them in a lab regularly too.
It's being used for testing Hawkings radiation if I recall
18:31
Actually, using a black hole as a power source is 'realistic', but carrying one around on a starship is not so much realistic.
Is it safe yet?
@OctavianDamiean I'll be in Geneva for a day come have intercourse with me!
also hi
Holy fuck, that's like p fucking close and I'm tempted af
also hi! :D
18:33
omg hi @OctavianDamiean
how are your cats?
OMG
They are doing just fine.
Being cats, all day long.
still have 5?
cool, cool
How's life? Are you in Germany yet?
18:34
I did my masters in Germany and now I'm already back in Mexico
just a couple of days ago
We're going to move to the beach, copy will come in a month
or sooner
wow, goddamn, tempus fugit
@Zirak when are you going to be in Geneva? I might actually consider visiting Geneva, coincidentally right at the same time you'll be visiting as well.
I can't promise intercourse, my girlfriend might object but we can have drinks! :D
OMG you have a gf?
does she like cats?
@OctavianDamiean On my way to Val Thorens to ski. Landing in the evening of the 30th, taking a bus to Val Thorens in the afternnon of the 31th
18:38
Oh yes, she does.
Bring her and the cats, we'll have a slumber party
ok, approved
@Zirak I'll let you know if I can make it.
Yay!
@Zirak wait, 31st of November?
Are we on the same planet though?
18:40
@ssube That sounds pretty bs
@KendallFrey you can do anything with lasers
why doth thou torment me so, jwplayer?
quick calculation says that you need over 500kWh of energy to make a black hole
not sure what kind of lasers you're using
thoughts on going to a hackathon as an individual? also any suggestions for events? :D
.join is async ?
thought it wasn't
18:46
@corvid lemme see your updated Player component, please
@Luggage looks like this currently
@KarmaDoe What do you think "async" means?
not sync ?
@corvid no.. you are combining two concerns
join returns a Promise
18:48
American sync?
Is there anything not async about that?
what do you mean?
user2620028
just a different band, async, nsync ya know
1. Wrap jwplayer, 2. make a component that adds/removes the <Player> based on your other rules
when you conbine, you lose the ability to just use componentDidMount -> jwplayer.setup() and componentWillUnmount -> jwplayer.cleanup()
@KendallFrey It executes within the main thread without needs for callbacks.
I would consider that sync
18:49
Thinking about a promise "executing" at all will trip you up many times
What would be the correct word ?
a promise is nothing but something which may yield a result or failure at some point in the future
It is a concept that lets you construct async code that looks like sync code.
More or less.
It doesn't need to execute anything before that time
Yeah, but what would be the word for "running a promise"
18:51
await?
.then()?
running, executing, same thing
a promise doesn't have to do that
I KNOW
A promise is what it sounds like, a promise.
This should be called Etymology chat.
I thought we were talking semantics, not etymology :P
At the moment more like tautology chat.
@copy you wonderful bastard, have you married @BadgerCat yet?
By separating the jwplayer wrapper from your special use of it (adding/removing dynamically) you can to just map React's lifecycle to jwplayers. nice and clean.
@Luggage yeah it makes sense, thanks for the help... I'm just trying to make it work
Your show ? <div /> : <div /> will just cause it to ALWAYS render a div, and thus it'll never destroy a div, just add/remove some properties.
@OctavianDamiean Not yet, should I?
19:00
unless, maybe, those divs have a key property, but that doesn't get you much. My way is more clean. React doesn't have to guess when you want the video player destryoed.
@copy but of course!
@corvid whenever wrapping a third party component like that, always make the wrapper non-specific to your use of it. It sounds like more work, but it's less.
@OctavianDamiean it's fine, they eat pizza together
chrome extensions -> message passing. there is a done callback for onMessageExternal event listeners. but it cannot be nested in an async function or else it is undefined.... how in the fuck does that make sense?
19:04
ohh, and I forgot, shouldComponentUpdate() { return false; }. You want that.
chrome.runtime.onMessageExternal.addListener( (req, sender, done) => {
  done({test:true}); // this works, I get the object back on the client
  somePromise().then( blah => done(blah)); // client gets undefined
  someAsyncWithCallback( _ => done({test:true})); // undefined as w ell
});
probably
-_-
@Luggage it worked! Thanks so much!
19:06
No problem.
Seriously stupid.
like me!
I thought it was something like that
I couldn't remember :(
bullshit chrome
just bullshit
thanks Nathan
19:12
@OctavianDamiean share recent pics of your cats and gf
@OctavianDamiean you shouldn't date cats
unless your name is @Loktar I suppose
I don't date Cats anymore
@copy dates a cat
and also a baedger
That two timing, no good, lying..
@Loktar you married a Cat
19:18
copy = duplicitous
get it?
jokes are funnier when you explain them
haha
All the good jokes need explanations. Like user interfaces.
one of these days I'll get around to writing the UI library that ends all UI libraries
There are so many of those to choose from. I think @ndugger is currently makes a UI library to end all UI libraries.
making*
19:21
this one will make it so you don't need to write UI code
just define your data objects and it does the rest
because all UIs are essentially the same
Ah, like Visual Basic.
MS Access
Actually, I use something like that on some screens in my app that don't need to be fancy. Configuration screens. JSON-Schema form generator
@Luggage I just threw up a little in my mouth.
schema-based UIs work great for config editors
see, I don't even have to write it
19:46
my lib is react, but is also mainly focused on electron apps. I don't want to dick around with firefox
20:08
:turkey:
🦃
oh my
20:32
@rlemon @KendallFrey @BenCraig
looks like fun
Agreed. Looks like a good time
god damn escaping issues
!!afk
Hi all. Can the function spread operator not be used in eval?
eval("[...'abc']")
["a", "b", "c"]
works fine
20:42
In a function it seems to have an error
Unexpected token ...
you sure you've got valid code?
Yea. I think so. one sec
somewhere between my webstore and the extensions message passing and/or the sync store, /^https?:\/\/chat\.stackoverflow\.com\/rooms\/\d+/ is being converted to /^https?://chat.stackoverflow.com/rooms/d+/
and I'm about ready to rage quit
Hmm now it seems to work.
odd
20:46
it's in the json step I think
!!> JSON.parse('{"key":" /^https?:\/\/chat\.stackoverflow\.com\/rooms\/\d+/ "}')
@rlemon {"key":" /^https?://chat.stackoverflow.com/rooms/d+/ "}
did you try doubling up the backslashes?
@ndugger yea, but I can't find where it is doing it
webpack, y u no hot reload less
I'll poke around in message passing a bit more
it must be converting to json at a point
20:47
!!> JSON.parse('"/asdf\\/asdf\\/asdf"')
@ndugger "/asdf/asdf/asdf"
Wat
I expected doubling up the backslashes to work
that's weird
I'll have to convert it to another format I think
might just be the easiest solution
Hmm I am only getting Unexpected token ... on Heroku
not locally
I am running ts-node
20:52
Heroku might not support it... check the node version
It should though with typescript, no?
also I have other functions that use it
I dunno. Typescript is aids
it seems only eval is failing with it.
Well shit, because the code inside of the eval isn't being transpiled by TS
eval is just running what you give it as a string
so it's not TS
Hmm fun
20:53
you can fix that, but you don't want to
makes sense
just don't eval
@KevinB I need to for custom commands with my slackbot. How else could I do it?
modules?
@ssube hmmm?
20:54
force said commands to require javascript instead?
pass string through a transpiler?
config.plugins.map(name => require(name))
@KevinB I want to pass them some variables that they can use in their command.
FFS
!!> console.log(new RegExp("^https?:\/\/chat\.stackoverflow\.com\/rooms\/\d+").source)
load real code, don't eval fake code
@rlemon "undefined" Logged: "^https?:\\/\\/chat.stackoverflow.com\\/rooms\\/d+"
20:55
is that seriously the only way I can do this?
plugins >>> text functions
@ssube It is read code. I want people to be able to to do something like "!?addCommand tell return @${user.name} wants to tell you (${args[0]}): ${args.slice(1).join( )};"
ah, so like, they're giving you a template string.
then use templates or something, not code
But args is spread
20:56
might just have to do that part the old fasioned way
@KevinB Sort of yea, but I want to restrict it to a certain # of variables.
the number of variables won't be your problem
I put their thing in here: "(function (bot, channel, user, ...args) { ${response} });"
somebody immediately breaking out of any sandboxing you might attempt and hijacking the bot will be :D
it fucking is..... my god that is terrible
20:57
as response
@Neal var hello = new Function("hello", "return 'wat';");
haha
they invented handlebars for a reason
		console.log( request.gistInformation.matches ); //^https?://chat.stackoverflow.com/rooms/d+
		console.log( matches ); // ^https?://chat.stackoverflow.com/rooms/d+
		console.log( new RegExp(matches).source ); //^https?:\/\/chat.stackoverflow.com\/rooms\/d+
kill me now
20:57
taking text and evaling it is like the single worst thing you can do
@ssube How would you do it?
I need to store these in mongo (or some db)
No?
@Neal if you know the functions ahead of time (or something sane like that), you should just require them in and expect the module to expose a predictable set of entry points. If not, you should just keep safe template strings and run them through handlebars, which does sanitize.
@ssube Hmmmm How does adding commands work here?
That should be pretty easy to implement if you have a standard interface/contract for commands and can just implement a TemplateTellCommand and so on
(for cap)

« first day (2228 days earlier)      last day (2942 days later) »