Geschreibsel Tagged: ruby http://fsteeg.com/tags/ruby Wed, 17 Dec 2008 00:00:01 +0000 Wed, 17 Dec 2008 00:00:01 +0000 My five steps to programmer's heaven in seven years <a href="http://fsteeg.com/images/2008-12-17_programming-java-lisp-prolog-ruby-scala_My-five-steps-to-programmers-heaven-in-seven-years.dot" title="Graphviz DOT diagram source (also embedded in HTML source)"> <img src="http://fsteeg.com/images/2008-12-17_programming-java-lisp-prolog-ruby-scala_My-five-steps-to-programmers-heaven-in-seven-years.svg" alt="Graphviz DOT diagram source (also embedded in HTML source)" /> </a> <!-- <pre><code>/* Generate image with: dot -Tsvg 2008-12-17_programming-java-lisp-prolog-ruby-scala_My-five-steps-to-programmers-heaven-in-seven-years.dot -o 2008-12-17_programming-java-lisp-prolog-ruby-scala_My-five-steps-to-programmers-heaven-in-seven-years.svg */ digraph{node[shape=box] rankdir=LR center=true concentrate=true //subgraph cluster_0{Java Scala} //subgraph cluster_1{Lisp Prolog Ruby} Java->Scala[constraint=false dir=back] Java -> Lisp; Lisp->Prolog; Prolog->Ruby; Ruby->Scala; Scala->Java[style=dotted arrowhead=none] } </code></pre> --> http://fsteeg.com/notes/my-five-steps-to-programmers-heaven-in-seven-yearshttp://fsteeg.com/notes/my-five-steps-to-programmers-heaven-in-seven-years Wed, 17 Dec 2008 00:00:01 +0000 programmingjavalispprologrubyscala Rails! Awesome! Wow! Ruby on Rails is just awesome! It's sort of model driven, where model is defined by the DB. This is just the way these kind of apps should be built. Really interesting: Code generation all around, true rapid model-driven development, but totally clean, pragmatic and lightweight. Really nice! It reminds me a lot of EMF, it's a little like a webapp/relational-DB analog to the desktop-app/XML in EMF. If the task is to set up a little DB and have a web interface to it, this seem to be just the right way. http://fsteeg.com/notes/rails-awesomehttp://fsteeg.com/notes/rails-awesome Thu, 15 Dec 2005 00:00:01 +0000 ruby Ruby iterators <p><small>Cross-posted to: <a href="https://fsteeg.wordpress.com/2005/10/13/ruby-iterator/">https://fsteeg.wordpress.com/2005/10/13/ruby-iterator/</a></small></p> <p/> An example for the higher-level, more problem-oriented things you can do with Ruby's iterators. In Java, I just tried to do this to insert blanks into all words written entirely in uppercase: <br /><br /><code>s.replaceAll("\\b([A-Z]+)\\b","$1".replaceAll("([A-Z])","$1"+" "));</code> <br /><br />Of course it didn't work, because the second replaceAll is called on "$1" before "$1" is replaced with a match.<br /><br />In Ruby such a thing is possible using iterators: <br /><br /><code>s.gsub(/\b([A-Z]+)\b/){$1.gsub(/([A-Z])/){$1+" "}}</code> <br /><br />It could be even done simpler, with only one regex and iterator involved, plus this solution has no trailing space:<br /><br /><code>s.gsub(/\b([A-Z]+)\b/){$1.split("").join(" ")}</code> http://fsteeg.com/notes/ruby-iteratorshttp://fsteeg.com/notes/ruby-iterators Thu, 13 Oct 2005 00:00:01 +0000 ruby Ruby, a modern high-level language <p><small>Cross-posted to: <a href="https://fsteeg.wordpress.com/2005/09/16/uby-a-modern-high-level-language/">https://fsteeg.wordpress.com/2005/09/16/uby-a-modern-high-level-language/</a></small></p> <p/> It really seems like Ruby brings together much great stuff from lots of different places. Clean OO, modern API and concepts (like Exceptions, Unit-Testing), great integration of Regular Expressions or some good stuff from Lisp and friends like everything being a function (math., i.e. returning a value), support for changes at runtime or an interpreter for interactive evaluation. And like Regular Expressions can be, Ruby's usage of iterators instead of loops seems to be somewhat higher-level, more problem-oriented. http://fsteeg.com/notes/ruby-a-modern-high-level-languagehttp://fsteeg.com/notes/ruby-a-modern-high-level-language Fri, 16 Sep 2005 00:00:01 +0000 ruby Ruby sounds great <p><small>Cross-posted to: <a href="https://fsteeg.wordpress.com/2005/09/12/ruby-sounds-grea/">https://fsteeg.wordpress.com/2005/09/12/ruby-sounds-grea/</a></small></p> <p/> Today I got myself "Programming Ruby, Second Edition". I've been planning to learn a "scripting language" since I've read "The Pragmatic Programmer" about two years ago. Ruby sounds very promising. http://fsteeg.com/notes/ruby-sounds-greathttp://fsteeg.com/notes/ruby-sounds-great Mon, 12 Sep 2005 00:00:01 +0000 ruby