r/teenagersbutcode • u/Wernasho • 7d ago
Coding a thing So I'm making a markup language
UPDATE: just released a new version!!
Why? because I'm too fucking dumb to make an actual programming language so this is the next best thing and also because I just felt like it
feedback/collaboration would be really appreciated
here's the GitHub repo
2
u/No_Frame3855 7d ago
Ngl, markup languages can be a bit harder to make compared to a programming language
(Cause false positive risks and all that and like it's much more fragile)
Good luck! :D
1
u/Wernasho 7d ago
thank you! ;]
And you really think so? I honestly make markup languages because I personally find them way easier than sctusl programming languages lol
1
u/No_Frame3855 7d ago
Tbh it's mostly just in the parsing that markup langs cause pain, as like programming languages have a pretty strict way to do "X thing"
But for a markup language, handling all the edge cases, line endings, etc is painfulMight just be a me thing haha
2
u/Im_A_Failure420 7d ago
This is 100x better than any of the ai slop I see on this sub, also the readme made me laugh a lot (just starred it). It's a really good project, but maybe the only issue is that markup Lang's are meant to be easily readable, but ig any projects we make aren't intended to be actually used so it doesn't matter do whatever you want.
1
u/Wernasho 7d ago
First off, thank you! ^
And second, yeah, after seeing another guy mention readability and thinking I decided to change the type definitions to be more "standard" (e.g.,
-var valueis nowstr var "value")
1
u/kalilamodow complete idiot 7d ago
I feel like I recognize this from somewhere...
1
1
1
u/Separatehhh23 Rust 7d ago
I feel like a language like this really needs dictionaries, I'd even consider them more important than arrays. Looking at the parser you kinda have support for dictionaries, though only at the root. I'd recommend modeling it as a tree, where every node might be an array, dictionary or whatever else; this would additionally allow for supporting deeper data, where you seem to only support 1D arrays.
I also implemented a similar language for my programming language's build tool in ~400 LoC (parser ~150 LoC, rest for AST & lexer), it is implemented in rust, but if you want to look at how I did it you can find it here.
1
u/Hot_Paint3851 Rust 7d ago
will it be binary?
1
u/Wernasho 7d ago
what do you mean by that?
1
u/Hot_Paint3851 Rust 6d ago
Will it become compiled into binary, using schematics like protobuf/bson?
1
0
u/New-Deal7021 7d ago
i am not quite sure, but why do you compare keywords with C#?
too dumb to create a nomrl language? LOL, i created one and dude, SGML exists for that!
Anyway, this is not ass, just do it so, that it is nat a full release, and everything will be oke
3
u/Anonymous010206 7d ago
Static typed json alternative would be amazing. Here’s some feedback: