Skip to content

Instantly share code, notes, and snippets.

Avatar

Boleslav Březovský rebolek

View GitHub Profile
@rgchris
rgchris / httpc.red
Last active Dec 17, 2018
HTTPC in Red
View httpc.red
#!/usr/local/bin/red
Red [
Title: "HTTP Console"
Date: 15-Dec-2018
File: %httpc.red
Version: 0.1.2
Author: "Christopher Ross-Gill"
History: [
15-Dec-2018 0.1.2 "Red Version"
@toomasv
toomasv / matrix.red
Last active Oct 6, 2017
Little matrix DSL
View matrix.red
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]
@meijeru
meijeru / arith.txt
Last active Sep 6, 2017
Types of artihmetic operations
View arith.txt
Updated to Red for Windows version 0.6.2 built 7-Jun-2017/15:13:57+2:00
The table gives type of first operand, type of second operand, result type
for + (add), - (subtract), * (multiply), / (divide), // (modulo) and % (remainder)
For vectors, the element type is distinguished.
There is one case (time with time) where the result type is not the same
for all allowed operations.
After each type combination, the reverse combination is given.
The fourth column gives the operators for which the combination is forbidden.
If the result type is error, the combination is forbidden for all operators.
@toomasv
toomasv / regex.red
Last active Nov 20, 2017
Regex to parse translator
View regex.red
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.
@gchiu
gchiu / mini-http.r3
Last active Dec 18, 2015
mini-http
View mini-http.r3
rebol []
; mini-http is a minimalistic http implementation
mini-http: funct [url [url!] method [word! string!] code [string!] timeout [integer!]
/callback cb
/cookies cookie [string!]
] [
url-obj: http-request: payload: result: port: none
View load-url.r
make object! [
; Private Unicode Area for encoded delimiters and octets
url-pua-start: #"^(e000)"
url-pua-end: #"^(e0ff)"
delimiter: charset ":/?#[]@!$&'()*+,;="
hex-digit: charset [#"0" - #"9" #"a" - #"f" #"A" - #"F"]
ascii: charset [#"^(00)" - #"^(7f)"]
You can’t perform that action at this time.