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
2
votes
1 answer

Protecting object attributes in Rebol

I'm trying something quite basic in Rebol. I want to have a simple instance hierarchy - a question base instance and some question sub-instances. And I want to have some instance attributes protected. What I'm doing now is: _question: make object!…
Frank Ruben
  • 105
  • 7
2
votes
3 answers

How to format Rebol errors as strings?

Rebol's error! type comes back as an object you can inspect and extract properties out of. >> result: try [1 / 0] ** Math error: attempt to divide by zero ** Where: / try ** Near: / 0 >> probe result make error! [ code: 400 type: 'Math …
2
votes
1 answer

Getting/Setting File Permissions From Rebol

Is it possible to change file permissions within Rebol 3 without relying on CALLing CHMOD? Rebol 2 had 'set-modes though doesn't appear to be available any longer: permissive-access: [ owner-read: group-read: world-read: owner-write:…
rgchris
  • 3,698
  • 19
  • 19
2
votes
2 answers

How can I access sites through HTTPS with Rebol?

This was possible in Rebol 2.7.8 with the /View binary using a native scheme and with /Core using the call shell command. However at the time of posting I don't see a native HTTPS scheme for Rebol 3 nor a call command with the versatility to create…
rgchris
  • 3,698
  • 19
  • 19
2
votes
3 answers

Using a nested rule with parse

I am trying to parse some data which is formatted as follows. data: [a b x b x x b a a x x b b x ] What I need it to extract the a's and b's in order and perform a different action for each a and b. The expected output would be: a b b b a a b b ==…
johnk
  • 1,102
  • 7
  • 12
2
votes
3 answers

What is the closest match to this Clojure map/apply expression, in Rebol?

While comparing functional expressions in Clojure side-by-side with Rebol, I happened onto this expression from the examples of apply used in combination with map, at clojure-docs.org: user=> (map #(apply max %) [[1 2 3] [4 5 6] [7 8 9]]) (3 6…
Adrian
  • 741
  • 4
  • 14
2
votes
1 answer

For rebol3: Want to get started with native extensions on linux. How do I write a hello-world?

I know how to write some 100 lines C, but I do not know how to read/organize larger source like Rebol. Somewhere was a tutorial with hostkit and dll, but it seems R3 is now statically linked. So I do not know where to look. How would I write a…
dt2
  • 183
  • 6
2
votes
3 answers

How can I work with a single byte and binary! byte arrays in Rebol 3?

In Rebol 2, it is possible to use to char! to produce what is effectively a single byte, that you can use in operations on binaries such as append: >> buffer: #{DECAFBAD} >> data: #{FFAE} >> append buffer (to char! (first data)) ==…
2
votes
1 answer

Common way of testing for membership in a MAP! working in both Rebol 2 and 3?

In Rebol 2 there was a HASH! type as well as a MAP! type. Both of which were supported by the FIND and SELECT functions, as well as by path-based selection: >> m: to map! [someKey someValue] == make hash! [someKey someValue] >> m/someKey ==…
1
vote
1 answer

How to evaluate refinement of a function when calling this function in Red/Rebol

>> f: func [x /a][either a [x + 2] [x + 1]] == func [x /a][either a [x + 2] [x + 1]] >> b: /a == /a >> f/b 1 *** Script Error: f has no refinement called b *** Where: f *** Stack: f >> f/:b 1 *** Script Error: f has no refinement called :b ***…
lyl
  • 293
  • 1
  • 8
1
vote
1 answer

How to make anonymous function work in Red/Rebol

In Red/Rebol, parentheses () can be used to evaluate expressions like this: >> (1 + 2 3 + 4) == 7 However, when I use parentheses to evalute an anonymous function, it fails(please see the following code). Why? And how to make an anonymous function…
lyl
  • 293
  • 1
  • 8
1
vote
2 answers

Tracer function written in Rebol

It is possible in Rebol (Red, R3 Ren-c) to write a function similar to TRACE that produces the following result: foo: func [val1 val2 /local temp] [ temp: val1 + 5 val2 + temp ] bar: func [x /ris 'var "blablalba"][ if ris [set…
noein
  • 411
  • 2
  • 10
1
vote
3 answers

Rounding TIME! to a number of days in Rebol

I've found one way to turn a TIME! in Rebol into a number of days: add it to a date and then subtract that same date. >> dummy-date: 12-Dec-2012 == 12-Dec-2012 >> (dummy-date + 44835:11:58) - dummy-date == 1868 That's...rather awkward. Is there a…
1
vote
3 answers

Inverse of `split` function: `join` a string using a delimeter

IN Red and Rebol(3), you can use the split function to split a string into a list of items: >> items: split {1, 2, 3, 4} {,} == ["1" " 2" " 3" " 4"] What is the corresponding inverse function to join a list of items into a string? It should work…
Geeky I
  • 751
  • 6
  • 22
1
vote
0 answers

Rebol: Splitting a large # of network reads across multiple interpreters?

BACKGROUND: Every few weeks I need to read about ten thousand URLs for search engine optimization purposes (on sites I own/manage). In the future the total URLs will be multiplied by 20 to support other language versions of my site. When I use…
Edoc
  • 339
  • 4
  • 10