Skip to content

Instantly share code, notes, and snippets.

Red []
x: [
["Liza" "Smith" 1834 1891]
["Cynthia" "Lancaster" 1745 1800]
["Adam" "Goya" 1900 1949]
["Eric" "Anderson" 1802 1888]
["Sam" "Kennedy" 1899 1949]
]
@Phryxe
Phryxe / scroll-test.red
Last active January 10, 2019 07:52
Red Language Test
Red []
x: [
["01" "A"]
["02" "B"]
["03" "C"]
["04" "D"]
["05" "E"]
["06" "F"]
["07" "G"]
@Phryxe
Phryxe / red-predefined-colors.red
Last active December 21, 2017 18:13
Red's Predefined Colors
Red [
Needs: 'View
]
b-or-w?: func [color [tuple!] /local darkness [float!]] [
darkness: 1 - (((0.299 * color/1) + (0.587 * color/2) + (0.114 * color/3)) / 255)
either (darkness < 0.5) [return black][return white]
]
size: 100x25
Red [
Title: "Style Test"
Needs: View
]
view [
title "Style Test"
size 400x400
style ball: base 30x30 transparent extra 1x-1 draw [fill-pen blue circle 15x15 14] rate 100 on-time [
face/offset: face/offset + (face/extra * random 9x9)
Red [
Title: "Bouncing Boxes Connected"
Needs: View
]
Arial: make font! [size: 14 name: "Consolas" style: 'bold]
view [
title "Bouncing Boxes Connected"
size 400x400