Processing in Clojure
Following my article about Processing and Scala I got a comment that it would be cool to do the same with Clojure, JRuby or Groovy. All of them run on JVM.
Today I found that someone actually did it: Processing in Closure (by Jacek Laskowski) and “Processing in Closure” made functional (by Konrad Garus). What’s more, in 2009 there was already a post about Processing and Closure. Too bad I can’t stand nested brackets q:
Continue Reading | No Comments
Tags: Clojure, Functional programming, Processing, Scala
More on Flash Builder color themes
Thanks for pointing to eclipsecolorthemes.org in my last post. There are several themes made after solarized light and dark. I made my own theme with more colors.
But the problem is that you have to install both Eclipse Preferences file and plugin XML. And what’s more, not all colors are exported there so you will have to adjust them yourself:
- The most annoying color is ActionScript Occurrences at Preferences -> General -> Editors -> Text Editors -> Annotations. It’s that color with which similar stuff is highlighted when you select some lexem.
- Syntax coloring at Preferences -> Flash Builder -> Editors.
Other than that everything looks slim so far.
How to build your Flex app for iOS with AIR 2.6
AIR 2.6 brought a lot of great stuff, but one specific feature I just couldn’t pass by — publishing for iOS. Yes, there was this thing called Packager For Iphone, but now it is a part of ADT and is claimed to be much faster.
So, we have Flash Builder Burrito, Flex Hero SDK focused on mobile development and now AIR 2.6. You can see clear vector where Adobe is moving. There are many tutorials for Android platform, but iOS is lacking. So, let’s try to compile a small Flex application for iPad.
Continue Reading | 37 Comments
Tags: 2.6, ADT, AIR, Android, Ant, Apple, Certificate, Flash Builder Burrito, Flex, Flex Hero, iOS, iPad, iPhone, iTunes, Mobile, p12, Tutorial
Flex is still too slow for iPad
Few days ago we got AIR 2.6 which now includes iPhone/iPad export from the box. So, I downloaded Flash Builder Burrito, Flex Hero SDK and AIR 2.6 to follow this tutorial and make a simple Flex application for iOS. While development process was easy and deployment straightforward the final result was not what I wanted at all.
Here’s the video we made in the office (thanks Anton for editing!) which shows how slow and unresponsive the interface is. I’d say that it’s by order of magnitude slower than native apps. Considering that the application does nothing but showing local data.
While the idea of AIR being able to be executed everywhere is good and Adobe is working on performance issues (I hope), right now I would agree with Steve Jobs and keep Flash away from my iPad.
Don’t know what to watch next? Download and watch top ranked TED videos.
Recently I found a great post where the author (using a script) ranked TED videos by the number of times they were mentioned in social services. And since TV series are getting more and more stupid I decided to start watching these videos. I’ve seen many great TED talks in the past and anyway videos people talk about the most shouldn’t be bad. So I decided to download all of them.
One would open that large XLS file from the site and start clicking links. It might seem easier to just watch one video from the list at a time than to write a script which visits URLs and downloads videos. But I wanted to upload all of them to my iPhone and watch/listen to them while on my way to work. So here’s the final script:
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'HTTParty'
urls = IO.readlines("data.txt").map {|line| line.chomp}
if !File.exists?("videos")
Dir.mkdir("videos")
end
urls.each_with_index do |url, count|
begin
doc = Nokogiri.parse(open(url).read)
node = doc.xpath("//dt/a1")
video = "http://www.ted.com" + node.attribute("href").to_s
videoName = "videos/(#{count+1})" + url.match(/http:\/\/www.ted.com\/talks\/(.*)\.html/i)[1] + ".mp4"
puts "Downloading #{url} to #{videoName}"
File.open( videoName, "w+") do |f|
f << HTTParty.get( video )
end
rescue
puts "Failed to download #{url}"
end
end
I uploaded the same script with data for TED videos (with rating >=5) and Gemfile to install required gems to GitHub. Some of the videos don’t have links to video files, so you have to watch them online.
valyard.ru
Updated my good old FWA Winner from 2007. God, I can’t believe I wrote that code o.O !!1
Continue Reading | No Comments
Tags: 2007, FWA, Oldschool, valyard.ru
Scala + Processing – an entartaining way to learn a new language
If you’ve read a book about some new technology it doesn’t necessarily mean that you learned or even understood it. Without practice your newly acquired knowledge will vanish soon. That’s why doing exercises from the book you are reading is important.
But all those examples are usually boring. Of course you can start your own pet project to master your skills. Several months ago to learn Scala I started my little command line tool which semi-worked at the end and I gave up on it. So, in a month or so I had to google syntax of “for loop”…
That’s where I decided that I should start writing simple examples for different Scala features that must be fun. Here’s where Processing comes into play. Using it, every novice like me can turn dull exercises into visual installations. And later you can try advanced stuff like fractals, particle systems or data visualisation.
You might be wondering what the hell is Scala. It’s a relatively new and extremely cool programming language. You can read more about it on Wikipedia or on official web site.
I rewrote in Scala and posted to GitHub several cool examples. One of them is on the left picture – famous MSA Fluid Processing sketch.
***
When I first met Scala I fell in love with the language immediately. I looked through a couple of books including Programming in Scala which I recommend to everyone. Even theory alone allowed me to change my perception of programming at the whole. Too bad that my day to day job doesn’t involve Scala in any way. Even the language I use mostly is in many ways different from Scala. No, this language is not Processing.
Processing
I guess now is a good time to introduce Processing because there’s a chance you haven’t heard of it at all. I’m not even talking about that you actually worked with Processing. Of course it’s great if you did.
Anyway, Processing is basically a DSL for Java with a little IDE and a mix of useful libraries. It’s mainly used by so-called Visual Artists to render generative art work. I recommend you to check out Processing channel on Vimeo. There’s really a lot of cool stuff!
Tags: GitHub, intelliJ IDEA, Java, JVM, Processing, Scala
Our latest flash multitouch projects
Finally I got some time to make a post about projects we’ve been working on for a couple of months. Check out the videos to see that Flash is not only for social games and annoying banners.
1. The first multi-touch wall at Russian TV. Yep, the shots are LIVE.
Какие наши годы – Multitouch wall from InteractiveLab on Vimeo.
2. Rosautodor multi-touch table featuring circles, roads and lots of text o.O
Росавтодор – multitouch table from InteractiveLab on Vimeo.
3. Yota Space navigation multi-touch wall featuring hexagons, physics, information and fun.
Yota SPACE – Multitouch wall from InteractiveLab on Vimeo.
Continue Reading | No Comments
Tags: Box2D, multi-touch, TV, Yota
