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
| // The journey to creating a new object type begins with ... a function | |
| // * It doesn't have to be a named function (that is `function name()` | |
| // as opposed to `name = function ()`) but there are advantages to this | |
| // that are beyond the scope of this comment. | |
| // * As a value, `myNumType` here serves double-duty--as a function in | |
| // the sense of a passable first-class value, as, say, in Rebol | |
| // * --and as a constructor for objects that use `myNumType` as a | |
| // prototype | |
| // * The value of `this` depends on the context in which the function | |
| // `myNumType` is called. If you call it by itself, `this` refers to the |
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: "PDF Experiment" | |
| Author: "Christopher Ross-Gill" | |
| Date: 18-Jan-2022 | |
| Home: https://gist.github.com/rgchris | |
| File: %pdf.r | |
| Version: 0.1.0 | |
| Rights: http://opensource.org/licenses/Apache-2.0 | |
| Purpose: { | |
| Build a PDF object model for atomic construction of PDF documents |
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: "Unzip for Rebol 2" | |
| Date: 3-Jan-2022 | |
| Author: "Christopher Ross-Gill" | |
| ] | |
| do %tiny-inflate.r | |
| ; obtain from | |
| ; https://gist.github.com/rgchris/d3fb5f6a6ea6d27ea3817c0e697ac25d |
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: "Package a Minimal OpenText Document" | |
| Date: 30-Dec-2021 | |
| Author: "Christopher Ross-Gill" | |
| Rights: http://opensource.org/licenses/Apache-2.0 | |
| Home: https://gist.github.com/rgchris/e325347625b1688a1a1fe686610c68ba | |
| Needs: [ | |
| r3:rgchris:zip | |
| ] |
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: "Tiny Inflate" | |
| Date: 10-Dec-2021 | |
| Author: "Christopher Ross-Gill" | |
| Version: 1.0.3 | |
| Type: 'module | |
| Name: 'rgchris.inflate | |
| Exports: [inflate] | |
| History: [ | |
| 10-Dec-2021 1.0.3 https://github.com/foliojs/tiny-inflate |
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
| const Bd = function (name, attrs, ...kids) { | |
| const spaces = { | |
| xhtml: 'http://www.w3.org/1999/xhtml', | |
| svg: 'http://www.w3.org/2000/svg' | |
| } | |
| const fullname = name.split(':') | |
| name = fullname.pop() |
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
| window.istype = function(value, explicit = false) { | |
| let type = Object.prototype.toString.apply(value).match( | |
| /\[object ([A-Za-z_0-9]+)\]/ | |
| )[1] | |
| switch (type) { | |
| case "Boolean": | |
| case "String": | |
| case "BigInt": | |
| case "Undefined": |
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: "State Machine Dialect" | |
| Date: 3-Feb-2021 | |
| Author: "Gabriele Santilli" | |
| File: %state-machine.reb | |
| Type: module | |
| Name: rgchris.state-machine | |
| Version: 1.8.1 | |
| Exports: [state-machine] |
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: "Data URI Scheme" | |
| Date: 13-Feb-2021 | |
| Author: "Christopher Ross-Gill" | |
| ] | |
| use [chars type] [ | |
| chars: complement charset "^-^/^M ,/;" | |
| sys/make-scheme [ |
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: "TextMate Support" | |
| Author: "Christopher Ross-Gill" | |
| Date: 8-Feb-2021 | |
| Type: module | |
| Name: rgchris.textmate | |
| Exports: [tm textmate neaten envelop form-error] | |
| ] | |
| tm: make object! [ |