This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; We have other reflective functions (words-of, body-of, etc.), but | |
; this is a little higher level, sounded fun to do, and may prove | |
; useful as we write more Red tools. It also shows how to make your | |
; own typesets and use them when parsing. | |
arity-of: function [ | |
"Returns the fixed-part arity of a function spec" | |
spec [any-function! block!] | |
/with refs [refinement! block!] "Count one or more refinements, and add their arity" | |
][ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Tiny VID Spreadsheet" | |
Author: ["Gregg Irwin" "based on Nenad's Native PicoSheet"] | |
Needs: View | |
] | |
sheet-size: 8x8 | |
cell-size: 100x24 | |
L: charset "ABCDEFGHIabcdefghi" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REBOL [] | |
src: read %lizard.svg | |
transparent: 0.0.0.255 | |
;** Stack operations | |
pile: tail reduce [copy [pen transparent]] ;** by default, no pen color | |
rollback: does [pile: back pile] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Vector Balls Demo" | |
Author: ["Nenad Rakocevic" "Gregg Irwin"] | |
Date: "[2-feb-2001 15-jun-2016]" | |
File: %vector-balls.red | |
Version: 0.4 | |
History: {[ | |
0.2 12-jun-2000 "First version released." | |
0.3 02-feb-2001 "Speed field added" | |
0.4 26-jun-2016 "Ported to Red by Gregg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
File: %view-hanoi.red | |
Author: "Gregg Irwin" | |
Date: "4-Oct-2001 — 26-Jun-2016" | |
Needs: View | |
] | |
num-disks: 5 ; Have to set this here until it gets into the UI. | |
disk-height: 15 | |
disk-cell-width: 20 ; Smallest disk is 1 cell wide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Draw Image Resizing Test" | |
Author: [REBOL version "Carl Sassenrath" Red port "Gregg Irwin"] | |
Version: 0.0.1 | |
Needs: View | |
] | |
distance: func [pos [pair!]][square-root add pos/x ** 2 pos/y ** 2] | |
grab-size: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Fill-pen Lab" | |
Author: "Gregg Irwin" | |
File: %fill-pen-lab.red | |
Needs: View | |
] | |
to-color: function [r g b][ | |
color: 0.0.0 | |
if r [color/1: to integer! 256 * r] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
title: "Paint" | |
Author: [REBOL version "Frank Sievertsen" Red port "Gregg Irwin"] | |
File: %paint.red | |
Tabs: 4 | |
Needs: View | |
version: 0.0.2 | |
] | |
draw-blk: copy [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Title: "Bubbles" | |
Author: [REBOL version "Gabriele Santilli" Red port "Gregg Irwin"] | |
File: %bubbles.red | |
Tabs: 4 | |
Needs: View | |
] | |
system/view/auto-sync?: no |