Questions tagged [red]

The Red language is inspired by the interpreted language Rebol, but is compiled and hence has a wider range of application...from device drivers to high-level purposes. It is functional, imperative and symbolic, with prototype-based object support. Like LISP and Rebol, it is homoiconic and thus its own meta-language. It is both statically and JIT-compiled to native code, with strong support for concurrency and parallelism (actors, parallel collections).

Red is a paradigm-neutral homoiconic language.

Red has a low memory footprint, and has a low disk footprint (< 1MB). Red seeks to be a "full-stack" language whose methodology is independent of any other toolchain. It's goal is to compile that which can be known ahead of time, JIT-compile that which cannot, and embeds a small interpreter into its executables to handle constructions which are not amenable to any compilation.

As an intermediate language (IL) Red uses a C-like language called . Red/System's parser is reused from Red itself...and for which it has its own code generators. The Red executable is able to build Red/System files directly (*.reds) as well as Red files (*.red), and Red/System code may be embedded freely in Red code.

248 questions
0
votes
1 answer

Why can't red interface with node.js while rebol can?

I just stumbled upon this: https://trello.com/c/yGGIM3Hl/32-nodejs-interface-for-rebol-to-pave-the-way-for-red While Red doesn't build on a standard toolchain and is not something you can add in wrapped up as a native node.js NPM package, Rebol can…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

rebol --do and red --do

Why rebolview --do "print 1 + 2" doesn't show result in console ? Why red --do "print 1 +2" generate an error *** Error: cannot access argument file: print 1 + 2 --== Red 0.6.3 ==--
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Creating a layout in Rebol

I am trying to create a layout to be shown by view in the manner described in answer by @GrahamChiu on REBOL layout: How to create layout words automatically - word has no context? : REBOL [] ; WANT TO CREATE A BLOCK: [across chvar: check label…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

write clipboard:// not working with red?

It works with Rebol but not with Red ? Is there a way to make it work ? I tried source clipboard under Rebol to get source code but doesn't work.
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
0 answers

Red language application executable crashing while interpreted one works

I am trying to create a small gui application having about 30 fields where users can enter data and a button which will save the data. It works all right when I run it with command: red-063 myappl.r Then I created its executable using following…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

is script autoloading possible in rebol or red-lang?

Is there a way to do so ? I searched Google but couldn't find any answer, so I guess the answer would be no. Is there anything close ? If not, would it be easy to extend red-lang to do so ?
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Hide and unhide a view in Red language

I am trying following code to have a second view which can be hidden and shown again repeatedly while preserving values in its fields: Red [] secondFstr: "" secondshownonce: false secondshowing: false secondview: does [ secondshownonce: true …
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

Not able to run Red language script on Linux

I am trying to run following simple script file: #! /usr/local/bin/red-063 Red [] print "testing" quit But I am getting following error: ** Script Error: Invalid compressed data - problem: -3 ** Near: script: decapsulate if none? script This…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
2 answers

Colored text console output in Rebol

In some languages I can put Esc codes around text to make them colored on Linux console/terminal. However, this does not seem to work in Rebol: NORMAL: "\e[0m" RED: "\e[0;31m" print rejoin["\e[0;31m" "red text" "\e[0m"] Above code only produces…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

Replacing multiple occurrences of substring in Red language

I am trying to have a function that replaces multiple occurrences of oripart to newpart in the sent string: strReplace: func [str [string!] oripart [string!] newpart [string!]][ if find str oripart [ change find str oripart…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
2 answers

code with to-word and to-path in Red language

I am trying to create 2 panels through single function using compose: make-panel: func [sentchar][ probe compose/deep [ text "N1:" (to-set-word rejoin["fld1" sentchar ":"]) field ; TO BE NAMED fld1A and fld1B for 2…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

Why wrong answer for this simple calculation in Red language

I am trying to print correct value of simple expression: (100 - 55) / (100 - 75) but always getting 1.0 instead of 1.8. I have tried: >> (100 - 55) / (100 - 75) >> ((100 - 55) / (100 - 75)) >> to-float ((100 - 55) / (100 - 75)) >> probe ((100 - 55)…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

Convert string elements in series to floats in Red language

I want to convert many decimal numbers available as strings to floats in one go. I am trying following code which combines these strings into a series and then convert them to floats. This works all right but fails if there is an error: a: "1.5"…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
2 answers

Why variables not altering from a loop in Red language

I want to alter a series of variables from a loop, but the following code is not working: a: 10 b: 20 c: 30 print reduce [a b c] ; output is 10 20 30 as expected varnames: [a b c] ; make a series of variables foreach i…
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
1 answer

Getting strings from a list into VID in Red language

I am trying to create a panel with dynamically created gui elements: sentlist: ["A" "B" "C"] main: function [slist] [ view collect [ keep [below] repeat i length? slist [ keep[ text slist/i ; THIS STEP IS…
rnso
  • 23,686
  • 25
  • 112
  • 234
1 2 3
16
17