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: "generator function experiments" | |
Author: "Dave Andersen" | |
Date: 27-Sep-2017 | |
] | |
reload: does [do system/options/script] | |
; @JacobGood's closure func | |
closure1: func [ |
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 [ | |
Author: "Toomas Vooglaid" | |
Date: 25-9-2017 | |
Description: {Experiments with L-System} | |
Last-update: 26-9-2017 | |
Uses: {%models.red https://gist.github.com/toomasv/313e1d8583fb159428222651b76926cd} | |
Repo: https://github.com/toomasv/l-system | |
] | |
context [ | |
ctx: self |
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 [ | |
author: {Maxim Velesyuk} | |
usage: { | |
abc-score? <block of code> | |
abc-score? %file.red | |
abc-score? :some-function | |
} | |
description: { | |
The ABC software metric defines an ABC score as a triplet of values that represent the size of a set of source code statements. | |
An ABC score is calculated by counting the number of assignments (A), number of branches (B), and number of conditionals (C) in a program. |
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: "Calculator" | |
Author: "Peter W A Wood" | |
File: %calculator.red | |
Purpose: "A mac-like calculator to test native look and feel" | |
Tabs: 4 | |
Rights: "Copyright (C) 2017 Peter W A Wood. All rights reserved." | |
License: { | |
Distributed under the Boost Software License, Version 1.0. | |
See https://github.com/red/red/blob/master/BSL-License.txt |
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 [ | |
Original: "Gregg Irwin" | |
Source: https://gitter.im/red/help?at=59b3040566c1c7c4772d4172 | |
Purpose: "Toy chatbot about Red functions" | |
Needs: "info.red (https://gist.github.com/toomasv/eaac3829ac5e745f43121aa60b555d68)" | |
] | |
; See: http://www.red-lang.org/2016/03/060-red-gui-system.html blog entry | |
; Lots of name choices to consider. |
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 [ | |
Author: "Toomas Vooglaid" | |
Date: 7-9-2017 | |
Last-update: 4-10-2017 | |
] | |
mx: context [ | |
ctx: self | |
mtx: object [ | |
rows: cols: data: none | |
get-col: func [col][extract at data col cols] |
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 [] | |
let: func [ | |
binds | |
block | |
/local | |
ctx | |
][ | |
ctx: context append/only append binds copy [result: do] block | |
select ctx 'result |
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 | |
] | |
dangle: pi / 255 | |
pi2: pi * 2 | |
angle: 0.0 | |
radius: 200 | |
buffer: make image! 500x500 |
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 [ | |
author: { Maxim Velesyuk } | |
description: { | |
colors palette showcase | |
} | |
] | |
sys-words: words-of system/words | |
colors: copy [] | |
forall sys-words [ |
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[] | |
join: func [ | |
"Reduce values in a block and joins them into a string" | |
block [block!] | |
/with "Add delimiter between values" | |
delimiter | |
/trim "Remove NONE values" | |
] [ | |
if empty? block [return ""] |