« first day (1991 days earlier)      last day (2962 days later) » 

6:00 PM
so then I take it my approach is fine?
no one has bitched yet
 
I mean, it looks fine. I might conditionally resolve inside of the promise, but you're failing early, so whatever
 
I hope that approach is fine, I do stuff like that all the time :S
 
@ndugger the idea being not to invoke new Promise if I don't need to run the constructor
 
I forgot this was amazing
 
6:02 PM
that's fair reasoning
 
user5029208
can anyone tell me why this doesnt work. setinterval is suppose to check logic EVERY TIME right?! It never changes just stuck at one. take a look here: jsfiddle.net/wr1ua0db/1814
 
@SterlingArcher One of the best videos on the internet.
 
> EVERY EXCRUCIATING DETAIL CAPTURED IN HD PERFECTION
lmao
 
6:03 PM
Wat
It works for me
 
[content not available in your country]
 
it only works for you
 
it works for me
 
It actually works for me too :-)
 
It's literally me running a line of php file_get_contents(url)
 
6:05 PM
guys he's trying to change hours to 0 after minutes hits 59
it isn't working for me
 
@crl "SyntaxError: missing : after property id"
 
crl
dang forgot what lem said, sry
 
don't forget your whitespace
 
@JustName your logic is wrong
 
user5029208
explain
 
6:06 PM
 				if (hours!= 0) {
                  display['hour'].textContent = (hours == 1) ? hours + ' hour ' : hours + ' hours ';
            }
        else if(Math.floor(minutes) != 0) {
                display['minutes'].textContent = (minutes == 1) ? minutes + ' minute ' : minutes + ' minutes ';
            }
hours hits 0, you stop updating hours display
 
oh god, loose equality check...
get it out of my sight
 
crl
use !====
 
Sweet jesus, they sent our a welcome aboard email to literally everybody in the company
 
1 message moved to Trash can
@JustName Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
:29624619 never hit
 
6:07 PM
Thank god I used a good picture
 
minutes isn't 0
 
javascript needs an operator it has been missing for long time
 
user5029208
theres an else in there as well
 
if( not hitting ) {

} else if ( hitting ) {

} else {
  // above hit, I do not.
}
 
@SterlingArcher You made sure your eyebrows were plucked beforehand, yea?
 
6:08 PM
@JustName ^
 
I almost sent that as a joke
HR said he would have used it LOL
 
@SterlingArcher Now you're just trying too hard.
 
NOTHING ABOUT ME IS HARD
 
I just ended up typing .|.. instead of |...
 
inb4 anything
 
6:09 PM
thank you MS, for the fuck operator :D
 
@SterlingArcher I started watching archer last night, and I appreciate you so much more now
 
@simeg derp, ignore that last message. What are you looking for?
 
@rlemon Running it in a browser console
 
@BenCraig season 6 just came out on netflix today I think
 
!!s/NOTHING/EVERYTHING/
 
6:09 PM
@JustName ALLCAPS null, loose equals, inconsistent indentation, nested ternaries, etc... That code is a nightmare.
 
@SomeKittens no worries :)
 
@Trasiva EVERYTHING ABOUT ME IS HARD (source)
 
@corvid so?
 
@SterlingArcher yes, watch more Netflix
 
"use strict";
<es6 code>
 
6:09 PM
@SterlingArcher I dont have netflix, but I think I have up to season 3
 
!!s/RYTHING//
 
@Abhishrek @Trasiva EVE ABOUT ME IS HARD (source) (source)
 
@SomeKittens add more horror movies pls
 
user5029208
the REAL code is not. I asked a question looking for help not extra banter about how it looks
 
well you are getting help
 
6:10 PM
I've watched literally every horror movie available on netflix (non-foreign)
 
@JustName Telling you about the poor coding practices is help.
 
and the banter is going to happen when you post code to a public domain
and it is helpful
 
user5029208
I can change to strict will still not work. Have tried !== or === could it be the number?
 
@JustName I already told you the problem mate
2 mins ago, by rlemon
if( not hitting ) {

} else if ( hitting ) {

} else {
  // above hit, I do not.
}
 
You're also setting global variables, so there's that too...
 
6:11 PM
4 mins ago, by rlemon
hours hits 0, you stop updating hours display
easily proven by updating hours display in the else if block
 
@MadaraUchiha It seems to still run it out of order when I do that
 
well, guess that css problem isnt one anymore. looks like were all getting fired. lol
 
@corvid Promise.map, doesn't guarantee order.
 
so whos hiring?
 
@SterlingArcher nuu
 
6:12 PM
If you want order:
 
@JustName this isn't what you think it is...

 var display = [];
        display['hour'] = document.querySelector('#hours');
        display['minutes'] = document.querySelector('#mins');
        display['seconds'] = document.querySelector('#seconds');
 
@CharlieBrown everyone.gif
 
Is there a way to guarantee order? The only one I can find is to use just plain reduce
 
@ndugger sure it is
just an odd way to do it
er, I see it now
array not object
 
Aye
 
6:13 PM
even then, odd way about it
 
const tasks = [1, 2, 3, 4];

const allComplete = tasks.reduce((promise, current) =>
  promise.then(() => someSortOfActionAsync(current)), Promise.resolve());
 
yeah that's the one I was thinking of
 
Yeah, what's wrong with a plain reduce?
 
user5029208
ive also tried it this way: jsfiddle.net/wr1ua0db/1814 Just freezes the text isn't the problem. I can change that but I can't get the actual countdown to work simply thats the big issue
 
@JustName are you like, ignoring me?
your if/elseif/else logic is flawed man
accept it, and fix it
 
6:15 PM
and then fix the rest of the code
 
@corvid You can also use a coroutine
 
I still don't understand what co-routine is, to be quite honest
 
it's what you put on a salad
 
@corvid It's async code that pretends to be sync
Here's an example:
 
I've read the documentation a few times, all I really managed to do with it was fancy pagination
 
async function whatever() {
  const result = await getSomethingFromDatabase(); // getSomethingFromDatabase returns a Promise
  const userName = await getUserNameBasedOnResult(result); // Again, returns a Promise

  return userName + '!'; // Just to demonstrate that it's an actual variable
}
with pure promises, you'd write something like this:
 
so I have a unix domain socket I'm communicating with. I send a delimited string for read/write commands, and the socket server automagically sends me values when they are changed.. the return values from the sever are in the following format TAG_NAME;123value456; -- I've implemented a fifo for returning values for reads, but it's bastardized with other checks to make sure the values are not one of the automatic ones.
 
user5029208
@rlemon you literally just mention to use strict. Strict has been used no real solution...obviously there is some issue telling me there's an issue isn't a solution. Even if i rearrange my if/else it now as it hasn't before updates it doesn't even decrement, chk console.
 
function whatever() {
  return getsomethingFromDatabase()
  	.then(result => getUserNameBasedOnResult(result)) // Shut up rlemon
  	.then(userName => userName + '!');
}
 
@JustName actually I mentioned the other solutions, use strict wasn't for you
I've pinged you on or around messages for you
and it does decrement
 
6:19 PM
The first one is more readable because it reads like a normal function, actions at the top, return at the bottom
 
@MadaraUchiha I have that on my meteor application, but I write promises on my package to make it more "compatible" for other people
 
@corvid async functions aren't supported anywhere yet, but we have babel, so who cares :D
 
@JustName just bear with me, change your else if to this:
        else if(Math.floor(minutes) != 0) {
        				display['hour'].textContent = hours + ' hours';
                display['minutes'].textContent = (minutes == 1) ? minutes + ' minute ' : minutes + ' minutes ';
and you'll see hours decrements fine
you stop updating it too early.
and now I go coffee
 
but then you really do need to fix the loose equals, the weird setting properties on an array, the strange allcaps null, etc...
 
@ndugger you're smart. sometimes ;) :P
I'm looking for something almost pre-fabbed
something that will automagically enqueue messages and shit
 
6:24 PM
I'm not a server guy, as much as I'd love to be one... I have very limited knowledge in that area
 
the only option I can think of that would make life SO MUCH EASIER is to call the guy who wrote the server and tell him to identify automagically updating listener returns
decorate them somehow so I can ignore them in my FIFO
 
redis?
 
no, weird proprietary stuff.
 
Hi I asked a question that no one responded to, I hope this isn't against the rules but I'd love if everyone could take a look at my question stackoverflow.com/questions/36290958/…
 
@Shniper Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
6:25 PM
there is no DB, we're reading TAGS in a process automation system
but the system is somewhat closed, so we wrote a bridge that exposes the read/write stuff from a unix domain socket.
so node can see it
 
> In the readme, self explanatory requires a hyphen, I'm sure that once this is fixed,
the code will run much smoother as there will be no syntax errors
 
syntax errors in the readme
what?!
 
@SterlingArcher ROFL
 
6:29 PM
@TristanWiley he's obviously right
@rlemon I don't understand what your question is
 
crl
how does garbage collection work for linked lists?
 
depends on the garbage collector
 
Anyone else's chrome have spacetimestudios as a notification and they can't remove it?
 
crl
hm ok, must be hard to optimize
 
6:36 PM
@SterlingArcher What kind of sick fuck reposts that without audio?
 
My chemistry teacher hehe
 
const invocationPattern = '/';
const commands = {
    'uncollapse' : uncollapseAll,
    'collapse' : collapseAll,
    'giphy' : value => giphyStuff(value)
}

window.addEventListener('keydown', e => {
    //Commands only requring /command, no extra text. Messy, I know, I don't really care.
    var key = e.which || e.keyCode;

    if (key !== 13) return;

    let [command, value] = input.value.split(/\s+/);
    if( command.substr(0,1) !== invocationPattern ) return;
    command = command.substr(1); // get rid of that pesky invocation pattern.
@ndugger @TristanWiley how does this look
 
That's so pretty
 
crl
so android
 
if( commands.contains() {
should be
if( commands.contains(command) ) {
ofc
 
6:37 PM
rlemon I want to marry your brain
 
hey, I'm not saying it works.
or is better
:P
 
It makes it easier to have commands...
 
@FlorianMargaine I suppose I don't really have one
I am moreso complaining about the rock and a hard place I'm in
 
You basically have a command and it's callback
 
working with mongo feels like playing with a toy for 2yos
 
6:39 PM
Meep
 
@BadgerCat I'll order pizza, do you want something?
 
@TristanWiley I was thinking "what if he wants to change the invocation pattern, also what if he wants to add more commands"
 
Did my post show up?
 
@copy pizza
 
an ever growing if statement would be messy
 
6:41 PM
so, basically turn it into cap as a browser plugin
 
cap is a browser plugin
 
@BadgerCat Spinach, peppers and onion, as usual?
 
@Shniper yes, but no one in here is interested at the moment.
also, 1 hour isn't long to wait
 
Agreed... hmm. rlemon we should talk soon some night. This has a lot of potential.
 
@copy yes
 
6:41 PM
OMG
 
^ this has been posted no less than ten times
 
yes. YES. YES!!!!
 
is anyone using browserling?
 
I just put it here because usually once it has been moved from the first few pages it doesn
 
6:42 PM
I'm going to add clippy to this!
 
't get an answer, and I don't want to wait two days to put a bounty on it
 
@Shniper sure it does. many of us have had questions take days to answer
you might have too
or find a paid service for debugging if time is crucial.
 
Anyone here ever use tape for unit testing?
 
It's not exactly time that's of the essence, I just hate not being able to figure something out with programming haha
 
@rlemon on mobile, haven't seen it posted sorry
 
6:45 PM
@BenFortune :P
@Shniper fair enough.
 
@Shniper Sometimes you're better off walking away from it for a couple hours and then coming back to it. Get a fresh perspective.
 
or do what @SterlingArcher does, get tanked, write the code drunk, have no clue how it works in the am
 
@BadgerCat Done
 
Is android emulator browser close enough to test with Real Device?
 
@rlemon Code drunk, test sober.
 
6:47 PM
code drunk, debug sober â„¢
 
@rlemon So someone I know has needed help with their 'programming' class.
Which the stuff the class is making them is stupid.
user image
3
 
@rlemon happens
 
@SterlingArcher I had to stop coding drunk. My comments got a little out of hand sometimes.
 
@SterlingArcher
guy on left, can't hold the beam. guy on right takes it in the chin, guy in the middle is .. well.. rekt
 
Is react worth spending a bunch of time learning?
 
7:02 PM
probably.
I gave up after a day
er, well, three
but only because I realized in an Electron app it wasn't helping me much
 
I was going to spend some time this coming month learning some new stuff, but I dont know whats worth it, and what isnt
 
React for sure isn't going anywhere
might change slightly in flavour, but it should stick around for a while
 
@rlemon Im for sure spending some time with ES6 stuff, since I understand very little of it, I just dunno what else
 
7:07 PM
@BenCraig es6 and functional programming go well together
 
React, Rx, that one library with immutable collections
 
@SterlingArcher did you see: Florida Man arrested for showing up to Jury Duty Drunk. Supreme court rules in his favour
 
@BenCraig if you can get your transpilers to work
 
@SuperUberDuper is that a common problem?
 
7:09 PM
getting compilers working is easy
 
@ssube I'm having issues with babel in browser transpilation
 
I've actually had very little problems with babel
 
Whats Rx?
 
@BenCraig react is pretty straigh forward to learn
 
none that I can recall anyways
 
7:09 PM
@SuperUberDuper then don't run it in the browser?
 
the rest of the stuff takes time
webpack + es2016/es6, flux
 
@BenCraig Reactive JS
 
@Loktar ugh. React-router killed my brain
 
@ssube I like it for dev as I can skip compiing
 
that was around when I realized React wasn't helping me any in this project
 
7:10 PM
I have yet found a need to use react vs vanillajs
 
@rlemon jesus what lol
 
@SuperUberDuper and you probably never will
 
many people, however, find react to make view logic a lot easier
 
@ssube Im not sure I get what its for
 
7:12 PM
@BenCraig see, man, if you think about the universe, like, everything's a stream, man. It's all just flowing downhill, so you gotta, like, become the hill. That's what reactive programming is, it's how you be a hill, so the data can flow down like a stream. Cause it's all streams, man, if you think about it.
 
The more I try to understand programming the more confused I become
 
The more I try to understand programming the more disconnected from reality I become
 
ouch
cc @Loktar -- when losing the game isn't the worst problem you have now. -- I recall this feeling the first time I didn't think and tossed the controller into the TV
 
7:16 PM
LOL
 
> fuck... NO FUCK!
 
@ton.yeung Nope. started with c++
I just like the stuff I do with js the most
Take what you're dealt in school
 
@BenCraig it's a sawtooth curve, of sorts
you learn a bunch, get confused, it clicks, repeat
 
It doesnt help that you guys are always talking about the newest greatest thing, which then I of course, want to try, but Im still 5+ years behind
 
Would it help you if we just talked about jQuery plugins all day?
 
7:19 PM
@ndugger kill me
 
@BenCraig Only one condiment can save you now: ketchup
 
@ton.yeung try to make something with it?
Its motivation to get better though
yes -_-
 
if you're finding places where you significantly misunderstood the language, you may not be ready to throw a bunch of frameworks on top
maybe go back and run through hello world and friends before you go all out
 
ugh.. any way to find out if a table is in a separate .ibd files vs the shared tablespace in mysql?
 
-2
Q: How to implement ng-repeat in plain javascript

Arnob HridoyI need to rewrite the code from angular JS to JavaScript. What is the best method to do it without using any libraries.

ugh
 
7:26 PM
@ton.yeung absolutely. That's a fundamental part of the language and can totally screw you if you didn't actually read the section on variables.
You should find out about hoisting when you hear about the var keyword
 
> the family on the left is from Utah, the family on the right is from Utahler
!!afk dying
 
@rlemon It looks good. It's more the direction I would have gone; I didn't want to do a total rewrite when I did my PR, though
 
That's a short fucking family
 
sigh. not looking forward to running the interview gauntlet again
 
@SterlingArcher I don't care if they're short or not, that's just twisted
 
7:30 PM
@ton.yeung Looks like our entire dept is going to be outsourced to a vendor
Its been a pending decision for a while now, guess we couldnt win them over
 
I like the interview gauntlet. There's a point in your career when you realize, if you feel qualified for the job, you are, and people will absolutely fight for you
 
Also, I'd point out that it looks more like a tall family than a short one.
 
^
 
Interviews are exhausting
 
@Loktar you never replied about factorio
I see how it is
 
7:31 PM
haha
 
As a contractor, every 6mo i do the interview gauntlet. but yeah, im getting too exhausted to do it
 
yeah I'm over factorio
getting the rift next week :p
 
@Loktar Apparently responding to pings as well.
:p
 
probably 100 interviews in the past 5yrs alone
 
                            .forum-description {
                                margin: 4px 0 0;
                                padding: 0;
                            }
                        }
                    }
                }
            }
        }
    }

    .community-details {

    }
}
oh god
what have I done
 
7:32 PM
@Loktar >:(
 
@ndugger Far too much less?
 
@Loktar trading some cheap gimmick for real puzzles? for shame
 
@RyanKinal yes... ironically, yes...
 
@ssube ouch that's a low blow man! haha
 
7:33 PM
Its amazing how many companies are not good at interviewing
@ton.yeung All my contracts are w2 (* almost all)
I havent been a hired employee for about 6yrs now
 
@RyanKinal A sentence that would get you laughed at in any non-technical situation
 
Indeed. Indeed.
 
It was close, but the VP wanted the position to be in MN and I wanted to stay remote, so I stayed contractor
lol, no doubt
I was thinking of contacting ionic actually, since they are in my state I could go down there and interview
 
Hello there.
 
@jleviaguirre Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
7:36 PM
Electron + Ubuntu, anyone ever had the issue of it just freezing on startup?
nvm, screen captured... it's the display driver crapping out
screen capture is fine :/
 
Sure, feel free
Would be cool to network either way
 
can anybody tell me what search terms I'm looking for to get a popover dialog working in react?
got some table headers with overflow:hidden
and I need a filter to popup over the table header, not sure where to start looking
 
Thanks brother
Sent you a linked in msg
 

« first day (1991 days earlier)      last day (2962 days later) »