Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Been a while since the last commit, is Mithril complete? or abandoned? #2891

Open
purefan opened this issue May 13, 2024 · 12 comments
Open

Been a while since the last commit, is Mithril complete? or abandoned? #2891

purefan opened this issue May 13, 2024 · 12 comments
Labels
Type: Question For issues that are purely questions about Mithril, not necessarily bug reports or suggestions

Comments

@purefan
Copy link
Contributor

purefan commented May 13, 2024

Just wondering if there's anyone developing mithril any further, perhaps its feature complete now and stable enough so it doesn't require updates as frequently as other packages?

@purefan purefan added the Type: Question For issues that are purely questions about Mithril, not necessarily bug reports or suggestions label May 13, 2024
@w3guy
Copy link

w3guy commented May 13, 2024

Following...

@dead-claudia
Copy link
Member

dead-claudia commented May 14, 2024

The project is currently in maintenance mode due to low time resources (unfortunately), but I'd say 2.x is essentially complete.

I've been slowly working in the background on a redesign (I started researching this around 2018), but one of the hardest parts is improving on Mithril's current API. And so I had to multiple times table my work for over a year trying to look for more flexible models in some areas. I've iterated and tossed many ideas. My ultimate goal is that you're writing much less view code.

Also, part of my long delay is due to the way I'm designing it, with both performance and extreme stability in mind. This forces me to do more of the design up front, since the core design will ossify quickly.

Here's some of the stuff I looked at:

  • Streams/observables can add a lot of boilerplate in the final view code, more than you'd think. And while simple lazy observables are simple, multi-producer, multi-consumer observables are complicated. I spent years on addressing the boilerplate problems while still leveraging their advantages around partial redraws, only to eventually give up.
  • I've looked into generators for a simplified render loop. Problem is, getting the latest attributes is impossible before the first yield, and the workaround destroys the flexibility of just returning a {next(attrs) { ... }} object. Spent several months off and on trying to see if this would even work, only to give up.
  • React-style hooks compose well, but the model forces you into rigid patterns that frequently get in your way. Also, the implementation can't optimize for both size and speed + memory usage - you have to sacrifice one to get the other. Tried this for about a week or so, only to find little room for improvement.
  • Lately, I've been looking at reactive signals (and am actively contributing to an attempt to specify it in the JS language). It looks very promising, but I have some concerns around pretty much all of the above, and I still have to do some further research. So far, my rigidity concerns appear mostly overblown, and the boilerplate feels only a little more than the old v0.2 m.prop() API (as in, not much). But, the implementation complexity is something I'm still working on. I don't have the performance tradeoff of React-style hooks, but I'm still trying to figure out how best to minimize memory overhead and avoid streams-like implementation complexity.

Unfortunately, I don't have code to share at the moment, and it's currently failing some critical tests, but I've actually gotten to the point of writing code now.

@dead-claudia
Copy link
Member

Will caution, it may be several months to a year before that redesign comes out. I'm not moving quick, and I don't want us to have to do a quick v4 like we did from v1 to v2 to fix missed design bugs in v1.

@modir
Copy link

modir commented May 16, 2024

I'm not moving quick, and I don't want us to have to do a quick v4 like we did from v1 to v2 to fix missed design bugs in v1.

Do I see it correctly that this is basically a one person project?

@dead-claudia
Copy link
Member

dead-claudia commented May 16, 2024

I'm not moving quick, and I don't want us to have to do a quick v4 like we did from v1 to v2 to fix missed design bugs in v1.

Do I see it correctly that this is basically a one person project?

@modir The redesign is, yes. Maintenance has multiple people, but the maintenance burden's been very light outside the Zulip.

@modir
Copy link

modir commented May 17, 2024

@modir The redesign is, yes. Maintenance has multiple people, but the maintenance burden's been very light outside the Zulip.

Thanks for the additional infos. Would it make sense to build a core team so that the redesign moves quicker? I am asking as well because I see man pull requests which are just laying around and are sometimes waiting for a second person to approve.

@talyaron
Copy link

talyaron commented May 17, 2024 via email

@pdfernhout
Copy link
Contributor

pdfernhout commented May 17, 2024 via email

@dead-claudia
Copy link
Member

Short of a major change to how HTML/JavaScript/CSS in browsers work, [...]

Part of what's motivated me to work a little more actively now is because some major changes are starting to shape up, mostly on the JS side.

I'm not planning in using all of these, but I do want to at least set the groundwork for a future where those are commonplace and Mithril can then evolve to depend on them directly. (And AbortSignal already is. It's just not as ergonomic as it could be, and the async context proposal can fix that long-term.)

@purefan
Copy link
Contributor Author

purefan commented May 20, 2024

I absolutely love Mithril and am very thankful for all the work everyone involved has put in.

Personally I dislike decorators but that's maybe a future-me problem :-)

All the best and again, thank you!

@dead-claudia
Copy link
Member

Personally I dislike decorators but that's maybe a future-me problem :-)

@purefan I'm moderately right there with you. As I said, "I'm not planning in using all of these", and decorators are one of the things I'm not planning to use.

Decorators are useful for some things, but core framework logic is not one of those things that needs to rely on them.

@imanabu
Copy link

imanabu commented Jun 8, 2024

I think the "printf" analogue is what I am aligned with. We all have a lot of time invested in the codebase to use Mithril. I personally would like to see that an "LTS" branch that:

  • It is up to date with security issues and with its dependencies.
  • it is updated with the most used ECMAScript version.
  • Kind a bonus for me, is that the typescript definition files are also maintained with the latest version. This is often a headache as many TS definitions from other projects break so often.

If these goals are met, I do not feel it is necessary to add a whole bunch of new features to the base framework that will make it slower and bigger. Can't we "plug-in" new features beyond the basic DOM manipulations, network IO, and event handling?

Super-light and no dependencies with other framework is a big draw for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question For issues that are purely questions about Mithril, not necessarily bug reports or suggestions
Projects
None yet
Development

No branches or pull requests

7 participants