Skip to content

Oldes/Rebol3

 
 

Repository files navigation

Rebol CI Build Rebol Gitter Zulip Chocolatey Replit

Rebol [R3] Source Code Distribution

Purpose of this Rebol fork is to push Carl's original source to be at least as usable as Rebol 2 while keeping the source code clean and project easy to build. Use CHANGES.md file to see changes made in this branch.

Issue Reporting

Preferred way to report issues is using the dedicated issue repository. It's a fork of the original Rebol issue repository, which was filled with issues from the CureCode issue tracker, which was used before Rebol was on Github. I'm not using the original Rebol issue repository, because I was not allowed to even add labels to my own issues. It was later moved under Metaeducation account and is used for Ren-C development anyway.

Precompiled Binaries

There are available precompiled binaries for each release. So far there are 3 main build types:

  1. Base is a build with minimal additions (not much useful)
  2. Core includes a little bit more stuff than the Base
  3. Bulk is a build which includes almost everything.

Please, take note that the inclusion of some extra components in the binary does not mean they will be immediately available for use in the REPL. You would have to register them as active modules first. This will be further explained in the next section.

And there is also the Host exe and the DLL - the Rebol library is separated and used from the host application. That is from times before open sourcing Rebol completely. Only host part was open and the library was still closed. In theory you can have one library and many tiny host applications. I'm building just the Core on Windows so far to see, if it is still working.

For macOS users on 10.15+, downloaded precompiled applications (and or extensions bellow) may not work properly unless the quarantine setting is removed:

xattr -d -r com.apple.quarantine /path/to/file

Rebol extensions

It is possible to extend Rebol functionality using external modules (native or written in Rebol itself). Here are links to some of them:

It should be noted that on macOS it may be required to resign downloaded native extensions using command like:

codesign --sign "5D94...EED5" -f -o runtime /path/to/extension.rebx

To find a signing identity, use: security find-identity

Enabling extensions

To check what extensions are immediately available as modules, and which ones require explicit registering, list the active system state like this:

>> help system/modules

Any already enabled extension will have a module! type. Bundled extensions, that require explicit registering, will have a block! type. Likewise, the extensions that can be automatically downloaded and registered will show up with a url! type.

To register any extension as a module, you need to import it into the active namespace first. For example, to make the csv module and its words available for use, do this:

>> import csv

Now you will be able to use the words, provided by this module, e.g.:

>> load-csv %file.csv

Building Rebol

Rebol itself is not a compiler (like Red language) but just an interpreter. You must have some compiler of your choice to compile Rebol. For Windows you may want to use any of these:

  1. Microsoft Visual Studio
  2. CLANG
  3. GCC (Mingw)

Once you have any of these compilers, you must use Siskin Builder tool, which is actually a customised Rebol needed to preprocess it's own sources. It deserves own documentation as it's not mean to be used only to build Rebol. Meanwhile you may take a look at the source of the Github workflow file for building all Rebol variants used in the releases.

For a local use, you just do: siskin <SOME-NEST-FILE>, which starts CLI in an interactive mode.

The Siskin builder itself may be used as an example, how to build a custom utility based on Rebol sources. The specification is defined in this *.nest file, where important is CUSTOM_STARTUP define and some files, which should be included and some optional Rebol parts if needed.

Screenshots

Building a customized CLI application using compile DSL:

Other Rebol related projects

If you are looking for other Rebol like languages, you may want to check also:

  • Arturo language written in Nim
  • Boron language written in C
  • Red language written in Red bootstrapped from Rebol2
  • Red.js web runtime for Red written in Haxe
  • Ren-C another living Rebol3 fork
  • Rye language written in Go
  • Topaz experimental Rebol like language being compiled to JS
  • World language written in C

There is also Shinxin's fork, which I was initially using for chery-picking, as it contains modifications from Atronix and Saphirion. But its use is now limited as it depends on non-public modules and also there is not much life visible recently.

Sponsor this project

 

Languages

  • C 79.0%
  • Rebol 17.8%
  • C++ 2.8%
  • Other 0.4%