Questions tagged [rebol3]

A cross-platform data exchange language and a multi-paradigm dynamic programming language.

A cross-platform data exchange language and a multi-paradigm dynamic programming language designed by Carl Sassenrath for network communications and distributed computing.

207 questions
3
votes
1 answer

copy/part with pair in REBOL 3

help copy has the following to say about copy: USAGE: COPY value /part length /deep /types kinds DESCRIPTION: Copies a series, object, or other value. COPY is an action value. ARGUMENTS: value -- At position (series! port! map! object!…
Gregory Higley
  • 15,923
  • 9
  • 67
  • 96
3
votes
2 answers

How can I turn on a word's new-line state in Rebol?

I know, I know. "What new-line state?", you ask. Well, let me show you: append [] w: first new-line [hello] on == [ hello ] W is a now a word that creates a new-line when appended to a block. You can turn it off, for example this way in Rebol…
MarkI
  • 347
  • 2
  • 8
3
votes
1 answer

How to build Rebol 3 in MSVC

I am trying to get Rebol 3 to compile in Microsoft Visual Studio 2013, but so far I have been unsuccessful. I am using a Git repo for my source which does not come with a solution. I have tried creating a solution and manually importing all of the…
3
votes
2 answers

How do I read large amounts of CGI data via POST in Rebol3?

I'm trying to upload an image using POST. Then on the server to get the POST data, I use: data: read system/ports/input ...but it seems that the data is truncated. There doesn't seem to be some specific boundary where the data are truncated. I'm…
Dan Lee
  • 71
  • 5
3
votes
1 answer

Android encapper for Rebol R3 scripts

Does anyone know how to use Saphirion's Android encap demo? I would like to make a single APK from R3/Droid and a Rebol 3 script. I compared demo-encap.apk (from the above link) and r3-droid.apk but I did not understand the "principle".
JeanLouis
  • 41
  • 1
3
votes
1 answer

stdout and stderr ports in Rebol3?

You can read bytes from system/ports/input, and if you convert them from BINARY! bytes to a STRING! of unicode codepoints you get something coherent: >> to-string read system/ports/input Hello == "Hello^/" But if you try writing to…
3
votes
2 answers

How do I use module inside module?

I have this simple module: REBOL[ Name: 'test1 Type: 'module Exports: [foo] ] foo: does [print "foo"] and this one: REBOL[ Name: 'test2 Type: 'module Exports: [bar] ] import %test1.reb foo bar: does [foo] When I try to…
rebolek
  • 1,281
  • 7
  • 16
3
votes
1 answer

Rebol Saphirion GUI test-driven-development (TDD)

Where can I find Rebol R3-GUI library Saphirion GUI TDD ? (as featured in http://development.saphirion.com/rebol/r3gui/) I looked through r3-gui.r3 but I am yet to find any TDD related code. A more general question : is any test framework available…
OneArb
  • 453
  • 2
  • 14
3
votes
5 answers

C-style for loops in REBOL

I attempted to write a C-style for-loop in REBOL: for [i: 0] [i < 10] [i: i + 1] [ print i ] This syntax doesn't appear to be correct, though: *** ERROR ** Script error: for does not allow block! for its 'word argument ** Where: try do either…
Anderson Green
  • 30,230
  • 67
  • 195
  • 328
3
votes
2 answers

Why does map-each preserve the last value for references to the word to set?

map-each can be used to evaluate some code for every member in a collection, and aggregate the results of the evaluation in a block: >> values: map-each x [1 2] [ print ["Doing mapping for" x] x * 10 ] Doing mapping for 1 Doing mapping…
3
votes
2 answers

Howto make local word assignment inside PARSE in REBOL?

I need a function that uses PARSE and the COPY x rule, but does not change x outside the function. I tried to use FUNCTION to have it automatically pick up the local x, but it does not work: >> f: function [t] [parse t [copy x to end]] >> f ["a"] ==…
giuliolunati
  • 766
  • 5
  • 14
3
votes
2 answers

How to use IN with a block instead of an object?

The IN function in Rebol finds out if a field is in an object: USAGE: IN object word DESCRIPTION: Returns the word or block in the object's context. IN is a native value. ARGUMENTS: object (any-object! block!) word -- (modified…
3
votes
2 answers

How do I remove all "black pixels" from a binary (image)?

I am looking for the best performing code, which removes all black pixels = #{000000} from a binary. Code Example: img: make image! [100x75 0.0.255] loop 1000 [change at img random 99x74 0.0.0] probe length? foo: copy img/rgb probe delta-time…
TGD
  • 175
  • 1
  • 5
3
votes
2 answers

How should a Rebol-structured data file (which contains no code) be written and read?

If you build up a block structure, convert it to a string with MOLD, and write it to a file like this: >> write %datafile.dat mold [ [{Release} 12-Dec-2012] [{Conference} [12-Jul-2013 .. 14-Jul-2013]] ] You can LOAD it back in later. But…
3
votes
1 answer

changing encoding UTF8 to UTF8 BOM with rebol

I have a file which is encoded as UTF-8. I'd like to change it to UTF-8 + BOM. This is what I wrote, but it didn't work: write/binary %mycontacts.csv insert read/binary %mycontacts.csv #{EFBBBF} What should I do?
RamSo
  • 33
  • 5