« first day (2566 days earlier)      last day (2375 days later) » 

8:00 AM
Guys, anyone has an idea how this can be null in an Array.prototype polyfill? Got 2 incorrect answers already, I can't think of any scenario where that would ever happen...
 
good morning guys
release your memes, my dudes
 
is there a workaround for handling file upload on iOS browser? Right now it keeps redirecting me to the camera instead of the photo gallery
 
@Cerbrus [].includes.call(nullableArrayLike, something)
 
@MadaraUchiha: Nope
That just returns false
 
!!> [].includes.call(null, 0)
 
8:04 AM
@MadaraUchiha "TypeError: can't convert null to object"
 
That's the native one, not?
 
I just got an answer on there, seems strict mode does something funny.
 
Oh, and the polyfill returns false instead?
 
8:04 AM
So it's not running the polyfill code...
@MadaraUchiha Yea
 
Uuuugh, I've lost too much hair since this morning
 
what a weird way to say you went to the hairdresser
3
 
Stuff not working is your best hairdresser
 
Is there any website which lets you convert synonyms for a given para ?
automatically
 
> by changing any request for a windowBits size of 8 to use a windowsBits size of 9 instead.
So changing the name of the parameter is fair game?
 
8:09 AM
lmao
o/
 
Morning
...kinda
 
@MadaraUchiha Got my answer. That was correct, but... only in strict mode.
!!> (function(){console.log(this)})()
 
@Cerbrus TypeError: cyclic object value
 
!!> (function(){"use strict";console.log(this)})()
 
8:15 AM
@Cerbrus "undefined" Logged: "undefined"
 
@CapricaSix Fair enough
 
@BenFortune Fuck
Developers are not right in the head
 
so now they turned blue again?
 
@BenFortune im waiting till they change the icon now
im not happy
with the current one
Maybe we will get winter snow white
or miner's black
COMPONENT, why you no read from thy store :/
 
I just told a coworker, next thing coming is that you get an icon customizer as part of the install process
 
8:27 AM
Hi every one var arr = [{a:{b:1}},{c:{d:2}}]

to {a:{b:1},c:{d:2}}
how to convert the best way this
 
@OliverSalzburg please do
:D
 
@KARTHIKEYAN.A [0]
@KamilSolecki What? Open a ticket on GitHub about it? :D
 
anything, but we should make it happen!
 
I'm gonna make up some royal BS about blue being the color of gender inequality or something
 
8:28 AM
@OliverSalzburg yes
 
Im thinking like a professional proposal
with drafts and etc
 
see my question above
 
Shit. I don't have time for that
 
@OliverSalzburg Thanks :)
 
@KARTHIKEYAN.A arr.reduce(Object.assign, {})
 
8:30 AM
how is that different from "arr[0]"?
 
@Wietlol He wants the result to be one object
 
@Wietlol arr[0] === {a:{b:1}}
 
because his array is not a single element
 
He wants to merge the objects
 
ow wait
i see
 
8:30 AM
Amazing how we all figured this out from the gibberish
We're like JS archaeologists
 
r/weareverysmart :)
 
@OliverSalzburg He's got input and output, doesn't take a genius.
 
And @MadaraUchiha is the Dr Jones
@MadaraUchiha Given that two of us didn't figure it out...
 
Harrison Jones.
 
!!giphy am I retarded?
 
❤️
 
Why does he keep the mirror in the closet?
 
who doesnt?
 
@OliverSalzburg So that you only get the mirror when you explicitly want to?
@KamilSolecki I don't. I have a fixed wall mirror, but I can totally see when it happens.
 
Seriously? Is that a thing?
 
8:34 AM
nah I don't think so
 
@MadaraUchiha it return {0:{a:{…}},1:{c:{…}},a:{b:1},c:{d:2}} but i need {a:{b:1},c:{d:2}} only
 
@OliverSalzburg Also, the obvious answer, retarded people?
@KARTHIKEYAN.A Ha! 10 points to whoever tells me why that happens first.
 
I don't have one in the closet either
 
@MadaraUchiha Good point :D
 
@KARTHIKEYAN.A arr.reduce((a, b) => Object.assign(a, b), {}) should work.
 
8:36 AM
really your are Great @MadaraUchiha Thanks :)
 
No one gets 10 points.
 
Could someone spare me +- 5 mins on a React problem? As of now, im not even sure if Im doing this right
 
@MadaraUchiha Ha Ha
 
!!> [{a:{b:1}},{c:{d:2}}].reduce((a, b) => Object.assign(a, b), {})
 
@Wietlol {"a":{"b":1},"c":{"d":2}}
 
8:37 AM
@KamilSolecki Fire away
Also, ±
You're welcome.
 
My route component is this:
@inject(STORE_ROUTER, STORE_UI)
@observer
export class AnalyticsApp extends React.Component<TodoAppProps, TodoAppState> {

    constructor(props:TodoAppProps, context: any) {
        super(props, context);
    }

    render() {
        const uiStore = this.props[STORE_UI] as UIStore;
        console.log(uiStore.uiState.drawerOpen);

        return (
            <div>
                <DrawerPanel isOpen={uiStore.uiState.drawerOpen}/>
                <button onClick={uiStore.toggleDrawer} />
            </div>
 
@KamilSolecki A constructor that only calls super() is redundant.
FYI
 
wait where
 
constructor(props:TodoAppProps, context: any) {
  super(props, context);
}
 
it will call super with props automatically?
as in, will be added by compiler? *
 
8:40 AM
@KamilSolecki It won't be added by the compiler. It's just that unless you're doing extra work in the constructor, the parent's constructor is automatically called.
 
On the problem though - I'm failing to get my DrawerPanel to update from the global store, but im not 100% sure if im approaching this properly
 
@KamilSolecki How does uiStore.toggleDrawer look like?
 
export class UIStore {

    constructor(fixture: UIModel) {
        this.uiState = fixture;
        this.toggleDrawer = this.toggleDrawer.bind(this);
    }

    @observable
    public uiState : UIModel

    @action
    toggleDrawer(): void {
        this.uiState.drawerOpen = !this.uiState.drawerOpen;
    }
respectively, UIModel has an observable prop
It can change, and actually does
but it seems that DockerPanel wont read changes from the store
at all
(yes i made sure the store works/changes properly)
export class DrawerPanel extends React.Component<DrawerPanelProps, DrawerPanelState> {

    constructor(props?: DrawerPanelProps, context?: any) {
        super(props, context);

        this.state = { isOpen: false };
        this.handleChange = this.handleChange.bind(this);
    }

    handleChange() {
        this.setState({isOpen: this.props.isOpen});
    }


    render() {
        return (
            <MuiThemeProvider muiTheme={ theme }>
                <Drawer docked={false}
                    openSecondary={true}
now, I'm pretty sure its something about onRequestChange
but I cannot seem to wrap my head around it
its as if the component did not listen to store changes at all
+ sorry for vamping slightly, but im in clueless mode :P
 
8:55 AM
Hi, I'm new to angular 4. I am trying to load a json file from my local. I tried the simple ones where the data is an array of simpe object. Now I'm trying to load a different json which contains alot of nested objects and arrays of variable depth. Can anyone guide me in this.
 
hi guys. i have a little problem
i have try creating multimedisonal array
 
user8639911
How can we save Drawed rectangle as object to manage them one by one ?
 
user8639911
in canvas *
 
so basic but i have optional parameter looks like
 
1 message moved to Trash can
@Qh0stM4N 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, pastie.org or a demo site like jsbin.com
 
9:10 AM
        function dfs(dimensions) {
        var data = [];


        var n = 1;
        for (var i = 0; i < dimensions.length; i++) {

            n *= dimensions[i];

            var layers = [];
            for (var j = 0; j < dimensions.length; j++) {
                //do more maybe eval :)
            }
        }
    }
usage whith var data = deepFirstSearch([3,3,5,9]);
 
recursion :D
 
I want to do this without using eval For example creating string for loop ss= "[0][0][0][1]"
solved this look eval("data" + ss+ " = "'somevalue'"); But this is a temp solved
@Wietlol yes recursion greathing but dring my RAM and only to stack (wtf js is stackowerflow :) )
 
0.o?
 
An algorithm that can be done with recursion must also be able to be done with the for loop.
I think it is.
Is this not possible in all cases? I am looking for a way to do this.
 
> An algorithm that can be done with recursion must also be able to be done with the for loop.
who told you this sorcery?
I can give you a thousand algorithms that require recursion because for loops arent capable of the job
 
9:27 AM
Okay, just a loop can be enough to produce at a known size. I know I can use the Recursion method to size the number of dimensions. I am just wondering if there is any other method that I can use other than EVAL.

I have to ask for an SO question in this regard.
chalk is likely to disappear in chat.
 
eval shouldnt be the solution to anything
at least... other than code injection
first of all, do you want to have a 4 dimensional array or 5 dimensional array if your input is 3, 3, 5, 9?
because in a 4 dimensional array, the 9 is useless
as in js, you dont give an array a length
or you must provide it default values
 
opps sorry this value not useful examples value
 
@Wietlol in most cases it's not necessary, but you still can
 
using Array(x)?
 
@towc You're frigging useless man
 
9:35 AM
that's what my parents kept saying
 
hey buddies
 
@SterlingArcher @ssube
 
Does answering in comments help to get unbanned? :P :P
 
@KamilSolecki real story?
 
9:36 AM
100% legit no scam
 
sauce?
 
I'll admit it, that one took a second or two to sink in
 
@RahulJain No, maybe you should just stop asking really shit questions
 
@towc realmicrosoftsupport.com
 
I feel so sad after reading that
I imagine the guy rejecting the idea of the dead wife completely and starting to cry
now I'm crying too
 
9:37 AM
Omg stop
 
HAMMERTIME!
 
Cap to the rescue
 
the poor baby will probably be blamed forever
 
I've heard hammer time a myriad times, but it still brings a smile to my face.
 
@BenFortune but I literally asked just one question and that too didn't get downvotes and I deleted that too.
 
9:38 AM
and 3 lives have been destroyed already
 
Weeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
whatever. stackoverflow ban really sucks
 
Noice.
@RahulJain I've never heard of them ban without a reason.
 
like this idea a dynamical dimmesions for example [2,2,2,2] result waiting that [[[[[0, 0]], [[0, 0]]], [[[0, 0]], [[0, 0]]]], [[[[0, 0]], [[0, 0]]], [[[0, 0]], [[0, 0]]]]]
 
9:39 AM
@KamilSolecki Most of them are automated
 
ok but would I end up getting unbanned in this life?
 
@GNi33 Nothing?
 
dammit
 
damn it
 
9:40 AM
damn you
 
@BenFortune erst is mittwoch
 
what's it done to you?
 
I don't want to say
 
show us where it touched you
#metoo
 
9:41 AM
 
that is the one with the default value
its simple recursion
actually, the slice(1) was the hardest part
stupid jabbascript arrays
 
@Wietlol thanks for work.
 
i hope your teacher is proud of you
 
as far as I understand it is something we can not do without recursive. through the example code but understandable by the yard
@Wietlol teacher :)
 
herro
 
9:55 AM
@rlemon whenever someone else cuts bread for you
 
Classic case of "holding it wrong"
 
10:12 AM
Oh god lol
A client just called us about a product she wants to mount on a mirror
So we ask her what is the distance between the holes, so that we can try to pick something
She says there is no holes, but she will drill them when she gets the lamp she wants
Mfw
 
Hi folks
I wonder that is Observer pattern same with event emitter?
 
@KamilSolecki Seems reasonable
Make sure to tell her to put the mirror in a closet
 
I bet that in a week I'll get a call
So my husband was drilling the holes with you know a drill and mirror shattered and the lamp was damaged I want full return
 
Oh, she wants to drill through the glass?
Was looking for exactly that lamp, was hard to find
But the lamp is fixed onto the board behind the glass
So, her request made perfect sense to me just now :D
Shit, I realize now, I should have asked you about that lamp! I was waiting for like 2 months for that pos
 
10:22 AM
@BadgerCat happy birthday!
 
Kind of
 
10:39 AM
@GNi33 Thanks!!!
 
@BenFortune :|
 
That's the spirit!
 
The property is always undefined and am using it in a typescript class and have declared it as
    declare var window: any;
while If try it in browser then it just seems fine
    setInterval(function() {
            console.log('window:', window.pageRefs);
        }, 200);
 
10:43 AM
@towc we're heading to the city in like 20 minutes
 
got any plans yet?
 
VR Bar at 4
I want to eat sushi for today
And maybe go to the cat café
 
TIL there's a cat cafe
 
Do you want to come eat sushi at 7?
we're making reservations
food is like 15 euros
It's called Benihana
 
uhmmm
sure :)
 
10:48 AM
Benihana
Beni fucking hana
 
Benny-sama
 
should we meet up at the VR bar at 4 then?
still got some things to sort out :/
 
Ah sure
Then we will go get breakfast, good luck with your passport
 
@towc i hope its the chick from near you
 
10:50 AM
thanks :)
 
towc got laid last night
 
wait wat
 
actually no. A new possible tenant is coming to visit the apt, and I also need some time to settle down and chill my tits
 
@towc Is the VR bar what I think it is?
 
10:52 AM
haven't been there yet, but bager+copy went with kamil a few days ago, I think :)
 
> 'No, I'm from Atlanta, baby
He from Savannah, maybe
We should hook up and get tore up and then lay down, hey we
Gotta go because the bus is pulling out in 30 minutes'
She's playing tennis, disturbing the tenants
 
but yeah, has VR stuff in it
 
Got magnetic charging cables, ordered wrong heads, can't charge -_-
 
ask physics for a refund
 
@towc Already did, Physics won't talk to me after our last battle :(
She's a cruel mistress.
 
10:55 AM
can imagine, sorry to hear
 
How can I've access to page window object in browser extension?
 
I'm struggling to figure out the best way to solve my cyclic dependency issues, for example: https://paste.ofcode.org/F9AbSZA538ijMCyCC9EH7d
Should I be structuring this differently? Or maybe use unfinished exports like this? https://nodejs.org/api/modules.html#modules_cycles
 
@BasheerAhmedKharoti You can't I don't think
The injected script can though
 
@BenFortune yup that way seems possible
by emitting some custom events
 
11:06 AM
@joshhunt Just don't put all the require calls at the top of the file
I actually have no idea why that is a thing :P
 
hmmm, ok I guess that would work. Is that good practice?
 
If I want to get a new package into @types, who do I talk to?
 
@CatBoss make a PR to DefinitelyTyped?
 
@CatBoss Just that ^
For a readme lover, you sure don't read.
 
hmmmmmm
im not sure if I like this formatting
<MuiThemeProvider muiTheme={ theme }>
                <AppBar
                    className="header"
                    iconElementLeft={
                        <LogoIcon
                            width="400"/>
                    }
                    iconElementRight={
                         <FilterButton
                            label={'filters'}
                            onClick={this.openFilterDrawer}/>
                    }
                    style={{
                        borderBottomColor: '#E2492B',
opinions?
 
11:21 AM
@KamilSolecki It sucks
 
yea doesnt it
 
There's so much whitespace here it's kinda racist.
 
Maybe you can write a language to transpile this from
 
            <MuiThemeProvider muiTheme={ theme }>
                <AppBar className="header"
                    iconElementLeft={ <LogoIcon width="400"/> }
                    iconElementRight={ <FilterButton label={'filters'}  onClick={this.openFilterDrawer} /> }
                    style={{ borderBottomColor: '#E2492B', borderBottomStyle: 'solid', borderBottomWidth: '3px' }}
                />
            </MuiThemeProvider>
this is much better
 
@KamilSolecki I'm generally opposed to elements in props
But whatever floats you goat.
 
11:23 AM
I understand JavaScript is ducktyped
However, I am a little worried about how we go about expressing interfaces for automated documentation
 
@MadaraUchiha you mean these?: iconElementRight={ <FilterButton label={'filters'} ...
 
@MoonOwl22 Who is "we"?
 
No, Windows, that picture does not belong there.
 
@KendallFrey But they're so happy and politically correct!@
 
11:25 AM
@KendallFrey They're excited for the update
 
They're outdoors. Completely inappropriate for a software "ad".
 
@MadaraUchiha LogoIcon is a typed svg, I don't think I can do it anyway else 😛
 
@KendallFrey Maybe it's VR
 
I don't want VR with happy politically correct people.
 
In GitLab CI, can you define variables that are not exposed to the environment?
 
11:31 AM
@OliverSalzburg In functional programming languages like F#, the type signature of a function can serve as an interface. In class-based languages like C#, you can define interface types. It is easy to inform the user what to expect in these languages. When using JavaScript, how do you do the simulate the same behaviour?
 
@MoonOwl22 Tests
If you want to know how a function should be used, check the tests :P
 
:(
Explicit tests you mean
Because type-checking is a form of testing in itself. Correct me if I'm wrong
 
I agree
 
Thanks, Oliver
 
It is not available in JS
And stuff like JSDoc or linting are no suitable replacement IMO
 
11:34 AM
I now understand why TypeScript and Babel are popular at the moment
 
Neither is TypeScript :P
 
TypeScript's type system leaves a lot to be desired
 
I agree again!
 
Still better than C#, IMO
 
I like the idea, but I don't like the implementation or the issues that come along with it
 
11:35 AM
There's a word I heard a Haskell user use to describe it: it's 'unsound'
 
I'm under the impression that most people around here see TS in a more favorable light though. So I might not be the right guy to talk to :P
 
I liked TypeScript until I had to define d.ts files
It just seemed tedious enough to just write tests
 
I remember a time where I spend most of my time writing actual code
Now I spend like 50% of the time on supporting tech
 
Python now has type annotations. JavaScript needs them badly
 
Time for some CI fun!
 
11:41 AM
@KendallFrey What is wrong with C#'s type system?
 
@MoonOwl22 It's just missing some nice features that TS has
 
Like?
 
IIRC, thistype
 
That is a nice feature
I don't know why types and procedures are treated in other languages as if they are not valid data
 
Also the fact that interfaces are implicitly implemented
 
11:44 AM
That's pretty cool
 
damn, I thought TS has thistype in interfaces, but I can't find any reference to it
 
Ever since my C++ time, everything went downhill language wise
C++ → C# → PHP → JS
 
Its generally fine to pass a Global UI State store to components, right?
 
Do you believe JavaScript needs sum types?
 
@OliverSalzburg how is C-harp down on C-double-plus?
 
11:52 AM
So that it can have things like the option type
@Wietlol C++ is a well designed language. You just have to know it to use it well.
 
@MoonOwl22 Not JS, because it's dynamically typed. TS has those though.
 
I feel like C++ is the source of redundancy
 
When I was doing C++, I never had the need to complain about the language. There is really nothing to be desired
And when I see the kind of stuff they are adding, I know I'm right :P
 
header files for one
 
@KendallFrey But it doesn't have pattern matching :(
@Wietlol Blame it on C
Not C++
 
11:56 AM
@MoonOwl22 It's got switch blocks that can do effectively the same thing
But definitely not as nicely
 
@KendallFrey But pattern matching like in F# looks nicer
 
@OliverSalzburg had to do a little C / C++ again recently
 
match expressions make the world go round
 
I still hate this language
 
"So my predecessor made a mistake... lets copy that mistake"
 
11:57 AM
I like C
 
Most languages are fine
 
@GNi33 Back then, I was mostly doing 3D stuff. I really liked the level of control
 
C++ added a lot of "useful" (spaghetti generating) features
 
I feel like every language is shit in its own way
 
@Wietlol I agree wholeheartedly
 
11:58 AM
then I tried to make my own language
 
yeah, that was actually fun
 
im still stuck on what to compile it to
 
@Wietlol JS obviously
 
but I just can't get myself to like C++ as a whole
really thinking about learning Rust atm
 
@Wietlol x86
 
11:58 AM
C++ is not the language I would pull out to write anything quickly
 
that's what Python is for
 
But I still remember it fondly for the awesomeness :P
 
C++ is a language I would use if I was to build stuff to be used in other languages
 
I also did a lot of sizecoding (get tiny binaries) back then. Something unthinkable with most modern languages
 

« first day (2566 days earlier)      last day (2375 days later) »