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

Try seafox parser in Prettier, Babel, etc. #19

Open
brodybits opened this issue Mar 25, 2020 · 8 comments
Open

Try seafox parser in Prettier, Babel, etc. #19

brodybits opened this issue Mar 25, 2020 · 8 comments
Assignees

Comments

@brodybits
Copy link
Owner

I just discovered https://github.com/KFlash/seafox which claims 2X performance, simplistic ISC license. It would be interesting to see if this could be used in tools such as Prettier, Babel, ESLint, etc.

I wonder how it would do in the TC39 test suite https://github.com/tc39/test262

@brodybits brodybits self-assigned this Mar 25, 2020
@KFlash
Copy link

KFlash commented Mar 29, 2020

@brodybits I accidentally found this issue, so I will try to answer you.

Regarding the Test262 suite it pass / fail almost 100%. There are a few regex cases that doesn't fail according the spec because I'm using the native regexp validator in NodeJS and browsers.

Also note that by default the Test262 suite doesn't have AnnexB enabled - it exist separated tests for it. Acorn and others doesn't have an option to turn off the support for additional ECMAScript features for Web Browsers. That means that some lexical scope tests that should fail without AnnexB doesn't fail for other parser. You can turn off the AnnexB support with Seafox.

I'm sorry, but I didn't find a good way to add the Test262 suite to the repo - I used a hackish version of Acorn's code to verify. And I didn't have time to write my own.

However. I have now added the Test262-parser-tests suite. Except for the few invalid tests in that repo, Seafox pass & fail as it should.

I hope this answers your questions :)

@brodybits
Copy link
Owner Author

Thanks @KFlash that sounds really awesome. And I do really like the way you added the Test262 suite without copying the whole thing which I see all too often. So I guess my next step is to try it in one of these tools, unless someone else wants to take this on. (I am in the middle of an urgent work project right now.)

Moving off-topic, I am also curious what led you to choose the ISC license over something more common like MIT?

I actually really like the ISC most due to is simplicity and closeness to both MIT and BSD. There are a couple of factors that make me a little hesitant on my own projects:

  • The most well-known MIT & Apache 2.0 permissive licenses seem to be the best understood, even if not necessarily the best written.
  • The ISC license seems to have had a very minor change. My one issue with that is that if a project says "ISC license", how should we know which version they meant?

@KFlash
Copy link

KFlash commented Mar 30, 2020

@brodybits The ISC liecense is something my students are using in their projects, and I just "copied" their workflow. I have no problem to change the licence to MIT or BSD.

I don't have too much experience with the differences between them, but you can do a PR if you want, so I can change it.

All my work is open sourced and no limitations on it.

@brodybits
Copy link
Owner Author

Thanks, I would actually not be super-certain myself at this point. To be strict, we should probably get permission from the other contributors or maybe just revert their work before changing it (seems to be very little at this point). (Bootstrap actually went through this to change from Apache 2.0 to MIT license). Maybe I am just making too big a deal, wish I had more time to contribute:)

I am now curious what kind of classes and projects you are teaching, sounds really cool!

@KFlash
Copy link

KFlash commented Mar 30, 2020

I'm actually leaving abroad and helping street kids to get back to a normal life. Kids without families. Homeless. We raise them from nothing to get a rich life with education and a future work. It's part of ALS - alternative learning system.
Some of this students are very smart and I give them private teachings in math, and both frontend and backend programming in different languages. They love JS :)

@brodybits
Copy link
Owner Author

Wow that sounds really, really awesome. Do you see this expanding into any other countries?

Are you able to find work for some of the students?

@KFlash
Copy link

KFlash commented Mar 30, 2020

Part of this is already in Malaysia where I also live. I switch between Philippines and Malaysia, but as of now I'm stuck in the Philippines.
Yes. Some of the students are in work. Mostly calling centers. But 2 of them are working in Burger King, and one already married :) Married, but not to me!

@fisker
Copy link

fisker commented Apr 20, 2020

Married, but not to me!

LOL.


Cool job, I guess the ISC license is because npm init defaults to this license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants