« first day (2866 days earlier)      last day (2307 days later) » 

00:07
So, how you guys been?
A discussion with the room owners decided that the JavaScript room does not welcome Tobi back. That is the decision made by the room owners, and until it changes, you are likely to get kicked on sight. I'm closing this meta thread, as the original request had been dealt with. The rest is between you and the room owners of the JavaScript room. If you think you have been mistreated (hint: You haven't, I was there) feel free to ask a new meta question. — Madara Uchiha ♦ 7 hours ago
enough
stop it
you've been told by us, the moderators, and you still continue
@MadaraUchiha
that kick was a mod flag
30min
I like pinging madara
fair'nuff
00:11
did you watch 72 dangerous animals: australia yet
I've seen parts of it here and there
didn't watch it today
all 3 seasons are amazing
really brings into light how many things can kill you
00:37
Oh hey, Tobiq, long time no see
@rlemon i dunno, i've gotten a fair amount of rep from this answer: stackoverflow.com/questions/9121395/…
jQuery gets a lot of upvotes too :D
ice cold
You're right Lemon, my bad
jQuery gets upvotes because it has such a low point of entry.
2
nahh, because a lot of people use it 😛 people are lazy
From what I can tell, at least here, the colleges and universities teach jQuery outright and fail to explain that it's a a javascript library.
Well, okay, fair enough.
Even though ES6/7 let you be pretty lazy and clever at the same time, lol.
00:42
but then you have to learn it, and how to debug it
jQuery has a plugin for it
Fair enough
jQuery does deserve some respect tho, as much as we joke
it spearheaded a bunch of rich ui's and made us speed up making things better
Oh, without a doubt. It's like that friend you like to give shit to, but still appreciate in the long run for pushing you along.
Is it still an entry point for most to JavaScript?
in another 8 years we'll probably be laughing about React and all the silly things it allowed
00:53
Speaking of, React got pushed back for learning because now I have to learn to be a scrum master
I feel like the entrypoint for javascript should be the canvas API
it is fun
that or the audio api
probably the most fun you can have with client side js imo
i need to spend more time with the audio API
i made something once that just ran it through the FFT
so i could try see the notes
same
but synth is a lot of fun
and surprisingly not difficult.
not as much maths involved as canvas
really? is it easy to save the audio you create as a wav/mp3 or something?
cos that might be fun... creating a sound effect generator
like that old one
00:58
never tried to save it 😒
but you've got to convert it to a format that players like right
01:16
What would it take for you guys to give Tobiq a second chance?
One trillion dollars!
@AaronHall a year of peace. He's caused so much stress for this room.
@AaronHall he trolled us over multiple accounts for a long time. derailed the room quite a bit
The fact that he can't accept it shows his age mentality, and he has not changed at all.
I think most of us would be quite content if he didn't return
there was a reason his chat ban was 3000 years
it wasn't arbitrary
01:18
We're not talking second chance by the way, if I had to ballpark it, he's on about 8th chance?
way more than 8, but that gets the point across
1 trillion dollars would probably sway me though :P
He's been suspended for about a year. What if he was a model chat citizen?
If he becomes a model chat citizen he is more than welcome back in my books.
@AaronHall he made his bed, now he has to lay in it.
01:20
He has shown today that a years suspension has changed nothing
as of right now he stepped out of a ban, and immediately antagonised the room owners.
even given clear feedback on meta, he ignored it
Drama?
@Meredith not for at least 23 hours thankfully
How have you been?
Good
I haven't seen you in forever
Yeah, I've been quite busy with work
We demonstrated the ability of our software to control an entire islands electrical grid
01:28
Did it work?
We still have a lot of work to do but our demonstration earned us limited notice to proceed on a bigger island
This project is our PR project -- it's a publicly displayed process that shows that our software kicks the crap out of Tesla's
(which it does)
How big of an island are we talking about?
This one not that big -- about 5000 people. The next island is 18000
It's very exciting, and I actually have big faith in the software
Yeah that sounds really impressive
What have you been working on?
01:33
I just moved
Nifty, where to
Same town, just a better location
It's been a pain in the ass though
My kitchen is like half the size
oh yeah and there aren't any drawers in the kitchen
My kitchen is too big for me. I don't even need a stove I just pressure cook everything
I could make do with a hotplate if I want to pan sear something lol
Speaking of not needing stoves
Do you think I could bake a cake in a bbq
Like a grill?
Or a smoker
01:45
Grill
i wouldn't
my brother tried to grill bacon for some reason and set the grill on fire
not like on the metal, on tin foil
@Cereal I guess it would be possible, but grills have hot spots ovens shouldn't
like I get it, but at the same time why
You can probably do cinnamon rolls
they vent for smoke
01:48
Because it’s hot and I don’t want to use the oven
you can try, but I hope you have a backup plan :P
I think if you cover it and keep the heat low enough
It should be fine
if you do plan on it, maybe get a thermometer for in the oven and use it in the bbq
I wouldn't trust the one on the cover for something as precise as baking a cake
grills "retain" flavor
so expect a real heavy taste
I don't see that tasting good with sweet
I stand by the cinnamon rolls
Oh
cupcakes would work
01:58
Save me! x.x
I'm sorry, the princess is in another castle.
I'm the princess in this story
Nice
@Cereal Cakes need very even temperature distributions, ovens have convection fans for that. I don't know if you can achieve that with a grill as the heat is very directional.
I'm a relative novice when it comes to javascript but I know how to setup on click events easily enough BUUUUT the site I'm trying to work with doesn't allow onclick events in divs or anything just deletes them when I save my profile
02:00
Uhh
what site?
I got some code from another person who said it works for them on the site but it's not working for me x.x
Rphaven
so they give you some way to make a profile with html and you want to add in an event listener?
> Small update to not allow unsafe html in room names
They have an html section, a css section, and a place for javascript. They are all separated for you already and in style tags
02:03
so add the listener in js
> Server crash when someone attempted to add a new name which was empty
That is where I'm running into an issue. It's probably something really stupid but yea
Oh yea rph is rife with issues.
so what code are you using
Sounds like a job for external event listeners!
I'm trying to use javascript but when I type document.ready it doesn't recognize ready. and tries to say readyState.
When I try to add an event listener my VS does the same thing and doesn't intelligence it and if I just manually type the function it doesn't work
I've changed my code so many times let me try to find when I used event listeners
02:06
document.ready ??
yea, show me your code
Ah found when I was using event listeners
tabBasics.addEventListener("click", tabBasics());
tabBiography.addEventListener("click", tabBiography());
tabPictures.addEventListener("click", tabPictures());
tabOoc.addEventListener("click", tabOoc());
tabUpgrades.addEventListener("click", tabUpgrades());
tabMagic.addEventListener("click", tabMagic());
those won't work
I noticed lol
1 message moved to Trash can
@Aaron Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
addEventListener takes a function as a reference, what you're doing is passing the returned result of a called function into it
remove the parenthesis on the method calls
02:08
I mean, those could be valid
if those functions return functions
but I doubt it
tabMagic.addEventListener("click", tabMagic);
also, what is tabMagic?
One sec x.x a bot deleted my function
tabMagic is now a function reference
function tabBasics() {
        console.log('LOG');
        document.getElementById("basics").style.display = "inline";
        document.getElementById("biography").style.display = "none";
        document.getElementById("pictures").style.display = "none";
        document.getElementById("ooc").style.display = "none";
        document.getElementById("upgrades").style.display = "none";
        document.getElementById("magic").style.display = "none";""
    }
02:08
lemon is right, if they return functions it's valid
How do I even edit my profile
function foo() { return 123; }

foo; // IS THE FUNCTION
foo(); // IS 123
@Aaron best way I can show you the mistake
You have to login to chat and go into settings in the top right. @Meredith That was a recent change very few like.
@rlemon so instead of eventlistener("Click", tabBasics()) I just do tabBasics?)
No parents?
correct
now that that's sorted.
tabBasics.addEventListener("click", tabBasics());
you can't add a listener to a function
oh snap I didn't catch that
02:11
tabBasics is the ID of the 'tab' I made
It's the id of a div
mhm, but then you overwrite that with a function
function tabBasics() {
Ohh so I need to rename the div id?
or the function
Just to clarify, is "div id" the literal string id, or the actual div element?
or do document.getElementById("tabBasics").addEventListener(
02:13
@SterlingArcher I assume implicit id references
I just renamed them but these were my divs
 <td><div id="buttonBasic" >Basics</div></td>
                <td><div id="buttonBiography">Biography</div></td>
                <td><div id="buttonPictures">Pictures</div></td>
                <td><div id="buttonOoc">OOC</div></td>
                <td><div id="buttonUpgrades">Upgrades</div></td>
                <td><div id="buttonMagic">Magic</div></td>
ids were tab and not button if that answers your question
<div id="foo"></div> -- in js you can ref this with just foo, there is an implicit id reference.
it's pretty fragile. any name that conflicts with an id will over write it
great for quick demos
not great for long living code
One sec let me throw my code in aaaaa google doc
@Aaron okay, so then why does your code have tabBasics.addEventListener("click", tabBasics());
or even tabBasics.addEventListener("click", tabBasics);
do you see the conflict?
Yup that's why I changed the div ID to button instead of tab to remove the conflict
02:16
okay, then you also changed your JS to reflect that right?
@Aaron if you're going to post a link to code, google docs is not a good way. Try this service pastebin.com
there's others too, some will even format your code nicely for you, but iirc google docs does not and there's no syntax highlighting
Forgive me for I have (probably) sinned a lot
Does this thing even actually allow js?
I have butchered this code cause I'm trying to get it to work on this site x.x
I can't get it to run anything
02:18
All it's supposed to do is reveal and hide divs when you click on the tabs
Oh sorry @Meredith you have to have donated to access JS x.x sorry I forgot to mention that
Everything about this site is trash
@Aaron there's a much cleaner way you can do this -- give all the parent divs a class, then you can assign them the same function
Yea not many options for RP sites and it USED to be better tbh
He made huge changes recently and it broke a lot of stuff and fixed other stuff
mostly broke stuff though
@Aaron You have buttonBasics.addEventListener("click", tabBasics) but the id is ButtonBasic without the s
good catch
I was about to comment that it should work, however inelegantly
02:21
Ah thank you.
didn't see that
It should be working? It's not working for me though when I run it
what does the error console say?
@Aaron I don't see any obvious errors, that's what I mean.
It doesn't error out the tabs just don't change the tables
02:22
I have no idea what that site is doing to the code you feed it
inspect the page and see if your code is modified, wrapped, escaped, etc.
I'm running it in VS right now
It modifies the HTML but not the JS which is why I'm trying to do the event handlers
@SterlingArcher do you mean the parent divs as in the divs around the tables?
I'm also assuming we're missing elements? you're referencing basics and like 5 other elements, but I only see basics
@Aaron correct, the code you posted is very static, it won't play well to change
The others are exactly like basics with different stuff in the tables. I can add those
no, that's okay
02:25
good news
if you get your js to work, their session id cookie is not http only
Ok. I need to brb but should be back in a few minutes sorry to leave in the middle of this
back
Ok let me review what has changed so far pasting a new pastebin now with the changes suggested
@Aaron I made you a very basic example of what I mean
document.getElementById("magic").style.display = "none";"" Accidental quotes?
it's wrong in that events on visibility:hidden elements are not fired
so untoggling requires a visible element, but you get the idea
The code should work I think, but what Sterling is suggesting would be cleaner
02:37
should I be using class instead of ID cause right now this code isn't working as is
there's a downside to my suggestion: you'll have to rewrite basically everything
the upside, if you make it more dynamic like I showed, it will be less code, easier to debug and maintain
I don't think a re-write would be bad in this case since this has turned into a huge mess. It was so much easier when I thought I could just use buttons with on click events calling the functions but due to the calls being removed it didn't work lol
also, is your code able to be stored in git or some sort of version control? it sounds like there's a lot of people touching this code that don't know what they're doing, so you'll be fixing lots of typos etc if this continues
I'll try what you suggested Sterling
No one touches my profile code but me
Ah ok, I misread then
Good luck man!
I'm gonna head out, have a good night
02:40
Have a nice night
hello
Just checking to see what the excitement was all about
much ado about nothing
Just me fighting to get code working that should be simple but was made annoying cause of silly restrictions on a site
02:50
Yup, like most rooms :) I spend most time in the SO Close Vote Room
Trying to figure out how to get Sterling's code working with my tabs
hi guys, how can I get this data in js
a:3:{i:0;s:20:"industrial/warehouse";i:1;s:21:"showrooms/bulky goods";i:2;s:6:"retail";}
parse it
dunno what output you're expecting tho
this two bro
-industrial/warehouse
-showrooms/bulky goods
!!> 'a:3:{i:0;s:20:"industrial/warehouse";i:1;s:21:"showrooms/bulky goods";i:2;s:6:"retail";}'.match(/(["'])(\\?.)*?\1/g)
03:03
@rlemon ["\"industrial/warehouse\"","\"showrooms/bulky goods\"","\"retail\""]
then just trim the last value I guess
anyways, I'm out. good luck
Thanks bro. cheers
 
3 hours later…
06:30
@towc man ...
07:02
There we go
Looking for implementing something like an abstract class by following this blog post
https://ilikekillnerds.com/2015/06/abstract-classes-in-javascript/
but I don't want to write all those checks in the constructor, I'd like to use a helper function like `implementsAll(['schema', 'otherMehtod'])`, but I'm not sure if that may incur in a memory leak, does it?
@Frondor You can write such a function, but you're better off with using TypeScript since it has abstract classes enforced at compile time]
@Frondor why would you think that it imposes a memory leak?
if you are worried about having the variables being set, I suggest you to use TypeScript
So you wouldn't need to implement it at runtime
@MadaraUchiha Doesn't typescript does that as the result of the compilation?
@Frondor No
TypeScript will emit a normal class (or constructor, depends on the target) for abstract classes
But it would emit an error if you try to instantiate it, or call an abstract method.
So your code wouldn't compile
(There are ways to ignore emitted errors, but don't do that)
07:28
@KarelG TBH, I don't know... I just thought that if you use a function from a different context in a constructor, and an instance of such needs to be garbage collected, it won't because it uses the function? Yeah, doesn't makes any sense to create a ML out of that
@MadaraUchiha Now I get the point, and looks like a solution, but I can't implement Typescript on all projects... So I'm just playing around with ES6 classes
@Frondor Why not? Do you use Babel?
@MadaraUchiha Nope, it's Node v10 so I don't need Babel (so far)
ah it is for Node.js ?
using such function is ok.
Yup... And as far as I know, typescript compiled code adds a very tiny overhead, which I can perfectly live with in most projects, but on this particular problem, performance is really a concern. These objects are being instantiated massively after returning crap from a datasource, and needs to be benchmarked later against some popular ORMs
@KarelG I was worried about a possible memory leak on that approach, but doesn't look like one :D
that overhead only occurs at compile time. Not during runtime. Big difference :)
I have heard that the newest monster hunter game is using 25% of its CPU usage to manage the worker threads. That is an overhead.
07:35
@Frondor TypeScript is actually likely to be more efficient for this particular case
Since the abstractness checks are performed at compile time, and have no effect on runtime speed.
As for the overhead, it's nothing you wouldn't have done yourself (and likely not as well), and I do believe that there's no runtime overhead at all if you target ES2017 (or whatever the latest version supported by node is)
Euuurgh
I'm sick
bones hurt
head hurts
joints hurt
Existence is pain
@KarelG So that means I can make the tsc to spit "untranspilled" code? And by that I mean, the exact same code but without the typescript declarations?
@MadaraUchiha that ^
I have to confess, I'm scared of Typescript but I need to start playing with it sooner or later
since you are working in Node.js, you only have to transpile it
(well that depends of your version but you should have the latest LTS anyways)
Node.js will be able to work with the resulting .js file
Another advantage of TS is that you can implement it into your project gradually
you can even use javascript syntax within TS by using allowJs flag or something
No need to be scared of TS
it makes your life nicer
07:51
I'm almost sold. I'm actually working on an ionic project which uses typescript but I don't fully like it. I'm constantly worrying about how the code would be transpiled and, for instance, the difference of "computations" (performance) that a transpilled function may have of the "raw implementation".
And what about Flow? I'll google that
it is a static typechecker via annotations in javascript
it is nice but I doubt that it would fit in your use case. I only have experimented with it for a while
https://stackoverflow.com/questions/51944132/validation-for-more-tha‌​n-two-condtions-in-if#51944132
08:09
you know, I always read cv-pls as "sarcastically asking for his cv" rather than "close vote pls"
Guys, using javascript, is it no longer possible to alternate row colors like this:
table[i].style.backgroundColor = 'gray'; ?
I get Cannot set property 'backgroundColor' of undefined when I used it, even though table[i] is not empty
that means table[i] isn't returning what you think it is
@Frondor You either transpile it, then run it
Or use something like ts-node to do both in one step
08:18
it's returning a row
You sure? console.log(table[i] instanceof HTMLTableRowElement)
Oh, @KarelG: Not sure if you "got" it, but #68 is about you.
@JesseJames That was always a terrible idea, and it still is.
Use CSS with :nth-child(odd) and :nth-child(even)
@Cerbrus are RO threads not for RO only?
@KarelG That one's public
08:20
That one is in the culture repo, that's public.
@KarelG They are, but nominations are opened in the public repo.
I figured you'd want to input on it.
oh. I noticed it. Yes. :)
I am fine with it.
08:21
\o/\o/
@BenFortune: you're totally right, I got false. Really strange because that looks like a row to me.
@JesseJames Also go with what madara said
I would but the choice is not mine. I have to choose a pure js solution. But I totally agree with you both
Is it some sort of school project?
08:29
Kinda, yes.
hmm since when are links in SO comments underlined?
I am now questioning myself because I thought that those links are without underlines
Yea, that's a recent change
Never noticed using lemon's extension
@KamilSolecki o/
08:34
ohai
neat, I want to do replace in intellij with regex, but the end result is that a group has to be in upper case
aaand it does support it
eg second group in full upper case: \U$2
ubuntu is confused
I'm currently running 16.04 at work, and have waited for the LTS 18.04.1 to come out so that I can upgrade directly
But now I'm not sure if I should 😆 It's likely to kill the rest of the productivity of whatever day I pick doing that on.
it is still better than at windows
09:07
Yup
if you do not use it for a while, it starts to update and reboot itself
@KarelG Yeah, it's especially obnoxious with dual boot
even during my work process 😤
It wakes itself up from sleep (laptop), updates then restarts, so I open the laptop, and it's on Ubuntu login screen
I seriously do not like that
09:08
So I reboot and return to Windows. Then it boots, I login, it reopens chrome and other things I had open in an attempt to seem innocent..... then it goes back to sleep while the laptop is open
I recall I had to use my laptop at a client. It was low power while I was certain it should be at an acceptable level
a big update caused that huge drain
and my day was not over yet. ლ(ಠ_ಠლ)
09:49
does someone know what npm is and can explain me what the reason is to have it
Nuget package manager...
If you want to install nuget packages on your node.js server... You need it.
ok thx
what language does currying really well?
especcially ad-hoc currying
10:07
const myRsa2048PrivateKey = 'CAASqAkwggSkAgEAAoIBAQCRQHzwWADGZcNS+aiUV7dW81489bEFsuFYUWGtOxW4UdpCuo1/yJ5GNEFY7FJDaQ194J28JAU8RDrxQqQawKyZ7CqINjqQni9VedgqkVWC9tDKrvaT7YxzeBjj/L0K3sMuAXMzhwRtOaD/DUfmJnZRgffJFFlT69D+nXx3Z2cywSiz5lK4M9Ua35jV/lxfS2RD+8Jf15cN4rGK8CtyKj0oLAyBDWKTf1zEzkDqS/fc1GhuFVyGymz/XvJ4COePuzJN2VX5hUewn5FZDnGz+6CG3xVXiEg4xZu7iF6Hmv7mBnqOecJuaPB2/O/ocUXrR+XuTTdf+KVvoxBDae2WXHd1AgMBAAECggEAYN1ptHproeNRW+9kbfEFMjZAPVT3xb4iK1yyT+0cMfxcGq4AGRx3+Id2oM+QmKXhOnXlmwdGeodh62yutaySLl/hiU7oxXLITC9iahjbtufUG6aMh+AeDw8jQj9U7n/aF78dzVoYKKMK66w2q5QwyXBsByvL2nxjtrjdvV824hAPGbSytfq8fcj6QZ7Osnzu
how come this gives an error?
what am I doing wrong?
Cerbrus was kind to inform me about that.
Ah, cool, just wanted to be sure you're even interested
I am. I am fine with it.
10:47
Wat
10:58
!!> new Date('1752-09-04T00:00:00Z')
@MadaraUchiha "1752-09-04T00:00:00.000Z"
This is a bug
1752 September didn't have a 4th

« first day (2866 days earlier)      last day (2307 days later) »