view layout [
u: field "[email protected]"
h: field "http://"
btn "Send" [
send to-email u/text
read to-url h/text
alert "Sent“
]
]
开启视窗、读取网页、邮寄出去
foreach file load %./ [
if not dir? file [
write/binary join
ftp://user:[email protected]/
file
read/binary file
]
]
FTP上传所有文件
repeat n 100 [
if not error? try [
close open probe
join tcp://localhost: n
] [
print [n "is open"]
]
]
TCP端口扫描
view layout [
origin 0
t: h1 red black (to string! now/time)
rate 1
feel [
engage: [
t/text: now/time
show t
]
]
]
数字钟
view l: layout [
origin 0x0
b: box "Load" [
error? try [
b/image: i:
load first request-file
b/text: ""
l/size: b/size:
i/size show l
]
]
]
图片浏览器
When It Comes to Programming, Are You A
R E B E L ?[`rebl]
Stand up for Simplicityand Flexibility, Against Software
Complexity and Software
Obesity, and Want to
Program with Fun.
Hay! You Got to Try Java
!!!
3 Ways to Run REBOL Scripts
Operating System
REBOLInterpreter
REBOLScript
REBOLInterpreter
REBOLScript
REBOLinteractive Interpreter
REBOLScript
Windowing
Drawing
Networking
Database Accessing
Web Browser Plug-In
External Lib Interface
All In One, One For All
Data Types You Can Imagine
datatype value
Int! 1
Decimal! 3.1416
Char! #"A"
Logic! True
String! "ABC"
>> ? 1
1 is an integer
>> ? 3.1416
3.1416 is a decimal
>> ? #"A"
#"A" is a char
>> ? True
TRUE is a logic of value: true
>> Type? "ABC"
== string!
Data Types You Cannot Imagine
datatypeURL value
Email! [email protected]
Percent! 32%
Tag! <IMG>
Date! 2009-7-21
Time! 18:00
File! %gdi32.dll
Tuple! 127.0.0.1
URL! http://www.abc.com/
. . . More . . .
Any-TypeSeries
Scalar
Number
Any-Word
Any-String
Any-FunctionAny-Block
REBOL Data Types (& Type Sets)Char!
// Pseudo-Code
// Include This and That
// Declare This and That
// ...
Class MyApp {
MyApp () {
// …
}
void action() {
System.quit();
}
void layout() {
Label title = new Label("Hello")
Button btn = new Button("OK");
btn.Click = action;
Window win = new Window();
win.add(btn);
win.add(btn);
win.show();
}
}
REBOL[]
View Layout [
Title "Hello"
Btn "OK" [
Quit
]
]
Maintain
Writeable
Succinct
Literals Dialecting
Parsing
Abstraction
Bug-Free
Readable
GUI
Finance
Database
. . .
Functions
REBOL in Web Server
• CGI (Common Gateway Interface)
• Fast-CGI
• Cheyenne Web Server (300 KB Only)
• REBOL Server Pages (RSP)
REBOL 3.0 SupportsUnicode• String is in Unicode.
• Both In Core and In View
• Will Support Multi CharSets
When to Use REBOL
Spider
MobileAgent
InstanceMessenger
Dialect
ArtificialIntelligence
TextProcessing