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: "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 |
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 [] | |
info: func ['fn /name /intro /args /refinements /locals /return /spec | |
/arg-num /arg-names /arg-types /ref-names /ref-types /ref-num /type | |
/local intr ars refs locs ret arg ref typ | |
][ | |
intr: copy "" ars: make map! copy [] refs: make map! copy [] locs: copy [] ret: copy [] typ: ref-arg: ref-arg-type: none | |
if lit-word? fn [fn: to-word fn] | |
unless find [op! native! function! action!] type?/word get fn [ | |
cause-error 'user 'message ["Only function types accepted!"] | |
] |
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 [] | |
form-all: func [blk][ | |
forall blk [blk/1: form blk/1] | |
blk | |
] | |
types-of: function [value [typeset!]][ | |
; typesets don't support reflection | |
third load mold value |
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: "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 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
var MyApp = angular.module('MyApp'); | |
MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
var msgBus = {}; | |
msgBus.emitMsg = function(msg, data) { | |
data = data || {}; | |
$rootScope.$emit(msg, data); | |
}; | |
msgBus.onMsg = function(msg, func, scope) { | |
var unbind = $rootScope.$on(msg, func); | |
if (scope) { |