« first day (3510 days earlier)      last day (1444 days later) » 

5:11 AM
need help with this please
 
 
3 hours later…
8:03 AM
Rxjs: How can I map a specific property based on a different variable?
// e.g:

of({
    a: 1,
    b: 2
}).pipe(..)
// property b should be mapped by the function getNumber

getNumber(number): Observable<number> {
    return of(number*number);
}
 
@ErwinOkken 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
 
 
4 hours later…
12:03 PM
Afternoon - anyone know why a post request via axios (passing an object) with a getter. the getter is not included as part of the request. Only the propeties themselves that are not defined as getters
 
can you rephrase your question/problem?
 
12:22 PM
Sure, I have an ES6 object. it has some properties. It has a getter. I was hoping the getter() would be sent as part of the json object when I pass it to axios. It appears not!
i guess when transpiled the property is not defined
 
@Asheh ah now I got you. Reading the first sentence in your earlier comment has confused me
the getter/setter is kinda an unique mechanism in js.
yet, it is worth to note that you don't pass around functions via JSON. That is considered as a bad practice.
 
Interesting, so would you say a class should produce a json model?
i.e. User() that has functions produces a UserModel
good idea actually
 
you can add a function to return with a JSON object yes
 
That seems better practice than what I am doing, thank you
 
12:50 PM
hello
how can I make stylish font like 💎☝ 𝒽έ𝕝ĻØ 𝐖𝕆𝐑𝐥𝓭 𝐇όω ᵃ𝔯є ץ𝕠ⓤ? 🐸💘
I want to make a stylish name generator and want to use like this font, how can I do that ? for more font, 1. 😈♢ Ĥ𝒆Lᒪσ W๏Ⓡᒪ๔ ʰⓞ山 𝔞яε 𝔶𝕆υ? 🍟💝 2. •.¸♡ 卄ε𝕝ⓛ𝓸 w๏ⓡ𝓵Ⓓ h𝔬𝔴 𝓐Řⓔ yόυ? ♡¸.• 3. ✋💛 ℍ𝔢𝔩Łㄖ 𝓌Or𝐋ᗪ 𝕙ỖW 𝐀尺𝒆 ץØⓤ? ☯♪
the demo I see this website, stylishnameguru.com
 
@NIKHILCHANDRAROY you can wrap the text in a <span> element and assign a specific font to it by yourSpanElement.style.fontStyle
other font styling can be applied well, just check developer.mozilla.org/en-US/docs/Web/CSS/…
 
1:10 PM
@KarelG do you have demo of codepen or anything please not understand properly
 
1:22 PM
lol
 
@KevinB neigh
 
that's not a font
 
Is anyone aware of a way to inspect or otherwise see the config settings used for a webpack build? I've tried console.log(), but you have to use JSON.stringify() to get the full object and I'm getting a circular reference error.
 
@NIKHILCHANDRAROY Make an object with letters for keys. For each letter, have the value as an array of all possibilities of that letter. Then just randomly select one based on input.
{
   a: ['a', 'á', '𝔞', '𝐀', '𝓐'],
   [...]
}
 
1:39 PM
ohh
ok
 
@JBis interesting, but what happen for this (¯·.¸¸.-> °º 🎀 𝒶𝒷𝒸𝒹 🎀 º° >-.¸¸.·¯( it's changing the style each tylewhen type
 
i don't know what that is? If you need to change special characters just add them to the object
@forresthopkinsa lol. I thought Caprica was a person for a good couple days. But then I was too afraid to ask, because I didn't want to offend if she was real.
 
1:57 PM
there was a dude that tried to flirt with cap many years ago
one of my best experiences on internet.
 
posted on May 26, 2020 by Michaël Zasso

Notable Changes ECMAScript Modules - --experimental-modules flag removal As of Node.js 12.17.0, the --experimental-modules flag is no longer necessary to use ECMAScript modules (ESM). However, the ESM implementation in Node.js remains experimental. As per our stability index: “The feature is not subject to Semantic Versioning rules. Non-backward compatible changes or removal may occur in

 
2:16 PM
Hey guys, I'm trying to print some nested objects to build a dynamic controlgroup with categories and checkbox whitin on html. I'm getting really lost on defining my object (with nested obj or nested arrays), also I'm getting lost on how to implement it (map, filter, reduce) with arrays or use the for (in) loop on objects
 
@BernardoMarques 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.
 
@BernardoMarques Ok. Do you a specific question?
When iterating over objects you have a couple options depending on what you need. You can use the for..in loop, however there are issues with that. I prefer to use Object.keys, Object.values, or Object.entries, with a forEach loop.
For Arrays, you can read up on map, filter, reduce, on mdn.
|| mdn array map
 
There is my desired output, as a beginner what do you think it would be easier? the json format is not defined, It could be array of objects, or all nested objects
 
{
	"category": "name 1" :
    {
      {"text": "text1"},
      {"text": "text2"},
      {"text": "text3"},
    },
  "category": "name 2" :
  {
      {"text": "text1"},
      {"text": "text2"},
      {"text": "text3"},
    },
};
that is not a valid object
You'd want to do something like
{
    "name 1": [
      {"text": "text1"},
      {"text": "text2"},
      {"text": "text3"},
    ],
}
try using that format
 
2:31 PM
@JBis if I use this format I wouldn't be able to loop trough it via map, right? at least on the higher objects
 
|| mdn object.keys
 
Read that
 
ok, what is the best way to iterate using those .keys? I need to go inside each key and print their sons
 
3:32 PM
873
Q: How can I access and process nested objects, arrays or JSON?

Felix KlingI have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For example: var data = { code: 42, items: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }] }; ...

 
3:52 PM
is it possible to assign new value to a variable when a condition is met?
 
how would I do that?
 
when the condition is met, run code that sets the variable value
 
what Im doing is like this let say var x = 0 if(condition is met){ x += new value}
is it correct?
 
not really
 
3:57 PM
That's not valid javascript, no.
 
because, that if statement will only run once
it's not gonna repeatedly check for the condition and then change the variable once it eventually changes
 
wait, oh.
 
hmm
 
you'll need to run said condition checking code after the code that would affect said condition.
 
cause everytime a condion is met it adds value to the previously added value
 
3:58 PM
What problem are you trying to solve? There's probably a better way to solve your problem.
 
so if your condition is, for example, the user clicks a button, then you'd need to set the variable in the click handler
 
yeah its more like that, a value will be set depending on the users choice
actually its a drop down
variable value will depend on which is selected
so how can I do that can I do if(condition is met){ var x = new value}
or if(condition is met){ var x == new value}
 
4:26 PM
on change, if value is x, do y
 
im sorry not sure i follow
 
5:29 PM
Netflix: How can we take the most hated feature on the web, autoplay, and make it worse?
 
Autoplay is probably responsible for like half of Facebook's ad revenue lol
 
5:51 PM
posted on May 26, 2020 by Prudhvikumar Bommana

The Dev channel has been updated to 84.0.4147.21 for Windows, Mac, and Linux platforms. A partial list of 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 issues. Prudhvikumar Bommana Google Chrome

 
how to reset a counter? let say I incremented something using ++ then when something change i wanted to reset that, if i use -- it would be one by one, i wanted to to empty it, reset, zeroed
 
6:11 PM
hey guys, I'm deduping this array of objects (not preserving values that had dupes, only values that were unique). The key value I'm using to dedupe is at two different paths in the array as there are two type of objects (they have the same key value but one is at item.fields.user_id and the other is at item.user_id) - how do I solve for this? Right now my code is breaking because of the path difference
 
@IgorLenterman 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.
 
6:25 PM
ugh I spent almost a full hour till I found this: medium.com/swlh/…
 
6:47 PM
Does anyone know how can I get the stack trace when I'm getting a HttpsErrorImpl: INTERNAL?
 
7:15 PM
I have a model value and it comes like <p><b>some text</b></p> from database.. How can i show without html tags and text looks in BOLD ?
@Model.modelvalue
 
7:29 PM
@TechGuy without HTML tags? Either add some CSS to mark it as bold or maybe use something like markdown or another templating engine syntax but those tend to ultimately output HTML.
||> [{fields: {user_id: 42}}, {user_id:43}].map(x => x.user_id || x.fields.user_id)
 
@VLAZ [42,43] Logged: `` Took: 0ms
 
@IgorLenterman ^ you can test both paths.
 
8:13 PM
hi
I notice in our codebase someone has added a subscription to a PubSub service in the component directly. My thinking is that this should instead be subscribed to in an NgRx effect.
What is a good reason to sway them to move this subscription to the pub sub out of the component?
My thinking is that is they put it in an effect at least we can track subscriptions via the actions dispatched from the effect
Also it removes subscription / data access logic out of component
 
8:39 PM
posted on May 26, 2020 by Cindy Bayless

The Beta channel is being updated to 83.0.4103.77 (Platform version: 13020.54.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Most systems will be receiving updates over the next several days. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how

 
9:14 PM
hmm, how should a function be defined in HiAPL
 
Hmm, it needs a parameter list and then a body
You could only allow expressions in the body, which might help out if you don't want to deal with statements.
 
<funcName>
     <argList><x/><y/></argList>
     <!--- can use x and y here -->
</funcName>
what about that?
argList is a keyword
 
Hmm, if you're doing tags anyway, then I guess you could be passing arguments list as attributes, which means you get named parameters. That would be neat.
 
converting named params to js could be difficult
 
@JanHorčička 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
 
9:23 PM
|| mdn truthy
 
@JanHorčička if length is anything other than zero, you will go into the if case, otherwise not
 
@JanHorčička read that ^^
 
so it returns the length which in turn returns "true" ?
 
length can be anything or nothing (undefined)
 
9:25 PM
got it, thanks
 
@JanHorčička no, it's NOT the boolean value true, but it will pass the if check or not
@JBis you cound convert that function to ({x, y}) => {} so the call would be made as fn({x, y}). Then you get named parameters.
 
thats genius
wait but then how do you call it?
 
You can then even set defaults <argList><x default="hello"/><y default="world"/></argList> for them and the function definition would be function({x="hello, y="world"})
 
calling it would be in the args, but i wanted to use children
ok thinking outloud
got it
thanks
 
Not sure what a call would look like. Just throwing idea here, something like <call name="funcName"><args x="foo" y = "bar"></call> might work if you specify each argument as attribute.
 
9:33 PM
i'm gonna go with a combo of what you said and the children idea
basically, i'll use attributes for defaults, but not named variables
 
Also, minor terminology correction argList should probably be paramList. Parameters are what a function definition has - it's any values it can take. Arguments are values passed to a function. So, functon foo(x) {} has a parameter x while, foo(42) calls it and passes 42 as an argument.
 
yes true
i tend to use them interchangeably when not explaining stuff to people
 
I know, I tend to do it, too. I'm trying hard to kick the habit myself because there is a difference.
I've successfully corrected myself on using proper terms for methods/functions before.
 
10:23 PM
Making progress
I've made an HTML lexer and parser. Next up is converting an HTML tree into either a HiAPL AST or a ESTree.
 
Hot damn... I havent been on here in a while...
 
I think it's been like three days Tay
 
Been too busy playing with blender and 3D simulations...
3 Days is a lot, considering the family traveling and all the information ive absorbed
 
Blender is great, keep it up
 
^
 
10:29 PM
its fun
I already created my first fluid simulations with mantaflow, along with many physics and material renders
 
Mantaflow is a significant improvement upon what we had before
 
Imagine if you could do that
with Javascript
3D Bloom and Eevee / Cycles Renders with just javascript
 
The performance would be abysmal
 
er- I meant in an imaginary sense
but yeah
THREE.js already kinda sucks at performing high quality live renders. However, would it really be so bad if it was single frame extreme quality renders?
Like would that really be impossible?
Anyways, I have an issue
Im getting a lot of progress done on my TotM clone codepen.io/SkylerSpark/pen/GRpdzBZ
Ive hit another stump.
So if you go into the drawPlayer class
and into the main little "function" at the beginning, I have a forEach loop sifting through my map variable looking for "6" to convert into currencies
See, I cant do this portion with my map rendering class, because I need to make the "currencies" or "scrap" disapear when they are collided with, however, I cant even get them to render
I copied the same logic but in the second canvas
mapData.forEach(e => {
			 for (var i = 0; i < e.length; i++) {
			 	if (e[i] == 6) {
						ctx2.drawImage(spriteImage, 64, 96, 32, 32, cx, cy, 32, 32);
			 		cx += 32;
			 	} else {
		 			cx += 32;
		 		}
		 	}
		 	cx = 0;
		 	cy += 32;
		 });
jesus the SO extreme tab formatting always makes me jump a little
Anyways, besides the point, Im passing the same data, and the same locations, and every into my second canvas. why isnt it rendering
 
is there any specific performance difference based on running a mongodb inside an ec2 container and managing it ourselves vs using mongodb atlas and do we really need a managed database ?
 
11:34 PM
so i am looking at creating a chrome extension that substitutes ð or þ for 'th' (eth or thorn) for various amusing reasons. i have something already that looks for 'th' on a page and replaces it with ð (eth) but i want to be able to distinguish which it should be. i was thinking the best approach would be looking for some sort of piece of code that could check the ipa of words with 'th' in them, and then based on that replace the 'th' with þ or ð
 
@heather 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.
 
but everything i am finding is devoted to reading aloud something based on ipa for a word. do any of you know of something like this? thank you :)
 

« first day (3510 days earlier)      last day (1444 days later) »