Red (programming language): Difference between revisions

Content deleted Content added
External links: added site
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(32 intermediate revisions by 9 users not shown)
Line 3:
| name = Red
| logo = Red Language Tower Logo.png
| logo size = 160px
| logo caption =
| paradigm = [[Programming paradigm|Multi-paradigm]]: [[Imperative programming|imperative]], [[functional programming|functional]], [[symbolic programming|symbolic]]
| designer = Nenad Rakočević<ref>{{cite web |title=Creator of Red |website=[[GitHub]] |url=https://github.com/dockimbel}}</ref>
| developer = Nenad Rakočević
| latest release date =March December 719, 20182025
| typing =
| implementations =
Line 13 ⟶ 14:
| influenced =
| license = [[modified BSD license|modified BSD]] and [[Boost Software License|Boost]]
| website = {{Official URLurl|https://www.red-lang.org/|red-lang.org}}
| logo_size = 150px
| logo_alt = Red Logo (stylized Tower of Hanoi)
| year = 2011
| latest_release_version = 0.6.46<ref>{{cite nameweb |title=GCRed's improvements |url=https://www.red-lang.org/2025/03/066-memory-management-improvements.html|website=red-lang|access-date=April 1, 2025}}</ref> ([[AlphaBeta software|AlphaBeta]])
| influenced_by = [[Rebol]], [[Lisp (programming language)|Lisp]], [[Scala (programming language)|Scala]], [[Lua (programming language)|Lua]]
| operating_system = [[Linux]], [[Windows]], [[OS X]], [[Syllable Desktop (operating system)|Syllable]]
| file_ext = .red, .reds
}}
 
'''Red''' is a [[programming language]] designed to overcome the limitations of the programming language [[Rebol]].<ref name="GS">{{cite web |title=Getting Started with GUI Programming using Red Language |url=https://www.studytonight.com/post/getting-started-with-gui-programming-using-red-programming-language |website=Studytonight |access-date=September 17, 2021}}</ref> Red was introduced in 2011 by Nenad Rakočević,{{Sfn|Balbaert|2018}} and is both an [[imperative programming|imperative]] and [[functional programming]] language. Its syntax and general usage overlaps that of the interpreted Rebol language.<ref>{{cite web |title=Interview with Nenad Rakocevic about Red, a Rebol inspired programming language |url=https://www.notamonadtutorial.com/interview-with-nenad-rakocevic-about-red-a-rebol-inspired-programming-language/ |website=Not a Monad Tutorial |date=28 August 2015 | access-date=August 28, 2015 |archive-date=23 March 2023 |archive-url=https://web.archive.org/web/20230323034804/https://www.notamonadtutorial.com/interview-with-nenad-rakocevic-about-red-a-rebol-inspired-programming-language/ |url-status=dead }}</ref>
 
The implementation choices of Red intend to create a [[Solution stack|full stack]] programming language:{{Sfn|Balbaert|2018}}<ref name="MUO">{{cite web |title=6 Unusual & Groundbreaking Programming Languages to Learn in 2023|url=https://www.makeuseof.com/programming-languages-to-learn-in-2023/ |website=makeuseof.com |date=18 October 2023}}</ref> Red can be used for extremely high-level programming ([[Domain-specific language|DSL]]s and [[Graphical user interface|GUI]]s) as well as low-level programming ([[operating system]]s and [[device driver]]s). Key to the approach is that the language has two parts: ''Red/System'' and ''Red''.<ref name="developpez">{{cite news |last1=Lucas |first1=Mathis |title=Red: an imperative and functional programming language that is also a "full battery" language|url=https://programmation.developpez.com/actu/346670/Red-un-langage-de-programmation-imperatif-et-fonctionnel-et-decrit-comme-un-langage-a-pile-complete-c-est-a-dire-qu-il-peut-etre-utilise-pour-la-programmation-de-haut-niveau-et-de-bas-niveau/ |newspaper=Developpez.com |date=21 July 2023 |access-date=16 January 2023}}</ref>
 
* ''Red/System'' is similar to C, but packaged into a Rebol lexical structure{{snd}} for example, one would write {{Smalltalk|if x > y [print "Hello"]}} instead of {{C-lang|if (x > y) {printf("Hello\n");} }}.
* ''Red'' is a [[homoiconicity|homoiconic language]], which is capable of [[meta-programming]] with Rebol-like semantics.<ref name="GS"/><ref name="Softpedia">{{cite web |titlelast=GettingSasu Started|first=Alexandru with|title=Review GUI Programming usingof Red Language |url=https://www.studytonightsoftpedia.com/postget/gettingProgramming/Coding-startedlanguages-withCompilers/Red-guiProgramming-programming-using-red-programming-language Language.shtml|website=StudytonightSoftpedia|date=22 November 2018|access-date=SeptemberFebruary 1721, 20212024}}</ref> capable of meta-programming, with Rebol-like semantics. Red's runtime library is written in Red/System, and uses a hybrid approach: it [[compiled language|compiles]] what it can deduce statically and uses an embedded [[interpreter (computing)|interpreter]] otherwise. The project roadmap includes a [[just-in-time compilation|just-in-time compiler]] for cases in between, but this has not yet been implemented.
 
Red seeks to remain independent of any other [[toolchain]]; it does its own code generation.<ref name="GS">{{cite web |title=Getting Started with GUI Programming using Red Language |url=https://www.studytonight.com/post/getting-started-with-gui-programming-using-red-programming-language |website=Studytonight |access-date=September 17, 2021}}</ref> It is therefore possible to [[cross compiler|cross-compile]]<ref name="MUO">{{cite web |title=6 Unusual & Groundbreaking Programming Languages to Learn in 2023|url=https://www.makeuseof.com/programming-languages-to-learn-in-2023/ |website=makeuseof.com |date=18 October 2023}}</ref> Red programs from any platform it supports to any other, via a command-line switch. Both Red and Red/System are distributed as [[open-source software]] under the [[modified BSD license]]. The runtime library is distributed under the more permissive [[Boost Software License]].
 
As of version 0.6.4 Red includes a [[garbage collection (computer science)|garbage collector]] "the Simple GC".<ref name=GC>{{Cite web|url=https://www.red-lang.org/2018/12/064-simple-gc-and-pure-red-gui-console.html|title=0.6.4 Simple GC and Pure Red GUI Console|quote=The main feature for 0.6.4 is what we call the Simple GC (Garbage Collector). A more advanced GC is planned for the future |lastauthor=lucindamichele|access-date=2018-12-16}}</ref>
 
[[File:Red architecture small.PNG|thumb|306px|Red Language architecture schema]]
 
==Introduction==
Red was introduced in the [[Netherlands]] in February 2011 at the ''Rebol & Boron conference''<ref>[http://www.osnews.com/story/24798/New_Red_Programming_Language_Gets_Syllable_Backend « New Red Programming Language Gets Syllable Backend »], ''osnews.com'', May 2011.</ref> by its author Nenad Rakočević. In September 2011, the Red programming language was presented to a larger audience during the [[Software Freedom Day]] 2011.<ref name="Red SFD 2011">[https://www.red-lang.org/2011/09/red-at-software-freedom-day-2011.html « Red Programming Language: Red at Software Freedom Day 2011 »], ''red-lang.org'', September 14, 2011.</ref><ref name="YT SFD 2011">{{cite web |title=Software Freedom Day 2011: Red programming language, a new REBOL dialect|url=https://www.youtube.com/watch?v=wgtgoliZ454 |website=YouTube | date=16 September 2011 |access-date=17 January 2023}}</ref> Rakočević is a long-time Rebol developer known as the creator of the Cheyenne [[HTTP server]].<ref>[http://cheyenne-server.org/about.shtml « What is Cheyenne? »] Last referenced Nov 2017.</ref>
 
==Features==
Red's syntax and semantics are very close to those of [[Rebol]].{{Sfn|Balbaert|2018}}<ref>{{cite web |title=The Dynamic Mapping Architecture |url=https://etd.ohiolink.edu/apexprod/rws_etd/send_file/send?accession=toledo1639760375713532&disposition=inline |website=OhioLINK |date=December 2021}}</ref> Like Rebol, it strongly supports [[metaprogramming]] and ___domain-specific languages ([[___domain-specific language|DSLs]]) and is therefore a highly efficient tool for dialecting (creating embedded DSLs). Red includes a dialect called Red/System, a C-level language which provides system programming facilities.<ref name="developpez">< /ref> Red is easy to integrate with other tools and languages as a DLL (libRed) and very lightweight (around 1&nbsp;MB). It is also able to cross-compile to various platforms (see Cross Compilation section below) and create packages for platforms that require them (e.g., .APK on Android).<ref name="developpez">< /ref> Red also includes a fully reactive cross-platform GUI system based on an underlying reactive dataflow engine, a 2D drawing dialect comparable to SVG, compile-time and runtime macro support, and more than 40 standard datatypes.
 
==Goals==
The following is the list of Red's Goals as presented on the [[Software Freedom Day]] 2011:<ref name="Red SFD 2011">< /ref><ref name="YT SFD 2011">< /ref>
 
* Simplicity ("An IDE should not be necessary to write code.")
Line 51 ⟶ 52:
* Portability, Write once run everywhere ("That's the least expected from a programming language.")
* Flexibility ("Not best but good fit for any task!")
 
==Commercial applications==
The following commercial applications are currently developed on Red:
 
* DiaGrammar<ref name="DiaGrammar">[https://red-lang.org/2020/03/ «DiaGrammar»], ''red-lang.org'', March 2020.</ref> — Live coded diagramming
* SmartXML<ref name="SmartXML">[https://redata.dev/smartxml/ «SmartXML»], ''redata.dev''.</ref> — XML parsing tool.
 
==Development==
Line 59 ⟶ 66:
 
==Cross compilation==
Red currently supports the following cross-compilation targets:{{Sfn|Balbaert|2018}}
 
* [[MS-DOS]]: Windows, [[x86]], console (and GUI) applications
Line 68 ⟶ 75:
* [[FreeBSD]]: [[x86]]
* [[Darwin (operating system)|Darwin]]: [[OS X]] Intel, console (and GUI) applications
* [[Syllable Desktop|Syllable]]: [[Syllable Desktop|Syllable OS]], [[x86]]
* [[Android (operating system)|Android]]: Android, [[ARM architecture|ARMv5]]
* Android-x86: Android, [[x86]]
<small>(Note: ThisPresently, listRed willapplications increaseare with32-bit, timebut andit shouldis thereforeplanned beto consideredswitch asto incomplete64-bit in the future.{{Sfn|Balbaert|2018}})</small>
 
==Hello World!==
The [["Hello, World!" program]] in Red:
<syntaxhighlight lang="red">
Red [Title: "Simple hello world script"]
print "Hello, World!"
</syntaxhighlight>
 
Line 108 ⟶ 115:
 
==See also==
{{Portal|Free and open-source software|Computer programming}}
 
* [[Rebol]]
* [[Comparison of programming languages]]
* [[History of programming languages]]
* [[List of programming languages]]
* [[List of programming languages by type]]
 
==References==
Line 115 ⟶ 126:
 
== Further reading ==
* {{Cite book |last1=Balbaert |first1=Ivo |date=May 2018 |title=Learn Red - Fundamentals of Red|publisher=[[Packt Publishing]]|asin=B07C5X8Q32|isbn=978-1789130706 |language=en}}
 
==External links==
{{commons category}}
* {{official website}}
* [https://www.red-lang.org/p/download.html Latest builds from official website]
* {{GitHub|red/redRed}}
* [https://red.github.io/ Red Programming Language] on [[GitHub]]
* [https://redprogramming.com/ Redprogramming.com]
* [https://helpin.red/Downloads.html/ Helpin' Red] {{Webarchive|url=https://web.archive.org/web/20210928093654/https://helpin.red/Downloads.html |date=2021-09-28 }}
 
{{Programming languages}}
Line 137 ⟶ 148:
[[Category:Cross-platform free software]]
[[Category:Cross-platform software]]
[[Category:Free compilers and interpretersopen source compilers]]
[[Category:Free and open source interpreters]]
[[Category:Software using the BSD license]]
[[Category:Software using the Boost license]]