« first day (3744 days earlier)      last day (1187 days later) » 

1:27 AM
posted on January 15, 2021 by Danielle Adams

Notable Changes child_process: add 'overlapped' stdio flag (Thiago Padilha) #29412 support AbortSignal in fork (Benjamin Gruenbaum) #36603 crypto: implement basic secure heap support (James M Snell) #36779 fixup bug in keygen error handling (James M Snell) #36779 introduce X509Certificate API (James M Snell) #36804 implement randomuuid (James M Snell) #36729 doc: update release key

 
 
6 hours later…
7:43 AM
:)
not sure if the funfact is from the caprica source tho
 
 
1 hour later…
8:44 AM
posted on January 15, 2021 by Krishna Govind

Hi everyone! We've just released Chrome Beta 88 (88.0.4324.89) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 
8:58 AM
in graphql... is it possible to query a table and to get back a row from a foreign table by id in the original table?
sooo given..
 
@captainrad 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.
1 message moved to Trash can
 
query GetItem {
    items {
      id
      name
      owner_id
    }
}
is it possible to have this query return the "owner name" associated with that owner_id?
I'm using react apollo... but I suppose JavaScript could be the wrong place to ask this.
 
9:16 AM
answer appears to be..
    query GetItem {
    items {
      id
      name
      owner {
        id
        name
     }
    }
}
 
 
2 hours later…
10:56 AM
@JBis it changes to 0.1 but sounds the same
 
 
1 hour later…
11:57 AM
oh wwait, the sound doesnt change when logging
 
12:19 PM
I'm so sad that I cannot have my own key function for sets and the likes.. Instead of saying a set should value compare for in tests I have to mangle the data first
This is for example useful when I wish to have a set which doesn't contain primitives but rather things like arrays. or objects.
 
js' Set is limited yeah
 
currentlyEvaluatingActions = new Set();
async function addAction(actor, actionKey) {
    if (!currentlyEvaluatingActions.has([actor, actionKey]) {
        currentlyEvaluatingActions.add([actor, actionKey]);
        //slow async action
    }
}
And yes I realize that's not the most elegant way to do things in parallel, but since js is single threaded we get away with it.
 
12:53 PM
yeah, that would not work. IIRC I demanded to be able to write a custom equals function, a a part of the Set constructor years ago
 
Is there a way to calcuate Cotanget, Cosecant and others in javascript?
Javascript's math object unfortunately doesnt have a method for them
 
1:08 PM
if you understand these, then you do not need these functions :P
 
The cotangent is just the cosine / sine (as compared to tangent being sine / cosine). secant is 1/cosine and cosecant is 1/sine (had to look up the latter two, you're from the US, that's about the only place they use those :P). Easy to implement yourself
 
csc is just 1 / sin(x)
there are certainly libs for that around on the interweb
 
I love how that library has math.to(x, unit) Change the unit of a value. -- but there's literary nothing else that regards "unit". (On top of that the science purist in my really twitches when hearing "the unit of a value".)
 
@KarelG Yeah I dont understand them, but I do need the functions
 
I doubt it. - if you don't understand
 
1:12 PM
Like, a sine function? I dont get how you get a Hypotenuse, Adjacent and Opposite... from a single angle
it doesnt make sense to me
 
those are rarely used outside working with polar coordinate systems
many goes with cartesian ones
 
@paul23 Its for graphing, well, really its just more for a little project Im making
that uses graphs
what Im using it for shouldnt matter anyhow
Im just curious if you guys know how to calculate them
 
@KarelG cough electrical engineer... control theory... millions more cough
 
@MisterSirCode it's kinda 2000 years old theorem :P
 
user14881722
Hello anybody can answer my questions
 
1:14 PM
@AkashKamath 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.
 
Well Ive tried finding the raw formula for them
 
@paul23 control theory?
 
user14881722
PLZZ any one answer
 
yes, to calculate root locus/dampening effect etc.
 
user14881722
I am waiting from 2 hr
 
1:15 PM
but I just see "Ok so cosine is basically cos(angle) = adjacent / hypotenuse"
 
user14881722
I have written the question 2hr before.
 
Given we mostly use imaginary numbers so the sine waves translate into neat exponential functions that are much easier to use algebraically.
 
are these part of those locus/dampening formula's?
 
@MisterSirCode yes, which grade are you in?
 
user14881722
PLZZ @paul23 answer me
 
1:16 PM
Lol 2 hours, be patient... there are hundreds, probably thousands of questions per day, and people arent entitled to answering you

Ive waited months for answers before (Though thats not too common, usually I get an answer within 24 hours)
not that I can ask anymore anyways
Ive been gaining rep from upvotes on old answers, and I havent asked a question in a while
yet somehow
 
@AkashKamath you did not even ask a question here. If you're referring to a question you have posted on SO, please put its link here once. If someone has time for that, he may answer on it.
 
I got banned from asking questions again
 
user14881722
PLZZ it could be easy to you @MisterSirCode
 
user14881722
Ok Waite @KarelG
 
A common courtesy is to wait at least 24 hours before posting a link though. So everyone "has a chance" to look at it.
 
1:17 PM
@AkashKamath Stop begging people to answer... youre going to wound up getting yourself muted
and stop pinging everyone aswell
:L
 
user14881722
0
Q: How to create a custom pagination?

Akash Kamatham a new web developer and am working on a quote website. The main purpose of website is to provide quotes for visitors. The website is so dynamic that the quotes get copied by a single button. So now let's talk about my query. So now think that the below ten sentences are ten quotes for my websi...

 
oh jeez...
Paul I dont think hes listening to anything were saying
 
@MisterSirCode well, that's correct. But it depends if you got educated in trigonometry. The teacher should explain why and how they got to that conclusion. It's actually built from two theorems
 
user14881722
PLZZ you cannot understand my trouble
 
@KarelG Im currently a sophomore in highschool and I just started Math 2
so no, Ive yet to learn trig
 
1:20 PM
yeah I doubt someone is gonna spend time on your question. It's best in your own interest to understand the code your friend has shared and learn by coding yourself.
 
It's why I ask for the grade :P, it's really something that needs to be explained slow and steady so you get a natural affinity for it.
 
Well, MisterSirCode, you can decide to learn it yourself or wait until you get those classes
 
Well, I think I get how these functions work in javascript, and how I can calculate them with javascript (Just found a really nice PDF with good info)

But Ive yet to understand how it actually works
 
Giving the formal definitions is all fine and dandy but trigonometry is really something you need to "use" before you get versed with it.
 
user14881722
Anybody
 
1:23 PM
Last time Ill tell you, begging for answers will not help

Dont @ me or anyone else for answers.. if its only been 2 hours, just wait, if you dont get an answer in 24 hours, THEN you can ask, but please, dont beg people, its really quite rude
Just expecting them to answer something for you, its exceedingly rude
 
|| welcome AkashKamath
 
@AkashKamath 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.
 
Fun fact: for graphics I would hardly never use sines anymore. It's magnitudes easier to just do vector calculus.
 
please read that again. Last warning
 
Well yes, a lot of rendering logic runs on straight Vector math nowadays...

And with all the advanced software raytracers out there now
its basically the standard
Im considering writing a software raytracer myself.... it might be a fun side project
 
1:25 PM
But understanding that is again build on trigonometry - so it's no use talking about that before you understand trigonometry
 
Ill cross that bridge when I get there I guess
 
It's why math doesn't take 3 months to learn - a calculus book can easily explain it and you can read through it within a week. But to actually use math takes years.
 
@paul23 quite ironic that the formulae from that area is very easy to use, but is being based on difficult mathematical formulas, which people start to receive when they're in high grade maths
 
Heh not even talking about quaternions - which are used everywhere :P
 
aye
 
Ill be honest, Im just making a fun little grapher... https://repl.it/@skylerspark/Wave-Signal-Testing#script.js

So I wanted to see what kind of graphs that would appear using Cosecant, Secant and Cotangent
But yes, I should learn it since I want to use it for bigger projects
 
user14881722
PLZZ my clients is disturbing me.
 
So youre a fresh beginner webdev
and youre already asking for hire?
Ive been scuttering through javascript for about 3-4 years now
and I dont even want a job yet
and also Im too young for one anyhow
 
user14881722
Age?
 
So, Paul ... you dared me to link something to give me some insight in the person ... a la capella?
 
1:33 PM
:P well I need to get back to writing unit tests this friday (meh)
 
1:44 PM
Cya then
 
1:56 PM
@MisterSirCode SOHCAHTOA!! That's all I remember.
 
heh, we have that reminder trick as well, in our own language
SOS CASTOA
 
@AkashKamath your question is basically "plz code dis 4 me"
@KarelG ha, didn't know they translated it, cool
@MisterSirCode if you are interested in the math, coincidentally calculators use the "Taylor" series math.stackexchange.com/a/395631/606805
and here's a raw c implementation
 
2:22 PM
taylor ^^
I had a mind boggle when i saw that for the first time. Kinda clever tbh.
 
Using the taylor series to approximate a value at a certain point isn't really understanding it though. BTW most libraries (even fundamental level) I know use in practice a lookup table, and interpolate (via polynomial approx, often linear or just quadratic) values inbetween.
 
thing with trigon functions is that they're hard to resolve if they're a part of a difficult equation, one you cannot "get it out"
 
@paul23 well thats no fun
 
so what usually happens is that they throw in taylor and is able to solve the equation by approximation (that often gets undone by itself)
 
Calculating the higher order polynomials is way too complex for a chip to do. Easier to just bake the values into the hardware and interpolate.
 
2:26 PM
i would think it would take a look to store all those values
 
which values would you bake in then? there are too much variation on that
 
Easiest I found is to just "measure" it: if you take a circle with unit length, the angle (in radians) is just the length of the arc.
 
@JBis fwiw, in the early days (lets say 1960), students had a small books with tables full of trigon functions and values
 
and then you can draw a triangle to that point and see how the angle/arc length + horizontal (Opposite), and vertical (hypoteneuse) interact.
 
@paul23 looks like that c implemenation does exactly what you said
@KarelG boomer math
 
2:28 PM
:P
 
@KarelG even nowadays at university you "relearn" those things as introduction to numerical analysis.
 
my dad has one from his father. It was fun to check that book.
 
it looks like the x86 has built in sin/cos instructions
 
yes.
 
tbh i rather prefer they start to embed crypto in hardware components completely
would make a lot things more secure
 
2:30 PM
the x86 implementation is closed source by chip maker right?
@KarelG apple is
Not sure it makes things more secure, just faster to secure things
for example most computers have a dedicated aes chip to speed up aes
 
@KarelG meh I doubt it: security is nowadays completely trivial anyways since china has changed the way governments work around it. ANd nowadays every government is imposing control over hardware.
 
@JBis problem is, that if they use a chip without crypto component, they use a software based solution which has a higher vulnerability probability because of implementation errors
assume that all chips has such component by default, then they can use these, reducing the risks
 
is there a typescript chat, or may i ask my question here?
 
whelp, back to work.
 
meh, it also makes it more complicated to update. And everyone basically uses the same library. No one tries to implement it themselves.
why work when you can not! ;)
 
2:36 PM
:P
 
@henriquehbr You can ask here. You can also try the typescript gitter, they are very helpful. gitter.im/Microsoft/TypeScript
 
@JBis the lib is not the problem an sich, but using these
 
thank you @JBis!
 
YES!
don't you love things when they just work at first implementation without any bugs, mistakes or weird corner cases!
 
i already asked on both typescript discord and issues, but still nothing
 
2:37 PM
@KarelG well you'd still have to use a hardware implementation
 
if anyone is interested in helping, i'll give a huge virtual hug in return
 
@paul23 funny joke
@henriquehbr np
 
It works! I am god!
 
@paul23 Paul, ya know, with that I imagine you're doing that in the same manner as this dude, but do not worry, you're probably working at home because of COVID-19 ...
 
I do admit I did a few jumps in the air and a little dance :P
 
2:48 PM
🧔 🍎
 
1 message moved to Trash can
 
3:24 PM
I think I found every periodical wave formula
I think
I wonder if there are any other interesting ones
 
3:36 PM
1 message moved to Trash can
 
user14881722
Why
 
From what i've seen, you've been reposting that question here all morning, and were asked to stop, but here we are
 
Gosh the trash is just filled with copies of his link
 
uh this is awkward: I can't figure out if react is using value comparision for useEffect's dependency array.
 
Why is that awkward?
you have a problem, and you're asking for help
sometimes Ill ask the stupidest most basic things because I just straight up forgot
 
3:42 PM
Because it seems so basic - yet I can't find it on the documentation page ( reactjs.org/docs/hooks-effect.html )
 
yes it doesn't say if it uses value compare or identity compare
 
it uses Object.is
|| mdn object is
 
An error occurred with the request.
 
3:46 PM
!!echo stahp
 
HAMMAHTIME!
stahp
HAMMAHTIME!
 
damn google changed their code
google works, why they gotta change it
 
Hmm so idenity compare it is, which means that if you construct a new array it is refired
 
||> Object.is([2],[2])
 
@JBis false Logged: `` Took: 0ms
 
3:50 PM
yep
 
@JBis Whats different about it now?
 
const {baseArray} = props;
const filtered = baseArray.filter(v => true); //whatever check
React.useEffect(() => {}, [filtered]);
//even if baseArray stays the same filtered's idenity has changed so useEffect always runs on each render
Any canonical suggestion for above "structure"?
 
Object.is
:P
had a little problem with that dude once
 
filter in useEffect and set it as component state, let useEffect be triggered on props change only
 
it was Object.is(NaN, myVar) and myVar was by coincidence a value that got divided by zero.
got a different NaN whereas it does not occur with parseInt
||> [Object.is(NaN, 5/0), Object.is(NaN, parseInt('fake'))]
 
3:57 PM
@KarelG "SyntaxError: missing ) after argument list" Logged: `` Took: 34ms
 
@makadev but that would mean the filter (which is used in drawing) isn't there for the first render.
 
@KarelG [false,true] Logged: `` Took: 1ms
 
that struck me a bit, so I had to adjust the code to look at the divisor, if it was not 0
/shrug
 
@paul23 you can set that in state initialilizer
like const [filtered, setFiltered] = useState(<do first filter>)
 
But but code duplication :P .. I guess I can movei t to function and prevent duplication that way
 
3:58 PM
and respective setFiltered in useEffect
^^
 
is there a way to call an api controller from the main project without any references?
 
@LuDevGon No... If you don't provide a reference, your api controller doesn't exist. Simple as that. Why exactly would you want to use it without a reference
A script sitting in a directory is absolutely useless unless it's referenced
 
Still awkward, since the original array is several times more large than the filtered (100ish vs 1-2 elements) and thus might run more often. But I guess deep compare would be equally slow
 
deep compare should be simple on arrays of different length, most compare algos will check length before content
 
@mis
 
4:08 PM
|| sudo restart
 
My life has come to end. I hope to be revived soon.
 
|| mdn object is
 
and we're back!
 
@MisterSirCode i made a service project but i dont want to reference that project with the main project, so i made a intermediate project to get a list of values from the main project that the service can get access too.
 
4:09 PM
@MisterSirCode some class name changed
 
||> Object.is(0, -0);
 
@paul23 false Logged: `` Took: 0ms
 
I just love that one, implementation is leaking
What would happen if we run on a ones complement system?
 
@LuDevGon confused what you mean
without reference to what? a file? a domain?
how do you get negative zero?
 
?
 
4:11 PM
||> -4 + 4
 
@JBis 0 Logged: `` Took: 0ms
 
you take a 0 and give it a sign
 
how would you get it through math operations?
 
-0
 
||> -1 * 0
 
4:12 PM
@JBis 0 Logged: `` Took: 0ms
 
||> Object.is(0, 4*-0)
 
@paul23 false Logged: `` Took: 0ms
 
||> -0 * 0
 
@JBis "SyntaxError: Invalid or unexpected token" Logged: `` Took: 35ms
@JBis 0 Logged: `` Took: 0ms
 
Careful with displaying, the toString() and JSON.stringify() will remove the leading minus
 
4:13 PM
!!> 1/-Infinity
 
@KevinB 0 Logged: `` Took: 1ms
 
james is logging it wrong
 
@JBis so i had to make a services that watches a list of values and logs data when that list changes. They dont want me to make a reference to the main project, so i have to add an intermate project that makes API request to the main project without referencing the main project. so the only reference i would have is the service project to the intermate project
 
||> (-0).toString()
 
@paul23 "0" Logged: `` Took: 0ms
 
4:14 PM
That's probably what happens ;P
 
iirc it runs it through JSON.stringify which is probably why
 
yeah json specification doesn't make a difference between negative and positive zero
Actually this shows that integers in javascript cannot be integers but need to be floats. I was mistaken previously, it's not two's complement that can have negative zero but rather one's complement system that can have negative zero.. When using integers. (With floating point it can always happen since there's a separate bit for the sign).
 
too much math talk for the day, screw comp sci
 
4:40 PM
😯
 
interestingly, Math.sign() returns -0 if -0 was the input
 
 
5:12 PM
@Wietlol What does math.sign do?
 
it returns the signum of a number
so for negatives: -1, for positives: 1, for neutrals... 0
or -0 in some cases
such as in JS' Math.sign() implementation
 
oh
interesting
so its useful for detecting negatives
 
"useful"
 
5:34 PM
not sure why we need a method for that, but k
 
!!> -0 < 0
 
@KevinB false Logged: `` Took: 0ms
 
is the only use of it
but i mean
 
5:53 PM
why would it return -0
Literally no point of that
itd be very simple to add a check to only return 0
 
Because hardware
 
6:10 PM
.-.
alright...
 
6:31 PM
o/
 
I have yet to understand that symbol
is that supposed to be an emote? :P ;3 :I
 
6:51 PM
person waving @MisterSirCode
 o/
 |
/\
 
ah
I see
 
👋
 
its an internet hello. interesting
 
7:49 PM
Haha
 
8:25 PM
I just thought of something useful I want to make but am unsure of how to go about it. I want to make sort of a gap analysis where it measures certain aspects of an object, if it meets those standards, and then measures out on a graph to show how much % completion it is
something along the lines of this
I know how to do use AJAX to GET the info to pull it to the chart. I just dont know how to go about making the ACTUAL chart in JS/HTML
 
 
1 hour later…
9:29 PM
@bigchungus don't
use a graphing lib
but if you really want to, you can use canvas and draw it
 
graphing library is easier you would say?
Are you familiar with plotly
 
nope
 
What graphing libraries have you used that you would recommend
Or have you not used one you are just saying I would be better off using one
 
@bigchungus that
 
why reinvent a complicated mess of a wheel that needs modifications per browser
 
 
1 hour later…
11:05 PM
!!coffee
 

« first day (3744 days earlier)      last day (1187 days later) »