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

Red Reactive : cannot get true value for face data

From Red-lang book example about reactive programming, I added test button, weirdly I can get true data value for slider but not for progress bar: for this latter it's always the initial value (20%). How to get the actual value for this latter ? …
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Why color-code does work in rebol but not in red

I have replace parse/all by parse in http://www.rebol.org/view-script.r?script=color-code.r as for the rest I can see why it doesn't work * Syntax Error: invalid char! at {#"^^(1)" - #" "] parse text blk} * Where: do *** Stack: run…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Rebol / Red calling Headless Chrome on Windows

In Dos command to take screenshot, you can use (see https://developers.google.com/web/updates/2017/04/headless-chrome): chrome --screenshot="C:\test\test.png" "http://google.com" --headless --disable-gpu In Rebol, I can make it work only using…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Rebo/Red parse: Is it possible to copy between two marks embedding nested div

Subsequent to Rebol/Red parse: how to copy between 2 marks let's now suppose I achieve to mark a string with some marks with a complex parse rule having nested div (whatever that rule), is there a general way to copy between mark1 and mark2, at…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Rebol / Red VID: why is close event immediately sent ?

I inspired from http://www.codeconscious.com/rebol/view-notes.html I don't understand: why is close sent immediately: that's not what I want and I would expect it to be sent when I click on Window close query-on-close: func[face event][ …
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
2 answers

Conditional "marking" in Rebol / Red parse

Subsequent to Rebol / Red Parse html rules returns true but nothing is inserted How to mark the end of the fist main div only (when div-count is 0 first time), not the second one, or is there a way to break out of parse conditionally to a variable…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

compile red and red/system compilers from source

I've been looking to evaluate the red programming language - red-lang.org While it is nice that you can obtain a working executable easily I prefer to compile things from source. It is less obvious how to do that for red. The instructions ask you to…
Bruce Adams
  • 4,953
  • 4
  • 48
  • 111
0
votes
2 answers

Why do I get error with show window in Rebol/Red?

When I click on button refresh, I get an error v: [field1 "to refresh" field2 "to refresh" button "refresh" [show v]] view v How can refresh v ? Update: I don't have error but it doesn't refresh: test: [ ["a1" "b1"] ["a2" "b2"] …
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

How do you set a vid field with block item value in rebol/red?

That works: test: "test" view [field test] That doesn't: test: ["test1" "test2"] view [field test/1]
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

Equivalent of for loop in Red?

I want to use for http://www.rebol.com/docs/words/wfor.html for Red it doesn't work. What's the equivalent ?
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

How to debug RED code?

What is the preferred way to debug the RED prog lang code? Is there a RED debugger?
user5560811
0
votes
1 answer

Most elegant way to extract block by skipping every 2 element

Let's say I have block: [a 1 b 2 c 3] I want [1 2 3] Something like this is clunky and it doesn't work because I use word type (I'd like to have it word with word not string): block: [a 1 b 2 c 3] block2: [] counter: -1 foreach 'element…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
2 answers

Red has no open function like Rebol?

I want to read 10 lines from the end of a big text file without loading the whole file in memory. I wanted to try to use Open as explained here for Rebol In Rebol, what is the idiomatic way to read a text file line by line? But Red doesn't have…
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
3 answers

Is it possible in Red to test value? for a variable inside a context not in global context?

In last example, probe value? 'a returns true as it detects 'a has value in global context. But I'd like to test 'a exclusively in local context, is there a syntax to do so ? context [ probe value? 'a; false ] context [ …
user310291
  • 36,946
  • 82
  • 271
  • 487
0
votes
1 answer

use keyword in Rebol vs use keyword in Red

I wanted to use "Use" in Red but it seems it is quite different from use in Rebol, looking into help: In Red: >> help use cause-error function! Causes an immediate error throw, w... In Rebol >> help use USAGE: USE…
user310291
  • 36,946
  • 82
  • 271
  • 487