Red: A programming language inspired by REBOL

(github.com)

95 points | by Levitating 7 days ago ago

83 comments

  • marttt 6 days ago ago

    Tangential, but at least for the minimalism-inclined, Rebol's inventor Carl Sassenrath might be an interesting guy: https://sassenrath.com/computing.html

    Wikipedia article: https://en.wikipedia.org/wiki/Carl_Sassenrath

    • snvzz 6 days ago ago

      The most notable IMO is that he was responsible for AmigaOS's kernel.

  • hn-ifs 6 days ago ago

    I remember looking at red ages ago but never got round to using it. I like to learn odd non-mainstream languages. Currently learning Nushell which is an amazing alternative shell. And I like the look of roc-lang too.

    I'm desperate for a truly cross platform programming language with gui abilities on those platforms. I'm slowly learning dart/flutter for this but truly wish for something simpler. I get the reasoning behind flutters declarative style but it's certainly not simple, especially when you get to state management.

    • 0x0203 6 days ago ago

      Tcl/tk is still alive and doing well. It's cross platform, very quick to learn, and easily embeddable into other languages/projects.

      • lproven 5 days ago ago

        Version 9 came out last year. I wrote about it.

        https://www.theregister.com/2024/10/02/tcltk_version_9/

        27 years after v8.0 which may be some kind of record.

      • hollerith 6 days ago ago

        Can you name an important software written in Tcl or Tk?

        Important softwares written in Ruby for example include Rails and Homebrew.

        • coliveira 6 days ago ago

          Tcl is the embedded language of git. Standard git gui is written in Tcl/Tk. Tcl is also the script language for sqlite.

          • hollerith 6 days ago ago

            .gitconfig is in an INI-like format though, which is not anything like Tcl.

            Also, does anyone use the "standard" git GUI?

            >Tcl is also the script language for sqlite.

            OK, thanks.

            • aconst 5 days ago ago

              I never liked other graphical git clients so I switch between CLI and gitk + git gui according to the task at hand.

            • srott 6 days ago ago

              Only way I know to remove a file from a commit is by using git commit.

              I’m also most comfortable with gitk when reviewing branches

              • srott 6 days ago ago

                git commit -> git gui

                • hollerith 5 days ago ago

                  Thanks for that correction. I was quite confused.

        • doublerabbit 6 days ago ago

          One of the big investment banks use TCL/TK, for real-time e-trading. Source my last gig.

          The "important software" are normally kept behind NDAs, so you never hear about their uses. TCL was also used on the Mars Rover.

          Take a look for yourself: https://wiki.tcl-lang.org/page/Who+Uses+Tcl

        • SomeHacker44 6 days ago ago

          The FPGA software from Xilinx and Altera are scripted with Tcl/Tk.

          • cmrdporcupine 6 days ago ago

            This. In fact it seems like plenty of hardware-eng tools use Tcl, and looking at all alternatives it's not a bad choice.

            With Tcl you get something like a Lisp with a flexible consistent syntax, but less brainy and more pragmatic, and designed to drive other tools.

            • justin66 6 days ago ago

              My impression many years ago was that it’s really not that bad. I got up and running writing simple programs immediately, and wouldn’t have tried to go outside its capabilities as a simple scripting language.

          • hollerith 6 days ago ago

            Thanks for the reply.

        • nilamo 6 days ago ago

          Tk has been embedded in python as the GUI toolkit since at least 2.x days. It's used for IDLE, the IDE shipped with Python, and is also used for the turtle module's graphics.

        • fuzztester 5 days ago ago

          I've read many times in the past that a lot of EDA-related software is written in Tcl and Tk.

          Electronic Design Automation.

          https://en.m.wikipedia.org/wiki/Electronic_design_automation

          See:

          https://www.tcl-lang.org/about/uses.html

          The section about Embedded Development.

          CAD is mentioned there too.

          https://en.m.wikipedia.org/wiki/Computer-aided_design

          • fuzztester 5 days ago ago

            Pasting that section's content here:

            Because Tcl is a very compact language, and is easily integrated with special hardware, it is a popular choice for embedded development. You'll find Tcl hidden away on many devices, including many networking products from Cisco and others, and set-top boxes including Tivo. Embedding Tcl within other software projects is of course also hugely popular, and has become the dominant control language in some industries, such as in electronic design automation (EDA) and computer-aided design (CAD) applications.

          • fuzztester 5 days ago ago
        • avhon1 6 days ago ago

          Not written in, but AutoCAD supports scripting in TCL (and in its own AutoLisp, which is much less popular among users than TCL).

        • Qem 6 days ago ago
        • progre 6 days ago ago

          First version of Redis was written in Tcl.

        • AdieuToLogic 6 days ago ago

          > Can you name an important software written in Tcl or Tk?

          MacPorts[0] uses Tcl significantly.

          EDIT:

          The expect[1] command also uses Tcl and has a variant which uses Tk.

          0 - https://github.com/macports/macports-ports

          1 - https://man.freebsd.org/cgi/man.cgi?query=expect&apropos=0&s...

        • dmux 6 days ago ago

          A large part of flightaware.com’s systems were written in TCL.

    • cmrdporcupine 6 days ago ago

      I wish the nu-shell stuff was set up so that its language could be used as a Rust crate independentl of the shell? Like in your own runtime? Because it's not a bad general scripting language and kind of makes sense to me to embed in things like editors etc. Places where people would use Tcl (e.g. hw eng / fpga tools etc) or a Lisp (emacs) or an embedded Python/Lua now.

      But when I looked at their crate structure it did not seem like this was possible. I don't love nushell the language but it actually fits a niche that not much else fits.

    • gcanyon 6 days ago ago

      "simple cross-platform GUI+programming language" livecode.com fits that description. It's been my daily driver for years, but full disclosure I'm now looking for something similar to your requirements, but python-based.

      • RodgerTheGreat 6 days ago ago

        Depending on how elaborate your GUI needs are, CardStock might be suitable: https://cardstock.run

        • gcanyon 3 days ago ago

          Interesting, thanks!

      • WillAdams 6 days ago ago

        Any progress from the openXtalk people trying to keep the opensource of Livecode (from before the rugpull) going?

        I bought a book on using QT6 from Python --- hoping to finish an initial read and then give it a try (unless something better comes along).

        • gcanyon 3 days ago ago

          None as far as I know, but I haven't been following them.

    • bobajeff 6 days ago ago

      Many people here hate on Electron but cross platform gui app development really sucks without it.

    • nesarkvechnep 6 days ago ago

      How about C?

    • airstrike 6 days ago ago

      Consider iced, which brings The Elm Architecture to Rust

      https://iced.rs

  • 7thaccount 6 days ago ago

    This comes up from time to time. A really cool idea, but it didn't go anywhere so far. It seems like a lot of work has occurred according to github, but to the potential users, it doesn't seem like much has ultimately changed since when I was super excited for it in 2014. The team did some detour to look into block chain and an ICO like 5+ years ago that seemed to have derailed things. Last I checked, Windows flagged the installer as suspicious. It would be really cool to get this off the ground though.

    • ModernMech 6 days ago ago

      Looking at the github tracker it seems like development has really stalled. That's the way these low bus factor projects go sometimes, especially when the main dev loses interest and the contributors are left to pick up the slack. But since there's so much history there, hope remains that it will see renewed interest one day. Sometimes life just gets in the way.

      • 7thaccount 6 days ago ago

        Thanks for that. I haven't checked in awhile now.

    • vanderZwan 5 days ago ago

      Nothing has changed because I still can't compile it on 64 bit Linux without a lot of hassle. I think that added friction to get it to work and try it out is enough to keep the majority of potential contributors away from it.

  • kseistrup 7 days ago ago

    > For Linux 64-bit distros, you need to install 32-bit supporting libraries.

    Will it ever be 64-bit?

    • kseistrup 7 days ago ago

      > The 0.7 should be the last big milestone for the 32-bit Red version and current toolchain and we will be working on that first.

      > v1.0b : (beta) completed self-hosted Red with 64-bit support.

      See you at v1.0, then.

    • baranul 6 days ago ago

      That is a major showstopper for it getting attention. Don't know how making sure it runs on 64-bit OSes was not/is not a top priority. Appears that people have been complaining about that for years.

  • bronlund 6 days ago ago

    I remember being really impressed by REBOL, I thought it was a really cool language and I did make some small tools with it. To bad greed ruined it for everybody.

    • fuzztester 6 days ago ago

      how did greed ruin it?

      I had tried it out a bit earlier, but don't remember reading anything about it getting ruined.

      • bronlund 6 days ago ago

        As I remember it; it was free for personal use, but if you were to use it commercially, you had to pay a license cost. There also was a server version which could set you back thousands of dollars. If you wanted to export the REBOL API which you could create using the REBOL SDK to users, you needed a separate distribution license. It was a mess. When REBOL finally went open source in 2012, it was too late, everyone had moved on.

        • praptak 6 days ago ago

          I sure hope that merely not being free, for all uses, forever, would be enough to tank it. Not to hate on Rebol specifically nor people wanting to make money off their work in general but a non-free language is just unacceptable.

          • bronlund 6 days ago ago

            I think it was more about it not being worth the money. REBOL was clever and all, but when you do compete with free stuff, you can't just set whatever price you like - it has to make sense for the customer.

      • praptak 6 days ago ago

        GP probably means being initially released under a proprietary license.

        • justin66 6 days ago ago

          The problem at this stage is, the older versions of the software which are complete and which everyone historically used are closed source and now out of date because they target OSes from eleven years ago, and there’s an open source version which nobody contributes to because it’s incomplete and different than the version everyone used.

          As with - for example - the classic Netscape browser, it would have made more sense to just open source the one people used, rather than some new and incomplete thing. The pertinent difference being there weren’t thousands of open source developers waiting to take up the slack and help finish an incomplete version of REBOL.

          (Someone more familiar is welcome to correct me on the details)

      • fuzztester 6 days ago ago

        thanks, guys.

  • araes 6 days ago ago

    Has the same annoying issues as REBOL. Special characters are allowed in words.

      a+b
    
    is a word. Unlike

      a + b
    
    which is a sequence of three words separated by spaces.

    Dealbreaker. a+b*c + a+b * c / a+b/d + a+b / d % a + b So easy to miss or add a space while typing. Reading afterward, its difficult to tell if there's even spaces in some areas.

    • DemocracyFTW2 6 days ago ago

      I actually think languages should rather enforce spaces around (most) operators for a number of reasons. One is clarity, another one is that it should make the grammar simpler. Whether `alice+bob` is a good name for a variable is certainly up for debate but using hyphens for compound names (as in CSS) is in principle even better for readability than using underscores (and def better than cAmElCaSe). I find this a similar issue to the (to me, mal-) practice of allowing `.86` for what should properly be written `0.86`; this, too, introduces complexity with very little gain, if any, in usability.

    • voxl 6 days ago ago

      Dealbreaker for you. I'd hate for you to see Agda..

  • exikyut 7 days ago ago

    Does the GUI work on Linux yet?

    • Levitating 6 days ago ago

      I tried some of the examples using red-view and it worked perfectly.

      It uses gtk3 behind the scenes.

  • austin-cheney 6 days ago ago

    Red describes itself as functional imperative. I used to use Red as an example of what programming could be when people try to ham fist declarative extremism on me. Seeing the words imperative and functional used together with examples would silence most of the nonsense.

    • 7thaccount 6 days ago ago

      It is difficult to pin down how to describe it. It is homoiconic as well like lisp (at least the scripting part of Red), but seems to be used in some kind of functional imperative style.

      • timbit42 19 hours ago ago

        Red is derived from REBOL which is derived from Logo which is derived from Lisp. I think this explains a lot.

  • WesBrownSQL 6 days ago ago

    SNOBOL FTW!

  • tomdickandharry 6 days ago ago

    [dead]

  • drivingmenuts 6 days ago ago

    I’m guessing not to be confused with REDEngine, the main driver of Cyberpunk 2077 and the Witcher series of games? REDEngine has its own language is my understanding.

    • shakna 6 days ago ago

      Red the language came along in 2011 - the same year as Witcher II used REDEngine for the first time. So I guess I can see where some confusion can arise.

      Red is a general programming language, instead of a game engine's personal DSL.

  • Nekorosu 7 days ago ago

    Impossible to run on macOS. The provided "binary" is a complete mess. It's actually a zip archive with an app inside of it with a binary that doesn't match a modern Appple Silicon architecture.

    I don't understand why the download link is even there. In practice, macOS is not supported. I hope it works better on Linux. Can't care less about Windows.

    • anta40 6 days ago ago

      Last time I tried (perhaps 4 years ago?), it works on 64-bit Linux. But you still need to install 32-bit compatibility libs. On macOS, well sadly it's still 32-bit. Not sure how many folks are still using Mojave...

      • coliveira 6 days ago ago

        So this probably won't run on Apple silicon. They don't have support for 32bit apps.

        • anta40 6 days ago ago

          It also doesn't run on Big Sur, Monterey.... back when I was still on X64

    • Nekorosu 6 days ago ago

      For downvoters. I made an effort to file a very detailed bug report regarding this issue. I'd love to make it work but it seems like original REBOL binary is also 32-bit only. I still don't understand why the provided binary is a rabbit hole of problems. I do want to try it on my system and open to making an extra effort to make it work. :)

      • avhon1 6 days ago ago

        IIRC, Red is not yet fully self-hosted, so it makes sense that the download would embed a copy of the original 32-bit x86 Rebol to bootstrap / compile.

  • zkmon 7 days ago ago

    Wow - what's driving the quest for new programming languages? Is there a gap that is still not addressed by the existing languages?

    At the core, there is only one control statement (GOTO) and a few operations that work on values in memory - IF, READ, WRITE, ADD etc. Anything else is a recipe that uses these ingredients.

    • mpweiher 6 days ago ago

      It's all just Turing machines, or Lambda calculus, or NAND gates

         https://en.wikipedia.org/wiki/NAND_logic
      
      Even FORTRAN was unnecessary.

      Or maybe...maybe...we're having some problems that our current programming languages aren't addressing:

      https://www.hpi.uni-potsdam.de/hirschfeld/publications/media...

      And so we should:

      https://dl.acm.org/doi/10.1145/3689492.3690052

      • justin66 6 days ago ago

        It’s all ball bearings nowadays.

    • ModernMech 6 days ago ago

      That's like asking "What's with all these people writing books? Is there a gap that is still not addressed by existing books?" Programming languages are fun to write, it's not more complicated than that.

    • cmrdporcupine 7 days ago ago

      REBOL is 28 years old.

      • brabel 6 days ago ago

        And Red has been around since 2013.

    • wiz21c 6 days ago ago

      languages are not about what you can do but what you can safely (that is, without introducing bugs) abstract while remaining productive (you can code easily) and conducive of human organizations (you can organize team communication around the code).

    • Gormo 3 days ago ago

      > Wow - what's driving the quest for new programming languages? Is

      People having an interest in exploring the topic.

    • novosel 7 days ago ago

      True, true. But maybe somewhat reductive? What about complexity? The one arising from the growing code, and the other in the brain using the language? I feel new languages try to strategize in the domain of complexity management.

      • anonzzzies 6 days ago ago

        Are they? Examples (this (red/rebol) are OLD)? I see more crap. We already have ways to manage complexity; we have VERY advanced type systems that are finally feasible (my joy) but no one can work with them, and llms not yet. You can manage resources, logic, proofs etc all with typesystems. Rust is a step (people like it as they can make changes to large codebases without leakage somewhere you 'forgot' is there and others like it because there are less footguns), but we have the future already in a bunch of other languages it's just not used. So what do you mean with " I feel new languages try to strategize in the domain of complexity management."?

        (Disclaimer: I think the GP comment is of a level that I don't think should even be considered replying to, so I didn't)

    • petralithic 6 days ago ago

      Languages are for humans, not for computers, who read binary anyway.