what we can learn from rebol?
DESCRIPTION
Aout philosophy and features of Rebol and how get some of the interesting inside of Perl. Held at YAPC::EU 2010 in Pisa.TRANSCRIPT
![Page 1: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/1.jpg)
What can Perl learn from Rebol ?
![Page 2: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/2.jpg)
No Rebol Course
![Page 3: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/3.jpg)
some hobby philosophy
![Page 4: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/4.jpg)
Perl Philosophy
TIMTOWTDI
simple and possible
context sensitive
![Page 5: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/5.jpg)
Philosophy
TIMTOWTDI
simple and possible
context sensitive
![Page 6: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/6.jpg)
Quote
Take a dash of PERL, mix with the crossplatform compatibilty of a Java, and make it
extremely easy for beginners to start coding, andyou get the general idea.
![Page 7: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/7.jpg)
A Hobby Philosopher
![Page 8: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/8.jpg)
„Real“ Philosopher
![Page 9: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/9.jpg)
Carl Sassenrath
![Page 10: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/10.jpg)
Carl Sassenrath
- Apple, HP and Commodore
![Page 11: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/11.jpg)
Carl Sassenrath
- Apple, HP and Commodore
- Pantaray, American Multimedia, Videostream
![Page 12: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/12.jpg)
Carl Sassenrath
- Apple, HP and Commodore
- Pantaray, American Multimedia, Videostream
- REBOL Technologies
![Page 13: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/13.jpg)
Carl Sassenrath
- Amiga OS, IOS, VisCorp ED
- CDTV
- Amiga Logo, Next Gen. Forth, Rebol
![Page 14: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/14.jpg)
- Distribution
![Page 15: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/15.jpg)
- Browser
![Page 16: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/16.jpg)
Left Click : Start Rebol App
![Page 17: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/17.jpg)
Left Click : Start Rebol App
![Page 18: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/18.jpg)
Rebol App
![Page 19: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/19.jpg)
Rebol App
![Page 20: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/20.jpg)
Rebol App
![Page 21: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/21.jpg)
Rebol App
![Page 22: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/22.jpg)
- Browser
![Page 23: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/23.jpg)
Right Click : Get Meta Data
![Page 24: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/24.jpg)
Rebol Editor
![Page 25: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/25.jpg)
- Browser
![Page 26: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/26.jpg)
Rebol Shell
![Page 27: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/27.jpg)
Carl Sassenrath
- Amiga OS, IOS, VisCorp ED
- CDTV
- Amiga Logo, Next Gen. Forth, Rebol
![Page 28: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/28.jpg)
Carl Sassenrath
- Amiga OS, IOS, VisCorp ED
- CDTV
- Amiga Logo, Next Gen. Forth, Rebol
![Page 29: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/29.jpg)
![Page 30: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/30.jpg)
● Lisp, Forth, Logo and Self
![Page 31: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/31.jpg)
● Lisp, Forth, Logo and Self
● Lightweight Distributed Computing
![Page 32: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/32.jpg)
● Lisp, Forth, Logo and Self
● Lightweight Distributed Computing
● programming-in-the-small (PITS)
![Page 33: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/33.jpg)
PITS:
~ 800kB binary 1.8 MB for distribution
Libs Tools SamplesDocs Links
![Page 34: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/34.jpg)
PITS:
Remote Editor: 53Daytime Server Deamon: 61
bmp2png ConverterTCP Port Scanner: 98Simple Clock App: 106
Minimal Email Client: 130Simple Picture Viewer: 132
![Page 35: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/35.jpg)
PITS:
Remote Editor: 53Daytime Server Deamon: 61
bmp2png ConverterTCP Port Scanner: 98Simple Clock App: 106
Minimal Email Client: 130Simple Picture Viewer: 132
![Page 36: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/36.jpg)
PITS:
view layout [ f: field btn"Edit"[editor to-url f/text]]
![Page 37: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/37.jpg)
● Lisp, Forth, Logo and Self
● Lightweight Distributed Computing
● programming-in-the-small (PITS)
![Page 38: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/38.jpg)
● Lisp, Forth, Logo and Self
● Lightweight Distributed Computing
● fighting software complexety
![Page 39: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/39.jpg)
● Lisp, Forth, Logo and Self
● Lightweight Distributed Computing
● fighting software complexety
![Page 40: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/40.jpg)
![Page 41: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/41.jpg)
Silent Scream: Rebel with a cause
![Page 42: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/42.jpg)
Relative Expression-Based Object Language
![Page 43: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/43.jpg)
Relative Expression-Based Object Language
eval that like REBOL does:
back to front
![Page 44: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/44.jpg)
Relative Expression-Based Object Language
the obvious, don't argue with that
![Page 45: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/45.jpg)
Relative Expression-Based Object Language
sounds like OOP ?
![Page 46: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/46.jpg)
Relative Expression-Based Object Language
● no OOP like Ruby or Perl 6
![Page 47: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/47.jpg)
Relative Expression-Based Object Language
● no OOP like Ruby or Perl 6
● Object means here just „thing“
![Page 48: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/48.jpg)
Relative Expression-Based Object Language
That brings no meaning anyway :)
There are same principles it's based on
![Page 49: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/49.jpg)
Relative Expression-Based Object Language
Sounds like a functional language ?
![Page 50: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/50.jpg)
Relative Expression-Based Object Language
(not pure) functional (since 2.0)
![Page 51: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/51.jpg)
Relative Expression-Based Object Language
![Page 52: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/52.jpg)
Relative Expression-Based Object Language
● Thats's the main message
![Page 53: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/53.jpg)
Relative Expression-Based Object Language
● Thats's the main message
● That's how Rebol syntax works
![Page 54: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/54.jpg)
Relative Expression-Based Object Language
● Thats's the main message
● That's how Rebol syntax works
● In Perl we call that context sensitive
![Page 55: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/55.jpg)
Relative Expression-Based Object Language
read http://www.perl.org/learn.html
read %info.txt
![Page 56: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/56.jpg)
Rebol Perl 5
read http://www.perl.org/learn.html use LWP::Simple;
get("http://www.perl.org/learn.html");
text: read %info.txt use File::Slurp; my $text = slurp( 'info.txt' ) ;
![Page 57: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/57.jpg)
Rebol Perl 6
read http://www.perl.org/learn.html use HTTP::Client;
HTTP::Client.new.get("http://www.perl.org/learn.html");
text: read %info.txt my $text = slurp( 'info.txt' ) ;
![Page 58: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/58.jpg)
welcome to the strange land
![Page 59: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/59.jpg)
shock therapy
![Page 60: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/60.jpg)
, forget all you know
no variablesno hashes
no precedence table (2 + 3 * 2 == 10)no builtins
no Subroutinensometimes scopes
no name spaces (befor Rebol 3)no Regex (parse)
![Page 61: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/61.jpg)
All is gone?
![Page 62: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/62.jpg)
You have to know 4 concepts
![Page 63: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/63.jpg)
4 Terms
words:
data types:
series:
refinements:
![Page 64: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/64.jpg)
4 Terms
words: typeless data container
data types:
series:
refinements:
![Page 65: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/65.jpg)
4 Terms
words: variables, routines, buildins
data types:
series:
refinements:
![Page 66: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/66.jpg)
4 Terms
words: variables, routines, buildins
data types: integer, string, char, tuple, pair, block,
series:
refinements:
![Page 67: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/67.jpg)
4 Terms
words: variables, routines, buildins
data types: integer, string, char, tuple, pair, block,money, file, url, email, tag, binary, date, time, issue
series:
refinements:
![Page 68: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/68.jpg)
4 Terms
words: variables, routines, buildins
data types: integer, string, char, tuple, pair, block,money, file, url, email, tag, binary, date, time, issue
series:
refinements:
![Page 69: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/69.jpg)
4 Terms
words: variables, routines, buildins
data types: integer, string, char, tuple, pair, block,money, file, url, email, tag, binary, date, time, issue
series: lists, hashes, code
refinements:
![Page 70: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/70.jpg)
4 Terms
words: variables, routines, buildins
data types: integer, string, char, tuple, pair, block,money, file, url, email, tag, binary, date, time, issue
series: lists, hashes, code
refinements: (@ / %) slices / return value
![Page 71: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/71.jpg)
Perl Rebol# => ;
{} => [] $var = => var:$var => :var
eval $var => var $var[3] => var/3
$var{'sub'} => var/sub sub() => sub
sub($p,$m) => sub p m
![Page 72: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/72.jpg)
Perl Rebol
$a++ a: a + 1
![Page 73: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/73.jpg)
Perl Rebol
$a = 30 * 3.1415 / 180 sin($a) / cos($a) tangent 30
sin($a) / cos($a) tangent/radians 30
use Math::Trig; tan(deg2rad(30));
![Page 74: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/74.jpg)
Perl 6 Rebol
loop => foreverall, any none @a => all, any []
prompt => ask slurp => read
no break in switchPair als nativer Typ
grammars, heavy usage of MMD
![Page 75: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/75.jpg)
Meta Data
REBOL [Title:Date:
Version:...
]
![Page 76: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/76.jpg)
Meta Data
File: Author: Email: Web: Rights: Requires:
Purpose: { }, Comment: { }, Notes: { }
History: [0.1.1 12-Oct-2008 "add to ... path"
Library: [ ...
![Page 77: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/77.jpg)
DSL for GUI
view layout [ text :rise_time
button "Quit" #"q" [quit]]
![Page 78: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/78.jpg)
in Perluse Tkx;
Tkx::button(".b", -text => "Hello, world", -command => sub { Tkx::destroy(".") },);
Tkx::pack(".b");
Tkx::MainLoop();
![Page 79: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/79.jpg)
in Perluse Prima qw(Application Button);
New Prima::MainWindow( text => "Hello, world", size => [ 200, 200] ,)-> insert( Button => centered => 1, text => "Hello, world", onClick => sub { $::application->close } ,);
run Prima;
![Page 80: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/80.jpg)
RebGUI
view layout [ text :rise_time
button "Quit" #"q" [quit]]
![Page 81: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/81.jpg)
DSL for Regex
expr: [term ["+" | "-"] expr | term] term: [factor ["*" | "/"] term | factor]
factor: [primary "**" factor | primary] primary: [some digit | "(" expr ")"]
digit: charset "0123456789"
probe parse "1 + 2 * ( 3 - 2 ) / 4" expr== true
![Page 82: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/82.jpg)
DSL for Regex
parse read http://www.gaisma.com/en/location/halle.html [ thru <td class="sunshine"><i> copy rise_time to </i> ]
![Page 83: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/83.jpg)
Functional DSL
does
func
function
![Page 84: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/84.jpg)
DSL for OOP
make
![Page 85: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/85.jpg)
Rebol 3
Open Source
Unicode
Debug Hooks
Better GUI Objects
![Page 86: What we can learn from Rebol?](https://reader033.vdocument.in/reader033/viewer/2022042814/554f411cb4c905cd048b5431/html5/thumbnails/86.jpg)
Ideas
Io::All
Perlapi
Modules
Prima