\

The Om Programming Language

202 points - today at 5:48 PM

Source
  • pgt

    today at 7:54 PM

    Would 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.

    • irickt

      today at 6:51 PM

      A more explanatory article mentioned in the post: https://evincarofautumn.blogspot.com/2012/02/why-concatenati...

        • mosburger

          today at 7:42 PM

          ah, thanks, that's why my first thought was that "hey, this feels very FORTH like"

      • willquack

        today at 7:23 PM

        I worked with Jason (creator of Om) at my last job. He's awesome!

        • omoikane

          today at 7:35 PM

          > 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__

            • itishappy

              today at 7:40 PM

              That 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.

          • bittermandel

            today at 7:11 PM

            I confused this with https://github.com/omcljs/om

              • jb1991

                today at 7:29 PM

                Yeah 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.

            • maximgeorge

              today at 9:40 PM

              [dead]

              • esafak

                today at 7:03 PM

                [flagged]

                  • dang

                    today at 9:22 PM

                    Can you please not post shallow dismissals of other people's work? This is in the site guidelines: 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.)

                    • crystal_revenge

                      today at 7:41 PM

                      It'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.

                        • einpoklum

                          today at 8:25 PM

                          > In an era when so much "practical" coding can be offloaded to an LLM

                          I see what you did there with the parentheses.

                      • itishappy

                        today at 7:41 PM

                        I 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.

                        • travisjungroth

                          today at 8:42 PM

                          Seems totally appropriate to the project. It’s like going to a GitHub repo and scrolling to the Readme.

                          • mpalmer

                            today at 7:44 PM

                            Life can be a dream if you don't treat everything as a pitch

                            • codegeek

                              today at 7:38 PM

                              I would at least update body tag to add basic css to make this more readable:

                                  <body style="width:80%;margin:auto;">

                                • leephillips

                                  today at 7:58 PM

                                  There 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.

                              • meisel

                                today at 7:07 PM

                                Yeah show me the 5-line HTTP server

                                  • theamk

                                    today at 7:27 PM

                                    not 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")

                                    • KPGv2

                                      today at 7:16 PM

                                      "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."

                                  • amelius

                                    today at 8:31 PM

                                    At least it has examples!

                                    • staticassertion

                                      today at 7:09 PM

                                      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 if you scroll down https://go.dev/

                                        • chriswarbo

                                          today at 7:14 PM

                                          > 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__

                                            • staticassertion

                                              today at 10:17 PM

                                              I didn't scroll that far, and I shouldn't have to.

                                              • today at 7:23 PM

                                            • Anaminus

                                              today at 7:39 PM

                                              One time, this annoyed me so much that I made a website.

                                              https://anaminus.github.io/langding/

                                              om would fall under "Yes, must scroll".

                                              • robotresearcher

                                                today at 7:20 PM

                                                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.

                                                  • oblio

                                                    today at 7:55 PM

                                                    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.

                                                      • johnisgood

                                                        today at 10:02 PM

                                                        So it just needs a TOC.

                                                • cess11

                                                  today at 7:16 PM

                                                  There 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

                                                      today at 9:06 PM

                                                      great example! as someone who writes a Fold function every day, this explains the power of the language very well. ;)

                                                        • cess11

                                                          today at 9:43 PM

                                                          As is clearly explained on the web page, this is not a programming language for everyday tasks, it's an early stage proof of concept that can be used to explore how computer science might be expressed in unusual ways.

                                                          Implementing fold would be something of a milestone in such a language.

                                              • whalesalad

                                                today at 9:14 PM

                                                It perplexes me that someone would not have a few cookbook style examples above the fold on a website that describes a novel programming language.

                                            • jwilber

                                              today at 7:18 PM

                                              Will 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

                                                  today at 7:22 PM

                                                  You overlooked the examples. They might not satisfy you, but there are examples.

                                                  • keeganpoppen

                                                    today at 8:01 PM

                                                    if it's something you do 100% of the time, is it really adding any information to the world?

                                                    • today at 8:28 PM