jsoniter-scala
FS2
jsoniter-scala | FS2 | |
---|---|---|
29 | 17 | |
710 | 2,330 | |
- | 0.8% | |
9.6 | 9.5 | |
4 days ago | 4 days ago | |
Scala | Scala | |
MIT License | GNU General Public License v3.0 or later |
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.
jsoniter-scala
-
1BRC Merykitty's Magic SWAR: 8 Lines of Code Explained in 3k Words
What an amazing step by step explanation!
More than 2 years ago I found that byte array view var handles are quite suitable to cook efficient SWAR routines with Java/Scala.
See a lot of other examples of SWAR usage, like parsing Base16/64 string, java.time.* and number values directly from byte arrays:
https://github.com/plokhotnyuk/jsoniter-scala/blob/master/js...
-
The Newest Java Json Benchmark Results just dropped
Afaik dsl-json came up with a lot of improvements and inspired a several other libraries like JsonIter and jsonIter-scala. Jsoniter-scala by u/plokhotnyuk is probably the most optimized JSON library on the JVM at this point, and seems to power most of the Scala ecosystem. Some implementations/optimizations eventually made their way back into Jackson and other libraries.
-
Please try my JSON library
I was on your place more then 5 years ago, when cut the 1st release of jsoniter-scala.
-
Post your problems with Scala 3/2.13 compiler performance!
I've just increased compiler performance in ~1.5x times by adding these JVM options for the code cache
-
smithy-translate : a CLI tool to turn openapi specs and json-schema specs into smithy specs, written in Scala
We have our own open-source code-generator that produces Scala code from Smithy. The code module is entirely dependency-free, and the generated code is not biased towards any library, be that http or json. We do however have out-of-the-box integration with jsoniter and http4s.
-
Why does Scala seem to be slow at benchmark results?
You can use jsoniter-scala. It is easy to use like upickle.
-
Scala needs *highly* efficient libraries to survive in a multi-core age
BTW, jsoniter-scala uses it for faster parsing and serialization using SWAR techniques, like here.
-
Using Circe with GADT
Probably you should have both codecs (for Foo and for its T) are implicitly available in the scope, like it is done in the following test for jsoniter-scala:
-
Starting with scala
BEWARE: uJson is vulnerable under DoS attacks
-
Is Scala a good choice for a data intensive web backend?
Please see sources (and GitHub history of development) of jsoniter-scala as an example in the domain of JSON parsing and serialization.
FS2
- Ask HN: What are some of the most elegant codebases in your favorite language?
-
The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes
Recently, CE3 has had similar issues reported across multiple repositories, almost an epidemic of reports!
-
Parallel streaming in Haskell: Part 1 – Fast, efficient, and fun
Thanks for the explanation!
So it's pull based and not push based like most other streams lib.
Does maybe someone know how this compares to FS2 or Iteratees than? (Both are also pull based streaming solutions).
https://fs2.io/#/
https://en.wikipedia.org/wiki/Iteratee
Looks quite similar to me. Is the Scala FS2 lib maybe even a clones of the Haskell solution? Or are they different in important aspects?
-
Grasping the concepts and getting them down to earth
Most important/known: * https://http4s.org/ - an HTTP client/server * https://github.com/typelevel/fs2 - streaming * https://github.com/tpolecat/doobie - JDBC
-
Should I Move From PHP to Node/Express?
On the contrary, switching to the functional mindset, with something like Typelevel Scala3 and respective cats and cats-effect fs2 frameworks, helps to rethink a lot of designs and development approaches.
-
Is Scala a good choice for a data intensive web backend?
fs2 for streaming.
-
Is “Functional Programming in Scala” 1st edition still relevant?
Finally, the last chapter has been rewritten to be based on some of the main design ideas from FS2 (https://fs2.io), which I hope will be more approachable than the 1st edition.
-
FS2 stream doesn't work as I expect it to
Just to clarify, is your doubt about the meaning of the api, or do you think you have found a bug? In either case, you can also open a Github discussion https://github.com/typelevel/fs2/discussions.
-
How to update and access state that needs to be shared across multiple API endpoints with FP?
Another more reactive solution would to use signals, as in FPR sinal network. fs2 implements this very nicely here https://github.com/typelevel/fs2/blob/8b285a6b54c63d43ed6aa3bb91365652035c90e5/core/shared/src/main/scala/fs2/concurrent/Signal.scala
-
Introducing effects systems S.A. ZIO at work?
Assuming the bug mentioned here is https://github.com/typelevel/fs2/issues/2568, we came up with a partial fix in a day (https://github.com/typelevel/fs2/pull/2569) and a complete fix in 2 days: https://github.com/typelevel/fs2/pull/2572. Note the original bug was opened on a Saturday. :)
What are some alternatives?
circe - Yet another JSON library for Scala
cats-effect - The pure asynchronous runtime for Scala
json4s - JSON library
Diffy
DSL-JSON - High performance JVM JSON library
Http4s - A minimal, idiomatic Scala interface for HTTP
jackson-module-scala - Add-on module for Jackson (https://github.com/FasterXML/jackson) to support Scala-specific datatypes
ScalaMock - Native Scala mocking framework
Play JSON - The Play JSON library
ScalaTest - A testing tool for Scala and Java developers
spray-json - A lightweight, clean and simple JSON implementation in Scala
ScalaMeter - Microbenchmarking and performance regression testing framework for the JVM platform.