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 [needs: view] | |
img: draw 4000x2000 [scale 2 2 fill-pen yello circle 1000x500 1000 500] | |
lag: object [max: avg: 0.0] | |
offset: 0x0 | |
plot: [] | |
system/view/auto-sync?: off | |
view/no-wait [ | |
below |
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: "HTML entities" | |
Purpose: "To decode HTML entities in a text" | |
Author: "Oldes" | |
Date: 12-May-2020 | |
Version: 1.0.2 | |
License: MIT | |
Usage: [ | |
"Test: ♠ & ¢ <a> and Δδ ¾" = | |
decode-html-entities {Test: ♠ & ¢ <a> and Δδ ¾} |
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: "Puny GUI Puppy Finder, Red version" | |
Author: @9214 | |
Date: 26-Apr-2020 | |
Link: https://ahungry.com/blog/2020-04-24-Puny-GUI-Puppy-Finder.html | |
] | |
view [ | |
title "Puppy Finder" | |
below center |
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: "Study of parsing `any-string!`, `any-word!` and `any-path!` values" | |
Date: 23-Nov-2019 | |
] | |
string-parse: function [s /case /quote /upper /block][ | |
l: append/dup copy "" #" " 15 | |
s2: either upper [uppercase copy s][s] | |
print append copy l "string url tag email file" | |
types: [to-string to-url to-tag to-email to-file] |
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: {Ray casting exercise} | |
Needs: View | |
Date: 25-July-2019 | |
Inspiration: https://github.com/krisajenkins/elm-rays | |
Tutorial: https://ncase.me/sight-and-light/ | |
Redporter: "Toomas Vooglaid" | |
Licence: "Public domain" | |
] | |
; To change into plain light instead of radial |
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 [ | |
author: {Nędza Darek} | |
license: { | |
- use/modify everywhere | |
- point to this gist/github | |
- no warranties | |
} | |
version: 0.0.1 | |
] | |
p1: to-path bind [next a] context [next: 11] |
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: "Extended MATH dialect" | |
Author: 9214 | |
Date: 12-Nov-18 | |
] | |
math: function [ | |
"Evaluate expression using PEMDAS precedence rules" | |
body [any-list!] | |
/local match |
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 [] | |
ctx: context [ | |
char: charset {([{}])"} ;" | |
opens: charset "[(" | |
closes: charset "])" | |
line: 1 | |
stack: make block! 1000 | |
mark: comm: none | |
instr: false | |
inmulti: 0 |
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 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 %" "}] |
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
->: make op! :function ; arrow-style lambdas: [x]->[x + 1] | |
id: ["Identity function, one in, same out" x]->[x] | |
;-------------------------------------------------------------------------------------- | |
cmp: ["Gets a block! of words! or blcoks! that represent a function! and composes it in the usual way" | |
fs [any-block!]]->[ [x]-> compose/deep/only [take reduce append (reduce fs) [x] ] | |
] |
NewerOlder