This file contains 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 [] | |
find-until: function [series test][ | |
res: copy [] | |
forall series [ | |
either not test first series [ | |
append res first series | |
] [ | |
break/return res | |
] |
This file contains 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: "Bouncing Boxes Connected" | |
Needs: View | |
] | |
Arial: make font! [size: 14 name: "Consolas" style: 'bold] | |
view [ | |
title "Bouncing Boxes Connected" | |
size 400x400 |
This file contains 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 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: 11 ; 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 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 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 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.1 | |
] | |
draw-blk: copy [] |
This file contains 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 |
This file contains 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: "Red O'clock" | |
Author: "Gregg Irwin" | |
] | |
degree-to-xy: func [rad "radius" deg "degrees"] [ | |
as-pair (rad * sine deg) (rad * negate cosine deg) | |
] | |
sex-to-degree: func ["Sexagesimal to degrees" n] [n * 6] |
This file contains 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 [needs: view] | |
turtle: #() | |
win: layout [ tfield: base 500x500 white draw [] | |
panel [ | |
history: text-list 180x350 data [] return | |
panel [ button "Save" [save request-file history/data] | |
button "Load" [commands: load request-file foreach cmd commands [process-cmd cmd]] ] | |
] |