Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ruby Script at Work

1,259 views

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
  • Be the first to comment

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

×