Skip to content

Instantly share code, notes, and snippets.

View dockimbel's full-sized avatar

Nenad Rakocevic dockimbel

View GitHub Profile
Red [
Title: "Sintezar PM-102 - Phase Manipulation Digital Sintesizer"
Name: 'PM-102
Version: 0.4.0
Needs: 'View
; Date: 25-11-2015
File: %pm-102.red
Author: "Boleslav Březovský"
; Email: [email protected]
]
Red [
Title: "Red GUI tour"
Purpose: {To showcase the current capabilities of Red GUI}
Author: "Rudolf W. MEIJER"
Version: 0.9.0
Date: "12-Dec-2015"
Needs: 'view
Rights: "Copyright (c) 2015 Rudolf W. MEIJER"
]
ralette-grammar: [
collect any [
['decompose [
'rgb keep ([
r: (color/1) / 255.0
g: (color/2) / 255.0
b: (color/3) / 255.0
]) |
'hsl keep ([
h: (color/1) / 255.0
Red [needs: view]
turtle: #()
win: layout [ tfield: base 500x500 white draw []
panel [
text "History" return 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]] ]
]
divisible?: func [a b] [0 = remainder a b]
; This doesn't work like R3 in how negative widths work.
forskip: func [
"Evaluates a block at regular intervals in a series."
'word [word!] "Word referring to the series to traverse (modified)"
width [integer!] "Interval size (width of each skip)"
body [block!] "Body to evaluate at each position"
/local orig result op
][
Red [needs: view]
turtle: #()
win: layout [ panel [
tfield: base 500x500 white draw []
origin tfield/offset tlayer: base 500x500 255.255.255.255 draw [] ]
panel [
text "History" return history: text-list 200x350 data [] return
panel [ button "Save" [save request-file history/data]
@greggirwin
greggirwin / analog-clock.red
Last active September 28, 2016 03:52
An analog clock for Red
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]
Red [
Title: "Sparks demo"
Author: "Qingtian Xie"
File: %sparks.red
Tabs: 4
Needs: View
]
system/view/auto-sync?: no
@greggirwin
greggirwin / bubbles.red
Last active June 17, 2016 23:23
Animated bubbles
Red [
Title: "Bubbles"
Author: [REBOL version "Gabriele Santilli" Red port "Gregg Irwin"]
File: %bubbles.red
Tabs: 4
Needs: View
]
system/view/auto-sync?: no
@greggirwin
greggirwin / paint.red
Last active February 8, 2018 18:28
Red Paint (World's smallest paint program)
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 []