Rebol

Rebol
Paradigmlanguage oriented programming, data exchange, functional, prototype-based, imperative
Designed byCarl Sassenrath
DeveloperREBOL Technologies
First appeared1997; 27 years ago (1997)
Stable release
2.7.8 / January 2011; 13 years ago (2011-01)
Preview release
2.101.0 / December 2012; 12 years ago (2012-12)
Typing disciplinedynamic, strong
OScross-platform
License2.7.8 is Freely redistributable software,[1] 2.101.0 has Apache 2.0 license[2]
Filename extensions.r, .reb[3]
Websitewww.rebol.com
Influenced by
Self, Forth, Lisp, Logo[4]
Influenced
JSON,[5] Red

Rebol (/ˈrɛbəl/ REB-əl; historically REBOL) is a cross-platform[6] data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing. It introduces the concept of dialecting: small, optimized, domain-specific languages for code and data,[6][7] which is also the most notable property of the language according to its designer Carl Sassenrath:

Although it can be used for programming, writing functions, and performing processes, its greatest strength is the ability to easily create domain-specific languages or dialects

— Carl Sassenrath[8]

Douglas Crockford, known for his involvement in the development of JavaScript, has described Rebol as "a more modern language, but with some very similar ideas to Lisp, in that it's all built upon a representation of data which is then executable as programs" and as one of JSON's influences.[5]

Originally, the language and its official implementation were proprietary and closed source, developed by REBOL Technologies. Following discussion with Lawrence Rosen,[9] the Rebol version 3 interpreter was released under the Apache 2.0 license on December 12, 2012.[10] Older versions are only available in binary form, and no source release for them is planned.

Rebol has been used to program Internet applications (both client- and server-side), database applications, utilities, and multimedia applications.[6]

Etymology

Rebol was initially an acronym for Relative Expression Based Object Language written in all caps.[6][8] To align with modern trends in language naming represented, e.g. by the change replacing historical name LISP by Lisp, programmers ceased the practice of writing REBOL in all caps. Sassenrath eventually put the naming question to the community debate on his blog.[11] In subsequent writing, Sassenrath adopted the convention of writing the language name as Rebol.[12]

History

First released in 1997, Rebol was designed over a 20-year period by Carl Sassenrath, the architect and primary developer of AmigaOS, based on his study of denotational semantics and using concepts from the programming languages Lisp, Forth, Logo, and Self.

  1. REBOL Technologies was founded in 1998.
  2. REBOL 2, the interpreter, which became the core of extended interpreter editions, was first released in 1999.
    1. REBOL/Command, which added strong encryption and ODBC access, was released in September 2000.
    2. REBOL/View was released in April 2001, adding graphical abilities on the core language.
    3. REBOL/IOS, an extensible collaboration environment built with REBOL was released in August 2001.
    4. REBOL/SDK, providing a choice of kernels to bind against, as well as a preprocessor, was released in December 2002.
  3. Rebol 3 [R3], the newest version of the interpreter, had alpha versions released by REBOL Technologies since January 2008. Since its release as an Apache 2 project in December 2012, it is being developed by the Rebol community.[13]

Design

Ease of use

One of the Rebol design principles is "to do simple things in simple ways".[6] In the following example the Visual interface dialect is used to describe a simple Hello world program with a graphical user interface:

view layout [text "Hello world!" button "Quit" [quit]]

This is how a similar example looks in R3-GUI:

view [text "Hello world!" button "Quit" on-action [quit]]

R3-GUI Hello world example

Dialects

Rebol domain-specific languages, called dialects, are micro-languages optimized for a specific purpose. Dialects can be used to define business rules, graphical user interfaces or sequences of screens during the installation of a program. Users can define their own dialects, reusing any existing Rebol word and giving it a specific meaning in that dialect.[6] Dialects are interpreted by functions processing Rebol blocks (or parsing strings) in a specific way.

An example of Rebol's dialecting abilities can be seen with the word return. In the data exchange dialect return is just a word not having any specific meaning. In the do dialect, return is a global variable referring to a native function passing back a function result value.[4] In the visual interface dialect (VID), return is a keyword causing the layout engine to simulate a carriage return, moving the "rendering pen" down to the beginning of the next line.[7]

A Rebol interpreter with graphical abilities must understand and interpret many dialects. The table below lists the most important ones in order of significance.

Dialect name Interpreted by Purpose
Data exchange dialect load function represents data and metadata; common platform for Rebol dialects
Do dialect do function programming
Parse dialect parse function pattern matching
Function specification dialect make function function definition; functional programming
Object specification dialect make function object definition/inheritance; prototype-based programming
Visual interface dialect (VID)
or
RebGUI
layout function
or
display function
specifies graphical user interface
Draw dialect view function defines graphical elements (lines, polygons, etc.)
Script specification dialect do function script definition
Security policy dialect secure function specifies security policy

Syntax

Rebol syntax is free-form, not requiring specific positioning. However, indentation is often used to better convey the structure of the text to human readers.

Syntactic properties of different dialects may differ. The common platform for all Rebol dialects is the data exchange dialect; other dialects are usually derived from it. In addition to being the common platform for all dialects, the data exchange dialect is directly used to represent data and metadata, populate data structures, send data over Internet, and save them in data storage.

In contrast to programming languages like C, the data exchange dialect does not consist of declarations, statements, expressions or keywords. A valid data exchange dialect text stream is a tree data structure consisting of blocks (the root block is implicit, subblocks are delimited by square brackets), parens (delimited by round brackets), strings (delimited by double quotes or curly brackets suitable for multi-line strings; caret notation is used for unprintable characters), URLs, e-mail addresses, files, paths or other composite values. Unlike ALGOL blocks, Rebol blocks are composite values similar to quoted s-expressions in Lisp. The fact that code is written in the form of Rebol blocks makes the language homoiconic.[4]

Blocks as well as parens may contain other composite values (a block may contain subblocks, parens, strings, ...) or scalar values like words, set-words (words suffixed by the colon), get-words (words prefixed by the colon), lit-words (words prefixed by the apostrophe), numbers, money, characters, etc., separated by whitespace. Special characters are allowed in words, so a+b is a word unlike a + b, which is a sequence of three words separated by spaces.

Comments may appear following the semicolon until the end of the line. Multi-line comments or comments not ignored by the lexical parser can be written using "ordinary" datatypes like multi-line strings.[4]

Semantics

Blocks containing domain-specific language can be submitted as arguments to specific evaluator functions.[6]

do

The most frequently used evaluator is the do function. It is used by default to interpret the text input to the interpreter console.

The do dialect interpreted by the do function, is an expression-oriented sublanguage of the data exchange dialect. The main semantic unit of the language is the expression. In contrast to imperative programming languages descending from ALGOL, the do dialect has neither keywords, nor statements.

Words are used as case-insensitive variables. Like in all dynamically typed languages, variables don't have an associated type, type is associated with values. The result, i.e. the evaluation of a word is returned, when a word is encountered by the do function. The set-word form of a word can be used for assignment. While not having statements, assignment, together with functions with side-effects can be used for imperative programming.[4]

Subblocks of the root block evaluate to themselves. This property is used to handle data blocks, for structured programming by submitting blocks as arguments to control functions like if, either, loop, etc., and for dialecting, when a block is passed to a specific interpreter function.[6]

A specific problem worth noting is that composite values, assigned to variables, are not copied. To make a copy, the value must be passed to the copy function.[4]

The do function normally follows a prefix style of evaluation, where a function processes the arguments that follow it. However, infix evaluation using infix operators exists too. Infix evaluation takes precedence over the prefix evaluation. For example,

abs -2 + 3

returns 1, since the infix addition takes precedence over the computation of the absolute value. When evaluating infix expressions, the order of evaluation is left to right, no operator takes precedence over another. For example,

2 + 3 * 4

returns 20, while an evaluation giving precedence to multiplication would yield 14. All operators have prefix versions. Do usually evaluates arguments before passing them to a function. So, the below expression:

first reads the Wikipedia Rebol page and then passes the result to the print function. Parentheses can be used to change the order of evaluation. Using prefix notation, the usage of parentheses in expressions can be avoided.[4]

The simple precedence rules are both an advantage:

  • No need to "consult" precedence tables when writing expressions
  • No need to rewrite precedence tables when a new operator is defined
  • Expressions can be easily transliterated from infix to prefix notation and vice versa

as well as a disadvantage:

  • Users accustomed to more conventional precedence rules may easily make a mistake[6]

parse

The parse function is preferably used to specify, validate, transform and interpret dialects. It does so by matching parse expressions at run time.[6]

Parse expressions are written in the parse dialect, which, like the do dialect, is an expression-oriented sublanguage of the data exchange dialect. Unlike the do dialect, the parse dialect uses keywords representing operators and the most important nonterminals, infix parsing operators don't have prefix equivalents and use precedence rules (sequence has higher precedence than choice).[6]

Actions can be included to be taken during the parsing process as well and the parse function can be used to process blocks or strings. At the string parsing level parse must handle the "low level" parsing, taking into account characters and delimiters. Block parsing is higher level, handling the scanning at the level of Rebol values.[6]

The parse dialect belongs to the family of grammars represented by the top-down parsing language or the parsing expression grammar (PEG). The main similarity is the presence of the sequence and choice operators all the family members have. Parse dialect syntax and the similarities between the parse dialect and the PEG are illustrated by this transliteration of a PEG example that parses an arithmetic expression:

Digit: charset [#"0" - #"9"]
Value: [some Digit | "(" Expr ")"]
Product: [Value any [["*"| "/"] Value]]
Sum: [Product any [["+"| "-"] Product]]
Expr: Sum
parse/all "12+13" Expr

Implementations

The official Rebol 2.7.8 implementation is available in several editions (/Core, /View, /Command, /SDK and /IOS). Both /Core and /View editions are freely redistributable software.[1]

The runtime environment is stored in a single executable file. Rebol/Core 2.7.8, the console edition, is about 300 KB and Rebol/View 2.7.8, the graphical user interface edition, is about 650 KB in size.

Rebol/View provides platform-independent graphics and sound access, and comes with its own windowing toolkit and extensible set of styles (GUI widgets). Extended editions, such as Rebol/Command 2.7.8 or Rebol/SDK 2.7.8 require a paid license; they add features like ODBC data access, and the option to create standalone executable files.[citation needed]

Legacy

  • Rebol was named by Douglas Crockford as one of the inspirations of JavaScript Object Notation.[5]
  • Rebol inspired the open-source Orca project, which is an interpreted Rebol-like language.[14]
  • Boron is an interpreted, homoiconic language inspired by and similar to Rebol, which is meant for embedding domain specific languages. It is implemented as a C library licensed under the terms of the LGPLv3.
  • The Red programming language was directly inspired by Rebol, yet the implementation choices of Red were geared specifically to overcoming its perceived limitations.[15]

See also

References

  1. ^ a b REBOL Technologies. The REBOL/View and REBOL/Core 2.7.8 license
  2. ^ R3 source at GitHub
  3. ^ "Carl's REBOL Blog - Let's switch to .reb suffix". Rebol.com. August 18, 2013. Retrieved January 23, 2014.
  4. ^ a b c d e f g Goldman, E., Blanton, J. (2000). REBOL: The Official Guide. McGraw-Hill Osborne Media. ISBN 0-07-212279-X.
  5. ^ a b c Crockford, Douglas. The JSON Saga, jsonsaga.ppt Archived October 4, 2012, at the Wayback Machine
  6. ^ a b c d e f g h i j k l Roberts, Ralph (2000). REBOL for Dummies. Hungry Minds. ISBN 0-7645-0745-1.
  7. ^ a b Auverlot, Olivier (2001). Rebol Programmation. Eyrolles. ISBN 2-212-11017-0.
  8. ^ a b Sassenrath, Carl (July 1, 2000). "Inside the REBOL scripting language". Dr. Dobb's Journal.
  9. ^ "REBOL to become open source". Rebol.com. September 25, 2012. Retrieved January 23, 2014.
  10. ^ Sassenrath, Carl (December 12, 2012). "Comments on: R3 Source Code Released!". Retrieved August 14, 2014. You probably thought the source release would never happen? Am I right? Well, it's there now in github at github.com/rebol/rebol.
  11. ^ "Calling REBOL Rebol?". December 14, 2012. Archived from the original on December 3, 2013. Retrieved December 2, 2013.
  12. ^ Sassenrath, Carl. "Cross-compiling Rebol for your favorite embedded board". Retrieved September 16, 2016.
  13. ^ "Source code for the Rebol interpreter". rebol/rebol GitHub. Retrieved March 14, 2017.
  14. ^ The rebol-orca project at Freecode
  15. ^ The Red project at GitHub

Further reading

Read other articles:

 SosiologiDiagram Analisis Jejaring Sosial Portal Teori dan Sejarah Positivisme · Antipositivisme Fungsionalisme · Teori konflik Strukturalisme · Interaksi simbolik · Jarak menengah · Matematis Teori kritis · Sosialisasi Struktur dan agen Metode penelitian Kuantitatif · Kualitatif Komputasional · Etnografi Topik dan Cabang agama · budaya · demografi ekonomi · hukum · ilmu · industri internet · jejaring sosial · jenis kelamin kejahatan · kelas · keluarga kesehatan · kota...

 

Este artículo o sección sobre biografías necesita ser wikificado, por favor, edítalo para que cumpla con las convenciones de estilo.Este aviso fue puesto el 4 de mayo de 2012. Apollo Granforte Información personalNacimiento 20 de julio de 1886 Legnago (Italia) Fallecimiento 11 de junio de 1975 (88 años)Milán (Italia) Nacionalidad Italiana (1946-1975)Información profesionalOcupación Cantante de ópera Años activo desde 1913Instrumento Voz Tipo de voz Barítono [editar datos...

 

Церква святого Сікста 45°03′25″ пн. ш. 9°41′33″ сх. д. / 45.057029000028° пн. ш. 9.69256200002777746° сх. д. / 45.057029000028; 9.69256200002777746Координати: 45°03′25″ пн. ш. 9°41′33″ сх. д. / 45.057029000028° пн. ш. 9.69256200002777746° сх. д. / 45.057029000028; 9.69256200002777746Тип ...

2016 studio album by MetallicaHardwired... to Self-DestructStudio album by MetallicaReleasedNovember 18, 2016 (2016-11-18)RecordedMay 2015 – August 2016StudioMetallica's HQ (San Rafael, California)Genre Heavy metal thrash metal Length77:42LabelBlackenedProducer Greg Fidelman James Hetfield Lars Ulrich Metallica chronology Metallica: Through the Never(2013) Hardwired... to Self-Destruct(2016) S&M2(2020) Metallica studio album chronology Death Magnetic(2008) Hardwir...

 

TrillerPengembangTriller, IncRilis perdana23 Juli 2015; 8 tahun lalu (2015-07-23)Rilis stabil49.1 / 4 Mei 2023; 6 bulan lalu (2023-05-04) Sistem operasiAndroid, iOSUkuran173.1 MB (iOS)[1] 127 MB (Android)[2]JenisBerbagi videoSitus webtriller.co Triller adalah layanan jejaring sosial berbagi video Amerika. Layanan ini memungkinkan pengguna untuk membuat dan berbagi video berdurasi pendek, termasuk video yang disetel, atau secara otomatis disinkronkan ke musik mengguna...

 

كأس السوبر الإيطالي 2021استضاف ملعب السان سيرو في ميلانو المباراةالحدثكأس السوبر الإيطالي إنتر ميلان يوفنتوس الدوري الإيطالي كأس إيطاليا 2 1 بعد الوقت الإضافيالتاريخ20 يناير 2021 (2021-01-20)الملعبالسان سيرو، ميلانورجل المباراةأليكسيس سانشيز (إنتر ميلان)[1]الحكمدانيي...

جغرافيا بوتسوانامعلومات عامةالبلد بوتسوانا القارة إفريقيا الحدود ناميبياجنوب إفريقيازامبيازيمبابوي الأرض والتضاريسالمساحة 581٬737 كم² نسبة المياه 2٫5 أعلى نقطة Otse Hill (en) أدنى نقطة نهر ليمبوبو تعديل - تعديل مصدري - تعديل ويكي بيانات 22°00′S 24°00′E / 22.000°S 24.000°E / -22.000;...

 

1948 film by Ray Nazarro Singin' SpursTheatrical release posterDirected byRay NazarroScreenplay byBarry ShipmanProduced byColbert ClarkStarringKirby GrantPatricia BarryLee PatrickJay SilverheelsDick ElliottWilliam WilkersonCinematographyRex WimpyEdited byPaul BorofskyProductioncompanyColumbia PicturesDistributed byColumbia PicturesRelease date September 23, 1948 (1948-09-23) Running time62 minutesCountryUnited StatesLanguageEnglish Singin' Spurs is a 1948 American Western music...

 

Ministry of TransportKementerian Pengangkutan(MOT)Coat of arms of MalaysiaMinistry overviewFormed1978; 45 years ago (1978)Preceding MinistryMinistry of CommunicationsJurisdictionGovernment of MalaysiaHeadquartersNo. 26, Tun Hussein Road, Precinct 4, Federal Government Administrative Centre, 62100 PutrajayaMottoSustainable Transport The Heart of National Development (Pengangkutan Mampan Nadi Pembangunan Negara)Employees12,600 (2017)Annual budgetMYR 4,478,981,600 (2017)Ministe...

中国共产党第十七届中央委员会由中国共产党第十七次全国代表大会于2007年10月21日在北京选举产生。大会选出中央委员会委员204名,中央候补委员167名。 人员名单 中央委员会委员 参见中国共产党第十七届中央委员会委员列表以获取更详尽的列表。 中央政治局委员 查论编中国共产党第十七届中央政治局2007年10月22日中共十七届一中全会选举产生,2007年10月至2012年11月任职9 ...

 

Radio station in San Martín Texmelucan, Puebla XHMAXX-FMSan Martín Texmelucan, Puebla, MexicoBroadcast areaSan Martín Texmelucan, PueblaFrequency98.1 FMBrandingStereo MaxProgrammingFormatGruperaOwnershipOwnerCinco Radio(Radio XHMAXX, S.A. de C.V.)HistoryFirst air dateJune 8, 1993 (concession)Former call signsXHSTX-FM (1993–1998)Call sign meaningMAXXTechnical informationERP50 kW[1]LinksWebsitecincoradio.com.mx/estacion/stereo-max/ XHMAXX-FM is a radio station on 98.1 FM in San Mar...

 

Pemilihan Umum Bupati Gunungkidul 2020201520249 Desember 2020[1]Kandidat   Calon Sutrisna Wibawa Immawan Wahyudi Bambang Wisnu Handoyo Partai PAN NasDem PDI-P Pendamping Mahmud Ardi Widanto Martanty Soenar Dewi Benyamin Sudarmadi Suara rakyat 144.012 53.576 116.881 Persentase 30,61% 11,39% 24,85%   Calon Sunaryanta Partai Partai Golongan Karya Pendamping Heri Susanto Suara rakyat 155.876 Persentase 33,15% Peta persebaran suara      Sutrisna...

Institut de hautes études internationales et du développement (IHEID)HistoireFondation 2008StatutType Haute écoleRégime linguistique Anglais et françaisDirecteur Marie-Laure SallesMembre de Europaeum, APSIA, AUF, EUA, ECUR, EADISite web graduateinstitute.chChiffres-clésÉtudiants 951 (82 % d'étudiants internationaux, non-suisses)Enseignants Professeurs : 58Chargés d’enseignement et de recherche : 11Enseignants invités : 35Chercheurs invités : 3Localisation...

 

2010 Indian romantic comedy-drama film AishaIndian posterDirected byRajshree OjhaWritten byDevika Bhagat (dialogue) Ritu Bhatia (dialogue)Manu Rishi (dialogue)Screenplay byDevika BhagatBased onEmma by Jane AustenCluelessProduced bySunil ManchandaRhea KapoorAnil KapoorStarringSonam KapoorAbhay DeolIra DubeyCyrus SahukarAmrita PuriAnand TiwariArunoday SinghLisa HaydonCinematographyDiego RodriguezEdited byA. Sreekar PrasadMusic byAmit TrivediProductioncompanyAnil Kapoor Films CompanyDistributed ...

 

Battle of MookerheydePart of the Eighty Years' WarDate14 April 1574LocationMook en Middelaar, Limburg(present-day the Netherlands)Result Spanish victoryBelligerents Dutch RebelsGerman mercenaries SpainCommanders and leaders Louis of Nassau  † Henry of Nassau  † Sancho d'Avila Bernardino de MendozaStrength 5,500 infantry2,600 cavalry 5,000 infantry800 cavalryCasualties and losses 3,000 dead or wounded 150 dead or wounded vteEighty Years' War Origins – List of battles 15...

Một phần của loạt bài vềVăn hóa Phần Lan Lịch sử Dân tộc Ngôn ngữ Ẩm thực Biểu tượng Quốc kỳ Quốc ca Quốc huy xts Biểu tượng dân tộc Phần Lan bao gồm các hình tượng từ thiên nhiên và các danh nhân người Phần thường được gắn liền với bản sắc dân tộc Phần Lan,[1] trong số đó nổi tiếng nhất là quốc kỳ Phần Lan và con sư tử với dáng đứng uy hiếp theo quốc huy Phần ...

 

Municipality in Central-West, BrazilMinaçuMunicipality FlagCoat of armsLocation in Goiás stateMinaçuLocation in BrazilCoordinates: 13°31′58″S 48°13′12″W / 13.53278°S 48.22000°W / -13.53278; -48.22000CountryBrazilRegionCentral-WestStateGoiásMicroregionPorangatu MicroregionArea • Total2,860.7 km2 (1,104.5 sq mi)Elevation351 m (1,152 ft)Population (2020 [1]) • Total28,793 • Density10...

 

Taiwanese TV series or program Mute WifeDVD coverAlso known asSix Dreams: Mute Wife[1]Traditional Chinese啞妻Simplified Chinese哑妻Hanyu PinyinYǎ Qī Written byLin Ling-lingChiung YaoDirected byShen YiStarringLeanne LiuLin Jui-yangOpening themeWuyan de Nahan (無言的吶喊) performed by Lily DuoEnding themeWuyu Wen Cangtian (無語問蒼天) performed by Sammi KaoCountry of originTaiwanOriginal languageMandarinNo. of episodes19ProductionRunning time45 minutesOriginal ...

Nemesis of Hindu deity Kalki Not to be confused with the goddess Kali. KaliPersonification of AdharmaPoster of KaliDevanagariकलि/कलीSanskrit transliterationKaliAffiliationAsura AdharmaAbodeNarakaPersonal informationParentsKrodha (father)Himsa (mother)SiblingsDuruktiConsortDuruktiChildrenDumvishnuNiraswatiVishbrahmaAlakshmi This article contains Indic text. Without proper rendering support, you may see question marks or boxes, misplaced vowels or missing conjuncts instead of In...

 

Dark nebula in the constellation Orion Horsehead NebulaDark nebuladiffuseThe Horsehead Nebula. The reflection nebula NGC 2023 is in the bottom left corner and the nebula itself near the centre, in the shape of the head of a horse. Photo taken in 2011Observation data: J2000.0 epochRight ascension05h 40m 59.0sDeclination−02° 27′ 30.0Distance1,375±54[1][note 1] ly   (422±17[1] pc)Apparent magnitude (V)6.8Apparent dimensions (V)8 × 6 arcmin...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!