Settings

Theme

Perun2 Programming Language

perun2.org

97 points by mlv- 2 years ago · 45 comments · 1 min read

Reader

I'm not the author but found this project interesting:

https://www.youtube.com/watch?v=ilZZHrL4Nd4

JohnDeHope 2 years ago

I think the syntax and numerous keywords are interesting. They have keywords for every weekday, month, unit of time (singular and plural), etc. Most programming languages are proud of how few keywords they have. This means every last damn little thing you want to say has to be said with an enum, static, constant, etc.

  • bradrn 2 years ago

    That sounds quite similar in spirit to Rebol and descendants, which also have built-in datatypes and dedicated syntax for a wide range of things [http://www.rebol.com/r3/docs/datatypes.html].

    • avgcorrection 2 years ago

      I thought the secret sauce for Rebol was that the syntax is so flexible that you can express things like email addresses etc. as seeming “literals”. I.e. you don’t have to wrap everything in strings (and enums and).

      • bradrn 2 years ago

        Yes, that’s the approach it takes — having an unusually large range of literal syntax. That’s different to what Perun2 seems to do, but it’s still ‘similar in spirit’ like I said.

      • nerdponx 2 years ago

        I thought the trick with Rebol is that it's "stringly-typed" like Tcl, so you can invent whatever syntax you want because it's all just strings anyway.

        • bradrn 2 years ago

          No, Rebol is not stringly-typed at all. Quite the opposite — like I said, it relies on having a large range of built-in datatypes.

          • nerdponx 2 years ago

            Thanks for clarifying. Any tips for getting started with it myself? It seems very different from other languages.

    • elbear 2 years ago

      I had forgotten about this language. I think the Red language is a descendant.

  • jug 2 years ago

    Brings my thoughts to Visual Basic myself. That's one keyword ridden language! It's funny... The initial learning curve may be smooth in that language "because English" but then you have to remember how all the statements need to be written in exchange.

  • fuzztester 2 years ago

    iirc F# has units of measure too.

tgv 2 years ago

That might have come in handy a few weeks ago when I found out that you can't copy long file names to an Android device (from Windows). I had to write a Python script to cut the names short and remove certain characters (can't tell precisely which, but I think "Leoš Janáček" caused a problem).

It won't be suitable for everything, but it does look practical.

PS under Windows 11, the commands are hidden under the "second level" pop-up.

smusamashah 2 years ago

As a windows user this looks very very useful for a lots of once in a while things for me.

First use case I can think of is renaming things which it can do https://perun2.org/docs/corecoms

Very useful when you want to manipulate files regularly e.g. renaming/managing (downloaded) images by resolution.

mike_ivanov 2 years ago

In the powershell example:

"Get-ChildItem" o_O

Is that .. camel kebab?

  • pie_flavor 2 years ago

    All commands have a standard Verb-Noun naming scheme, with a small list of verbs, to ensure their names can be easily guessed. Along with jargon like 'item', if you have never found the command to get a file object from a path, you can already know it is called Get-Item without looking it up.

  • oblio 2 years ago

    Welcome to PowerShell 101, circa 2006, 18 years ago :-)

kleiba 2 years ago

Unfortunate choice of name, though - if you append "the nearest bathroom" you get what my little daughter sometimes has to do urgently.

  • dzidol 2 years ago

    Would you say similar about Allah4, given it existed? :)

    • kleiba 2 years ago

      "unfortunate choice of name" - yes, but no to the rest of my previous statement in that case.

avgcorrection 2 years ago

There’s a delete statement. I hope the where-clause is mandatory? :)

  • jug 2 years ago

    SQL gives you a puzzled look and asks "But why not make it convenient to blow your entire folder?"

SomeoneFromCA 2 years ago

Powershell looks better than Perdun.

daviddever23box 2 years ago

FFS, please change the landing page to indicate that it is Windows-only.

  • danpalmer 2 years ago

    This seems like an extreme reaction. Between the Windows UI and Powershell scripting, it seems fairly clear.

    • altruios 2 years ago

      With that said, the feedback (despite the tone) is valid, indicating with words that this programming language doesn't work on anything other than windows is an important feature for the landing page to present.

      I can see clearly too, that it is for windows by the pictures, but better to say it with words.

    • daviddever23box 2 years ago

      Fair enough. Page now reads: "tool for creating filesystem automation plugins on Windows OS". That's all one could ask for.

    • cabalamat 2 years ago

      There's a bash example on the home page, so it wasn't obvious to me it's windows-only.

    • daef 2 years ago

      pwsh aint windows only thou

      • danpalmer 2 years ago

        And the linux kernel runs on Windows, but I wouldn't expect this to be on the front page of linux.org.

        This landing page does a perfectly good job at communicating what it needs to.

  • chme 2 years ago

    I think that was pretty clear from the first picture on that page.

    But there are some empty files for other operating systems in the source:

    https://github.com/wojfil/perun2/tree/master/src/os

    So support for other systems might be planned.

  • lolinder 2 years ago

    The first words I saw communicated that the language was for "filesystem automation plugins" with an image of a Windows Explorer context menu below, which made it pretty clear which filesystem it was referring to. Then it took me half a second to click the download button and see (above the fold) that, as expected, only Windows was available.

    The landing page is fine.

  • natrys 2 years ago

    If you are looking for something similar but for other platforms, there is fselect[1]. Can do all that, and tries to adhere to SQL.

    [1] https://github.com/jhspetersson/fselect

  • mlv-OP 2 years ago

    There's a somewhat similar project that also works on linux https://www.nushell.sh/

systems 2 years ago

powershell all the way

this is a dsl , compared to the more general powershell cli the file system commmands will sure be shorter or (subjectively) cleaner

but at what cost?

learning ans mastering pwsh, even if some commands will be longer, is a better investment

SQL being extended to become a file system dsl as some data lake solutions do, make more sense

extheat 2 years ago

Why not just use an LLM to generate the code/commands for you? Making a whole new language someone has to learn and memorize special keywords and built-ins doesn't seem too appealing by today's standards.

  • nurettin 2 years ago

    If those commands are sporadic, non-heterogenous and they don't chain well, a language like this can help create the framework to help an llm generate your actions easier.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection