Entries Tagged 'Dynamic languages' ↓

Invoke any Method on any Thread

Fredrik Olsson

I previously wrote a blog post titled Performing any Selector on the Main Thread detailing a convenience category on NSInvoication for easily creating invocation objects that could be invoked on any thread. This category has served me well, and even got traction in the iOS developer community, so I never bothered to stop and think [...]

Tags: , , , , , , , ,

Clojure third language officially supported on Heroku

Ulrik Sandberg

According to this blog entry on Heroku, Clojure becomes the third language officially supported on the Cedar stack, after Ruby and Node.js. They write: – “Clojure combines the expressiveness of Lisp, the agility of a dynamic language, the performance of a compiled language, and the wide applicability of the JVM in a robust, production-ready package. [...]

Tags: , , ,

Notes and Thoughts from a Great Conference

The Nordic Ruby conference is a really great conference. I think the secret is: it’s small (they set a limit of 150 people which was reached), single track, 15 or 30 min sessions and 30 min breaks, great party and you have lots of time to talk to very passionate speakers and attendants. The quality [...]

Deploying a Clojure web app on Heroku

Ulrik Sandberg

Heroku is a cloud application platform for Ruby/Rails and Node.js. However, the Cedar stack on Heroku makes it possible to deploy other types of applications. In this blog entry, I will first describe how to write a simple Clojure web app using the Ring library and the build tool Leiningen. Then I will show how to deploy this Clojure web app on Heroku, using nothing but Git. I will make a change and see how to deploy that. I will also show how to easily roll back to a previous release.

Tags: , , , , ,

Tips from Rails Anti-Patterns

Anders Janmyr

Another good Ruby book is out, Rails Anti-Patterns. The book is loaded with good tips on everything from following the Law of Demeter to cleaning up your views with the use of helper methods. Here are some things I picked up from the book. delegate can take a :prefix argument The delegate method from active_support [...]

Tags: , ,

“HTML5 & MVC3″ Debriefing

Gustaf Nilsson Kotte Per Ökvist Karl Adriansson

Recently, Jayway hosted the seminar “HTML5 & MVC3″ in Malmö and Stockholm. We also visited the SweNUG Linköping group and held our presentation there. In this post, we will give you links to some of the topics we covered. The presentation was first delivered on Techdays 2011, and we recommend you to look at that [...]

Tags: , , ,

Ruby, an Exceptional Language

Anders Janmyr

Based on the book Exceptional Ruby by Avdi Grimm, I have developed a strategy for how I should deal with exceptions in Ruby. Being a very dynamic language, Ruby allows very flexible coding techniques. Exceptions are not an exception . When I am developing a library in Ruby I typically create one Error module and [...]

Tags: , ,

CoffeeScript Goodies

Gustaf Nilsson Kotte

A few weeks ago, it was announced that Ruby on Rails 3.1 will include jQuery, Sass (using SCSS) and CoffeeScript as default dependencies. Among these, CoffeeScript seems to be the controversial dependency, at least if you read the comments on the actual commit (check out the funny meme pictures). In this blog post, I’ll try to [...]

Tags: , ,

A Not Very Short Introduction To Node.js

Anders Janmyr

Node.js is a set of asynchronous libraries, built on top of the Google V8 Javascript engine. Node is used for server side development in Javascript. Do you feel the rush of the 90′s coming through your head. It is not the revival of LiveWire, Node is a different beast. Node is a single threaded process, [...]

Tags: , ,

What Is New in EcmaScript 5?

Anders Janmyr

More and more browsers have implemented EcmaScript 5. That means that it is time to get up to speed on what it means for us as developers Here is a summary of Douglas Crockfords talk on Ecmascript 5 at Scandev New Syntax It is now possible to use reserved words as property names and in [...]

PySide and QML

It has been out there for a while but I haven’t had time to try it out, PySide 1.0 with QML support! This really gives you a über rapid app development environment. The power of Python combined with the awesomeness of the declarative language QML (QtQuick) from the Qt framework. Take a look and feel [...]

Tags: , ,

Numerical Integration (With Precision)

Ulrik Sandberg

In a previous blog entry, I explained the higher-order function sum and how to use the Substitution Model to follow the execution of a function. In this entry, I will use the sum function to perform numerical integration, and in the process run into some pitfalls of Java’s BigDecimal. I will show how the language Clojure provides an elegant solution to the “exact quotient cannot be represented” problem of BigDecimal.

Tags: , , , , ,

High Performance Javascript

Anders Janmyr

Here are some tips on high perfomance Javascript I have picked up. Most of it comes from the books High Performance Javascript by Nicholas C. Zakas and High Performance Web Sites by Steve Souders. Loading Load files at the end of the HTML page Load the Javascript files right before the end body tag, this [...]

The Substitution Model: A Tool For Understanding Recursion

Ulrik Sandberg

Section 1.3 in Structure and Interpretation of Computer Programs is about Formulating Abstractions with Higher-Order Procedures. As an example, the authors use three simple sums: a sum of an integer range a sum of the cubes of an integer range a sum of a series that converges to π/8 The purpose is to highlight what [...]

dbg: A Cool Little Clojure Macro

Ulrik Sandberg

Here’s the development of a tiny little macro that is actually pretty useful. The post is quite verbose, because I explain a lot. I want a debug function that first prints the “quoted” (unevaluated) code and then what it evaluates to, so I can write something like this: user> (dbg (+ 1 2)) dbg: (+ [...]

Tags: , ,