The $LANG Programming Language

178 points | by dang 9 hours ago ago

35 comments

  • chuckadams 7 hours ago

    For a moment I thought there was actually a new language called $LANG, which would have been wonderful.

    • Radle an hour ago

      Same! My first thoughts: "Is this language pronounced Lang or Slang? Slang is actually a cool name for a new programming language..."

    • trollbridge 7 hours ago

      I was thinking how it would be odd to have a programming language called en_AU.UTF-8.

    • Lammy 5 hours ago

      There's a language called SLang inside Goldman Sachs used for their SecuritiesDB, and that's how I read it at first glance even with the dollar sign lol https://en.wikipedia.org/wiki/Michael_Dubno#SecDB

      • snthpy an hour ago

        That's what I thought too. The $ sign seemed quite appropriate given Goldman's line of business.

      • wahern 2 hours ago

        See also https://en.wikipedia.org/wiki/S-Lang (https://www.jedsoft.org/slang/index.html), a (stack-based) scripting language implementing a terminal UI toolkit. Mutt can use use S-Lang instead of ncurses.

      • dang 5 hours ago

        I wonder what a program written in that language looks like.

        • rayxi271828 4 hours ago

          Slang? The IDE looked like Turbo C++ of old (blue, text based interface). Shortcuts are weird, so you need to remap keys to get sane defaults.

          Probably the most unique feature is that the language supports spaces in identifiers. So you'd have variables like "Option Portfolio Risk" or functions like "Calculate Estimated PnL". Visually obviously different from Python, but it gave me Pythonic vibes.

          It's also nice that it supports preconditions, so you can specify the valid range of arguments etc. It has some kind of OOP support but tbh it felt bolted on (understandably).

          But the most value adding, IMHO, is the DevEx and deep integration with SecDb. Say what you want about the DOS-like IDE and the old (20+ years old for sure, maybe 30+) language, but you can deploy your code SO easily into production, with guardrails in place.

          Out of curiosity, I implemented a toy language (thanks to Robert Nystrom's Crafting Interpreters) that supports spaces in identifiers (https://github.com/rayfdj/gaul-lang) as well. Makes for an interesting weekend coding project, and it helps me understand more the tradeoffs that Slang designers must have gone through.

    • fermigier 3 hours ago

      There was a Linux distribution (briefly) called "$DISTRO". Known today as "Ubuntu".

    • null_onset 5 hours ago

      The $LANG programming language, where the keywords are all just in-jokes that change from week to week.

    • cvoss 5 hours ago

      Likewise. Thought it'd be pronounced "slang", and thought the semantics would be you define LANG=<name of a language> at the top of the file (like a hashbang) and then write in whatever language you please. $LANG is a neato language because it has all the coolest features rolled into one unified design: polymorphic lifetime borrowing, endofunctor monoid monads, (stacked) coroutines, and even quantum data types.

  • gdotdesign 29 minutes ago

    Thanks for putting these lists together. When Mint reaches 1.0 I'll use the same format to present it here.

  • Animats 2 hours ago

    See "The Your Name Here Story" (1960) [1] It's a generic industrial film.

    [1] https://archive.org/details/YourName1960

  • johnfn 7 hours ago

    This is a fun false positive :) https://news.ycombinator.com/item?id=34675259

    • dang 7 hours ago

      Whoops! I tried to catch those but yes.

  • dang 8 hours ago

    Yikes, I tanked HN's performance by posting this! Probably because of loading all those old threads over and over.

    I've moved the URL out of the link at the top, which seems to be helping for now.

    (now I have to decide whether to go down another rabbit hole and fix that)

  • fsckboy 4 hours ago

    the headline made me think somebody else came up with my idea. I wanted to a create a language whose name was langlang. to understand how to parse it, that would be the equivalent as a name to C, and the equivalent to clang would be langlanglang.

    I considered the shorter name lang, but lang already has a meaning and I thought then in that world langlang might confuse people as to the actual name of the language, whereas since langlanglanglang is clearly needless overkill in a name, langlang and langlanglang would provide just the right amount readability and reinforcement as to the actual name of langlang.

  • zahlman 6 hours ago

    That reminds me, I really should blog my design ideas for my spiritual successor to Python....

  • macintux 7 hours ago

    I feel like there’s an Advent of Code challenge lurking here.

  • GaryBluto 9 hours ago

    Very useful! Thanks for the addition.

  • big-chungus4 2 hours ago

    where can I check out the language?

  • wizzwizz4 9 hours ago

    So these are just static pages, not new entries for https://news.ycombinator.com/lists?

    • dang 8 hours ago

      Alas, yes, at least for now. Seems like an LLM could be good at finding them though. A regex is probably too crude.

      • wizzwizz4 8 hours ago

        The old lesson from the Wizard of Oz experiment says that a regular expression probably isn't too crude, if you're willing to take the time to design it. Though you could probably get away with running a regex golf algorithm (e.g. https://nbviewer.org/url/norvig.com/ipython/xkcd1313.ipynb) over the list of matching titles, and the union of some list of non-matching-but-close titles (chosen to get good discrimination) with some list of way-off titles (to avoid overfitting). (You could treat the whole HN title database, other than the ones you've identified, as losers, but that risks hardcoding the absence of a post you accidentally missed, and would also take slightly longer – though Peter Norvig's first algorithm takes time linear in the number of losers, so it might not be too expensive. I don't know how expensive his improved versions are, given large lists of losers: https://nbviewer.org/url/norvig.com/ipython/xkcd1313-part2.i.... Better algorithms are surely available.)

  • MopAmine 3 hours ago

    idk

  • jeswin 7 hours ago

    I did a Show HN for a language called Tsonic yesterday, which is a variant of TypeScript (all tsonic is valid typescript) requiring stronger typing which compiles to x64/ARM native code via .Net/NativeAOT. https://news.ycombinator.com/item?id=46604308

    It didn't appear in Show HN at all. Perhaps because another user posted it as a regular topic just a few minutes earlier, which drops off very quickly (within minutes) - but I think the issue is wider.

    For a while now, I've felt that the new topics stream requires you to promote the topic outside of HN to be seen on HN - sometimes by adding a "Discuss on HN" link in the blog, or on social networks etc. The problem is quite fundamental: the "Show" link gets a small fraction of clicks. The "Show New" (two clicks away) probably gets tinier, miniscule fraction of clicks. The intersection of people who are interested in the project and those who have clicked "Show New" would be very nearly null. So upvotes will have to come from outside.

    • dang 6 hours ago

      That's great! It didn't make the /show page because some of the upvotes were dropped by our software. We can re-up it, but first can you add some text to the post, explaining the background and what's different about it? If you look at what I told the Lax guys earlier (https://news.ycombinator.com/item?id=46608577), that might give some ideas.

      Also, if you're ok with changing the title to "Show HN: The Tsonic Programming Language" then I could add it to https://news.ycombinator.com/showlang :)

      • jeswin 4 hours ago

        Hi dang, done. Thank you!

        Your feedback on the other thread was very helpful - just the right thing to add, irrespective of HN visibility.