Archive

Archive for the ‘General’ Category

Do you wanna help us with pure-Java Nokogiri?

December 1st, 2009 Serabe No comments

First things first, if you wanna help, you’ll need to clone the git repo. Just:

git clone git://github.com/tenderlove/nokogiri.git
cd nokogiri
git checkout --track -b java origin/java

Install the dependencies. Just:

rake install:deps

Because it uses some native libraries, you’ll need to do that with MRI. Finally, you’ll need to generate some files, just run jruby -S rake java:spec. For having a hprof file, you’ll need to run this script with the following command:

jr -J-Xmx32m -J-XX:+HeapDumpOnOutOfMemoryError nokogiri_doc_frag.rb

-J-Xmx32m limits the heap space to 32 Mb, and the other options makes the JVM to write a hprof file when a OutOfMemoryError is thrown. After that, you can inspect that file with the profiler you can find in NetBeans.

In next post, I’ll comment where I think the problem is.

Categories: General, JRuby, Java, Programming, Ruby Tags: , ,

Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J

June 6th, 2009 Serabe No comments

It’s been long time since last status update, but there are some things to tell, so here I am.

Thankfully, this year I’m a GSoC student again (and my mentor is Tom too). The main part of my project would be porting Nokogiri to JRuby, so I haven’t code for RMagick for a while now.

Let’s start with the status update then.

Nokogiri

I’ve been working on Nokogiri for a while. I forked Charles’ repo in Github, and I’ve implemented some cool features. For example, today I got my XML::Reader implementation to pass all tests in test_reader.rb. I hope I’ll be able to make a release this month (cross your fingers).

On the other hand, I got my first patch accepted in Nokogiri’s main repo.

RMagick4J

Not to much work done here, sorry. I haven’t code anything for a while now. Migrating from mercurial to git is already planned, but before that I would like to do a few commits more. Anyway, I’m quite happy with this project. Some people are using it and reporting bugs (in the end, those little things are all that matters). What else can I ask for?

Please, if you find a bug, report it here.

MagickWand

Tim Hunter (creator of RMagick) released MagickWand recently. I’ve been considering porting it to JRuby too. I have to take a deeper look at the C code, but, by now, I think it could be a good way to lead RMagick4J development. If finally I port it, I will split RMagick4J in two projects (Magick4J and RMagick4J). This way, MagickWand4J and RMagick4J would share the same java codebase, as MagickWand and RMagick share ImageMagick.

ruby2java

Take a look here. Awesome, isn’t it? And as soon as I have some time to work on it, siesta will be out too…

P.D. By the way, no more personal stuff in this blog. That stuff is now here, and only in Spanish (sorry about that).

It’s all about expectations.

April 25th, 2009 Serabe No comments

Two days ago, I was talking about Susan Boyle with a friend. I do not like her, my friend didn't even know who she is. I told her about Susan, she has a good voice (not a great one) and she can sing pretty well. The only difference is that she is quite ugly (in Spanish I would say that she is uglier than hitting your own father with a sweaty sock). Her answer was pretty simple: It's all about expectations.

She said that by looking at her, my expectations were low, so when she sang even with a good-but-not-extraordinary-as-they-want-us-to-believe voice.

Other way of making things look better is the Bluetooth-Cooper theorem ("Averything is better with bluetooth"), in this case, with the Jackson-Vader corollary:
[youtube]http://www.youtube.com/watch?v=rxL3Yvf-d58[/youtube]

RMagick4J: Status Update 15/03/09

March 16th, 2009 Serabe 2 comments

This week I've been fixing some bugs, adding some minor effects and adding wave effect.
In order to add wave effect I've had to read a lot of ImageMagick code. Lucky me, there was an if that made all too much simpler. Unlucky me, I didn't realize until the third reading-code day.
Anyway, after sweating blood, here you are the images:

RMagick RMagick4J
original
JRuby logo JRuby logo
charcoal 0.75
charcoal RMI charcoal JRuby
negate
negate RMI negate JRuby
normalize
normalize RMI normalize JRuby
blur_image 2
blur RMI blur JRuby
wave
wave RMI wave JRuby
Categories: General Tags:

RMagick4J: Status Update 09/03/09

March 9th, 2009 Serabe No comments

Finally I figure out the problem with the convolve method. The code I wrote was only prepared to deal with TYPE_INT_ARGB BufferedImages but when reading a image from a file, it doesn't ensure this type. Now this is fixed and working.

Furthermore, I added charcoal, solarize and shade effects. The latter gave some problem while testing, but finally the problem was in test not in code. From now on, the to_threshold method must be used in test when dealing with numbers that depend on the QuantumRange. This problem is due that QuantumRange can differ from one ImageMagick installation to another, but RMagick4J always uses 255.

Here you are some examples (the guy that looks like me is actually my non-existent twin brother):

RMagick RMagick4J (This is what I do)
original
original original
charcoal 0.75 (RMagick4J is not normalized)
Charcoal RMagick CharcoalEffect
edge 5
Edge RMagick EdgeEffect
shade true, 50, 50
Shade RMagick ShadeEffect
solarize 27.5/255*QuantumRange
Solarize RMagick SolarizeEffect
Categories: General Tags:

Predicción.

March 6th, 2009 Serabe No comments

Escribo esto el miércoles 4 de marzo a las 21:52 y predigo que Alba no habrá escrito nada nuevo para cuando esta entrada vea la luz...
Actualización: Esto de predecir no es tan chungo. ¡He acertado!

Categories: General Tags:

Dead Like Me: Life After Death

March 5th, 2009 Serabe No comments

I remember this TV show fondly. It was the last TV show I got up early (I mean, befor 13:00) only to watch it with my family. It was all about a girl who died in the pilot when a toilet crashed into her. Then, Georgia (the only girl I know had died because a toilet crashed into her) became a grim reaper, her work was to reap souls of time-to-go people. Furthermore, she was in the External Influence Division (accidents, nature disasters and others).
Later in the story we knew about the gravelings, a beings that cause deathly accidents. They are suppose to be invincible (spoiler, spoiler, spoiler) in the second season's finale Georgia reaped a graveling, and it turned to dust (you can read now safely).

So, this week I read a film about Dead Like Me was released and few hours ago, I finally saw it. No Rube (Mandy Patinkin, the 'I'm Iñigo Montoya, you killed my father. Prepare to die.' guy), no original Daisy, no Der Waffel Haus (it is even burned to dust!), suddenly the George's other face is not hard to look at. Ok, I can stand it. Maybe I can even enjoy it (no, I'm not kidding). But not graveling reaping? But not (the same spoiler comes again) graveling reaping? OMG! It was the cliffhanger of the second season!(you can read the rest of the post) And lostie Desmond instead of Rube!

Anyway, the film is watchable. It is not like Street Fighter: The Legend of Chun-Li (I'm still considering killing every people involved in that crime against humanity).

Categories: General Tags:

I’m moving

January 31st, 2009 Serabe No comments

I'm moving the server. I'll be back asap.

Categories: General Tags:

Váyase a la mierda.

January 8th, 2009 Serabe No comments

Hoy han llamado a mi casa. Identificación oculta. Descuelgo:

- Hola, soy Eduardo Moreno llamo de Jazztel...

- No me interesa -interrumpo, harto de que te llamen a casa sin pedirlo.

- ¿Qué no le interesa?

- Lo que vaya a ofrecerme no me interesa.

- Yo sólo voy a hacerle unas preguntas...

- No me interesa. Gracias. Adiós.

- Vete a la mierda.

Gran actitud la del comercial. Ya he contactado con Jazztel. A ver qué dicen.

Prop 8 – The Musical

December 14th, 2008 Serabe No comments
Categories: General Tags: ,
Improve the web with Nofollow Reciprocity.