« first day (3316 days earlier)      last day (1615 days later) » 
00:00 - 15:0015:00 - 00:00

12:04 AM
that's.. unfortunate
hey @DavidKamer long time no see
 
I hate freelance 😡
People don't know how to tell you what they want before they don't have it. They say build x, I build x and they ask where y is. What do you mean y? You only said to build x.
@DavidKamer no because of the back tick
I guess that's not just limited to freelance but to clients in general
 
12:58 AM
@forresthopkinsa right back at you. I hope all is well!
@JBis I figured it wasn't right
Ooh, can't you just replace my extra spaces with a back tic? I read the string literals as pads
 
user7437719
Hmmmmmm..

There is actually a LIVE conversation going on? Crazy!
 
Ikr. Everytime I've been here recently it's either dead or conversation about the chat's imminent death.
 
and now, you have become the very thing you swore to destroy
 
user7437719
What is forresthopkinsa doing lately? I first saw him in the duck overflow room and test my bot room a few days ago and now he seems like a regular
 
1:10 AM
Hi all, I have a question about UI update and timeout function using angularJS, but I think the concept can be common in native JS too.

I have a callback function for setTimeout(()=>renderReport()) which requires a visible DOM element by its id.

The DOM element might be hidden by ```<div id="div1" ng-if="!isHidden"></div>```, so I will update it to be visible before executes the setTimeout, like
```
//...
isHidden = false;
$timeout(()=>renderReport()); // or setTimeout(()=>renderReport()) in native JS
 
user7437719
Okay junlong!
 
@TomMinor I only visited the test room because you linked me there
I'm only a regular in this room
 
user7437719
Help will be here momentarily!
 
user7437719
@forresthopkinsa help junlong!
 
|| formatting
 
1:10 AM
@forresthopkinsa Invalid command! Try help for a list of available commands..‍.‍.‍.‍.‍.‍
 
user7437719
@DavidKamer help junlong!
 
user7437719
@JBis help junlong!!
 
Tom, don't tag people uninvited.
It's rude.
 
user7437719
junlong needs help!
 
1:11 AM
Jbis does James know a formatting message command
 
user7437719
stop talking about james!
 
user7437719
who cares about james?
 
user7437719
he is just some arbitrary bot
 
I'm trying to obtain the message that will educate junlong on how to format his code
So that I can better answer his question
tl;dr @JunlongWang use ctrl-k to format your code, and put the code and your text in separate messages
like this: this message is my comment
this message is code, made using ctrl-k
and this message is more prose
 
!!>()=>("I'm alive!")()
What happened to our cap?
 
1:15 AM
||> return () => ('James is alive')();
 
@forresthopkinsa undefined Logged: ``
 
||>()=>("I'm alive!")()
 
@forresthopkinsa "SyntaxError: Unexpected token return" Logged: ``
 
||>()=>("I'm alive!")()
 
1:15 AM
@forresthopkinsa "SyntaxError: Illegal return statement" Logged: ``
 
user7437719
what happened to helping junlong?
 
It pings you only lol?
 
user7437719
please do what you have been doing in the test my bot room if you do not intend to help
 
Put a space between the > and the command
 
||> (()=>("I'm alive!"))()
 
1:16 AM
@DavidKamer "I'm alive!" Logged: ``
 
Tom, you are not a RO, you have no mod powers nor authority of any kind here. Quit it.
 
@DavidKamer no, the last item will not have a closing tick
 
@JBis that's why you add + ''`
oof
you know what I mean. Concate it at the end
Big O will thank you
not that it matters most of the time
 
@JunlongWang, as I was about to say, your question is not actually applicable to general JS. Angularjs' $timeout functions inside its specialized digest cycle system, which is different from the normal JS event queue. Your problem is almost certainly that your code is running on the wrong side of a digest cycle. This kind of question is exactly the reason that people rarely use AngularJs these days; the digest queue is very hard to work with.
 
alright jamesbot will be right back to fix his stupidity
|| sudo disable
 
1:19 AM
Shut Down
 
@TomMinor, in the future, unless you're prepared to be the one to answer someone's question, just leave it be. As far as I can tell, you don't seem to be equipped to answer any questions about the AngularJs digest cycle, or the JS event queue, or anything related to those. So I'm not sure why you've chosen to participate in this particular question.
 
I see nothing has changed lol
 
@DavidKamer @DavidKamer true, true, but thats cheap
 
Why is it cheap?
*why do you think it is a cheap solution?
 
You join a character just to add an extra one at the end? Obviously join wasnt the right function to choose
 
1:23 AM
Initial cases and iterables can coexist.
*special cases
Technically I could use the argument of "right function" to argue that you should use developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
instead of + in the map
const specialCaseJoin = (array, charset, special) => (array.join(charset) + special) if you want to do it like a functional programmer. Bind a method to the Array prototype if you want to feel like a genius lol
Maybe rightPadJoin will be a standard in the future ¯_(ツ)_/¯
 
|| enable
 
I'm back alive!
 
|| sudo restart
 
My life has come to end. I hope to be revived soon.
 
|| formatting forresthopkinsa
 
1:34 AM
@forresthopkinsa Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
||>((((((
 
@JBis Use a space between || and your command. For example: || help
 
And before kevin complains, the docs aren't update yet.
@DavidKamer oh well
 
why not just remove the need for the space?
 
1:37 AM
lol
I wonder..
 
@david because i forgot how to use substring properly
 
false || echo "this is bash stuff"
 
@DavidKamer ?
 
@forresthopkinsa Thank you for your reply.
 
Just testing it. Idk
 
1:38 AM
I'm testing I'm using code format
 
Ok, james is dumb not that dumb
 
lol
@JunlongWang good
 
Looks just like caprica to me lol
 
James is superior to Cap!
 
sexism
 
1:40 AM
Junlong, your problem is very likely with AngularJs digest technicalities, and that's not something I can really fix for you here. You're gonna need to do a lot of reading about how AngularJs works, it's not simple.
 
@JBis it does seem like you've done a good job managing and/or developing it. I remember when you first came to this room lol
 
thanks :)
@david was the first person i talked to :)
 
me?
 
Yepo
 
like ever?
 
1:43 AM
Surprisingly it wasn't a shitty question
Jun 29 '18 at 1:26, by david
because you're 2 strings deep you need to escape the `\`
then i tried to teach him php and it went south from there
 
Just do JSON.stringify(JSON.stringify(something)) on accident and you'll learn that lesson pretty quick
or like a pipeline where you accidentally stringify instead of parse and you run it on the data a few times, each time it sees a string... You'll get like 30 `\`'s
 
@forresthopkinsa Yes, I read a lot, and everyone says $timeout should work, but I didn't get luck.
 
$timeout will solve a very specific subset of problems
I don't think you understand angularjs well enough to understand why $timeout works, or why in this case it isn't working
I say that because you seem to think that this is an issue with the JS event queue but it isn't, it's an issue with angularjs' digest cycles
It's okay, it takes a while to understand angularjs
It's a very complicated framework
which is why people almost never use it for new projects these days
 
Alright, I'll keep digging...
Thank you for your suggestions
 
Sure. Sorry it's not an easy answer.
fwiw I write angularjs code professionally every day and this kind of thing still trips me up and wastes my time. Often.
 
2:01 AM
Alright
||status
 
I am currently alive!
 
@david there you go
was a pain in the ass
 
2:17 AM
@JBis huh, i actually remember that convo now
it was really confusing how you were ending up with that string
until you mentioned that you were doing half in php and half in JS
 
 
1 hour later…
ABC
3:37 AM
can anyone help me.
0
Q: How to hide other column when expand the clicked column in angular ag grid

ABCHow to hide the other columns when expanding the column that clicked and when the column clicked again it will show the others column again. here's the code list.component.ts columnDefs = [ { "children": [ { "headerName": "Style/Machine", "field": "c...

thnks
 
 
4 hours later…
7:34 AM
.
 
:o
 
@JBis can you change the command back to !! ?
I mean, I know you can, but could you?
I mean, I know you could, but will you?
I mean, change the bloody command
 
Diplomacy at its finest.
 
Civilization level diplomacy
 
wat s lif
 
7:58 AM
@Nobody being nobody?
 
8:14 AM
@geisterfurz007 hehe
 
8:33 AM
@ndugger no u
 
9:18 AM
still in the stone ages I swear
IE 10 doesn't have support for data attributes..
really..
I have to redo everything because some colleague is using IE
 
just remember to hide his body
I'm starting to think you should be able to set html attributes via css (except js related ones, or data attrs)
input[name='name'] {
	-html-title: 'input your name';
}
 
ew
no
 
@BenFortune visiting London anytime soon?
 
Nope, don't plan on ever going to that shithole
 
LOL
Damn!
 
9:28 AM
@Neil why is the focus not on IE11?
and you can get around that\
just use .getAttribute
so have a function to retrieve data attribute from elements and do a check there
 
@BenFortune so I'll have to travel north :P
I <3 London!
 
function getDataAttribute(element, name) {
  return element.dataset ? element.dataset[name] : element.getAttribute('data-'+name);
}
 
10:04 AM
@KarelG Do I need to remind you that I work for a bank?
Nah, I don't want to use attributes which don't exist.
I'll just throw it into a hidden input or something
 
okokokok! Here goes! The new feedback mechanisms announced in the blog post are emojis you can add to questions! How does that sound?
I am sure that's going to be it!
 
Trying to tidy up my code, but it keeps breaking:
I have a php script that writes into javascript and it works great, but pages are getting a little tricky to navigate, especially with repeated code between pages.
Okay, put javascript into files. Nope. js files don't allow php.
Fine, put some javascript into files, but keep the variables and functions that require php on the page. Nope, functions from a js file can only be called by js files placed AFTER the file that defined the function.
No big deal, one folder called "functions.js" and call that one first. Nope, because that function ref
I just find I'm copying and pasting single functions a lot from page to page, which is very messy.
I'd post this as a question, but style questions aren't received well
 
10:20 AM
@geisterfurz007 ( ゚ヮ゚)
 
I think, just typing that all out here has put a few things in motion. I think I can tackle this now.
 
You got this \o/
 
The first time I wrote this, I used
<script>
<?php if(test){
echo "foo();";
} else {
echo "bar();";
?>

a lot
 
@JonathonPhilipChambers Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
So now I need to translate that to a javascript function that does foo or bar based on a php variable. (Though I die a little inside when I put an unnecessary function client side.)
Is there an easier way to make php and javascript play nice together?
 
10:36 AM
Why does this prints the value inside fetch function but outside y prints empty?
var myvar = "";
fetch(url).then(function(response) {
    return response.json();
}).then(function(myJson) {
    myVar = "test";
    console.log(myVar);
});
console.log(myVar);
 
Because it's async
stackoverflow.com/questions/14220321/… This is the goto duplicate for questions like this. In your case you are not returning the value but logging it but the reason for the behaviour is the same.
Essentially what happens is that fetch is called and does its thing but in the background. The .then essentially means "When the previous function call completed, call this function with the result of that call". Now because fetch is doing its thing in the background, the rest of that function is free to continue and the next statement is the console.log at the end of that snippet. When that is executed, the request has not been completed yet so your variable is empty.
 
@Neil too much effort
 
@KarelG It's literally already done :)
 
what if you need to add another data attribute?
gotcha add another input box?
 
10:52 AM
@geisterfurz007 Thanks
 
You're welcome!
 
Went for a walk. I have an idea, but it hinges on one question:

Is it safe to insert

    </script>
    <script src="externalScript.js"></script>
    <script>

into the middle of script tags? Or will separating the logic into two script tags break things?
 
@JonathonPhilipChambers Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
How do I format code here?
 
@KarelG looks like
just like I'd have to add another attribute
 
10:55 AM
I think I got it
 
@Neil which one is more future proof?
 
@JonathonPhilipChambers Well "safe" depends entirely on whether or not they share some global variables or functions
And if they do, then order determines which overrides the rest, with the later scripts overriding the previous
Ideally they do not though, so you should probably be fine
 
Well, the tags break when they're ALL external
So I'm guessing they'll break here too
Oh wait... let me rephrase, just to make sure I'm asking correctly
Is it possible to break something purely with
</script>
<script>
If I just put a closing tag and opening tag in the middle, is it possible for that alone to break something?
 
Yop team
 
@JonathonPhilipChambers I'm always very cautious to answer no to a question like this, but let me put it this way.. I see nothing wrong with it
 
11:04 AM
Can somebody explain me what is happening on this line ?
const B = (({ a, d }) => ({ a, d }))(A); // const A = {a , b, c, d}

From what I thin I get:

Its an anonymous fonction from argument (or binding?) A which destruct {a, d} to return implicitely an object {a, d}.
Two questions, why does the parentheses are needed after the arrow ?
And how does work this binding/argument ?
 
@Neil well, time to find out, I guess. That's what GitHub is for after all
 
@Baldráni IIFE + object assignment
1. B is declared
2. (({ a, d }) => ({ a, d }))(A) is an IIFE, A is passed to anon function
3. anon function is handled: ({ a, d }) => ({ a, d }) with argument A
4. {a,d} is set via object assignment (so "get value from key 'a' and 'd'  in A)
5. return {a, d} which is a new object with a and d set.
 
so how does the result of a call to B result in {a, b, c, d}?
that's hella confusing
 
11:30 AM
uhm, is a self-calling lambda an IIFE?
 
@Neil it doesn't ?
 
@KarelG oh I misread the comment afterwards
 
I can't think of how a function IIFE would be different from a lambda IIFE, in practice. I think they're optimized differently, but that's about it
 
@towc intend is probably "shrinking" an object to 2 keys only
 
yet even modern posts about IIFEs only use functions
@KarelG I'm going on a tangent
 
11:36 AM
I am not familiar with that "going on a tangent" ...
 
as in, I'm branching the conversation to a new topic that I find more interesting
 
@KarelG talking off topic
 
tangent is a type of bird
 
though in the context of this chatroom, everything or nothing is on a tangent
 
I only know tangent = geometrical entity
 
11:37 AM
.
 
@KarelG that's what it's supposed to bring to mind. splitting off the conversation like a tangent line
 
@KarelG I think that's where it comes from. If the original conversation was a curve, a tangent is a line the "originates" from that curve but goes somewhere else
@Neil huh, funny we have different views on how it relates, but it still does
 
what's wrong with "being off-topic"?
less math?
 
nothing I suppose. Just another way of saying it
if anything, maybe going on a tangent is a nice way of putting it
saying you're off-topic is sort of matter-of-fact and formal
 
@KarelG I pointed it out because this is not related to the original question, but you seemed to try to fit it in there again
oh wait
you're asking what's wrong with that as a definition
 
11:40 AM
hence the quotation marks
 
I read good
it's not off-topic, actually
apparently "going on a tangent" comes from the fact that in latin, tangent means touching, so the conversations topics have something in common
sadly I don't think geometry is involved :/
 
@KarelG sorry had to do stuff for work Indeed its a salf call !!
Last question, why is the parenthese needed after the arroow
Cant we implicitly return just an object ?
=> {a, d}
 
it's interpreted as a scope if you don't use ()
 
As a scope 🤔what do you mean by that ?
 
11:56 AM
{ console.log('hi') } is a scope
maybe calling it a block helps more
it's a code block, as opposed to an expression
({x: 1}} is an expression, {x: 1} is a code block, containing a label
labels aren't normally used, but their existence complicates some things
if you don't know what they are, look it up
 
screw labels
 
for clarity, const x = {x: 1} turns the RHS into an expression because it's an assignment
it's all about whether you're expecting an expression or a block
 
Clarity enlight me :)
 
@towc I am hesitant to do this because if cap comes back there will be conflicts. If we don't think cap is coming back for long while the I guess I can change it.
 
I don't think cap's coming back
rlemon might, but he'll be thankful someone took over
 
12:04 PM
Ok. I'll look into switching it over soon.
 
thanks :)
 
ummm
is SO down?
 
hopefully he does, r17 misses him!
 
@geisterfurz007 seems so
 
Noice
 
12:05 PM
oh, it loaded
 
Oh, indeed!
I wonder if someone on their end broke something or if someone from the outside had a little fun.
 
you wonder the wrong things
you have too much free time
 
I have to write a thesis
But yes, I am bored.
I only got shitty chapters left to write... Internal architecture of React Native, Internal architecture of Flutter, App development best practices and the base concept.
 
so almost done? :)
 
I at almost 50 pages total still without graphics. I think if I work well I might be done with the first version by the end of next week.
If I chat with random people who have one of the best looking dogs I have ever seen... Maybe longer :D
Also yes: You are random people now :D
 
12:11 PM
I can provide more procrastination if you want
 
You are already doing that D:
 
foiled again
 
go do your stuff, I'll ignore you for a bit
 
12:43 PM
wondering if anyone knows a concept I can use to create adjustable Parenthesis, like in a math visualizer
I so far got fractions working, variables, sub and superscript numebrs, variables, etc
but I cant figure out parenthesis
codepen.io/SkylerSpark/pen/KKKGaeW Im using this as a template to convert it, and Im working on a script outside of the pen atm to create this
 
user8729657
They increased everyone's rep :O
 
yeah, they recalculated it
Still question banned, even though Im above 300 now
I edited like 10 questions yesterday, and earned more than a hundred rep in other sites yesterday, trying to hard to get un-question abnned
sadface
 
@TaylorS well how much do you need to be unbanned?
 
No idea, I believe Ive just gotten too many downvotes on my questions
upvoting without reason is bannable, so please dont :(
someone did that to me before, and they got removed from the network :((
 
sheesh, not very welcoming this system
 
12:52 PM
those aren't many downvotes
 
yup, thats exactly why they added the rep recalculations
 
or I guess I'm only seeing the ones that don't have them
 
Still enough to get me banned
Plus, i was serial downvoted TWICE after an argument in C#
and those were removed, but Ive been question banned since
 
amazing
 
Honestly, its been hard learning any programming since Ive had stack as a useless resource, but Ive learned a lot more in that time
how to teach myself to code, without stack or courses
and, atleast I can still use chat
 
12:55 PM
to be clear, the point of stackoverflow isn't to get your questions answered
 
I know, its just a library of information
 
it's to compile a catalogue of searchable problem solutions
 
heard that a thousand times
 
and yet
it's not a small detail
make sure you do your research before asking a question
 
1:07 PM
Unfortunately I havent had the chance to do that anymore
I gave up on the "Edit and Improve your questions to be unbanned" concept
people who dontvote dont check the question every day to see if its improved
so chances are it usually wont.
 
doesn't the question ban have an expiry date anyway?
 
Nope
 
sad noises I missed the 12345 words mark when writing my thesis earlier this morning ._.
 
unfortunately for the rep-rich people, a question ban for someone with lots of upvotes is temporary.. But for a lowly peasant like me, its permanent lol
^ Sarcasm btw
But semi true
This is what a sad depressing perm ban looks like:
 
1:14 PM
@geisterfurz007 in the long run you'll be glad you didn't stop to notice
 
I wanted to make a screenshot and have a sip of sparkling water on the occassion...
Hoping for 13579 this time
 
people on the freeway with traffic blazing past at speeds of 140 km/h and they're making a selfie with the odometer at 12345
 
That is a stretch but I know what you mean.
 
I've seen people do it
not that far fetched
 
Yeah I meant using that as comparison for writing a thesis :D
And now thee shall refrain from distracting me :P
I know it is me distracting myself, I am gone already, byeeee
 
1:35 PM
@TaylorS you should look at my sad depressing life
 
1:48 PM
Well, You ARE a nobody. /s
Well, cya guys, going to go play kahoot in class (Yes we still use kahoot in highschool)
 
heck, one of our lecturers used it in university a few times
it was the first and last time I heard about it
 
2:07 PM
lol, the first kahoot game I ever joined, I used a bot to make 50 people, and then used HTML in the name field to make my name a picture XD
Then they patched the html trick... sadface
I remember it only existed for a little while, but its fun writing a whole website as a username in kahoot
 
@TaylorS if you're bored, go on codewarrior
 
its an IDE?
 
it contains one
 
nxp.com/design/software/development-software/… Sounds like bTools or Admin tools
 
just go there
oh sorry, codewars
should keep you busy for a while
 
2:12 PM
OOOH
This sounds interesting :D
BRB
lol initiation tests are easy
Wow this thing is cool
 
great :) please don't tell us all about it
 
2:46 PM
Best way to store immutable data that can be verified by the public, anyone?
 
I'm going to regret saying this, but... blockchain
@meagar wow, do you get a flag every time blockchain is mentioned?
that was uncanny timing
 
@towc Thanks for your response. I feel the same.. You think that's the only option or..?
 
depends on your actual requirements
for most cases, something similar like what git uses is enough
and even blockchain is easily tampered with, if you don't have a big history and a large network, or your hashing algorithm is shitty (or your challenges)
don't try blockchain at home, kids
 
@towc thanks so much, I feel like git would be the best option for my use case but would that be immutable though?
 
git isn't
but you can use the same principles
 
2:55 PM
Exactly, git itself is not immutable but I can apply "blockchain" technology to make it immutable, sort of
Or am I totally wrong with this?
 
it's not blockchain
it's a merkel tree, or something like that
look it up
any of this is no better than keeping trustful logs anyway (that would show changes throughout time)
you can put this on a public website that is reachable by archive.org, so people could check on a third party if anything has been changed
or they can download and compare themselves
that's much better than having a hash tree that you can just recalculate
 
00:00 - 15:0015:00 - 00:00

« first day (3316 days earlier)      last day (1615 days later) »