This file contains hidden or 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: "Heart animation" | |
author: "Didier Cadieu" | |
notes: { | |
Traduction in Red/Rebol of Terebus Volodymyr javascript demo : http://codepen.io/tvolodimir/pen/wqKuJ | |
} | |
Needs: View | |
] | |
;*** Settings |
This file contains hidden or 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 hidden or 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 [] | |
lines: read/lines %/etc/issue | |
; parse-row: func [row /local rule tmp] [ | |
; rule: [any [copy x to tab skip (keep x)] copy x thru end (keep x)] | |
; tmp: collect reduce ['parse 'row rule] | |
; to-map compose [ | |
; account (tmp/1) |
This file contains hidden or 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: "Untitled" | |
Author: "Maxim Velesyuk" | |
Version: 0.0.1 | |
] | |
to-getword: func [w] [ load append copy ":" w ] | |
to-setword: func [w] [ to set-word! append copy "" w] | |
parse-spec: func [spec] [ |
This file contains hidden or 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 [] | |
lc: function [rule] [ | |
parse rule [ | |
some [ | |
s: word! 'in skip | |
(in: last reduce/into ['foreach s/1 s/3 make block! 4] in) | |
| 'if skip | |
(in: last reduce/into ['if to-paren s/2 make block! 4] in) | |
| skip '| |
This file contains hidden or 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
REBOL [] | |
print [] | |
lc: function [block] [lc-state lc-rule input-rule filter-rule i e] [ | |
lc-state: make object! [ | |
do-block: copy [] | |
inputs: copy [] | |
filter-block: none | |
input-state: copy [] | |
res: copy [] | |
] |
This file contains hidden or 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
REBOL [] | |
find-until: function [series test] [res] [ | |
res: copy [] | |
forall series [ | |
either not test first series [ | |
append res first series | |
] [ | |
break/return res | |
] |
This file contains hidden or 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
To exit, type \\ | |
To remove this startup msg, edit q.q | |
q)S..t:".[`D;(;);{. y};S[]];S[.;`f]:9$D[]" | |
'S..t | |
q)S:D:.+(`a`b`c`d;4 6#,"") | |
'. | |
q)`show$`S | |
'type | |
q) |
This file contains hidden or 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
; Parsed manually from http://www.file-extensions.org/extensions/common-file-extension-list | |
; with code: | |
; function parseTable(t) { var c = t.children[0].children; var res = "(\"" + t.previousSibling.innerText + "\" . ("; for(e in c) { if(c[e].children == undefined) {continue} res += "\"" + c[e].children[0].children[1].innerText + "\" " } return res + "))";} | |
; tables = jQuery("table"); | |
; res = "'("; tables.each(function(x, tab) { res += parseTable(tab); }); res += ")"; res | |
; | |
'(("Video files" . ("264" "3g2" "3gp" "arf" "asf" "asx" "avi" "bik" "dash" "dat" "dvr" "flv" "h264" "m2t" "m2ts" "m4v" "mkv" "mod" "mov" "mp4" "mpeg" "mpg" "mswmm" "mts" "ogv" "prproj" "rec" "rmvb" "swf" "tod" "tp" "ts" "vob" "webm" "wmv" ))("Audio files" . ("3ga" "aac" "aiff" "amr" "ape" "arf" "asf" "asx" "cda" "dvf" "flac" "gp4" "gp5" "gpx" "logic" "m4a" "m4b" "m4p" "midi" "mp3" "ogg" "pcm" "rec" "snd" "sng" "uax" "wav" "wma" "wpl" "zab" ))("Bitmap images" . ("bmp" "dds" "dib" "dng" "dt2" "emf" "gif" "ico" "icon" "jpeg" "jpg" "pcx" "pi |
This file contains hidden or 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
defmodule T.Behaviour do | |
defmacro __using__(_) do | |
quote do | |
@behaviour T.Behaviour | |
import T.Macros, only: [deftest: 2] | |
deftest :a do | |
IO.puts z | |
end |