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

 
3 hours later…
08:03
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
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
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
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/…
13:10
@KarelG do you have demo of codepen or anything please not understand properly
13:22
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', 'á', '𝔞', '𝐀', '𝓐'],
   [...]
}
13:39
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.
13:57
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

14:16
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
14:31
@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
15:32
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' }] }; ...

15:52
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
15:57
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
15:58
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}
16:26
on change, if value is x, do y
im sorry not sure i follow
17:29
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
17:51
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
18:11
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.
18:25
ugh I spent almost a full hour till I found this: medium.com/swlh/…
18:47
Does anyone know how can I get the stack trace when I'm getting a HttpsErrorImpl: INTERNAL?
19:15
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
19:29
@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.
20:13
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
20:39
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

21:14
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
21:23
|| 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)
21:25
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.
21:33
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.
22:23
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
22:29
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 ?
23:34
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 (1663 days later) »