this post was submitted on 11 Jan 2025
12 points (83.3% liked)

Programming

17784 readers
159 users here now

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

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

cross-posted from: https://lemm.ee/post/52336135

top 13 comments
sorted by: hot top controversial new old
[–] Static_Rocket@lemmy.world 11 points 19 hours ago

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.

[–] thingsiplay@beehaw.org 5 points 19 hours ago (2 children)

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

[–] fxomt@lemm.ee 1 points 19 hours ago* (last edited 19 hours ago) (2 children)

Nevermind, Val corrected me

[–] thingsiplay@beehaw.org 3 points 19 hours ago (1 children)

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).

[–] fxomt@lemm.ee 2 points 19 hours ago

I see. i didn't know that, thank you.

[–] Val@lemm.ee 3 points 19 hours ago

Not having a license is "All Rights Reserved". That's why I bothered with the license section in the readme at all.

[–] Val@lemm.ee 1 points 19 hours ago (1 children)

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?

[–] thingsiplay@beehaw.org 4 points 19 hours ago (1 children)

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).

[–] rikudou@lemmings.world 3 points 17 hours ago

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.

[–] fxomt@lemm.ee 4 points 19 hours ago* (last edited 19 hours ago) (1 children)

That's pretty cool, was this a practice for actual compiler development? Or for fun, or an actual project?

[–] Val@lemm.ee 4 points 19 hours ago (1 children)

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.

[–] fxomt@lemm.ee 7 points 19 hours ago (1 children)

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 :)

[–] Val@lemm.ee 4 points 19 hours ago

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).