June 21st, 2024

Show HN: Lady Deirdre 2 – Rust Framework for Compilers and LSP Servers

Lady Deirdre, a proprietary compiler front-end by Ilya Lakhin, supports incremental programming language compilers, error resilience, Web-Assembly compatibility, and more. Available for open-source projects with non-commercial licenses and GitHub contributions.

Read original articleLink Icon
Show HN: Lady Deirdre 2 – Rust Framework for Compilers and LSP Servers

Lady Deirdre is a proprietary compiler front-end technology created by Ilya Lakhin, offering a framework for incremental programming language compilers, interpreters, and source code analyzers. It features a parser generator using macros, hand-written parsers, error resilience, semantics analysis framework, incremental compilation, parallel computations, Web-Assembly compatibility, source code formatters, annotated snippets, and a self-sufficient API. The software aims to provide acceptable computational performance for production use, as demonstrated by solid benchmark test results. Lady Deirdre is available for use in open-source projects with a license for non-commercial software development. Contributions are welcome through GitHub pull requests, and commercial software products can be developed based on Lady Deirdre with specific licensing agreements based on revenue limitations. More information, including source code, API documentation, user guide, examples, and licensing details, can be found on the provided GitHub URL.

Related

Trealla Prolog: Compact and efficient Prolog interpreter

Trealla Prolog: Compact and efficient Prolog interpreter

Trealla Prolog is a compact interpreter written in C, compliant with ISO Prolog. It supports unbounded integers, UTF-8 atoms, efficient strings, and runs on Linux, Android, and WebAssembly. It offers C integration, SQLite access, concurrency features, and experimental functionalities. The project is open source under the MIT license.

My experience crafting an interpreter with Rust (2021)

My experience crafting an interpreter with Rust (2021)

Manuel Cerón details creating an interpreter with Rust, transitioning from Clojure. Leveraging Rust's safety features, he faced challenges with closures and classes, optimizing code for performance while balancing safety.

Optimizing the Roc parser/compiler with data-oriented design

Optimizing the Roc parser/compiler with data-oriented design

The blog post explores optimizing a parser/compiler with data-oriented design (DoD), comparing Array of Structs and Struct of Arrays for improved performance through memory efficiency and cache utilization. Restructuring data in the Roc compiler showcases enhanced efficiency and performance gains.

Writing an IR from Scratch and survive to write a post

Writing an IR from Scratch and survive to write a post

Eduardo Blázquez developed an Intermediate Representation (IR) for the Kunai Static Analyzer during his PhD, aiming to enhance Dalvik bytecode analysis. The project, shared on GitHub and published in SoftwareX, transitioned to Shuriken. Blázquez drew inspiration from Triton and LLVM, exploring various IR structures like ASTs and CFGs. MjolnIR, Kunai's IR, utilized a Medium Level IL design with control-flow graphs representing methods. Blázquez's approach involved studying compiler design resources.

Gren 0.4: New Foundations

Gren 0.4: New Foundations

Gren 0.4 updates its functional language with enhanced core packages, a new compiler, revamped FileSystem API, improved functions, and a community shift to Discord. These updates aim to boost usability and community engagement.

Link Icon 9 comments
By @gsuuon - 5 months
This is cool, I think an integrated compiler and LSP is a great standard for new languages. I'd go one further though and say that syntax highlighting should also be part of that language core. This way you have a single source of truth wrt to that language: how it should look, what it means and how it runs.

Tree-sitter is widely supported (both in editors and on web) for syntax highlighting as well as making semantic nodes available for external tools to interact with. Is there any chance you'd add a tree-sitter integration to this project? Or conversely, build out a compatible API that can be used with editors/tools that use tree-sitter's library?

The licensing is a bit confusing - for example, what happens with open-source projects that use this that are then used in commercial projects?

By @armchairhacker - 5 months
First, I really like language frameworks like this. I think it could become very useful and popular.

That being said, I really doubt anyone will buy a commercial license. People don't sell compilers and IDEs, and the ones who do are large corporations who make everything themselves. Look at state of language tooling today: nearly every compiler is open-source, every language server is free, every IDE is free except JetBrains (a well-known company with a large reputation) and Sublime Text (being heavily replaced by VS Code), and anything not open-source has an active open-source alternative. Nobody's going to buy a license from you to sell their compiler, because nobody's planning to sell their compiler.

For this reason I'd recommend changing the license. I don't think it's overly-restrictive or dishonest, I think it's fair to expect being paid if someone makes >$200,000 off your work. But nonetheless it hurts adoption, a lot of people will see "proprietary" and not even read the license text. You're more likely to make money distributing it as MIT / Apache, letting it get popular, and setting up donations/sponsorships to fund development. But honestly, if you're looking to make money this isn't the space to do so: you could be hired by someone to work on PL, or you could sell something like a game, but you're not going to sell your own PL.

By @winter_blue - 5 months
This is awesome. Thank you!
By @solarpunk - 5 months
I like the Alpha Centauri reference here lol.
By @mdaniel - 5 months
The way the headline was written it seemed like this was the second iteration of Lady and not just a 2.0 release announcement

It would have also gone a long way if you had mentioned the licensing, which I am always interested in: https://github.com/Eliah-Lakhin/lady-deirdre#copyright

As for a question: why the seemingly needless location of everything down in a "work" folder? Is there something else that you envision one day living at the top-level which you just planned for by putting everything someone would care about one further click away?

By @weinzierl - 5 months
"replacement for preexisting projects with similar goals, such as Tree-Sitter, Rowan, or Salsa."

To be a true replacement, there is at least one crucial feature missing: A LICENSE file that starts with "The MIT License (MIT)".

Nothing against "source available" but thinking to have a chance to stand in for more permissively licensed projects is very much unrealistic.

By @mtndew4brkfst - 5 months
Thank you to the commenters who highlighted the licensing. I would ordinarily be very interested in this premise but I don't want to risk unconsciously adapting ideas from what I read that could put me in tension with the terms or the author, and I can't use it directly.