<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-473925549433590255</id><updated>2010-01-13T05:06:59.622-08:00</updated><title type='text'>Pocket Dope</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>RK</name><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-6649654613398120141</id><published>2009-03-08T16:45:00.000-07:00</published><updated>2009-03-08T17:01:23.866-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='url'/><category scheme='http://www.blogger.com/atom/ns#' term='encoding'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='spotify'/><title type='text'>Getting song IDs from spotify URLs</title><content type='html'>When sending a http link or sporify: link to a friend they have the form:&lt;br /&gt;http://open.spotify.com/track/3Z8cX6y0SeJIsI3yxoaQ8K&lt;br /&gt;&lt;br /&gt;The protocol that spotify uses has track IDs as 128 bit integers, so how can we get from the text in the URL to this integer? Turns out it isn't base64 encoding, but rather base 62 (and with other alphabet).&lt;br /&gt;&lt;br /&gt;Here are python functions for encoding/decoding:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;a = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'&lt;br /&gt;&lt;br /&gt;def spotify_encode(v):&lt;br /&gt;    res = []&lt;br /&gt;    while v &gt; 0:&lt;br /&gt;        res = [v % 62] + res&lt;br /&gt;        v = v / 62&lt;br /&gt;    return ''.join([a[i] for i in res])&lt;br /&gt;&lt;br /&gt;def spotify_decode(s):&lt;br /&gt;    v = 0&lt;br /&gt;    for c in s:&lt;br /&gt;        v = v *62 + a.index(c)&lt;br /&gt;    return v&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Or, if you prefer java:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;byte[] strValDecode(String s)&lt;br /&gt;{&lt;br /&gt; final String alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";&lt;br /&gt;  &lt;br /&gt; BigInteger b = BigInteger.ZERO;&lt;br /&gt; BigInteger b62 = new BigInteger("62");&lt;br /&gt;&lt;br /&gt; for (int i=0; i&amp;lt;s.length(); i++) {&lt;br /&gt;  int idx = alphabet.indexOf(s.codePointAt(i));&lt;br /&gt;  b = b.multiply(b62).add(new BigInteger(Integer.toString(idx)));&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt; return b.toByteArray();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-6649654613398120141?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/6649654613398120141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=6649654613398120141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/6649654613398120141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/6649654613398120141'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2009/03/getting-song-ids-from-spotify-urls.html' title='Getting song IDs from spotify URLs'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-4186427289733188260</id><published>2009-01-09T16:08:00.000-08:00</published><updated>2009-01-09T16:38:10.965-08:00</updated><title type='text'>Chrome 2 javascript performance</title><content type='html'>Chrome 2 has been released to the dev channel, and I updated the comparison to Firefox 3. Turns out that chrome 2 is almost twice as fast as version 1 was upon release. The latest v1 release is as fast as v2 though.&lt;br /&gt;&lt;br /&gt;More detail on the release can be found &lt;a href="http://dev.chromium.org/getting-involved/dev-channel/release-notes/releasenotes201561"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Oh, and it scores 100/100 on the acid 3 test!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TEST                   COMPARISON            FROM                 TO             DETAILS&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;&lt;br /&gt;** TOTAL **:           2.39x as fast     5982.2ms +/- 1.4%   2498.4ms +/- 2.8%     significant&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;&lt;br /&gt;  3d:                  3.06x as fast      732.6ms +/- 0.8%    239.4ms +/- 1.1%     significant&lt;br /&gt;    cube:              3.87x as fast      264.0ms +/- 0.7%     68.2ms +/- 10.3%     significant&lt;br /&gt;    morph:             2.79x as fast      264.8ms +/- 0.9%     95.0ms +/- 8.7%     significant&lt;br /&gt;    raytrace:          2.67x as fast      203.8ms +/- 2.2%     76.2ms +/- 8.1%     significant&lt;br /&gt;&lt;br /&gt;  access:              5.62x as fast      965.0ms +/- 1.8%    171.6ms +/- 36.7%     significant&lt;br /&gt;    binary-trees:      7.20x as fast       80.6ms +/- 2.8%     11.2ms +/- 14.5%     significant&lt;br /&gt;    fannkuch:          9.05x as fast      443.4ms +/- 0.7%     49.0ms +/- 8.0%     significant&lt;br /&gt;    nbody:             3.64x as fast      264.0ms +/- 5.2%     72.6ms +/- 78.0%     significant&lt;br /&gt;    nsieve:            4.56x as fast      177.0ms +/- 3.2%     38.8ms +/- 4.8%     significant&lt;br /&gt;&lt;br /&gt;  bitops:              7.69x as fast      831.8ms +/- 0.5%    108.2ms +/- 3.6%     significant&lt;br /&gt;    3bit-bits-in-byte: 17.1x as fast      146.8ms +/- 1.4%      8.6ms +/- 26.3%     significant&lt;br /&gt;    bits-in-byte:      16.1x as fast      215.4ms +/- 0.3%     13.4ms +/- 10.6%     significant&lt;br /&gt;    bitwise-and:       4.98x as fast      193.4ms +/- 1.0%     38.8ms +/- 5.7%     significant&lt;br /&gt;    nsieve-bits:       5.83x as fast      276.2ms +/- 0.7%     47.4ms +/- 7.1%     significant&lt;br /&gt;&lt;br /&gt;  controlflow:         13.9x as fast       80.6ms +/- 1.8%      5.8ms +/- 27.9%     significant&lt;br /&gt;    recursive:         13.9x as fast       80.6ms +/- 1.8%      5.8ms +/- 27.9%     significant&lt;br /&gt;&lt;br /&gt;  crypto:              3.13x as fast      381.6ms +/- 2.5%    122.0ms +/- 9.6%     significant&lt;br /&gt;    aes:               2.50x as fast      147.4ms +/- 0.5%     59.0ms +/- 21.6%     significant&lt;br /&gt;    md5:               3.56x as fast      118.2ms +/- 8.3%     33.2ms +/- 5.6%     significant&lt;br /&gt;    sha1:              3.89x as fast      116.0ms +/- 0.8%     29.8ms +/- 11.6%     significant&lt;br /&gt;&lt;br /&gt;  date:                1.60x as fast      472.4ms +/- 1.6%    296.0ms +/- 4.2%     significant&lt;br /&gt;    format-tofte:      2.07x as fast      297.6ms +/- 1.5%    144.0ms +/- 4.2%     significant&lt;br /&gt;    format-xparb:      1.15x as fast      174.8ms +/- 2.3%    152.0ms +/- 5.8%     significant&lt;br /&gt;&lt;br /&gt;  math:                3.22x as fast      747.6ms +/- 3.5%    232.2ms +/- 3.5%     significant&lt;br /&gt;    cordic:            2.70x as fast      355.8ms +/- 1.0%    131.8ms +/- 6.0%     significant&lt;br /&gt;    partial-sums:      3.19x as fast      241.2ms +/- 10.7%     75.6ms +/- 2.5%     significant&lt;br /&gt;    spectral-norm:     6.07x as fast      150.6ms +/- 1.6%     24.8ms +/- 9.0%     significant&lt;br /&gt;&lt;br /&gt;  regexp:              *1.44x as slow*    406.6ms +/- 6.5%    587.2ms +/- 3.1%     significant&lt;br /&gt;    dna:               *1.44x as slow*    406.6ms +/- 6.5%    587.2ms +/- 3.1%     significant&lt;br /&gt;&lt;br /&gt;  string:              1.85x as fast     1364.0ms +/- 3.5%    736.0ms +/- 3.4%     significant&lt;br /&gt;    base64:            2.11x as fast      159.0ms +/- 2.1%     75.4ms +/- 33.0%     significant&lt;br /&gt;    fasta:             4.18x as fast      290.2ms +/- 4.2%     69.4ms +/- 10.0%     significant&lt;br /&gt;    tagcloud:          1.32x as fast      250.2ms +/- 4.3%    190.0ms +/- 7.3%     significant&lt;br /&gt;    unpack-code:       1.70x as fast      471.0ms +/- 7.3%    276.6ms +/- 7.7%     significant&lt;br /&gt;    validate-input:    1.55x as fast      193.6ms +/- 2.6%    124.6ms +/- 5.1%     significant&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-4186427289733188260?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/4186427289733188260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=4186427289733188260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/4186427289733188260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/4186427289733188260'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2009/01/chrome-2-javascript-performance.html' title='Chrome 2 javascript performance'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-4020958462980154535</id><published>2008-09-09T05:16:00.000-07:00</published><updated>2008-09-09T05:27:46.389-07:00</updated><title type='text'>A first look at the performance of Google Chrome's V8 javascript engine</title><content type='html'>I tried out google chrome today, and I must say that I was really impressed. Mostly by the user interface, it really stays out of the way of the content.&lt;br /&gt;&lt;br /&gt;I had read the introduction to chrome where the JIT compiled javascript engine was mentioned so I decided to try it on the sunspider benchmark, and compare it to firefox 3 (which is faster than safari on my system).&lt;br /&gt;&lt;br /&gt;Turns out that Chrome beats firefox 3.0, and when inspecting the results it has some fairly low hanging fruit to improve further; the part where it does worst is in date formatting and regular expression functions. These are pretty much C functions that are called from javascript, so should be rather easy to imporove.&lt;br /&gt;&lt;br /&gt;Currently the bit manipulation stuff - where Chrome really shines - isn't very important for most webapps, but who knows, once available performance might be used. Also, the DOM speed is a really big part of performance, and is isn't reflected in this test.&lt;br /&gt;&lt;br /&gt;For completeness, here are the results for my rather ancient system (athlon 2.0GHz):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TEST                   COMPARISON            FROM                 TO             DETAILS&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;&lt;br /&gt;** TOTAL **:           1.35x as fast     5982.2ms +/- 1.4%   4441.2ms +/- 3.0%     significant&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;&lt;br /&gt;  3d:                  2.75x as fast      732.6ms +/- 0.8%    266.4ms +/- 3.7%     significant&lt;br /&gt;    cube:              3.52x as fast      264.0ms +/- 0.7%     75.0ms +/- 15.4%     significant&lt;br /&gt;    morph:             2.41x as fast      264.8ms +/- 0.9%    110.0ms +/- 8.0%     significant&lt;br /&gt;    raytrace:          2.50x as fast      203.8ms +/- 2.2%     81.4ms +/- 5.5%     significant&lt;br /&gt;&lt;br /&gt;  access:              5.24x as fast      965.0ms +/- 1.8%    184.0ms +/- 5.5%     significant&lt;br /&gt;    binary-trees:      6.83x as fast       80.6ms +/- 2.8%     11.8ms +/- 13.7%     significant&lt;br /&gt;    fannkuch:          7.59x as fast      443.4ms +/- 0.7%     58.4ms +/- 6.1%     significant&lt;br /&gt;    nbody:             3.87x as fast      264.0ms +/- 5.2%     68.2ms +/- 12.5%     significant&lt;br /&gt;    nsieve:            3.88x as fast      177.0ms +/- 3.2%     45.6ms +/- 9.9%     significant&lt;br /&gt;&lt;br /&gt;  bitops:              6.58x as fast      831.8ms +/- 0.5%    126.4ms +/- 3.7%     significant&lt;br /&gt;    3bit-bits-in-byte: 16.3x as fast      146.8ms +/- 1.4%      9.0ms +/- 23.9%     significant&lt;br /&gt;    bits-in-byte:      14.4x as fast      215.4ms +/- 0.3%     15.0ms +/- 5.9%     significant&lt;br /&gt;    bitwise-and:       5.34x as fast      193.4ms +/- 1.0%     36.2ms +/- 6.6%     significant&lt;br /&gt;    nsieve-bits:       4.17x as fast      276.2ms +/- 0.7%     66.2ms +/- 6.1%     significant&lt;br /&gt;&lt;br /&gt;  controlflow:         19.2x as fast       80.6ms +/- 1.8%      4.2ms +/- 13.2%     significant&lt;br /&gt;    recursive:         19.2x as fast       80.6ms +/- 1.8%      4.2ms +/- 13.2%     significant&lt;br /&gt;&lt;br /&gt;  crypto:              2.86x as fast      381.6ms +/- 2.5%    133.6ms +/- 12.2%     significant&lt;br /&gt;    aes:               2.32x as fast      147.4ms +/- 0.5%     63.6ms +/- 23.3%     significant&lt;br /&gt;    md5:               3.13x as fast      118.2ms +/- 8.3%     37.8ms +/- 12.6%     significant&lt;br /&gt;    sha1:              3.60x as fast      116.0ms +/- 0.8%     32.2ms +/- 8.4%     significant&lt;br /&gt;&lt;br /&gt;  date:                *3.05x as slow*    472.4ms +/- 1.6%   1439.0ms +/- 7.3%     significant&lt;br /&gt;    format-tofte:      *2.31x as slow*    297.6ms +/- 1.5%    686.6ms +/- 2.0%     significant&lt;br /&gt;    format-xparb:      *4.30x as slow*    174.8ms +/- 2.3%    752.4ms +/- 13.2%     significant&lt;br /&gt;&lt;br /&gt;  math:                2.67x as fast      747.6ms +/- 3.5%    280.4ms +/- 6.1%     significant&lt;br /&gt;    cordic:            2.15x as fast      355.8ms +/- 1.0%    165.6ms +/- 5.0%     significant&lt;br /&gt;    partial-sums:      2.82x as fast      241.2ms +/- 10.7%     85.4ms +/- 16.3%     significant&lt;br /&gt;    spectral-norm:     5.12x as fast      150.6ms +/- 1.6%     29.4ms +/- 2.3%     significant&lt;br /&gt;&lt;br /&gt;  regexp:              *1.82x as slow*    406.6ms +/- 6.5%    741.6ms +/- 3.4%     significant&lt;br /&gt;    dna:               *1.82x as slow*    406.6ms +/- 6.5%    741.6ms +/- 3.4%     significant&lt;br /&gt;&lt;br /&gt;  string:              1.08x as fast     1364.0ms +/- 3.5%   1265.6ms +/- 2.7%     significant&lt;br /&gt;    base64:            1.13x as fast      159.0ms +/- 2.1%    141.2ms +/- 13.8%     significant&lt;br /&gt;    fasta:             2.36x as fast      290.2ms +/- 4.2%    123.0ms +/- 3.8%     significant&lt;br /&gt;    tagcloud:          *1.34x as slow*    250.2ms +/- 4.3%    334.8ms +/- 6.4%     significant&lt;br /&gt;    unpack-code:       ??                 471.0ms +/- 7.3%    482.4ms +/- 1.2%     not conclusive: might be *1.02x as slow*&lt;br /&gt;    validate-input:    1.05x as fast      193.6ms +/- 2.6%    184.2ms +/- 5.8%     significant&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-4020958462980154535?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/4020958462980154535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=4020958462980154535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/4020958462980154535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/4020958462980154535'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/09/first-look-at-performance-of-google.html' title='A first look at the performance of Google Chrome&apos;s V8 javascript engine'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-5483251540330914715</id><published>2008-04-25T04:09:00.000-07:00</published><updated>2008-04-25T05:21:36.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='pack200'/><category scheme='http://www.blogger.com/atom/ns#' term='compression'/><title type='text'>What compression algorithm to use with pack200</title><content type='html'>I played around a bit with different compression algorithms after using pack200 to compress a jar file. I choose rt.jar from jre1.6.0_05/lib. Zip does very well when it is fed such well ordered data as the one pack200 produces, and it even beats bzip2. For fun, I included results for paq8n too.&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Compression&lt;/th&gt;&lt;th&gt;Size (kb)&lt;/th&gt;&lt;th&gt;Compression Ratio&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Uncompressed&lt;/td&gt;&lt;td&gt;47108&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200&lt;/td&gt;&lt;td&gt;10146&lt;/td&gt;&lt;td&gt;21.5%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200+zip&lt;/td&gt;&lt;td&gt;4283&lt;/td&gt;&lt;td&gt;9.1%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200+bzip2&lt;/td&gt;&lt;td&gt;4390&lt;/td&gt;&lt;td&gt;9.3%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200+7zip (lzma)&lt;/td&gt;&lt;td&gt;3814&lt;/td&gt;&lt;td&gt;8.1%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200+7zip (ppmd)&lt;/td&gt;&lt;td&gt;4089&lt;/td&gt;&lt;td&gt;8.7%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pack200+paq8n&lt;/td&gt;&lt;td&gt;3239&lt;/td&gt;&lt;td&gt;6.9%&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;This means that zip is within 32% of the incredible compression ratio of paq.&lt;br /&gt;&lt;br /&gt;For pack200 I used EFFORT=7, for zip -9, bzip2 -9, paq8n -8, and for the two 7zip I used a limit greater than the file size.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-5483251540330914715?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/5483251540330914715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=5483251540330914715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/5483251540330914715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/5483251540330914715'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/04/what-compression-algorithm-to-use-with.html' title='What compression algorithm to use with pack200'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-1975155047429210093</id><published>2008-02-10T20:23:00.000-08:00</published><updated>2008-02-12T13:54:06.281-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt lgpl'/><title type='text'>Why you shouldn't use LGPL for GWT widgets</title><content type='html'>I have been reading the GNU Lesser Public License (LGPL) the last days to try to understand what it means for GWT programs.&lt;br /&gt;&lt;br /&gt;The way I see it, there are two main purposes with the LGPL:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To make sure that improvements to the library can propagate back into the main library, and be useful to the maximum number of people.&lt;/li&gt;&lt;li&gt;To let end users upgrade a closed source application with a newer version of the LGPLed library.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The second point is the interesting one, if the library is dynamically linked (java and c programs using dlls fall under this case) then everything is fine, you just can't have a license that prevents reverse engineering and so on, but if an application links statically with an LGPLed library you have to make sure that the end user can re-link the application by distributing object files (source code is fine too of course). And here is the big problem with GWT widgets using LGPL. The GWT compiler takes java classes on the developer's computer, links them together and produces javascript that is then distributed to the user. This is static linking.&lt;br /&gt;&lt;br /&gt;So how can one assure that the user can relink the application with a newer version of the LGPLed widget without releasing the complete source code? Well, one could always create a big jar file of the rest of the application and obfuscate it...&lt;br /&gt;&lt;br /&gt;This seems very restrictive to me and I wonder if most of the authors of LGPLed GWT widgets know this, because it seems as if they might as well have used GPL then.&lt;br /&gt;&lt;br /&gt;Oh, and by the way, I am not a lawyer&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-1975155047429210093?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/1975155047429210093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=1975155047429210093' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/1975155047429210093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/1975155047429210093'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/02/why-you-shouldnt-use-lgpl-for-gwt.html' title='Why you shouldn&apos;t use LGPL for GWT widgets'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-1558186186588062130</id><published>2008-01-17T07:51:00.000-08:00</published><updated>2008-01-17T07:59:40.826-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><title type='text'>What does GWT's "Object is not allowed" error message mean</title><content type='html'>I used a custom jar I had downloaded in one of my GWT projects, and started to get the following error message in my ANT build:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I looked into this, and it seems that serialization in GWT works the following way:&lt;br /&gt;The GWT compiler starts by finding all types that inherits Serializable and IsSerializable, and creates serialization code specifically for those classes. Now, if one of those classes contains a non-transient member of type Object, GWT would have to generate code for serializing pretty much every class that is being used in the whole project, which isn't very efficient. So it outputs that warning instead.&lt;br /&gt;&lt;br /&gt;When I tried that construct in my own code it wouldn't even compile, so I'm not quite sure how they managed to build the jar in the first place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-1558186186588062130?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/1558186186588062130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=1558186186588062130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/1558186186588062130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/1558186186588062130'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/01/what-does-gwts-object-is-not-allowed.html' title='What does GWT&apos;s &quot;Object is not allowed&quot; error message mean'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-3022056763174619286</id><published>2008-01-11T00:52:00.000-08:00</published><updated>2008-01-11T01:01:36.749-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><title type='text'>How to install Java 1.6 on Debian Etch Stable II</title><content type='html'>My last post on the subject is &lt;a href="http://pocketdope.blogspot.com/2008/01/how-to-install-java-16-in-debian-etch.html"&gt;here&lt;/a&gt;, but one problem with that approach is that it won't update automatically with apt-get update/upgrade. However, it seems that java 1.6 is also available in backports, so just add backports.org to sources.list:&lt;br /&gt;&lt;br /&gt;emacs /etc/apt/sources.list&lt;br /&gt;&lt;br /&gt;And add the line&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;deb http://www.backports.org/debian etch-backports main contrib non-free&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then install it with&lt;br /&gt;&lt;br /&gt;aptitude update&lt;br /&gt;aptitude -t etch-backports install sun-java6-jdk&lt;br /&gt;&lt;br /&gt;And select the new java version:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;update-alternatives --config java&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-3022056763174619286?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/3022056763174619286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=3022056763174619286' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/3022056763174619286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/3022056763174619286'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/01/how-to-install-java-16-on-debian-etch.html' title='How to install Java 1.6 on Debian Etch Stable II'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-9027846385008714434</id><published>2008-01-10T05:20:00.000-08:00</published><updated>2008-01-10T07:46:14.765-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='health'/><title type='text'>How to live 14 years longer</title><content type='html'>I was watching the news today, and they reported on research that showed that people who:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;don't smoke&lt;/li&gt;&lt;li&gt;eat fruit or vegetables five times a day&lt;/li&gt;&lt;li&gt;exercise&lt;/li&gt;&lt;li&gt;don't drink more than two drinks daily&lt;/li&gt;&lt;/ul&gt;live 14 years longer than their smoking, drinking, immobile, fast food eating friends.&lt;br /&gt;&lt;br /&gt;I'd guess that smoking accounts for the largest part of those 14 years.&lt;br /&gt;&lt;br /&gt;And.. if you already do all those healthy things, think of this post as "How to live 14 years shorter"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-9027846385008714434?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/9027846385008714434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=9027846385008714434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/9027846385008714434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/9027846385008714434'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/01/how-to-live-14-years-longer.html' title='How to live 14 years longer'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-2462380099253953830</id><published>2008-01-10T04:09:00.000-08:00</published><updated>2008-01-10T06:14:14.734-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='electronica'/><title type='text'>Interview with The Knife</title><content type='html'>&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aasDUJE6UTE&amp;amp;rel=1"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/aasDUJE6UTE&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;How have you changed since the last album?&lt;/h5&gt; &lt;p&gt; Well.. we wanted to do a bit more right-on music this time, we tried to make something clearer and more direct, and the last record might have been a bit introvert at times and a bit secretive, and we felt that this time we'll make it the other way around.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;On some songs you sing like a woman and on some you sing like a man, why do you do that?&lt;/h5&gt; &lt;p&gt; Some messages that we want to tell get an extra twist when I do it as a guy, because there are things that have been said over and over by girls, for example feminist thoughts that girls have been talking about for a long time but guys haven't picked up on yet, so if I do it as a guy instead something happens. Also, many times when we alter my voice one can't really tell either, it's a bit in between, somewhat androgyne, and one can't tell where you have it ant that is pretty exciting, or what do you think?&lt;br /&gt;&lt;br /&gt;Yeah.. it's a lot of fun to pitch Karin's voice down, so that makes the work more fun.&lt;br /&gt;&lt;br /&gt;Yes &lt;/p&gt;&lt;h5&gt;How important is it to have a message in your music?&lt;/h5&gt; &lt;p&gt; For us it has become more and more important during our work and we try to explore it, to say more with our music that is directly connected to issues in society, it is something that we're trying a bit more this time, and feel that it is pretty interesting.&lt;br /&gt;&lt;br /&gt;If you're interested in politics and what it looks like around you ordinarily, why shouldn't you use that when making music, for us it's connected. Music isn't something we do just to... music is what we do, it's such a big part of our lives so it has to be about the things that we're thinking about.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;How come you have never played live?&lt;/h5&gt; &lt;p&gt; When we.. The first time when the last record was finished, we had some thoughts about starting rehearsing, but we were so fed up with all the songs on the record because we'd been working on it for so long that it didn't come naturally to start doing all this music live, because it didn't come into existence in that way, we have been creating the music in a computer and cut and built up something in the computer that doesn't have a connection to two people standing in a rehearsal room playing the music.&lt;br /&gt;&lt;br /&gt;But I guess that is the big.. we are a studio band from the beginning when we record and create the songs at the same time in a small room somewhere, so we have never done anything to show visually or anything that would be suitable for a stage or so, but it is possible that we'll figure our some form.  &lt;/p&gt;&lt;h5&gt;What are you doing right now, what are your present projects?&lt;/h5&gt; &lt;p&gt; Right now, since autumn we're making music for Kristina Olofsson's new movie, "Hannah med H" (Hannah with an H), that probably will be in cinemas next autumn or possibly a bit later. So we're making the music for the entire film, or rather, we're making all the music that is in the film. And we're almost done now. &lt;/p&gt;&lt;h5&gt;How does that work, what kind of film is it and when you're making music for a film, how do you think, do you go about it just as usual or do you try to put yourselves in the character's situation and stuff like that?&lt;/h5&gt; &lt;p&gt; It's a youth film, drama-thriller that is about a girl who is a bit alternative. And when we're making the music it is very different compared to how we worked earlier, this time it is about illustrating or trying to enhance the feelings that the director wants the film to mediate, so those feelings don't come from us directly, instead we try to understand what the director wants to be felt in a particular scene and then we try to make music in that direction.&lt;br /&gt;&lt;br /&gt;It is quite a bit of mood-music, there are some real songs, perhaps when a character in the film is listening to music or something like that but most of the time it is about enhancing feelings and moods in the film so it is pretty different compared to what we have done earlier.&lt;br /&gt;&lt;br /&gt;We like a lot of film, watch films a lot, but well.. there are a lot of exciting directors, David Lynch and Richard Kelly who made this Donnie Darko, then we're very inspired by Peter Wahlbäck (Swedish comedian), his earlier performances "Teater für Alle", "Ballett für Alle", those were very exciting, his ability to combine humor with a very clear and strong political message is very exciting, and it's very powerful and well packaged in a good way. &lt;/p&gt;&lt;h5&gt;Now comes one of those questions that we ask everyone: What music did you listen to when you were young?&lt;/h5&gt; &lt;p&gt; Tältprojektet (lit. The tent project), that was when we were really young.&lt;br /&gt;A lot of reggae at home, Bob Marley... yeah it was a lot of Bob Marley.&lt;br /&gt;And Jazz&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Hur har ni förändrats sedan den förra skivan?&lt;/h5&gt; &lt;p&gt; Ja.. vi ville väl göra mer rakt på sak musik den här gången, vi försökte göra någonting tydligare och mer direkt och förra skivan kanske var lite introvert ibland och lite hemlighetsfull och vi kände att nu ska vi göra nåt tvärt om.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;På endel låtar sjunger du som kvinna och på endel låtar sjunger du som man, varför gör ni det?&lt;/h5&gt; &lt;p&gt; Vissa budskap som vi vill föra fram får en extra tvist när jag gör det som kille, för att vissa saker som har sagts gång på gång av tjejer, t ex feministiska funderingar som tjejer har pratat om ganska länge men som killar inte har annamat ännu, så om jag gör det som kille istället så händer det nånting, plus att många gånger när vi gör det när vi gör om min röst så vet man inte heller, det blir lite mitt emellan också, lite androgynt, och man vet inte riktigt var man har den och det är ganska spännande, eller vad säger du?&lt;br /&gt;&lt;br /&gt;Mmm.. det är väldigt roligt att pitcha ner Karins röst så det gör att arbetet blir roligare.&lt;br /&gt;&lt;br /&gt;Ja &lt;/p&gt;&lt;h5&gt;Hur viktigt är det att ha ett budskap med sin musik?&lt;/h5&gt; &lt;p&gt; För oss när vi har jobbat under tiden så har det blivit mer och mer viktigt och vi provar att utforska det, att säga mer saker i vår musik som är direkt kopplade till sammhälleliga frågor, det är nåt vi provar denna gången lite mer, och tycker att det är ganska intressant.&lt;br /&gt;&lt;br /&gt;Om man är intresserad av politik och hur det ser ut runt omkring en i vanliga fall, varför skulle man inte använda sig av det när man gör musik, för oss så sitter det ihop. Musik är inte nåt vi gör bara för att.. musik är ju det vi gör, det är så stor del av vad vi håller på med så det måste handla om sånt vi funderar över.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Hur kommer det sig att ni aldrig har spelat live?&lt;/h5&gt; &lt;p&gt; När vi.. Första gången när förra skivan var klar så hade vi funderingar på att börja repa, men då var vi så hemskt trötta på alla låtar på skivan iom att vi jobbat med det så länge så då föll det sig inte så naturligt att börja sätta igång all den här musiken live iom att den aldrig kommit till på det sättet, vi har ju gjort musiken i dator och klistrat och byggt upp någonting i datorn som inte alls har nån koppling till ett par människor som står i en replokal och spelar musiken.&lt;br /&gt;&lt;br /&gt;Men det är väl det som är det stora.. vi är från början ett studioband vi spelar in och gör låtarna samtidigt i ett litet rum någonstans, så vi har aldig gjort nånting för att visa upp nåt visuellt eller nånting som skulle kunna passa på en scen eller så, men det är möjligt att vi hittar på nån form.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Vad håller ni på med just nu vad är era projekt för närvarande?&lt;/h5&gt; &lt;p&gt; Just nu håller vi på sedan i höstas och gör musik till Kristina Olofssons nya film "Hannah med H", som förmodligen kommer komma upp på biograferna i höst ev lite senare. Så då gör vi musik till hela filmen, eller all musik som är i filmen håller vi på att göra. Och börjar bli klara nu.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Hur fungerar det, vad är det för sorts film och när man gör musik till en film, hur tänker man då, är det bara som vanligt, eller försöker ni tänka er in i rollfigurernas situation eller nåt sånt där?&lt;/h5&gt; &lt;p&gt; Det är en ungdomsfilm, drama-thriller som handlar om  en tjej som är lite alternativ. Och när vi gör musik så är det väldigt annorlunda mot hur vi tidigare arbeta, nu handlar det om att illustrera eller försöka förstärka de känslor som regissören vill att filmen ska förmedla, så att de känslorna kommer inte från oss direkt utan vi ska försöka förstå vad regissören vill ska kännas i en viss scen och så ska vi försöka göra musik åt det hållet.&lt;br /&gt;&lt;br /&gt;Det är ganska mycket stämningsmusik det är iofs en del sådär riktiga låtar, när kanske nån person i filmen lyssnar på musik eller nånting sånt men det mesta är ju förstärka känslor och stämningar i filmen så det är ganska annorlunda mot vad vi gjort tidigare.&lt;br /&gt;&lt;br /&gt;Vi gillar mycket film, tittar mycket på film, men ja.. det finns ju massa spännande regissörer, David Lynch och Richard Kelly som gör den här Donnie Darko, sen inspireras vi väldigt mycket av Peter Wahlbäck, hans tidigare föreställningar "Teater für Alle", "Ballett für Alle", det var väldigt spännande, hans förmåga att kombinera humor med ett väldigt tydligt och starkt politiskt budskap är väldigt spännande, och det är väldigt slagkraftigt och välpacketerat på ett bra sätt.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Nu kommer en sån där fråga som vi ställer till alla, vad lyssnade ni på för musik när ni var små?&lt;/h5&gt;  Tältprojektet, alltså när vi var riktigt små.&lt;br /&gt;Mycket reggae hemma, Bob Marley... ja det var mycket Bob Marley&lt;br /&gt;Och jazz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-2462380099253953830?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/2462380099253953830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=2462380099253953830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/2462380099253953830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/2462380099253953830'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/01/interview-with-knife.html' title='Interview with The Knife'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-473925549433590255.post-8728300358918001058</id><published>2008-01-10T02:02:00.000-08:00</published><updated>2008-01-13T00:20:04.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><title type='text'>How to install Java 1.6 on Debian Etch Stable</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://pocketdope.blogspot.com/2008/01/how-to-install-java-16-on-debian-etch.html"&gt;Here &lt;/a&gt;&lt;span style="font-weight: bold;"&gt;is a smarter way&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Presently, only java 1.5 (aka java 5) is in the stable repository. Therefore, a little bit of work is needed to install java 1.6.&lt;br /&gt;&lt;br /&gt;Start by downloading the files you need from the unstable repository, &lt;a href="http://packages.debian.org/unstable/devel/sun-java6-jdk"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Download all the files you need, I got the following ones:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;sun-java6-bin_6-03-2_i386.deb&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;sun-java6-doc_6-03-2_all.deb&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;sun-java6-jdk_6-03-2_i386.deb&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;sun-java6-jre_6-03-2_all.deb&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want the doc package, you need to download the documentation zip (jdk-6-doc.zip) from java.sun.com manually, and do the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;chown root jdk-6-doc.zip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;chgrp root jdk-6-doc.zip&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mv jdk-6-doc.zip /tmp/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then I tried a simple&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;dpkg -i sun-java6-*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to install the packages but they have dependencies on libraries not yet in stable, so I tried to install them manually just to see what apt would tell me:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apt-get install unixodbc libstdc++5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This didn't work of course, but apt suggested that I'd try&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apt-get -f install&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which amazingly worked. After that java installed like a charm. Don't forget to select the right java version after you're done:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;update-alternatives --config java&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/473925549433590255-8728300358918001058?l=pocketdope.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pocketdope.blogspot.com/feeds/8728300358918001058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=473925549433590255&amp;postID=8728300358918001058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/8728300358918001058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/473925549433590255/posts/default/8728300358918001058'/><link rel='alternate' type='text/html' href='http://pocketdope.blogspot.com/2008/01/how-to-install-java-16-in-debian-etch.html' title='How to install Java 1.6 on Debian Etch Stable'/><author><name>RK</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00750097210087668768'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>