Hacker Newsnew | past | comments | ask | show | jobs | submit | more lerp-io's commentslogin

nice slop, but after meeting is over it’s time for coffee break.


can u also add option to create the design docs and add a “deploy” button


ok good now tell it to make a SAaS out of it and get sales lol


lol came here to say this but i guess something to do with VR headsets?


The ai was just not vibing with your idea bro.


The chain variable continuously grows because each call to enqueue() creates a new promise that references the previous one. This creates an ever-growing chain of promises that never gets garbage collected.


Though it seems like that, no.

  a = b.then(c);
When `b` is resolved, it is garbage collected, even if a reference to `a` is retained.

(If the runtime maintains async stack traces, that could be an issue...but that is a common issue, and the stack depth is limited.)


That's not how promises work, there's no chain. It's no different from

    await job1()
    await job2()
    await job3()
    await job4()
Except dynamic


Couldn’t the browser garbage collect the promises (and their callbacks) that have been rejected or resolved? I.e. effectively “shift” the promises at the start of the queue that have been dealt with and will never be relevant again?

At least this stackoverflow answer suggests the handlers are GC’ed: https://stackoverflow.com/questions/79448475/are-promise-han...


At least in V8, this is not the case. To prove it, start a Chromium-based browser with the command-line flag --js-flags=--expose-gc, then go to https://runjs.app/play/#aWYgKCF3aW5kb3cuZ2MpIHsKICB0aHJvdyBu...


Why does the promise returned by a promise’s then() method need to reference that promise?

The original promise needs to reference the chained promise, not the other way round.

As jobs complete I would expect the top of the chain to be eligible to be garbage collected.


> This creates an ever-growing chain of promises that never gets garbage collected.

Modern frontend development performance best practise is to allow for garbage collection only when the browser crashes.


I wonder if people who are claiming its not the case ever tried to use promises in hardcore ways like this, chaining 10s of thousands of calls. You often hit some bullshit, i.e. Promise.race is a big cause of issues.

Even if you are doing `then().then()`, something _else_ in the code base could retain the promise somehow and then your whole chain isn't GCable!

For example https://github.com/rxaviers/async-pool library that implements concurrency for async iterators (and uses promise.race) subtly creates GC pressure which you dont see until you make a whole lot of calls and suddenly its slow


Nope.


there are bunch of other proteins that inhibit mtor besides rapamycin which also regulate other stuff, one of them is AMPK which downregulated by ATP (energy levels) so when level is low it will inhibit mtor (which is what rapamycin does) which is effectively not eating.


ugh... if you think the internet should be a "static webpage" i got bad news for you bud


The term is a little ambiguous. They're not referring to a website that is served from static files that never change (which would exclude forums like Hacker News). They're referring to websites that still work if you disable JavaScript, so Hacker News would still be included.


plumbing too soon enough, u can still cash in while it’s in demand before the money goes away too


it’s so good to see you showing the ability to take life back into your hands with augmented intelligence. we now have more and more ability than ever to be able to solve problems. that which was once expensive - medical knowledge of a doctor, for example, is now much more accesible and at our fingertips and we can research and learn medical literature so much faster now with AI.


Indeed that's my love of this technology portion yet there's going to be a decade to decades of change where people will start to lose their livelihoods and potentially be destitute until a universal basic income (welfare) is offered.

If humanity / society is suffering from AI yet the pros of using AI is to help humanity and society they sorta cancel each other out!

Also, are we really excited for all of us to be on welfare? Politically the right (independent myself) will finally be cheering on welfare for all lol as Musk and others lead us there.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: