Skip to content

Instantly share code, notes, and snippets.

@toomasv
toomasv / format.red
Last active April 11, 2018 17:53
Poor man's format
Red [
Author: "Toomas Vooglaid"
Date: 27-11-2017
]
context [
tmp: x: none
ord: func [val /local v][
rejoin [
v: to-string val
either find [11 12 13] val ["th"][
@greggirwin
greggirwin / greggs-mezz.red
Last active June 21, 2018 18:54
A bunch of general purpose mezzanine funcs for Red.
Red [
File: %greggs-mezz.red
Author: "Gregg Irwin"
Purpose: "An interim mezzanine dump, while Red is still moving fast."
Tabs: 4
Comment: {
Not everything here has been well-tested or, well, tested. Most
of the functions are ports from R2, with many more to come. I'm
combining everything in one file for ease of experimentation, so
you don't have to worry about includes or dependencies with the
Red [
description: {simple game}
author: {Maxim Velesyuk}
version: 2.2
changelog: {
2.2
* added sleep to the loop to reduce CPU load
2.1
* added win screen display time
@toomasv
toomasv / graph.red
Last active July 11, 2018 02:22
Toy graph DSL
Red [
Author: "Toomas Vooglaid"
Date: 2017-12-31
History: [
2017-12-28 {First draft}
2018-01-20 {Added arrows, subtree moving, elementary interactive editing}
2018-01-24 {Edges formatting}
2018-02-01 {Added differnt edge-ends, layout orientations, improved options-handling}
2018-02-03 {Implemented stepped (orthogonal) edges, improved star layout}
2018-02-06 {Added directions `across` (default: perpendicular to the step-away direction) and `away` (in the step-away direction).
@DideC
DideC / animate.red
Created February 26, 2018 08:32
First try of an animation dialect for Red VID. Computation is not precise enough, but just a proof of concept ;-)
Red [
Purpose: "Animation system for VID"
Needs: 'View
Notes: {
Simplyfied Ease in/out formulas : http://gizma.com/easing/#l
See at the end of page source for javascripts formulas (included elastic) : http://easings.net/en
}
]
@luce80
luce80 / add-script.red
Created July 1, 2018 18:34
Help update red scripts collection list
Red [
title: "Update red scripts collection list"
file: %add-script.red
author: "Marco Antoniazzi"
license: "Do with this code whatever you want, giving credit to me is NOT required"
email: [luce80 AT alice DOT it]
date: 01-07-2018
version: 1.0.1
Purpose: "Help update red scripts collection list"
Needs: 'View
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}
@meijeru
meijeru / word-finder.red
Last active April 6, 2020 09:06
Word-finder: find occurrences of any word in the toolchain source files
Red [
Title: "Word finder"
Purpose: {Find occurrences of words in the source files
of the Red toolchain and display them}
Author: "Rudolf W. MEIJER"
File: %word-finder.red
Needs: 'View
Rights: "Copyright (c) 2019 Rudolf W. MEIJER"
History: [
[0.0 23-Jan-2019 {Start of project}]
@Oldes
Oldes / html-entities.red
Last active May 13, 2020 10:05
HTML entities
Red [
Title: "HTML entities"
Purpose: "To decode HTML entities in a text"
Author: "Oldes"
Date: 12-May-2020
Version: 1.0.2
License: MIT
Usage: [
"Test: ♠ & ¢ <a> and Δδ ¾" =
decode-html-entities {Test: &spades; & &#162; &lt;a&gt;&#32;and &Delta;&delta; &frac34;}
@dander
dander / generators.red
Last active August 27, 2020 07:29
An experiment to make a general purpose generator-creating function
Red [
Title: "generator function experiments"
Author: "Dave Andersen"
Date: 27-Sep-2017
]
reload: does [do system/options/script]
; @JacobGood's closure func
closure1: func [