Ruby Script at Work
Lukhnos D. Liu
Chief, Lithoglyph Inc.
We’re an ObjC/C++ house...
I love C++...
Templates don’t scare me
for (vector<pair<pair<string, size_t>, set<Node>::const_iterator> >::iterator i = lst.begin()
   ; i != lst.end()
   ; ++i...
C++ is fast
Speed
                                     Improvement
           (higher is better)


 ObjC             1.0              ...
Can do everything
In OpenVanilla, We Have...
 OVStringHelper::Split
 OVStringHelper::Join
 OVFileHelper::SlurpFile
 OVUTF16::FromUTF8
 OVStr...
</digress>
But...
(that’s why I’m here today!)
C++ needs lots of care
Turn-around speed is slow
Compliation is slooooooow
Bad for more than 1 tool
Choices: sh/Makefile/Ruby
Ruby is advanced
Clear structure
Easy to maintain
post-
                                                                                               processing
          ...
Windows Build System
Source   version-    Versioned                             Validation and Dev     Dev
 Code     upper...
Ruby’s Drawbacks
Modules We Use

openssl
digest
uuidtools
Formosa::Mandarin (lukhnos)
Slow... Very slooooooow
String processing   Performance


C++           1               100%


Perl         0.75              75%


Ruby         0...
Total time =
run time x frequency of run
Won’t deploy to users
Future Plans
My Question...
pair<T, T> equivalent?
Questions
Upcoming SlideShare
Loading in …5
×

Ruby Script at Work

1,084
-1

Published on

This is opening talk of Ruby Tuesday Taiwan, November 25, 2008 in Taipei, Taiwan.

Lukhnos talks about how Lithoglyph, his company, uses Ruby to replace shell scripts, Makefiles and Perl scripts in their build system. He also talks about the strength and weakness of Ruby the language.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,084
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
38
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
































  • Ruby Script at Work

    1. 1. Ruby Script at Work Lukhnos D. Liu Chief, Lithoglyph Inc.
    2. 2. We’re an ObjC/C++ house...
    3. 3. I love C++...
    4. 4. Templates don’t scare me
    5. 5. for (vector<pair<pair<string, size_t>, set<Node>::const_iterator> >::iterator i = lst.begin() ; i != lst.end() ; ++i) { // iterate the list... if (matches((*i).first.first)) { run((*i).second); } } * modified actual code
    6. 6. C++ is fast
    7. 7. Speed Improvement (higher is better) ObjC 1.0 1x C++ gen1 5.0 5x C++ gen2 20.0 20x * tested on a 1 GHz PowerPC Mac
    8. 8. Can do everything
    9. 9. In OpenVanilla, We Have... OVStringHelper::Split OVStringHelper::Join OVFileHelper::SlurpFile OVUTF16::FromUTF8 OVStringHelper::StringByReplacingOccurancesOfString WithString(src, occur, replacement) ... and more script-language perks!
    10. 10. </digress>
    11. 11. But...
    12. 12. (that’s why I’m here today!)
    13. 13. C++ needs lots of care
    14. 14. Turn-around speed is slow
    15. 15. Compliation is slooooooow
    16. 16. Bad for more than 1 tool
    17. 17. Choices: sh/Makefile/Ruby
    18. 18. Ruby is advanced
    19. 19. Clear structure
    20. 20. Easy to maintain
    21. 21. post- processing directives aggregate Data Set 1 tool and rinse Merged Processed tool tool Data Set Data Set Data Set 4 cherry pick Data Set 2 and rinse Meged Separation tool Data Set Tool Data Set 5 aggregate Data Set 3 and rinse Data Set 4 Data Set 5 Interm. merge tool Data Set 6 conversion Data Set 7 Data Set * actual process
    22. 22. Windows Build System Source version- Versioned Validation and Dev Dev Code upper Source Files Staging Packages Mac OS X Build System Data Set 7 * actual process
    23. 23. Ruby’s Drawbacks
    24. 24. Modules We Use openssl digest uuidtools Formosa::Mandarin (lukhnos)
    25. 25. Slow... Very slooooooow
    26. 26. String processing Performance C++ 1 100% Perl 0.75 75% Ruby 0.20 20% * estimation on daily use cases
    27. 27. Total time = run time x frequency of run
    28. 28. Won’t deploy to users
    29. 29. Future Plans
    30. 30. My Question...
    31. 31. pair<T, T> equivalent?
    32. 32. Questions
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×