agentzh's profileHuman & MachinePhotosBlogListsMore Tools Help

Blog


    October 30

    Notes for this fortnight (2006-10-18 ~ 2006-10-30)

    Oct 18 (to Jack Shen~)

    I wrote a UML class diagram generator based on GraphViz. it can parse arbitrary perl OO modules and obtain the inheritance relationships and method/attribute list automatically. it's called UML::Class::Simple. And it's much easier to use than StarUML . you know, dragging mouse to draw diagrams is really painful. yay for automatic image generation!

    (Here is one of the sample outputs: http://svn.berlios.de/svnroot/repos/unisimu/fast.png.)

    Oct 18 (to Sal Zhong~)

    i'm planning to upload UML::Class::Simple to cpan once it's mature enough. will you test it for me? bug reports and patches are most welcome. :)

    it's still undecided how to differentiate perl classes' properties from other ordinary methods. i'm also pondering the idea of adding relationships other than inheritance. i'll be delighted if you have some ideas on these matters.

    Note that i'm ignoring the Autodia module on CPAN since i'm not in favor of XML and a quite different approach has been taken in my project. anyway, i have to admit it's wise to talk to Autodia 's author and merge these efforts. at last, i must thank Alias for creating PPI and suggesting the use of Class::Inspector. they're invaluable when one wants to extract meta info from the perl world.

    Oct 19 (to Jack Shen~)

    I've merely finished the slides for recap. they already reach the amount of 44 and the number is still counting. alas, still wondering what to say in the next talk on the design of methods and subroutines. :(

    Oct 19 (to Cherry Chu~)

    Thanks. the talk went pretty well. it's interesting to see that i had the feeling just before the talk that you would not come. so i was not very surprised by your absence. no problem, there's always ``the next time''. :)

    i've been busy making slides for tomorrow's talk. they're still not finished yet. sigh. have to make more slides during the daytime tomorrow. producing so many slides is quickly getting tedious. hehe, you know that feeling, right? ;-)

    Oct 20 (to Cherry Chu~)

    这几天每天都要上讲台,而且一上就是 2 节,感觉好累哦。 不过上课时也时常有灵感出现,把平时很多只能意会的东西概念化、理论化, 从而也就可以很好地传达给我们学院的同学们了。

    另外就是做了许多幻灯片,它们像是连环画,又像是小小说,都很精致, 都很漂亮。它们是我从高一开始积累的编程思想的一些汇总与整理,真是有趣的很哦~ 我的朋友们上过我的课后都说收获很大,呵呵, 我觉得再没有什么比这个更让人激动的了。耶!

    ……谢谢。明天下午还要给我们学院的研究生做一次讲座。振奋哦~~~哈哈!:D

    Oct 21 (to He Shan~)

    我昨晚的课上得还行么?是不是太悠闲,节奏太缓慢了?

     > 呵呵,虽然这会才看到你的消息,但我的思维却始终没有离开你。我想你的课让
    > 我对自己后面的路该如何走,有了全新的认识,就像赵鹏说的有种豁然开朗的感
    > 觉。

    如此之高的评价我真是担当不起呢。看来我算是遇到知音了。 我最期待有人能对我说:“Oh, great! that's really important!”

    哈!我想人生最幸福的事莫过于此!

     > 悠闲嘛,开始是觉得有一点慢的感觉,没那么带劲儿,下课了,我还和鹏说,
    > 你不知道他充满激情的讲话是多么的有煽动性...后来你就进入状态了,特棒。

    Oct 22 (to He Shan~)

     > hi! I've found a book. IT is so nice that i have been
    > reading about it all the afternoon. it is great, just
    > like an extended version of "The Practice of
    > Programming". it's named "Code Complete".

    I've got the feeling that you are currently on the *right* way. you'll definitely become a good hacker if you keep going. hmm, hopefully you'll join us perl camels soon. ;)

     > 真的吗?呵呵,好,我会一直走下去的。现在我真的喜欢上编程了,我对优秀程序员
     > 所具有的品行狂热的向往。谢谢你的鼓励与帮助。耶!

    Oct 22 (to Jack Shen~)

     > 用 com 如何向 ppt 插图片?xul2ppt 的 python 版本急需。

    LOL. apparently you are not a VB guy. inserting images into ppt slides is straightforward once you know how to record down VBA macros in the PowerPoint environment and browsing the generated code in its VB IDE. Another way to get an answer is searching the web. iirc, the method should be AddPicture or something like that. not sure though, computers are out of my reach right now. :(

     > 知道了~ 我发现 python 在科学计算方面很厉害,有很好的库,
    > 我准备用 python 给我爸编程。python 有自己的 matlab 库,
    > 但不需装 matlab. 但当然没有 matlab 强大,这点是肯定的,
    > 哈哈。

    Python is even more powerful than MATLAB, Maple, and Haskell? i doubt that. :)

    ...I was exclusively hacking on the new tokenizer for Makefile::Parser and completely forgot that i had C# classes tonight. anyway, the next major release of M::P takes precedence over any other things. :)

    Oct 23 (to Sal Zhong~)

    I've just started to rewrite M::P's codebase (which will hopefully be released as M::P 1.00 soon). Yes, it's long overdue. I've had a pretty good plan for a scalable and extensible gmake implementation based on M::P for long.

    The new M::P API will offer parsing results at two different levels:

    • Makefile DOM tree

      It's a syntax-oriented data structure which preserves every single bit of info in the original makefile (including whitespaces and comments). So one can modify some part of the DOM tree, and write the updated makefile back to disk. I think it's useful to some GUI apps which want to edit makefiles via menus and is also beneficial to the gmake => PBS translator.

    • Makefile AST

      The AST desugars the handwaving parts of the DOM tree down to a semantic-oriented data structure for make-like tools to ``run'' it or for some visualizer (e.g. my Makefile::Graphviz) to depict the underlying dependency relations. For the PBS emitter, I think we should work out a special AST for it since the desugaring must be lossless, much like a program correctness proving system.

    I'm currently working on the M::P tokenizer and will finish the DOM tree constructor these days. The process should be going pretty fast since it is mostly test-driven.

    The first goal is to implement the new M::P APIs and get my pgmake utility pass most of the gmake tests so that I can kick M::P 1.00 out of the door.

    I'm stealing a lot of source code and pod from Alias's PPI module. I've noticed that the basic structure of PDOM trees can also fit my needs very well. it's called MDOM in my M::P though. ;-)

    Oct 24 (to Sun Xin~)

    Take care. translating may drive you mad some day. just have appropriate amount of fun, dude!

    Oct 26 (to Jack Shen and Sal Zhong~)

    my gnu Makefile DOM builder now supports most kinds of rules, 2 flavors of variable assignments, macro interpolations, and various command and comment syntax. Now it's trivial to add new node types and extend the DOM parser.

    i'll add support for double-colon rules, the define/vpath/include/ifeq/ifneq/ifdef/ifndef/... directives, and other missing structures tomorrow. After these additions, the DOM parser will be quite complete and will serve as the solid ground that we keep standing on. constructing the Makefile AST will be much easier if we keep a DOM tree handy.

    yay for test-driven development! without TDD or Alias' PPI , i wouldn't have progressed so rapidly. ;-)

    Oct 29 (to Sal Zhong~)

    When and where shall we take the Java exam?

    ...Oops, it seems impossible to release UML::Class::Simple tonight. still have several missing features to implement and the pod needs loves too. hmm, christopher may be unhappy since i earlier made the promise to him that i would make the release by *this* weekend. sigh. hopefully i'll get some cycles tomorrow.

    ...nod nod. but i also gotta review the data mining textbooks for the coming exam. furthermore, i'm planning to hack on two expert systems in the next week. i'll be programming in Prolog, CLIPS , and Perl simultaneously, which must be a lot of fun! yay! :D

    Oct 30 (to Sal Zhong~)

    I've just talked to Alias, the author of PPI , on #perl. he said that i could borrow as much source code from PPI as i would for my Makefile::DOM module. PPI::Element, PPI::Node, PPI::Token, and PPI::Dumper can be reused by my MDOM directly without many changes. i also briefly introduced the two-level ASTs to him and expressed my appreciation of PPI . It has given me plenty of inspiration on how to push my Makefile::Parser further.

    October 17

    Notes for this fortnight (2006-10-01 ~ 2006-10-16)

    Oct 1 (to Sun Xin~)

    Please check out your mailbox. i sent one journal and 107 slides to you for proofreading yesterday. remember that i've said i would try my best to keep you relatively busy? :)

    Oct 4 (to Sal Zhong~)

    I've rewritten your Win32::xul2ppt_mec module using Win32::OLE and stevan's excellent Moose module. Now it's named XUL::Image::PPT and the xul2ppt utility has been divided into two separate tools, xul2img.pl and img2ppt.pl. Please check out http://svn.berlios.de/svnroot/repos/unisimu/Perl/XUL-Image-PPT/ for the source code. :)

    Regarding the new xul2img utility, the --count and --title options are required. use --help to see the usage. because the XUL => image part is still based on Win32::GuiTest, the user interface is somewhat fragile and cannot be as nice as that of img2ppt. it's still the user's responsibility to open .xul with firefox and not to enter the full view mode (via F11) before running the xul2img tool.

    Delay settings like 0.5 sec should also work now since i've switched to Time::HiRes's sleep function. btw, Moose is so cool that writing perl 5 OO code has been exceedingly enjoyable. you know, perl 5's OO was ever a weak or even boring part in the past. Moose has brought me the feeling of using Perl 6 *today*. So don't hesitate and give it a shot! Enjoy~

    (agentzh mooses.)

    Oct 5 (to Sun Xin~)

    Currently i am making slides for my XML talk. the topic is ``XML in the real world''. will send the slides to you for review once they're ready. :)

    Oct 6 (to Cherry Chu~)

    I will send you a message when i get up tomorrow morning. please keep your phone on, OK? if you get up earlier than i, would you please inform me via a message? thank you. :)

    Oct 6 (to Jack Shen~)

    The slides for my XML talk are ready now. please check out your mailbox for details. the slides contain a lot of pretty pictures. i've covered hot topics like RSS and AJAX using Google Reader, the Qzone site, and my GetQzone utility as study cases. these topics are extremely exciting! comments on my slides will be appreciated. :) i hope miss zheng will be kind enough to give me more time to explain everything in my slides...hehe.

    Oct 7 (to Cherry Chu~)

    cherry: moose. :)

    cherry: elk! :D

    I'm now heading out. :) 7:15 AM. don't be late, cherry.

    ...yay! cherry++ i'm already waiting for you. :)

    ...i am home now, cherry! yay! ...I was walking pretty fast. hehe. have a good rest. hopefully you will regain your strength soon. :)

    Take care and sleep early, cherry. gotta run to shower and sleep myself. G'night &

    Oct 8 (to Sun Xin~)

    Cherry and i rode to the yangzhou city yesterday. we favored small roads in the fields over big ones. as a result, we were often followed by barking dogs and blocked by rivers and fields in our way. it was frustrating but also fun. she was amazingly vigorous and charming yesterday...we talked very happily and laughed a lot. you know, it was quite amusing to see she also talked and laughed very loudly, just like me! yay! hooray for cherry's beauty and the enormous parallels between us! hehe.

    we've decided to ride to other cities in the next few times. but it's still undecided which city to go first. what's your opinion, man? ;-)

    Oct 8 (to Cherry Chu~)

    how are you today? i am still a bit tired. sigh.

    ...wow, nice to hear that. btw, i'm happy to see my friend laye has replied to your journal. he's a talented programmer and now studying in the Fudan university. :) And your ``journal of 70 kilometers'' post reads very well! :)

    ...nod nod. he was in ujs when he was an undergraduate student. sadly we have never met in person. :(

    Oct 9 (to Sal Zhong and Jack Shen~)

    Yay! now i can do Java Swing programming in pure perl 5! furthermore, my perl interpreter can now learn new Java libraries all by itself. so i can manipulate *any* Java classes and objects as if they were implemented directly in perl 5. thanks to Inline::Java and Java::Swing. now i'm trying to get them work with pugs (i.e. perl 6). unfortunately, pugs doesn't do auto-importing for perl 5 modules. sigh. maybe i need to write some perl 5 wrappers and glue code there. oh, well...

    Oct 9 (to Sal Zhong~)

    huh! google++

    i will definitely look into its shiny source code search engine the other day. thanks for the info. :)

    Oct 9 (to Sun Xin~)

    man, i'll (selectively) translate these notes myself because i don't want to occupy too much of your spare time. anyway, i can do the translation work more easily and more accurately. would you please proofread both my english and chinese transcripts for me? i'll be very grateful to your review! ;)

    Oct 10 (to Jack Shen~)

    I've nailed down the basic syntax of the SXML language. it looks pretty neat. i'll implement converters for XML <=> SXML and HTML <=> SXML. i believe it's important enough for both XML's human reading and human writing.

    Oct 10 (to Cherry Chu~)

    Moose. will you come to my class this friday evening? :)

    Oct 16 (to Sal Zhong~)

    jerry gay (the guy also known as particle) is rewriting my smartlinks.pl using Moose . it's really wonderful! he will commit the code to the parrot repos. He said he would introduce smartlinks to the parrot test suite and link the tests to both the Perl 6 Spec and the parrot PDDs. not sure if he still has the crazy plan to port smartlinks.pl to PIR. anyway, as christopher said, the idea of smartlinking has inspired several add-on hacks. hooray!

    btw, pugs 6.2.13 is going to release tomorrow. larry is using pugs for his $work! sweet...

    October 01

    Notes for this fortnight (2006-09-21 ~ 2006-09-30)

    Sep 21 (to Sun Xin~)

    our charming XML instructor today asked me to give one or two talks in her class because she thought i was an expert in this domain. i'm very excited and have decided to make some good-looking slides in both english and chinese. i'll work on the new slides for the coming talks in the next few days. i'll send them to you for review once they are ready.

    i'll also send you a bunch of _old_slides_ for the talk given in the last term tomorrow. they're in pure english and most of my classmates liked it. i hope you can proofread the old slides since i'm going to publish them on the web.

    Our XML instructor is so beautiful that i dare say a lot of boys in the classroom like her very much. she holds great charm for me. i love to talk to her after the class. talking to her in person is really enjoyable. she is an extremely lovely girl. yay for her beauty and good mood!

    Sep 22 (to Sun Xin~)

    mails sent. remember to use Firefox to access the .xul URL (i.e. the slides) and don't click too fast while reading the slides since loading images can be slow.

    btw, i'll use cherry's qzone blogs as a study case in my new slides for the XML talk. the slide-making process can be fun! stay tuned! :)

    Sep 22 (to Jack Shen~)

    hey, jack. let me talk about microcosmic stuff, such as interface design for individual classes or small class library and you talk about the handwavy macroscopical things like large OO systems. i'll try my best to put enough basic weapons under the audience's belt before your lectures. what's your opinion?

    Sep 23 (to Sun Xin~)

    my instructors have asked me to give for total 12 talks this semester. that's really wonderful since i can take a more leisure pace during my talks. but i definitely need many more slides and pictures. i'll be talking about XML, Regular expressions (regexes) and object-oriented modeling and design. what cool stuff!

    Sep 27 (to Sun Xin~)

    i've produced 82 slides these two days, and i am about to crash... for my first talk, there are still 20 slides to go... it's really exciting!!! man!!!

    man, i've sent a weird english poetry to you for translating. i need the chinese transcriptfor my slides. please get back to me ASAP. it's quite urgent since the talk is scheduled on*this* Friday evening. thank you in advance. :)

    Sep 27 (to Cherry Chu~)

    our XML teacher has asked me to give one or two talks to my classmates in her class. and i am going to use *your* Qzone blogs as a study case in my slides. :)

    will you mind my introduction to your Qzone home? btw, an even shorter URL is working now: http://perlcabal.org/agent/cherry.html. feel free to give it a shot.

    ...glad to hear that. i have 16 lectures to give out this semester. i've been busy making slides for my talks. it is a hard job but is also fun. :)

    Sep 29 (to Sun Xin~)

    the talk was a big success. the audience laughed a lot and i was often stopped by the girl students' ``wow''. my instructor said after the talk that he was exceedingly impressed. he told me that it had given him great inspiration and determination. he said he had even been pondering giving up his C.S. career, but my talk completely changed his mind.

    ...nah. cherry didn't come because she is in a different department and i had not invited her to my talk.

    ...sorry, i didn't show your transcript explicitly in my slides. Audrey offered a translation in ancient chinese right before the talk and i used hers. but your work had helped me a lot. without your translation, i can't grok that poem to such an extend. thank you!

    it's worth mentioning that Larry Wall also provided me with an excellent translation in modern english. you know, he is a great linguist. :)

    ...LOL. lucky indeed. getting so much help and support is like a dream!

    Sep 30 (to Cherry Chu~)

    Heh, it will rain tomorrow anyway. hopefully the weather will get better when you come back from shanghai. :)

    ...nope, not that one. i was talking about the art of naming. the talk mentioning yourQzone space will be given on Oct 14, which is about XML in the real world.

    Sun Xin asked me last night if cherry had attended my talk. and i explained to him that you are in a different department and sadly i had not sent you an invitation.

    The talk was on this Friday evening. and i'll give talks at that time for every week from now on. we are at Z101. welcome joining us! 9th and 10th classes. :)

    ...nah, chinese speech mostly. every slide contains two versions of the content, the chinese version and the english version. and yeah, there'll be many students in my class. don't worry. :)

    it will simply rock if you can come. for another thing, i really hope you can also attend my XML talk because i'm going to show my classmates your blogs there. he he.

    the XML talk has been scheduled at 10504, 7th or 8th class. the concrete date is still undecided. i'll tell you once i had talked to our XML instructor. OK?

    ...(agent does his happy dance.)

    the XML talk should be on Thursday afternoon, btw.

    cherry, i have the idea of writing journals based on my cellphone messages. it's a great source of materials, you know. of course, i won't public any messages that i've received from others. for example, your replies will be excluded while my messages to you will probably be shown. what's your opinion? will you mind?