Schemepy status: Guile and Python inter-callable

May 10, 2008 – 1:39 am

It’s the 2nd week of Schemepy. I’m glad to say that I have a roughly finished guile back-end now. All existing (including some newly added ones) passed without any problem. However, I’ve also make some non-trivial interface changes:

  • toscheme is an instance method instead of a static method of VM now.
  • fromscheme and type is instance methods of VM instead of SCM now.

Those changes (as long as some other interface change, like a Symbol class for Scheme symbols) make it impossible to run mithro’s oldguile back-end unless some non-trivial patches applied.

Read the rest

Google Reader 终于增加 note 的功能了

May 6, 2008 – 12:06 pm

Google Reader noteGoogle Reader 可以 share 自己觉得有趣的文章,然而却无法指明自己为什么觉得有趣,今天打开 Google Reader ,发现左边侧栏有了一个 Note 的菜单。里面列出了自己的 notes ,还有一个 note button ,使用这个 note button 可以在任何地方把看到的有趣的文章 share 到 Google Reader 并添加自己的评注了,这也是一直期待的功能,因为有时候许多文章并不是在 Google Reader 里看到的,有些文章甚至没有 RSS Feed ,不方便用 Google Reader 进行订阅。

而 Reader 的文章内容的工具条那里除了原来简单的“Share”按钮,也多出来了一个“Share with note”按钮:

Google Reader Note

Wonderful! :) 我想应该好好学习 Google 如何了解用户的需求的了,而且他们自己的工程师们也肯定每天都在用自己的产品吧!

ps: 为 Blog 增加了验证码的功能,终于可以摆脱垃圾评论了。 :D

流水帐:GSoC、SRTP、MSTC、考试、游戏、动漫……

May 2, 2008 – 10:09 pm

其实连流水帐也算不上,因为根本没有什么连续性,其实生活本是如此嘛,杂乱无章,如果是一成不变,那就不叫生活了。而且这样的跳跃性似乎更适合我的思维。最近也发生了不少事情,姑且罗列一些吧。本来不是很喜欢在 Blog 上写这类的东西,但是似乎是有些压抑了,再加上受到动漫游戏里虚拟世界的那些美好生活的刺激吧,也想找个“人”倾诉(或者唠叨)一下。 :p

Google Summer of Code

前段时间一直在忙的 GSoC 申请也算告一段落了。大三也快结束了,同学们都开始找事情做了吧,特别是暑期的实习,好像 Google 、微软的都有宣讲会面试之类的,我想如果做 GSoC 的话就不会有时间做实习了,而 GSoC 本身其实也是实习性质的,这样就不用再去关心那些实习的事情了。但其实也算是一个借口吧,我还是太懒了,麻烦的事情我都不想去管,能逃避的就逃避了。

Read the rest

First week of Schemepy

May 2, 2008 – 5:23 pm

As I mentioned in my last post, I’ll work on Schemepy in this summer. Though the official begin coding time of GSoC is May 26, I’ve already do some initial research on this the last summer. I’ll try to keep a weekly progress report in my blog.

There were already two backend for Schemepy: guile and pyscheme. I haven’t looked much at pyscheme yet, and it seems that backend isn’t ported to the Schemepy interface yet. I took a look at the guile backend implementation by mithro, discussed with him the interface of Schemepy. I found I was trying to get the final interface designed before start writing the code, which proved to be a bad idea. One won’t be able to find some problems until he gets down to coding. That’s why I get a awkward design of the type mapping from Scheme cons pair to a Python value first.

Read the rest

git status in shell prompt

April 24, 2008 – 1:24 pm

When I see the post “Current Git Branch in Bash Prompt” from reddit, I found it really a cool idea. Personally, I use zsh, though that post is about bash, adding similar thing to zsh is pretty easy!

My zsh prompt is already pretty cool in my opinion. I borrowed something from Phil!’s ZSH Prompt, but I prefer a much cleaner style. Here’s what it looks like normally:

normal.png

It shows the current username and current working directory. I don’t like the full path of cwd shown in the prompt because I don’t care about it most of the time. Note the title bar below is not really irb, it’s the Screen status line. :p

Read the rest

Google Summer of Code 2008: First Chapter

April 23, 2008 – 12:01 am

Google Summer of Code 2008Finally, I was accepted by Thousand Parsec and will work on Schemepy with Timothy Robert Ansell this summer. I hope this would be an enjoyable summer. :)

It’s been a fairly long time since the announcement of Google Summer of Code 2008. I’ll try to write something about that period. I learned a lot from this and it’s really (some what) by coincidence that I ended up working with Schemepy. :p

Announcement

It was roughly summer of 2007 when Jack told me about Google Summer of Code. But applying period for GSoC2007 has ended that time. Then when I read the announcement of GSoC2008 this year in the Google Reader in late February, I was excited. I checked the website of GSoC and some projects accepted in year 2007, 2006 and 2005.

Read the rest

“软件工程”课告一段落

April 20, 2008 – 12:51 am

“软件工程”也是计算机专业的必修课之一。我一向对诸如敏捷开发、极限编程之类的东西比较感兴趣,“拥抱变化”给我的印象非常深刻,所以我意识里也有些抵制传统的软件工程。我觉得,对于小的项目来说,花那么多的时间在繁琐的软件工程流程上简直就是浪费;而对于大的项目来说,不管你花多少时间来做计划都是徒劳,因为需求总是会变化,我们要做的只能是“拥抱变化”而不是永远停滞在设计阶段。

但是我想既然这个课是由 CYJJ 来上,应该至少不会无聊到哪里去吧。二十多章的内容被压缩在了 8 周的短学期中,上课又是一百多号人的班级,唯一能吸引人的就是课件里穿插的各种故事(或者说叫做 IT 八卦)了。到最后一周的时候才幡然醒悟:上课似乎没有听进去过几个字。厚厚的一本书,考前看了一遍,也没有记住什么实质性的东西,DFD、ACD、SCD……一堆一堆的概念。当然为了避免这个课变成那种背概念的文科课,配套有几个 project :

  • Software Requirements Specification
  • System Design
  • Test Specification
  • Subsystem Version 1.0
  • Subsystem Version 2.0
  • Web Design
  • Final Integration of System

Read the rest

YARV (The Official VM for Ruby 1.9) Instruction Set

April 18, 2008 – 11:33 pm

YARV is Yet Another Ruby VM. But it is the official Ruby VM since Ruby 1.9. It is a stack-based VM which runs the YARV bytecode, or intcode because each element of the instruction sequence is in fact stored as an int.

There is an instruction table for YARV on the original YARV homepage, but it is out-dated now. So I build a new one and make it publicly available in case some one would be interested in.

Koichi said that the instructions are not stable currently. Something might going to change later. Some instructions that are not used frequently might be modified or even removed. But I guess at least those two instructions will be kept: ;)

  • bitblt: returns "a bit of bacon, lettuce and tomato".
  • answer: the answer to life, the universe, and everything. It returns 42.

Yes, there they are, both in the joke category of the instruction set. :D

Read the rest

Use git-svn to fork a project and keep tracking of it

April 15, 2008 – 12:28 am

gitThe case is that sometimes you want to add some cool feature to an open source project. But you don’t have commit rights to that project. So you checked out a copy of the code and do some local hacking. The problem is that you’ll have to track the updates of the original code and merge the changes to your local copy constantly.

One example is the multi-tty support of GNU Emacs (now officially available in Emacs). While the Emacs code base is rapidly evolving, the author of multi-tty branch should track the changes and merge them to his local copy. Another example is YARV when it is still not part of the official Ruby implementation.

Read the rest

给 YASnippet 的文档做了 css 主题

April 14, 2008 – 8:55 pm

YASnippet文档是用 reStructuredText 生成的,感觉 reStructuredText 虽然很强大,但是自带的那个 HTML Writer 的可定制性实在是不太好,而且文档不好找,许多地方都只能根据固定好的输出结构来做 css ,而 Muse 在这方面要好弄一些,主要是 Muse 比较简单,许多地方可以方便的控制了。下面是一个截图:

Document of YASnippet

还不错吧!可以点过去看看。 :) 其实是借用了 Drupal 6 的默认主题里的不少东西。