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
#!/usr/local/bin/rebview -iv | |
Rebol [ | |
Title: "Intercepting Key events" | |
Author: "Christopher Ross-Gill" | |
Date: 23-Feb-2017 | |
Notes: [ | |
https://rebolforum.com/index.cgi?f=printtopic&topicnumber=579&archiveflag=archive | |
] |
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
Rebol [ | |
Title: "DSL Example" | |
Author: "Christopher Ross-Gill" | |
Date: 29-Jan-2023 | |
Home: https://gist.github.com/rgchris/2a227b6fa3fc9d2ae7fe729ccb09f016 | |
] | |
reduce-only: func [ | |
"Evaluates a block of expressions excepting SET-WORD! values" |
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
// 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 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 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 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
#!/usr/local/bin/ren-r3c | |
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 | |
] |
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
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 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 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 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] |
NewerOlder