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
Red [ | |
Title: "Red value inspector" | |
Author: "Rudolf W. MEIJER" | |
File: %value-inspector.red | |
Rights: {Copyright (c) Rudolf W. Meijer 2018} | |
Purpose: {To expose implementation information} | |
Comment: {This program shows, for a given Red value, the implementation | |
at hardware memory level; it is aware of the various Red/System | |
structures that implement value slots, and of the storage | |
schemes for series values, symbols, and contexts.} |
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
Red [ | |
Title: "Red value slot implementation dump for Red inspector" | |
] | |
;---|----1----|----2----|----3----|----4----|----5----|----6----|----7----|- | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; auxiliary functions | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
Red [ | |
Title: "Data structure information for Red inspector" | |
] | |
;---|----1----|----2----|----3----|----4----|----5----|----6----|----7----|- | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; construct the structures table consisting of pairs of | |
; structure name (alias struct!) and block of entries [field name] | |
; the header field is not stored as it is the same for every structure |
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
flatten: func [ | |
"Remove new-line markers from block, paren or hash" | |
blk [any-list!] | |
/deep "remove the markers also from sub-blocks etc." | |
][ | |
new-line/all blk off | |
if deep [ | |
forall blk [ | |
if block? blk/1 [flatten/deep blk/1] | |
] |
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
to-local-time: func [ | |
"adjusts a time given as UTC, or a date containing a time, to the local timezone" | |
d [time! date!] | |
][ | |
either time? d | |
[ | |
d + now/zone | |
][ | |
if d/timezone [ | |
d/timezone: now/zone |
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
Red [ | |
Title: "String conversion explorer" | |
Purpose: {Show application of to-string, form and mold(/all) on all types} | |
Author: "Rudolf W. MEIJER" | |
File: %form-explorer.red | |
Date: 8-Jun-2018 | |
Notes: {Baed on earlier attempt for Rebol} | |
Language: 'English | |
Tabs: 4 | |
] |
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
<h3>String conversions</h3> | |
<table border=0 cellspacing=1 cellpadding=5 bgcolor=gray> | |
<tr> | |
<th>type</th> | |
<th>expression</th> | |
<th>to-string</th> | |
<th>form</th> | |
<th>mold</th> | |
<th>mold/all</th> | |
</tr> |
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
Red [ | |
Title: "Case folding table converter" | |
Purpose: {Transform Unicode data file into Red/System literal array} | |
Author: "Rudolf W. MEIJER" | |
File: %convert.red | |
Version: 0.1 | |
Rights: Copyright (c) 2018 Rudolf W. Meijer | |
History: [ | |
[0.1 2-Jul-2018 {Start of project}] | |
] |
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
Red [ | |
Title: "Red program structure checker" | |
Purpose: {Check if brackets/parens are matching in a Red file | |
and give errors with indication of line number} | |
Author: "Rudolf W. MEIJER" | |
File: %check-structure.red | |
History: [ | |
[0.0 04-Jan-2019 {Start of project}] | |
[0.5 05-Jan-2019 {First working version}] | |
[0.6 01-Feb-2019 {Added %" "}] |
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
Red [ | |
Title: "Word finder" | |
Purpose: {Find occurrences of words in the source files | |
of the Red toolchain and display them} | |
Author: "Rudolf W. MEIJER" | |
File: %word-finder.red | |
Needs: 'View | |
Rights: "Copyright (c) 2019 Rudolf W. MEIJER" | |
History: [ | |
[0.0 23-Jan-2019 {Start of project}] |