Skip to content

Instantly share code, notes, and snippets.

@hinjolicious
hinjolicious / plotter-lib.red
Last active June 4, 2026 06:41
A Simple Red's Plotting Lib
Red [
Title: "Plotter Library"
Author: "hinjolicious"
Version: 1.0.0
]
; Provide a clean namespace indicator
system/words/plotter-lib-loaded?: true
PLOTTER: make object! [
@hinjolicious
hinjolicious / perceptron-regression.red
Last active May 28, 2026 07:46
Perceptron Polynomial Regression
Red [
Title: "Perceptron Polynomial Regression Engine"
Author: "hinjolicious"
File: %polynomial-regression.red
Needs: 'view
Notes: {
A pure, single-pass Stochastic Gradient Descent (SGD) engine
that discovers the hidden coefficients of polynomial data
using dynamic feature mapping and real-time convergence tracking.
}
@hinjolicious
hinjolicious / matrix.red
Created May 29, 2026 06:49 — forked from toomasv/matrix.red
Little matrix DSL
Red [
Author: "Toomas Vooglaid"
Date: 7-9-2017
Last-update: 4-10-2017
]
mx: context [
ctx: self
mtx: object [
rows: cols: data: none
get-col: func [col][extract at data col cols]
@hinjolicious
hinjolicious / range.red
Created May 29, 2026 06:55 — forked from toomasv/range.red
Range function for multiple datatypes
Red [
Author: "Toomas Vooglaid"
Date: 26-11-2017
]
range: function [val1 val2 /step stp /limit /enbase ebase /debase dbase /unicode][
stp+?: none
stp: any [stp either any [percent? val1 percent? val2] [1%][1]]
if any [all [block? stp zero? stp/3] zero? stp] [return none]
case [
debase [
@hinjolicious
hinjolicious / lazy-range.red
Created May 29, 2026 06:56 — forked from toomasv/lazy-range.red
Range for on-demand evaluation
Red [
Author: "Toomas Vooglaid"
Date: 27-11-2017
]
lazy-range: function [
"Returns function that generates next value in (possibly infinite) range"
val [scalar!] "Initial value"
/step stp [scalar! block!] "By which to increment each next value"
/limit lim [integer!] "How many new values to generate"
/stop stopval [scalar! block!] "On which value to stop generation of new values; if block, then also after how may matches"
@hinjolicious
hinjolicious / .red
Created June 2, 2026 17:18 — forked from maximvl/.red
@steveGit's version of LC in Red
Red []
lc: function [rule] [
parse rule [
some [
s: word! 'in skip
(in: last reduce/into ['foreach s/1 s/3 make block! 4] in)
| 'if skip
(in: last reduce/into ['if to-paren s/2 make block! 4] in)
| skip '|
@hinjolicious
hinjolicious / tabulize.red
Created June 4, 2026 07:02
Tabulize number list into bins and count frequencies - Useful for data plotting
Red [
Title: "Data Tabulation Function"
]
min-of: func [s [series!] /local m] [m: first s foreach v s [if v < m [m: v]] m]
max-of: func [s [series!] /local m] [m: first s foreach v s [if v > m [m: v]] m]
tabulize: func [
data [block!] "The input list of numbers"
num-bins [integer!] "The number of bins desired"
@hinjolicious
hinjolicious / celestial-clock-2.0.red
Last active June 7, 2026 22:16
Celestial Clock (Extended)
Red [
title: "Celestial clock"
author: hinjolicious
note: "Modified and improved from the work of @hiiamboris"
license: 'BSD-3
needs: view
icon: %clock.ico
]
#include %../../common/sift-locate.red
@hinjolicious
hinjolicious / tourbillon-watch.red
Created June 10, 2026 16:00
Animated Tourbillon Watch in Red Programming Language (Red/Draw)
Red [
title: "Tourbillon Chronograph Watch"
author: "hinjolicious"
note: {
Idea: @hiiamboris work on "Cellestial Clock".
Collaborator: Gemini AI
Tested: on Red/View 0.66 in Windows
June 10th, 2026
}
needs: 'view
@hinjolicious
hinjolicious / tourbillon-watch-widget.red
Last active July 16, 2026 07:22
Tourbillon Watch Desktop Widget for Windows 8+ (Red Programming Language)
Red [
title: "Tourbillon Watch Desktop Widget for Windows 8+"
author: "hinjolicious"
note: {
Idea: @hiiamboris work on "Cellestial Clock".
Collaborator: Gemini AI
Tested: on Red Toolchain v0.66 in Windows 11
June 13th, 2026
}
needs: 'view