specifications
Elm
specifications | Elm | |
---|---|---|
6 | 198 | |
9 | 7,451 | |
- | 0.2% | |
4.1 | 5.4 | |
4 months ago | about 2 months ago | |
HTML | Haskell | |
MIT License | BSD 3-clause "New" or "Revised" 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.
specifications
-
SVGs as Elm Code
Notice that here I used a convention where names which end with "=" become XML attributes, whereas names which don't become children.
I have used the same convention here (except I don't bother with transforming names with spaces into camelCase): https://github.com/jevko/specifications/blob/master/easyjevk... to generate this HTML file: https://htmlpreview.github.io/?https://github.com/jevko/spec...
Now I intend to write specifications that codify conventions like this into different formats based on this fundamental syntax of square brackets.
It can be useful for all kinds of things. Its advantage is extreme simplicity and flexibility.
BTW, for clarity I have to say that the format that I used here: https://news.ycombinator.com/item?id=32995047 does a bit more transformations -- it actually sometimes treats whitespace as a separator (e.g. in `svg width[391]` space is a separator). That allows for extreme conciseness, but is not necessary and introduces complexity.
-
Jc – JSONifies the output of many CLI tools
A plain Jevko parser simply turns your unicode sequence into a tree which has its fragments as leaves/labels.
No data types on that level, much like in XML.
Now above that level there is several ways to differentiate between them.
The simplest pragmatic way is a kind of type inference: if a text parses as a number, it's a number, if it's "true" or "false", it's a boolean. Otherwise it's a string. If you know the implicit schema of your data then this will be sufficient to get the job done.
Otherwise you employ a separate schema -- JC in particular has per-parser schemas anyway, so that's covered in this case.
Or you do "syntax-driven" data types, similar to JSON, e.g. strings start w/ "'".
Here is a shitty demo: https://jevko.github.io/interjevko.bundle.html
It shows schema inference from JSON and the schemaless (syntax-driven) flavor.
Jevko itself is stable and formally specified: https://github.com/jevko/specifications/blob/master/spec-sta...
It's very easy to write a parser in any language (I've written one in several) and from there start using it.
However, I am still very much working on specifications for formats above Jevko. I have some recent implementations of the simplest possible format which converts Jevko to arrays/objects/strings:
* https://github.com/jevko/easyjevko.lua
-
Jevko: a minimal general-purpose syntax
Thank you for your feedback. Can you clarify?
What is the "first page" that you are referring to?
Can you paste a link to it along with the broken examples link?
This Hacker News submission features the blog post under this URL:
https://djedr.github.io/posts/jevko-2022-02-22.html
Clearly, you are not talking about this page, as that contains multiple links rather than a singular link.
Perhaps you are talking about the specification which is here:
https://github.com/jevko/specifications/blob/master/spec-sta...
(linked from the blog post)
and here:
https://jevko.org/spec.html
(linked from jevko.org)
All three link to Jevko examples here:
https://github.com/jevko/examples
but all these examples links seem to be correct on my end.
I agree about the importance of examples, and I try to lead with them on jevko.org and jevko.github.io (which are the front pages of Jevko -- possibly I should merge them into one).
However a formal specification is not necessarily the place to put the leading examples.
This is also where the Subjevko rule is defined. It isn't quite introduced as "known knowledge" -- the purpose of a specification is to define the unknown, more or less from the ground up. This is also why specifications tend to get a little abstract. Jevko's spec is no exception. This should be in line with expectations of authors of tools such as parsers, validators, generators, or other kinds of processors, for which the spec is the authoritative reference.
It is not necessarily the best first place to look for explanation, if you are approaching from a more casual side.
I agree that from that side a clear picture of what Jevko is and how it can be used is still lacking. I certainly should add more examples and explain the concepts with analogies.
So I appreciate the essence of your advice and hope I'll manage to improve on that.
- Syntax Design
Elm
-
Ludic: New framework for Python with seamless Htmx support
Elm [1] is based on a similar idea. Build your app from pure functions that return HTML tags.
[1] https://elm-lang.org/
- Learning Elm by porting a medium-sized web front end from React (2019)
-
Can you make your own JavaScript by implementing ECMAScript standard?
You also wouldn't really be creating your own new programing language. You would be creating something that can run JavaScript by following JavaScript standards and syntax. You might be able to add some non-standard features of your own on top of those standards, or include your own standard library of helpers or utilities, but you can't completely make a new or alternative language and then load it in the browser (or at least not by reimplementing ECMAScript standards... you actually can make your own language that runs within any Javascript enviroment, if you provide an interpreter or compiler that transforms it into valid JS. Some people have done something like this, eg Elm: https://elm-lang.org/).
-
What is the best way to present the user the results of Haskell computations?
You should at least have a look at https://elm-lang.org/ it is a pure functional language like Haskell (although with fewer fancy syntax/type classes) but it has some lovely libraries for visualisation and even with plain elm (+ elm-ui) doing string transformations can be easily done.
- Course using F#: Write your own tiny programming system(s)
-
Building React Components Using Unions in TypeScript
I get it. However, the whole point of using Unions to narrow your types, ensure only a set of possible scenarios can occur, and only access data of a particular union when it’s safe to do so. That’s some of what pattern matching can provide, and 100% of what using switch statements in TypeScript with their Discriminated Unions can provide. Yes, it’s not 100% exhaustive, but TypeScript is not soundly typed, and even Elm which is still has the same issue TypeScript does: You’re running in JavaScript where anything is possible. So it’s good enough to build with and much better than what you had.
- What's the state of the Elm repo? · Issue #2308 · elm/compiler
-
How to render a basic calendar UI in Elm
The beauty of a language like Elm (and other lambda-calculus / functional programming inspired languages) is that there's very little transformation involved in going from an idea to code. And that seems to have a big impact on getting things done.
- Como desenvolvi um backend web em Clojure
-
Is it possible to write games like Pac-Man in a functional language?
I think the most fun and approachable way for beginners to build games with functional programming is with Elm [1].
See a few (small, demo) games built by the community in [2] .
Notice Elm has abandoned the FRP approach in favor of Model-View-Update [3].
[1] https://elm-lang.org/
What are some alternatives?
binary-experiments - Experiments with various binary formats based on Jevko.
rescript-compiler - The compiler for ReScript.
mint-lang - :leaves: A refreshing programming language for the front-end web
haskelm - Haskell to Elm translation using Template Haskell. Contains both a library and executable.
easyjevko.lua - An Easy Jevko library for Lua.
purescript - A strongly-typed language that compiles to JavaScript
algebralang - at this time this is some example code of a language I want to build
yew - Rust / Wasm framework for creating reliable and efficient web applications
tree - A Data Modeling Programming Language
idris - A Dependently Typed Functional Programming Language
yapl - YAml Programming Language
reflex - Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.