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: ".system.coder.apps.vscode.extensions.doc.gen.red" | |
Url: https://gist.github.com/lepinekong/a1b1bdff993fdfdb969e933eb14cd266 | |
Parent: %.system.coder.apps.vscode.install.red | |
Authors: ["Lépine Kong"] | |
References: [ | |
https://www.red-lang.org/2014/12/050-objects-support.html | |
] | |
Release: 1.0 | |
Phase: "alpha" |
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
do-trace: function [.line-number [integer!] '.block [word! block! unset!] | |
.file [file! url! string!] | |
/filter that-contains [string! file! url!] | |
][ | |
file: form .file | |
if filter [ | |
either not find file that-contains [exit][ | |
] | |
] |
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
Tutorials: [ | |
https://dev.to/lepinekong/red-for-hopeless-programmers---part-i-3g0 | |
https://dev.to/lepinekong/red-for-hopeless-programmers---part-ii-258 | |
] | |
Demo-Instruction: { | |
can be pasted directly in Redlang Console (1 Mb download https://www.red-lang.org/p/download.html) | |
if you just want to see demo without downloading, type in Red console: | |
do read https://gist.githubusercontent.com/lepinekong/08021f2b8ecdd3e0dc09685ef0b0c03f/raw/c7b41adc9a3815f77c4bca815af35b598f920bc1/.system.user.apps.countdown.red | |
Countdown 00:25:00 Pomodoro |
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
Comment { | |
Redlang: https://red-lang.org | |
Tutorials: [ | |
https://dev.to/lepinekong/red-for-hopeless-programmers---part-i-3g0 | |
https://dev.to/lepinekong/red-for-hopeless-programmers---part-ii-258 | |
] | |
Demo-Instruction: { | |
- Script below Red[] can be pasted directly in Redlang Console (1 Mb download https://www.red-lang.org/p/download.html) | |
- if you just want to see demo without downloading, type in Red console: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Scheme> | |
<keyword-classes> | |
<keyword-class name="red.keywords"> | |
about abs absolute add alert alias all alter and any any-block? any-function? any-string? any-type? any-word? append arccosine arcsine arctangent array as-pair ask at attempt back binary? bind bitset? block? break brightness? browse build-tag caret-to-offset catch center-face change change-dir char? charset checksum choose clean-path clear clear-fields close comment complement component? compose compress confirm connected? construct context copy cosine datatype? date? debase decimal? decode-cgi decompress dehex delete detab difference dir? dirize disarm dispatch divide do do-events does dump-face dump-obj echo either else email? empty? enbase entab equal? error? even? event? exclude exists? exit exp extract fifth file? find first flash focus for forall foreach forever form forskip found? fourth free func function function? get get-modes get-word? greater-or-equal? greater? halt has hash? head head? help h |
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
.system.override: function['.func-name][ | |
Context [ | |
func-name: form .func-name | |
func-src: get :.func-name | |
spec: mold/only spec-of :func-src | |
template: {if not value? 'sys<%func-name%> [ | |
sys<%func-name%>: :<%func-name%> | |
<%func-name%>: function [<%spec%>][ |
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: ".code.analyze" | |
] | |
src: {Red [ | |
Title: ".system.override.red" | |
] | |
if not value? 'syscd [ | |
syscd: :cd |
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: ".system.override.red" | |
] | |
if not value? 'syscd [ | |
syscd: :cd | |
cd: func [ | |
"Change directory (shell shortcut function)." | |
[catch] | |
'path [file! word! path! unset! string! paren! url!] "Accepts %file, :variables and just words (as dirs)" |
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
((Search)) - searchString /in 'path /ext 'extension ->> searchString: form searchString | |
subgraph Init | |
searchString: form searchString | |
searchString: form searchString ->> ext? | |
subgraph extension | |
ext? - Yes ->> extension: form extension | |
extension: form extension ->> extension: to-file extension | |
ext? - No ->> extension: %.md | |
end | |
extension: %.md ->> root: any [path %./] |
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: "DSL for Modelisation and Simulation of Business Entities" | |
] | |
Simulate Bank: Model [ | |
Companies: [[Company]] ; companies is a collection of company which are potential clients of the bank | |
Company: [name Address (optional)] | |
Employees: [[Employee]] ; employees is a collection of employee | |
ThirdParties: [[ThirdParty]] ; thirdParties is a collection of thirdParty | |
ThirdParty: [ |