Kazu's Log

May 24, 2016

Redirecting readers

Probably I should provide something like http://blog.8-p.info/recent.atom though.

% aws s3api put-object --acl public-read --website-redirect-location http://2016.8-p.info/index.xml --bucket 2015.8-p.info --key atom.xml
    "ETag": "\"...\""
% curl -s -D - http://2015.8-p.info/atom.xml
HTTP/1.1 301 Moved Permanently
x-amz-id-2: 8jNxjg1xmjDvnStG0i6Z8NXLuaVkdhYuhBFTVT7KzdXJgoY1aFzD+tRpF5cVY7yQdMrXXO8qAM0=
x-amz-request-id: CC8392438A86DE49
Date: Wed, 25 May 2016 05:04:03 GMT
Location: http://2016.8-p.info/index.xml
Content-Length: 0
Server: AmazonS3

May 10, 2016

Learning Machine Learning

I’m taking Andrew Ng’s Machine Learning class. The bad news is I already a few weeks behind from the deadlines. The good news is the deadlines of this class don’t affect score unlike Martin Odersky’s Functional Programming class.

Apr 25, 2016

How to write IntelliJ IDEA's Enterprise Plugin Repository XML

IntelliJ IDEA has a feature called “Enterprise Plugin Repository” that allows you to distribute plugins without uploading them to JetBrains’ Plugin Repository.

A repository needs a XML file to index plugins. The blog post and the DTD only explain <plugins> and <plugin>, but IDEA-88075 mentions that <plugin> can have <description>. Is that all?

RepositoryHelper and RepositoryContentHandler

Apparently RepositoryHelper.parsePluginList() is the class where IDEA loads the XML file. It uses SAX to process the XML file. RepositoryContentHandler has all SAX event handlers. According to the Javadoc comment. There are 2 XML schemas, and the handler can process both of them.

Supports both updates.xml and plugins.jetbrains.com formats.

Seems updates.xml is the format we saw, and plugins.jetbrains.com format is the format which is used by plugins.jetbrains.com/plugins/list/.

Elements you can use

<plugin> only has id, url and version as its attributes, but it can have the following elements:

  • idea-version
  • vendor
  • id (same as the id attribute)
  • name
  • description
  • version (same as the version attribute)
  • vendor
  • depends
  • change-notes
  • rating
  • downloadUrl or download-url (same as the url attribute)

Most of them just take a content of the element as is.

Apr 20, 2016

Programming Meme Tumblrs

This PLT Life haven’t been updated these days, but now we have Classic Programmer Paintings.

Apr 13, 2016

List::MoreUtils::after() had corrupted my stack in 2012

I had reported an isssue on rt.cpan.org, Perl’s bug tracker in 2012. At that time, I had written Perl 5 at Mixi, the biggest social networking site in Japan.

After 4 years, finally, the issue has been closed! My patch was insufficient and Reini Urban actually fixed the issue. The fix will be in 0.414_001.