This file contains hidden or 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 [ | |
env: self | |
canvas: none | |
tab-pan: drawing-panel-tab: animations: none | |
info-panel: edit-options-panel: options-panel: drawing-panel: figs-panel: anim-panel: none | |
layer: layer1: drawing: selection-layer: grid-layer: drawing-layer: edit-layer: none | |
win: layout/options compose/deep [; | |
title "Drawing pad" | |
size 540x465 |
This file contains hidden or 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: 9-Mar-2019 | |
Purpose: {Simplified syntax for rich-text specification} | |
] | |
context [ | |
format-word: no | |
format-any: copy [] | |
in-string?: no | |
sp: charset " ^-" |
This file contains hidden or 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: 2019-02-27 | |
Challenge: https://gitter.im/red/help?at=5c75b4d7d2d62067b7101b03 | |
File: %dbquery.red | |
Purpose: {Simple query dialect} | |
TBD: {change delete} | |
] | |
;@GiuseppeChillemi [February 26, 2019 11:51 PM](https://gitter.im/red/help?at=5c75b4d7d2d62067b7101b03) | |
assign: func [words values][ |
This file contains hidden or 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: 2019-01-14 | |
Purpose: {Study of syntax highlighting} | |
] | |
skp: charset " ^/^-[]()/" | |
initial-size: 800x800 | |
addr: func [s1 s2 style] bind [keep as-pair i: index? s1 (index? s2) - i keep style] :collect | |
rule: [any [s: | |
skp |
This file contains hidden or 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: "Longest Common Subsequence" | |
Partially-based-on: http://rosettacode.org/wiki/Longest_common_subsequence | |
Date: 8-Jan-2019 | |
Last: 10-Jan-2019 | |
] | |
lcs: function [s t][ | |
case [ ; preliminary checks | |
s = t [return copy s] | |
any [empty? s empty? t] [return copy ""] |
This file contains hidden or 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 [ | |
Date: 6-Jan-2019 | |
File: %levenshtein.red | |
] | |
lev: function [s t][ | |
unless string? s [s: mold s] | |
unless string? t [t: mold t] | |
case [ | |
s = t [return 0] | |
empty? s [return (length? t)] |
This file contains hidden or 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 [] | |
ctx: context [ | |
char: charset {([{}])"} ;" | |
opens: charset "[(" | |
closes: charset "])" | |
line: 1 | |
stack: make block! 1000 | |
mark: comm: none | |
instr: false | |
inmulti: 0 |
This file contains hidden or 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-12-09 | |
Purpose: {Study of freehand drawing on area} | |
] | |
do load-thru https://tinyurl.com/ybmvx58e ; make-transparent | |
img: draw 200x200 [box 0x0 199x199] | |
img: make-transparent img 255 | |
style: 'thin | |
view [ |