For the past 4 years, I've been working on a library that does exactly this — https://github.com/astoilkov/main-thread-scheduling.
It works in all browsers and it breaks long tasks. Sometimes it's even more powerful than scheduler.yield().
HN user
Maker of IntelliBar — https://intellibar.app
Maker of Nota — https://nota.md
GitHub — https://github.com/astoilkov
Website — https://astoilkov.com
Email – hello@astoilkov.com
For the past 4 years, I've been working on a library that does exactly this — https://github.com/astoilkov/main-thread-scheduling.
It works in all browsers and it breaks long tasks. Sometimes it's even more powerful than scheduler.yield().
Any ideas on how to use the new models through JavaScript in the browser or Node.js?
Thanks!
Yeah, I will ask them. I haven't seen those. Thanks!
Yes. I want to publish a single page. I know you can use Obsidian to publish a folder. Can I upload a single file and not see the sidebar?
Yeah, you are right. I reverted the commit.
About the generations, do you imagine a function that accepts a generator function and the user uses yield? Something like:
``` mainThreadScheduling(function *(yieldOrContinue) { yield yieldOrContinue; }) ```
Thanks!
This is on my list. I want to provide a `signal` property to enable easier and more efficient cancellation.
I haven't. I should do that. Many people are talking about this and this makes me think I should measure and talk about it in the readme. Thanks!
It's done — https://github.com/astoilkov/main-thread-scheduling/commit/0.... Thanks.
A little thing but a great improvement. I'm now wondering why I did that.
Yes, that's it. You choose where to pause/resume work and place the calls to `yieldOrContinue` there.
Yeah, that sums it up. The library tries to use the single thread the browser UI is running on and just not freeze it.
The author here. Just opened HN and saw that my library is on the front page . If you have any questions, I can answer them.
8 years ago, I created a repo that allowed you to easily style messages in the browser Console (https://github.com/astoilkov/console.message).
It got popular back then. I'm wondering if I should rewrite the package from scratch, improve its API, and add it to npm.
Do you think it's worth it?
Thank you for fixing our survivorship bias.
I'm the founder of a beautiful Markdown editor. Actually, two:
Nota - https://nota.md. It's a notes app but a lot of our users use it as a markdown editor. Nota is quite powerful as a markdown editor. It has a lot of smartness built into it.
Caret - https://caret.io. We started with this - a beautiful Markdown editor. We aren't implementing new features for it but if you are on Windows or Linux it might be worth trying out. We still have new users coming in.
A common feature of the two is that they both are pleasant to use. We've put a lot of hard work into the UX (which is also hard to market and one of the reasons why you probably haven't heard about us).
I've read the article. I remember when something similar happened with Why We Sleep. I'll take the time to readjust my views. Thank you.
I would recommend going through the most popular quotes on Goodreads — https://www.goodreads.com/work/quotes/16402639.
You also read the reviews of other people.
Both of these things can give a good sense if that book is for you.
Thinking Fast and Slow
This book changed my life. It's content is based on an entire life of research. I think I will learn new things every time I read it.
I like this question because I started re-reading a few books already. I find it valuable as I already know they are good and I can extract more from them the second/third/forth time.
Location: Bulgaria
Remote: Yes
Willing to relocate: No
Technologies: JavaScript, TypeScript, React, Electron
Résumé/CV: https://astoilkov.com
GitHub: https://github.com/astoilkov
Looking for small projects (2-4 weeks) or consulting work.
I've been thinking about this myself. I'm highly productive and always avoid unnecessary complexity. My most common question is: Can we not do it?
However, when I worked for a company I did get bigger promotions but that it was in the 10-20% range. I was literally 2-3 times more productive than people who got paid 30-40% less.
If you take a big picture look, you will see things get more obvious when you give it enough time. In 10 years the difference will be big enough (I think).
Thanks. This was very useful!
I like this option a lot. I've be teaching in the past. However, I thought it will be very hard to find such a job.
Do you have a platform in mind?
Is there 2-4 week projects on Toptal. I've had the impression that is more longer term work?
I'm making a product that's in a competitive space and I need more time than that. I may be able to work 3-4 hours a day.
https://github.com/sponsors/astoilkov
I have one sponsor that's paying me $6 a month. That may be a viable option in the future.
Thanks. I created an account and will try it out. Have you tried it yourself? I'm searching for contracts that are few weeks long.
Thanks. Any platform that you would recommend?
Cool. I will need some time to understand what they are doing as I'm not an expert on Linux.
I like this type of business model. Create it for free and earn from your biggest fans. However, it's probably a big struggle for them.