REB IsL漫谈
Programming Fun Again

      支付宝 蔡学镛
REBOL的劣势
完美主义导致发展进度缓慢
对僵化的脑袋来说,这语言有点别扭
远远超出他们的理解
加上核心代码没有开源
好文档相当欠缺
用户与市场需求相当小



       0.0000001%
REBOL的优势
不需要一堆文件与配置
体积超级小…
能做的事却不少
而且很容易就可做到(嗯…上手以后啦)
是当今DSL能力最强的语言
很适合开发抛弃式程序
或者快速打造原型系统
跨越多个主流平台
不可思议的简短代码示例
REBOL[]
View Layout [
    Title "Hello"
    Btn "OK" [
        Quit
    ]
]




    视窗程序居然这么简短
print read http://www.rebol.com




    下载并打印某网页内容
开启视窗、读取网页、邮寄出去

view layout [
    u: field "user@rebol.com"
    h: field "http://"
    btn "Send" [
        send to-email ...
foreach file load %./ [
    if not dir? file [
        write/binary join
            ftp://user:pass@example.com/
        ...
TCP端口扫描
repeat n 100 [
    if not error? try [
        close open probe
            join tcp://localhost: n
    ] [
      ...
remove-each tag page:
    load/markup http://www.rebol.com
    [ tag? Tag ]
write %page.txt page




        将网页存成文件
数字钟
view layout [
    origin 0
    t: h1 red black (to string! now/time)
        rate 1
        feel [
             engage...
view l: layout [
    origin 0x0
    b: box "Load" [
        error? try [
            b/image: i:
                load firs...
REBOL把事情变简单!
1. 下载、更新,简单!

2. 安装,简单!

3. 不用依赖一堆文件,简单!

4. 编写代码,简单!

4. 移植到其他平台,简单!

5. 维护,简单!
When It Comes
to Programming,
Are You A
   REBEL?                   [`rebl]



Stand up for   Simplicity
and Flexibility, ...
R   E   B O     L   S   T   A N D   S
F   O R   E   X   A   B   A
          L   P   S   J   N
          A   R   E   E   G
...
As A Java Programmer,
You Know Objects Already.
But Relative Expression?
Relative-Expression
=>
Context-Sensitive Code


can
• 助动词 / 能
• 名词 / 罐
• 动词 / 装罐
Carl Sassenrath,
The REBOL Creator
3 Ways to Run REBOL Scripts

                                   REBOL
  REBOL          REBOL             Script
  Script  ...
Portable Scripts



                    REBOL Script


REBOL Interpreter                  REBOL Interpreter


Operating Sy...
All In One, One For All

Windowing

Drawing

Networking

Database Accessing

Web Browser Plug-In

External Lib Interface
Data Types You Can Imagine

datatype       value   >> ? 1
                       1 is an integer
Int!       1
            ...
Data Types You Cannot Imagine

   datatypeURL                  value
Email!             jerry@abc.com
Percent!           3...
REBOL Data Types (& Type Sets)
                                    Char!



                     Scalar

 Any-String
     ...
// Pseudo-Code                          REBOL[]
// Include This and That                View Layout [
// Declare This and ...
Parsing


                           Functions
           Maintain



Literals   Readable    Abstraction               Dia...
REBOL Plug-ins
                 • Extends REBOL

                 • Are DLLs

                 • Can Be in C or REBOL

   ...
REBOL in Web Server



• CGI (Common Gateway Interface)

• Fast-CGI

• Cheyenne Web Server (300 KB Only)

• REBOL Server P...
REBOL 3.0 Supports
• String is in Unicode.             Unicode

• Both In Core and In View

• Will Support Multi CharSets
REBOL/Services (SOA Lite)




        XML? Nah!
        Dialects are Better.
REBOL/Code

• Talk to REBOL VM Directly

• With Great Performance

• REBOL Dialecting Technology
When to Use REBOL




Spider           Dialect          Text
                               Processing




  Mobile       ...
蔡学镛   Rebol漫谈
蔡学镛   Rebol漫谈
Upcoming SlideShare
Loading in …5
×

蔡学镛 Rebol漫谈

8,543 views
8,295 views

Published on

1 Comment
31 Likes
Statistics
Notes
  • 非常好的rebol宣传片
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
8,543
On SlideShare
0
From Embeds
0
Number of Embeds
81
Actions
Shares
0
Downloads
299
Comments
1
Likes
31
Embeds 0
No embeds

No notes for slide

蔡学镛 Rebol漫谈

  1. 1. REB IsL漫谈 Programming Fun Again 支付宝 蔡学镛
  2. 2. REBOL的劣势
  3. 3. 完美主义导致发展进度缓慢
  4. 4. 对僵化的脑袋来说,这语言有点别扭
  5. 5. 远远超出他们的理解
  6. 6. 加上核心代码没有开源
  7. 7. 好文档相当欠缺
  8. 8. 用户与市场需求相当小 0.0000001%
  9. 9. REBOL的优势
  10. 10. 不需要一堆文件与配置
  11. 11. 体积超级小…
  12. 12. 能做的事却不少
  13. 13. 而且很容易就可做到(嗯…上手以后啦)
  14. 14. 是当今DSL能力最强的语言
  15. 15. 很适合开发抛弃式程序
  16. 16. 或者快速打造原型系统
  17. 17. 跨越多个主流平台
  18. 18. 不可思议的简短代码示例
  19. 19. REBOL[] View Layout [ Title "Hello" Btn "OK" [ Quit ] ] 视窗程序居然这么简短
  20. 20. print read http://www.rebol.com 下载并打印某网页内容
  21. 21. 开启视窗、读取网页、邮寄出去 view layout [ u: field "user@rebol.com" h: field "http://" btn "Send" [ send to-email u/text read to-url h/text alert "Sent“ ] ]
  22. 22. foreach file load %./ [ if not dir? file [ write/binary join ftp://user:pass@example.com/ file read/binary file ] ] FTP上传所有文件
  23. 23. TCP端口扫描 repeat n 100 [ if not error? try [ close open probe join tcp://localhost: n ] [ print [n "is open"] ] ]
  24. 24. remove-each tag page: load/markup http://www.rebol.com [ tag? Tag ] write %page.txt page 将网页存成文件
  25. 25. 数字钟 view layout [ origin 0 t: h1 red black (to string! now/time) rate 1 feel [ engage: [ t/text: now/time show t ] ] ]
  26. 26. 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 ] ] ] 图片浏览器
  27. 27. REBOL把事情变简单! 1. 下载、更新,简单! 2. 安装,简单! 3. 不用依赖一堆文件,简单! 4. 编写代码,简单! 4. 移植到其他平台,简单! 5. 维护,简单!
  28. 28. When It Comes to Programming, Are You A REBEL? [`rebl] Stand up for Simplicity and Flexibility, Against Software Complexity and Software Obesity , and Want to Program with Fun. Hay! You Got to Try Java !!!
  29. 29. R E B O L S T A N D S F O R E X A B A L P S J N A R E E G T E D C U I S T A V S G E I E O N
  30. 30. As A Java Programmer, You Know Objects Already.
  31. 31. But Relative Expression?
  32. 32. Relative-Expression => Context-Sensitive Code can • 助动词 / 能 • 名词 / 罐 • 动词 / 装罐
  33. 33. Carl Sassenrath, The REBOL Creator
  34. 34. 3 Ways to Run REBOL Scripts REBOL REBOL REBOL Script Script Script REBOL REBOL REBOL Interpreter interactive Interpreter Interpreter Operating System
  35. 35. Portable Scripts REBOL Script REBOL Interpreter REBOL Interpreter Operating System Operating System
  36. 36. All In One, One For All Windowing Drawing Networking Database Accessing Web Browser Plug-In External Lib Interface
  37. 37. Data Types You Can Imagine datatype value >> ? 1 1 is an integer Int! 1 >> ? 3.1416 Decimal! 3.1416 3.1416 is a decimal Char! #"A" >> ? #"A" Logic! True #"A" is a char >> ? True String! "ABC" TRUE is a logic of value: true >> Type? "ABC" == string!
  38. 38. Data Types You Cannot Imagine datatypeURL value Email! jerry@abc.com 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 . . .
  39. 39. REBOL Data Types (& Type Sets) Char! Scalar Any-String Number Series Any-Type Any-Word Any-Block Any-Function
  40. 40. // Pseudo-Code REBOL[] // Include This and That View Layout [ // Declare This and That Title "Hello" Btn "OK" [ // ... Quit 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(); }
  41. 41. Parsing Functions Maintain Literals Readable Abstraction Dialecting Writeable GUI Succinct Finance Database Bug-Free ...
  42. 42. REBOL Plug-ins • Extends REBOL • Are DLLs • Can Be in C or REBOL • Only in REBOL 3.0
  43. 43. REBOL in Web Server • CGI (Common Gateway Interface) • Fast-CGI • Cheyenne Web Server (300 KB Only) • REBOL Server Pages (RSP)
  44. 44. REBOL 3.0 Supports • String is in Unicode. Unicode • Both In Core and In View • Will Support Multi CharSets
  45. 45. REBOL/Services (SOA Lite) XML? Nah! Dialects are Better.
  46. 46. REBOL/Code • Talk to REBOL VM Directly • With Great Performance • REBOL Dialecting Technology
  47. 47. When to Use REBOL Spider Dialect Text Processing Mobile Instance Artificial Agent Messenger Intelligence

×