What is the behavior of a program with unmatched braces? I am not sure a stray `}` would fit any of the defined syntax.
> Evaluates to the operation defined for the operator in the environment. If none, evaluates to a constant function that pushes the operator, followed by all input terms, onto the output program.
I believe it would simply output itself.
Nasty swipes like this routinely get upvoted, and then we end up with them at the top of a thread, choking out everything HN is supposed to be for. (I've downweighted it now.)
But if you're incurious about things that aren't immediately practical (which has sadly been a growing number of HN community in more recent years), you will probably not be interested.
In an era when so much "practical" coding can be offloaded to an LLM, I'm particularly interested in seeing languages that are doing something different even if it makes them initially impractical.
> a novel, maximally-simple concatenative, homoiconic programming and algorithm notation language
This is a toy language designed to showcase a novel programming paradigm.
Personally, I like tech demonstrations, so I scrolled down and found the examples section. That's all I was hoping to get out of this interaction.
<body style="width:80%;margin:auto;"> define { minutes { dequote choose {minutes} {} = {:} <-[characters] } } { minutes {1:23} }
which does Python's equivalent of "1:23".split(":", 1)[1]
or for a more direct translation: def minutes(x):
return x[1:] if x[0] == ':' else minutes(x[1:])
minutes("1:23")complete. Although the intent is to develop it into a full-featured language, the software is currently at a very early "proof of concept" stage, requiring the addition of many operations (such as basic number and file operations) and optimizations before it can be considered useful for any real-world purpose. It has been made available in order to demonstrate the underlying concepts and welcome others to get involved in early development."
The old page had a built-in sandbox. Go used to have a more "Front and center" sandbox too but at least it's there if you scroll down https://go.dev/
So, you're not surprised that this Om page has an extensive section called "Examples", right? https://www.om-language.com/#language__examples__
https://anaminus.github.io/langding/
om would fall under "Yes, must scroll".
It would be helpful to see any kind of motivation for the project though. Anything at all.
It basically doesn't exist as far as marketing is concerned.
It concludes by implementing a fold:
define
{
[Fold]<- {
rearrange
{
rearrange
{
dequote
choose
quote Result
pair pair pair {[Fold]<-} Function Result Remainder
Remainder
}
{Result Remainder}
dequote Function Base <-[terms] Source
}
{Function Base Source}
}
}
{
[Fold]<- {[literal]<-} {} {1 2 3}
}Implementing fold would be something of a milestone in such a language.