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 [] | |
forth: context [ | |
prog: [1 2 3 4 5 6 7 8 '+ '+ '* 150 '+ '* '+ '* '*] | |
registers: ['eax 'ebx 'ecx 'edx] | |
register-taint: [] ; registers we've touched in this set | |
register-goop: [] ; registers we need to pop to use | |
register-sets: 0 | |
next-register: head registers |
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
*I tried to eliminate all my local words* | |
# Most important | |
abs ; just an alias | |
apply ; But, PLEASE, a better way to propagate refinements | |
array ; I rarely use this myself | |
assert | |
build-markup ; More general interpolation this is built on | |
build-tag ; Need tag! first |
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
; We have other reflective functions (words-of, body-of, etc.), but | |
; this is a little higher level, sounded fun to do, and may prove | |
; useful as we write more Red tools. It also shows how to make your | |
; own typesets and use them when parsing. | |
arity-of: function [ | |
"Returns the fixed-part arity of a function spec" | |
spec [any-function! block!] | |
/with refs [refinement! block!] "Count one or more refinements, and add their arity" | |
][ |
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 [ | |
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 |
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: "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. | |
} | |
] |
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: "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. |
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: "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: [ |
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 [ | |
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 |
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 basic Editor" | |
author: "Didier Cadieu" | |
version: 0.1.1 | |
date: "25-01-2017" | |
] | |
script: make string! 10000 | |
saved?: true |
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: "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}] |
OlderNewer