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 [] | |
| system/lexer/pre-load: func [src][ | |
| ws: charset reduce [space tab newline] | |
| ws+: [some ws] | |
| dig: charset "0123456789" | |
| num: [some dig] | |
| parse src [any [ | |
| "myfunc" s: ws+ 2 [num ws+] | |
| any [i: ["/r3" | "/r4"] ws+ num ws+ ( | |
| move/part i s 3 |
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 [ | |
| Description: "Study of parsing `any-string!`, `any-word!` and `any-path!` values" | |
| Date: 23-Nov-2019 | |
| ] | |
| string-parse: function [s /case /quote /upper /block][ | |
| l: append/dup copy "" #" " 15 | |
| s2: either upper [uppercase copy s][s] | |
| print append copy l "string url tag email file" | |
| types: [to-string to-url to-tag to-email to-file] |
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 [ | |
| Description: "Exercise in limited unit handling" | |
| Date: 22-Nov-2019 | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| context [ | |
| digit: charset "0123456789." | |
| num: [some digit] | |
| unit: ["$/m2" | #"$" | "m2"] |
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: {Workaround for limitation of official `dehex` func} | |
| Date: 2019-11-15 | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| de-hex: func [hex [string!] /low][ | |
| if odd? length? hex [ | |
| hex: copy next hex | |
| ] |
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 [ | |
| Description: {Pie style with panel and extendable actors} | |
| Date: 9-Nov-2019 | |
| Updated: 14-Nov-2020 | |
| Author: "Toomas Vooglaid" | |
| ] | |
| extend system/view/VID/styles [ | |
| pie: [ | |
| template: [ | |
| type: 'panel |
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 [ | |
| Description: "Reconstructs charset definition from a `bitset!`" | |
| Date: 2019-10-28 | |
| Author: "Toomas Vooglaid" | |
| Rights: "Public domain" | |
| ] | |
| charset-def: function [ | |
| "Reconstruct charset definition from bitset" | |
| cs [bitset!] |
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 [ | |
| Description: "Form number to given precision" | |
| Date: 2019-0-13 | |
| ] | |
| form-to: func [ | |
| "Form number to a given floating-point precision" | |
| number [number!] "Number to be formed" | |
| precision [integer!] "Decimal places (positive integer)" | |
| /local pcnt? | |
| ][ |
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 [ | |
| Description: "Drop-down autoselect" | |
| ] | |
| blk: [ | |
| ["Blog" http://www.red-lang.org] | |
| ["About" https://www.red-lang.org/p/about.html] | |
| ["Getting Started" https://www.red-lang.org/p/getting-started.html] | |
| ["Download" https://www.red-lang.org/p/download.html] | |
| ["Documents" https://www.red-lang.org/p/documentation.html] | |
| ["Contributions" https://www.red-lang.org/p/contributions.html] |
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 [ | |
| Description: {Some quaternion manipulation funcs} | |
| Date: 21-Sep-2019 | |
| Author: "Toomas Vooglaid" | |
| ] | |
| quaternion: context [ | |
| quaternion!: make typeset! [block! hash! vector!] | |
| e-pow: function [q][ | |
| sc: x: y: z: none | |
| set [sc x y z] q |
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: 5-Sep-2019 | |
| Description: {Example of zooming and moving with different faces} | |
| Author: "Toomas Vooglaid" | |
| Licence: "Public domain" | |
| ] | |
| context [ | |
| ofs: just-down: none | |
| moving: function [face event][ |