Skip to content

Instantly share code, notes, and snippets.


Boleslav Březovský rebolek

View GitHub Profile
View array
array: func [
"Makes and initializes a series of a given size."
size [integer! block!] "Size or block of sizes for each dimension"
/initial "Specify an initial value for all elements"
value {Initial value (will be called each time if a function)}
/local block rest
if block? size [
if tail? rest: next size [rest: none]
rebolek /
Last active Apr 23, 2020
Get Red website running
# This is what needs to be done on fresh Ubuntu 19.10
# update your system, just in cause
sudo apt-get update
sudo apt-get -y upgrade
# install required tools: curl, gnupg (applies to LXC version of Ubuntu, ISO has them)
sudo apt-get -y install curl gnupg
View incremancer
rebolek / missing
Created Oct 4, 2019
Missing ===end-group=== marks
View missing
>> foreach-script %./ [sg: eg: 0 parse mold data [some ["===start-group===" (sg: sg + 1) | "===end-group===" (eg: eg + 1) | skip]] unless equal? sg eg [print filename]]
rebolek /
Created Sep 18, 2019
Print table in console
test-table: [
["Name" "Mass" "Orbit"]
["Mercury" 0.055 0.4]
["Venus" 0.815 0.7]
["Earth" 1.0 1.0]
["Mars" 0.107 1.5]

Every executable is compiled 5 times, extreme values are thrown away and compile time is average of three times.

Encap versions are wrapped in do [] block.

Source code size of CSV codec is 10181 bytes for full version and 4988 bytes for lite version (~49%).

Lite version supports block of records only as Red format, full version suppoorts block of maps and map of columns also, plus some additional features like header handling.

name compile time (ms) % of original compile time difference (ms) size (bytes) % of original size difference (bytes)
right-now: func [][now/time/precise]
test-files: function [
files: read %.
rebolek /
Created Sep 1, 2019
Make CSV from simple dialect
Dialect: {
pair! (req) - block size: record size x number of records
[MAX] integer! (opt) - value size: string length for values in records. MAX
switches to variable size
make-string: func [
"Return random string!"
View build.r
Rebol [
Title: "Build"
Author: ["Ladislav Mecir" "Brian Hawley"]
File: %build.r
Date: 2-May-2006/13:36:38+2:00
History: [
7/apr/2003/19:02 {using INSERT and ONLY keywords}
30/Oct/2004/12:55 {intermediate version - alpha}
31/Oct/2004/9:49 {intermediate - word - insert/only, :word - insert}
4/Nov/2004/6:55 {word - insert and evaluate, :word - insert/only}

Keybase proof

I hereby claim:

  • I am rebolek on github.
  • I am rebolek ( on keybase.
  • I have a public key whose fingerprint is EADA FA20 F885 4B16 53F7 1DA3 82BC 760A 4F33 3F8A

To claim this, I am signing this object:

You can’t perform that action at this time.