Live data from Hacker News

The Titania Programming Language

github.com

31–40 of 68 posts

Re: The Titania Programming Language

#31

This repo isn't even 24 hours old yet and it's on HackerNews... Just wow....

Is the language/project somehow related to Odin or its ecosystem, or is it completely independent? If the latter, I wonder how you can manage another programming language alongside Odin — anyway, thank you and great respect for both!

Completely independent of Odin (except being written in Odin). It's a plan to be a teaching tool to learn compiler development, that's it.

Re: The Titania Programming Language

#32
post #23

Remarkable that Bill is interested in a version of Oberon-07. It's even more minimalistic than the previous Oberon versions. I spent a lot of time with the original Oberon language versions and experimented with extensions to make the language more useful for system programming (e.g. https://oberon-lang.github.io/ and https://github.com/rochus-keller/oberon/ ). Eventually I had to give up backward compatibility to ge…

Please note the project isn't even 24 hours old yet. But I am using Oberon-07 as base, and I might deviate from it quite soon too. But I won't be going in the direction of things like Oberon+ (which adds generic and OOP programming) or Micron which adds the entire type system necessary to interact with foreign code. I just wanted something to explain to people how to do tokenizing, parsing, semantic checking (not jus…

Supporting lowercase keywords and making (at least some) semicolons optional already makes Oberon much more attractive ;-)

Re: The Titania Programming Language

#33
post #32

Earlier quoted context omitted.

Please note the project isn't even 24 hours old yet. But I am using Oberon-07 as base, and I might deviate from it quite soon too. But I won't be going in the direction of things like Oberon+ (which adds generic and OOP programming) or Micron which adds the entire type system necessary to interact with foreign code. I just wanted something to explain to people how to do tokenizing, parsing, semantic checking (not jus…

Supporting lowercase keywords and making (at least some) semicolons optional already makes Oberon much more attractive ;-)

And removing unnecessary keywords and modernizing it too. `[N]T` for arrays and `^T` for pointers, rather than `array N of T` and `pointer of T`. And supporting C++ style code `/*/` and `//`.

And as I develop this, I'll tweak it more so that people can actually understand without having to know the full histories of Pascals or Oberons or whatever.

Re: The Titania Programming Language

#34
post #14

Earlier quoted context omitted.

Is your idea that that would always work? Like: s := "Hello world".; -- equivalent to "Hello world\n" Or only in `print`? If only in `print`, then you've suddenly made a context-sensitive grammar. And if the former, just use "Hello world\n" instead, since the tokenizer already supports that.

I think the point is to add the correct end of line depending on OS.

The correct end of line is always '\n'. Even Windows' Notepad supports it nowadays. I will gladly die on this hill. :P

Re: The Titania Programming Language

#35
post #32

Earlier quoted context omitted.

Supporting lowercase keywords and making (at least some) semicolons optional already makes Oberon much more attractive ;-)

And removing unnecessary keywords and modernizing it too. `[N]T` for arrays and `^T` for pointers, rather than `array N of T` and `pointer of T`. And supporting C++ style code `/*/` and `//`. And as I develop this, I'll tweak it more so that people can actually understand without having to know the full histories of Pascals or Oberons or whatever.

I have also implemented these and other simplifications in my languages, and I don't think it makes them any less readable. Looking forward to seeing your final design.

Re: The Titania Programming Language

#36
post #17

> teach compiler development with Not trying to be confrontational, genuinely curious.. but why is this an area where you'd want a DSL? My initial reaction is : When I'm learning a topic, the last thing I want to be worrying about is learning the ergonomics of a new language I'm guessing there's a good rational I'm missing it'd be nice to see some piece of compiler related code in this language that'd be ugly in a ge…

He's the author of Odin, so he has experience writing compilers, so he also wrote a toy compiler in his language as a fun weekend project I guess. Of course it's only a good learning resource for people familiar with Odin. I don't know much about Odin, but from glancing at the code it looks like there are some memory management related features that he's using, which would look uglier in other languages.

Re: The Titania Programming Language

#39
post #28
post #10

Having done a fair degree of programming in Wirthwhile languages, I think the only main design decision that I think was a mistake was the variables at the top. I'm not sure of the value of seeing all of the variables used listed in one place, it has certainly led to me encountering a identifier scrolling up to determine the type then scrolling back down. When the variable is only used on a few consecutive lines it's…

Wirth was obsessed with the idea of creating the absolutely minimal useful language, and many of his languages' warts come from that. Variables are at the top because: - you immediately see them (so, perhaps, easier to reason about a function? I dunno) - the compiler is significantly simplified (all of Wirths' languages compile superfast and, if I'm not mistaken, all are single-pass compilers) However, I feel that Wi…

This has nothing to do with "dogma" and something simpler. It has nothing to do with "immediately see them".

Hint: This about this from a single pass compiler basis and how much memory needs to be reserved from the procedure's stack frame.

Post reply on HN