All posts tagged with 'Ruby'

Polyglot programming on the GraalVM

06-Mar-20

(*) As of now R, Ruby, Python and JavaScript 😉 GraalVM consists of a Java Compiler, a VM and a JDK based on HotSpot/OpenJDK, implemented in Java. These days it’s all about additional execution modes compared to the standard JVM, mainly ahead-of-time compilation and the creation of native images. Native images are an important piece […]

Read the complete article »

Unicode substrings in Ruby 1.8.x

15-Oct-10

Here is how to get correct unicode substrings in Ruby 1.8.x require ‘jcode’ $KCODE = ‘u’   "öäüÖÄÜß".split(//)[4,2].join # ÄÜrequire ‘jcode’ $KCODE = ‘u’ "öäüÖÄÜß".split(//)[4,2].join # ÄÜ Don’t know, if this performes well… In case you have better ideas, please drop me a comment.

Read the complete article »

Redcloth / Textilize :hard_breaks is broken in Rails 2.3.4

24-Sep-09

The default behavior for quite a long time was :hard_breaks in the textilize helper method in rails. Hard Breaks means: All line breaks are turned into <br />’s. Somebody changed the textilize helper in “actionpack-2.3.4/lib/action_view/helpers/text_helper.rb” in 2.3.4 and added the ability to pass some options but broke the default behavior here: def textilize(text, *options) options […]

Read the complete article »

Creating a self containing mvc application with Sinatra

29-Jul-09

I recently presented biking.michael-simons.eu, a Sinatra based application written in Ruby. Its main purpose for me is to keep track of my milage in 2009. Although the application is completely self containing it has some nice features: Simple setup The application is simple and i didn’t want to use a “big” database like PostgreSQL or […]

Read the complete article »