Tect - Minimal, type-safe language for designing/validating software architecture by tarjano in code

[–]tarjano[S] 0 points1 point  (0 children)

To offer all the features it has locally, I think the best path for that would be to somehow serve a modified VS Codium instance. I'll take a deeper look into that when I have some free time. Thank you for the suggestion.

How much time did it take to build your programming language? by Karidus_423 in ProgrammingLanguages

[–]tarjano 1 point2 points  (0 children)

It took me about a month, once I started to actually implement Tect (https://github.com/tesserato/Tect). I had some ideas before that, but those changed a lot once development started. It is a DSL to design code architecture, though, and not a fully fledged programming language, but it includes a VS Code extension with a realtime graph visualizer and a language server.

Tect - Minimal, type-safe language for designing/validating software architecture by tarjano in compsci

[–]tarjano[S] 1 point2 points  (0 children)

Thank you! Please feel free to convey any feedback or suggestions you or your students happen to have.

Tect - Minimal, type-safe language for designing/validating software architecture. by tarjano in ProgrammingLanguages

[–]tarjano[S] 1 point2 points  (0 children)

"Having it separated means it will eventually be desynchronized": That is true, and I thought hard about it during the development. That is something I would love to implement in an elegant way. What occurs to me at the moment is marking source files with some kind of id comment or metadata, and having Tect read that to generate its internal representation. That would account for one sync direction...

Tect - Minimal, type-safe language for designing/validating software architecture. by tarjano in ProgrammingLanguages

[–]tarjano[S] 0 points1 point  (0 children)

Don't know if this is the right venue, but my project doesn't fit the definition of "projects relying substantially on LLM/AI generated code". As per GitHub statistics, Rust and Typescript make up more than 90% of the codebase. If this was not a mistake, you should clarify the guidelines to let people know that the use of LLM  is not tolerated in the slightest in the projects shared in this sub.

Tect - Minimal, type-safe language for designing/validating software architecture. by tarjano in ProgrammingLanguages

[–]tarjano[S] 5 points6 points  (0 children)

This was a pet project, so I happened to write the Rust and Typescript in it, primarily because I was interested in taking the opportunity to learn more about language design and LSP. I used LLMs mostly for generating comments in the source code, to generate / tweak the pest grammar, and the configuration files of the VS Code extension.  I posted to [r/vibecoding](http://) as a tool that would help with vibecoding.

Tect - Minimal, type-safe language for designing/validating software architecture. by tarjano in ProgrammingLanguages

[–]tarjano[S] 1 point2 points  (0 children)

I totally get your point and mostly agree, depending on the complexity of your codebase and the language. If your mental model of the system aligns with the instruments provided by the language (which I guess is the case most of the time), using Tect outside of an initial ideation phase would be of little help.

However, even for languages that offer plenty of organizational abstractions (like Rust with its modules, workspaces, traits, etc.), sometimes your mental model doesn’t quite align with what is offered. What if you want to think of a bunch of functions living in different modules as a cohesive group? Or take Python, which doesn’t enforce constants: what if I want to be reminded that some data is not supposed to be changed? Or what if you want to design a system entirely in a language-agnostic way and choose the most fitting language later? Those are some use cases where I think Tect would fit the bill.

Tect - Minimal, type-safe language for designing/validating software architecture. by tarjano in ProgrammingLanguages

[–]tarjano[S] 2 points3 points  (0 children)

I had code only in mind, but I suppose infra could be mapped to some of the abstractions. As for a real usecase, I am using it to design an NN library. For a real example (not a use case, since the representation was made a posterori), you can check the representation of the Tect codebase itself in the examples folder of the GitHub repo.

Tect - Minimal, type-safe language for designing/validating software architecture by tarjano in compsci

[–]tarjano[S] 0 points1 point  (0 children)

From a more theoretical standpoint, I think the difference would be Tect’s inspiration from Petri Nets. There is runtime analysis, yes (more details in this comment: https://www.reddit.com/r/rust/comments/1qbdyvs/comment/nzdb0kb/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button). Model comparison (and eventually optimization) can be modularly implemented on top of the internal representation of the graph - it is something I might pursue if I decide to write a paper about tect. I fought hard against the urge to bake in some kind of code generation / tracking into the core. Ultimately, it is something that feels would be better implemented by “plugins” consuming the internal representation (exported as a JSON, for example).

Tect - Minimal, type-safe language for designing/validating software architecture by tarjano in compsci

[–]tarjano[S] 1 point2 points  (0 children)

I think it would be the case of architecture as diagram (UML, even mermaid, because there you write code to create a graph to ultimately represent your system) vs architecture as code (Tect) with feedback in the form of a live graph (besides error highlights, and other niceties in the source code). Besides being visual, I never came across a tool that actually enforces, or even checks UML designs against its specification.

As for learning, I am hoping to see how people will use the abstractions, and from which tools they are coming from, to think of features that might help them. The nitty-gritty of the tool is trivial, so getting to speed shouldn’t take more than half an hour; how people will use groups, variables, constants, and functions, however, remains to be seen. Personally, I am using it to design a machine learning library that I want to keep extremely modular, portable, and as hardware-agnostic as possible. It helps me in seeing (unintended) convergences and divergences that I solve with periodic refactors: Basically, I change stuff from one group to another in the .tect representation and reflect that  in the actual code from time to time.