Skip to content

Instantly share code, notes, and snippets.

@toomasv
toomasv / regex.red
Last active November 20, 2017 18:22
Regex to parse translator
Red [
Author: "Toomas Vooglaid"
file: "%regex.red"
Purpose: {Regex to parse converter}
History: {Started: 2017-05-09
v.0.1: 2017-05-12 -- first working version with:
start `^^` and end `$` anchors,
non-capturing groups (one level) with alterns,
quantifiers (possessive),
some character-classes.
@dander
dander / range-generator.red
Created April 26, 2017 06:04
lazy range enumeration
Red [
Title: "range generator attempt (4?)"
]
; @JacobGood's closure func
closure: func [
vars [block!]
spec [block!]
body [block!]
][
@Oldes
Oldes / SQLite3.reds
Last active April 12, 2017 20:09
SQLite3 Red/System binding
Red/System [
Title: "Red/System SQLite3 binding"
Author: "Oldes"
File: %SQLite3.reds
Rights: "Copyright (C) 2017 David 'Oldes' Oliva. All rights reserved."
License: "BSD-3 - https:;//github.com/red/red/blob/master/BSD-3-License.txt"
]
#switch OS [
@meijeru
meijeru / split-url.red
Last active May 8, 2017 21:46
Split a url! value into components
Red [
Title: "URL splitter"
Purpose: {split a url into its compoments}
Author: "Rudolf W. MEIJER"
File: %split-url.red
Version: 0.2.0
Date: "02-Apr-2017"
Rights: "Copyright (c) Rudolf W. MEIJER"
History: [
[0.0.0 "25-Mar-2017" {Start of project}]
@DideC
DideC / red-basic-editor.red
Last active January 25, 2017 21:04
A very basic text editor in VID. Handling only load and save of a file. Needs `call` to handle compilation and test of script
Red [
title: "Red basic Editor"
author: "Didier Cadieu"
version: 0.1.1
date: "25-01-2017"
]
script: make string! 10000
saved?: true
Red [
description: {
Attempt to copy Haiku Editor
http://forthsalon.appspot.com/haiku-editor
}
todo: {
* Optimize GUI
* Add memory and words: @ !
* Add return stack and words: push pop r@
* Add mouse handling: mx my button buttons
@meijeru
meijeru / %grep.red
Last active January 21, 2017 05:21
Red [
Title: "Partial grep implementation"
Purpose: {To search the input for lines containing a match
to the given pattern, specified as a regular expression}
Author: "Rudolf W. MEIJER"
File: %grep.red
Version: 0.4.0
Date: "24-Nov-2016"
Rights: "(c) Copyright 2016 Rudolf W. MEIJER"
History: [
@DideC
DideC / Livecode enhanced
Last active February 20, 2018 19:32
Based on Dockimbel VID livecode, this is a little more advanced version where you can define Red's values used by the VID code. The window is resizable and there is spliters to rearange space.
Red [
Title: "Simple GUI livecoding demo"
Author: "Nenad Rakocevic / Didier Cadieu"
File: %livecode.red
Version: 1.2.1
Needs: 'View
Usage: {
Type VID code in the bottom right area, you will see the resulting GUI components
rendered live on the left side and fully functional (events/actors/reactors working live).
The top right area let you define Red's values to be used in your VID code, even functions or anything.
@greggirwin
greggirwin / trig-lab.red
Last active October 23, 2017 19:53
Interactive trig function laboratory
Red [
Title: "trig-lab.red"
Author: "Gregg Irwin"
File: %trig-lab.red
Needs: 'View
Purpose: {
See %math-lab comments for details. This script focuses
on trigonometric functions.
}
]
@greggirwin
greggirwin / greggs-mezz.red
Last active June 21, 2018 18:54
A bunch of general purpose mezzanine funcs for Red.
Red [
File: %greggs-mezz.red
Author: "Gregg Irwin"
Purpose: "An interim mezzanine dump, while Red is still moving fast."
Tabs: 4
Comment: {
Not everything here has been well-tested or, well, tested. Most
of the functions are ports from R2, with many more to come. I'm
combining everything in one file for ease of experimentation, so
you don't have to worry about includes or dependencies with the