« first day (3418 days earlier)      last day (1755 days later) » 
00:00 - 15:0015:00 - 00:00

15:05
^ We need that bot in every room
yep
what I'd like is to be able to reply someone with code
but you can't both format the code and reply to someone apparently
or maybe it simply doesn't work with ctrl + k
I just post code and then reply with a carrot
🥕
carrots can be fun as well
( ͡° ͜ʖ ͡°)
:48671248 iirc, it works fine
but that might not be the case for you
nope, its borked
Steamed carrots 🥕 with some carets ^v^v^
15:10
@Wietlol It might work if you add spaces yourself in the first line between the message id and the code
some test
in code
nope
can't really do both
       very code
   much format
          wow
       such markdown
Also, FYI, found out that Skype will limit the size of the message you can send, but will completely disregard if the previous message was a single dot "."
convenient bug my coworkers found
Not a fan of Skype/Teams. Discord/Slack are good chat apps
Teams has the busiest interface and yet I still can't find anything
@Neil also, fyi, SO chat will prevent you from writing the same message multiple times in a row
or sending messages too fast to prevent spam
And it has failed, and says "Cancel / Retry..."
15:14
but, it will be completely disregarded if the sender is Wietbot
convenient bug my AI found
Is it just a myth that if you post a suggestion for chat on meta, it'll be downvoted every time?
I haven't tried. But those that I've seen have suffered this fate
|| doge something,funny,no
Invalid command! Did you mean: die, poke, joke? Try help for a list of available commands..‍
pfft
people seem to want a fix, but they'll downvote you if you think you're trying to make it political
and if you don't make it political, you risk to have it closed for being a duplicate anyway
15:20
Nah, I steer clear of politics. Enough of that in the office
@Wietlol your bot does not have an AI lol
it's a dumb bot
but I do
Ahhhh... an AI bot that can fix all things
@Wietlol are you a computer? :o
15:20
then you don't have a form of AI
:P
Wish I was a computer. Maybe I'd remember something for once
@KarelG at least it was capable of bypassing SO's security
I remember that
you even needed a mod intervention
ye
I guess I should rename it to "Ultron"
@KarelG what's this supposed to do?
15:28
https://jsfiddle.net/SirCode/o206kgrx/52/

Got a constant box rendering function (drawBox) and it has two calls, a yellow box, and a black box.

Both are correct syntax (keep in mind im semi blind) but only the yellow box renders.

No errors in console
anyone seeing any issues
Regular Programming becomes AI when you don't understand it
ML is neural nets and shit
thats how I look at it
@JBis look in history
like
> !!doge command,zalgo,gamemaster
gives
Jun 6 '19 at 20:49, by Caprica Six
     wow
           so command
                          much zalgo
many gamemaster
there is a separate plugin in ziraks git
Ah
I'll add it soon
Somone should add a new caprica... Caprica 12.
I miss caprica.. that annoying piece of crap XD
JamesBot is annoying too, but not nearly on the same level
Thanks?
Lol
15:42
take it as half a compliment ;)
I guess?
jsfiddle.net/SirCode/o206kgrx/63 Yup its a blind man issue... I mispelled "fillStyle" as "fillStlye"
Got my old pc back
I can type fast again
and the c key is amazing
YAY
funnily enough, they didnt even wipe it. Whatevs, im happy
@TaylorS That's amazing. Usually, they wipe it at computer shops
17:02
Man this chat isnt so active nowadays
is it.... :(
Ive come on here to see 6-10 hours of no talk before
usually just 2-3 though
That's what happens when a group of outsiders come in and start accusing everyone of 'isms and then don't stick around to fill the void they just made.
:shrug:
It'll take a while to recover from that, if it ever can.
its sometimes active
and people are here we just don't talk
this place used to have 15-20 people actively talking every day with 3x that lurking
Yeah I remember
about even just a year ago
it was way bigger
Well, also, I have noticed all these website WYSIWYGs out there that are drag and drop editors...

They allow you to make a website without any knowledge of html/js/css
hmm, how can i rile up some js devs
17:08
its stupidly boring
leave
@JBis Start using beautiful code, then all the sudden start using bad practice and spaghetti every time
What I do to tick people off sometimes
@KevinB I worry that one day, with all those free website editors, there will no longer be any room for new coders to shine.

The world will lose the thought of "html"
itll just become a hidden backbone no one ever cares about... I just hope it never comes to that
that's guaranteed to occur
Well, I know there will always be things to take over other things.

But html/css/js are like a THING, and I dont want them to turn into the modern "BASIC" language... lost to the ages and rarely used
it'll always be used, it's just, why pay developers to do something that can be easily done by a program?
Why would you work with css/html to make a blog/company/news site when you can just spin up a wordpress site and pick/configure a theme?
17:14
Thats not a show of education or skill
Why build a custom ecommerce site when you can just spin up a wordpress site and install woocommerce, or spin up a magento store?
education/skill is irrelevant
they aren't the things that make a company money
do we really want to fill up the realm of "programmers" with a bunch of know it all ten year olds spamming drag and drop blocks on a pre-made wix site or something?
Kevin, thats the thing, Skill and Ability are "irrelevant" nowadays... now people only care about money
it's the same thing that's happening now (and has been for years) in the manufacturing sector.
just gunna devolve us back to apes honestly...
nah, it's always been that way
$$ is king
17:15
<HTML id="html">
<BODY></html>
<SCRIPT>eval(`

const x = 5;
alert(x);

`);</script>
</html>
@JBis Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
thoughts?
JBis...
what are you doing...
if you can't adapt, you'll be left behind
evil eval
17:16
the case of your tags don't match
yeah thats wierd
also, uh, html is closed too early
and body isn't closed
and why are you calling the entire js interpreter again
wtf is this code
JBis your a good coder
wat is this...
<HTML id="html">
poggers
@KevinB For all parties but the devs this is good.
And devs will still be needed for things, its just higher quality and more skilled devs will be needed
Seriously JBis
what was that code
17:20
11 mins ago, by JBis
hmm, how can i rile up some js devs
oh
yeah that was annoying asf
that was some of the worst html and JS Ive ever seen
compliment to annoyance
If you think about it, templates fixes a lot of issues
security, accessibility, ui/ux, and many other things
https://jsfiddle.net/SirCode/o206kgrx/92/

Oh lovely, yet another click event that somehow cancels intervals
window.addEventListener("click", () => {
  setInterval(drawTextBox(defaultText), 100);
});
It only draws 1 character
should draw each after another, like a typewriter
How do I get it to actually act like an interval...
:L
17:25
Sep 9 '16 at 14:45, by ndugger
coz htm is basic for java https://t.co/zjemDEQp8G
wtf you talkin about
Nevermind I fixed it
setInterval(alert('foo'),100) only alerts once
wait wut
anyways, I fixed it by putting the entire function in a timeout, and calling itself from within
works now
click the box and it types out pixelated chars like one of those old games
its pretty nice too
nevermind.. it doesnt work now...
sigh
and now its working again... lol I love js
17:33
I think I've identified another issue with SE
Who as found an answer, and the first comment under it is more useful than the answer it self? Why isn't the information in the comment edited into the answer. Why does it live as almost an after thought not seen by most?
@JBis typically its added, thats a case when the answerer is like afk and dead forever, and never adds it
or people are too lazy to community edit it
:P
I see that a lot with older questions
if I find answers like that, I edit em myself
easy fix
because 99.999% is noise and we rely on competent and willing people to actually make such edits... and there aren't enough such people to handle the magnitude of SO
thats a bias problem
17:36
that process does work on smaller stacks
It depends on the questionnaires and answerers
Does it tho? I have experienced the same thing on other smaller communities
like I said, depends on the PEOPLE, not the community as a whole. its not SO's or SE's fault if a rando calrissian forgets or ignores the chance to add good info to the answer.
;P
the people are the community.
By people I mean the couple people involved with the question
not the site/community as a whole
17:38
Why should they be responsible for it?
because they ultimately lost the chance or ignored it
Why should i stick around after answering? i gain no additional rep for that
i make more rep by dropping that question all together and moving on to the next
then the next, and the next, etc
if the SO or SE Site had to constantly manage every question to see if there was better info in an answer, its a loss of efficiency and performance..

Its simply not really an obligation to fix such answers
You also end up helping more people doing that
Like I said, its your choice.
So its not anyone elses fault.
17:42
@KevinB well assuming the linking idea works, you would gain more rep by linking and getting upvotes vs adding a new answer and getting upvotes + you don't have to take time to write a new answer
and you would need to keep it up to date and accurate to avoid downvotes
Thats why I enable notifications for antyhing
I get improved answers and comments on age old questions every so often
just today got an answer for a 5 month old unanswered question on SU
Well by then I already solved it on my own but its simply still the idea of it
I love how in an hour of work, I save and edit my uploads over 150 times
/170/
In jsfiddle, I save like every character
so...
yeah...
user8729657
Man I'm kinda sad this happened bbc.com/news/world-us-canada-51602655
user8729657
He thought the world was flat thats why he died tbh
Key term there is "homemade rocket"
Danger is written all over that
user8729657
I mean he was doing well but, right after launch he lost his parachute
user8729657
17:57
In my opinion this guys a hero
If we're still trying to prove the earth is flat, there's something wrong w/ the world
But just that he was willing to try to fire off his own rocket, that makes him special
user8729657
Yea, I respect him for firing his own rocket, but the reasoning behind it is kinda dumb.
if i want to store password reset tokens and such in memory, do i need redis or can i just use a js object?
18:17
@JBis Im assuming you should go with redis to store the data, and then remove it if the token is confirmed within the input in the page
then sandbox it all off so its not accessible by anyone (obviously)
can anyone help me with setting up kafka in docket?
docker*
@qaispak, you've tried docs?
18:34
@Alex which docs, kafka? or docker? I came across a github page with no documentation
Those are docker docs on kafka
on kakas official site?
No that's docker's site
19:04
alright im going off for now
going home from school
cya guys
See ya, Taylor
20:00
Hello all,
could someone please help me ??
https://stackoverflow.com/questions/60381497/how-to-authorize-user-based-on-role-in-react/60381694
@John Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
that should be handled in your router. if user isn't authed, redirect to login or home. should be pretty simple to implement.
@KevinB Actually, I am handling different roles in-app ( like manager, admin ) I have limited access to manager so I want to protect the route of admin and component
sure
but it's still something that should be handled in the router.
@KevinB it would be appreciated if you please provide simple example or answer on my question.
Thanks
20:06
nah, i won't do that
i'd be happy to critique an existing example
i'm not going to build a react app with role-based user authentication for you from scratch
@KevinB No, I am not asking to build it from scratch, I just want an idea that how you can manage multi user role authorizaiton.
if (!user.isAuthenticated || !acceptableRoles.includes(user.role)) { return redirectToHome() }
is that good enough?
sorry, I am a beginner to react so I would love to learn it from scratch. It would be appreciated if you make a simple route file and manage multi-user authorization in that file.
lol
that's my point from above
you don't appear to be at a point where i could provide psuedo code that you could then convert into real code
so anything that isn't real code that you can copy paste in isn't going to be good enough
which means... building something from scratch because you haven't provided anything yet
@John we can help you with two things
1. Concepts
2. Code Problems
you need to write the code
20:14
@JBis I will write code my self but I am stuck in concept
if you don't know how, thats ok, do some more beginner stuff online and ask for help
Whats the concept?
Concepts are independent of implementation
const hh = hours <= 9 ? `0${hours}` : hours;
const mm = minutes <= 9 ? `0${minutes}` : minutes;
const ss = seconds <= 9 ? `0${seconds}` : seconds;

const time = `${hh}:${mm}:${ss}`;
Could this be written in a cleaner way?
As I mentioned that I have multi-role in my application for example ( manager, admin etc ) I want to give limited access to manager and protect an admin route and it component @JBis
routes and components are implementation dependent
@Shamaran pad left probably?
I did, or I thought I did :(
20:18
||> (5).toString().padStart(2, '0')
@JBis "SyntaxError: Invalid or unexpected token" Logged: ``
ohh :P
@JBis "05" Logged: ``
||> (12).toString().padStart(2, '0')
@JBis "12" Logged: ``
20:21
@John Kevin gave you psudo code
hey forrest o/
Can somebody explain why does my recursive function return the wrong value? I've set some examples on jsfiddle

https://jsfiddle.net/Lnrg236p/3/
good afternoon!
The third should be 3 on function return but it stays 0 for some reason
20:47
i see 3 on third, undefined on first and second
because neither of those objects have a length
I've broke 10 users on socratic answers!🥳🥳
yeyeyeyeyeye
I am one of them Hurray lol
It looks pretty good @jbis
good work so far
thanks!
  anyone ever feel like code has a purpetual
        if (theComputerFeelsLikeIt){ work}

    else{don't work}
@KevinB jsfiddle didn't update my code for some reason but here's the correct version. The last one is a function return jsfiddle.net/ct90euzw
The function return should be 3 but i'm clueless as to why it stays 1
0*
I'm pretty sure it's a simple mistake with recursion but maybe y'all can enlighten me? Been pulling my hair out for an hour already :D
20:52
well
var length = 0; sets length to 0, and return length; returns length, so my best guess is your function enters the first if statement and therefore never changes the value of length. level starts out at 0, and 0 is not equal to 3, so that checks out
It actually changes the length when i check it with console log but it won't return the right value
i'mma update jsfiddle to show what i mean
first iteration it's 0, second it's 1, and third it's 2. it never does a 4th iteration, so it never becomes equal to 3
the recursive calls may change the value of their own length var, but that won't affect the ones up the chain
What should i do then?
well
what's the purpose of this code?
to me it looks overly complicated, but that may be because i don't know what it's supposed to be accomlishing
since i got massive arrays going deep into mariana trench i need a way to calculate the length of some arrays deep inside. Doing it manually is just plain stupid haha
i used to do it like this, but things got out of hand
branch[position[0]][position[1]][position[2]][position[3]][position[4]][position[5]][position[6]]
20:59
so you want to dig through the object until it finds the first array and return the length of that array?
Not really, basically it's should go through all the keys from "path" array and use the last key as a object key to find the length object[lastarraykey].length. Or if value is specified then object[lastarraykey][value]
err
so you're providing it a path
yeah
first.second.third
in that case no recursiveness is needed
what you mean?
21:07
  function calcLength(path, branch) {
    let result = branch;
    path.forEach(function(path) {
      result = result[path];
    })
    return result.length;
  }
grr, i missed a semi-colon and can't fix it
it should also work for a mix of arrays/objects, as long as your path is accurate
Yeap that works, thanks man. I've been using this recursive approach all through my code actually, it's silly to see this approach haha
sometimes you just have to throw away what you've got to realize a different approach
 
1 hour later…
22:42
Does anyone have any suggestions for Google Analytics open source, free alternative?
23:15
well part of the power of Google Analytics is that it taps into their dataset
so it would be almost impossible for an open-source project to provide the same metrics
i have an object that has a property value which depends on anotehr property value..
i am trying to do this code but it is giving me undefined error:
let p = {
  firstname: "Tom",
  lastname: "Jerry",
  avatar: this.firstname+'.jpg'
}
let p = {
  firstname: 'Tom',
  lastname: 'Jerry',
  get avatar() {
    return this.firstname + '.jpg';
  }
};
great, thank you
no problem
Yes, but simple graphs and page visits can be done without GA. Don't need super complex.
Yeah those look promising but you are right. Never going to get the power of GA.
thanks
A former SE employee created an issue on my repo and is therefore contributing to my site and is therefore supporting my site!
yayayayayayayayaya
whoa. awesome
00:00 - 15:0015:00 - 00:00

« first day (3418 days earlier)      last day (1755 days later) »