12 ms·
The Red Programming Language
- adastra22 3y agoSounds like an amazing language. Not a single code example. The first link I click 404’s. Is this a thing?
- andsoitis 3y agoOne place where you can see code examples: https://www.red-by-example.org/ https://www.red-by-example.org/
- jrumbut 3y agoI found this page a little clearer: https://www.red-lang.org/p/getting-started.html?m=1 https://www.red-lang.org/p/getting-started.html?m=1
- Zuider 3y agoRed is based on the Rebol language and is said to be 95% compatible with Rebol 2.7. The Red website includes links to the tutorials and code examples for Rebol alongside Red specific links.
- cabalamat 3y agoSeems a bit odd that the Windows version has a GUI but not the Linux one. Building a GUI on top of Tk (like Python does) would probably not be hard.
- ducktective 3y ago>Windows version has a GUI but not the Linux one Not odd at all, in fact, just another consequence of the ridiculous fragmentation in Linux scene
- Izkata 3y agoRebol had both (and more) decades ago, so it does seem odd to me Red doesn't given how much of it was inspired by that. IIRC its original concept was "open-source rebol".
- fuzztester 3y agoIt's original concept was not just "open source" (no hyphen required, nor is it "opensource" :), but to be a much better Rebol than Rebol - which itself was a neat concept and implementation by Carl Sassenrath, also creator of the Amiga OS. https://en.m.wikipedia.org/wiki/Carl_Sassenrath https://en.m.wikipedia.org/wiki/Carl_Sassenrath Sadly, they (Red) seem to have gone the crypto-funding way a few years ago.
- fuzztester 3y agoI had used Rebol for writing small programs a while ago, and it was fun. The Rebol software was also very light, at under 1 MB, IIRC, for both the Windows and Linux versions.
- t0astbread 3y agoWhy would fragmentation imply you can't have a GUI? You would just pick one toolkit and depend on it being there (unless you statically link it). Setting it up correctly is then the job of the user or distributors.
- ducktective 3y agoThere is libgtk, aside from breaking changes between versions, some projects just don't want to "put up" with arbitrary decisions of upstream. Hence QT and KDE for example. But that has LGPL issue. Until a major backer steps up and funds a project with amounts that is comparable to what MS or Apple spends on their GUI, the Linux on desktop is not happening. My bet is on QT if anyone is listening.
- cabalamat 3y ago
- mega-tux 3y agoI remember seeing some progress on the Gtk port on the blog, i think I tried last year with some success
- bradrn 3y agoThere is a Linux GUI! I’ve used it — it seems to work fine.
- rebolek 3y agoNot true, Linux version has GTK-based GUI.
- pepa65 3y agoIt seems they do have `view` for Linux.
- jeremyw 3y agoSince examples were hard to find: https://learnxinyminutes.com/docs/red/ https://learnxinyminutes.com/docs/red/ https://www.red-by-example.org/ https://www.red-by-example.org/
- deafpolygon 3y agoI am not a fan of the syntax. I'll just leave that here.
- LatticeAnimal 3y agoThank you so much for finding those! Despite the promising description, the language design looks pretty... quirky.
- nmz 3y agoI don't know about quirky, back when I first found out about it, it was surprising that I could read it without having written a single line of code on it. That's damn impressive. To me, its type system and parsing nature are one of a kind, to be able to label everything as what it is [money!] is $12.53 [tuple!] is 5.5.5.5 [date!] is 16-Jul-2023/21:00:17 means the parser immediately parses and type checks everything, all while looking as human readable as possible.
- bradrn 3y agoIt’s homoiconic, so the quirkiness serves very similar goals to, say, Lisp.
- chuckledog 3y agoDoes the compiler work on a Mac M2?
- nateb2022 3y agoYes. Currently it emits Intel Mach-O's, and is one itself, however this is not an issue thanks to Rosetta.
- fuzztester 3y agoUnintel machos is more like it :)
- foobarbecue 3y agoLooking forward to the Fireship video!
- 38 3y agobeen a while since I played with Red, but from what I remember the problem was this: 1. default compile mode was shared, so all executables relied on a "libred.dll" or similar 2. compiling "libred" was really slow (1 minute), but after that its done and skipped in the compile stage, making compile much faster (but still with the limitation of #1) 3. you can compile static, but then the static "libred" needs to be compiled EVERY TIME, making every single static compile, even "hello world" take one minute EVERY TIME. I posted multiple issues about #3, but they were closed each time as "wont fix" or "working as intended" or similar. So OK fine, I just moved onto Go and Rust, even C, plenty of other languages that dont have this issue.
- Zamiel_Snawley 3y agoIs the intended workflow to use dynamic linking when developing, and static(if you want it) for release? If so, that sounds reasonable to me.
- 38 3y agoyes, that was one of the arguments. however I dont accept that. I have used C, C++, C#, Crystal, D, Go, Nim, Rust and Zig, none of which have this issue.
- kstrauser 3y agoHmmm. I thinking of Rust and its `cargo build --release` that recompiles the whole thing from scratch (if you haven’t already made a release build).
- deleted 3y ago[deleted]
- Zuider 3y agoBut do those languages permit rapid Lisp-like development in the way Red does? I am not sure I see the problem. The slow static compilation is reserved for the final deployment of the app, so it should not hinder development.
- pmarreck 3y agoI had a brief interest in REBOL before Ruby, and definitely before I decided I never wanted to deal with a language with mutable data ever again if I could help it
- andrewstuart 3y agoThe programming language I want has: * the philosophy of zig in terms of simplicity * the thread and memory safe nature of Rust - without Rust's kitchen sink approach to adding sub languages and complexity * the simplicity and straightforwardness of TypeScript
- 38 3y agoI dont think this really exists. Zig does have some memory safety, but not as much as Rust of course. I think Zig made the decision to add as much safety as they could, without crossing the complexity boundary. any further memory safety and you're about in Rust land. maybe some middle ground language is possible, but not one that I know of.
- Tozen 3y ago> any further memory safety and you're about in Rust land... That's not quite true. We have GC using languages (some allow it to be turned off), and for many or in many use cases, that would be enough. Other languages like Lobster, Vlang, Vale, etc... are developing/putting out easier to use alternatives.
- scns 3y agoYou are both right it seems. GP seems to have omitted withour GC. Number one on your list could be Dlang no? Not affiliated. https://dlang.org/ https://dlang.org/
- rockwotj 3y agoGolang?
- anta40 3y agoThe compiler is still a 32-bit app, so won't run on few recent Macs...
- Zuider 3y agoRed is mostly written in Rebol 2.7 whose final release was in 2011 when most software was 32-bit. Until Red becomes fully self-hosting, it looks like there will not be a 64-bit version.
- klodolph 3y agoThe idea that “application” is an abstraction level doesn’t sit right with me. I think that slide is a bit of a stretch. An application, as a mass of code, will contain code that works at different abstraction levels.
- e12e 3y agoI had mostly given it up for dead - but it appears there was some significant news this June: https://www.red-lang.org/2023/06/dynamic-refinements-and-function.html https://www.red-lang.org/2023/06/dynamic-refinements-and-fun... Maybe a consequence of them walking their path to 1.0? https://www.red-lang.org/2022/07/the-road-to-10.html https://www.red-lang.org/2022/07/the-road-to-10.html
- myspy 3y agoThere is no binary for ARM Macs so I guessed it is dead. And the site timestamp is frozen at 2020.
- rumblestrut 3y agoWhew. I’m glad this exists. It’s been a few days since yet another programming language has been introduced into the world. Sarcasm aside, while I think striving to be better is great, sometimes I wish there was just a standard language for programming. I realize it depends on the context (mobile, web, desktop application, different platforms) but it can feel overwhelming when in the end, they all pretty much do the same thing: tell a computer to do things.
- steveklabnik 3y ago> It’s been a few days since yet another programming language has been introduced into the world. Red is not a new language.
- Tozen 3y agoNot at all. Is around 12 years old, and seems still quite far from hitting 1.0. I'm a bit amazed by that.
- troupo 3y agoBecause the author and the team keep setting unachievable timeframes. Five-ish years ago they were aiming for a 1.0 within a year while still having major milestones like adding actors (and re-writing half of internals to support actors) on the roadmap.
- rumblestrut 3y agoStill new to many.
- keithnz 3y agonot new, and red is actually quite interesting compared to other languages, worth having a good look. Also, worth reading Paul Grahams "Blub Paradox" article from decades ago... http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html (hopefully you know who he is given you are here on HN)
- hmry 3y ago
- keithnz 3y agowhen it came up before, I thought this was a pretty nifty code example in red https://www.red-lang.org/2016/07/native-reactive-spreadsheet-in-17-loc.html https://www.red-lang.org/2016/07/native-reactive-spreadsheet...
- nine_k 3y agoWas the Red language / environment using a non-free license some time ago? I see now it's basically under BSD 3-clause license; am I mistaking it for something else?
- foul 3y agoIt probably was Rebol that one. Rebol core is free and open source, the GUI distribution is instead released in binary form, as freeware (and exists only for rebol 2.7, we know about rebol3 only for Core).
- foul 3y agoBUT! There's an open source version of Rebol3 with GUI, from Atronix. I still don't know how the hell it works, like, what does it pull for dependencies. https://github.com/zsx/r3-gui https://github.com/zsx/r3-gui
- em-bee 3y agothat wasn't there when red started, and i don't know if it is a drop in replacement for the version red needs. if it isn't then they probably just didn't bother porting since they want to be selfhosting in the future anyways.
- foul 3y agoI wouldn't try building red from source with neither the official rebol 3 nor this Atronix release (nor Oldes fork, nor Ren-C), on their site they always built with rebol 2.7. I thought red aimed for self-hosting, but as far as I can delve in their sites, I infer that they are rolling the rebol way and you "should just download the binary distribution". Meh!
- em-bee 3y agowell, that explains why they are not using this FOSS licensed rebol. it's the wrong version. they are aiming for self hosting, it's just taking them a while to get it done. take a look at their roadmap: *v0.7 : Full I/O with async support. *v1.0b : (beta) completed self-hosted Red with 64-bit support. For reaching the 1.0-beta milestone, we target 12 months of intensive work, so that will bring us to Q3 2023. so that was written in june 2022 before 0.7. there is no announcement for 0.7, but then they changed the versioning so i can't tell if the goals for that have been reached. but it's pretty clear that self-hosting is the next big target.
- brutal_chaos_ 3y agoFYI, the link from the first bullet point "human friendly syntax" (aka syntax) points to https://pointillistic.com/ren/ https://pointillistic.com/ren/ which is broken, returning a page that states: Not Found The requested URL was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
- HexDecOctBin 3y agoI will take this opportunity to ask if someone can explain how Rebol/Red scoping works? I have read all the Bindology, etc. stuff and it's still not clear; I suspect it would be much easier to understand if someone could explain it in terms of how one would implement it in a interpreter (just like Dynamic scoping makes much more sense when explained that way).
- Tozen 3y agoInteresting language. I think a major stumbling block was Red not running on 64-bit OSes. Not quite sure why that wasn't made a priority.
- jomohke 3y agoI'm surprised that I haven't heard of this line of languages before. The home page of Rebol, which it says it's derived from, seems to do a much better job at stating its purpose: http://rebol.com/ http://rebol.com/
- timbit42 3y agoThe creator, Carl Sassenrath, also wrote the pre-emptive multi-tasking Amiga OS. He was a fan of Lisp and Logo and wrote Amiga Logo after he left Commodore. Rebol is based on Logo and Lisp.
- hosh 3y agoRebol reminds me a lot of Tcl/Tk, but I can’t tell if that is because there’s a dialect that resembles it, or that it takes inspiration from tcl’s command substitution.
- rebolek 3y agoTcl's command substitution is entirely string based, Rebol loads source and everything happens with internal values. That's a big difference.
- hosh 3y agoLet me see if I understand this. By loading source / internal values, do you mean that the Rebol command substitution works with the AST directly?
- spindle 3y agoOne of the reasons it's not so famous is that it's had various historical struggles, including being stuck at 32-bit for a long time IIRC (I'm hazy on the details and corrections welcome). I love it though.
- vosper 3y agoAlso they went of down a cryptocurrency path for a while, not sure where that's at but it certainly seemed like a big distraction from finishing the main thing.
- nurettin 3y agoRecently I had to target AIX and AS-400. Unfortunately I didn't even have a development environment for those projects, and cross-compiling wasn't available. So Java was pretty much the only option which let me keep my sanity. There just isn't anything like it.
- jmpeax 3y ago> print output using print, or prin for printing without a newline Crappy design when a common typo silently and slightly alters the functionality of your program.
- boxed 3y agoThey should at least call it `print` for normal print and `prit` for the one without the n in it :P
- hcks 3y agoThis is hilariously bad design bwahahahah Makes me interested in learning more about Red to see more example of what to not do
- canadianfella 3y ago[dead]
- quazar 3y agoWhy? These are two very common commands known by every programmer and used very often, why would having short mnemonics for them be confusing?
- rightbyte 3y agoI don't think a missing letter in such a short words is a common typo. It stands out. You got eg. prin1 in Clisp which should be hard to distinguish in some fonts.
- a3w 3y agoprin is an alternate spelling of preen. Okay so something about boldy wearing their feathers is a preen/to preen? Can anyone confirm? Does not help in guessing what ``prin "helloworld"'' does.
- timbit42 3y agoSo I take it you hate all unix shell commands.
- asaka 3y agoAnd it's a ICOed programing language, maybe the first?
- DarkNova6 3y agoSorry, what is an ICO? (I guess it's not the Indian Computing Olympiad )
- mkl 3y agoInitial Coin Offering: selling a bunch of cryptocurrency tokens as a combination of kickstarter and get-rich-quick scheme. Often a scam. https://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html https://www.red-lang.org/2017/12/leaping-into-future-red-goe... https://www.red-lang.org/2018/01/answers-to-community-questions.html https://www.red-lang.org/2018/01/answers-to-community-questi...
- asaka 3y agoYes.
- deleted 3y ago[deleted]
- raj555 3y agoI don't understand the appeal of these langs, I mean its fun as a hobby to develop but srsly who uses it? Unless you show me real stuff like loading an image and manipulating it or opening a file and parsing text for some pattern etc all the factorials won't cut it. The syntax looks real pain in the slot, worse than modern C++ but atleast the latter works like a charm and easy to understand if you cut the clutter.
- amno 3y agoNever heard of it before, but I am a bit curious about it being homoiconic. I wonder how it comes into play in Red/Rebol world, a little more thorough. This page shows some examples of lisp-like 'apply: https://www.red-lang.org/ https://www.red-lang.org/. I wonder if the use of '[] is inspired by pre-modern lisp M-expressions (Mathematica is also using them), or is it for some other reason, like let's pretend we are not a lisp-like language so to not scare of folks? :) Square brackets and curly brackets are unfortunately harder to type on some layouts. On Swedish layout I have to press alt-gr to type those, while ordinary parenthesis are a bit simpler: I can use shift, which is found on both sides of the keyboard. Perhaps such things sounds trivial, but in a language where they claim that programming should be fun, hard to type things are a bit of fun-killers. I also disslike both visually and if I would to type all those operators #,%,$,?,:,! etc. We humans are used to raede txet adn cna prase text even when mistyped without barely stopping, but the punctuation is a bit harder to read and type, and that for a reason. That becomes especially annoying if those signs are overloaded or combined, as in Perl or C++, which is probably one of the reasons that gives those languages "write-only" epithet. I have seen the video: https://www.youtube.com/watch?v=-KqNO_sDqm4 https://www.youtube.com/watch?v=-KqNO_sDqm4 by Nenad, but it is from 2015. If they are still 4x slower than C for the compiled code, than I am very hard to believe they are a serious contender to become a systems programming language as they claim to be. Compare to sbcl (Common Lisp) where speed is almost approaching C in some cases. Having built-in toolchains and DSLs is nice, but it can also be a curse and made things harder to evolve and modernize. While I sound like a very negative person, I do like some of the ideas in Red definitely. Built-in tasks, concurrency and homoiconicity sounds like a very nice features to start with.
- luckystarr 3y agoSo from a first glance it looks like the love-child of LISP and Forth. Is that a correct assessment?
- timbit42 3y agoMore like Logo and Lisp. Of course, Logo is also a Lisp. Red is based on Rebol, which was created by Carl Sassenrath, the creator of the pre-emptive multi-tasking Amiga OS. When he left Commodore, he wrote Amiga Logo and the created Rebol.
- patterns 3y agoNice to see Red getting attention. I have been playing with Rebol a while ago and I really liked how easy it is to do program manipulation and writing small DSLs. However, I found debugging to be very difficult, once I wrote a more complex application. Are there good debugging tools for Red?
- sambeau 3y agoCarl Sassenrath, the creator of Rebol was head of OS at Amiga, and is the reason why the Amiga had real preemptive multitasking before Macs and PCs.
- Chiba-City 3y ago[dead]
- SkeuomorphicBee 3y agoA bit off-topic, but what's with all the 404 links in that about page? With all the missing pages it felt like a treasure hunt to find any information about what the language actually looks like. Literally the first four links in the About page are either broken or point to unrelated pages, so it took me five clicks to find the first example of the language.
- Zelphyr 3y agoI was really hoping this was a 1.0 announcement but, I'll take what I can get. Red is a really promising language. It, like Lisp, gets flak because of the syntax but that really becomes a non-issue pretty quickly once you start using it and the productivity gains you see from using it all but eliminate any reservations you might have about the syntax.
- ygmelnikova 3y ago[dead]
- anyoneamous 3y agoI liked the look of the REBOL syntax and was looking forward to trying it, so was then sad to discover that the Red examples look quite different.