Skip to content

Instantly share code, notes, and snippets.

View iArnold's full-sized avatar

iArnold iArnold

  • Freelance ICT Specialist
  • Netherlands
View GitHub Profile
@iArnold
iArnold / rs-mac-window.reds
Created October 1, 2015 17:43 — forked from qtxie/rs-mac-window.reds
Red/System Mac OSX Window
Red/System [
Title: "Red/System Mac OSX Window"
Author: "Qingtian Xie"
File: %rs-mac-window.reds
Type: 'library
Tabs: 4
Rights: "Copyright (C) 2014 Qingtian Xie. All rights reserved."
Compiling: "rebview.exe -qs red.r -t Darwin rs-mac-window.reds"
Reference: {
https://github.com/CodaFi/C-Macs
@iArnold
iArnold / Livecode enhanced
Created September 9, 2016 14:36 — forked from DideC/Livecode enhanced
Based on Dockimbel VID livecode, this is a little more advanced version where you can define Red's values used by the VID code. And the window is resizable.
Red [
Title: "Simple GUI livecoding demo"
Author: "Nenad Rakocevic / Didier Cadieu"
File: %livecode2.red
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.
}
@iArnold
iArnold / *-while.red
Created September 12, 2016 06:46 — forked from greggirwin/*-while.red
Various <action>-while example funcs for Red.
; A number of languages have `take-while/drop-while` funcs. This is just to show how you
; can build them in Red.
; This model can be applied to any function that has a `/part` refinement, or extended in
; any number of ways. We don't yet have a standard `apply` or `refine` function in Red.
; Once we do, a more general HOF version could take the action as an arg, as well as the
; test to apply.
; Should this return the position, like FIND, rather than an integer?
; No match would then mean a NONE result. REMOVE/TAKE/COPY with /PART
Red [
Title: "Conway's Game of Life"
Needs: 'View
]
grid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep random true]]]]
scratchgrid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep false]]]]
a: copy grid/1
b: copy grid/50
@iArnold
iArnold / JSON.red
Created October 6, 2016 19:46 — forked from rebolek/JSON.red
JSON toy parser for Red
Red [
Title: "JSON parser"
File: %json.red
Author: "Nenad Rakocevic"
License: "BSD-3 - https://github.com/red/red/blob/master/BSD-3-License.txt"
]
json: context [
quoted-char: charset {"\/bfnrt}
exponent: charset "eE"
@iArnold
iArnold / %grep.red
Created November 25, 2016 22:09 — forked from meijeru/%grep.red
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: [
Red [
Title: "CSV Handling Tools"
Author: "Brian Hawley"
File: %csv-tools.red
Date: "20-Mar-2017"
Version: 1.2.0
Purpose: "Loads and formats CSV data, for enterprise or mezzanine use."
Library: [
level: 'intermediate
platform: 'all
@iArnold
iArnold / dir-tree.red
Created May 8, 2017 09:46 — forked from toomasv/dir-tree.red
Print a directory tree
Red [
Author: "Toomas Vooglaid"
Date: "2017-05-07"
Changed: "2017-05-08"
Purpose: "Print a directory tree"
File: "%dir-tree.red"
]
context [
; Some helpers
get-char: func [hex][to-char to-integer hex]
Red [
Author: "Toomas Vooglaid"
Date: 25-9-2017
Description: {Experiments with L-System}
]
ctx: context [
scale: origin: length: len: angle: width: delta-width: times-length: delta-length: delta-angle: aliasing?: stack: commands: none
defaults: [
scale 2.0
origin 300x500
@iArnold
iArnold / eval2.red
Last active April 11, 2018 15:03 — forked from dockimbel/eval2.red
Test script for Red/View Android backend
Red [
Title: "Red Android bridge demo"
Author: "Nenad Rakocevic"
File: %eval2.red
Config: [type: 'dll libRed?: no libRedRT?: yes export-ABI: 'cdecl]
Tabs: 4
Needs: 'View
Rights: "Copyright (C) 2013-2017 Nenad Rakocevic. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.