« first day (2638 days earlier)      last day (2535 days later) » 

22:02
That's what she said
but.. what do you mean actually?
I don't see how that site suggests knowledge of js fundamentals
well.. doh, uhm. Maybe you're right, but in my mind having a solid "somewhat" state-of-the-art website, as a guy who is strolling around on stackoverflow indicates that.
especially if you read the profile like I did
I did not
but... I don't think that suggests it either :P
noticed with my redux action that it only works the first time I invoke it..its purpose is to reset the some state values to zero. Any calls to the action after the initial don't reset the state values to zero.
any ideas what to start looking at there?
your code
22:10
people still using redux?
was anything supposed to replace redux?
anything other than redux
and yes, lots of people still use redux
lots
Is it possible to switch to landscape print mode with JS?
22:11
lots of people still use angular 1 as well, I'm sure
i heard it's not advised
but is it doable in firefox
there seems to be so many super basic questions this week that don't have dupes that i can find, because they're sooo basic
-1
Q: How to reading out XMLHttpRequest responses

TomI'm doing a XMLHttpRequest like this: var url = "myurl.html"; var http_request=new XMLHttpRequest(); http_request.onreadystatechange=function(){ if (http_request.readyState === 4){ console.log(http_request.response); } }; http_request.withCredentials = true; http_request.open('GET',url,...

would be actually interesting in this case... how many "lots" really are here
lots
i use angular 1.5 for one website
22:12
@Koosh I use this
@page {
    size: A4 landscape;
}
but i haven't written code for it in a loong time
this is javascript
it's css, but you can enable/disable the sheet in js
@Mosho yeah I know need to take a closer look
@BrianJ if you want real help, make a fiddle
@jAndy there was that survey a month ago
22:14
!!s/fi/ri/
@jAndy @BrianJ if you want real help, make a riddle (source)
yeah will do eventually..my housemate is playing the tv really loud and I can't think :P
redux is still the most popular, and not just from that survey
I use it too, but I don't like it
redux !== react right?
22:15
@jAndy ?
in fact I went to great lengths to make redux look like mobx :P
I'm just curious if they specially asked for redux or react in generell in that survey
yeah, react is separate
there is a section called "state management"
we started using vertx this week, its pretty cool I think
Is there a way to make this?:
var a = {
	b: function() {return "It must work."},
        c: this.b()
}

window.alert(a.c);
a getter would be as close as you can get
var a = {
  b: function() {return "It must work."},
  get c() {
  	return this.b();
  }
}

window.alert(a.c);
22:21
looks like a x/y case anyway, you might want to create a factory or use a semi class
@Mosho Thanks! I will try it!
var a = {
	b: function() {return "It must work."},
        c: "It must work."
}

window.alert(a.c);
lol
window.alert("It must work.");
22:24
i mean, presumably "It must work." is coming from somewhere, so initialize c with it, and then update it when it changes. or use a getter
it can never be right to have that kind of logic in an ordinary hash
I am not making an ordinary hash...
i don't see a point in c existing
if b needs to be a function to work, surely c couldn't work as a getter
22:26
give me a second...
but what if c doesn't want to be a getter?
Would you guys put your SO account on a CV?
I wouldn't
i mostly chat and I don't want them seeing that, so no
I would just put my email address
22:27
Ah yeah, chat is linked good point
yea. they can find it easily, probably
which includes @tentonaxe.com, and if they try that they'd get my so profile
:p
I guess because of SO I already had like 50 job offers, some pretty awesome companies along
so definitely yes
I wouldn't I've asked / ask stupid questions
so have i
and they're all heavily downvoted
22:29
this page even tells them I chat mostly during work hours: chat.stackoverflow.com/users/956900/luggage
ok that's a different story I guess. Any reasonable company won't look on the answers you gave, but the questions you've asked
all my questions look pretty stupid if I look at them now.
but meh.
I get way more value from existing questions
if I was hiring, and looked at SO, any 'real' question that wasn't a dupe or instantly google-able is good. I don't need famous questions.
Well, It wasn't a second, it was 8 minutes, but here I am!
var game = {
    //...//
    maxLevel: ...
    dimensions: [{
	costBuy: ...,
	increaseBuy: ...,
	//and more...///

	maxLevel: function() {return dimCalc.MaxLevel(1, true)},

	cache: [this.maxLevel, ...five more like this...],
	}//more//]
}

var dimCalc = {
     //...//
     maxLevel:
         function(dim, mode = false) {
	     dim--;
             var tmp = cal.levelMax(player.dimensions[dim].promotions);
             if (mode) {
                  game.dimensions[im].cache[0] = tmp;
             }
can't wait for my future employers to look at my chat contributions
oh.... it's for a gaaaame... can you win that actually?
22:37
@jAndy but... which game? ;)
anyway... in this instance I can only repeat and amplify my former suggestion
use a class
@jAndy I am trying to make my first game!
@jAndy Ok, I will read what is a class in javascript...
You made me lose my game
@jAndy ?
oh don't ask
22:38
too late
too late
nice one linkedin
I have a little mental problem you know and only the prime minister of the UK could possibly save me
I hope that makes sense
@jAndy ?????
@jAndy ?????
22:40
@jAndy wait, can she exempt you?
didn't know that rule
I can understand Enders confusion but I'm very disappointed about you guys still DON'T KNOW THE RULES
!!magic
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
The Game is a mental game where the objective is to avoid thinking about The Game itself. Thinking about The Game constitutes a loss, which must be announced each time it occurs. It is impossible to win most versions of The Game. Depending on the variation of The Game, the whole world, or all those aware of the game, are playing it all the time. Tactics have been developed to increase the number of people aware of The Game and thereby increase the number of losses. Though the origins of The Game are unknown, a game featuring ironic processing was played by Leo Tolstoy in 1840. == Gameplay == There...
Common rules, middle section
pretty please
> However, some players state that The Game ends when the Prime Minister of the United Kingdom announces on television that "The Game is up".
...?...
22:42
I wonder what will happen when the PM does say that.
I probably die
because of laughter
mmm, wikipedia say that everyone is playing the game. But they actually doesn't have an spanish version of the page... who spanish people would know how to play??
I can't figure out this performance issue... it only happens in chrome.
I'm transforming an svg to pan and zoom, and when I zoom in and out, it occasionally begins to lag for a bit (~ 1 min).
I crop dusted all the way from the office to my car
Gassy today
Chrome develops more and more to IE6 level, many things are "off" nowadays
22:44
commute powered by biogas
@Shmiddty that sounds like memory, have you tried on different computers?
that's just because standards are too slow
@Webster yeah, I had a coworker try it out with the same result
only in chrome
Chrome comtributes more to standards than anyone else. I’d guess Firefox is a close second.
if chrome isnt the standard than what is?
edgelord
22:47
@Webster ecmascript; tc-39
that would probably be a good social media campaign for edge
self deprecating humor about "edgy" internet things
at this point in time, I'd rather choose Firefox as "standard" than Chrome
I'm all for competition but not between browsers, kind of important application to be standardized
Remember the IE anime girl?
even if I don't believe I'm saying this
22:48
nope
i think browsers should be competitive
but.... not on features
moreso on performance and dev features
!!s/on features/on standards compliance/
foremost, by implementing "standards" correctly
@Shmiddty but.... not on standards compliance (source)
maybe when a browser maker views themselves as important enough they begin tweaking things to their favor, rather than to when is best for users
ie set the standard for dickishness
22:50
like edge using their placement in windows to promote themselves in the actions bar
@Shmiddty I guess they took down the official homepage, but en.wikipedia.org/wiki/Inori_Aizawa
"Use us! we're faster and more secure!"
but if I see Chrome at present... it's horribly random at that point to me. Like a browser that doesn't really inherit backgrounds through as soon as there is a video element ... stuff like this makes me craaaazzzyyy
“We don’t support shadow dom”
23:12
@MadaraUchiha @Luggage @Loktar
got SteamVR running in a VM
it's officially the year of gaming (on windows) on linux :p
excellent.
what's your game
(serious question really, promise, no kidding)
that's the christmas level from horseshoes and hand grenades
user4639281
Hi o/
23:17
@ssube can I be added to that ping list too? Also you beat me to it
user4639281
Just playing with this pattern, wondering if there may be any pitfalls I'm not seeing (or other reasons not to use such a pattern):
user4639281
void async function() {
    const delay = (s, fn) => new Promise(r => setTimeout(r, s * 1000, true));

    const factory = _ => {
        let i = 0;

        return _ => new Promise(async r => {
            if(i >= 10) r(false);
            else {
                await delay(1);
                console.log(++i);
                r(true);
            }
        })
    };

    const iterator = factory();

    while(await iterator());
}();
i haven't seen that avatar
user4639281
Oops, indentation
user4639281
Not sure about the rules on posting code in here. Sorry if I'm violating any conventions.
23:19
you should be ashamed of yourself
@ShrekOverflow if you're thinking about doing it, make sure you have two USB hubs
getting games working was super easy, getting VR working was not
this is the third USB card I've tried and even now, I had to pass the motherboard's USB ports to the VM and keep the card for the host
user4639281
@Shmiddty I am, don't worry.
_ => for that alone
user4639281
23:21
I was more talking about using a function expression as the expression for a while loop, I guess I could have simplified the example a bit.
@ShrekOverflow you'll want one of these, too: amazon.com/gp/product/B009YDO05U
user4639281
It's similar to both a do...while loop, but more self contained, and also similar in some ways to a generator function, but not a generator function.
i was just thinking that, this is one situation where i could see a generator being used
:p
not that it's a good choice or the right choice
I was just about saying that... are you trying to mimic a generator
user4639281
Well, I wasn't trying to do anything really
23:24
nothing is preventing you from calling a function inside a while statement, but I don't see how that code would work
other than that, sure, it's fine to use that. Even tho I think its quite confusing raping a while() statement like so
user4639281
@Mosho well, the function expression is executed, and if it returns true it is executed again, if false then not.
did you try it?
user4639281
Of course I tried it
yeah I guess it does work
23:25
I really think Doug Crock would hate to see what async functions and await statements should NOT force people to do :P
I don't see anything inherently wrong with it
like confusing sync statements with async code in a way that nobody will get it at first glance
user4639281
@jAndy well that's the whole point of async / await is it not?
yeah I wasn't sure how a while loop with an await would work like that
good to know
yeah kind of, but .. meh this is a little over the top imo
I do love and suggest using like "do - while" statements with await keywords, where it actually gets pretty clear what is going to happen after all
user4639281
23:27
@jAndy The async await stuff was just candy in the example, the same could be achieved without the async await, but it also helps demonstrate breaking up the loop so that it doesn't block the UI thread.
but using it like this... just asking for trouble or people to re-look the code over and over
but then again, that's probably just personal preference
user4639281
@jAndy The same could be achieved without the use of a factory function and be more similar to a do...while (I don't know why I made it a factory there):
user4639281
void async function() {
    const delay = s => new Promise(r => setTimeout(r, s * 1000, true));

    let i = 0;

    while(await new Promise(async r => {
        if(i >= 10) r(false);
        else {
            await delay(1);
            console.log(++i);
            r(true);
        }
    }));
}();
yep
dafuck
what are you trying to do @TinyGiant ?
23:30
async looping
the 1 character variable names are triggering me
This made my brain die
   while(await new Promise(async r => {
        if(i >= 10) r(false);
        else {
            await delay(1);
            console.log(++i);
            r(true);
        }
    }));
while (i < 10) {
    await Promise.timeout(1);  // or delay or whatever
    i++; // ?
}
tf is Promise.timeout
not standard at least :P
user4639281
Sorry, I don't even have to use a new promise in the loop expression, I can just use an async function:
23:32
that too
user4639281
   while(await (async _ => {
        if(i >= 10) return false;

        await delay(1);
        console.log(++i);
        return true;
    })());
then why do you even need it
What are you even trying to do here ?
when the whole wrapper is async
23:33
you can just do
the fun part is to watch this 6 lines after Babel is done with them
Java looks like childs play in comparison
while (i < 10) {
    await delay(1);
    ++i;
}
@jAndy Write the same 6 lines in Java I dare you.
user4639281
I don't know I was just playing
what do you need the await for
delay(i)
user4639281
Because without await, it just continues
23:35
without the await code would run sync
I mean... it does in fact run always sync, just not the code logic.. meh you know what I mean
user4639281
@ShrekOverflow Well, one thing I can see is that it leaves the result of the expression up to the function expression, so you can have multiple different exit points.
while (i < 10) {
    await delay(i++);
}
;-)
I'd more prefer
(it's incorrect.)
user4639281
23:37
This is a simplified example so it can obviously be optimized, but the pattern itself may be useful for.... I don't know, something else.
something where the delay does the counting itself
and we just go like while( await delay() ) {}
user4639281
But, the await delay then would not exit the loop
reduce
delay should return 0 at some point of course
then while exists
user4639281
I mean, you could break; from inside the loop, but at the same point the entire content of the loop routine is contained within it's own execution environment.
23:39
@jAndy btw, the firefox quantum dev tools themselves are built with redux :P
user4639281
@jAndy That conflates the purpose of the two tasks. It is not clear that delay would return any value.
@Mosho that explains a lot also
@TinyGiant probably, however I don't see real life scenario where we just wait for fixed delay here, most likely we're talking async processes like requests, db access, etc.
user4639281
I kind of like that it leaves the continuation of the loop up to the routine, and that the routine can be entirely self-contained. The loop can then have no side effects.
Falcon Heavy goes vertical https://t.co/uG1k0WISv1
user4639281
@jAndy Well yeah, but at that point you would want to utilize the result of the async call, no?
23:41
fuck that's hot
let res;
while( res = await dbaccess() ) { }
:p
user4639281
@jAndy not self contained
user4639281
AFK, back in a few
I sometimes wish the one thing I actually like from Perl would come to ECMA
like automatic assigned context variables
nonononono
I mean
perl is fun
23:46
while( await dbaccess() ) {
    console.log( $.name );
}
wouldn't that be a sight
yeah totally unnecessary for that
especially with a $
I'd prefer a ♥ aswell
user4639281
You could use a destructuring assignment in a comma expression, but that would be ugly and hackish, again not self contained. Still afk, driving.
user4639281
Also, using the delay with a 0 timeout and doing some data processing, would be an OK use of that pattern I think.

« first day (2638 days earlier)      last day (2535 days later) »