2010-07-16

Android Developers Blog: Android Market Welcomes Korea!

Android Developers Blog: Android Market Welcomes Korea!: "As of today, Android Market is open for business to application buyers in the Republic of Korea. We hope that this will make the outstanding Android devices now available in that nation even more useful and fun. We welcome the people of Korea, acknowledged everywhere as one of the world's most-wired societies, to the world of Android."


This is awesome, really. WHAT ABOUT SWEDEN?


;)

2009-09-27

Android Developers Blog: A Note on Google Apps for Android

I think googles stance on modded ROMs is a bit sad, since I am running one of those, and I would frankly not go back to stock ROM, because of lack of tethering. I think a totally open ROM would be awesome, but I realize it would take probably a year to replace the stuff that Google built. Hopefully I am wrong.

Android Developers Blog: A Note on Google Apps for Android

OpenAndroid

2009-06-09

Android Scripting Environment needs Groovy!

I am wondering why Google choose not to mention Groovy for the ASE, the Android Scripting Environment.

Groovy has no trouble accessing java APIs, for one. Could it be that groovy relies too much on dynamic code to be useable on the dalvik VM? See here for example http://www.nabble.com/Anyone-got-the-groovy-running-on-Android--td15044776.html.

2009-06-05

Xmpp server components for java

Its a bit sad that java is totally lacking any sort of embeddable or componentized server-side XMPP libraries. There is Tigase and Openfire servers, but they are just that, servers and not meant to build new servers or to be embedded, as far as I know.

I have also failed to find any examples or libraries for creating component connections to XMPP servers, although they are meant to be very similar to client connections.


Edit: Actually, seems there are ways to use PubSub from java which should be good enough for me: http://www.igniterealtime.org/community/thread/38292

2009-05-26

LuxRender performance on AWS

Just plyaing around with LuxRender on a small Blender 2.48 testscene. On my laptop, which has a Core 2 Duo 2,2Ghz, I get about 22k samples/s. Using a "High-CPU Extra Large Instance" AWS instance I get between 120 and 300k. Average seems to be about 10 times higher than for my laptop, which is nice enough. These cost 0.8$ per instance-hour, which is pretty decent for shorter jobs. I'm not sure about the bandwidth needed, luxrender does transmit the "film" every now and then but the interval can be tweaked.

Scaling this up by using more instances is also very easy.

2009-05-19

Lyrics for Fischerspooner - Megacolon

Just corrected a few errors in the version that are around on the net:

Document on Google docs

2009-05-06

How to add implicit imports to an embedded GroovyConsole

I wanted to have a graphical GroovyConsole that had my own APIs automatically imported. This proved to take some time to fix up. This is how it ended up looking. I created this in my normal eclipse-project so that I can easily launch this with the correct classpath already done for me.

TestGUI.java:

package groovy.ui;

import java.lang.reflect.Field;
import java.net.URL;
import groovy.lang.GroovyClassLoader;
import groovy.lang.GroovyShell;

public class TestGUI extends Console
{
public static void main(String[] args)
{
TestGUI gui = new TestGUI();

gui.run();
}

public TestGUI()
{
super();
try
{
setup();
}
catch (Exception e)
{
e.printStackTrace();
}
}

public void setup() throws Exception
{
Field shell =
Console.class.getDeclaredField("shell");
shell.setAccessible(true);
shell.set(this, new OurGroovyShell());
}
}


OurGroovyShell.java:

package groovy.ui;

import java.util.List;
import org.codehaus.groovy.control.CompilationFailedException;
import groovy.lang.GroovyShell;

public class OurGroovyShell extends GroovyShell
{
public Object run(String scriptText,
String fileName, List list)
throws CompilationFailedException
{
scriptText = "import whatever.*\n" + scriptText;

String[] args = new String[list.size()];
list.toArray(args);
return run(scriptText, fileName, args);
}
}



Fairly simple in the end. I was fooling around a bit to get this to work at first. This was done with Groovy 1.6.2.

2009-03-27

Using putty (win32) to connect to vino in ubuntu 8.10

Vino, it seems, has a bug in that it only listens on the localhost ipv6 address in ubuntu 8.10, ie. ::1:5900. I've been trying to connect to this using putty for some quite some time, and googling turns up a few threads and a bug in putty, ipv6-literals, that is not yet fixed even in the snapshots. I finally found the solution, almost all by myself, I should add an hostname to use instead of the numeric ip which has the problematic ":" in it. But actually, there already is in ubuntu: ip6-localhost. So adding the tunnel 4L5900:ip6-localhost:5900 works!

Oh, by the way: I did not want to disable ipv6 in Ubuntu since I occasionally use it.

2009-03-18

New sources of world knowledge

I am trying to develop a natural language parser using a "knowledge intensive" approach. For this I need knowledge for my application. I have a few plans for amassing it:



For pattern matching I will need to develop patterns. Others have already done this, but I believe I can do even better. In wikipedia one can successfully use links to other articles as tokens as to simplify the structure of patterns when developing/evolving ones pattern to match against. Or at least I hope so.

More Wikipedia statistics

Doing some statistics on the WEX datadump, and I am once again hitting memory limits. At least unless I filter uncommon stuff out ,which is entirely almost possible, given that you know every common word should appear a number of times if you take a chunk of wikipedia articles. Current stats are:

words 29657715 sentences: 1795296 articles: 13801 words unique: 1182046

Words are the number of whitespace-separated strings I've seen, sentences is sentences according to WEX, which by the way is way off for some articles such as Andre Agassi where it believes sentences ending with "No." means a new sentence when its Agassi's world ranking that comes next. Articles is self-explanatory, and unique words are unique words, this time with all character allowed but all lower-cased. So, from 14K articles the number of words are already more than 1M. This is very different from my older run which ignored anything that was not a-zA-Z, where it took a couple of hundred K articles to reach that number.

2009-03-04

Making Firefox 3 play CNN videos

The fix that worked for me was to add cnn.com to the whitelist in flashblock.

Others have mentioned other fixes, such as installing mediawrap, cleaning the cache, moving from adblock to adblock plus, using ietab, not using ietab, etc. For me it was a bit simpler.

2009-01-08

Official Google Reader Blog: Square is the new round.

I have to say the new Google Reader look is way better than before. I always hated round corners, too! I normally use the microfirefox theme in FF, so that tells you how anal I am about screenspace.


Official Google Reader Blog: Square is the new round.

2008-12-18

The best way to browser Flickr to date

This must be the way to browse Flickr lazily: tag browser. That is the tag browser I've been waiting for, basically. I would guess they are using something like DbPedia?

Novint Falcon

This thing seems really cool. Not so much as a game controller, since I barely play games, but rather as a simple CNC machine ;)

Imagine building a foam sculpter or a 3D scanner from this. Should be easy, especially the scanner since there are buttons on the attachments already, atleast if you dare modifying the official attachments. Apparently they have PICs in them, too, so there might be a real protocol between them and the falcon making building your own attachments that much more of a challenge.

2008-10-22

Android Developers Blog: Android is now Open Source

So, the andorod source was released. That is awesome, and I never doubted it would happen. On the other hand, symbian is also something I would like to see the source of, with me using it every day! I read this morning that the source would cost money to get at, which is really sad. This is what I found:

"The Symbian Foundation platform will be available to members under a royalty-free license during first half 2009. The Foundation will provide, manage and unify the platform, ultimately releasing it as open source. "

Hopefully this is just a temporary measure, as I understand releasing it in the end means I can look at it for free! We can hope anyway...

2008-08-19

Android signing signs..

I hope this is how signing will be done even in Android devices:

There are no requirements on the key used to sign .apk files; locally-generated and self-signed keys are allowed. There is no PKI, and developers will not be required to purchase certificates, or similar. For developers who use the Eclipse/ADT plugin, application signing will be largely automatic. Developers who do not use Eclipse/ADT can use the standard Java jarsigner tool to sign .apk files.

Taken from http://code.google.com/android/RELEASENOTES.html. This is the major problem with J2ME in my opinion: no way for developers to self-sign stuff.

2008-07-28

Google Knol - Information without semantics

So I saw gnol mentioned on identi.ca. I checked it out, but oh boy was I disappointed. Absolutely no semantics at all? Wikipedia is more semantic than that! Faviki is more semantic still. And freebase!

Unless they fix that I don't see how it will be succesfull in the the long term. Other "semanticer" things will simply crush it.


Official Google Blog: Encouraging people to contribute knowledge

2008-07-06

Using joins to find missing data and blobs

I just realized, after having read about column based storage, how potentially bad it is to have blobs in a metadata-rich table.

I am currently developing a small project during my sparetime, and we have a table which is roughly: id int, mimetype varchar, data blob, version int, and so on with a few more non-blob columns in it. What I noticed was that selects on this table that does not need the blobs using the indexed mimetype-field was incredibly slow. Relevant is that I am running MySQL in development mode, so it never seems to use more than a few tens of MB of RAM, meaning almost no caching is happening here. This means, in a row-storage database like MySQL I will be doing a tremendous amount of either seeking or reading of unneccesary data, depending on how MySQL plans its disk-reading, how big the blobs are and the effect of any read-ahead in OS or elsewhere.

The other part of this slow query is a outer join, something like this:

select id from c
left outer join b on b.c_id = c.id and b.name = "something"
where b.name is null

This is apparently also fairly slow. So don't do these things too much. In this case, the join to find if data is not in a joined table could be easily fixed by adding data to the db.

More funny java bugs

So, I get this simple assignment at work. Install a new version of our software on a brand spanking new Intel Xeon quad-core machine. Nice.

Only not so very nice when I notice hard java crashes. This is in EDU.oswego...ConcurrentHashMap's iterators hasNext method, always. I try downgrading to JDK1.5, but that does not help.

I might have to do yet another probing bug hunt in third-party software. Argh.


Also, trying out identi.ca even though blogging, and micro-blogging especially is not really my thing. Finding it fairly good though, just as ping.fm.

2008-06-10

HTMLUnit, MultiThreadedHttpConnectionManager and memory leaks

I have been having this wonderful time at my work. A small coding project involving use of mostly HtmlUnit was almost done, and working properly. But what happens? By chance I notice that it is leaking memory: Perm Gen space, even.

This was coded as a plugin for a larger product, and was dynamically reloaded at every invocation. I had to first remake the plugin CassLoader in this case to become a post-delegating classloader so that I could override the version of HttpClient already in the product. I couldn't really be sure it was not my changes leading to the classloader that gave rise to the leak, but eventually I got to that conclusion. The next step was to narrow down where this happened. Long story short, I found that if I changed HtmlUnit to not use the MultiThreadedHttpConnectionManager from HttpClient, it did not leak. I did not want to really do this though, being unsure of how HtmlUnit actually used this, and also because of the fact that we have multiple threads using HtmlUnit.

The thing that solved the issue was to call shutdownAll in the connection manager. I am not allowed to access that from my code as a user of HtmlUnit though, and I did want to avoid having to recompile anything, so I used reflection to subvert the access checks. Calling shutdown on the one manager did not work, however, nor did closing the connection, which HtmlUnit already did by the way.

I can only assume this is some obscure bug that nobody else ever trips, but now at least if somebody does, they might find this as a reference.

I could not use the latest HtmlUnit because of needing JDK1.4 compatibility, so this was done in HtmlUnit 1.13. Oh, and 1.14 needed CSS stuff that clashed with regular DOM libraries, making classloading not work. Not sure why this does not work when I can safely override HttpClient with a newer version.