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: "A Parse-based port of Michael Gilliland's web scraper" | |
Author: @9214 | |
Date: 16-Oct-2020 | |
Link: https://youtu.be/HDMa4gcgEgI | |
] | |
page: read-thru/binary to url! system/script/args | |
link: [copy match [ahead https:// url!]] | |
rule: [collect any [link keep (to url! match) | skip]] |
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: "Daily Bing photo fetcher" | |
Author: @9214 | |
Date: 06-Aug-2021 | |
] | |
bing: http://www.bing.com/ | |
data: load rejoin [bing "HPImageArchive.aspx?format=js&idx=0&n=1"] | |
? (load rejoin [bing data/images/1/url]) |
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: "ad-hoc build script (encapper?)" | |
Author: 9214 | |
Purpose: "to bypass current compiler limitations (until dyn-stack is implemented)" | |
Rationale: { | |
As of 0.6.2, alpha Red compiler sometimes can't handle too dynamic code, | |
which leads to all kinds of cryptic errors either DURING or AFTER compilation. | |
General solution to this problem is: | |
* copy-paste all of your scripts into one block; | |
* remove all #include directives (to avoid `cannot open: <file>` errors); |
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: "Puny GUI Puppy Finder, Red version" | |
Author: @9214 | |
Date: 26-Apr-2020 | |
Link: https://ahungry.com/blog/2020-04-24-Puny-GUI-Puppy-Finder.html | |
] | |
view [ | |
title "Puppy Finder" | |
below center |
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: "Example of definitional scoping" | |
Date: 20-Mar-2017 | |
Author: https://github.com/9214 | |
File: %(s)puny-mortals.red | |
] | |
meditate: function ['on thing] [ | |
print "ॐ" |
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: "Extended MATH dialect" | |
Author: 9214 | |
Date: 12-Nov-18 | |
] | |
math: function [ | |
"Evaluate expression using PEMDAS precedence rules" | |
body [any-list!] | |
/local match |
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: "crudely hacked together example DSL" | |
Link: https://stackoverflow.com/questions/48454538/how-to-parse-and-translate-dsl-using-red-or-rebol | |
Author: 9214 | |
] | |
;;; example input | |
DSL: [ | |
RULE TooYoung | |
IF [Person.Age < 15] |