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 [ | |
| title: "RFC3986 URL parser" | |
| file: %url-parser.red | |
| author: "@greggirwin" | |
| date: 03-Oct-2018 | |
| notes: { | |
| Reference: https://tools.ietf.org/html/rfc3986#page-16 | |
| Most rule names are taken from the RFC, with the goal of | |
| making it easy to compare to the reference. Some rules |
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 [ | |
| name: 'inject | |
| file: %inject.red | |
| author: "Gregg Irwin" | |
| notes: { | |
| Red version of Ladislav Mecir's R2 `build` func. I can't find his on | |
| the net, to link to, but can post his original if desired. His point | |
| was that `compose` isn't always easy to use, when parens are part of | |
| block you're composing, or how your blocks are structured, whether you | |
| can use `/only` with `compose`. e.g. |
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 [] | |
| ; TBD: pair tuple | |
| combine: func [ | |
| "Merge values, modifying a if possible" | |
| a "Modified if series or map" | |
| b "Single value or block of values; reduced if `a` is not an object or map" | |
| ][ | |
| if all [block? :b not object? :a not map? :a] [b: reduce b] | |
| case [ |
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
| win: layout [ | |
| title "VID test" | |
| ;below | |
| text "Hello" | |
| button "Hello" 100x40 [bar/data: random 100%] | |
| button "World" | |
| return | |
| button "China" | |
| text "Red Language" 100 right |
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-07-27 | |
| Purpose: {Study of bezier-based tweens} | |
| File: %bezier-tweens.red | |
| Needs: 'View | |
| ] | |
| down-flags: [down1? down2? down3? down4? b1-down? b3-down?] ;down? | |
| clear-down-flags: does [set down-flags off] |
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
| ;do/args %./fonts/fonts-startup.r %get-fonts-windows.r | |
| ;request-font | |
| REBOL [ | |
| Title: "get-fonts-windows" | |
| Date: 29-Sep-2002 | |
| Name: 'get-fonts-windows | |
| Version: 0.1.0 | |
| File: %get-fonts-windows.r | |
| Author: "Gregg Irwin" |
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 [] | |
| ; alphabetical datatype listing | |
| ; set 'datatype-single-test-values compose [ | |
| ; action! (:add) | |
| ; binary! #{} | |
| ; bitset! #[bitset! #{}] | |
| ; block! [] | |
| ; char! #"A" | |
| ; closure! (closure [a b] []) |
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
| REBOL [] | |
| ; alphabetical datatype listing | |
| ; set 'datatype-single-test-values compose [ | |
| ; action! (:add) | |
| ; binary! #{} | |
| ; bitset! #[bitset! #{}] | |
| ; block! [] | |
| ; char! #"A" | |
| ; closure! (closure [a b] []) |
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
| REBOL [ | |
| Title: "n-queens" | |
| Author: "Gregg Irwin" | |
| Comment: { | |
| I just cooked this up in my head. It could fail miserably in some cases. | |
| The special N // 6 = 2 case isn't something I discovered, but the | |
| "pathing" algorithm used is mine. | |
| } | |
| ] |
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
| (is-a horse comet) ;; Comet is a horse | |
| (is-a-parent-of comet prancer) ;; Comet is a parent of Prancer | |
| Comet is a horse | |
| Comet is a parent of Prancer | |
| rule [ | |
| name | |
| antecedents |