website | twitter

Thursday, September 08, 2005

UNDO!

To tell the truth, I haven't cared about UNDO in my work at all. Although I am really interested in brand new feature and fancy demonstration of computer programming, but I never have been concerned real user's experience. Ah, but the time seems to be coming to do about UNDO.

From the stand point of developer, I'm really taking care of undo. Programmer's undo is revision control systems. I love to use Monticello to manage my private project in Squeak, and Subversion for other stuff. I couldn't do anymore unless such system. So I realize that one interesting issue here is why undo system is implemented in various way?!

In minimal scale, we can use just undo key in your editor. Each application has its own undo policy. But the undo buffer is removed when the editor is shutdown. Revision control helps the situation. Besides, sometimes we use more file oriented backup system. So far, my company did differential backup for whole PCs at office into file server (I made the script in Perl). In any case, the goals are same, we want to back some point in history of our computing activity. Are there any core concept in?

Let's talk about other angle of undo. Sometimes undo is implemented as command pattern. Look, we have already have another commands in our etoys system, a tile, so we can imagine if undo buffer is made in etoys tiles. If so, one can learn how tile script is written looking undo history. This is basically same as macro recording (actually, I have learned emacs lisp to record/read macro scripts so far). To achieve such feature, all operation including painting a form and editing a text should be recorded as commands (as HyperTalk has all commands for menu / editor operation).

If all operation is recorded into undo buffer, we can see the undo buffer is document itself. That is an interesting side-effect. Instead of saving document data, we can save a sequence of command. The benefit of it would have a power of generalization. Documents, undo, playback, etc. are formed same way of commands.

To proceed this concept, you can see two different documents as two snapshot from same revision tree. Because certainly, a document is written from empty document. We could see any document of same application derives one root. Hence, any document of Squeak space is regard as different version of one big revision tree described in commands.

I know the idea is based on too simplification. I didn't care any performance issue neither space nor time. But it is important to start where the simple enough point.

Tuesday, September 06, 2005

Meeting with Julian

I had meetings with some NICT's researchers and Julian for these two days. Although I still felt slightly jet lag as I just had backed from L.A. on last Sunday, I was excited by a lot of interesting topic at the meeting. I also showed a demonstration about Chibi-Robo stuff. We were talking about to create 3-D scripting system. I realized this goal will be not easy as I expected. I regret my work should be stopped for a while to do another work, but I hope I will be able to make up more generic version. Most interesting topic came in the last dinner. Julian asked to one researcher to use iChat to corroborative work. Now we have enough infrastructure to use video conference, so it is free to use such tool whenever you need. Actually Julian said he already sets up iChat in his home during the entire day, it isn't necessary to turn off, and he can be chatting to his son whenever he want even he is on other side of the world. The important point is you don't need to disturb by noisy bells to aware enyone. One can look at peer not to be busy now nor not. I imagine the world where such video conference technology becomes just a trivial technique, as if today's HTTP or SMTP protocols, the applications of VOIP will become different than today's one (Croquet?!). Early web is just a thing for static document, but now it becomes more dynamic thing. Julian seems to try such experiment with his iChat.

Sunday, September 04, 2005

Implementation of TVML with Croquet

At last entry, I wrote the brief story of the Croquet project with NICT. But now, I am trying to describe more detail implementation of that project as I have a time on the airplane. In term of implementation, I could not say it was a good work. There were a lot of ad-hoc things, dirty patch, and less reusable. All the mess were from its primary goals. - Novice user can use. - Connect with P2P network more than 7 hosts. - The croquet space is regarded as if real NICT interior. Imagine these are not easy in current Croquet release as it is too early stage. For instance, the most strongest demand in here was we didn't have to show any error messages whenever a child touches anywhere, thus it needs a bunch of hooks in UI-related code. The lack of generalization was why I didn't show neither Squeak image nor source code of the project (I am ready to show you my source if you send me a mail). But I think I should contribute parts of codes for this project with some ways. Anyway, let's talk about points of the implementation. ** Describe animation as TVML script Honestly, the script that I described for the project was actually not TVML itself. Although much portion of the script was due to TVML, but I didn't TVML itself because; - Implementation of full set of TVML needs need effort. - I don't want to carry with new syntax into Smalltalk. Finally, the script I introduced looks like; - character:walk (name="Bob" x=10, y=0, z=10) (TVML notation) - Bob tvBehavior runSpec: #(walk x 10 y 0 z 10 length 1000). (Croquet notation) Basic idea is similar, but its expression is different. Croquet version is just a Smalltalk array, and it doesn't need the key "name" because the subject of the script is described as its receiver (Bob tvBavior references a TVML animation engine). Another significant thing is Croquet version stats the length of animation (by millisecond). The length of the animation was essentially platform dependence in original TVML (you can tune with magical numbers to try and error). But in Croquet, accurate timing was needed in network interaction. ** User interface For using as a direction board, I made the user interface be much simpler to eliminate walk-through motion, pop up menu, and dock menu. In stead of that, I put simpler UI. - Both right button and left button mean selecting menu. - The stand point of user does not move. - The degree of view can be moved by operation a mouse (180 width and 30 height). The main differences from regular Croquet is eliminating walk-through. In this work, User doesn't need to move the stand point. Besides, anyone can not make new objects or new windows. ** Network Network was the hardest work to do. Did you know current Croquet just supports up to 3-4 clients? I realize the fact when 3 days before of the demo, it makes my face pale with fear (I regretted I had been too late binder). The problem I met there was; - Become slow down. - A number of shared message was dropped down. - All host was down after one host was down. - Whenever one host is down, I have to restart all the host for synchronizing their states. I couldn't fix those problem in precisely right way as I had no time, but I managed the issue relatively ad-hoc way. - Each host has just atomic, limited states. - Reducing shared message (Cutting lasers, falling down, etc). - The interval of Heart beat (TeaParty>>runKeepAlive) was made longer. - Don't use TCP to avoid blocking. ** The fact we met from the "Open House" event. - It is hard to use if many user operate in same time. - The trackball has too many buttons. - Menus are too large for using in large display. - The pointer cursor is too small to see where is pointed. - It is hard to know each host is connected each other. - Out of memory happened each an hour.

Wednesday, August 03, 2005

TVML Crouqet exhibition

TVML Crouqet exhibition Posted by Picasa The final demonstration of my work about TVML + Croquet had finished last weekend in NICT "Open House" exhibition. We had up to 900 guests including families of the NICT reserchers in the exhibition one day. It was a very exciting day even I was lack of sleep... My work was a kind of computer guidepost. There were six connected Croquet client in varied places like the cafe, gallery, or so, and users can ask the computer the directions for a bunch of display items. In the screen, the space is build as same as actual place, and there is a robotic character named "Chibi-Robo", who leads user to right place. There are a couple of differences than usual Croquet application, most different thing is users never walk in the Croquet space. For example, a Croquet client placed at the cafe is always shows the cafe. If a user moves the mouse, the viewpoint is just rotated, but not moved. If a user wants to follow walking "Chibi-Robo", the user must walk to next Croquet client in actual space. When the user reaches next Croquet, wow! "Chibi-Robo" would be waiting for you in the host. There are six Crouqet, but there is only one "Chibi-Robo" in the space, so children (there are a lot of children!) have to run in the floor to chase Chibi-Robo. Honestly, a number of children played with Chibi-Robo, and began to like Croquet. I thought this was a succesful demonstration. In the technical degree, there were a couple of challenges. Especially, TVML animation and connected 6 hosts are very difficult thing. Actually, I had to reboot each 10-15 minutes for memory leak (about one hour per a host). That was tough experiment for Croquet.

Saturday, June 18, 2005

Squeak and stdin/stdout

I had a discussion with a couple of squeakers today. The main theme of the meeting was about our new web site for Japanese squeak develpers, but there was another interesting topic in the discussion. Standard input and output support in Squeak should be one of key aspect to make Squeak more populer. Sometimes, I've heard that the difficulty to combine another program is a reason that ordinary programmer feels Squeak unfamilier. Although, most of end users don't use stdio/stdin to connect applications these days. But programing fan including me still like to use such traditional way as its simplisity. For example, I am writing this topic with an emacs derivative in WindowsXP. Frequency, I strike a key Control Alt $ to invoke spell checker, or Control C + w to invoke English Japanese dictionary. These function are not in emacs, but external commands with a pipe stream. That was originaly a common operation style in Unix, and we can share bounty of the philosophy even if we use Windows. So non-support of stdio in Squeak seems a defect for hackers daily use. Fortunately, I found a work about this area named OSProcess. That was a impressive work! but a bad news is OSProcess does not support stdio in Windows. I don't know about how OSProcess works, but I start to think to make Windows support of it. Abe-san said he had used a proprietary Smalltalk as a batch language like /bin/sh. I imagine Squeak also should be good language as such glue.

Tuesday, June 14, 2005

Planning a demonstration of TVML + Croquet

I have a plan to show my work of TVML + Croquet at NICT public exhibition day the end of July. I have made a PowerPoint slide (I prefer Sqeueak! but they demanded it) and show at last NICT meeting. In the exhibition, main audience are neighborhood children. A lot of kids who are science fun would come. So we have a plan to show 10 PCs connected with Croquet for one whole day. 10 PCs ?! I have never seen such number of hosts connected with Croquet. I know current Croquet network implementation is a bit fragile. Actually, a friend of mine have tried to know how many number computers which can connected in Croquet same time, in that time (2 years ago), the result was only 4 hosts for a few minutes. Besides, this is not just a presentation, but a real demo. the users are hackish children who like to type the keyboard randomly. But I think this is exciting challenge.

Monday, June 13, 2005

Kansai Daigaku Workshop

Kansai Daigaku Workshop Posted by Hello Last week, I conducted a Squeak Etoys workshop at Kansai University. There were 60 students from media course, conputer science, and education cource. For the workshop, I used a special version of Squeak with numeric color control tiles, customized viewer, and morph sharing tab (Super Parts Bin). Although we had troubles some bugs of etoys, I think workshop itself was succees. The workshop was 7 hours. First 3 hours are tutorial for basic technique as "Drive A Car" curriculum. Rest 4 hours are for discussion and practice for theme. The theme of the workshop was "Introduce yourself". Some students could make really impressive work even if such short time. But again, I always think that programming etoys is not easy if you want to complicated project especially for conputer science students. They have complained me Squeak is harder than C++! ;)

Tuesday, May 10, 2005

Palo Alto a week and tweak

Today is a day that I have spent at Palo Alto for a week. It is good weather and good temperature. I became fond of bay area as soon as I came here. Now I am sitting front of a desk in HP lab. The laboratory has huge place and a number of numerous scientists from many countries, the accents of discussion through the wall have a exotic taste. I am starting Tweak in here, this is a brand new programming environment that I am puzzled at first. But I begin to like Tweak especially the structure of visual component. The model for solving dependency and constraint is not complete, but neat. Besides, Tweak's small process model is interesting. I don't understand much for Tweak yet, so I still finding my goal of Tweak. During contributing some code for bug fix, I am amusing new world new. My first favorite object is CFieldReference. This behaves as a kind of watcher or proxy object. In Tweak etoys, this object plays interesting role. Making CFieldReference is easy, you would just say; CObject fieldNamed: #fiedName And then, this object watches the value of the field described as #fieldName. If you set the CFieldReference as a player of any player like a drop down list, the list points the value continually. The point what I'm interested in is all fields of any object could be etoy's slot with CFieldReference. In former Squeak etoys world, etoys is in a slight special position. Smalltalk world and etoys world are completely different logic. But in Tweak, all object could have etoys-sh interface. I know having all slot for all variable is not good idea. The system would becomes too complicated withoug proper information hiding manner. But the possibility of integration between etoys world and source code world excites me.

Wednesday, March 30, 2005

Rendering 3-D objects through dll


Rendering 3-D objects through dll Posted by Hello For a few weeks, I was trying to connect original TVML viewer (written in C) and Croquet through FFI. Once I have written a code for rendering TVML object and playing simple animation in pure Smalltalk, but I took a strategy to make a hybrid system using C and Smalltak because writing all code in Smalltalk would need much time. Connecting original TVML viwer was not so easy, TVML viwer has a bunch of I/O codes, windows thread codes, and infinity loops. I trimed those issue and finally made a DLL wrapper around TVML. It could render TVML animation in Croquet space. Although using the DLL has a couple of problems. I can't see the animation through croquet network, an avator can't touch 3-D objects in TVML. These objects are like ghosts in Croquet world, we can see the objects, but these are not in a memory in Croquet. But it was still fun at least as a demonstration.

Tuesday, March 08, 2005

OBJ importer

OBJ importer Posted by Hello Finally, I have finished an OBJ importer with PIC image texture. In the fact, the importer lacks some important features like smoothing and normals handling. But I can get a brief snap shot to find out next goal of TVML. Kidawara-san required me special functions on TVML, kinds of network support and interactive user interface, which is not in original TVML. So I have to pursuit how to implement such feature. Anyway, today's result is on Squeakmap; http://map1.squeakfoundation.org/sm/package/0d9b7a69-b789-4490-8c59-24fa32a67af7 (I post the announce to Croquet-list but it didn't delivered yet).

Thursday, March 03, 2005

Showing TVML Object and OBJ in Croquet


TVML Stage Posted by Hello In TVML, OBJ file format is used for importing 3-D model. It was terrible that there are a lot of incompatible 3-D format in the world. But anyway, for playback TVML contents in Croquet, I have to make OBJ model exporter. Actually, OBJ format was not complicated. I would say it is relatively straightforward and easier than ASE format (ASE in 3dsmax was ugly), thus parsing the format and building objects were not hard job. But what I remain is texture. In OBJ, PIC file format is used to represent image file. OBJ??? I didn't know such format. In the fact, my picture viewer in windowsXP could not show the PIC image. So today's my task is learning what is PIC and building PIC file importer for Squeak.

Wednesday, March 02, 2005

Hakodate Workshop

Hakodate Workshop I and Abe-san conducted Squeak workshop last week in Hakodate Future University. The main part of the workshop was using World-Stethoscope; it is a small device to get external input like luminance, temperature, and voltage. Students made some devices with World-Stethoscope and simple materials like paper cups or balloons. One student developped a kind of toy that is a computer interface for babies. When a user shaked the device, the luminance sensor reacted its movement, and mon's face became glad in a computer screen. The goal of the workshop was discussing possibility of user interface. To invent original user interface, each student exchanged deep ideas of different possibilities of computer devices. That is to say, our workshop was to imagine the feeling of former computer scientists. Although I regret I couldn't tell how the works by students were exciting, that was good experience for me and Abe-san (this was the first World-Stethoscope workshop for university students). After the workshop, we have a plan to publish a booklet with the result of the workshop. It is not only for the record of the workshop, it will includes a text for advanced etoy's user. Posted by Hello

Tuesday, February 08, 2005

TVML

Finally, I started to make interface between Croquet and TVML. I had a meeting to make sure the role of its implementation with Hayashi-san and Aikawa-san, and they agreed to share current source code written in C. Although I think I should rewrite all aspect of animation in Smalltalk for good compatibility with Croquet, but now I strongly curious how to realize the animation of TVML style. So at first, I am going to make bridge for TVML library. Actually, the bridge of Croquet-to-TVML was quite easy. TVML player already has its API for other windows application, and I could implement a plugin to send TVML text in Croquet to TVML. But I guess getting animation informations form TVML would be harder because TVML animation engine did not suppose to use without TVML native render (I have to use a render in Croquet not TVML Player).

Friday, January 14, 2005

Two Teapot in One Squeak

I posted a change set at mantis http://bugs.impara.de/view.php?id=831 for running two Teapot in one image. Sometimes I am asked why ODE doesn't work well through network, but I didn't investigate deeply because it is a pain to set up two PC for debugging network. Also, I tried to run two images in one PC, but it doesn't work well. If one image is running, another would be stop. So I decided to run two croquet in one image.

Wednesday, January 05, 2005

Super Parts Bin

I made a special parts bin named "Super Parts bin". You can get morphs made by other guys from network. It is named after "Super Swiki", which is a mechanism to share project through network. The reason I made it is because I feel a project is too large to share individual's idea each other. If you could share a morph freely, You can make a collaborative project more easily. In this image, http://metatoys.org/tmp/2005-01-05.zip "LanguageGame" flap tab in right hand is connected my home server. So you can share any morph to drag-n-drop. The image is based on Japanese, but you can change language to push a button of earth in an orange flap.
 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.