« first day (3223 days earlier)      last day (1950 days later) » 
00:00 - 16:0016:00 - 00:00

00:38
morn
 
3 hours later…
04:03
Hi, does anyone know how to center the view of the map towards the main red cursor? I have viewed some solutions , but I still don’t understand what’s the problem. For example, key in 670150 as postal code, age 22, Singapore, eligible, CHAS Orange, and go to map view.

Deployed version:
https://morning-dusk-53803.herokuapp.com/

MyMap.js
https://paste.ofcode.org/A4T3mbqweZaNtyCnYBy7rc
 
3 hours later…
07:15
@forresthopkinsa Right, cheers. Do you reckon it's easy to get navwheel to be global from the config file?
@ndugger The options are: change job or get to work on a new project, it's pretty easy. I bet your employer wants you to stay there so if you're humble about changing project, they should be able to do that. I wouldn't say the reason why I would like to change project unless they ask me. If they whould, I would just say that I didn't find it enough stimulating, you know? There is no need to go on a banter about how trivial UI programming is.
 
1 hour later…
08:22
yeet
no tumbleweed emoji 😬
I WANT TO POST ONE!
meet this towsky:
got a dog?
@towc Does it have crippling anxiety?
08:50
@BenFortune hey ben dp you have any idea about webrtc?
@KarelG @Will
@WilliamLee
please don't ping everyone...
if you have a question about WebRTC, feel free to ask it here.
okay i'm trying to make an broadcasting system like youtube live i'm able to get camera access but unable to send the data to viewer side an you help out in that aspect?
guys?
Stop pinging random people
@BenFortune funny you mention that. Yes.
❤️
08:57
is that a yes for webrtc?
!!welcome Atul
@Atul 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 asking @towc
that's not how chat works
and it happens I've been working with webrtc for a year now
08:58
Please don't repeat your question endlessly and ping people. You've asked your question, if someone is free and wants to help you, they will.
but I'm too busy with work for now
o.o Towc haz wörk?
can you help me out for simple matter?
or anybody else?
@Atulkumarsingh I don't like repeating myself. You've already asked your question, if someone is free and wants to help you, they will. Until then, please don't repeat it or ping people randomly about it.
09:25
Hi All
@Manikandan 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.
 
2 hours later…
11:41
three.module.js:15085 Uncaught (in promise) TypeError: Cannot read property 'precision' of null
    at getMaxPrecision (three.module.js:15085)
    at new WebGLCapabilities (three.module.js:15114)
    at initGLContext (three.module.js:22845)
    at new WebGLRenderer (three.module.js:22895)
    at Object.init (ThreeScene.js:53)
    at VueComponent._callee2$ (PenHistory.vue:102)
    at tryCatch (runtime.js:45)
    at Generator.invoke [as _invoke] (runtime.js:271)
    at Generator.prototype.<computed> [as next] (runtime.js:97)
I get this error... yesterday the same code worked
>>    at VueComponent._callee2$ (PenHistory.vue:102)
11:52
So go look at PenHistory line 102
hi everybody
102:
    context.init();
let container = await document.getElementById("container");
console.log('container',container);
let context = SCENE.createBoxRotationContext(container);
console.log('context', context);
context.init();
context.animate();
console.logs are not null/undefined.. they have something
now I noticed, the same code doesn't work in brave, but in chrome
12:10
I want an idea about controlling html input order in HTML. some condition wise,

*** Client A wants input in this order

-- First Name
-- Last Name
-- Age
-- Gender

----

*** Client B wants input in this order

-- Age
-- Gender
-- First Name
-- Last Name
How do I control it?
@Suisse you have a nice stack trace. Go to the root and follow up the method calls to the spot in your vue project.
@AbhishekPandey well, just assign an ordering identifier to those inputs
it depends of how you are generating the inputs (template? with js?)
@KarelG But those are written statically in HTML, how do I re arrange them?
don't write it statically?
I am facing challenges in configuring mapDispatchToProps with react-redux which is so wierd.

I suspect a minor bug in my code or the react version which i am using is the latest version i.e 16.8.x which is giving strange errors.

The link to my post is here: https://stackoverflow.com/questions/57477330/how-to-configure-mapdispatchtoprops-with-react-redux?noredirect=1#comment101426873_57477330

Can someone please help me to correct the configuration?
@KarelG Yeah I'm considering to create it dynamically, by using some JSON data and creatElement
12:21
aah that is then better. just pass an array of objects with input info such as input type, name, label, placeholder ect
I just wanted to be sure that, is it a better way or we can do it by any other way
and have functions to render textInput, radioInput, checkboxInput and ect
@KarelG bingo, I was thinking the same,
it seems like CMS
isn't it?
just have a template rendering system at your server. Generate the html page there
use the tools that exists
I guess creating element with JSON data on run time, would work
currently I'm working on cshtml
12:27
eww. Since you are using ASP.NET, use Razor lol. Or go to C# room and ask for info there
hahaha
razor view is giving me hide show feature only, I have done some r&d with razor, but as you know JS is love
Any help on this question plz: stackoverflow.com/questions/57477330/…
and razor view is bit slower than create element
AAAAAAAAAAAARGH! Is there a decent reverse geocoder library out there for react-native that hasn't been unmaintained for half a year?
* that doesn't need a Google Maps API key
Why are css classes better for performance in React?
12:40
I'd imagine they all need some sort of paid service, it's not free to maintain something like that.
meaning using className vs style is better
@Aurelius You know search engines exist, right?
All flutter libraries I found yet work without key and there are 3 ones I found for react-native as well but they all have no 0.60 support, at least 10 issues and no change in the repo for at least 2 years.
70
A: External CSS vs inline style performance difference?

maurisThe performance boost that your friend mentioned is probably too trivial compared to the amount of performance boost (through other factors) using a CSS file. Using the style attribute, the browser only paints the rule for that particular element, which in this case is the <div> element. This r...

my SO search fu did not work
12:44
I was looking for className vs style or silimar
and I didn't get any result
because I thought it was something just related to react
so even if I have just
style={{ paddingTop: '56.25%' }}
There we go,
OOOOOOOOOOOOH MAMA! react-native-geocoder-reborn
I should import this
import { makeStyles } from '@material-ui/core/styles';
which is like 16K bytes
const useStyles = makeStyles({
  class: {
    paddingTop: '56.25%'
  },
});
and do all this
React has it's own StyleSheet class
@Aurelius That has nothing to do with your original question
You're overriding styles already created for you by MUI
@geisterfurz007 thank you I have never used that, but I am using material ui already
@BenFortune what do you mean? It has everything to do, becasue if you can't use style for performance issues, you need to use className and to use className to need to create a class..
12:52
The performance is probably negligible between classes and inline
Also lol complaining about performance when using a library as heavy as MUI
performance wise, using style is better than using makeStyles
but that isn't what you asked
I am not complaining about performance I am asking what's the best way to do things
makeStyles is a function that creates and injects css in the your <head> at runtime
am facing challenges in configuring mapDispatchToProps with react-redux which is so wierd.

I suspect a minor bug in my code or the react version which i am using is the latest version i.e 16.8.x which is giving strange errors.

The link to my post is here: stackoverflow.com/questions/…

Can someone please help me to correct the configuration?
Reposting as the question getting scrolled
If you created your own css file, and just referenced the class from that, your performance difference would be negligible between the two
Given that react's jsx is just an abstraction on top of the HTML/CSS and the dom api, I'd recommend learning html and css first, it will save you from asking these questions
12:55
@Cereal why is that better if the React docs say not to use style?
Some examples in the documentation use style for convenience, but using the style attribute as the primary means of styling elements is generally not recommended. In most cases, className should be used to reference classes defined in an external CSS stylesheet. style is most often used in React applications to add dynamically-computed styles at render time. See also FAQ: Styling and CSS.
Because you don't understand what you're doing well enough to understand my answer.
Again, makeStyles is a function in the material-ui library
@Cereal yes that's why I am asking
It creates stylesheets and injects it into the <head> of the page
@Mithun Really? Stop pinging random users and spamming your question. If somebody wants to help, they will.
12:57
then it passes the injected classes to the className prop of the html elements
It does a lot of things other than styling the element
vs the style prop which is a native html attribute
But again, that's not what you asked. You asked about the performance difference between className vs style
Which has nothing to do with makeStyles
the reason the react docs tell you not to use style is because style overrides everything and it obnoxiously difficult to override externally
If you have a child element with a style attribute set, you're never going to be able to override it because it takes precedence over everything
So the recommended way would be to create a stylesheet, with a class
.whatever {
  padding-top: 4px
}
@BenFortune - (y)
import that style sheet, and set the classname to that class name
<MyComponent className="whatever" />
This is completely separate from material-ui's styled components library
@Cereal okay so let me see if I have understood, the "performance ranking" would be something like this
1. css stylesheet embedded in the page either with a webpack css loader or the <style global jsx> tag, and then reference the class name in className
2. javascript objects containing the styles like const a = { paddingTop: '1px' } and then use them in style={a}
3. makeStyle from material ui that also requires ThemeProvider etc.
you are saying that mentioning makeStyle has nothing to do with className vs style because that's not the only/optimal way of creating classes for the components?
and not only for overriding they say is bad using style, but also specifically for performance:
13:15
@Aurelius This point is specifically for CSS, nothing to do with react.
13:45
My point about makeStyle is it's irrelevant
You need to separate this knowledge from react, and javascript entirely
They're not related to javascript at all
@Cereal okay thanks, I see that. The rest I said makes sense?
@BenFortune That's the second one today... That's peculiar
14:05
seems like material-ui is meant to be used with makeStyle tough because by using it with <style global jsx> you class get overridden by other stuff and material ui classes
At work, we've had to create a chat etiquette site because people keep pinging @here in slack in major channels
Can't you disable global pings?
I dunno, I don't admin slack
so that takes away the first option in the rank, the second option with style is not completeley feasable becase it doesn't allow media queries, so makeStyle looks like as the only real option
Ugh... Regex replace question, and the answers as usual, are shit...
Half-assed solutions that only work for the one example the OP gives, while the OP says he has more placeholder keys...
14:18
nina strikes again
Yeap...
This time, I was writing before she answered though :P
What bothers me is that she did get an upvote for that...
More that it should.
Well, someone fixed that xD
I always just DV Nina out of habit
Imagine her being your co-worker
And having to work on the same project...
I bet her motto is "If it works it works"
"If it works and only I can read it, I keep my job"
14:32
Nina's solutions are amazing and horrifying
No, just horrifying
Not necessarily in that order.
Or amazingly horrifying
She does things I wouldn't even imagine.
Maybe she mastered the ballmer peak
14:33
Like that JavaScript key order question, where she implemented a linkedlist as the solution
Wat
There's never a good reason to use linked lists
Oh for fuck's sake... Now she has 2 upvotes and my answer hasn't gotten any... I was the first one that did proper template key replacements there! I was the first one! the first one I tell you! *Fades away screaming*
@MadaraUchiha Well, there's one good thing about that answer xD
@Cerbrus That it's deleted?
Yeap
14:37
She thinks too literally about questions, instead of suggesting better ways to do things
Among other problems
It's questions and answers like this that make me wonder why I even bother answering.
Someone's going to answer with a simple crap answer that's going to out-vote mine, any way...
@Cerbrus You walked into that one
It's a regex replacement question involving the generation of HTML
How good could it get?
I mean, mplungjan's answer does the same as mine, except it's more restricted... That got 2 upvotes...
@MadaraUchiha Well, it could've been awesome, were it not for the regex part... and that thing about generating html
@BenFortune so what do you mean with the fact that it has nothing to do with react? Doesn't still holds true?
I've worked with a ton of folks with the "if it works, it works" attitude. In fact, I see that as being the majority of developers
It hurts my very soul; makes me question whether or not I even want to be in software dev
14:51
@ndugger That's definitely the attitude of most managers I've worked with
The most annoying thing is that they aren't aware of the inherent cost of that attitude, and don't care to listen.
I can accept "We know that this will cause problems in the future and will incur extra time on all future development until we fix it, and fixing it will take longer the longer we wait", that's a conscious decision.
But if I try to explain this and all I can see in the eyes of the person sitting in front of me is "what a ducking whiner, it's a 30 minute work, what's the big deal?!", that's really frustrating.
I am right now finally working with another developer who wants deeply to do things right, and to the best of their ability. I've honestly never worked with someone else like this before. Most developers are just "Let's do the bare minimum to make it work, and move on. We can come back later to to it the right way"... except when do you ever get the chance to go back and do things the right way? It's either laziness or ignorance.
Or I probably just need to learn how to chill
I guess I'm quite lucky at my job... We usually want to do it "the right way"
Then the project manager gives is a "soft deadline"
"Ugh, okay, we'll do X quick, Y right, and Z won't get into the release then"
@ndugger I have these talks with my CTO regularly
Ooooh, look what answer got accepted :D
Him: "Just do it like that, and we can fix it later"
Me: "<CTO>, we both know that later === never"
Him: "You are correct."
15:01
HAH
great chat. So what's the js topic of the day here?
@UdoE. 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.
user8729657
@rlemon, check my demo glocities.ddns.net
@UdoE. anything we think of
I thought that said geocities at first glance
user8729657
15:06
lol
@peter other vplaceholders are like City, State, zip. I can make the placeholder name same as object if that helps — ascsoftw 1 min ago
That pleases me :P
user8729657
my employer is going to help me get this beta.developer.sabre.com/guides for production.
Hi, I've a problem with Number.toLocaleString(). I'm using this method to add thousands separators, but for 'es-ES' locale, it doesn't work.
Is "It doesn't work" an error message?
15:10
i have my new site here udsd.herokuapp.com. Basically i want every thing ajax. A bit slow since it on free hosting and under heavy construction 😁
!!> 1000000..toLocaleString("es-ES")
@Cereal "1.000.000"
sorry if this is off topic. But how does a unicorn head relate to javascript? 😬
user8729657
15:20
@UdoE., it takes a unique individual to want to write code in javascript
it doesn't, it relates to SO
var num = 1000;
var n = num.toLocaleString('es');
"1000"
> using var
but this only in chrome
My pretentiousness makes me want to point and laugh
but instead I'll just tell you to use let or const like a civilized person
15:24
it's just test code
Not sure why that justification makes any sense since let is the same amount of key strokes
!!> 1000000..toLocaleString("es-ES"); // @FedericoFiaSare
@MadaraUchiha "1.000.000"
@ndugger var does have one advantage in certain contexts.
var x; is idempotent whereas let x; is not
So var is actually less awkward in the console.
!!> 1000000..toLocaleString("es-ES");
15:29
@FedericoFiaSare "1.000.000"
user9655385
In the age of SPAs I find it odd not to have some form of <script target/mountNode> syntax?
What benefit could that possibly provide
@tHeMan what would that do?
user9655385
For example react app renders to a mountNode, as do all other JS apps
that's making way too many assumptions about the contents of a script
I kind of just hate the idea in general
user9655385
15:31
Yes, of course. That's why it doesn't exist
If it's clear why it doesn't exist, then why do you find it odd that it doesn't exist?
user9655385
I find it odd there is no defined convention for specifying specific mounting points to generic scripts.
user9655385
It's a pretty basic thought.
It has no bearing
<script target="main">
  console.log("test");
</script>
What exactly do you expect that to do?
user9655385
That example doesn't fit into the thought
15:33
@tHeMan That's because "generic" scripts don't necessarily have any target or even not necessarily render anything (eg. analytics)
user9655385
If you want to understand me you can, if you want to fight me you can.
I understand your idea, I just think it's a bad idea
Scripts would also need to return something
<script target="main">
  new App();
</script>
Not everything you come up with will be a good idea, it's ok to admit it. I've been shot down on proposals before as well
Wouldn't do anything either
user9655385
15:35
@MadaraUchiha Right. It only applies to a certain type of script but that type of script does exist
user9655385
So what's the solution? Globals, predefined mount nodes, etc
Neither? You just give the component a node to mount on
You shouldn't really have syntax that changes depending on the intent. Script tags are simply a way of linking javascript code to your webpage. It has no other intention. The contents of the script determine the intent.
user9655385
@Cereal No shit??
I think you may want to look into custom HTML elements
Ok, dude, you can chill the attitude
user9655385
15:36
How. I've been around 8 years you know I know the answer to this question in practicality. I'm not asking that
@tHeMan ReactDOM.render(SomeComponent, document.getElementById('app'));
Saying you've been around for X years is a good way to sound like a jerk
You question and idea doesn't make any sense
Hence my resistance
user9655385
Oh man, someone's butthurt. Shrink
And you're making no attempt to make it make sense
15:37
I think we're done
big oof
I do believe we are.
Was that jhawins again
15:37
Josiah is smarter than that I would hope
@tHeMan If you can't speak civilly about your idea even when offered criticism, just don't.
No it was, I forgot he changed his name from jdubbz or w/e it was
what's the latest jhawins drama? Got suspended for something?
until he !!afk lmao'd
then it all came rushing back
@towc no suspension that i'm aware of
15:38
ew, a towc
@ndugger you missed my towsky
Remember when he died?
Still making polish rainbows or something?
@ndugger I moved to the dry paint observation business
user9655385
@MadaraUchiha I came in and brought a discussion and was met with basic, boring old confrontationalist responses lol. As usual
user9655385
15:42
@Cereal Huh? This never happened, actually my ex-manager came in and doxxed me is how this went.
user9655385
For old times sake
user9655385
!!afk lmao
6
If he listed your address and phone number, that's doxxing. Naming someone isn't doxxing. I have no idea what went down, but let's be realistic.
@OvieTrix so (#unicorn !== #jsDeveloper && #unicorn.getAttribute('isUnique') === #jsDeveloper.getAttribute('isUnique') ) is always true
If you think that criticism is just boring confrontationist responses, I don't understand how you expect to succeed professionally
15:44
that's weird. i thought when you namechanged your messages in profile would change too
user9655385
@ndugger Posting your employment information is doxxing actually.
user9655385
That's what happened. But lets not drama it up
user9655385
In practical terms what I meant about the script tag is like..
user9655385
<script data-mount-id='my-app' src='thing.js'>
@tHeMan back on topic, you'd probably like stimulus
15:46
@CapricaSix Thanks Capricorn.
I think we all understand the idea, I just don't agree that it's the responsibility of the script tag to determine the target element
I used it for one project - for a traditional server rendered site, it was a good way to add functionality
user9655385
Then inside the script
ReactDOM.render(SomeComponent, document.getElementById(document.currentScript.data('mountId')));
It's exactly what you're talking about
15:46
i mean
nothing is stopping someone from doing that
user9655385
This is something I encountered in the wild and then wanted to discuss. Good fight tho
i'm... kinda torn on that idea. on one hand it leaves the .html to decide where to mount, on the other... what if there are multiple mount nodes? (such as portals?)
Now you're thinking with portals
@Cereal not bad
user9655385
Right?? I don't see any better alternaives if the script needs to receive an input specifying a mounting node tho
15:49
if you're not starting a project from scratch
i think it'd be rare that the script would need that information
user9655385
A lot of people use a global, or a namespaced global and then reference that from within the bundle... Gross IMHO
but i've also only really seen my own code
@towc it's nice right
Good organizational tool
I'm so out of date with the latest frameworks
user9655385
15:50
@KevinB Consider a page filled with React/whatever modules. There may be multiple separate "apps" running on the same page, it's actually becoming common
user9655385
You can't make every app render to #app lol
what's new in the last 2 years, that might be worth learning about?
right, i've actually been considering doing something like that
not react hooks
@towc svelte, definitely
15:51
dear lord
custom elements + shadow dom
because the entire page and routing being handled by react is becoming problematic in my case
not necessarily svelte, but it's an option
@Cereal do you know anyone that used it in production?
it's pretty nice
15:52
Or you can deep dive into WASM; I still hold that it's the future of web dev
me :D
fairs
user9655385
Bear with me because this obviously would make NO sense... But if you had some kind of "renderring" script tag that you could place inside of an element...
@ndugger any interesting wasm frameworks that came up recently?
user9655385
<main>
  <div>
    <renderScript src='app.js'/>
  </div>
  <div>
    <renderScript src='diffApp.js'/>
  </div>
</main>
15:52
@tHeMan this is why I suggested custom elements. You could probably develop a custom tag for this exact purpose
user9655385
And then they would render into their parents??
like an actually good library for python web frontends or something?
user9655385
Yea it is essentially custom elements, but they are 100% JS
You could do that with pre-processing @tHeMan
like in rails, you could do
<render-script src='app.js' target='#container'/> or something
user9655385
15:53
@Cereal Sure. But ideally these could be consumables from anywhere... CDNs, local files
<div>
  =react_component :navbar
  =react_component :main_page
</div>
no pls
user9655385
That just kicks the can. Again I have to define everything before compile
@towc "good" and "python" do not belong in the same sentence
I've warmed up to it
15:54
@towc blazor
user9655385
I'm picturing something runtime. Idk. It was just a thought, not something I need/want to implement.
has its usecases
re: wasm
@Cereal cute
user9655385
@ndugger I missed this one. I expect to continue doing just that actually.
15:56
there's yew too github.com/yewstack/yew
@ndugger probably, related: elm
no thanks
svelte's my favorite frontend framework I've tried so far
I really liked programming in my own UI framework I made on top of custom elements and shadow dom, but it was tailored specifically for me, so some major bias going on lol.
I just don't have the time or energy to really commit myself to making it production ready
00:00 - 16:0016:00 - 00:00

« first day (3223 days earlier)      last day (1950 days later) »