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 [] | |
load-any: function [input [string!]][ | |
out: make block! 100 | |
junk: none | |
until [ | |
result: load/trap/next input 'pos | |
either error? result/3 [ | |
append any [junk junk: make string! 20] result/2/1 |
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: { | |
Red generator for encoded messaged as in: | |
http://www.rebol.com/oneliners.html#section-17 | |
} | |
] | |
gen-hack: function [secret [string!]][ | |
;-- First build a list of integers from 1 to the last index of the secret string | |
table: collect [repeat i len: length? secret [keep i]] |
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 | |
Title: "red-box" | |
Author: "Huang Yongzhao" | |
File: %redbox.red | |
Tabs: 4 | |
Version: "Alpha" | |
Purpose: "Famous BoxWorld! game ported to red" | |
Rights: "Copyright (C) 2015-2018 Red Foundation. All rights reserved." | |
License: { |
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: ["Didier Cadieu" "Nenad Rakocevic"] | |
File: %worm.red | |
Needs: 'View | |
] | |
win: layout [ | |
size 400x500 | |
across | |
style ball: base 30x30 transparent draw [fill-pen blue circle 15x15 14] |
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: "Lines of code statistics from Red files" | |
Author: "Nenad Rakocevic" | |
File: %rloc.reds | |
Tabs: 4 | |
Purpose: { | |
Counts the number of files, lines of code and inline comments in Red/Rebol files, across folders, | |
filtering files using a list of suffixes and excluding files from a given list of subfolders. | |
} | |
] |
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: "Currency converter" | |
Author: ["Mark Summerfield" "Nenad Rakocevic"] | |
License: ["Apache 2.0" http://www.apache.org/licenses/LICENSE-2.0] | |
Version: 1.0.0 | |
Needs: 'View | |
] | |
currencies: rates: usd: gbp: from: target: value: 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 [ | |
Purpose: "PoC script for checking if brackets/parens are matching in a Red file" | |
] | |
check-brackets: function [file [file!]][ | |
line: 1 | |
stack: clear [] | |
skip-chars: complement charset "[]()^/" | |
parse read file [ |
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
Verifying my identity on Peepeth.com 0x1e33e78b9fc22c63740b0ed0cd441acbac5109f2 |
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 [] | |
get-arguments: routine [ | |
/local | |
list [red-block!] | |
s [red-value!] | |
t [red-value!] | |
top | |
][ | |
top: stack/ctop - 3 ;-- might need adjustments depending on interpreted vs compiled code. |
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
REBOL [] | |
print [] | |
lc: function [block] [lc-state lc-rule input-rule filter-rule i e] [ | |
lc-state: make object! [ | |
do-block: copy [] | |
inputs: copy [] | |
filter-block: none | |
input-state: copy [] | |
res: copy [] | |
] |