Earlier quoted context omitted.
That's cool, but I might prefer semantic whitespace. Sure would be neat if we could both work with the same code in our preferred forms.
Like this? https://en.wikipedia.org/wiki/Whitespace_(programming_langua...
The Om Programming Language
101–110 of 119 posts
Re: The Om Programming Language
#102Earlier quoted context omitted.
A few days ago I asked Claude what kind of language it would like to program in, and it said something like Forth but with static typing, contracts, and constraint solving, implemented on the Erlang BEAM. So I have been prodding Claude Code for a few sessions to actually do it. It's a silly experiment, but fun to watch. Right now it's implementing a JSON parser in the generated language as a kind of milestone example…
[dead]
With the large difference that painters actually paint and use the brush, they don't just algorithmically regurgitate paintings they've been shown.
Re: The Om Programming Language
#103Earlier quoted context omitted.
So instead of using programming languages designed specifically to effectively express algorithms and data structures, we are going to use natural language like English that is clearly not expressive enough for this? It’s like rewriting a paper about sheaf cohomology in plain English without any mathematical notation and expecting it to be accessible to everyone.
:) Not exactly. We'll use English to get a kinda description, then test and debug to make that functional, then cycling the functionality with users to nail down what is actually needed. Which won't be written down anywhere. Like before. Except with autocomplete that tries to predict a page or two of code at a time. Often pretty accurately.
English is fine, but I am personally a lot faster in my mind and fingers and IDE with a language suited for this stuff. AI guys just want to be teachers deep down I think :).
Re: The Om Programming Language
#104Earlier quoted context omitted.
Can Raku do something like this? I was lightly exploring it recently, and I thought I saw that something like this may be possible with it.
I'm not super familiar with Raku, but if RakuAST is what you had in mind it looks a bit different: use experimental :rakuast; my $ast = RakuAST::Call::Name.new( name => RakuAST::Name.from-identifier("say"), args => RakuAST::ArgList.new( RakuAST::StrLiteral.new("Hello world") ) ); Looks more like "low-level programming an AST" (which I believe other languages offer as well), rather than using a bidirectional transform…
$ raku -e 'say Q|say "Hello World!"|.AST'
RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::Call::Name::WithoutParentheses.new(
name => RakuAST::Name.from-identifier("say"),
args => RakuAST::ArgList.new(
RakuAST::QuotedString.new(
segments => (
RakuAST::StrLiteral.new("Hello World!"),
)
)
)
)
)
)Re: The Om Programming Language
#105[flagged]
I am always kind of surprised when I go to a landing page for a language and there isn't any actual code. This is one of my biggest complaints about the rust language page, it feels crazy to me that there's no code and I think this is just a ridiculous choice (and I know this has been brought up before). 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…
Re: The Om Programming Language
#106Earlier quoted context omitted.
There is code. Small examples start halfway down the page, and there's one 20-line example. Not much, but it's not accurate to say there's none. It would be helpful to see any kind of motivation for the project though. Anything at all.
On my phone that code is about 250+ lines down, probably 4-5 screens down. It basically doesn't exist as far as marketing is concerned.
Re: The Om Programming Language
#107Earlier quoted context omitted.
This is a Very Bad Idea. Two people working with the same language will be unable to reason about each other's code, because it requires understanding their bespoke syntax and its nuances.
No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide. Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed…
Re: The Om Programming Language
#108Earlier quoted context omitted.
This is a Very Bad Idea. Two people working with the same language will be unable to reason about each other's code, because it requires understanding their bespoke syntax and its nuances.
No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide. Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed…
Re: The Om Programming Language
#109Earlier quoted context omitted.
There is code, search for 'examples'. It concludes by implementing a fold: define { [Fold]
great example! as someone who writes a Fold function every day, this explains the power of the language very well. ;)
could be there's nothing wrong with the page and you're really just not the audience for it. hacker news has many currents, most of which don't interest me, and that's fine, i don't feel the need to weigh in on everything.
Re: The Om Programming Language
#110Earlier quoted context omitted.
No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide. Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed…
Those are both formatting examples though? You're suggesting totally different syntaxes , which means you can't even point to the same line in a codebase when talking about a PR. This throws up massive hurdles around communication when you could just agree on one standard and move on.
class Bean {
private boolean sprouted;
public void sprout() {
this.sprouted = true;
// ...
}
}
or data Bean = Dormant | Sprouted
sprout :: Bean -> Bean
sprout Dormant = Sprouted
sprout Sprouted = -- aw, beans, we could have modeled
-- this state as impossible to construct,
-- but you chose runtime checks, so
-- here we are.
As for pointing to the source line, I think JavaScript people solved that one for us with source maps. Just because we download and execute a single 4Mb line of minified code, doesn't mean we can't tell which line of the original source caused the error. :)