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: "Pre-load to mimic range/bounds syntax" | |
| Date: 22-May-2020 | |
| Author: @toomasv | |
| ] | |
| context [ | |
| default-start: func [stop step][ | |
| case [ | |
| any [percent? stop percent? :step][1%] | |
| any [pair? stop pair? :step][1x1] |
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 range and step ops" | |
| Date: 21-May-2020 | |
| ] | |
| ;Simple range op! | |
| ;works when a < b and with integer! and date! only | |
| ..: make op! func [a [integer! date!] b [integer! date!] /local i out][ | |
| out: copy [] repeat i b - a + 1 [append out i - 1 + a] | |
| ] |
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: {Replace several items in one run + example conversions} | |
| Date: 27-Mar-2020 | |
| Author: "Toomas Vooglaid" | |
| ] | |
| context [ | |
| sp: charset " ^-" | |
| sp*: [any sp] | |
| digit: charset "0123456789" | |
| integer: [some digit] |
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: {Return relation of provided arguments} | |
| Date: 25-Mar-2020 | |
| Author: "Tooams Vooglaid" | |
| ] | |
| compare: function [ | |
| "Compare arguments and return their relation" | |
| a [any-type!] | |
| b [any-type!] | |
| /length "Compare length of arguments" |
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: "Boundary Math with James' numbers" | |
| Source: http://www.wbricken.com/pdfs/01bm/06number/bnums-complete/07bnums-james.pdf | |
| Fail: %bmath.red | |
| Date: 6-Mar-2020 | |
| Author: "Toomas Vooglaid" | |
| ] | |
| object [ | |
| main: [(res: 0 clear stack) struct collect keep (round/to res .001)] | |
| stack: 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 [] | |
| ;#do [debug: no] ;Seems not to work anymore | |
| ctx: context [ | |
| what: none | |
| size: 30000 | |
| eof: 0 | |
| c: 0 | |
| lim: none | |
| input-text: none | |
| db: func [check][not empty? intersect check what] |
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: 28-Feb-2020 | |
| Description: "Another color-picker with named Red-colors and Web-colors" | |
| Licence: "Public domain" | |
| File: %named-color-picker.red | |
| Idea: https://gitter.im/red/red/gui-branch?at=5e58287f4eb23e6ae179f475 | |
| ] | |
| context [ | |
| red-colors: split replace/all lowercase trim help-string tuple! [some [#" " | #"^/"]] #" " #" " | |
| remove back tail red-colors |
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: 28-Feb-2020 | |
| Description: "Web-colors" | |
| Source: https://htmlcolorcodes.com/color-names/ | |
| ] | |
| web-colors: [ | |
| "IndianRed" 205.92.92 | |
| "LightCoral" 240.128.128 | |
| "Salmon" 250.128.114 | |
| "DarkSalmon" 233.150.122 |
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: Jan-12-2020 | |
| Description: "Color key-selected elements by up/down dragging" | |
| Help: { | |
| Key for elements: | |
| D - BackDrop | |
| T - Text | |
| F - Fill | |
| P - Pen | |
| Key for channel: |
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: 26-Nov-2019 | |
| See: https://gitter.im/red/help?at=5ddd28def65fec1c8e72c7da | |
| ] | |
| clean-url: function [url][ | |
| bin: read/binary url | |
| while [ | |
| error? err: try [str: to-string b: bin] | |
| ][ | |
| while [b: find b err/arg1][remove b] |