« first day (2871 days earlier)      last day (2300 days later) » 

02:36
is it possible to export a module w/ es6 syntax for my npm package?
import Chart from "Chart/Chart";
export default Chart;
when i import that in my testing app, i get {}
hmm looks like i have to look into "authoring" in webpack
03:02
lol Canvas.stroke(); messes up my entire code for some odd reason
you stroke the context, not the canvas
anyone have experience building libraries with webpack?
i'm curious what the libraryName key is used for
 
1 hour later…
04:26
6
Q: Can I take a 24" computer monitor on board?

user10853I am not a frequent traveler, at least not yet. I would like to know if a 24" computer monitor in its original box the size of a large luggage would be allowed on board a plane even for an extra charge? Moreover, I'd like to know what are the safest (and hopefully not expensive) ways I could sh...

This showed up when I searched for can I use the monitor box to seat the monitor.
The question still stands can cardboard boxes take the entire weight of a 12kg monitor?
(I doubt)
04:53
Seems like the wrong chat for this...
05:40
wow
thats pretty good
I took a nap lol.
playing r6 siege
06:00
I have a youtube addiction
Man, three.js is sweet
 
1 hour later…
07:06
Is there a novel where due to some quantum weirdness electronics esp the semiconductor kind stops being functional ?
again i think ur in the wrong chat for that
but i dont know oif anything
07:32
@ShrekOverflow probably. There is a lot of quantum woo out there.
I even wrote a novel about quantum woo before lol. Almost got it published but didn't want to hire a publicist..
my god that raw shader code
 
2 hours later…
09:36
@MadaraUchiha Ouch... I was at HR and everything went fine and looked like she likes me, i even studied with her brother... until we spoke about salary. I said 12-14 and she said its too high for a junior, what we can do is 9 and then 11 after 3 months
10:09
@Jony ׳well, that sounds honest
What company and what country?
@Jony If you are promised to get 11 after 3 months be absolutely sure you get it in writing
10:40
@BenjaminGruenbaum Israel
CodeOasis
11:08
I think i cant even argue about that pay, because i dont have any experience in jobs in my country, besides 2 years at military (and what I did there is not relevant for them), and another year working as remote ruby on rails and php dev
and I have no degree
So i think it's fair enough for a start
@Jony Both me and Benjamin are from Israel, FYI
Yea i know
remember you both like 3-4 years ago
11:35
@Jony 9 is low then, yeah
even for a junior?
In Tel Aviv?
no
Herzelia Pituah
It’s still a little low but if it’s the first job you can do it for a year and then upgrade
You can send your CV over if you want :)
whats your email?
12:15
React brainfart question
Say I have
<Conditional on="foo">
  <Case value="a">
    <Foo />
  </Case>
  <Case value="b">
    <Bar />
  </Case>
</Conditional>
Where only either Foo or Bar get rendered, even though they're both in the JSX tree
Both of Foo's and Bar's constructors will be called, but only the one that's actually rendered will fire componentDidMount, right?
Nope, looks like only the rendered component fires constructor codesandbox.io/s/6y0p7y2qo3
That's really surprising, actually.
13:11
@MadaraUchiha what's the way to get an ES6 type (Map) in TypeScript when using ES5 target?
Add "es2015" to the "lib" property in your tsconfig.json
@MadaraUchiha that's what I'd expect - think about what actually happens in that case.
@MadaraUchiha I want just map or at least for people to have to do this selectively
There's "es6.map" or "es6.collections" or something like that
See what the autocomplete gives you
13:13
es2015.collection seems to do the trick
13:32
Hey I need an advice.
I have a game simulator I created in Java, it's a 2D turn-based game.
I created a website that you can host new/or join existing running game instances where each instance runs on its own server on its own port.
I want to add a way to see the game executing from the website, live.
For that I can create a websocket connection, and send screenshot of the game panel every time the render updates
But sending an image so often via websocket.. may be heavy?
14:12
@Jony A much more reasonable thing to do would be to implement a client in JS, and send commands and actions over the websocket.
You're talking about video streaming a game, while accepting commands, which is difficult and not very performant in the best of cases.
@MadaraUchiha have you ever read TypeScript before?
At least 3 TypeScripts
@Jony you want WebRTC - but to be fair you're likely better off just compiling it to JavaScript or something.
@MadaraUchiha no I mean literally
Oh, you mean TS's source code?
As in, opened github.com/Microsoft/TypeScript and read the fuckin code?
Yeah
14:21
No, I haven't. It's been on my list forever
Wanna read it together? I figured out I have only read it when it was very young and very ugly and nothing is anywhere near where it was (in 1.2 I think?)
Hmm, sure, although I'm not sure I'm here this weekend.
Oh, I mean like in October-ish, not right now - after I'm back from Scotland
I wish there was a shorthand like { foo, bar, baz? } and have baz not be included if it's undefined.
14:39
For destructuring?
What's the use case?
I wish you could destructure maps
Like, have a Symbol.spreadGetter and then be able to do const {a, b, c} = someMap easily.
15:00
@BenjaminGruenbaum No, for object shorthand
@MadaraUchiha oh, like const o = {a, b, c?} ?
const { foo, bar, baz } = whatever;

// ...

return { foo, bar, baz? }; // don't include baz if baz is undefined
Why? The language makes undefined and no key pretty similar for a reason
For your usage - what difference does it make if it has a baz key with the value undefined or does not have a baz key?
@BenjaminGruenbaum Because I wouldn't want to override a default with undefined
@MadaraUchiha ah, should have started with that probably
Ah, omg it's @snek, fancy seeing you here Gus!
15:02
hi benjamin
@snek Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Hey what's up?
!!> function foo({bar = 42}) { console.log(bar); } foo({}); foo({bar: undefined});
@MadaraUchiha "undefined" Logged: 42,42
Huh
I honestly didn't expect that to work...
15:02
@MadaraUchiha default parameters do that
@BenjaminGruenbaum Only with objects
!!> function foo(bar = 42) { console.log(bar); } foo(); foo(undefined);
@MadaraUchiha "undefined" Logged: 42,42
!!> function foo(x = 42) { console.log(x); } foo(undefined)
@BenjaminGruenbaum "undefined" Logged: 42
15:03
Yeah, undefined is treated as "no value" in default parameters
@snek how's Zero coming along?
Hmm, what about things like fetch?
@MadaraUchiha what do you mean? What about them?
@BenjaminGruenbaum Say I pass a parameter to the headers or query parameters with undefined value
Will the key in its entirety be omitted?
you should check the documentation of fetch
it doesn't use default parameters
My real problem is that I'm dealing with window.ga
And the documentation on that specifically is a but fuzzy.
15:05
@MadaraUchiha as a caller you can't assume anything like that
@BenjaminGruenbaum Exactly
You can't assume either behaviour unless the called function explicitly defines one (like a spec would)
Which is exactly my use case
headers will tostring entries
so you would have the string "undefined"
I want to omit the key explicitly, so that there's no chance of an undefined value being sent
Hence, { foo, bar, baz? }
Right now I need to do something like
{ foo, bar, ...(baz ? { baz } : {}) }
15:07
{ foo, bar, ...baz?{baz}:{}}
yeah lol
That sucks :(
I'd be explicit about it to be honest
@BenjaminGruenbaum The suggested ? is explicit
let headers = {foo, bar};
if (baz) headers.baz = baz;
It's just shorter.
15:07
if i were implementing something similar i would init the object as { a, b } and then if (c) obj.c = c
oh no i walked around the point ... fixed lol
@BenjaminGruenbaum Sure, that's better than the spread, but it's a bit dumb that what I could theoretically do within one expression has to be split into at least 3 statements now
it makes me feel dirty to add properties to objects :(
(the let, the if and assignment, and the return)
@snek That.
Yeah, that's what I said I think I'd rather be explicit. I had a few typescript gotchas today. We upgraded to TS3 and webpack 4 and the build went up from 1 minute to 10 minute - then I got backlash for setting isolatedModules which sped it back up to 1
@snek @Madara because it shouldn't be an object it should be a map :D
if you're actually creating headers here
15:09
He's not
const headers = new Headers({ some stuff })
oh
@BenjaminGruenbaum Yes, but: a. the provider doesn't accept a map (google analytics, remember? supports IE6) and b. How would you do this within the same expression with a map?
Yeah, I haven't actually seen many people subclass Map though, I wonder why - Maps are pretty annoying in JS having no hash and equals and stuff
there's a proposal to add equals override
@BenjaminGruenbaum I think that most people just don't use them because they're annoying.
15:10
@MadaraUchiha it wouldn't be shorter, it would just solve the dirty problem.
Now that you have Object.entries() et al, you don't really need maps
It's rather rare that your key isn't a string anyway
maps definitely serve purposes
@snek I have a question about this somewhere one sec, I was literally told "we added maps waiting for something to bring this up" and then nothing
@snek Sure, of course they do
15:11
But they come with... baggage.
@BenjaminGruenbaum ahahaha
When I did the numjs thing with the eigen port
@BenjaminGruenbaum bradley was working on something here: github.com/bmeck/proposal-richer-keys/tree/master/…
Oh, I was also promised value types in that thread :D That was fun. I wish that happened JS would be so nice with userland value types
I'm honestly not sure what I want of maps
Maybe Maps should respect a get [Symbol.hashCode]() or something similar to that?
I'm not sure that's the best solution though
15:14
@MadaraUchiha read the link Gus posted, he's doing it with a rekey which makes more sense
Having the info on the map makes a lot more sense than having it on the object
@BenjaminGruenbaum How would you achieve that without creating subclasses?
@snek this is the slowest the room gets by the way - it's mostly empty on the weekend.
Oh, I see, a second parameter to the constructor
@MadaraUchiha well, the way Bradley is thinking about doing this is by changing the spec :P
one nice thing about js -- you can implement this behaviour yourself, its just a pain to do so
15:16
This is the Comparable vs Comparator debate all over again, but I tend to agree that having this info on the map is preferable.
@snek you literally have to reimplement maps for that though
@BenjaminGruenbaum ez :P
@snek I actually implemented a ton of maps (and even some DHTs)s - I didn't really enjoy it
Though I think Petka's collections from 2012 are still likely the fastest in JS :P
in the same repo i linked there's another thing called a composite key
@MadaraUchiha the "debate" was only prevalent in Java because it had no first order functions and you had to create a new Comparator class and pass it in which was tedious for every little thing. An object should not be in charge of how it is ordered but hashing is harder than comparing
15:18
@BenjaminGruenbaum "tedious" pretty much describes Java though :)
Their solution for everything is to add another layer of indirection
at this point i just think of java as an application framework + DSL
Java 9 isn't all that bad to be honest
By the way - this (still pinned here) is a pretty great read @snek wiki.luajit.org/New-Garbage-Collector#introduction_overview if you haven't seen it before
It's not useful but it's interesting
How is the async iterator whatwg streams thing coming along by the way?
i keep making changes and then forgetting to push them lol
@snek Java is a platform to accept large XML files as input and output gigabytes of error stack trace logs.
there's something about this bs format that makes it feel a lot weirder to use than ecma262's format
15:24
Huh, seems like promisifying Google Analytics with TypeScript is impossible while keeping the type info for the parameters
Because it has overloads.
typescript doesn't support overloads?
@snek yeah bikeshed is super weird
@snek It does, but inferring parameter types (for higher order functions) in conjunction with overloads doesn't work well
@snek no, it's just JavaScript with types - since JavaScript doesn't have function overloading - TypeScript doesn't have it either.
Also, overloading is weird and I'm actually pretty happy to not have it.
I've seen countless hours burned on esoteric overload resolution rules
Overloading in TypeScript is cheating
15:27
my fav overloads are the ones on the web
What do you mean?
like when an older method has like 13 different signatures because of all the browsers
It's only outwards facing, you still need to provide a signature that catches all of the overloads, and check in runtime to see which overload you're on.
@snek You mean like Google Analytics?
i haven't really done anything more with GA than pasting it onto pages
Which has a function whose first parameter is the type of thing you want to do
15:28
Oh definitely + a ton of really weird stuff like the fact there are a bagillion ways to iterate the DOM. I used to not get it.
Instead of, you know, making it a method on the root object?
Like, the web is about capabilities - that's the #1 most important thing for the web - good APIs are nice but aren't the main point.
@BenjaminGruenbaum and modules and decorators etc lol
I do get it though, it's meant to be a thing that you can do before GA is loaded, it's disgusting
You do something like
@snek TypeScript typically doesn't really have modules - it's webpack. decorators require another flag (with experimental in its name) to work. I'm surprised decorators aren't stage 4 yet to be honest since they're so heavily used
15:29
ga = ga || [];
ga.push("send", "pageview", "whatever"); // don't know if array or GA instance

// sometime in the future, ga loads and does

pendingArray = ga;
ga = new GA(); // GA constructor has push method on prototype
ga.consume(pendingArray);
Anyway, off to the beach - ttyl
:wave:
ouch no emoji shortcuts
@snek Those don't work here, SO didn't really update this place since 2012 :D
15:30
Install the extension, and you'll have it :D
@snek So you're in the TC39 committee?
@MadaraUchiha i've been there, i'm not a delegate though
I see! So Benji convinced you to hop over?
it was actually more jordan harband
Oh?
Is he here too?
i don't know if he's in this chat
15:39
Seems like his last message was over 4 years ago 😃 chat.stackoverflow.com/users/632724/ljharb
He is active on main though
So that's nice
wow your top tag is PHP
i'm so sorry :)
Guilty as charged
I'm even more sad to say that the average technical level of discussion is much higher in the PHP room than it is here.
I'd much like that to change :)
It'd be nice having more people here with some deeper insights
arent't these rooms just supposed to be a more instant version of the main site
Sorta, kinda.
The rooms are for discussions, and sometimes users pop in here to ask a question if it's too small or not a great fit for main
For example, a question like "do you know a library for A/B testing?" would be closed on main, but may get an answer here.
But in general, most of the regulars are here not to answer questions specifically, but to have general discussion that's roughly centered around the room topic (JavaScript, in this case)
oh god how do you do a multiline codeblock in the main site
15:46
@snek 4 spaces before each line, and one empty line before and after
muh highlighting
If you're pasting, paste, select the code, and CTRL+K (or CMD+K), there's also a button for it in the UI
@snek Highlighting is based on the tags, but you can override it with an HTML comment
<!-- language: lang-js -->
IIRC
hmm once i posted it got some color
lol thats pretty janky
thanks
15:49
@snek Yeah, doing it on the preview is (was?) expensive in terms of client-side performance, so there's a pretty long debounce on syntax highlighting in the preview
But the post itself gets it instantly.
16:03
@snek Dor actually loves PHP it's his favorite thing in the world. Feel free to ping him with all your php and jquery questions whenever.
i don't have jquery/php questions because i don't use them :)
I don't think I used either in quite some time. I don't dislike either to be honest - it's just not something I've found myself doing.
Unless you consider that charity thing that used wordpress @MadaraUchiha
@snek I actually have printed business cards proclaiming my PHP and jQuery speciality.
@snek are you answering front-page questions :D?
16:06
@BenjaminGruenbaum i just clicked on the "javascript" tag and posted a thing
Those are typically pretty awful - you have to compete with other people answering the same question (which can be fun but not to my taste). I prefer specialized tags - like, I answered everything on promise for a while and then it got popular and I stopped so now I mostly answer when I get pinged about something.
is a pretty popular tag
@BenjaminGruenbaum About converting it to JS, are u familiar with LibGDX?
In your question above, 10$ says he just did refresh() instead of refresh as a setTimeout parameter and doesn't understand why it isn't refreshing.
apparently i don't even know what the question is asking
The game client is made in LibGDX, it has an option for HTML5 client but not sure if the graphics will look the same without changes
16:09
@snek he's just not understanding the difference between passing and invoking a function if I had to guess - good effort though.
@Jony nope, looks like you're not the first to consider this though github.com/libgdx/libgdx/wiki/Running-Demos
business cards are so 2012 -- i just tell people my website link :P
Btw sent u my resume in pvt
Who, me?
Oh, Benji, probably.
tipranks looks like the kind of website that uses php and jquery
16:12
Ha! No, we actually use TypeScript and React to great effect
But the design hasn't drastically changed in a while.
There are talks of a revamped home page... One can only hope...
Our backend is C# though
@snek I hope it's clear those cards for Dor are a joke?
madara uchiha == dor?
oh yeah it says on the card
seems like a real enough card lol
It is a real card
I took the photo just now, after writing your name on it :D
16:15
i saw that
It gets a few laughs out of people every once in a while
Right, time for me to head out of the office
Toodles~
@snek hope you enjoy your stay with us 😀
thx, seems like a pleasant enough place
16:43
has anyone noticed that git blame chokes on filenames with a "+" sign in them
but it happens when i add the option
git blame --show-email name+with+plus.txt
 
1 hour later…
18:02
Mojave seems to improve scaling for text
even at 3008xWhatever scaled
The text is just as smooth
<a onClick={() => { expand_div_with_class_hidden }}>
	<div>
		<pre>{text}</pre>
		<pre>{balance}</pre>
	</div>
	<div className="hidden">
		<pre>Number of scratchcards:</pre>
		<pre>Number of stuff:</pre>
	</div>
</a>
Is it possible to have a function in the onclick that alters the class name of its second child?
18:48
Hey guys whats the best plugin to parse csv to json
Papa Parse?
19:03
hey guys was wondering if anyone knows the answer to this question: stackoverflow.com/questions/52029340/… . Thanks a lot.
19:49
Makes me wonder if in future can just all be fit by charging our phones/laptop in morning that way it would keep me fit 😛 youtube.com/watch?v=S4O5voOCqAQ
20:26
If I want to add a function to each audio element, should I use HTMLAudioElement.prototype or Audio.prototype or something else?
20:42
@JennaSloan Or, how about, instead, you don't do that?
Do yourself a favor, just make a function that accepts an audio element as an argument.
Have any of you ever taken a JavaScript test like the ones on freelancing sites?
I'm betting it's 90% edgecases
21:30
has anyone run into "batch response: This repository is over its data quota. Purchase more data packs to restore access."
21:49
morning all
@AlexBollbach github has limits on how much you can store in repos
after that you have to use LFS
22:23
@MadaraUchiha It doesn't make sense to make a function that accepts an audio element as an argument when the audio elements already have a function very similar to the one I am trying to add to it.
I came up with this: Audio.prototype.checkplay = (function(){ if(soundsenabled) this.play(); });
that is not the sort of function I was expecting to see
how are you calling thing checkplay thing?
Like audioelement.checkplay();
where though?
it just feels like a very simple check that probably doesn't deserve its own function, especially not one that mutates a builtin prototype
22:57
Right now I'm using it in three different places with each on a different audio element
class Person extends Entity {

  constructor() {
  	super();
    this.name = "Ben"
  }
}


class Entity {

  constructor() {
	this.x = -1;
    this.y = -1;
  }

}
Is that illegal in JS?
yeh
cause ES6 has classes, wondering if inheritance is possible
oh i defined entity after person
Inheritance if fine in js
@Tobiq I'm willing to give you a chance to leave the room on your own accord. You are not allowed in here.
23:09
Hello @SterlingArcher how are you
What did he do
@Jony long story, but he's not allowed in here until he show's he's a model citizen elsewhere
I saw his thread about getting banned
Did you down vote?
@AaronHall sorry to bug you but... ^
23:12
how about that javascript
I am wondering how this works with pure javascript menucool.com/slider/javascript-image-slider-demo1
@Jony check out the source code, it should give some insight
I have a feeling its compressed
and obfuscated, not sure
@Jony i think you're underestimating the dom apis
Uses divs, that slide around, with the background-image offset, so the overall imagine finally aligns
23:19
also these effects are ugly lol
just fade or slide the image
@Tobiq dude. What the hell is wrong with you?
@Jony do you get it?
How are you unable to comprehend that this chat will ban you on sight, and yet you persist
@Tobiq That sounds ugly lol
Moderators have been informed of your consistent attempts and honestly I hope they suspend your account again. Leave this room alone.
23:21
@Jony its just applying inline styles gc.gy/3030673.png
so it just creating small divs and gives each div a part of the background
(removed)
23:22
I pinged AaronHall.. I hope they'll stop giving him chances.
He's fresh off another suspension and immediately comes back
How did he get unsuspended again :O?
@MadaraUchiha @ThiefMaster can either of you take care of tobiq coming back?
@SterlingArcher Wait, according to madara, tobiq is unbanned and can use the chat?
26
A: How do I get my chat ban removed?

Madara UchihaSince I'm "that Madara Uchiha guy" who delivered your suspension, I feel inclined to respond. I will now note a much abbreviated list of the reasons you were suspended for ~3200 years: You trolled the JS room (and others), repeatedly. When asked to stop you did not. When kicked, you returned a...

He is free to use the chat, but it does not override our room vote on him not allowed here
or he got suspended again?
He already came back since, the whole story is unfortunate.
23:24
Quite
@BenjaminGruenbaum I have to ask a serious question lol
Have u ever got into an employer that smokes weed during work
@Jony I have never smoked weed during work it makes me sleepy and less productive.
but do companies do probelms with it if u do it on ur "free" time at home?
23:27
Smoking with employers though is not the same thing as smoking during work.
i smoke KNOWLEDGE and INFORMATION during work
@Jony no, like 24% of people in tel aviv smoke weed lol no one cares what you do in your free home if it's not self destructive or impacts your ability to do your job.
Don't smoke during the day unless you have a medical reason it's a shitty habit - does being drunk all day at work sound like a good lifestyle choice?
nah just wondering
Why do you ask? Most companies don't care
smoking makes gives me panic attacks, to a level that my whole body shakes (happens 40% of times i smoke)
so decided to stop
23:30
HAMMERTIME!
cause I was at the company i interviewed to, and most people here looks like bob marley
like hard smokers
sounds like they use a lot of java
lol
23:53
does anyone here have experience with the cloud9 ide, specifically installing it manually, not through aws's integration stuff?

« first day (2871 days earlier)      last day (2300 days later) »