« first day (3586 days earlier)      last day (1345 days later) » 

3:58 AM
kinda looks like i have 20 stars lol
 
 
1 hour later…
5:11 AM
@JBis markdown?!
Hello. I just wanna know if anyone here uses IRCCloud service?
Is it like an irc client on the cloud?
 
5:29 AM
@deostroll That's what I'd guess based on the name but I don't use it, so I cannot confirm or deny it.
Looking at the site, it seems it's trying to be Slack.
> Connect to any IRC server out there, and even Slack workspaces.
Well, there you go it even says that on the page.
 
But is it still irc client on the cloud? I am looking at being able to track missed pings, history, etc...
 
5:59 AM
Well, that one promises it has it. You can also look at Slack - it has those. IIRC it can even email you for a missed ping. You determine how long the timeout is, so you might want to gen an email if you haven't seen a ping for 30 minutes or for 1 day.
 
 
2 hours later…
7:52 AM
@JBis fixed that for you :p
 
 
5 hours later…
12:23 PM
Hi guys,
How am i supposed to use onKeyDown instead of onChangewithout triggering this error Warning: Failed prop type: You provided a value` prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultValue. Otherwise, set either onChange or readOnly.`
Can anyone help me, thanks in advance :)
 
What framework are you using? That error doesn't sound like vanilla JS. Is this react? @ax
@aXuser264
Sounds like react to me
Are you meaning to have a read-only text input, or would you like it to be mutable? Is there data tied to that field?
The usual pattern is this:
<input
  type="text"
  value={myStateVarible}
  onChange={e => {
    setMyStateVariable(e.target.value);
  }}
></input>
With this being your state variable:
const [myStateVariable, setMyStateVariable] = useState('');
If you want the input to have onKeyDown and no onChange, do one of the following:
1) Set the input to `readOnly`, which probably isn't what you want based on your question, or
2) Set onChange to `() => {}`, as suggested in the error
suggested by the error*, it's not explicit but you can just set onChange to a no-op if you want it to do nothing
I think it would be helpful to know what you're trying to do here, @aXuser264. It seems odd to use onKeyDown on a mutable field without onChange. Are you using onKeyDown to capture the value of the input, or something else?
--
I feel like it's trying to tell me something
 
12:58 PM
@JoshuaWade sorry, i was out
i am using react
still reading ur post
 
No worries, take your time :)
 
Actually it was a half idea of making a multiple tag selector (Like https://harvesthq.github.io/chosen/#selected-and-disabled-support)
And am now thinking to use `onChange`. I really dont fel good using `() => {}`
And of course thanks a loot for ur response
 
If your goal is to know what's in the input, then you should use onChange. It will react to things that onKeyPress can't react to.
What if the user selects the text in the input and drags it out? That will change the input, but the user hasn't pressed a key.
Happy to help!
 
you got that one,
 
As a sidenote, there's nothing wrong with using onChange in most cases and onKeyPress for special cases. If you want to have backspace delete the rightmost tag when the input is empty, then you will need onKeyPress too
onKeyPress would just be "if the key is backspace and the input is empty, remove a tag"
 
1:13 PM
After completing the planing, I just need backspace, and delete key, from keyDown.
So, i can out rest of the things in OnChange
As you pointed out more important things that i missed
 
That sounds right to me, yeah
So I'm reading through the starred posts, and I see this
followed immediately by this
 
what an luck by chance πŸ˜‚πŸ˜‚
 
1:59 PM
i mean
the second comment is at a troll
 
hi
 
 
2 hours later…
3:57 PM
o/
 
4:08 PM
String.prototype.remove = function remove(match) { return String.prototype.replace.call(this, match, "") }
Please πŸ™ let that ☝️ be a thing 🀞
 
why not just make the second arg optional in string.replace?
||> "bla".replace("a")
 
@JBis "blundefined" Logged: `` Took: 0ms
 
Where can I read about default libraries in JS?
For example, I can use Math.round(), without using require
 
|| mdn JavaScript
 
4:15 PM
^
 
Thanks.
How to undefine(or reset) the definition something, for example:
If somewhere in the code Math = undefined, can I reset the default of value of Math?
Without using require
 
@iaeliyen You can't. It shouldn't be overridden in the first place.
 
4:32 PM
To add, require isn't for standard library stuff. It's for pulling in external code, i.e. anything not provided by the Javascript standard
In NodeJS you have to require fs because it's a Node extension and not part of the Javascript standard.
> Without using require
In other words, you can't use require to re-import Math, even if you wanted to
 
well you could import a polyfill
but you can't import the default library
 
☝
 
5:26 PM
Hi,

My question is unfortunately closed but do you have an idea, please?

https://stackoverflow.com/questions/63339847/how-to-comment-a-method-returning-a-copy-of-this-using-jsdoc
 
@Lcf.vs 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.
 
I'm not familiar enough with jsdoc to understand what you're wanting or how to fix it, but that's a textbook useful "how do i x" question.
This seems relevant to your question: jsdoc.app/tags-this.html
if your this is defined as Greeter such as in that example, wouldn't it be enough to also specify the @return as Greeter?
this isn't really descriptive, where as Greeter is
 
@KevinB it's an idea but it doesn't indicate the "merge" with the provided properties
 
right
it's defnitely a different scenario, but i can't help but think maybe this isn't the right option there
 
yep, but thanks anyway :)
 
5:37 PM
 
Yes, already found that topic but, here, I can't know the current object properties, nor the provided
 
in that case.. is it useful to provide that information then? if's essentially unknown?
{*} for example
with your notes to explain what it is
 
Yes, essentially unknown but composed
 
Anyway i'll stop poking and get back to work
 
the {*} can't work because it doesn't provide the autocomplete
@KevinB Again, thanks anyway :)
 
5:57 PM
I found a question the other day about the performance of various canvas circle tricks. The accepted answer claims that it's fastest to draw a circle once to a canvas and then copy it for future circles, assuming you're drawing a lot of same-size circles.
I thought that was strange so I tested it myself. Turns out they're right, but only for Firefox
Chrome is really good at round line caps, so you can use that to squeeze out the same performance
This graph is really strange to me
I would expect image copying to not be that much faster in Firefox, but I would also expect line caps to not be that much slower in Firefox
Any ideas as to what's going on here?
My jsperf tests are here
And the question for context:
5
Q: Canvas arc() vs drawImage()

LoveAndCodingThis may seem innocuous, but when doing it 1000+ times at 30 frames per second, it does add up. I have 3 sizes of circles that I draw, each with their own fill color (RGBA). Is it faster for me to draw them as images once, and use drawImage() with the data URLs, or to do arc() for each of them? ...

I wonder if it's some quirk of the contrived testing setup
 
6:15 PM
is there a vw unit forthe containing element dimensions vs the whole screen?
 
nope but you can calc()
 
@SuperUberDuper %
 
thing is I want to position absolute, not use %
 
that doesn't make sense
position and size is different
do you want to position relative to a parent or size relative to a parent?
 
position
i moved from svg to html
cause i can style the html easier
 
6:23 PM
Ok, than use position: relative on parent and position: absolute on child.
 
was using viewbox before and position was easy
thats what i doing already
 
so whats the issue
 
im doing this

umg.style.left = `${centerX + imageWidth}vw`
but the vw is the whole screen
i need it to fit inside the current div
 
don't use vw
use px
actually can you make an MCVE
|| mcve
 
If you would like assistance, please create a Minimal, Complete, and Verifiable Example
 
6:27 PM
px wont scale across devices
thats why vw worked so well
I guess I can force the container to go edge to edge
with no padding
@Lcf.vs how would I get the same result with calc?
 
i'm so confused
 
@SuperUberDuper jsfiddle.net/jq0vycfw
also, you can detect the center using the element clientRect
 
thx, thats my get out of jail free)
 
y
yw
 
man i really miss svg viewport
this sucks
if only svgs has nice hover css that would scale from image center vs orgin of svg
 
6:40 PM
it really a bad reason to use a language or another "i moved from svg to html, cause i can style the html easier"
their roles are very different
HTML is for semantic data
SVG is for graphics
CSS is for styling
 
yeh i hear ya
this is legit hard problem lol
cause the svg has a need of a lot of interactivity
 
moreover, since HTML5, you can have embeded SVG directly in your HTML, using (or not) the same JS scripts and stylesheets
 
yeah im gonna have to use svg
html is a nightmare for what im trying to draw
thanks for leading me to the light
 
if it's complex, use SVG
if it's complex and changes a lot, use canvas
 
yeah, thing is, dang images cant have borders or curves
 
6:50 PM
if you hate yourself, use webgl
 
they just look square
 
@JoshuaWade SVG can change a lot too, using the DOM :P
 
Yeah, for sure, but has a limit when you're trying to push performance
in really complex cases
just depends on the use case
@SuperUberDuper Why not wrap the image in another element? or something
 
i have to use svg
 
I might need a more specific example to suggest a solution because it can depend
svg can have embedded images and even embedded HTML
 
6:52 PM
everything has an algo using maths to get the exact coords
and viewbox helps to scale for any situation
 
embedded HTML, has access to full styling?
ooooo
 
Sure does!
 
dont often get challenged like this
exciting prj
 
Careful if you need the project to be super stable though, as that's getting into complicated edge-case territory and I've personally seen stability issues
That's in cases like, the code is being run for days and days without restarting though
If it's just a website then I wouldn't sweat it, and foreignObject has been out for some time so it's probably more stable than I remember
... and I should stress that my case was a significant edge case
 
6:56 PM
nice thx
 
@SuperUberDuper 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.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
@SuperUberDuper 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.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
friggen so formatting
use ``` lol
 
it's odd, I know - post the code in a separate message
 
so dumb
 
``` doesn't work, that was my first goto
 
6:57 PM
1 message moved to Trash can
 
:global(image):hover {
transform: scale(1.3);
}
:global(image) {
transition: all 0.1s;
transform-origin: 50% 50%;
}
so this is my issue, if i style this image:
they transform from a specific point
with html its fine
but the above all trans from the orgin
of the viewbox
 
7:11 PM
posted on August 10, 2020 by Prudhvikumar Bommana

The stable channel has been updated to 84.0.4147.125 for Windows, Mac, and Linux, which will roll out over the coming days/weeks. A list of all changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issue

 
I know someone else just did but I might pull the mcve card
also this looks helpful
https://css-tricks.com/transforms-on-svg-elements/
 
now to figure out how to use foreign object dynamically
 
8:09 PM
🚽
 
8:29 PM
posted on August 10, 2020 by Daniel Gagnon

The Beta channel has been updated to 85.0.4183.59 (Platform version: 13310.41.0) for most Chrome OS devices. This build contains a number of bug fixes, security updates and feature enhancements. Changes can be viewed here. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels Find out how. You can submit feedback using β€˜Report an is

 
8:56 PM
@JBis another solution, just for the fun "10:01".split(":").map(value => +value)
 
9:44 PM
@Lcf.vs that works but is easy to miss
not a fan of the +
 
@JBis I often use it and the double tilde too
 
10:12 PM
This week's JavaScript Challenge: Create a non empty function that, when executed, outputs it's own source code (quine). Reply to this message with your response.
4
Maybe I'll setup a website if these get popular
 
: /
 
don't like the idea, kevin?
 
just seems simple
maybe just to me
because i know how awful javascript can be
:p
 
Let's see it then. There are many solutions. :)
Oh, I forgot one part. Accessing of Function.prototype.toString through any means is prohibited.
 
that's better
though
all forms of to string?
or just that function
 
10:24 PM
Where is k defined in this visualization? observablehq.com/@d3/zoomable-scatterplot
oh lord k = 0.6289308176100629
 
@KevinB hmm, what are you thinking? Function.prototype.toString.call isn't allowed
 
well
does the return need to be a string?
 
@JBis ` const fn = (a = fn) => ${a}; fn()`
 
@KevinB what else could it be?
||> const fn = (a = fn) => `${a}`; fn()
 
@JBis "SyntaxError: Unexpected token '{'" Logged: `` Took: 1ms
 
10:28 PM
numbers
 
@KevinB i was thinking you might say that, but then you wouldn't have the "return" keyword in your output
 
why not
 
@JBisJames seems to have a bug with the template strings
 
@JBis "(a = fn) => ${a}" Logged: `` Took: 0ms
 
||> function a() { return 5 } a();
 
10:30 PM
@JBis 5 Logged: `` Took: 0ms
 
that's too literal
 
@Lcf.vs yes but your calling toString implicitly
kevin, show me what you mean then
 
@JBis all solutions, no?
"implicitly"
 
@Lcf.vs pretty sure not. quines exist in many langs without a function toString like method
i'll come up with a less cheatable question for next week
 
@Martin. I don't understand what you mean
Inside the promise, if an error is thrown, then what happens?
 
10:44 PM
Would anyone know why i keep getting segmentation faults and v8 errors when runing react-scripts build?
i have tried to reinstall node and npm
 
11:35 PM
posted on August 10, 2020 by Krishna Govind

Hi, everyone! We've just released Chrome 84 (84.0.4147.125) for Android: it'll become available on Google Play over the next few weeks. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

 

« first day (3586 days earlier)      last day (1345 days later) »