6 ms·
The Om Programming Language
- maximgeorge 9mo ago[dead]
- irickt 9mo agoA more explanatory article mentioned in the post: https://evincarofautumn.blogspot.com/2012/02/why-concatenative-programming-matters.html https://evincarofautumn.blogspot.com/2012/02/why-concatenati...
- mosburger 9mo agoah, thanks, that's why my first thought was that "hey, this feels very FORTH like"
- esafak 9mo ago[flagged]
- meisel 9mo agoYeah show me the 5-line HTTP server
- KPGv2 9mo ago"The Om language is not: 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."
- theamk 9mo agonot that kind of language, it does not even come with integer types or "plus" operator by default.. they do give an example of 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")
- staticassertion 9mo agoI 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 if you scroll down https://go.dev/ https://go.dev/
- chriswarbo 9mo ago> I am always kind of surprised when I go to a landing page for a language and there isn't any actual code. So, you're not surprised that this Om page has an extensive section called "Examples", right? https://www.om-language.com/#language__examples__ https://www.om-language.com/#language__examples__
- deleted 9mo ago[deleted]
- staticassertion 9mo agoI didn't scroll that far, and I shouldn't have to.
- cess11 9mo agoThere is code, search for 'examples'. 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} }
- dstanko 9mo agogreat example! as someone who writes a Fold function every day, this explains the power of the language very well. ;)
- codegeek 9mo agoI would at least update body tag to add basic css to make this more readable: <body style="width:80%;margin:auto;">
- leephillips 9mo agoThere is nothing wrong with the site as it is. The text reflows, so you can size your window to any width that you find comfortable. With a decent window manager this is just a few keystrokes at most.
- oblio 9mo agoA huge chunk of people don't have, want or care about a "decent window manager" (and many of them are competent developers) and they'll just bail.
- crystal_revenge 9mo agoIt's clearly a language designed for people interested in programming languages. Plenty of straightforward examples to show what makes this language interesting/different/worth your time. 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.
- itishappy 9mo agoI don't think the project wants any "takers" per se. The first sentence describes it as: > 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.
- mpalmer 9mo agoLife can be a dream if you don't treat everything as a pitch
- amelius 9mo agoAt least it has examples!
- travisjungroth 9mo agoSeems totally appropriate to the project. It’s like going to a GitHub repo and scrolling to the Readme.
- whalesalad 9mo agoIt perplexes me that someone would not have a few cookbook style examples above the fold on a website that describes a novel programming language.
- dang 9mo agoCan you please not post shallow dismissals of other people's work? This is in the site guidelines: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html. They also ask you not to be snarky. 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.)
- deleted 9mo ago[deleted]
- bittermandel 9mo agoI confused this with https://github.com/omcljs/om https://github.com/omcljs/om
- jb1991 9mo agoYeah Om was an extremely widely used Clojurescript library many years ago (maybe still is), and to me that's what this word will always refer to.
- quesera 9mo agoI think Hinduism might have a prior claim.
- fuzztester 9mo agohttps://news.ycombinator.com/item?id=47161422 https://news.ycombinator.com/item?id=47161422
- jwilber 9mo agoWill never not complain about languages not giving code examples. It’s like writing a charting/UI/style library and showing no examples. Just what?
- robotresearcher 9mo agoYou overlooked the examples. They might not satisfy you, but there are examples.
- dented42 9mo agoTo be fair, the examples are extremely easy to overlook. They are also, to put it delicately, not the most helpful.
- dstanko 9mo agoapparently fold example is very helpful to some.
- robotresearcher 9mo agoAbsolutely agree. But fairness precludes denying the existence of examples. They are not prominent, but they are in a section with the heading 'Examples'.
- klibertp 9mo agoThe examples are fine for an early-stage poc project like this one. `minutes` with evaluation trace and `[Fold]<-` are illustrative, and if you work them out with pen and paper, you can get a good grasp on the main ideas of the language. That you have to search for them on a page that looks like a slightly-formatted README instead of having a nice scrollable with syntax-highlighted snippets at the top is because this IS a slightly-formatted README - and that's also completely fine at this stage. What's important is that there are a few interesting concepts there and that it was published. Even if this one fizzles, as 99.999% of languages do, that doesn't matter if some other language down the line gets inspired by those concepts.
- 9mo ago
- willquack 9mo agoI worked with Jason (creator of Om) at my last job. He's awesome!
- agumonkey 9mo agois it his first language design ?
- omoikane 9mo ago> any UTF-8 text (without byte-order marker) defines a valid Om program. What is the behavior of a program with unmatched braces? I am not sure a stray `}` would fit any of the defined syntax. https://www.om-language.com/index.html#language__syntax__ https://www.om-language.com/index.html#language__syntax__
- itishappy 9mo agoThat would be parsed as a single operator and evaluated using the following rule: > 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.
- pgt 9mo agoWould recommend placing example language syntax above the fold. Was tough to have to scroll halfway down the entire site to see any syntax. Nobody cares about the EBNF syntax until they have a feel for the language.
- dmit 9mo agoAlt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax. I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499 https://github.com/unisonweb/unison/issues/499
- geocar 9mo agoI completely agree: If it is ugly-as-sin-but-useful I will learn it. The aesthetic of mathematics as it appears in journals is I think questionable, but undeniably convenient for communication, so it is every language making the case that you (dear reader) can say something very complicated and useful in the ideal amount of space. "Hello world" isn't that: That's the one program everyone should be able to write correctly, 100% of the time. That's how we can talk about brainfuck as exercise, but APL is serious. Or put another way, even if seeing a new kind of "hello world" excites dear reader, it's probably not going to excite me, unless it's objectively disgusting. What Om does here is exactly right for me: It tells me what it is, and makes it easy for me to drill down to each of those things to figure out what the author means by that, and decide if I am convinced. I mean, that's the point right? I'm here trying to learn something new and that requires I allow myself to be convinced, and since "hello world" is table-stakes, seeing it can only slow my ability to be convinced.
- pjmlp 9mo agoI have an idea, maybe we could represent that AST as parenthesis.
- ocimbote 9mo ago
- dirk94018 9mo agoAren't LLMs supposed to write machine code directly, no more programming languages at all, any day now? Joking aside, programming languages are a good mental exercise. Forth was my first language after assembly. Didn't like the stack juggling and ended up using its macro assembler more and more, it became something else, conventions over code I suppose, like what to keep in registers. Forth (and Unix) got the composability requirement right, the testing of individual units.
- fud101 9mo agoI'm still waiting to see the first show HN I made a language designed for LLMs to write programs better.
- mickael-kerjean 9mo agoIt came up a few weeks ago already, can't find the link
- fourthark 9mo agoThere have been a few.
- fcatalan 9mo agoA 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.
- alexisread 9mo agoIf you don't mind, could you drop some code? I'd be interested to see the result :)
- fcatalan 9mo ago
- sriku 9mo agoAnother concatenative-ish one embedded in js .. just for fun - https://github.com/srikumarks/pjs https://github.com/srikumarks/pjs You may find the "genailang" module fun to play with.
- shevy-java 9mo agoMissing a 'g'! Omg would have a ring to it.
- fuzztester 9mo agoLet's have more programming language posts (even about "retro" ones like Icon, SNOBOL, Bliss, MUMPS, etc.), guys. And less about AI topics. Om. https://emojipedia.org/om https://emojipedia.org/om https://en.wikipedia.org/wiki/Om https://en.wikipedia.org/wiki/Om
- vivzkestrel 9mo agoif everyone on HN started downvoting all the AI posts (atleast the slop ones) it would cut down submissions by half
- verdverm 9mo agoI think it's going to take some time for the reality of ns;nt and the disappointments to sink in. They need to learn that one cannot "claw" their way to a money machine.
- rramadass 9mo agoAnd therein lies the tragedy of folks exploiting well known culturally loaded symbols/concepts for attention/etc. on the Internet. For example, I really don't know what to make of this similarly named language; enthusiastic kid or attention-seeking influencer? - https://omlang.com/ https://omlang.com/
- fuzztester 9mo agopeople exploit anything for attention/etc. on the Internet.
- Nevermark 9mo agoI like how it unifies the operation stream with the stack (by pushing outputs back into the operation stream to process next). An even simpler model than Forth, which evaluates an operation stream, with words that operate on a stack. And as noted, this makes recursion trivial.
- lhmiles 9mo agoOutstanding work
- rramadass 9mo agoWhat is the meaning and reason behind the choice of this specific name for the language?
- hahamaster 9mo agoThe only two letter combination that is not already used by another language.
- nivertech 9mo agoOm = Forth + Tcl ? We've already seen Forth + Lisp What's next? Lisp + Tcl ? Or maybe: Lisp + Forth + Tcl ? ;)
- linguistics__ 9mo agoForth + APL: Uiua
- nivertech 9mo agoThere are also APL + Lisp variants, like April, or even q from kdb+/q (kinda like Lisp but without parens). --- The APL programming language (a subset thereof) compiling to Common Lisp. https://github.com/phantomics/april https://github.com/phantomics/april APL and LISP—should they be combined, and if so how? https://dl.acm.org/doi/10.1145/800136.804474 https://dl.acm.org/doi/10.1145/800136.804474
- muvlon 9mo agoI get the feeling there is something interesting here, but the website seems myopically focused on syntax. It doesn't really tell me what this language is good at or how you'd expect people to use it.
- someoneinsane 9mo agoThis language is going to be a SuperHitPopular in India !!!
- voidUpdate 9mo agoHas the CSS failed to load for me, or are the syntax diagrams meant to be that wide and blurry?
- killerstorm 9mo agoThey are, works better on mobile but I don't like these diagrams, I think EBNF is more readable.