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 [ | |
Note: "from: https://gitter.im/red/red/gui-branch?at=5afc55a05a1d895fae45588e" | |
] | |
view [ | |
area 200x100 focus wrap | |
at 10x10 base 255.255.255.254 200x100 all-over | |
draw [line-width 20 pen 200.50.50.200] | |
on-down [repend face/draw ['line event/offset event/offset]] | |
on-over [if event/down? [change back tail face/draw event/offset]] |
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: "256-bit unsigned integer library" | |
Author: "Nenad Rakocevic" | |
File: %int256.red | |
Tabs: 4 | |
Rights: "Copyright (C) 2018 Red Foundation. 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 [ | |
Purpose: "Tiger vector data in Draw dialect (from SVG)" | |
File: %tiger.red | |
Author: "Zamlox" | |
Tabs: 4 | |
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. 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 [ | |
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. |
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 [ | |
Purpose: "Implements a Pomodoro timer" | |
Note: "Original code from https://gitter.im/red/red/gui-branch?at=5ab95dae2b9dfdbc3a25636a" | |
] | |
Pomodoro: does [ | |
context [ | |
t: diff: b1: b2: end: none | |
view/no-wait [ | |
title "Pomodoro" |
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 [] | |
dive: function [path action [block!] filter [block!]][ | |
bind action 'path | |
if filter [bind filter 'path] | |
foreach file read path [ | |
if dir? file [dive append copy path file action filter] | |
if any [not filter do filter][do action] | |
] |
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 [ | |
Purpose: "Demo how to serialize/deserialize a face tree on disk" | |
] | |
mold-face: function [root [object!] return: [string!]][ | |
foreach-face root [ | |
face/parent: none face/state: none | |
if font: face/font [font/parent: none font/state: none] | |
if para: face/para [para/parent: none] | |
] |
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: "Parse Info" | |
Purpose: { | |
Provides some stats about internal parse states usage for a given parsing job. | |
Could be used as a way to compare efficiency of different parsing strategies. | |
} | |
Date: 06-Oct-2017 | |
] | |
context [ |
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 [ | |
Purpose: {Implementation of a "capture-by-value" closure generator} | |
Date: 4-Oct-2017 | |
] | |
collect-words: function [ | |
spec [any-list!] | |
/deep | |
/set | |
/to-set |
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 [ | |
Note: "https://gitter.im/red/red?at=59d0e788f7299e8f539496d3" | |
] | |
time-it: func [block /count ct /local t baseline][ | |
ct: any [ct 1] | |
t: now/time/precise | |
loop ct [do []] | |
baseline: now/time/precise - t | |
t: now/time/precise |