BrainwasherJerry Tsai / 蔡学镛 ( 孔宣 )Alipay.com Co. Ltd’KongXuan@Alipay.com
“Hello“ Made Easy in REBOL!REBOL[]View Layout [Title "Hello"BTN "OK" [Quit]]
Keep ITSimpleREBOL is Simple!1. Downloading & Upgrading2. Installation3. All In One, One For All4. Coding4. Porting to Oth...
When It Comesto Programming,Are You AREBEL?[`rebl]Stand up for Simplicityand Flexibility, Against SoftwareComplexityand So...
R E B O LELATIVEXPRESSIONASEDBJECTANGUAGES T A N D SF O R
As A Java Programmer,You Know Objects Already.
But Relative Expression?
can• auxiliary• tin• noun• potRelative-Expression=>Context-Sensitive Code
Carl Sassenrath,The REBOL Creator
3 Ways to Run REBOL ScriptsOperating SystemREBOLInterpreterREBOLScriptREBOLInterpreterREBOLScriptREBOLinteractiveInterpret...
Portable ScriptsOperating SystemREBOL InterpreterREBOL ScriptOperating SystemREBOL Interpreter
REBOL Supports MajorOperating SystemsIncluding…AndIt’s Designedfor Easily Portingto More Platforms …
REBOL – Tiny FootprintSmall FootprintRuntime 10x lessthan JavaScript Size 10x lessthan Java
15.1~23 MB197 MB10.310.714.91150 MB 100 MB10 MB2x< 1Size Does Matter, 2008 EditionAdobeAIR
WindowingDrawingNetworkingDatabase AccessingWeb Browser Plug-InExternal Lib InterfaceSmall YetPowerfulAll In One, One For ...
Data Types You Can Imaginedatatype valueInt! 1Decimal! 3.1416Char! #"A"Logic! TrueString! "ABC">> ? 11 is an integer>> ? 3...
Data Types You Cannot ImaginedatatypeURL valueEmail! jerry@abc.comPercent! 32%Tag! <IMG>Date! 2009-7-21Time! 18:00File! %g...
Any-TypeSeriesScalarNumberAny-WordAny-StringAny-FunctionAny-BlockREBOL Data Types (& Type Sets)Char!
// Pseudo-Code// Include This and That// Declare This and That// ...Class MyApp {MyApp () {// …}void action() {System.quit...
MaintainWriteableSuccinctLiterals DialectingParsingAbstractionBug-FreeReadableGUIFinanceDatabase. . .Mojo of REBOFunctions
REBOL Viewis Easy and Fun!
Take a BreakFor 10 MinsZ .. Z .. Z ....
• Extends REBOL• Are DLLs• Can Be in C or REBOL• Only in REBOL 3.0REBOL Plug-ins
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
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 REBOLSpiderMobileAgentInstanceMessengerDialectArtificialIntelligenceTextProcessing
REBOL is COOL, REBOL isGREAT, REBOL isWONDERFUL, REBOL is ONEof A KIND, REBOL is What IWant …
Join UsAndDo SomethingREBOL User Group @ ChinaAliTalk Group: No. 16626148Host: Jerry Tsai (KongXuan)REBOL Docs Trans Progr...
REBOL Baby-Step Examples
Q1: Print web page sourceprint read http://www.rebol.com
Q2: Open a GUI, read web page, sentit as emailview layout [u: field "user@rebol.com"h: field "http://"btn "Send" [send to-...
Q3: FTP upload all filesforeach file load %./ [if not dir? file [write/binary joinftp://user:pass@example.com/ fileread/bi...
Q4: TCP port scannerrepeat n 100 [if not error? try [close open probe join tcp://localhost: n] [print [n "is open"]]]
Q5: Save web page text to a fileremove-each tag page:load/markup http://www.rebol.com[ tag? Tag ]write %page.txt page
Q6: Digital Clockview layout [origin 0t: h1 red black (to string! now/time)rate 1feel [engage: [t/text: now/timeshow t]]]
Q7: Picture Viewerview l: layout [origin 0x0b: box "Load" [error? try [b/image: i: load first request-fileb/text: ""l/size...
Thank You
Rebol brainwasher
Upcoming SlideShare
Loading in …5
×

Rebol brainwasher

1,906 views

Published on

  • Be the first to comment

  • Be the first to like this

Rebol brainwasher

  1. 1. BrainwasherJerry Tsai / 蔡学镛 ( 孔宣 )Alipay.com Co. Ltd’KongXuan@Alipay.com
  2. 2. “Hello“ Made Easy in REBOL!REBOL[]View Layout [Title "Hello"BTN "OK" [Quit]]
  3. 3. Keep ITSimpleREBOL is Simple!1. Downloading & Upgrading2. Installation3. All In One, One For All4. Coding4. Porting to Other Platforms5. Maintenance
  4. 4. When It Comesto Programming,Are You AREBEL?[`rebl]Stand up for Simplicityand Flexibility, Against SoftwareComplexityand SoftwareObesity, and Want toProgram with Fun.Hay! You Got to Try Java!!!
  5. 5. R E B O LELATIVEXPRESSIONASEDBJECTANGUAGES T A N D SF O R
  6. 6. As A Java Programmer,You Know Objects Already.
  7. 7. But Relative Expression?
  8. 8. can• auxiliary• tin• noun• potRelative-Expression=>Context-Sensitive Code
  9. 9. Carl Sassenrath,The REBOL Creator
  10. 10. 3 Ways to Run REBOL ScriptsOperating SystemREBOLInterpreterREBOLScriptREBOLInterpreterREBOLScriptREBOLinteractiveInterpreterREBOLScript
  11. 11. Portable ScriptsOperating SystemREBOL InterpreterREBOL ScriptOperating SystemREBOL Interpreter
  12. 12. REBOL Supports MajorOperating SystemsIncluding…AndIt’s Designedfor Easily Portingto More Platforms …
  13. 13. REBOL – Tiny FootprintSmall FootprintRuntime 10x lessthan JavaScript Size 10x lessthan Java
  14. 14. 15.1~23 MB197 MB10.310.714.91150 MB 100 MB10 MB2x< 1Size Does Matter, 2008 EditionAdobeAIR
  15. 15. WindowingDrawingNetworkingDatabase AccessingWeb Browser Plug-InExternal Lib InterfaceSmall YetPowerfulAll In One, One For AllREBOL
  16. 16. Data Types You Can Imaginedatatype valueInt! 1Decimal! 3.1416Char! #"A"Logic! TrueString! "ABC">> ? 11 is an integer>> ? 3.14163.1416 is a decimal>> ? #"A"#"A" is a char>> ? TrueTRUE is a logic of value: true>> Type? "ABC"== string!
  17. 17. Data Types You Cannot ImaginedatatypeURL valueEmail! jerry@abc.comPercent! 32%Tag! <IMG>Date! 2009-7-21Time! 18:00File! %gdi32.dllTuple! 127.0.0.1URL! http://www.abc.com/. . . More . . .
  18. 18. Any-TypeSeriesScalarNumberAny-WordAny-StringAny-FunctionAny-BlockREBOL Data Types (& Type Sets)Char!
  19. 19. // 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]]The MagicOf Dialects
  20. 20. MaintainWriteableSuccinctLiterals DialectingParsingAbstractionBug-FreeReadableGUIFinanceDatabase. . .Mojo of REBOFunctions
  21. 21. REBOL Viewis Easy and Fun!
  22. 22. Take a BreakFor 10 MinsZ .. Z .. Z ....
  23. 23. • Extends REBOL• Are DLLs• Can Be in C or REBOL• Only in REBOL 3.0REBOL Plug-ins
  24. 24. REBOL in Web Server• CGI (Common Gateway Interface)• Fast-CGI• Cheyenne Web Server (300 KB Only)• REBOL Server Pages (RSP)
  25. 25. REBOL 3.0 SupportsUnicode• String is in Unicode.• Both In Core and In View• Will Support Multi CharSets
  26. 26. REBOL/Services (SOA Lite)XML? Nah!Dialects are Better.
  27. 27. REBOL/Code• Talk to REBOL VM Directly• With Great Performance• REBOL Dialecting Technology
  28. 28. When to Use REBOLSpiderMobileAgentInstanceMessengerDialectArtificialIntelligenceTextProcessing
  29. 29. REBOL is COOL, REBOL isGREAT, REBOL isWONDERFUL, REBOL is ONEof A KIND, REBOL is What IWant …
  30. 30. Join UsAndDo SomethingREBOL User Group @ ChinaAliTalk Group: No. 16626148Host: Jerry Tsai (KongXuan)REBOL Docs Trans Program(http://sites.google.com/site/cnrebol/)Host: CaiMinKuiRebology Blog(http://rebollovesjerry.blogspot.com)Host: Jerry Tsai
  31. 31. REBOL Baby-Step Examples
  32. 32. Q1: Print web page sourceprint read http://www.rebol.com
  33. 33. Q2: Open a GUI, read web page, sentit as emailview layout [u: field "user@rebol.com"h: field "http://"btn "Send" [send to-email u/textread to-url h/textalert "Sent“]]
  34. 34. Q3: FTP upload all filesforeach file load %./ [if not dir? file [write/binary joinftp://user:pass@example.com/ fileread/binary file]]
  35. 35. Q4: TCP port scannerrepeat n 100 [if not error? try [close open probe join tcp://localhost: n] [print [n "is open"]]]
  36. 36. Q5: Save web page text to a fileremove-each tag page:load/markup http://www.rebol.com[ tag? Tag ]write %page.txt page
  37. 37. Q6: Digital Clockview layout [origin 0t: h1 red black (to string! now/time)rate 1feel [engage: [t/text: now/timeshow t]]]
  38. 38. Q7: Picture Viewerview l: layout [origin 0x0b: box "Load" [error? try [b/image: i: load first request-fileb/text: ""l/size: b/size:i/size show l]]]
  39. 39. Thank You

×