For those who don't want to click the link for context:
OA Tree-Sitter language.
A small langauge that can be used to generate tree-sitter grammar without JS.
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
For those who don't want to click the link for context:
OA Tree-Sitter language.
A small langauge that can be used to generate tree-sitter grammar without JS.
I think you need to put the actual license text in the repository, to have a license. Just stating a license name in the readme is not correctly licensed. In example people need to a websearch for this accronym in order to find their rights and who knows if they find the correct license. Maybe they find a different written one by another person. In example there are two "official" versions of this license: https://en.wikipedia.org/wiki/WTFPL
Nevermind, Val corrected me
In many countries in the world it makes a huge difference to not having a license. If its not properly licensed or licensed at all, then it means in many countries in the world the most restrictive one, the entire opposite of the goal: Do not use without permission. By not putting the license text and clearing things up for the user, means it is not properly licensed. Therefore in countries like Germany this project would be a violation to use without permission. It becomes a liability, as the person could potentially sue anyone (in those countries).
I see. i didn't know that, thank you.
Not having a license is "All Rights Reserved". That's why I bothered with the license section in the readme at all.
I don't really want to clutter the repo with something so frivolous. If they were links or an SPDX ID would that be enough?
I don't think its enough to link. You just need to copy or create a single txt file named "LICENSE" and put it in the root of your repository. I am not a lawyer. The license text will tell anyone who cares to know what they can do and cannot with the project. If you do not do that, you only make it harder for anyone looking for the license (as explained with the websearch example previously).
There's no law specifying where the license should be. A link to a page with the license is more than enough. Though if the link ever becomes invalid or shows something else, the license is lost. That's why copying it with the source code is the best bet.
That's pretty cool, was this a practice for actual compiler development? Or for fun, or an actual project?
I'm intending to use this for a custom language "OA" that I want to compile to Rust and JS to start with.
I don't know enough about LLVM to compile directly to machine code although I would like to.
I love compiler dev, so i can give you a few tips:
It may be hard to compile to rust, due to the borrow checker; but C or javascript are great first backends, i always go with C for my prototypes.
PS: Don't go with LLVM early on, it has almost no documentation! it's not worth it, i learned that the hard way. Even zig replaced their LLVM backend with a C one.
Also some good libraries for rust:
Here's a great list of libraries that can help with building it: https://github.com/Kixiron/rust-langdev
Good luck with OA :)
Thanks!
I intend for the language to have a similar borrow checker and type system. Which is why I'm targeting rust. It means I have something to check against when writing the tooling. (Although I'm not sure I'll get that far. My computer is littered with dead projects).