Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cd5880d

Browse files
committedApr 17, 2021
replace @ with backticks in fin.textile
1 parent c3cb813 commit cd5880d

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed
 

Diff for: ‎fin.textile

+27-27
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ h1. Final Chapter: Ruby's future
66

77
h2. Issues to be addressed
88

9-
@ruby@ isn't 'completely finished' software. It's still being developed,
9+
`ruby` isn't 'completely finished' software. It's still being developed,
1010
there are still a lot of issues. Firstly, we want to try removing
1111
inherent problems in the current interpreter.
1212

13-
The order of the topics is mostly in the same order as the chapters of
13+
The order of the topics is mostly in the same order as the chapters of
1414
this book.
1515

1616

@@ -43,41 +43,41 @@ there might be the necessity to consider Incremental GC.
4343

4444
h3. Implementation of parser
4545

46-
As we saw in Part 2, the implementation of @ruby@ parser has already utilized
47-
@yacc@'s ability to almost its limit, thus I can't think it can endure further
46+
As we saw in Part 2, the implementation of `ruby` parser has already utilized
47+
`yacc`'s ability to almost its limit, thus I can't think it can endure further
4848
expansions. It's all right if there's nothing planned to expand,
4949
but a big name "keyword argument" is planned next
5050
and it's sad if we could not express another demanded grammar because of the
51-
limitation of @yacc@.
51+
limitation of `yacc`.
5252

5353

5454
h3. Reuse of parser
5555

56-
Ruby's parser is very complex. In particular, dealing with around @lex_state@
56+
Ruby's parser is very complex. In particular, dealing with around `lex_state`
5757
seriously is very hard. Due to this, embedding a Ruby program or creating a
5858
program to deal with a Ruby program itself is quite difficult.
5959

60-
For example, I'm developing a tool named @racc@,
61-
which is prefixed with R because it is a Ruby-version @yacc@.
62-
With @racc@, the syntax of grammar files are almost the same as @yacc@
60+
For example, I'm developing a tool named `racc`,
61+
which is prefixed with R because it is a Ruby-version `yacc`.
62+
With `racc`, the syntax of grammar files are almost the same as `yacc`
6363
but we can write actions in Ruby.
6464
To do so, it could not determine the end of an action without parsing Ruby code
6565
properly, but "properly" is very difficult. Since there's no other choice,
6666
currently I've compromised at the level that it can parse "almost all".
6767

6868
As another example which requires analyzing Ruby program,
69-
I can enumerate some tools like @indent@ and @lint@,
69+
I can enumerate some tools like `indent` and `lint`,
7070
but creating such tool also requires a lot efforts.
7171
It would be desperate if it is something complex like a refactoring tool.
7272

7373
Then, what can we do? If we can't recreate the same thing,
74-
what if @ruby@'s original parser can be used as a component?
74+
what if `ruby`'s original parser can be used as a component?
7575
In other words, making the parser itself a library.
7676
This is a feature we want by all means.
7777

78-
However, what becomes problem here is, as long as @yacc@ is used,
78+
However, what becomes problem here is, as long as `yacc` is used,
7979
we cannot make parser reentrant.
80-
It means, say, we cannot call @yyparse()@ recursively,
80+
It means, say, we cannot call `yyparse()` recursively,
8181
and we cannot call it from multiple threads.
8282
Therefore, it should be implemented in the way of not returning control to Ruby
8383
while parsing.
@@ -86,33 +86,33 @@ while parsing.
8686

8787
h3. Hiding Code
8888

89-
With current @ruby@, it does not work without the source code of the program to
89+
With current `ruby`, it does not work without the source code of the program to
9090
run. Thus, people who don't want others to read their source code might have
9191
trouble.
9292

9393

9494
h3. Interpretor Object
9595

96-
Currently each process cannot have multiple @ruby@ interpretors,
96+
Currently each process cannot have multiple `ruby` interpretors,
9797
this was discussed in Chapter 13.
9898
If having multiple interpretors is practically possible, it seems better,
9999
but is it possible to implement such thing?
100100

101101

102102
h3. The structure of evaluator
103103

104-
Current @eval.c@ is, above all, too complex.
104+
Current `eval.c` is, above all, too complex.
105105
Embedding Ruby's stack frames to machine stack could occasionally become the
106-
source of trouble, using @setjmp() longjmp()@ aggressively makes it less easy to
106+
source of trouble, using `setjmp() longjmp()` aggressively makes it less easy to
107107
understand and slows down its speed.
108-
Particularly with RISC machine, which has many registers, using @setjmp()@
109-
aggressively can easily cause slowing down because @setjmp()@ set aside all
108+
Particularly with RISC machine, which has many registers, using `setjmp()`
109+
aggressively can easily cause slowing down because `setjmp()` set aside all
110110
things in registers.
111111

112112

113113
h3. The performance of evaluator
114114

115-
@ruby@ is already enough fast for ordinary use.
115+
`ruby` is already enough fast for ordinary use.
116116
But aside from it, regarding a language processor,
117117
definitely the faster is the better.
118118
To achieve better performance, in other words to optimize,
@@ -136,17 +136,17 @@ So I profiled.
136136

137137
This is a profile when running some application but
138138
this is approximately the profile of a general Ruby program.
139-
@rb_eval()@ appeared in the overwhelming percentage being at the top,
139+
`rb_eval()` appeared in the overwhelming percentage being at the top,
140140
after that, in addition to functions of GC, evaluator core,
141141
functions that are specific to the program are mixed.
142142
For example, in the case of this application,
143-
it takes a lot of time for regular expression match (@ruby_re_match@).
143+
it takes a lot of time for regular expression match (`ruby_re_match`).
144144

145145
However, even if we understood this, the question is how to improve it.
146-
To think simply, it can be archived by making @rb_eval()@ faster.
147-
That said, but as for @ruby@ core, there are almost not any room which can be
148-
easily optimized. For instance, apparently "tail recursive -> @goto@ conversion"
149-
used in the place of @NODE_IF@ and others has already applied almost all
146+
To think simply, it can be archived by making `rb_eval()` faster.
147+
That said, but as for `ruby` core, there are almost not any room which can be
148+
easily optimized. For instance, apparently "tail recursive -> `goto` conversion"
149+
used in the place of `NODE_IF` and others has already applied almost all
150150
possible places it can be applied.
151151
In other words, without changing the way of thinking fundamentally,
152152
there's no room to improve.
@@ -156,7 +156,7 @@ h3. The implementation of thread
156156

157157
This was also discussed in Chapter 19. There are really a lot of issues about
158158
the implementation of the current ruby's thread. Particularly, it cannot mix
159-
with native threads so badly. The two great advantages of @ruby@'s thread,
159+
with native threads so badly. The two great advantages of `ruby`'s thread,
160160
(1) high portability (2) the same behavior everywhere,
161161
are definitely incomparable, but probably that implementation is something we
162162
cannot continue to use eternally, isn't it?

0 commit comments

Comments
 (0)
Please sign in to comment.