« first day (2496 days earlier)      last day (2675 days later) » 

21:00
Beware that Meta Stack Overflow is much more public than our GitHub repo, think well if you're really in the right and if you want to open it up there.
and definitely not the email list XD
user1596138
@NathanJones :brofive:
user1596138
Same.
also, Meta SO is serious people. Much more serious than we in chat here.
user1596138
If he makes a meta issue over 12 hours...
user1596138
21:01
It'll be 12 days
user1596138
I would know.
@MadaraUchiha wdym
@KamilSolecki Meta is v srs bsns
is it possable to do something like this app.use(express.static(path.resolve(url));
21:03
@Arrow it might. There are a few ways to tell
one of them is to try
@Mosho It was a fun problem
@mikeTheLiar meth even more so.
another is to read the docs
Basically, CSS modules export things in this format
@KamilSolecki Meta - not even once.
21:03
@KamilSolecki it's not that serious
export const class1: string;
export const class2: string;
//...
Which can only be imported like this import * as styles from './style.css' and not like import styles from './style.css'
The problem is how do you set up an ambient definition that would support import * as styles?
You can't do
@Trasiva so, when you have time? :D
@KamilSolecki I'm leaving work in about half an hour.
declare module '*.css' {
  const styles: any;
  export default styles;
}
okai. Ill be waiting.
21:05
Because it's not a default export, it's a bunch of named exports
thanks going to the docks. was hoping some one had already experienced this problem
@Trasiva wohoo just logged in and got honor lvl 4!
moar dropz
@MadaraUchiha yeah
you can also do
@KamilSolecki Oh nice
declare module '*.css'
21:10
What do these exclamations mark do or what are they called so I can Google them? this.valueAccessor !.setDisabledState !(true);
and that's it
I think
@joshhunt that doesn't look like good JS
But I ended up using something like
@Mosho Yes, I think that could work
!true is false, but foo.bar!.thing is probably just an error
21:11
const styles: { [className: string]: string };
export = styles;
Apparently that works
@ssube No, it's a TypeScript operator
It basically means "Don't worry, this won't be null/undefined even though I said it might"
@MadaraUchiha yeah nice one
@MadaraUchiha oh, that one
I have never used that operator
Me neither
it's a smooth one
@Mosho Yup
21:13
I use it with DI
in react components
all the time
oh, that's unintuitive. Thanks
Also made some pretty nice naive-ish DI for mobx
You might like this one too
yeah send me
or show
I'll look later, heading out
export class InjectedComponent<Props, InjectedProps> extends React.PureComponent<Props | (Props & InjectedProps)> {
  protected get injected() {
    return this.props as Readonly<InjectedProps>;
  }
}
@Mosho used to differentiate between the props passed directly and props injected from the DI
Allows you to either pass only props, or props and injected props (for test)
^ that concept is HOC, right?
21:16
@KamilSolecki No
That's pure typing masturbation :D
This is only for the typing
import * as React from 'react';

/* tslint:disable:no-any
  Rationale: Injector cannot be typed.
*/
export class Injector {
  private items: {[key: string]: (props: any) => any} = {};

  public register<T>(key: string, provider: (props: any) => T) {
    this.items[key] = provider;
  }

  public unregister(key: string) {
    delete this.items[key];
  }

  public get inject() {
    const items = this.items;
    return function(...keys: string[]) {
      // No keys or empty injector.
      if (keys.length === 0 || Object.keys(items).length === 0) {
This is a HoC
That's how we do the injection itself
What is an HoC? AdHoc?
Higher Order Component
@FélixGagnon-Grenier Higher order Component
21:19
which allows for 'hijacking' props for example, and doing stuff on them
There are frankly a few too many anys than what I'm comfortable with
user1596138
They do such a good job explaining the "google-free Android"
But the types outside work out perfectly, which is what matters
The only way I was able to work around having any all over my DI class that I wrote a base class for injectables that everything inherits from
that was, in retrospect, a poor choice and has not helped, but it did make things typesafe
21:21
@ssube In order to maintain flexibility and not add too much complexity, I register providers instead of injectables
btw, are there any SOLID popular patterns for react + mobx that one should follow? (like MVVM for C#)
@MadaraUchiha might this be compared to a dependency injection container? Your example seems to register and produce resources for rendering components
That way I can do const userStore = new UserStore(); injector.register('user', () => userStore) if, for example I want a singleton.
@KamilSolecki Do what makes sense.
@MadaraUchiha I do the same, I just had a create<T extends Injectable> that enforced a predictable set of constructor params.
I implemented DI myself
Like you can see, it took about 30 LoC
21:22
yeah, thats a cool one.
I've got a much more complex implementation (does most of what Guice can) in about 200 LoC.
@ssube I don't have a shared interface (currently)
It's something you should write once.
So my Injectable interface would basically be {}, which is not helpful.
@MadaraUchiha that's exactly what it's turned into
21:22
@KamilSolecki This DI is very naive though
I don't know of another way of getting those types, though
It won't resolve dependencies or try to resolve interfaces to find an appropriate implementation
@MadaraUchiha gosh I love you
You can look at github.com/MadaraUchiha/chusha which is a similar endeavour I took 3 years ago before TS was a real boy
@SterlingArcher ? :P
Ahh ahh, just accept it.
Shh*
Damn mobile chat
archer is a happy man today, just accept his love <3
@SterlingArcher Don't moan so loud, people might hear
3
Chusha actually resolves dependencies recursively to give you a complete instance
@MadaraUchiha, teaching newbs advanced concepts since 1957
So it's more complete in that sense than what I just posted above.
21:25
@SterlingArcher @MadaraUchiha @ssube btw, can I get your guys'es names? I feel bad refering to you by a screen name.
@FélixGagnon-Grenier See, I thought DI was an advanced concept, but both this and Chusha are like, what, 30 LoC? They were both much easier than I had thought.
Well, as you said, there is no resolution of dependencies, though I think that recursion could be achieved in not so many lines
@KamilSolecki but it's 63% of my name already, the first part is just Sean
@FélixGagnon-Grenier The recursion is not bad, nor is async really (assuming some of your providers are async).
If you want named dependencies or some of the fancy stuff, then it does get a little more complex.
I Fugging love recursion
I'd recursively f*** myself if I could reincarnate in my father
I have two working attempts at writing a DI library that I can share as well, based on the Guice API
it's a really fun exercise
oh, I have a "fun" es modules quizz!
Caught someone off guard at work today!
// foo.js
export var foo = 4;
export function getFoo() { return foo; }

// main.js
import { foo, getFoo } from 'foo';

foo = 5;
console.log(getFoo()); // ?
You have quizzes at work?
@FélixGagnon-Grenier By "quizz" I mean "random question"
Anyway, solve for getFoo!
@BenjaminGruenbaum you'll like this as well ^
So my new jeans came, and I didn't know they were stretchy material. They are so fucking comfortable
21:30
Hmmmmmm. Well, shit.
@MadaraUchiha whoa, I haven't heard that name before. Cool one, though :P
@KamilSolecki Dor translates to "generation" in Hebrew
Tchizik is a slightly Hebrewer version of Czyzyk, which is a Polish surname.
oooh
Czyżyk, with polish letters
user1596138
@MadaraUchiha Your name is Dor
Indeed, I just don't have them on my keyboard :D
user1596138
21:32
How do you pronounce it
@Jhoverit Like Door.
Having said that, I don't speak Polish at all.
user1596138
I might name a kid Dor now js
@Zirak Knowing how modules are supposed to be imported, I would say 4, but I imagine it's something trickier than that.
@ssube Whadya mean?
user1596138
All of my families names are biblical anyway
21:32
My grandfather fled Poland when he was 5, so not much heritage from there.
@Zirak functions are a reference (such as references are in JS), primitives are a copy-of-the-reference and don't mutate the source.
I'm naming my kid after Zirak
@SterlingArcher Zirak Zirakson?
aaww
Well, they're both the same, it's just the functions do the thing you'd expect and variables don't.
21:34
@ssube So if I did export function foo() { return 4; } and on main.js then did foo = 5, would it be different?
@Zirak no, it will always return 4.
@Jhoverit thats interesting
@Zirak Logically, it should work somewhat like an IIFE's return value
Replacing the reference should do nothing to what's on the module.
A more interesting question would be
@MadaraUchiha So you're saying foo inside of foo.js won't change, but will your foo change?
import * as fooModule from 'foo';

fooModule.foo = 5;
Now what happens?
user1596138
21:36
@Shrek #BibleBelt
@Zirak and getFoo gets the module's foo, not yours, so the return value won't change
@MadaraUchiha that really depends on how it gets exported, no?
@Jhoverit My real name means worship / purification / cleansing, I can understand.
@ssube Scratch what I said earlier:
@ssube We're talking about spec, and he defined how things get exported from foo.js
user1596138
Mine means God Heals
21:37
// foo.js
export function getFoo() { return 4; }

// main.js
import { getFoo } ...
getFoo = function() { return 5; }
getFoo(); // ?
@Shrek my name means happiness/joy
@Jhoverit Rafael?
user1596138
And as an infant I had airway issues and almost died like. A lot. So my Mom took it as a sign.... God heals....
user1596138
Josiah
@Zirak should be 5, yeah? getFoo in your context now points at the function you declared, the original getFoo from foo is lost
user1596138
21:38
@MadaraUchiha Kind of backwards. I should've said Healed by God maybe
I want to name my son Shrek, partially the reason I will never have kids.
user1596138
I'm on the receiving end of Rafael lol
@Shrek do it, ruin the kid's life
@ssube, @MadaraUchiha Surprise, it's an error!
imports are const
You can't change their values
@Jhoverit I don't see how Healed by God translates to Josiah
21:39
!!define Josiah
user1596138
Doesn't it literally translate to healed by Yah
!!urban Josiah
Josiah to Hebrew is יאשיהו
user1596138
Says le googler
21:40
!!uded?
@Shrek That didn't make much sense. Use the !!/help command to learn more.
U no ded
!!learn uded echo nope
@Shrek Command uded learned
@MadaraUchiha What you get from import * as blah is a Module object, not a "plain" object, which behaves the same way: read-only keys
21:41
but the keys are the exports?
> Josiah was King of the Jews from 640 BC-609 BC. He became king at the tender age of 8. He brought back the Jewish people to their God. King Josiah was killed after he attacked King Necho which was in opposition to the will of God.
yep
@Jhoverit Wikipedia does claim that
But I don't see how it works out in Hebrew
huh. Reminds me of a proxy.
user1596138
I have it on a plaque too somewhere.
21:42
@MadaraUchiha old hebrew maybe, or has hebrew been unchanged since forever?
!!learn uded Math.random() > 0.5 ? Yeah : Nope!
@FélixGagnon-Grenier Command uded learned
@Shrek It was changed
user1596138
> Thus the name Josiah also carries the unmistakable meaning of The Despair Of Yahweh.
21:43
!!uded
@ssube Input not matching />/. Help: User-taught command: 0.5 Math.random()
user1596138
This seems to dissect it. I don't know any Hebrew tho
@FélixGagnon-Grenier I don't think that works
user1596138
God's despair is quite different from God heals lol
21:43
@Jhoverit Yeah, The "Jos" part kinda does sound like "יאוש" which means despair
But there might be a word I'm missing here
user1596138
....They go very far with that and it comes out god heals lol
Wikipedia claims differently
!!learn uded eval Math.random() > 0.5 ? 'Yep, go cry like a ......' : 'die my enemies'
But my half-assed code snippets from a mobile in a bar should work right away
@Shrek Command uded learned
user1596138
21:44
Crazy
!!uded
@Shrek Input not matching /Math.random()/. Help: User-taught command: > eval
!!eval
user1596138
Yea seems like it's ambiguous a bit in the end Idk. Things are based on sound for you?
@Shrek "undefined"
21:45
!!help learn
user1596138
They're acting like without knowing how it's said they can't tell what it means
@Shrek learn: Teaches me a command. /learn cmdName outputPattern [inputRegex [description]]
@Jhoverit No, Hebrew words have "roots"
3 main letters which give the word its meaning, and the rest of the word's properties (gender, tense, person, etc) revolve around
user1596138
Ohh okay.
user1596138
So something about despair
user1596138
21:47
Ish.
יאש is indeed the root for the "despair" family of words
user1596138
We all have bible names for some reason
user1596138
Jeremiah, Jonathan, Aaron
@Jhoverit well, maybe because religion
user1596138
Amanda abigail
21:48
@Jhoverit Jeremiah = Lifted by God, Jonathan = Gifted by God
user1596138
I guess. I mean I don't think my parents thought it had any significance what you're named tho
Can the chatbot even execute other commands using learn?
user1596138
They were trying to be cool.
user1596138
There are 4 boys starting with J, one with A
There are 4 girls starting with A, one with J
Aharon was Moses' older brother
@Jhoverit At least they didn't name you alphabetically...
Yes, I know a family that does.
user1596138
21:49
They gave ever male our Dad's name for middle name, and every girl my moms
user1596138
So we all have the same initials pretty much
They are at י (which is the tenth letter)
user1596138
WHen I was younger I didn't realize middle names were assigned.... I thought it WAS your same-gendered parent's name
user1596138
And I thought that if you didn't have one you didn't have a Dad
user1596138
I remember my friend thinking I was a total nutcase at like 9 years old lol
user1596138
21:52
@MadaraUchiha This is dumb but.... Take the translation for Josiah and put it in as English and translate to Hebrew. It'a a conspiracy.
user1596138
(the already hebrew, convert to hebrew)
@Jhoverit gives demon?
user1596138
> וא55 government
user1596138
Government with a Swastika my input was "יאשיהו"
user1596138
Oh, source as English
Yeah, you're right, lol, wth
user1596138
Lmao so crazy
user1596138
Well I assume that's just a swastika looking hebrew letter... Oh and it was already in the input. Still haha
@Jhoverit it's 55
21:56
ו = o/w/u, א = a/e
user1596138
And ofc, everything is backwards
So it's basically oa55 government
You should totally change your display name to OA55 Government
user1596138
I'll use the hebrew so nobody can ping me
Putting "מאדארה" in there (which is the Hebrew transliteration of Madara) gave me Ardier 21
This is amazing
user1596138
Lol codename generator
22:03
@Zirak that someone doesn't know how modules work :D
That's not supposed to be a hard question
24 mins ago, by Zirak
@ssube, @MadaraUchiha Surprise, it's an error!
It's fair to not expect that
I was tricked by Babel :(
I have yet to use a platform where modules are correctly immutable
@Zirak I think it's reasonable, and it's also reasonable that they are live on the exporting side
@BenjaminGruenbaum It's reasonable but different than how things worked until now
22:07
@KamilSolecki You've blown me off twice now.
If you wrote a module exporting a variable and someone changed it on the outside that would make for some pretty shitty developer experience
It sure caught me off guard
@Zirak the const side is reasonably close - the live side is what's surprising but if you want to actually be able to export variables (vs an exports object) it's the only way that makes sense
@Zirak by the way - your fanboy paul released something pretty cool today for automation with his gang
@BenjaminGruenbaum hrm?
@BenjaminGruenbaum eeeepppp!
2.8 2.8 2.8
I was in the middle of building that
is so cool
When we start having tourists visit the Earth the 'Total Solar Eclipse' will be rebranded as 'Perfect Solar Eclipse'
22:34
@Zirak Wait, didn't you do like a whole lecture about this?
I'm almost sure you covered this exact case
@MadaraUchiha yeah
I learned that while prepping for the talk
23:21
Yo
Finally finish the mdn docs translation
!!poe or nms
@KevinB poe
23:50
Anyone here an android user
I have an android phone
so what is the iMessage equivalent on android?
uh
i dont know
i thought that was an apple thing and they werent going to put it on android
I doubt that. I just want a messaging app with enhancements that graceful degrades to text message
you doubt apple wont port imessage to android?
23:54
I'm positive actually its a selling point for iPhones
yeah
i use google messenger for text messages, facebook messenger, google hangouts and whatsapp
too many tbh, but different people use different apps, so youre stuck sometimes
yeah there is also wechat and telegram
I just want one that falls back to text messaging inside the app
if it doesn't support the current API or whatever is used
whatsapp and facebook messenger both have text message capability
i dont know about how it works because i never enabled it
yes but at least in whatsapp you have to add them as a contact

« first day (2496 days earlier)      last day (2675 days later) »