22layout : default
33---
44
5- h1. Final Chapter: Ruby's future
5+ Final Chapter: Ruby's future
6+ ----------------------------
67
7- h2. Issues to be addressed
8+ Issues to be addressed
9+ ======================
810
911` ruby ` isn't 'completely finished' software. It's still being developed,
1012there are still a lot of issues. Firstly, we want to try removing
@@ -14,7 +16,7 @@ The order of the topics is mostly in the same order as the chapters of
1416this book.
1517
1618
17- h3. Performance of GC
19+ ### Performance of GC
1820
1921The performance of the current GC might be
2022"not notably bad, but not notably good".
@@ -41,7 +43,7 @@ However, if such application will actually be created in the future,
4143there might be the necessity to consider Incremental GC.
4244
4345
44- h3. Implementation of parser
46+ ### Implementation of parser
4547
4648As we saw in Part 2, the implementation of ` ruby ` parser has already utilized
4749` yacc ` 's ability to almost its limit, thus I can't think it can endure further
@@ -51,7 +53,7 @@ and it's sad if we could not express another demanded grammar because of the
5153limitation of ` yacc ` .
5254
5355
54- h3. Reuse of parser
56+ ### Reuse of parser
5557
5658Ruby's parser is very complex. In particular, dealing with around ` lex_state `
5759seriously is very hard. Due to this, embedding a Ruby program or creating a
@@ -84,22 +86,22 @@ while parsing.
8486
8587
8688
87- h3. Hiding Code
89+ ### Hiding Code
8890
8991With current ` ruby ` , it does not work without the source code of the program to
9092run. Thus, people who don't want others to read their source code might have
9193trouble.
9294
9395
94- h3. Interpretor Object
96+ ### Interpretor Object
9597
9698Currently each process cannot have multiple ` ruby ` interpretors,
9799this was discussed in Chapter 13.
98100If having multiple interpretors is practically possible, it seems better,
99101but is it possible to implement such thing?
100102
101103
102- h3. The structure of evaluator
104+ ### The structure of evaluator
103105
104106Current ` eval.c ` is, above all, too complex.
105107Embedding Ruby's stack frames to machine stack could occasionally become the
@@ -110,7 +112,7 @@ aggressively can easily cause slowing down because `setjmp()` set aside all
110112things in registers.
111113
112114
113- h3. The performance of evaluator
115+ ### The performance of evaluator
114116
115117` ruby ` is already enough fast for ordinary use.
116118But aside from it, regarding a language processor,
@@ -120,7 +122,7 @@ what can we do?
120122In such case, the first thing we have to do is profiling.
121123So I profiled.
122124
123- <pre class="emlist">
125+ ``` TODO-lang
124126 % cumulative self self total
125127 time seconds seconds calls ms/call ms/call name
126128 20.25 1.64 1.64 2638359 0.00 0.00 rb_eval
@@ -132,7 +134,7 @@ So I profiled.
132134 5.19 5.27 0.42 388066 0.00 0.00 st_foreach
133135 3.46 5.55 0.28 8605866 0.00 0.00 rb_gc_mark
134136 2.22 5.73 0.18 3819588 0.00 0.00 call_cfunc
135- </pre>
137+ ```
136138
137139This is a profile when running some application but
138140this is approximately the profile of a general Ruby program.
@@ -152,7 +154,7 @@ In other words, without changing the way of thinking fundamentally,
152154there's no room to improve.
153155
154156
155- h3. The implementation of thread
157+ ### The implementation of thread
156158
157159This was also discussed in Chapter 19. There are really a lot of issues about
158160the implementation of the current ruby's thread. Particularly, it cannot mix
@@ -164,13 +166,14 @@ cannot continue to use eternally, isn't it?
164166
165167
166168
167- h2. `ruby` 2
169+ ` ruby ` 2
170+ ========
168171
169172Subsequently, on the other hand, I'll introduce the trend of the original ` ruby ` ,
170173how it is trying to counter these issues.
171174
172175
173- h3. Rite
176+ ### Rite
174177
175178At the present time, ruby's edge is 1.6.7 as the stable version and 1.7.3 as the
176179development version, but perhaps the next stable version 1.8 will come out in
@@ -195,7 +198,7 @@ entirely just a "plan". If you expect so much, it's possible it will turn out
195198disappointments. Therefore, for now, let's just expect slightly.
196199
197200
198- h3. The language to write
201+ ### The language to write
199202
200203Firstly, the language to use. Definitely it will be C. Mr. Matsumoto said to
201204` ruby-talk ` , which is the English mailing list for Ruby,
@@ -210,7 +213,7 @@ so not to increase extra efforts around this is necessary.
210213However, chances are good that it will be ANSI C next time.
211214
212215
213- h3. GC
216+ ### GC
214217
215218Regarding the implementation of GC,
216219the good start point would be
@@ -223,7 +226,7 @@ perpetually, but anyway it will proceed for the direction to which we can expect
223226somewhat improvement on speed.
224227
225228
226- h3. Parser
229+ ### Parser
227230
228231Regarding the specification, it's very likely that the nested method calls
229232without parentheses will be forbidden. As we've seen, ` command_call ` has a great
@@ -237,7 +240,7 @@ possible to implement such complex thing by hand? Such anxiety might left.
237240Whichever way we choose, the path must be thorny.
238241
239242
240- h3. Evaluator
243+ ### Evaluator
241244
242245The evaluator will be completely recreated.
243246Its aims are mainly to improve speed and to simplify the implementation.
@@ -285,7 +288,7 @@ For another example, Python is a bytecode interpretor.
285288
286289
287290
288- h3. Thread
291+ ### Thread
289292
290293Regarding thread, the thing is native thread support.
291294The environment around thread has been significantly improved,
@@ -308,7 +311,7 @@ and it is rarely actually used. Therefore there might be no problem.
308311
309312
310313
311- h3. M17N
314+ ### M17N
312315
313316In addition, I'd like to mention a few things about class libraries.
314317This is about multi-lingualization (M17N for short).
@@ -325,7 +328,7 @@ it will be absorbed at some point in the middle of 1.9.
325328
326329
327330
328- h3. IO
331+ ### IO
329332
330333
331334The ` IO ` class in current Ruby is a simple wrapper of ` stdio ` ,
@@ -342,7 +345,8 @@ Therefore, it seems Rite will have its own `stdio`.
342345
343346
344347
345- h2. Ruby Hacking Guide
348+ Ruby Hacking Guide
349+ ==================
346350
347351
348352So far, we've always acted as observers who look at ` ruby ` from outside.
@@ -353,7 +357,7 @@ I'll introduce the suggestions and activities for `ruby` from community,
353357as a farewell gift for Ruby Hackers both at present and in the future.
354358
355359
356- h3. Generational GC
360+ ### Generational GC
357361
358362First, as also mentioned in Chapter 5,
359363the generational GC made by Mr. Kiyama Masato.
@@ -368,7 +372,7 @@ more than anything else, it was the first large non-official patch.
368372
369373
370374
371- h3. Oniguruma
375+ ### Oniguruma
372376
373377The regular expression engine used by current Ruby is a remodeled version of GNU
374378regex. That GNU regex was in the first place written for Emacs. And then it was
@@ -386,13 +390,13 @@ absorbed as soon as possible.
386390
387391You can obtain Oniguruma from the ` ruby ` 's CVS repository in the following way.
388392
389- <pre class="screen">
393+ ``` TODO-lang
390394% cvs -d :pserver:anonymous@cvs.ruby-lang.org:/src co oniguruma
391- </pre>
395+ ```
392396
393397
394398
395- h3. ripper
399+ ### ripper
396400
397401Next, ripper is my product. It is an extension library made by remodeling
398402` parse.y ` . It is not a change applied to the ` ruby ` 's main body, but I
@@ -411,14 +415,14 @@ if this is accounted, I think it is constructed well.
411415It took only three days or so to implement, really just a piece of cake.
412416
413417
414- h3. A parser alternative
418+ ### A parser alternative
415419
416420This product has not yet appeared in a clear form,
417421there's a person who write a Ruby parser in C++ which can be used totally
418422independent of ` ruby ` . (` [ruby-talk:50497] ` ).
419423
420424
421- h3. JRuby
425+ ### JRuby
422426
423427More aggressively, there's an attempt to rewrite entire the interpretor.
424428For example, a Ruby written in Java,
@@ -452,7 +456,7 @@ However, the overall impression I got was, it's way better than I imagined.
452456
453457
454458
455- h3. NETRuby
459+ ### NETRuby
456460
457461If it can run with Java, it should also with C#.
458462Therefore, a Ruby written in C# appeared,
@@ -471,7 +475,7 @@ such things are the problems.
471475But ` instance_eval ` is in effect (astounding!).
472476
473477
474- h3. How to join `ruby` development
478+ ### How to join ` ruby ` development
475479
476480` ruby ` 's developer is really Mr. Matsumoto as an individual,
477481regarding the final decision about the direction ` ruby ` will take,
@@ -523,7 +527,7 @@ I'll answer it as much as possible,
523527and other people would respond to it, too.
524528
525529
526- h3. Finale
530+ ### Finale
527531
528532The long journey of this book is going to end now.
529533As there was the limitation of the number of pages,
0 commit comments