Wednesday, August 31, 2011

Solving (Workaround) ruby_core_source.rb:57 'initialize': not in gzip format (Zlib::GzipFile::Error)


saw this error when one of my colleagues could not bundle install nor gem install linecache19:

ruby_core_source.rb:57 'initialize': not in gzip format

We are all using the same Gemfile to do bundle install, and it only happens to his laptop. After trying everything we found in google / stackoverflow, it still not working. Most of the suggestion were about cleaning the cache files in the rvm directories.


After digging into the source code of ruby_core_source.rb, I found out that the code did a gunzip and then tar extract on a tar file. So, that's the problem of the package storing on the ftp server: (ruby_core_source.rb:50)

uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/" + ruby_dir + ".tar.gz"


I am not sure why the .gz file on the server is not gzip-ed.

But then the workaround is obvious. Go to gem directory and modify the source. my ruby_core_source.rb is here: ~/.rvm/gems/ruby-1.9.2-p180@not_gzip_format_error/gems/ruby_core_source.gem/lib/ruby_core_source.rb



More coding details here: https://gist.github.com/1183048


Note: this is a different issue from tar_input.rb 'initialize': not in gzip format (Zlib::GzipFile::Error)


Friday, August 5, 2011

Code Jam at boot.hk

Yeah ~ organizing our first code jam. We have total 13 ppl confirmed coming ! We have different expertises: Drupal, UX, RubyOnRails, Java, etc. Must be fun !!


Although the project is mainly PHP and Drupal, there are many areas non-PHP coders could help. Infrastructure, UI, online marketing, user experience, pair programming, etc.


To make Hong Kong a better place to develop technology products, Code Jam is really an important part. Knowledge and skills are exchanged. Stronger linkage between several coder communities is built. People will be more confident about investing money on local talents and the creative technology industry. I am sure we will have more and more Code Jam coming ~


More info about the Code Jam:


Wednesday, August 3, 2011

Aug 2011 Codeaholics on Mozart Oz and Haskell

http://codeaholics.hk


We had 2 sharing tonight focusing on programming languages: Haskell and Mozart Oz. There were a lots to take (little bit too much to me), but I found them inspiring.


Mozart Oz allows one to define a program with the paradigms you need, e.g. object-oriented, functional, or constraint logic programming. Another interesting feature is that the implementation could be transparent. You can send a message to a class, and the receiver may be not staying in the same memory as yours, e.g. perhaps it is another machine on the network. Really look forward to see some real life examples after Stewart's sharing.


William ended his Haskell tour by showing how to use Monad to build the JSON parser. The previous talks focus more on syntax and function definition of Haskell. I finally see the power of Haskell when William showed us the JSON parser. It was awesome, simple and highly readable. It was little bit brain-fucked when I tried to follow all the syntax, pattern matching and type classes thingy. However, it is really amazing when you see the neat final product. After seeing the JSON parser, everything makes sense to me now.


Thanks William spent so much time to prepare the Haskell tour, it has been 3 4 months since the Haskell Tour Part I. His presentation style is so attractive and entertaining, the content is well-prepared and inspiring, and Haskell is sexy.

map to Boot HK

  1. Start from Wan Chai MTR station A3 exit
  2. Go across the tram road (Johnston Road)
  3. Get into the street full of hawker (Tai Yuen Street)
  4. When you arrive Queen's Road East, locate the starbucks
  5. Entrance of the building is opposite to starbucks








Tuesday, August 2, 2011

Busy coder week

Codeaholics HK Meetup

http://www.facebook.com/event.php?eid=235908043109490

This time we have speakers talking about Haskell, Mozart OZ and Objective-C. Codeaholics is a programming language agnostic coder meetup. Open for public, free of charge, welcome everyone to attend.


Code Jam: Peer Patent

http://www.facebook.com/event.php?eid=179909352075514

We talked about organizing a Code Jam for local coders 1000 times (literally 1000 times). finally we managed to do once. We are developing a system for Peer Patent.