From meinrad.recheis at gmail.com Sat Apr 1 04:59:39 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Sat, 1 Apr 2006 11:59:39 +0200 Subject: [rhg-discussion] Last news In-Reply-To: <7d9a1f530603290033y55c456b9pc4720c0783e3f49c@mail.gmail.com> References: <7d9a1f530603290033y55c456b9pc4720c0783e3f49c@mail.gmail.com> Message-ID: <43d756720604010159le32b9c0idd5819de325a1ec0@mail.gmail.com> On 3/29/06, Vincent Isambart wrote: > Hi everyone, > > I've made some improvements on generate_html.rb: > - we can now put comments that won't be in the generated HTML using > "$comment(my comment)$". It was mainly done to be able to force the > encoding to UTF-8 in Emacs and VIM. I also added this to all the text > files in English in the repository. > - there's also warnings if the extension of the images used in the > text files is JPG instead of PNG > - there's also support for special tags in the text files and > header/footer. The syntax is $tag(tag name)$. For the moment, the tags > available are "title" (the title of the text file, that means what's > beneath h1.) and "translation by" (the name of the translator(s)). > The're only used in the header and footer for the moment, but I'll > probably add later something like the last modification date or > generation date. > > I've got an English question: is there in English a way to say that a > note has been added by the translator (and was not in the original). > In French, we use "NdT : note" (NdT = Note du Traducteur), for example > something like "blah blah blah (NdT: This is no longer the case...)." in German remarks by the translater are always in footnotes like this: bla bla bla. * ... Footnotes: * Remark by the translator: .... but i think our current approach is good enough. -- henon From meinrad.recheis at gmail.com Sun Apr 2 14:55:19 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Sun, 2 Apr 2006 20:55:19 +0200 Subject: [rhg-discussion] Chapter 6 In-Reply-To: <7d9a1f530603240249g6af5dfd9oc7fe913e48273fe4@mail.gmail.com> References: <7d9a1f530603240249g6af5dfd9oc7fe913e48273fe4@mail.gmail.com> Message-ID: <43d756720604021155v6746a486r9226a01727cc7043@mail.gmail.com> On 3/24/06, Vincent Isambart wrote: > Hi everyone, > > Chapter 6 is now in the repository, open for review :). > I also changed most of the "diagram" to "figure". > Here is the translation of the figures: > - figure 1: no Japanese text > - figure 2: > * ?????? = variable is undefined > * ????? = variable is defined > * ????? = a warning appears > * ?????????????? = can be read like a normal variable > * ?????????????? (this line is twice in the diagram) = can be > written like a normal variable > * undef_setter????????? = transition to the state below done by undef_setter > the figures of chapter 6 are finished. however, scritch, it seems that you have skipped 5 japanese characters in the last sentence of the second figure. see link: http://i.loveruby.net/ja/rhg/book/images/ch_variable_gaccess.jpg according to your translation the sentence says "variable is defined ... " what do the following characters mean? regards, -- henon From vincent.isambart at gmail.com Mon Apr 3 03:39:39 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Mon, 3 Apr 2006 09:39:39 +0200 Subject: [rhg-discussion] Chapter 6 In-Reply-To: <43d756720604021155v6746a486r9226a01727cc7043@mail.gmail.com> References: <7d9a1f530603240249g6af5dfd9oc7fe913e48273fe4@mail.gmail.com> <43d756720604021155v6746a486r9226a01727cc7043@mail.gmail.com> Message-ID: <7d9a1f530604030039k2f1f441dg16b2cdcde72fabe4@mail.gmail.com> Hi, > > * ????? = variable is defined > > the figures of chapter 6 are finished. great :) > however, scritch, it seems that > you have skipped 5 japanese characters in the last sentence of the > second figure. see link: > http://i.loveruby.net/ja/rhg/book/images/ch_variable_gaccess.jpg > according to your translation the sentence says "variable is defined ... " > what do the following characters mean? Oups, sorry. But this does not change the meaning much: ?????????? = the variable has been defined Cheers, Vincent From piyokun at gmail.com Mon Apr 3 10:03:00 2006 From: piyokun at gmail.com (Clifford Caoile) Date: Mon, 3 Apr 2006 23:03:00 +0900 Subject: [rhg-discussion] [translation, patch] Chapter 07 - Part 1, 2, 3, 4, 5 of 9 Message-ID: <1f748ec60604030703p4c723186g3b03a42f42546872@mail.gmail.com> Here's a translation from Japanese to English of part of Chapter 07 "Security", parts 1, 2, 3, 4, 5 of 9. I "svn commit"-ted it already, but I will continue to attach and inline post it here for viewing convenience. Chapter 07 : Security part 1: Security : Fundamentals part 2: Security : Level 2 part 3: Security : Level 4 part 4: Security : Unit of Security part 5: Security : Reliability of `$SAFE` Summary: Security in Ruby is not very complete and Ruby the language doesn't help the programmer much with automating security. Well maybe it helps in CGI programs, but not much else. Action items: none Patch is already commited as svn://rubyforge.org/var/svn/rhg -r15:54 ---- BEGIN PATCH Index: en/chapter07.txt =================================================================== --- en/chapter07.txt (.../ja/chapter07.txt) (????? 15) +++ en/chapter07.txt (.../en/chapter07.txt) (????? 54) @@ -1,102 +1,111 @@ -h1. ?7? ?????? +$comment(-*- coding: utf-8 -*- vim:set encoding=utf-8:)$ +Translated by Clifford Escobar CAOILE -h3. ?? +h1. Chapter 7: Security -??????????????????????????????Ruby???? -??????CGI??????????????????????????? -?????? +h3. Fundamentals -?????????????????????????????????? -`eval`??????????????`eval`?????????? -Ruby????????????????????????????????? -???????????????????????`eval`??????????? -???????????????????????????????????? -??????????????????????????????????? -???????????????????????????????? +I say security but I don't mean passwords or encryption. The Ruby security +feature is used for handling untrusted objects in a environment like CGI +programming. -??Ruby???????????????????????????????? -??????????????????????????????????? -?????? +For example, when you want to convert a string representing a number into a +integer, you can use the `eval` method. However. `eval` is a method that "runs +a string as a Ruby program." If you `eval` a string from a unknown person from +the network, it is very dangerous. However for the programmer to fully +differentiate between safe and unsafe things is very tiresome and cumbersome. +Therefore, it is for certain that a mistake will be made. So, let us make it +part of the language, was reasoning for this feature. -* ???? -* ???????? +So then, how Ruby protect us from that sort of danger? Causes of dangerous +operations, for example, opening unintended files, are roughly divided into two +groups: -?????????????????????????????? -(???)???????????????????????? -??????? +* Dangerous data +* Dangerous code -??????????????????????????????????? -??????????????Ruby?????`$SAFE`??????????? -????????????0?????4????????????????? -????????????????????????????????? -???????????? +For the former, the code that handles these values is created by the +programmers themselves, so therefore it is (pretty) safe. For the latter, the +program code absolutely cannot be trusted. -???1?3??? -???0????????????????????????????? -???????2??????????????4????????????? -???0???????2?4????????????????? +Because for these causes the solution is vastly different, it is important to +differentiate them by level. This are called security levels. The Ruby security +level is represented by the `$SAFE` global variable. The value ranges from +minimum value 0 to maximum value 4. When the variable is assigned, the level +increases. Once the level is raised it can never be lowered. And for each +level, the operations are limited. -h4. ???2 +I will not explain level 1 or 3. +Level 0 is the normal program environment and the security system is not +running. Level 2 handles dangerous values. Level 4 handles dangerous code. +We can skip 0 and move on to explain in detail levels 2 and 4. -???????????????????CGI??? +h4. Level 2 -???2??????????????????????????????? -??????????????????????????????????? -?????????`eval`???????`File.open`???????????? -??????? +This level is for dangerous data, for example, in normal CGI +applications, etc. -??????????????????????????? -????????????????????? +A per-object "dirty mark" serves as the basis for the Level 2 +implementation. All objects read in externally are marked dirty, and +any attempt to `eval` or `File.open` with a dirty object will cause an +exception to be raised and the attempt will be stopped. -h4. ???4 +This dirty mark is "infectious". For example, when taking a part of a +dirty string, that part is also dirty. -???????????????????? -?????????(???????)??????????? +h4. Level 4 -???2???????????????????????????? -???4? -???????????????????`exit`?????I/O????? -???????????????????????????????????? -?????????????? +This level is for dangerous programs, for example, running external +(unknown) programs, etc. -h4. ???????? +At level 2, operations and the data it uses are checked, but at level +4, operations themselves are restricted. For example, `exit`, file +I/O, thread manipulation, redefining methods, etc. Of course, the +dirty mark information is used, but basically the operations are the +criteria. -`$SAFE`??????????????????????????????? -Ruby??????????????????????Java?.NET?????? -???(??????)?????????????Ruby????????? -?????????????????CGI??????? +h4. Unit of Security -????????????????????????????? -??????????????? -??????????????????????????????????? -?????????????????????? +`$SAFE` looks like a global variable but is in actuality a thread +local variable. In other words, Ruby's security system works on units +of thread. In Java and .NET, rights can be set per component (object), +but Ruby does not implement that. The assumed main target was probably +CGI. +Therefore, if one wants to raise the security level of one part of the +program, then it should be made into a different thread and have its +security level raised. I haven't yet explained how to create a thread, +but I will show an example here: +
-# ???????????????????
-p($SAFE)   # ??????0
-Thread.fork {    # ??????????
-    $SAFE = 4    # ???????
-    eval(str)    # ???????????
+# Raise the security level in a different thread
+p($SAFE)   # 0 is the default
+Thread.fork {    # Start a different thread
+    $SAFE = 4    # Raise the level
+    eval(str)    # Run the dangerous program
 }
-p($SAFE)   # ???????????0???
+p($SAFE)   # Outside of the block, the level is still 0
 
-h4. `$SAFE`???? +h4. Reliability of `$SAFE` -??????????????????????????????????? -??????????????????????????????????? -??????????????????????????????????? -??????????????????????????????????? -?? +Even with implementing the spreading of dirty marks, or restricting +operations, ultimately it is still handled manually. In other words, +internal libraries and external libraries must be completely +compatible and if they don't, then the partway the "dirty" operations +will not spread and the security will be lost. And actually this kind +of hole is often reported. For this reason, this writer does not +wholly trust it. -???????????????Ruby?????????????????? -?????`$SAFE=0`????????????????`$SAFE=4`????? -????????????????`$SAFE`?(??)?????????? -??? +That is not to say, of course, that all Ruby programs are dangerous. +Even at `$SAFE=0` it is possible to write a secure program, and even +at `$SAFE=4` it is possible to write a program that fits your whim. +However, one cannot put too much confidence on `$SAFE` (yet). -??????????????????????????????????? -??????????????????????????????????? -??????????????`ruby`?????????????? +In the first place, functionality and security do not go together. It +is common sense that adding new features can make holes easier to +open. Therefore it is prudent to think that `ruby` can probably be +dangerous. h3. ?? @@ -196,13 +205,3 @@ ??????????`level`????????`SecurityError`???????? -
- -???????????????? -"???? <aamine at loveruby.net>":mailto:aamine at loveruby.net -????????? - -"?Ruby??????????? -????????????????????????? (????????????)?":http://direct.ips.co.jp/directsys/go_x_TempChoice.cfm?sh_id=EE0040&spm_id=1&GM_ID=1721 - -Copyright (c) 2002-2004 Minero Aoki, All rights reserved. ---- END PATCH Best regards, Clifford Caoile -- irb(main):001:0> my.greeting( :"rhg-discussion" ) => "http://rubyforge.org/pipermail/rhg-discussion/2006-March/000015.html" -------------- next part -------------- Index: en/chapter07.txt =================================================================== --- en/chapter07.txt (.../ja/chapter07.txt) (??????????????? 15) +++ en/chapter07.txt (.../en/chapter07.txt) (??????????????? 54) @@ -1,102 +1,111 @@ -h1. ???7??? ?????????????????? +$comment(-*- coding: utf-8 -*- vim:set encoding=utf-8:)$ +Translated by Clifford Escobar CAOILE -h3. ?????? +h1. Chapter 7: Security -??????????????????????????????????????????????????????????????????????????????????????????Ruby???????????? -??????????????????CGI????????????????????????????????????????????????????????????????????????????????? -?????????????????? +h3. Fundamentals -?????????????????????????????????????????????????????????????????????????????????????????????????????? -`eval`??????????????????????????????????????????`eval`?????????????????????????????? -Ruby??????????????????????????????????????????????????????????????????????????????????????????????????? -?????????????????????????????????????????????????????????????????????`eval`????????????????????????????????? -???????????????????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -???????????????????????????????????????????????????????????????????????????????????????????????? +I say security but I don't mean passwords or encryption. The Ruby security +feature is used for handling untrusted objects in a environment like CGI +programming. -??????Ruby???????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -?????????????????? +For example, when you want to convert a string representing a number into a +integer, you can use the `eval` method. However. `eval` is a method that "runs +a string as a Ruby program." If you `eval` a string from a unknown person from +the network, it is very dangerous. However for the programmer to fully +differentiate between safe and unsafe things is very tiresome and cumbersome. +Therefore, it is for certain that a mistake will be made. So, let us make it +part of the language, was reasoning for this feature. -* ???????????? -* ???????????????????????? +So then, how Ruby protect us from that sort of danger? Causes of dangerous +operations, for example, opening unintended files, are roughly divided into two +groups: -?????????????????????????????????????????????????????????????????????????????????????????? -(?????????)???????????????????????????????????????????????????????????????????????? -????????????????????? +* Dangerous data +* Dangerous code -????????????????????????????????????????????????????????????????????????????????????????????????????????? -??????????????????????????????????????????Ruby???????????????`$SAFE`????????????????????????????????? -????????????????????????????????????0???????????????4??????????????????????????????????????????????????? -??????????????????????????????????????????????????????????????????????????????????????????????????? -???????????????????????????????????? +For the former, the code that handles these values is created by the +programmers themselves, so therefore it is (pretty) safe. For the latter, the +program code absolutely cannot be trusted. -?????????1???3????????? -?????????0??????????????????????????????????????????????????????????????????????????????????????? -?????????????????????2??????????????????????????????????????????4??????????????????????????????????????? -?????????0?????????????????????2???4??????????????????????????????????????????????????? +Because for these causes the solution is vastly different, it is important to +differentiate them by level. This are called security levels. The Ruby security +level is represented by the `$SAFE` global variable. The value ranges from +minimum value 0 to maximum value 4. When the variable is assigned, the level +increases. Once the level is raised it can never be lowered. And for each +level, the operations are limited. -h4. ?????????2 +I will not explain level 1 or 3. +Level 0 is the normal program environment and the security system is not +running. Level 2 handles dangerous values. Level 4 handles dangerous code. +We can skip 0 and move on to explain in detail levels 2 and 4. -?????????????????????????????????????????????????????????CGI????????? +h4. Level 2 -?????????2????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -???????????????????????????`eval`?????????????????????`File.open`???????????????????????????????????? -????????????????????? +This level is for dangerous data, for example, in normal CGI +applications, etc. -????????????????????????????????????????????????????????????????????????????????? -??????????????????????????????????????????????????????????????? +A per-object "dirty mark" serves as the basis for the Level 2 +implementation. All objects read in externally are marked dirty, and +any attempt to `eval` or `File.open` with a dirty object will cause an +exception to be raised and the attempt will be stopped. -h4. ?????????4 +This dirty mark is "infectious". For example, when taking a part of a +dirty string, that part is also dirty. -???????????????????????????????????????????????????????????? -???????????????????????????(?????????????????????)????????????????????????????????? +h4. Level 4 -?????????2???????????????????????????????????????????????????????????????????????????????????? -?????????4??? -?????????????????????????????????????????????????????????`exit`???????????????I/O??????????????? -???????????????????????????????????????????????????????????????????????????????????????????????????????????? -?????????????????????????????????????????? +This level is for dangerous programs, for example, running external +(unknown) programs, etc. -h4. ???????????????????????? +At level 2, operations and the data it uses are checked, but at level +4, operations themselves are restricted. For example, `exit`, file +I/O, thread manipulation, redefining methods, etc. Of course, the +dirty mark information is used, but basically the operations are the +criteria. -`$SAFE`????????????????????????????????????????????????????????????????????????????????????????????? -Ruby??????????????????????????????????????????????????????????????????Java???.NET?????????????????? -?????????(??????????????????)???????????????????????????????????????Ruby??????????????????????????? -???????????????????????????????????????????????????CGI????????????????????? +h4. Unit of Security -??????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -?????????????????????????????????????????????????????????????????? +`$SAFE` looks like a global variable but is in actuality a thread +local variable. In other words, Ruby's security system works on units +of thread. In Java and .NET, rights can be set per component (object), +but Ruby does not implement that. The assumed main target was probably +CGI. +Therefore, if one wants to raise the security level of one part of the +program, then it should be made into a different thread and have its +security level raised. I haven't yet explained how to create a thread, +but I will show an example here: +
-# ?????????????????????????????????????????????????????????
-p($SAFE)   # ??????????????????0
-Thread.fork {    # ??????????????????????????????
-    $SAFE = 4    # ?????????????????????
-    eval(str)    # ?????????????????????????????????
+# Raise the security level in a different thread
+p($SAFE)   # 0 is the default
+Thread.fork {    # Start a different thread
+    $SAFE = 4    # Raise the level 
+    eval(str)    # Run the dangerous program
 }
-p($SAFE)   # ?????????????????????????????????0?????????
+p($SAFE)   # Outside of the block, the level is still 0
 
-h4. `$SAFE`???????????? +h4. Reliability of `$SAFE` -????????????????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -?????? +Even with implementing the spreading of dirty marks, or restricting +operations, ultimately it is still handled manually. In other words, +internal libraries and external libraries must be completely +compatible and if they don't, then the partway the "dirty" operations +will not spread and the security will be lost. And actually this kind +of hole is often reported. For this reason, this writer does not +wholly trust it. -?????????????????????????????????????????????Ruby?????????????????????????????????????????????????????? -???????????????`$SAFE=0`????????????????????????????????????????????????`$SAFE=4`??????????????? -????????????????????????????????????????????????`$SAFE`???(??????)?????????????????????????????? -????????? +That is not to say, of course, that all Ruby programs are dangerous. +Even at `$SAFE=0` it is possible to write a secure program, and even +at `$SAFE=4` it is possible to write a program that fits your whim. +However, one cannot put too much confidence on `$SAFE` (yet). -????????????????????????????????????????????????????????????????????????????????????????????????????????? -????????????????????????????????????????????????????????????????????????????????????????????????????????? -??????????????????????????????????????????`ruby`?????????????????????????????????????????? +In the first place, functionality and security do not go together. It +is common sense that adding new features can make holes easier to +open. Therefore it is prudent to think that `ruby` can probably be +dangerous. h3. ?????? @@ -196,13 +205,3 @@ ??????????????????????????????`level`????????????????????????`SecurityError`???????????????????????? -
- -???????????????????????????????????????????????? -"???????????? <aamine at loveruby.net>":mailto:aamine at loveruby.net -??????????????????????????? - -"???Ruby????????????????????????????????? -??????????????????????????????????????????????????????????????????????????? (????????????????????????????????????)???":http://direct.ips.co.jp/directsys/go_x_TempChoice.cfm?sh_id=EE0040&spm_id=1&GM_ID=1721 - -Copyright (c) 2002-2004 Minero Aoki, All rights reserved. From piyokun at gmail.com Mon Apr 3 10:07:58 2006 From: piyokun at gmail.com (Clifford Caoile) Date: Mon, 3 Apr 2006 23:07:58 +0900 Subject: [rhg-discussion] assignment grab: translation of Chapter 07, parts 6-9 of 9 Message-ID: <1f748ec60604030707q361acc33pf22d17f0c94b8181@mail.gmail.com> RHG-discussion: Hi everybody, I'm going to continue with Chapter 07. If nobody else minds, I'll start translating Chapter 07 "Security" parts 6-9 (of 9). > Well, it will be a short run to translate this chapter. No one is telling me to go faster or slower so I'm going to take my sweet time. Chapter 07: "Security" part 6: Implementation part 7: Implementation : Dirty Mark part 8: Implementation : $SAFE part 9: Implementation : rb_secure Best regards, Clifford Caoile -- irb(main):001:0> my.greeting( :"rhg-discussion" ) => "http://rubyforge.org/pipermail/rhg-discussion/2006-March/000015.html" From piyokun at gmail.com Mon Apr 3 10:12:36 2006 From: piyokun at gmail.com (Clifford Caoile) Date: Mon, 3 Apr 2006 23:12:36 +0900 Subject: [rhg-discussion] [translation, patch] Chapter 07 - Part 1, 2, 3, 4, 5 of 9 In-Reply-To: <1f748ec60604030703p4c723186g3b03a42f42546872@mail.gmail.com> References: <1f748ec60604030703p4c723186g3b03a42f42546872@mail.gmail.com> Message-ID: <1f748ec60604030712r4dfc2e37k9785bce4686ac61b@mail.gmail.com> Hate to follow up on my own post but, it looks like I forgot to include the errata for Chapter 07, sorry! From the errata on Chapter 07, only 1 item [1]. ?p.195,196 ?????????????? 1? ??? 2 ????????????????????? ? p. 195, 196 Level 1 is the level that takes care of the dangerous data. It would be correct to say that Level 2 doesn't have much practical use. [1] http://i.loveruby.net/ja/rhg/errata.html Should I correct all references to Level 2 to say instead Level 1? Best regards, Clifford Caoile -- irb(main):001:0> my.greeting( :"rhg-discussion" ) => "http://rubyforge.org/pipermail/rhg-discussion/2006-March/000015.html" From vincent.isambart at gmail.com Mon Apr 3 10:20:40 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Mon, 3 Apr 2006 16:20:40 +0200 Subject: [rhg-discussion] assignment grab: translation of Chapter 07, parts 6-9 of 9 In-Reply-To: <1f748ec60604030707q361acc33pf22d17f0c94b8181@mail.gmail.com> References: <1f748ec60604030707q361acc33pf22d17f0c94b8181@mail.gmail.com> Message-ID: <7d9a1f530604030720s17001276me930c347f2fb1fcf@mail.gmail.com> Hi, > > Well, it will be a short run to translate this chapter. > No one is telling me to go faster or slower so I'm going to take my sweet time. Well, faster is better ;), but you can take your time, especially if that means a better translation :). I'll shout on the first one doing any reproach on the translation speed :). From vincent.isambart at gmail.com Mon Apr 3 10:27:39 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Mon, 3 Apr 2006 16:27:39 +0200 Subject: [rhg-discussion] [translation, patch] Chapter 07 - Part 1, 2, 3, 4, 5 of 9 In-Reply-To: <1f748ec60604030712r4dfc2e37k9785bce4686ac61b@mail.gmail.com> References: <1f748ec60604030703p4c723186g3b03a42f42546872@mail.gmail.com> <1f748ec60604030712r4dfc2e37k9785bce4686ac61b@mail.gmail.com> Message-ID: <7d9a1f530604030727je3e2cbao7ef05b6ce9b2816e@mail.gmail.com> > Should I correct all references to Level 2 to say instead Level 1? Looks like it. I've checked on the Pickaxe and it seems to agree: $SAFE >= 2 * Can't change, make, or remove directories, or use chroot. * Can't load a file from a world-writable directory. * Can't load a file from a tainted filename starting with ~. * Can't use File#chmod , File#chown , File#lstat , File.stat , File#truncate , File.umask , File#flock , IO#ioctl , IO#stat , Kernel#fork , Kernel#syscall , Kernel#trap . Process::setpgid , Process::setsid , Process::setpriority , or Process::egid= . * Can't handle signals using trap. From vincent.isambart at gmail.com Wed Apr 5 04:58:36 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Wed, 5 Apr 2006 10:58:36 +0200 Subject: [rhg-discussion] [ANN] Ruby Hacking Guide - New chapters (and a bonus) Message-ID: <7d9a1f530604050158r42218ccbo4b45f28ee13d15d7@mail.gmail.com> Hi everyone, Here they are, translations of chapter 3, 4 and 6 of the Ruby Hacking Guide! We know the translation is far from being perfect, and we welcome any correction on the text or diagrams of any chapter (even chapter 2). Please send them as patches (attached to the mail, not just in the body of the message) on the rhg-discussion mailing list (http://rubyforge.org/mailman/listinfo/rhg-discussion). The patches should be done against the text files in the SVN repository (http://rubyforge.org/scm/?group_id=1387). We also introduced a new feature: previews. It means we put on the web page chapters that have not be fully proofread and that may have missing diagrams. They are labelled with a big 'PREVIEW' on it. So do not hesitate to check our web page often to be able to read the chapters before they are announced (and send us corrections!). For example, the previews chapters released today were made available on the web page more that one week ago. I may repeat myself but we still need people to help, especially translators. If you can, even if it's only for one chapter, come help us. Proofreaders are also welcome, the more they are, the better. I would like to especially thank the following people for making it possible: - Clifford Caoile for translating chapter 3 - Meinrad Recheis for making the diagrams - Jim Driscoll for his proofreading - and of course Minero Aoki for allowing us to translate his book. So if you want to read it, the official web page is still http://rhg.rubyforge.org/ :). But wait! Today I also have a bonus: a quick translation of matz' YAPC::Asia 2006 slides. The slide in Japanese are available here: http://www.rubyist.net/~matz/slides/yapc2006/ They are mainly about multilingualisation in Ruby 2. Many thanks to matz for letting me post this translation and correcting my stupid mistranslations. For those who have no idea what TRON or Mojikyo is, and what are the problems of Unicode in Japan, you should check this: http://www.jbrowse.com/text/unij.html So here comes the translation. It's fact from being perfect, but it's still easier to understand than the Japanese version ;) -- beginning of the translation YAPC::Asia 2006 Ruby on Perl(s) Yukihiro "Matz" Matsumoto matz at ruby-lang.org Copyright (c) 2006 Yukihiro "Matz" Matsumoto, No rights reserved though. -- How was Ruby born? * in a Lisp(ish) system * I added object oriented capabilities * and took in some Perl functions -- That's why Perl is Ruby's big brother -- Or Ruby's big sister -- Therefore Hello World is print "hello world\n" in Perl, Ruby or Python -- But in PHP it's quite different on this point -- Ruby and Perl are similar but * Perl has everything * Ruby's heart is object oriented -- Ruby and Perl are similar but * Perl uses (most of the time) a functional word order * Ruby uses a Japanese word order -- Functional word order print reverse(); prints the reversed ARGV. -- Japanese word order ARGF.readlines.reverse.display Take ARGF, call readlines on it, reverse readlines' result, display reverse's result (this is natural order in Japanese language) -- Ruby and Perl are similar but - Larry is American (even if he studies the Japanese language) - Matz is Japanese (even if he studies the English language) -- Ruby and Perl are similar but * Perl is Unicode-centered * Ruby is decentralized -- Ruby and Perl are similar but * Perl uses UCS (Universal Character Set) * Ruby is (will be) CSI (Character Set Independent) -- What are your complaints towards Unicode? * it's thoroughly used, isn't it. * resentment towards Han unification? * inferiority complex of Japanese people? -- What are your complaints towards Unicode? * no, no I do no have any complaints about Unicode * in the domains where Unicode is adequate -- Then, why CSI? In most applications, UCS is enough thanks to Unicode. However, there are also applications for which this is not the case. -- Fields for which Unicode is not enough Big character sets * Konjaku-Mojikyo (Japanese encoding which includes many more than Unicode) * TRON code * GB18030 -- Fields for which Unicode is not fitted Legacy encodings * conversion to UCS is useless * big conversion tables * round-trip problem -- If a language chooses the UCS system * you cannot write non-UCS applications * you can't handle text that can't be expressed with Unicode -- If a language chooses the CSI system * CSI is a superset of UCS * Unicode just has to be handled in CSI -- ... is what we can say but * CSI is difficult * can it really be implemented? -- That's where comes out Japan's traditional arts Adaptation for the Japanese language of applications * Modification of English language applications to be able to process Japanese -- Adaptation for the Japanese language of applications * What engineers of long ago experienced for sure - Emacs (NEmacs) - Perl (JPerl) - Bash -- Accumulation of know-how In Japan, the know-how of adaptation for the Japanese language (multi-byte text processing) has been accumulated. -- Accumulation of know-how in the first place, just for local use, text using 3 encodings circulate (4 if including UTF-8) -- Based on this know-how * multibyte text encodings * switching between encodings at the string level * processing them at practical speed is finished -- Available encodings euc_tw euc_jp iso8859_* utf-8 utf-32le ascii euc_kr koi8 utf-16le utf-32be big5 gb2312 sjis utf-16be ...and many others If it's a stateless encodings, in principle it can be available. -- It means For applications using only one encoding, code conversion is not needed -- Moreover Applications wanting to handle multiple encodings can choose an internal encoding (generally Unicode) that includes all others -- If you want to * you can also handle multiple encodings without conversion, letting characters as they are * but this is difficult so I do not recommend it -- However, only the basic part is done, it's far from being ready for practical use * code conversion * guessing encoding * etc. -- For the time being, today I want to tell everyone: * UCS is practical * but not all-purpose * CSI is not impossible -- The reason I'm saying that They may add CSI in Perl6 as they had added * Methods called by "." * Continuations from Ruby. Basically, they hate losing. -- Thank you -- end of the translation -- Cheers, Vincent "scritch" ISAMBART From carnevale at tin.it Thu Apr 6 06:21:29 2006 From: carnevale at tin.it (Emanuel Carnevale) Date: Thu, 6 Apr 2006 12:21:29 +0200 Subject: [rhg-discussion] (no subject) Message-ID: (stands up) Hi, I'm Emanuel and I'm an engineer... Hi all, I read about this project yesterday and I want to help: it'll be a great opportunity to train my japanese and to improve my knowledge of Ruby. At the moment I'm looking for a job (subliminal note...:p), that means I have a little bit more free time for the time being. It seems that all the chapters for the Object part are taken, so if no one is against it, I'll start translating chapter 8. Just a question: everyone has his own writing style, so I suppose even the RHG author (Maoki if I'm right). I think will be useful if we keep somewhere a collection of his own typical phrase structures or words or verbs, found hard to translate the first time, but that will help a lot trough the different chapters. A sort of translating guide to Maoki's books for translators :p better than in the archive, a file in the svn repository maybe is the right solution. thanks in advance for your answers and nice to meet you all, Emanuel From vincent.isambart at gmail.com Thu Apr 6 06:57:56 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Thu, 6 Apr 2006 12:57:56 +0200 Subject: [rhg-discussion] (no subject) In-Reply-To: References: Message-ID: <7d9a1f530604060357u69de9648mff31f701f65be25d@mail.gmail.com> Hi, > At the moment I'm looking for a job (subliminal note...:p), that > means I have a little bit more free time for the time being. > It seems that all the chapters for the Object part are taken, so if > no one is against it, I'll start translating chapter 8. Well in the Object part chapter 5 has not be taken yet, but nobody took chapter 8, so it's like you want. > Just a question: everyone has his own writing style, so I suppose > even the RHG author (Maoki if I'm right). It's Minero AOKI (?? ?? in Japanese - family name first). > I think will be useful if > we keep somewhere a collection of his own typical phrase structures > or words or verbs, found hard to translate the first time, but that > will help a lot trough the different chapters. Well I do not have much. At the beginning I did not see how to translate "?" (generally meaning "sentence", here used for "statement"), but that's all I think. I do not think there really are typical sentences. Complicated ones for sure, but those are not used in multiple chapters. We're not pros (in translation) so even if the writing style changes from one chapter to the other it's not so bad. I think the most important is having only one translator for a specific chapter. Cheers, Vincent From carnevale at tin.it Thu Apr 6 15:27:51 2006 From: carnevale at tin.it (Emanuel Carnevale) Date: Thu, 6 Apr 2006 21:27:51 +0200 Subject: [rhg-discussion] (no subject) In-Reply-To: <7d9a1f530604060357u69de9648mff31f701f65be25d@mail.gmail.com> References: <7d9a1f530604060357u69de9648mff31f701f65be25d@mail.gmail.com> Message-ID: thank you for the welcome :) On 06/apr/06, at 12:57, Vincent Isambart wrote: > > Well in the Object part chapter 5 has not be taken yet, but nobody > took chapter 8, so it's like you want. > No problem: I'll start with Chapter 5 in that case, so we'll finish the first part. > We're not pros (in translation) so even if the writing style changes > from one chapter to the other it's not so bad. I think the most > important is having only one translator for a specific chapter. sure, my idea was not to have the same style for everyone, but just not fight on the same problems on every chapter. better to start working :) see you, Emanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rhg-discussion/attachments/20060406/516274a1/attachment.htm From piyokun at gmail.com Tue Apr 11 10:26:09 2006 From: piyokun at gmail.com (Clifford Caoile) Date: Tue, 11 Apr 2006 23:26:09 +0900 Subject: [rhg-discussion] [ANN] Ruby Hacking Guide - New chapters (and a bonus) In-Reply-To: <7d9a1f530604050158r42218ccbo4b45f28ee13d15d7@mail.gmail.com> References: <7d9a1f530604050158r42218ccbo4b45f28ee13d15d7@mail.gmail.com> Message-ID: <1f748ec60604110726w5c2271e1r9124f5b598469bcc@mail.gmail.com> Vincent: Wow this is a great bonus. Very informative, thanks! I am also interested in the "when is Ruby going to support Unicode?" issue, but this new stance (on CSI) makes me wonder if it's going to be implemented before Ruby On Rails "jumps the shark"? As an aside: Isn't Emacs moving toward Unicode instead of its previous raw encoding (emacs-mule?)? > For those who have no idea what TRON or Mojikyo is, and what are the > problems of Unicode in Japan, you should check this: > http://www.jbrowse.com/text/unij.html This is a really informative page, thanks for digging it up. -- Best regards, Clifford Caoile -- irb(main):001:0> my.greeting( :"rhg-discussion" ) => "http://rubyforge.org/pipermail/rhg-discussion/2006-March/000015.html" From vincent.isambart at gmail.com Tue Apr 11 10:39:15 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Tue, 11 Apr 2006 16:39:15 +0200 Subject: [rhg-discussion] [ANN] Ruby Hacking Guide - New chapters (and a bonus) In-Reply-To: <1f748ec60604110726w5c2271e1r9124f5b598469bcc@mail.gmail.com> References: <7d9a1f530604050158r42218ccbo4b45f28ee13d15d7@mail.gmail.com> <1f748ec60604110726w5c2271e1r9124f5b598469bcc@mail.gmail.com> Message-ID: <7d9a1f530604110739v62c3d91esbbc2d1d648f2dc07@mail.gmail.com> Hi, > Wow this is a great bonus. Very informative, thanks! I'm glad someone found it interesting ;) > I am also interested in the "when is Ruby going to support Unicode?" > issue, but this new stance (on CSI) makes me wonder if it's going to > be implemented before Ruby On Rails "jumps the shark"? For "when is Ruby going to support Unicode?", well, there is already some basic support for Unicode (UTF-8 only) in Ruby, especially if you use some dedicated extensions (like jcode or http://redhanded.hobix.com/inspect/unicodeLibForRuby18.html). For CSI, it sure looks great but it won't be for tomorrow I think... First, it will be part of Ruby 2.0, which won't be released before at least 2007. The slides themselves say that it's not finished, and I have no idea when it will be on the Ruby CVS. Some weeks ago it was announced that it would soon be on a branch (http://redhanded.hobix.com/cult/rubyspameeting2006.html) but no news since... > As an aside: Isn't Emacs moving toward Unicode instead of its previous > raw encoding (emacs-mule?)? I'm sorry, I do not follow much Emacs's development... From jd at typhon.org Mon Apr 17 09:45:04 2006 From: jd at typhon.org (Jean-Denis Vauguet) Date: Mon, 17 Apr 2006 15:45:04 +0200 Subject: [rhg-discussion] RHG in French too Message-ID: <44439BE0.3040302@typhon.org> Hi! I'm Jean-Denis Vauguet, aka jd. I'm yet another student in computer science, living in Paris; ruby/C programmer of my station in life. I read and write Japanese *basics*, but translating from Japanese to French is far from my abilities: my skills are limited to French/English translations (I'm also translator for www.pompage.net and for Ubuntu Linux). Concerning Ruby, I've launched a "foundation" (Ruby France) to promote Ruby at a local level. Documentation localisation is obviously a priority in the old Europe and particularly in France. I asked Vincent (thus, Minero aoki) about RHG being translated in French and he/they accepted. A new directory (fr/) has been created in the svn repos, open to all commiters. For the moment, Laurent Sansonetti (who is already a member of the project) and I are working on fr translation, but if you know French-speaking people, feel free to ask them if such a project would interest them! jd -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: OpenPGP digital signature Url : http://rubyforge.org/pipermail/rhg-discussion/attachments/20060417/6d3998eb/attachment.bin From meinrad.recheis at gmail.com Mon Apr 17 13:19:57 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 17 Apr 2006 19:19:57 +0200 Subject: [rhg-discussion] RHG in French too In-Reply-To: <44439BE0.3040302@typhon.org> References: <44439BE0.3040302@typhon.org> Message-ID: <43d756720604171019i5c7af15aj737d6bb39915b6c3@mail.gmail.com> On 4/17/06, Jean-Denis Vauguet wrote: > Hi! > > I'm Jean-Denis Vauguet, aka jd. I'm yet another student in computer > science, living in Paris; ruby/C programmer of my station in life. I > read and write Japanese *basics*, but translating from Japanese to > French is far from my abilities: my skills are limited to French/English > translations (I'm also translator for www.pompage.net and for Ubuntu > Linux). Concerning Ruby, I've launched a "foundation" (Ruby France) to > promote Ruby at a local level. Documentation localisation is obviously a > priority in the old Europe and particularly in France. > > I asked Vincent (thus, Minero aoki) about RHG being translated in French > and he/they accepted. A new directory (fr/) has been created in the svn > repos, open to all commiters. For the moment, Laurent Sansonetti (who is > already a member of the project) and I are working on fr translation, > but if you know French-speaking people, feel free to ask them if such a > project would interest them! > > jd > welcome Jean-Denis! ;) -- henon From vincent.isambart at gmail.com Tue Apr 18 06:56:14 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Tue, 18 Apr 2006 12:56:14 +0200 Subject: [rhg-discussion] Problematic Japanese sentence Message-ID: <7d9a1f530604180356i4a3453b0waf908a276bba3137@mail.gmail.com> Hi everyone, I need some help with the following sentence of chapter 9 (http://i.loveruby.net/ja/rhg/book/yacc.html) : ????????????????????????????????? I tried a little to search on Google and it seems it has something to do with mahjong... Could someone help me on this one? Cheers, Vincent From piyokun at gmail.com Wed Apr 19 08:44:34 2006 From: piyokun at gmail.com (Clifford Caoile) Date: Wed, 19 Apr 2006 21:44:34 +0900 Subject: [rhg-discussion] Problematic Japanese sentence In-Reply-To: <7d9a1f530604180356i4a3453b0waf908a276bba3137@mail.gmail.com> References: <7d9a1f530604180356i4a3453b0waf908a276bba3137@mail.gmail.com> Message-ID: <1f748ec60604190544l3df49c24j3d3720031a681467@mail.gmail.com> Heyas Vincent: > I need some help with the following sentence of chapter 9 > (http://i.loveruby.net/ja/rhg/book/yacc.html) : > ????????????????????????????????? > I tried a little to search on Google and it seems it has something to > do with mahjong... > > Could someone help me on this one? Yeah, it has something to do with mahjong. According to my teacher, ????????????: Chinese for the names of the tiles??????)?? is some action in a mahjong game where you "get a winning hand", ie. an assortment of 3 tiles ????. ????????is what that "winning hand" condition is called, it seems. Sorry I've never played mahjong. I believe he's trying to equate "A B C" becomes "program" into something in mahjong terms where you get 3 tiles and it becomes good (???) for your score. But then he says ???????...? which probably means he's trying to make a funny. Is he trying to imply that Rubyist or programmers should know mahjong? Ack!?! Heheh. -- Best regards, Clifford Caoile -- irb(main):001:0> my.greeting( :"rhg-discussion" ) => "http://rubyforge.org/pipermail/rhg-discussion/2006-March/000015.html" From vincent.isambart at gmail.com Wed Apr 19 09:14:13 2006 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Wed, 19 Apr 2006 15:14:13 +0200 Subject: [rhg-discussion] Problematic Japanese sentence In-Reply-To: <1f748ec60604190544l3df49c24j3d3720031a681467@mail.gmail.com> References: <7d9a1f530604180356i4a3453b0waf908a276bba3137@mail.gmail.com> <1f748ec60604190544l3df49c24j3d3720031a681467@mail.gmail.com> Message-ID: <7d9a1f530604190614w13640237hb5d27e83dfca1ecc@mail.gmail.com> Hi Clifford, > Yeah, it has something to do with mahjong. (...) Thank you very much :) > Is he trying to imply that Rubyist or programmers should know mahjong? > Ack!?! Heheh. Well, maybe at least that all _Japanese_ Rubyists should know mahjong ;) Cheers, Vincent