From 3d26429ce202f4d00f80182d460ee5b3ccdc87c4 Mon Sep 17 00:00:00 2001 From: Dave Andersen Date: Sun, 9 Aug 2015 22:43:10 -0700 Subject: update "further reading" links Change the chat room reference from Stack Overflow chat to Gitter.im, and add a link to the "Red" Stack Overflow tag. --- red.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 73a13606..f33060c4 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -212,7 +212,9 @@ The source can be found on [github](https://github.com/red/red). The Red/System language specification can be found [here](http://static.red-lang.org/red-system-specs-light.html). -To learn more about Rebol and Red join the [chat on StackOverflow](http://chat.stackoverflow.com/rooms/291/rebol-and-red). You will need 20 points to chat but if you ask or answer questions about Red or Rebol we will help you get those points. And if that is not working for you drop a mail to us on the [Red mailing list](mailto: red-langNO_SPAM@googlegroups.com) (remove NO_SPAM). +To learn more about Rebol and Red join the [chat on Gitter](https://gitter.im/red/red). And if that is not working for you drop a mail to us on the [Red mailing list](mailto: red-langNO_SPAM@googlegroups.com) (remove NO_SPAM). + +Browse or ask questions on [Stack Overflow](stackoverflow.com/questions/tagged/red). Maybe you want to try Red right away? That is possible on the [try Rebol and Red site](http://tryrebol.esperconsultancy.nl). -- cgit v1.2.3 From 960ee4a1856db8eadb96277bb2422edfa8f2a81c Mon Sep 17 00:00:00 2001 From: Gabriel Halley Date: Wed, 7 Oct 2015 23:11:24 -0400 Subject: removing whitespace all over --- red.html.markdown | 88 +++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index f33060c4..05da3c3f 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -8,31 +8,31 @@ contributors: --- -Red was created out of the need to get work done, and the tool the author wanted to use, the language of REBOL, had a couple of drawbacks. +Red was created out of the need to get work done, and the tool the author wanted to use, the language of REBOL, had a couple of drawbacks. It was not Open Sourced at that time and it is an interpreted language, what means that it is on average slow compared to a compiled language. Red, together with its C-level dialect Red/System, provides a language that covers the entire programming space you ever need to program something in. -Red is a language heavily based on the language of REBOL. Where Red itself reproduces the flexibility of the REBOL language, the underlying language Red will be built upon, -Red/System, covers the more basic needs of programming like C can, being closer to the metal. +Red is a language heavily based on the language of REBOL. Where Red itself reproduces the flexibility of the REBOL language, the underlying language Red will be built upon, +Red/System, covers the more basic needs of programming like C can, being closer to the metal. -Red will be the world's first Full Stack Programming Language. This means that it will be an effective tool to do (almost) any programming task on every level -from the metal to the meta without the aid of other stack tools. -Furthermore Red will be able to cross-compile Red source code without using any GCC like toolchain +Red will be the world's first Full Stack Programming Language. This means that it will be an effective tool to do (almost) any programming task on every level +from the metal to the meta without the aid of other stack tools. +Furthermore Red will be able to cross-compile Red source code without using any GCC like toolchain from any platform to any other platform. And it will do this all from a binary executable that is supposed to stay under 1 MB. Ready to learn your first Red? ``` -All text before the header will be treated as comment, as long as you avoid using the -word "red" starting with a capital "R" in this pre-header text. This is a temporary -shortcoming of the used lexer but most of the time you start your script or program -with the header itself. -The header of a red script is the capitalized word "red" followed by a +All text before the header will be treated as comment, as long as you avoid using the +word "red" starting with a capital "R" in this pre-header text. This is a temporary +shortcoming of the used lexer but most of the time you start your script or program +with the header itself. +The header of a red script is the capitalized word "red" followed by a whitespace character followed by a block of square brackets []. -The block of brackets can be filled with useful information about this script or +The block of brackets can be filled with useful information about this script or program: the author's name, the filename, the version, the license, a summary of what the program does or any other files it needs. -The red/System header is just like the red header, only saying "red/System" and +The red/System header is just like the red header, only saying "red/System" and not "red". Red [] @@ -49,21 +49,21 @@ comment { ; Your program's entry point is the first executable code that is found ; no need to restrict this to a 'main' function. -; Valid variable names start with a letter and can contain numbers, -; variables containing only capital A thru F and numbers and ending with 'h' are -; forbidden, because that is how hexadecimal numbers are expressed in Red and +; Valid variable names start with a letter and can contain numbers, +; variables containing only capital A thru F and numbers and ending with 'h' are +; forbidden, because that is how hexadecimal numbers are expressed in Red and ; Red/System. ; assign a value to a variable using a colon ":" my-name: "Red" -reason-for-using-the-colon: {Assigning values using the colon makes - the equality sign "=" exclusively usable for comparisons purposes, - exactly what "=" was intended for in the first place! +reason-for-using-the-colon: {Assigning values using the colon makes + the equality sign "=" exclusively usable for comparisons purposes, + exactly what "=" was intended for in the first place! Remember this y = x + 1 and x = 1 => y = 2 stuff from school? } is-this-name-valid?: true -; print output using print, or prin for printing without a newline or linefeed at the +; print output using print, or prin for printing without a newline or linefeed at the ; end of the printed text. prin " My name is " print my-name @@ -77,20 +77,20 @@ My name is Red ; ; Datatypes ; -; If you know Rebol, you probably have noticed it has lots of datatypes. Red -; does not have yet all those types, but as Red want to be close to Rebol it +; If you know Rebol, you probably have noticed it has lots of datatypes. Red +; does not have yet all those types, but as Red want to be close to Rebol it ; will have a lot of datatypes. -; You can recognize types by the exclamation sign at the end. But beware -; names ending with an exclamation sign are allowed. -; Some of the available types are integer! string! block! - -; Declaring variables before using them? -; Red knows by itself what variable is best to use for the data you want to use it -; for. -; A variable declaration is not always necessary. +; You can recognize types by the exclamation sign at the end. But beware +; names ending with an exclamation sign are allowed. +; Some of the available types are integer! string! block! + +; Declaring variables before using them? +; Red knows by itself what variable is best to use for the data you want to use it +; for. +; A variable declaration is not always necessary. ; It is considered good coding practise to declare your variables, ; but it is not forced upon you by Red. -; You can declare a variable and specify its type. a variable's type determines its +; You can declare a variable and specify its type. a variable's type determines its ; size in bytes. ; Variables of integer! type are usually 4 bytes or 32 bits @@ -101,7 +101,7 @@ my-integer: 0 type? my-integer integer! -; A variable can be initialized using another variable that gets initialized +; A variable can be initialized using another variable that gets initialized ; at the same time. i2: 1 + i1: 1 @@ -111,9 +111,9 @@ i2 - i1 ; result 1 i2 * i1 ; result 2 i1 / i2 ; result 0 (0.5, but truncated towards 0) -; Comparison operators are probably familiar, and unlike in other languages you +; Comparison operators are probably familiar, and unlike in other languages you ; only need a single '=' sign for comparison. -; There is a boolean like type in Red. It has values true and false, but also the +; There is a boolean like type in Red. It has values true and false, but also the ; values on/off or yes/no can be used 3 = 2 ; result false @@ -125,15 +125,15 @@ i1 / i2 ; result 0 (0.5, but truncated towards 0) ; ; Control Structures -; +; ; if -; Evaluate a block of code if a given condition is true. IF does not return any value, +; Evaluate a block of code if a given condition is true. IF does not return any value, ; so cannot be used in an expression. if a < 0 [print "a is negative"] ; either -; Evaluate a block of code if a given condition is true, else evaluate an alternative -; block of code. If the last expressions in both blocks have the same type, EITHER can +; Evaluate a block of code if a given condition is true, else evaluate an alternative +; block of code. If the last expressions in both blocks have the same type, EITHER can ; be used inside an expression. either a < 0 [ either a = 0 [ @@ -147,7 +147,7 @@ either a < 0 [ print ["a is " msg lf] -; There is an alternative way to write this +; There is an alternative way to write this ; (Which is allowed because all code paths return a value of the same type): msg: either a < 0 [ @@ -162,7 +162,7 @@ msg: either a < 0 [ print ["a is " msg lf] ; until -; Loop over a block of code until the condition at end of block, is met. +; Loop over a block of code until the condition at end of block, is met. ; UNTIL does not return any value, so it cannot be used in an expression. c: 5 until [ @@ -172,11 +172,11 @@ until [ ] ; will output: ooooo -; Note that the loop will always be evaluated at least once, even if the condition is +; Note that the loop will always be evaluated at least once, even if the condition is ; not met from the beginning. ; while -; While a given condition is met, evaluate a block of code. +; While a given condition is met, evaluate a block of code. ; WHILE does not return any value, so it cannot be used in an expression. c: 5 while [c > 0][ @@ -206,7 +206,7 @@ print twice b ; will output 6. ## Further Reading -The main source for information about Red is the [Red language homepage](http://www.red-lang.org). +The main source for information about Red is the [Red language homepage](http://www.red-lang.org). The source can be found on [github](https://github.com/red/red). @@ -218,4 +218,4 @@ Browse or ask questions on [Stack Overflow](stackoverflow.com/questions/tagged/r Maybe you want to try Red right away? That is possible on the [try Rebol and Red site](http://tryrebol.esperconsultancy.nl). -You can also learn Red by learning some [Rebol](http://www.rebol.com/docs.html). +You can also learn Red by learning some [Rebol](http://www.rebol.com/docs.html). -- cgit v1.2.3 From 3e7394b79631297b2aef7d0e940645a54b1758ee Mon Sep 17 00:00:00 2001 From: robochat Date: Tue, 1 Nov 2016 10:38:47 +0100 Subject: [red/en] changing the formatting of comments so that lines are always less than 80 characters. --- red.html.markdown | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 05da3c3f..6d10fe8f 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -23,17 +23,17 @@ from any platform to any other platform. And it will do this all from a binary e Ready to learn your first Red? ``` -All text before the header will be treated as comment, as long as you avoid using the -word "red" starting with a capital "R" in this pre-header text. This is a temporary -shortcoming of the used lexer but most of the time you start your script or program -with the header itself. +All text before the header will be treated as comment, as long as you avoid +using the word "red" starting with a capital "R" in this pre-header text. +This is a temporary shortcoming of the used lexer but most of the time you +start your script or program with the header itself. + The header of a red script is the capitalized word "red" followed by a -whitespace character followed by a block of square brackets []. -The block of brackets can be filled with useful information about this script or -program: the author's name, the filename, the version, the license, a summary of -what the program does or any other files it needs. -The red/System header is just like the red header, only saying "red/System" and -not "red". +whitespace character followed by a block of square brackets []. The block of +brackets can be filled with useful information about this script or program: +the author's name, the filename, the version, the license, a summary of what +the program does or any other files it needs. The red/System header is just +like the red header, only saying "red/System" and not "red". Red [] @@ -50,9 +50,9 @@ comment { ; no need to restrict this to a 'main' function. ; Valid variable names start with a letter and can contain numbers, -; variables containing only capital A thru F and numbers and ending with 'h' are -; forbidden, because that is how hexadecimal numbers are expressed in Red and -; Red/System. +; variables containing only capital A thru F and numbers and ending with 'h' +; are forbidden, because that is how hexadecimal numbers are expressed in Red +; and Red/System. ; assign a value to a variable using a colon ":" my-name: "Red" @@ -63,8 +63,8 @@ reason-for-using-the-colon: {Assigning values using the colon makes } is-this-name-valid?: true -; print output using print, or prin for printing without a newline or linefeed at the -; end of the printed text. +; print output using print, or prin for printing without a newline or linefeed +; at the end of the printed text. prin " My name is " print my-name My name is Red @@ -72,7 +72,7 @@ My name is Red print ["My name is " my-name lf] My name is Red -; In case you haven't already noticed: statements do NOT end with a semicolon ;-) +; If you haven't already noticed: statements do NOT end with a semicolon ;-) ; ; Datatypes @@ -85,13 +85,13 @@ My name is Red ; Some of the available types are integer! string! block! ; Declaring variables before using them? -; Red knows by itself what variable is best to use for the data you want to use it -; for. +; Red knows by itself what variable is best to use for the data you want to +; use it for. ; A variable declaration is not always necessary. ; It is considered good coding practise to declare your variables, ; but it is not forced upon you by Red. -; You can declare a variable and specify its type. a variable's type determines its -; size in bytes. +; You can declare a variable and specify its type. a variable's type +; determines its size in bytes. ; Variables of integer! type are usually 4 bytes or 32 bits my-integer: 0 @@ -111,10 +111,10 @@ i2 - i1 ; result 1 i2 * i1 ; result 2 i1 / i2 ; result 0 (0.5, but truncated towards 0) -; Comparison operators are probably familiar, and unlike in other languages you -; only need a single '=' sign for comparison. -; There is a boolean like type in Red. It has values true and false, but also the -; values on/off or yes/no can be used +; Comparison operators are probably familiar, and unlike in other languages +; you only need a single '=' sign for comparison. +; There is a boolean like type in Red. It has values true and false, but also +; the values on/off or yes/no can be used 3 = 2 ; result false 3 != 2 ; result true @@ -127,14 +127,14 @@ i1 / i2 ; result 0 (0.5, but truncated towards 0) ; Control Structures ; ; if -; Evaluate a block of code if a given condition is true. IF does not return any value, -; so cannot be used in an expression. +; Evaluate a block of code if a given condition is true. IF does not return +; any value, so cannot be used in an expression. if a < 0 [print "a is negative"] ; either -; Evaluate a block of code if a given condition is true, else evaluate an alternative -; block of code. If the last expressions in both blocks have the same type, EITHER can -; be used inside an expression. +; Evaluate a block of code if a given condition is true, else evaluate an +; alternative block of code. If the last expressions in both blocks have the +; same type, EITHER can be used inside an expression. either a < 0 [ either a = 0 [ msg: "zero" @@ -172,8 +172,8 @@ until [ ] ; will output: ooooo -; Note that the loop will always be evaluated at least once, even if the condition is -; not met from the beginning. +; Note that the loop will always be evaluated at least once, even if the +; condition is not met from the beginning. ; while ; While a given condition is met, evaluate a block of code. -- cgit v1.2.3 From 4d4dae03ea40240ffb6db74c1707279693e58844 Mon Sep 17 00:00:00 2001 From: Samantha McVey Date: Sat, 31 Dec 2016 15:43:35 -0800 Subject: set highlighter for sass and red --- red.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 6d10fe8f..0c979ce1 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -34,7 +34,8 @@ brackets can be filled with useful information about this script or program: the author's name, the filename, the version, the license, a summary of what the program does or any other files it needs. The red/System header is just like the red header, only saying "red/System" and not "red". - +``` +```red Red [] ;this is a commented line -- cgit v1.2.3 From 6e7c5c793327f4a63b13e555894597915ca91fda Mon Sep 17 00:00:00 2001 From: Jonathan Harford Date: Tue, 18 Jul 2017 01:31:56 -0700 Subject: [red/en] Fix logic in "either" examples (#2800) --- red.html.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 0c979ce1..5f6ffc86 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -136,14 +136,14 @@ if a < 0 [print "a is negative"] ; Evaluate a block of code if a given condition is true, else evaluate an ; alternative block of code. If the last expressions in both blocks have the ; same type, EITHER can be used inside an expression. -either a < 0 [ +either a > 0 [ + msg: "positive" +][ either a = 0 [ msg: "zero" ][ msg: "negative" ] -][ - msg: "positive" ] print ["a is " msg lf] @@ -151,14 +151,14 @@ print ["a is " msg lf] ; There is an alternative way to write this ; (Which is allowed because all code paths return a value of the same type): -msg: either a < 0 [ +msg: either a > 0 [ + "positive" +][ either a = 0 [ "zero" ][ "negative" ] - ][ - "positive" ] print ["a is " msg lf] -- cgit v1.2.3 From 985d23a52b76593a120adff5381c2df3a80fe298 Mon Sep 17 00:00:00 2001 From: HairyFotr Date: Wed, 23 Aug 2017 10:14:39 +0200 Subject: Fix a bunch of typos --- red.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 5f6ffc86..3575032f 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -51,7 +51,7 @@ comment { ; no need to restrict this to a 'main' function. ; Valid variable names start with a letter and can contain numbers, -; variables containing only capital A thru F and numbers and ending with 'h' +; variables containing only capital A through F and numbers and ending with 'h' ; are forbidden, because that is how hexadecimal numbers are expressed in Red ; and Red/System. -- cgit v1.2.3