dogma
starlark
dogma | starlark | |
---|---|---|
9 | 22 | |
59 | 2,240 | |
- | 2.0% | |
7.3 | 4.1 | |
12 months ago | 7 days ago | |
Starlark | ||
GNU General Public License v3.0 or later | 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.
dogma
-
Interval Parsing Grammars for File Format Parsing (2023) [pdf]
Yes, the offset function does this by specifying an offset to branch to. For example the ICO dir_entry, which is a directory list of icon resources in the file.
- https://github.com/kstenerud/dogma/blob/master/v1/examples/i...
- Show HN: Dogma: a metalanguage for describing data formats in documentation
-
How Big Should a Programming Language Be?
I'm facing this dilemma now with the Dogma metalanguage [1]. On the one hand, I want it to be small so that it can be picked up quickly and mastered easily (very important since its primary use case is documentation). On the other hand, it needs enough power to actually be useful in the real world.
In the end I opted to avoid most conveniences since they can easily be built using a few common macros such as `u16(v) = ordered(uint(16,v))` and the like, except for cases where it would be just silly not to (like strings and regex-style repetition chars ? * +).
But even then the spec is over 2000 lines long (admittedly the examples take up a fair bit of room, though).
[1] https://github.com/kstenerud/dogma/blob/master/v1/dogma_v1.m...
-
Show HN: Dogma Metalanguage – Beta5
Hi HN!
I've just released the 5th beta of the Dogma metalanguage, which is designed to describe text and binary data for use in documentation.
https://github.com/kstenerud/dogma/blob/master/v1/dogma_v1.md
Most of the kinks are now worked out, and I'm hoping for a final release soon.
Notable changes:
* Cleaner byte ordering support with new byte_order, ordered, and bom_ordered functions
* New peek and offset functions
* Renamed swapped function to reversed
* More examples in the examples dir https://github.com/kstenerud/dogma/tree/master/v1/examples
Thanks to all for reviewing and helpful criticism :)
-
BNF Was Here: What Have We Done About the Unnecessary Notation Diversity (2011) [pdf]
The diversity of notations stems from the fact that the current BNF notations are always lacking in something fundamental that each use case needs.
For me, the breaking point came in trying to describe binary formats. I eventually had to come up with my own: https://github.com/kstenerud/dogma
-
Ask HN: How long does it take for you to release your open source project?
https://concise-encoding.org/ will be released this year and has been in development for 5 years. This one has been slow because of all the support projects such as https://github.com/kstenerud/compact-float and https://github.com/kstenerud/compact-time and https://github.com/kstenerud/enctool
https://github.com/kstenerud/dogma has been in development for 4 months and will be released in about a month. This is yet another support project for Concise Encoding (hopefully the last!).
https://github.com/kstenerud/kscrash was in development for about a year and a half before being released.
https://github.com/kstenerud/Musashi took just under a year before its first release as a MAME core (after a TON of testing - I spent 4x more time testing it than I did writing it).
But other smaller things that don't require so much precision I just write up in a couple of weeks and release, such as https://github.com/kstenerud/virtual-builders
The key is to build empathy with your potential users. What will their motivations be that lead them to try out your project? What will they be looking for when they use it? What would someone who has never seen the project before struggle with? (that last one is the hardest because you're so close to the project that it's hard to see what it's like to know nothing about it). These tell you what kind of UX you'll need, what kind of documents you'll need, what kind of tutorials you'll need, how to structure your project for your target audience, etc ("it's for everybody" is never a good idea).
A lot of times it comes down to recruiting people to just try it and do a brain dump of everything that goes wrong or frustrates or confuses them. I've done show-HN posts for things that are unreleased, just to get the valuable criticism. It's nearly impossible to develop good projects in a vacuum.
If you're not posting out of worry for doing it wrong, THAT is doing it wrong. The point is to find out where you're doing it wrong so that you can correct it! And that's where the crowd is a HUGE help.
-
Ask HN: Who is looking for code contributors?
I have two projects that could use help:
---
The first is Concise Encoding, a secure ad-hoc data format (think JSON, but secure, more data types, and also has a binary encoding). https://concise-encoding.org/
The spec is largely done, and I'm primarily working on the reference implementation (in golang) and portable tests (so people don't have to keep rewriting tests for every implementation), but I could use help getting other language implementations out there.
---
The second one is Dogma, a BNF-style metalanguage for describing binary and text data (because there wasn't a decent one for describing binary data). https://github.com/kstenerud/dogma
Dogma is mostly there as well, but while it is primarily focused around writing technical documentation (and I have written a syntax highlighter for VS Code), there are probably a lot of other tools that could be built around this technology (which I simply don't have enough time to pursue).
-
Ask HN: What Are You Working On? (March 2023)
Two things, one which supports the other:
First is Concise Encoding, a secure, binary and text ad-hoc data format with full type support: https://concise-encoding.org/
Almost all existing data formats are horribly insecure and ripe for exploitation (many of them are already). And they can't be fixed because the formats aren't versioned.
-----------------
But describing the data format was painful because most existing metalanguages are only for describing textual grammars, and the few that support binary aren't really suited for documenting for human consumption.
So I'm putting the finishing touches on Dogma ( https://github.com/kstenerud/dogma/blob/master/dogma_v1.md ), a modernized BNF-style metalanguage with better expressiveness and binary grammar support.
For example:
A UDP packet consists of a source port, a destination port, a length, a checksum, and a body. The length field refers to the size of the entire packet, not just the body.
udp_packet = src_port
starlark
- (The) Starlark Language
-
Apple releases Pkl – onfiguration as code language
The implementations and users page mentioned above:
https://github.com/bazelbuild/starlark/blob/master/users.md
- Language design of Starlark (compared to Python)
-
10 Ways for Kubernetes Declarative Configuration Management
Starlark: Starlark is a language for describing build transformations, inspired by Python, but with features that make it suitable for embedding in software like Bazel. It can be used for configuration generation due to its capability for deterministic evaluation and expressing complex build transformations.
-
How Big Should a Programming Language Be?
In the design of Starlark (https://github.com/bazelbuild/starlark), I often had to push back against new feature requests to keep the language simple. I explicitly listed simplicity as a design goal.i
Of course, the scope of the language is not the same as general purpose languages, but there's always pressure from the users to add more things. I also think many people underestimate the cost of adding new features: it's not just about adding the code in every compiler/interpreter, specifying every edge-case in a spec, updating all the tooling for the language and writing tutorials; it's also a cost on everyone who will have to read any of the code.
-
Launch HN: Moonrepo (YC W23) – Open-source build system
one of the benefits of starlark (unlike python): "Starlark is suitable for use in highly parallel applications. An application may invoke the Starlark interpreter concurrently from many threads, without the possibility of a data race, because shared data structures become immutable due to freezing." from https://github.com/bazelbuild/starlark/blob/master/spec.md - it's not python, you can't do recursion (!) and it's more limited (you can't read a file in bazel, and parse it, you have to make this operation into the graph somehow)
-
When to use Bazel?
You can do the same in Bazel which uses Starlark for its BUILD files. Starlark is a dialect of Python so it makes it super easy to work with.
-
[P] Docker alternative for AI/ML
Make sense. We do not use Python actually, the build language is starlark, which is the config lang used by bazel. https://github.com/bazelbuild/starlark
-
The Dhall Configuration Language
Have you seen Starlark? It's not too far from that, but safer in a number of ways: https://github.com/bazelbuild/starlark
- What change should Python 4 bring, in your opinion?
What are some alternatives?
KSCrash - The Ultimate iOS Crash Reporter
yaml-reference-parser
lzz-bin - Lzz: The Lazy C++ Programmer's Tool. Archive of lzz 2.8.2 binaries + documentation
dhall - Maintainable configuration files
firestarter - A starter kit for quickly building your next app. Side project or startup!
dhall-kubernetes - Typecheck, template and modularize your Kubernetes definitions with Dhall
compact-time - Encoding schemes to store a complete time, date, or timestamp in as few bytes as possible for data transmission.
starlark-go - Starlark in Go: the Starlark configuration language, implemented in Go
Musashi - Motorola 680x0 emulator written in C
openapi-python-client - Generate modern Python clients from OpenAPI
compact-float - An encoding scheme to store a floating point value in as few bytes as possible.
cdk8s - Define Kubernetes native apps and abstractions using object-oriented programming