package.elm-lang.org
jsverify
Our great sponsors
package.elm-lang.org | jsverify | |
---|---|---|
13 | 5 | |
296 | 1,666 | |
0.0% | 0.1% | |
0.0 | 1.8 | |
about 1 year ago | about 3 years ago | |
Haskell | JavaScript | |
BSD 3-clause "New" or "Revised" License | MIT License |
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.
package.elm-lang.org
- Por que Elm é uma linguagem tão deliciosa?
-
Ask HN: What Happened to Elm?
Also the fact that their package manager is strongly coupled against https://package.elm-lang.org/. There is no way to override it. This means that if that package site ever goes down, you will be left with an unbuildable project. Seems pretty risky to me.
-
How do yall share Elm codez within your organization?
Imagine, for example, you have a component library that you don't want to publish to the public package.elm-lang.org. How do you make that available just within your company?
-
Advice on porting a package to 0.19.1
Not to be silly but I was getting ready to do my port & all but clicking on "source" from with package.elm-lang.org takes me to elm-charts, not elm-plot.
-
[Media] Why is namesquatting on Crates still not resolved after almost a decade? These crates have had absolutely no activity for years (2nd example in comments)
Elm has packages prefaced with the repo owner, so its mdgriffith/elm-ui and not just "elm-ui".
-
Entering periods into Float fields is difficult, what's the better way to do it?
If you're dealing with some kind of currency it's better to use a Decimal type which has few packages on the ecosystem.
-
Why is Elm documentation so poor?
If you are looking for a complete API documentation you should be browsing https://package.elm-lang.org/ ; I still find it lacking compared to other programming languages, but it's definitely more complete that the starting guide.
-
Should I compose elements?
There are two ways of structuring state. Record with each page's state in its own field OR a custom type with the variants containing the state for the page (this is what you see in elm-spa-example or package.elm-lang.org). The tabs you describe behave like the first approach.
-
React to Elm Migration Guide
Elm is a strongly typed functional language, compiler, package manager, and framework. You write in the Elm language, and it compiles to JavaScript for use in the browser. The Elm compiler has 2 basic modes of development, and production. It optionally has a REPL if you want to test some basic code. The package manager uses it’s own website and structure using elm.json, instead of package.json. The framework is what Elm is most known for, and was the inspiration for Redux.
-
Should I Upload The Binary Or Build The Code On
I was considering doing just that, using nginx server. I was using Evan's git repo for Elm packages (website: https://package.elm-lang.org/) (git: https://github.com/elm/package.elm-lang.org ) where he does uses that. So I think I will try this first and then consider deploying the binary if I can. Thanks for the advice!
jsverify
-
The 5 principles of Unit Testing
Libraries like JSVerify or Fast-Check offer essential tools to facilitate property-based testing.
-
Ask HN: What's your favorite software testing framework and why?
I tend to use anything that offers property-testing, since tests are much shorter to write and uncover lots more hidden assumptions.
My go-to choices per language are:
- Python: Hypothesis https://hypothesis.readthedocs.io/en/latest (also compatible with PyTest)
- Scala: ScalaCheck https://scalacheck.org (also compatible with ScalaTest)
- Javascript/Typescript: JSVerify https://jsverify.github.io
- Haskell: LazySmallCheck2012 https://github.com/UoYCS-plasma/LazySmallCheck2012/blob/mast...
- When I wrote PHP (over a decade ago) there was no decent property-based test framework, so I cobbled one together https://github.com/Warbo/php-easycheck
All of the above use the same basic setup: tests can make universally-quantified statements (e.g. "for all (x: Int), foo(x) == foo(foo(x))"), then the framework checks that statement for a bunch of different inputs.
Most property-checking frameworks generate data randomly (with more or less sophistication). The Haskell ecosystem is more interesting:
- QuickCheck was one of the first property-testing frameworks, using random genrators.
- SmallCheck came later, which enumerates data instead (e.g. testing a Float might use 0, 1, -1, 2, -2, 0.5, -0.5, etc.). That's cute, but QuickCheck tends to exercise more code paths with each input.
- LazySmallCheck builds up test data on-demand, using Haskell's pervasive laziness. Tests are run with an error as input: if they pass, we're done; if they fail, we're done; if they trigger the error, they're run again with slightly more-defined inputs. For example, if the input is supposed to be a list, we try again with the two forms of list: empty and "cons" (the arguments to cons are both errors, to begin with). This exercises even more code paths for each input.
- LazySmallCheck2012 is a more versatile "update" to LazySmallCheck; in particular, it's able to generate functions.
-
Property Based Testing Framework for Node
The usage of hypothesis is very intuitive and simple, and presents the concept of property-based testing perfectly. So I also wanted to find an equivalent alternative in Node. Two of them have high star ratings on Github, JSVerify with 1.6K stars and fast-check with 2.8K stars. So I took some time to study fast-check a little bit and try to get closer to my daily work.
-
Machine Readable Specifications at Scale
Systems I've used for this include https://agda.readthedocs.io/en/v2.6.0.1/getting-started/what... https://coq.inria.fr https://www.idris-lang.org and https://isabelle.in.tum.de
An easier alternative is to try disproving the statement, by executing it on thousands of examples and seeing if any fail. That gives us less confidence than a full proof, but can still be better than traditional "there exists" tests. This is called property checking or property-based testing. Systems I've used for this include https://hypothesis.works https://hackage.haskell.org/package/QuickCheck https://scalacheck.org and https://jsverify.github.io
-
React to Elm Migration Guide
Using create-react-app, you’ll run npm test which uses Jest internally. If you are dealing with a lot of data on the UI, or using TypeScript, use JSVerify for property tests. For end to end tests, Cypress is a great choice.
What are some alternatives?
proposal-pattern-matching - Pattern matching syntax for ECMAScript
testy - test helpers for more meaningful, readable, and fluent tests
elm-format - elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
greenlight - Clojure integration testing framework
Elm - Compiler for Elm, a functional language for reliable webapps.
LazySmallCheck2012 - Lazy SmallCheck with functional values and existentials!
elm-syntax - Library for generating Elm syntax from Haskell in a scope-safe way
hitchstory - Type-safe YAML integration tests. Tests that write your docs. Tests that rewrite themselves.
roc - A fast, friendly, functional language. Work in progress!
fast-check - Property based testing framework for JavaScript (like QuickCheck) written in TypeScript
guide.elm-lang.org - My book introducing you to Elm!
venom - 🐍 Manage and run your integration tests with efficiency - Venom run executors (script, HTTP Request, web, imap, etc... ) and assertions