« first day (3108 days earlier)      last day (1836 days later) » 

 
1 hour later…
1:20 AM
Can someone help me proxy an object with async getters?
 
 
2 hours later…
3:36 AM
@JacobSchneider can you explain?
 
0
Q: Alternative for STDIO wrapper in node

Jacob SchneiderI've got a script that uses 2 classes, say class A and class B. Class A contains an array of class B instances, often no less than 20. Class B performs computationally expensive and slow tasks, bottle-necking the parent process. An async function may be the answer here, but it still only operates...

 
why not worker threads: nodejs.org/api/worker_threads.html ?
I would assume you could implement worker threads in the parent class
 
Thanks so much! I'll take a look!
 
3:59 AM
thanks @DavidKamer
Would threading improve performance do you think?
 
idk it would heavily depend upon the problem
says right in the docs that io operations are handled better with async
 
 
1 hour later…
5:29 AM
It's not an IO op
Also, Worker threads are experimental
It says in the docs not to use it in production
 
you probably shouldn't be doing something like that with node in production anyway tbh...
but if you are going to why not break all the rules at that point lol
 
5:50 AM
Haha yeah
 
6:04 AM
but if you're just trying to simplify the promises, you might benefit from the Promise.all method or Promise's other methods
Seems like something that might be useful trying to solve promisifying multiple instances as streams
 
 
4 hours later…
9:47 AM
const AI: Player = new Player(new User('CPU'));
export default AI;
Will this AI class serve as Singleton?
Or will it create new object on every import AI?
 
 
2 hours later…
11:39 AM
Hi. whats is the point of events emitter in node if I have emitter s and listeners in pairs?
instead of hey this event happenned, il just call the function associated to it
 
 
1 hour later…
12:56 PM
Event emitters are asynchronous and often are associated with OS based tasks such as IO or computationally expensive tasks. Correct me if I'm wrong, I haven't properly looked into this, but this is my best guess.
Also, an event emitter will allow the function to exit while a behaviour will persist. So if reading a file is placed in an event based interface, the read function will exit without necessarily returning the contents of the file because the read operation isn't completed yet. This allows greater flexibility in less efficient programs as they can perform certain tasks without becoming completely clogged
 
user8729657
1:23 PM
@JBis, I got this book from my library called The Dark Net by Benjamin Percy, it's a great read you should read it sometime!
 
3:41 PM
It is with great sadness that I share news of Joe Armstrong's passing away earlier today. Whilst he may no longer be with us, his work has laid the foundation which will be used by generations to come. RIP @joeerl, thank you for inspiring us all.
 
user8729657
3:51 PM
@Meredith, that sadden me tbh
 
4:20 PM
@RahulJain The new key word creates a new instance
 
 
2 hours later…
user1596138
6:43 PM
bump
 
user8729657
I never knew that there was a new keyword in Javascript, just like C#
 
hi all! Can scroll events be triggered - listened even if the top/bottom limit of layer is reached? Thanks
 
 
3 hours later…
9:46 PM
Hello, I'm not a javascript developer. So, probably I don't know what I am talking about.

Question: I have a gui widget which I want to scale with the size of screen(let's say browser in this case). I can't use any automatic function to do it. So, it has to be bare bones. How can I do it? Where can I read about it?
how should I change my height & width, with respect to the screen(browser size)?
 
10:05 PM
hmm, it is weekend, will be back tomorrow :)
 
 
1 hour later…
11:27 PM
@codeconscious, I think setting the width and height to innerWidth and innerHeight, and then positioning it on the top left corned of the screen would work.
elem.style.width = innerWidth;
umm how do I format code
Multi-line code
I'll just send a bunch of messages each with a line of code
elem.style.width = innerWidth;
elem.style.height = innerHeight;
elem.style.left = "0";
elem.style.top = "0";
I haven't tested this but I'm pretty sure it'll work
 

« first day (3108 days earlier)      last day (1836 days later) »