Skip to content

Instantly share code, notes, and snippets.

@meijeru
meijeru / make-scroller.red
Created Apr 27, 2020
Parametrized scroller: function to make a pane with a scroller of a given vertical size
View make-scroller.red
make-scroller: func [
{makes a pane with a scroller of given length;
based on original work by @toomasv}
len [integer!]
/local sc
][
sc: first layout/only compose/deep [
panel (as-pair 17 len) [
origin 0x0 space 0x-1
below
@meijeru
meijeru / barcode.red
Created Oct 30, 2019
Barcode generator for EAN-8/13 and UPC-A
View barcode.red
Red [
Title: "Barcode generator"
Purpose: {To generate and display EAN-8 and -13, as well as UPC-A barcodes}
Author: "Rudolf W. MEIJER"
File: %barcode.red
Version: 0.1.0
Date: 1-Oct-2017
Rights: "Copyright (c) Rudolf W. MEIJER"
Needs: 'View
History: [
@meijeru
meijeru / check-update.red
Created Sep 20, 2019
Check for update to the Red executable
View check-update.red
Red [
Title: {Update checker}
Purpose: {Check for update to Red executable}
Author: "Rudolf W. MEIJER"
File: %check-update.red
Rights: "Copyright (c) 2019 Rudolf W. MEIJER"
Language: 'English
Tabs: 4
]
View request-date.red
Red [
Title: {Request a date}
Purpose: {To enter a date using a calendar display}
Author: "Rudolf W. MEIJER"
File: %request-date.red
Notes: {Inspired by the corresponding Rebgui facility}
Language: 'English
Tabs: 4
] ; end prologue
@meijeru
meijeru / word-finder.red
Last active Apr 6, 2020
Word-finder: find occurrences of any word in the toolchain source files
View word-finder.red
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}]
@meijeru
meijeru / check-structure.red
Last active Feb 1, 2019
Check if brackets/parens are matching in a Red source and give errors with indication of line number
View check-structure.red
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 %" "}]
View case-table-conversion.red
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}]
]
@meijeru
meijeru / form.html
Last active Nov 21, 2019
string-conversion table
View form.html
<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>
@meijeru
meijeru / form-explorer.red
Last active Jun 10, 2018
Red program to show application of to-string, form and mold(/all) on values of all types
View form-explorer.red
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
]
View to-local-time.red
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