• Like
Rebol brainwasher
Upcoming SlideShare
Loading in...5
×

Rebol brainwasher

  • 1,431 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,431
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. BrainwasherJerry Tsai / 蔡学镛 ( 孔宣 )Alipay.com Co. Ltd’KongXuan@Alipay.com
  • 2. “Hello“ Made Easy in REBOL!REBOL[]View Layout [Title "Hello"BTN "OK" [Quit]]
  • 3. Keep ITSimpleREBOL is Simple!1. Downloading & Upgrading2. Installation3. All In One, One For All4. Coding4. Porting to Other Platforms5. Maintenance
  • 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. R E B O LELATIVEXPRESSIONASEDBJECTANGUAGES T A N D SF O R
  • 6. As A Java Programmer,You Know Objects Already.
  • 7. But Relative Expression?
  • 8. can• auxiliary• tin• noun• potRelative-Expression=>Context-Sensitive Code
  • 9. Carl Sassenrath,The REBOL Creator
  • 10. 3 Ways to Run REBOL ScriptsOperating SystemREBOLInterpreterREBOLScriptREBOLInterpreterREBOLScriptREBOLinteractiveInterpreterREBOLScript
  • 11. Portable ScriptsOperating SystemREBOL InterpreterREBOL ScriptOperating SystemREBOL Interpreter
  • 12. REBOL Supports MajorOperating SystemsIncluding…AndIt’s Designedfor Easily Portingto More Platforms …
  • 13. REBOL – Tiny FootprintSmall FootprintRuntime 10x lessthan JavaScript Size 10x lessthan Java
  • 14. 15.1~23 MB197 MB10.310.714.91150 MB 100 MB10 MB2x< 1Size Does Matter, 2008 EditionAdobeAIR
  • 15. WindowingDrawingNetworkingDatabase AccessingWeb Browser Plug-InExternal Lib InterfaceSmall YetPowerfulAll In One, One For AllREBOL
  • 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. 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. Any-TypeSeriesScalarNumberAny-WordAny-StringAny-FunctionAny-BlockREBOL Data Types (& Type Sets)Char!
  • 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. MaintainWriteableSuccinctLiterals DialectingParsingAbstractionBug-FreeReadableGUIFinanceDatabase. . .Mojo of REBOFunctions
  • 21. REBOL Viewis Easy and Fun!
  • 22. Take a BreakFor 10 MinsZ .. Z .. Z ....
  • 23. • Extends REBOL• Are DLLs• Can Be in C or REBOL• Only in REBOL 3.0REBOL Plug-ins
  • 24. REBOL in Web Server• CGI (Common Gateway Interface)• Fast-CGI• Cheyenne Web Server (300 KB Only)• REBOL Server Pages (RSP)
  • 25. REBOL 3.0 SupportsUnicode• String is in Unicode.• Both In Core and In View• Will Support Multi CharSets
  • 26. REBOL/Services (SOA Lite)XML? Nah!Dialects are Better.
  • 27. REBOL/Code• Talk to REBOL VM Directly• With Great Performance• REBOL Dialecting Technology
  • 28. When to Use REBOLSpiderMobileAgentInstanceMessengerDialectArtificialIntelligenceTextProcessing
  • 29. REBOL is COOL, REBOL isGREAT, REBOL isWONDERFUL, REBOL is ONEof A KIND, REBOL is What IWant …
  • 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. REBOL Baby-Step Examples
  • 32. Q1: Print web page sourceprint read http://www.rebol.com
  • 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. Q3: FTP upload all filesforeach file load %./ [if not dir? file [write/binary joinftp://user:pass@example.com/ fileread/binary file]]
  • 35. Q4: TCP port scannerrepeat n 100 [if not error? try [close open probe join tcp://localhost: n] [print [n "is open"]]]
  • 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. Q6: Digital Clockview layout [origin 0t: h1 red black (to string! now/time)rate 1feel [engage: [t/text: now/timeshow t]]]
  • 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. Thank You