Posts

Showing posts from December, 2006

Revive ripple-client-desktop

https://github.com/r0bertz/ripple-client-desktop

The first goal is to make it fully functional with RippleAPI.

Current status is most read only operations are working except order book.

Please follow this twitter thread for the most recent updates:
This weekend I tried to revive ripple-client-desktop. l I have reached a point at which I can run gulp without any warning on the command line. However, the app stuck at loading. Then I figured out that the client uses an ancient ripple-lib API. — r0bertz (@r0bertz) December 17, 2018

Starcraft, Cedega and TLS

I have tried to play starcraft in Linux using Wine. But the speed was unacceptable.
I've heard from others that wine works for them. However, it doesn't work here.
So I tried cedega days ago. The result is quite satisfactory! I don't need to return to Windows to play starcraft any more.

Yesterday I looked into the details of accessing thread local storage.
I wrote a small kernel module to get the base address of insmod process's tls segment, and then print the value of AT_SYSINFO
#include <linux/init.h>
#include <linux/module.h>
#include <asm/desc.h>

static int __init mod_init(void)
{
        int i=0, a=0, b=0, h, l;
        int *ptr=(int *)get_cpu_gdt_table(0);

        for(; i<28; i++){
                l = *ptr++;
                h = *ptr++;
                if (i==6){
                        b = h;
                        a = l;
                }
                printk("0x%08x", h);
                printk(" %08x", l);
                printk(&q…

screen, gdb, vdso and gentoo

Screen的中文乱码问题有了一点新进展。今天我了解到,如果使用中文,但使用gb字符集的时候,中文是正常的。UTF-8则是乱码。这对于解决这个问题应该有所帮助。

今天在Planet Larry上看到一篇blog,对我很有帮助。那里面提到一个gdb的初始加载文件,类似.bashrc。有很多有用的功能。比如在断点停住的时候,可以显示寄存器,堆栈等的内容和要执行的指令的上下文的反汇编。作者对这个文件加了点改进可以显示不同的颜色。
http://gnurbs.blogsome.com/2006/12/22/colorizing-mamons-gdbinit/
用了这个东西,基本可以抛弃emacs+gdb的组合了。毕竟emacs-23现在和gdb配合使用,我感觉还不是很稳定。

还看了这一篇文章, http://www.win.tue.nl/%7Eaeb/linux/lk/lk-4.html
不过里面最后一个例程应该是有点问题,改成这样就行了:
#include <stdio.h>

int pid;

int main() {
        __asm__ __volatile__(
                "movl $20, %%eax        \n\t"
                "movl $0xffffe400, %%ebx \n\t"
                "call *%%ebx            \n\t"
                "movl %%eax, %0         \n\t"
                : "=r"(pid)
                :
                : "ax", "bx"
        );
        printf("pid is %d\n", pid);
        return 0;
}

最后,今天发展了一个gentoo用户。基本上我帮他装的。有两点感觉:
1. 复制livecd安装真的很方便,很快
2. 一般Linux用户,特别是英文不怎么好的用户,安装gentoo,还真是会遇到不少困难,

screen: RAW_PUTCHAR()

如果screen的caption里有日期,星期,比如:
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c"
而且使用的又是中文locale
那么日期星期会乱码
大概看了一下源代码,发觉应该和display.c里的RAW_PUTCHAR()有关

龙芯电脑的预定确认信

尊敬的客户您好:首先向您表示诚挚的祝贺和由衷的谢意!我谨代表江苏中科龙梦科技有限公司,对您的积极参与表示感谢,同时很荣幸地通知您,您被我公司选择作为首批次龙芯福珑迷你电脑用户。您拥有选择和拒绝购买的权利。为了表达对一直以来支持和鼓励我公司不断取得进步的朋友们的谢意,同时也为了龙芯事业的稳步发展,我公司在相对公平公正的基础上,对首批次福珑迷你电脑使用者进行了简单有效的选择,您是其中一位。希望龙芯福珑迷你电脑能在您手中物尽其用,如果您有任何问题,可以随时与我们取得联系,我们将尽可能帮助您解决。另外,请购买者务必确定您的地址、联系方式是正确有效的,如因此出现的任何问题,我公司将不负责任。另外请注意,目前我公司尚未开通资金帐号,请不要急于打款,具体的返款措施,我们将于后期公布。在此回执的客户我们将正式登记记录,正式生效.江苏中科龙梦科技有限公司市场部http://www.lemote.com2006.12.08

Godon's picture

Image
龙芯的照片
这是个2C,不是最近卖的2E
我发email预定了2E,想看看能不能移植Gentoo过去,不过没有给我
也罢,就先摆弄2C玩玩看吧

ntfs-3g and fuse in Gentoo

* For this version of ntfs-3g to work properly, you need to use the
* kernel module included in the package, not the kernel version. To do this
* remove FUSE from your kernel, recompile it then remerge FUSE.
*
* emerge -a1 sys-fs/fuse
*
* You will need to reboot if you had FUSE in your kernel, if it was a module, this
* should be enough:
*
* modprobe -r fuse
* modprobe fuse
*
* If either of these commands have an error, you will need to reboot.
本来我是用sys-fs/fuse的,不过前两天心血来潮,用了内核里的fuse
结果emerge ntfs-3g时就看到了上面的提示

时断时续的bugzilla汉化

今天要把component的名称和描述的中文显示搞定
不过遇到一个棘手的问题
template/en/default/admin/components/list.html.tmpl
此文件里有这两行
[% edit_contentlink = BLOCK %]editcomponents.cgi?action=edit&amp;product=
[%- product FILTER url_quote %]&component=%%name%%[% END %]
[% delete_contentlink = BLOCK %]editcomponents.cgi?action=del&amp;amp;product=
[%- product FILTER url_quote %]&component=%%name%%[% END %]
作用是生成编辑连接和删除连接
不过我尚不清楚%%name%%是如何得来的
但是我知道,只有在Bugzilla/Component.pm的第91行不改动的情况下,这个连接才是正常的。
可是如果不改成下面这样,那么新建的component的中文名称和描述就是问号
$self->{$field} = decode_utf8($component->{$field});
想跳楼。。。

bugzilla之中文化

最近还在忙这个
不知道换了个公司,我还是否需要这样做
不过据我推测,中国软件公司员工的英语水平应该都挺高
anyway,记一下思路。

三个问题:
1. Bugzilla/BugMail.pm需要打个补丁
--- Bugzilla/BugMail.pm.bak     2006-12-06 09:19:08.000000000 +0800
+++ Bugzilla/BugMail.pm 2006-12-06 17:55: 03.000000000 +0800
@@ -46,6 +46,8 @@
 use MIME::Parser;
 use Mail::Address;

+use Encode qw(encode_utf8);
+
 # We need these strings for the X-Bugzilla-Reasons header
 # Note: this hash uses "," rather than "=>" to avoid auto-quoting of the LHS.
 my %rel_names = (REL_ASSIGNEE          , "AssignedTo",
@@ -636,7 +638,7 @@
     my $headers;

     if (Param('utf8') and (!is_7bit_clean($header) or !is_7bit_clean($body))) {
-        ($headers, $body) = encode_message($msg);
+        ($headers, $body) = encode_message(encode_utf8($msg));
     } else {
         my @header_lines = split(/\n/, $header);
         $headers = new Mail::Header \@header_lines, Modify => 0;

2. 网上现有最新的汉化包是2.20, 内容和正在使用的2.22有差距。使用中文界面时,已知的可导致的问题有,不能删除产品和模块。

3. 如果bug的摘要和附加评论是中文,将是乱码。解决思路是这样。首…

suspend2-sources-2.6.19 not ready yet

I haven't got enough time to investigate what is going on.
In order to try the new kernel, I emerged gentoo-sources-2.6.19-r1 and compiled/installed it. It works well so far.
I didn't enable libata, as it is said that its support for pata is still experimental and I don't have sata disk.
However I can't hibernate in it. So just halt.
But I like hibernate, so I will return to suspend2-sources-2.6.18 and stay there before new version is out.

PS: It seems that suspend2 patchset for 2.6.19 is ready now, http://forums.gentoo.org/viewtopic-t-521430.html?sid=4e52af07455eb15db7133bc20b1d89dd

汉化bugzilla以及在没有任何可用用户和可反向解析的ip地址的情况下重新获得bugzilla的控制权

Bugzilla的汉化其实很简单。不过如果你是在中国大陆,而且你正在用一个比较新的版本bugzilla的时候,就要费点周折。因为你不能直接登录sourceforge,而bugzilla汉化项目bugzilla-cn在sourceforge上。这时就需要tor+privoxy了。下载下来后,把cn_UTF8.zip里的default目录放到template/en里,并更名为custom。
第二个问题,缘起于忘记了super user的密码。没有可反向解析的ip,意味着sendmail发的信到不了目的地。这样注册的新用户就得不到注册时随机产生的密码。要解决这个问题,可以把data/params里的mail_delivery_method改成testfile,这样就不会通过MTA来发信,而是把信件内容保存在data/mailer.testfile里。这样就的到了一个可用的普通用户。然后在mysql控制台里,把bugs数据库里的profiles表里的这个用户的userid改成1,那么这个用户就变成了super user。完事。

Popular posts from this blog

How exactly is XRP going to work as a bridging digital asset?