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: "Conway's Game of Life" | |
Needs: 'View | |
] | |
system/view/auto-sync?: no | |
grid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep random true]]]] | |
scratchgrid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep false]]]] | |
a: copy grid/1 | |
b: copy grid/50 |
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: "Heart animation" | |
author: "Didier Cadieu" | |
notes: { | |
Traduction in Red of Terebus Volodymyr javascript demo : http://codepen.io/tvolodimir/pen/wqKuJ | |
} | |
Needs: View | |
] | |
;*** Settings |
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 [] | |
form-all: func [blk][ | |
forall blk [blk/1: form blk/1] | |
blk | |
] | |
types-of: function [value [typeset!]][ | |
; typesets don't support reflection | |
third load mold value |
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 [] | |
inc-value: func [ | |
face | |
color-id | |
dest-face | |
/local value rate | |
] [ | |
unless face/extra [face/font/color: 255.255.255] | |
overflow?: false |
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: "fry.red" | |
Author: ["Gregg Irwin" "Steeve"] | |
File: %fry.red | |
Purpose: { | |
Factor style fry combinators in Red | |
http://docs.factorcode.org/content/article-fry.html | |
works somewhat like a reverse collect/keep | |
} | |
] |
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: 2018-03-19 | |
Inspiration: https://pomax.github.io/bezierinfo | |
] | |
lut: [[1][1 1][1 2 1][1 3 3 1][1 4 6 4 1][1 5 10 10 5 1][1 6 15 20 15 6 1]] | |
binomial: func [n k /local s nextRow i prev][ | |
while [ | |
n > s: length? lut |
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 [] | |
context [ | |
get-function: function [path] [ | |
if path? path [ | |
path: copy path | |
while [ | |
not any [ | |
tail? path | |
any-function? attempt [get/any either last? path [path/1] [path]] | |
] |
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
-module(gen_tcp2). | |
-export([listen/2, accept/1, accept/2, | |
connect/3, connect/4, | |
send/2, recv/1, recv/2, recv/3, | |
close/1]). | |
-export([run/0, run/2]). | |
%% Naive gen_tcp shim over the socket API |
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 Android bridge demo" | |
Author: "Nenad Rakocevic" | |
File: %eval2.red | |
Config: [type: 'dll libRed?: no libRedRT?: yes export-ABI: 'cdecl] | |
Tabs: 4 | |
Needs: 'View | |
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. All rights reserved." | |
License: { | |
Distributed under the Boost Software License, Version 1.0. |
OlderNewer