just
Wartremover
just | Wartremover | |
---|---|---|
25 | 6 | |
3,547 | 1,061 | |
0.6% | -0.2% | |
2.5 | 8.6 | |
6 months ago | 2 days ago | |
JavaScript | Scala | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
just
-
A list of JavaScript engines, runtimes, interpreters
just
- Just-JS: small, secure, robust and performant JavaScript runtime for Linux
- Elixir Saves Pinterest $2M a Year in Server Costs
- GitHub - just-js/just: a very small v8 javascript runtime for linux only
-
I have done a full benchmark of a POST REST API on my computer: Node.js vs Fastify vs Express.js vs Deno vs Bun vs GO. Node.js is used WITH and WITHOUT clustering on 6-core I7 processor
https://github.com/just-js/just Is another for a V8 runtime, it really shows how well optimized it is. https://www.techempower.com/benchmarks/#section=data-r21
-
Bun v0.6.0 – Bun's new JavaScript bundler and minifier
i just tried recompiling v0.0.2 (https://github.com/just-js/just/releases/tag/0.0.2) of just-js and comparing it to current. for the completely static build on ubuntu 22.04 i see following:
0.0.2 (v8 v8.4.371.18) - file size: 15.2 MB, startup RSS: 8.4 MB
- Just – A small V8 JavaScript runtime for Linux only
-
Is Scala to Java the same relationship as TypeScript has with ECMAScript?
Not at all. Javascript, as well as java compiled into the bytecode, but just incrementally and at the runtime. You cannot compile typescript into bytecode directly (at least it intend to be like that). You can even compile js to executable (https://github.com/just-js/just). So no, typescript transpiles to javascript, whereas scala compiles to bytecode, it's different things
-
A C++ web/application framework I have been building for the last 12yrs
Trust me, these guys are insane and go to really extreme levels and use optimization techniques which are not generally prevalent among the general programming fraternity. for eg, look at pico.v it is awesome and just-js is truly unbelievable, then there is faf, most of them combine low level programming trickery to reach those insane numbers. Also some of the code may not be useful in a production app but they actually extract the juice out of the metal at every instance. Memory optimizations, compiler optimizations, postgresql wire implmentations, rust black magic, these guys are really crazy and passionate.
- Caffè Italia * 26/10/22
Wartremover
-
Is Scala to Java the same relationship as TypeScript has with ECMAScript?
By contrast, Java and ECMAScript are essentially what we might call "classical" imperative OOP languages, although ECMAScript reveals much more of its Lisp-inspired "map/filter/reduce" FP roots. IMO ESLint is essentially table stakes for working with ECMAScript, but honestly, I wouldn't stop there and would insist on working in TypeScript, including some of the tooling for ESLint specifically for TypeScript, dialing type-safety up to 11, effectively like using Wart Remover with Scala.
-
Scala Resurrection
I'm awed by the maturity of the Scala 2 compiler. Every minor version in the 2.13 series adds a new linting improvement. You can see that if you have sbt-tpolecat in your project. I'm always happy to see that some option from Wartremover is no longer used.
-
New to Scala;
I was recently trying to move away from Scapegoat to Wartremover and I got bitten by this bug which is particularly prevalent in codebases using Typelevel libraries.
-
Which static analysis tool do you use for Scala?
There is also wartremover but you cannot run it separately from your compile command.
-
Newspeak and Domain Modeling
or `NonUnitStatements` without explicit annotation.
This effectively locks you into writing pure code (you can extend the linter to cover other things like not using `Future` or not using Java libs outside of `MonadError` from cats[4]). The linters operate on typed ASTs at compile time, and have plugins for the most popular scala build tools. Coupled with `-XFatalWarnings', you can guarantee that nothing unexpected happens unless you explicitly pop the escape hatch, for the most part.
You can still bring in external libraries that haven't been compiled with these safties in place, so you aren't completely safe, but if you use ZIO[5]/Typelevel[6] libraries you can be reasonably assured of referentially transparent code in practice.
There are three schools of thought, roughly, in the scala community towards the depth of using the type system and linters to provide guarantees and capabilities, currently:
1) Don't attempt to do this, it makes the barrier to entry to high for Scala juniors. I don't understand this argument - you want to allow runtime footguns you could easily prevent at compile time because the verifiable techniques take time to learn? Why did you even choose to use a typesafe language and pay the compilation time penalty that comes with it?
2) Abstract everything to the smallest possible dependency interface, including effects (code to an effect runtime, F[_] that implements the methods your code needs to run - if you handle errors, F implements MonadError, if you output do concurrent things, F implements Concurrent, etc.) and you extend the effect with your own services using tagless final or free.
3) You still use effect wrappers, but you bind the whole project always to use a concrete effect type, avoiding event abstraction, thus making it easier to code, and limiting footguns to a very particular subset (mainly threadpool providers and unsafeRun or equivalent being called eagerly in the internals of applications).
My opinion is that smallest interface with effect guarantees (#2) is best for very large, long maintenance window apps where thechoice of effect runtime might change(app), or is out of the devs' control (lib); and #3 is best for small apps.
TL/DR; You can go a really, really long way to guaranteeing effects don't run in user code in scala. Not all the way like Haskell, but far enough that it's painful to code without conforming to referential transparency.
1. https://github.com/scalacenter/scalafix
2. https://github.com/scalaz/scalazzi
3. http://www.wartremover.org/
4. https://typelevel.org/cats/api/cats/MonadError.html
5. https://zio.dev/
6. https://typelevel.org/
What are some alternatives?
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Scapegoat - Scala compiler plugin for static code analysis
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
Scalastyle - scalastyle
ntex - framework for composable networking services
Scalafix - Refactoring and linting tool for Scala
hermes - A JavaScript engine optimized for running React Native.
scalafmt - This repo is now a fork of --->
jerryscript - Ultra-lightweight JavaScript engine for the Internet of Things.
Linter - Static Analysis Compiler Plugin for Scala
quickjspp - Port of QuickJS Javascript Engine.
Scurses - Scurses, terminal drawing API for Scala, and Onions, a Scurses framework for easy terminal UI