Skip to content

Commit 44c7201

Browse files
committed
Remove leading $ for shell commands to be consistent with the website
* This also makes it much easier to copy-paste the commands. * Keep it when a snippet mixes command line and output.
1 parent 3a39f77 commit 44c7201

21 files changed

+153
-153
lines changed

doc/contributor/benchmarking.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
First build TruffleRuby and include the GraalVM Compiler:
66

77
```bash
8-
$ jt build --env native
8+
jt build --env native
99
# or
10-
$ jt build --env jvm-ce
10+
jt build --env jvm-ce
1111
```
1212

1313
See [The "Building" section of the Contributor Workflow document](workflow.md#Building) for details on the different
@@ -17,9 +17,9 @@ that performs JIT compilation for Ruby, though that can of course be benchmarked
1717
Then run the benchmark, for instance:
1818

1919
```bash
20-
$ jt --use native benchmark bench/classic/mandelbrot.rb --simple
20+
jt --use native benchmark bench/classic/mandelbrot.rb --simple
2121
# or
22-
$ jt --use jvm-ce benchmark bench/classic/mandelbrot.rb --simple
22+
jt --use jvm-ce benchmark bench/classic/mandelbrot.rb --simple
2323
```
2424

2525
Output is iterations per second, printed roughly every second (more frequently
@@ -34,9 +34,9 @@ minimal dependencies, which can be useful to debug or tune performance.
3434
Run the fixed-workload harness with minimal dependencies with:
3535

3636
```bash
37-
$ jt --use native ruby bench/optcarrot/fixed-workload.rb
37+
jt --use native ruby bench/optcarrot/fixed-workload.rb
3838
# or
39-
$ jt --use jvm-ce ruby bench/optcarrot/fixed-workload.rb
39+
jt --use jvm-ce ruby bench/optcarrot/fixed-workload.rb
4040
```
4141

4242
# Benchmarking Other Implementations
@@ -45,6 +45,6 @@ You can benchmark an entirely different implementation using the `--use` option
4545
or with the `RUBY_BIN` environment variable.
4646

4747
```bash
48-
$ jt --use ruby benchmark bench/classic/mandelbrot.rb --simple
49-
$ RUBY_BIN=ruby jt benchmark bench/classic/mandelbrot.rb --simple
48+
jt --use ruby benchmark bench/classic/mandelbrot.rb --simple
49+
RUBY_BIN=ruby jt benchmark bench/classic/mandelbrot.rb --simple
5050
```

doc/contributor/cexts.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ There are various ways to test C extensions.
66
Here is a list going from testing single functions to testing Bundler.
77

88
```bash
9-
$ jt test :capi
10-
$ jt test :truffle_capi
11-
$ jt test :library_cext
12-
$ jt test mri --all-sulong
13-
$ jt test cexts
14-
$ jt test bundle
9+
jt test :capi
10+
jt test :truffle_capi
11+
jt test :library_cext
12+
jt test mri --all-sulong
13+
jt test cexts
14+
jt test bundle
1515
```
1616

1717
Note: the last 2 currently require the gem test pack.
@@ -29,7 +29,7 @@ jt cextc bench/chunky_png/oily_png
2929
Then follow the instructions for benchmarking above, and then try:
3030

3131
```bash
32-
$ USE_CEXTS=true TRUFFLERUBYOPT="--experimental-options --cexts-log-load" jt benchmark bench/chunky_png/chunky-color-r.rb --simple
32+
USE_CEXTS=true TRUFFLERUBYOPT="--experimental-options --cexts-log-load" jt benchmark bench/chunky_png/chunky-color-r.rb --simple
3333
```
3434

3535
These benchmarks have Ruby fallbacks, so we should carefully check that the

doc/contributor/docker.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ built to use TruffleRuby.
1616
For example, to run a full set of tests on a set of new release candidate tarballs:
1717

1818
```bash
19-
$ jt docker test --graalvm graalvm-ce.tar.gz llvm-toolchain-installable.jar:ruby-installable-ce.jar --test release_branch
20-
$ jt docker test --graalvm graalvm-ee.tar.gz llvm-toolchain-installable.jar:ruby-installable-ee.jar --test release_branch
21-
$ jt docker test --graalvm graalvm-ee.tar.gz llvm-toolchain-installable.jar:ruby-installable-ee.jar --rebuild-images native-image-installable-ee.jar --test release_branch
22-
$ jt docker test --standalone truffleruby-linux-amd64.tar.gz --test release_branch
19+
jt docker test --graalvm graalvm-ce.tar.gz llvm-toolchain-installable.jar:ruby-installable-ce.jar --test release_branch
20+
jt docker test --graalvm graalvm-ee.tar.gz llvm-toolchain-installable.jar:ruby-installable-ee.jar --test release_branch
21+
jt docker test --graalvm graalvm-ee.tar.gz llvm-toolchain-installable.jar:ruby-installable-ee.jar --rebuild-images native-image-installable-ee.jar --test release_branch
22+
jt docker test --standalone truffleruby-linux-amd64.tar.gz --test release_branch
2323
```
2424

2525
## Distributions
@@ -62,7 +62,7 @@ as repository URLs being cached that become unavailable). Therefore we recommend
6262
regularly clearing your Docker cache.
6363

6464
```bash
65-
$ docker system prune -a -f
65+
docker system prune -a -f
6666
```
6767

6868
## Version incompatibilities

doc/contributor/native-image.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ startup performance than MRI.
5858
Run on Linux with an Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz with a SSD.
5959

6060
```bash
61-
$ cd graalvm-ce-1.0.0-rc15
62-
$ bin/ruby -e 'puts "Hello"' # TruffleRuby on the SVM
63-
$ bin/ruby --jvm -e 'puts "Hello"' # TruffleRuby on the JVM
61+
cd graalvm-ce-1.0.0-rc15
62+
bin/ruby -e 'puts "Hello"' # TruffleRuby on the SVM
63+
bin/ruby --jvm -e 'puts "Hello"' # TruffleRuby on the JVM
6464

65-
$ chruby ruby-2.6.2
66-
$ ruby -e 'puts "Hello"'
65+
chruby ruby-2.6.2
66+
ruby -e 'puts "Hello"'
6767

68-
$ chruby rbx-3.107
69-
$ rbx -e 'puts "Hello"'
68+
chruby rbx-3.107
69+
rbx -e 'puts "Hello"'
7070

71-
$ chruby jruby-9.2.7.0
72-
$ jruby -e 'puts "Hello"'
71+
chruby jruby-9.2.7.0
72+
jruby -e 'puts "Hello"'
7373
```
7474

7575
The real time and the maximum resident set size are measured with a custom
@@ -84,7 +84,7 @@ the Native Image version of TruffleRuby using a tool distributed as part of Graa
8484
the Java version of TruffleRuby from GraalVM.
8585

8686
```bash
87-
$ native-image -H:Name=native-ruby --language:ruby
87+
native-image -H:Name=native-ruby --language:ruby
8888
```
8989

9090
`native-ruby` is the output file name.
@@ -93,7 +93,7 @@ You can build a native build of TruffleRuby using the Native Image Tool from a
9393
source distribution using:
9494

9595
```bash
96-
$ jt build --env native
96+
jt build --env native
9797
```
9898

9999
The disadvantages of the Native Image version of TruffleRuby are:

doc/contributor/profiling.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ handled by the `open` command on macOS and the `xdg-open` command on Linux.
2727
To illustrate, here's a command for profiling and inline script.
2828

2929
```bash
30-
$ jt profile -e "x = 'abc'; 100_000.times { x.upcase }"
30+
jt profile -e "x = 'abc'; 100_000.times { x.upcase }"
3131
```
3232

3333
Here's a command for profiling the `gem list` command:
3434

3535
```bash
36-
$ jt profile -S gem list
36+
jt profile -S gem list
3737
```
3838

3939
#### The Less Easy Way
@@ -48,7 +48,7 @@ Creating the flame graph is a multi-stage process. First, we need to profile the
4848
with the JSON formatter:
4949

5050
```bash
51-
$ jt ruby --cpusampler --cpusampler.SampleInternal --cpusampler.Mode=roots --cpusampler.Output=json -e 'p :hello' > simple-app.json
51+
jt ruby --cpusampler --cpusampler.SampleInternal --cpusampler.Mode=roots --cpusampler.Output=json -e 'p :hello' > simple-app.json
5252
```
5353

5454
Since we want to profile the TruffleRuby runtime itself, we use the
@@ -67,7 +67,7 @@ into TruffleRuby's parent directory. Now you can run the script to transform the
6767
pipe it into the script that will generate the SVG data:
6868

6969
```bash
70-
$ ../FlameGraph/stackcollapse-graalvm.rb simple-app.json | ../FlameGraph/flamegraph.pl > simple-app.svg
70+
../FlameGraph/stackcollapse-graalvm.rb simple-app.json | ../FlameGraph/flamegraph.pl > simple-app.svg
7171
```
7272

7373
At this point, you should open the SVG file in a Chromium-based web browser. Your system

doc/contributor/static-analysis.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ code. We occasionally run this tool locally but only take its output as a
1212
suggestion. We use a default configuration.
1313

1414
```bash
15-
$ scan-build --use-analyzer `which clang` -analyze-headers clang -c --std=c99 -Ilib/cext/include src/main/c/cext/ruby.c src/main/c/truffleposix/truffleposix.c
16-
$ scan-view ...as instructed by scan-build...
15+
scan-build --use-analyzer `which clang` -analyze-headers clang -c --std=c99 -Ilib/cext/include src/main/c/cext/ruby.c src/main/c/truffleposix/truffleposix.c
16+
scan-view ...as instructed by scan-build...
1717
```
1818

1919
## Java
@@ -24,7 +24,7 @@ We have a tool to check that some use of our internal annotations and the
2424
Truffle DSL are correct. Passing this is enforced in our CI gate.
2525

2626
```bash
27-
$ jt check_dsl_usage
27+
jt check_dsl_usage
2828
```
2929

3030
### CheckStyle
@@ -33,7 +33,7 @@ $ jt check_dsl_usage
3333
Passing CheckStyle is enforced in our CI gate.
3434

3535
```bash
36-
$ mx checkstyle
36+
mx checkstyle
3737
```
3838

3939
### SpotBugs
@@ -43,7 +43,7 @@ errors. We run it with the default Graal project configuration. Passing
4343
SpotBugs is enforced in our CI gate.
4444

4545
```bash
46-
$ mx spotbugs
46+
mx spotbugs
4747
```
4848

4949
## Ruby
@@ -55,7 +55,7 @@ It's configured in `.rubocop.yml`, and can be run locally as `jt rubocop`.
5555
Passing Rubocop is enforced in our CI gate.
5656

5757
```bash
58-
$ jt rubocop
58+
jt rubocop
5959
```
6060

6161
### Fasterer
@@ -65,8 +65,8 @@ performance improvements. We occasionally run this tool locally but only take
6565
its output as a suggestion. We use a default configuration.
6666

6767
```bash
68-
$ gem install fasterer
69-
$ fasterer lib/truffle lib/cext src/main
68+
gem install fasterer
69+
fasterer lib/truffle lib/cext src/main
7070
```
7171

7272
### Reek
@@ -79,8 +79,8 @@ we're implementing a set API, because we're doing something low-level or
7979
outside normal Ruby semantics, or for performance reasons.
8080

8181
```bash
82-
$ gem install reek
83-
$ reek lib/truffle lib/cext src/main
82+
gem install reek
83+
reek lib/truffle lib/cext src/main
8484
```
8585

8686
### Flog
@@ -90,8 +90,8 @@ check that your methods do not appear near the top of this list. We
9090
occasionally run this tool locally but only take its output as a suggestion.
9191

9292
```bash
93-
$ gem install flog
94-
$ flog -m -t 10 lib/truffle lib/cext src/main
93+
gem install flog
94+
flog -m -t 10 lib/truffle lib/cext src/main
9595
```
9696

9797
### Flay
@@ -101,8 +101,8 @@ could potentially be factored out. We occasionally run this tool locally but
101101
only take its output as a suggestion.
102102

103103
```bash
104-
$ gem install flay
105-
$ flay lib/truffle lib/cext src/main
104+
gem install flay
105+
flay lib/truffle lib/cext src/main
106106
```
107107

108108
### Brakeman
@@ -113,6 +113,6 @@ specific to Rails, but we do run it ocassionally anyway and take its output as
113113
a suggestion.
114114

115115
```bash
116-
$ gem install brakeman
117-
$ brakeman --force-scan --run-all-checks --interprocedural --no-pager --add-libs-path src --only-files lib/truffle/,lib/cext/,src/main/ruby/truffleruby/
116+
gem install brakeman
117+
brakeman --force-scan --run-all-checks --interprocedural --no-pager --add-libs-path src --only-files lib/truffle/,lib/cext/,src/main/ruby/truffleruby/
118118
```

doc/contributor/stdlib.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ TruffleRuby in the future, as some default gems we use differ from the originals
124124

125125
To list default gems, use:
126126
```
127-
$ gem list | grep default:
127+
gem list | grep default:
128128
```
129129

130130
### Bundled gems
131131

132132
The list of bundled gems is available in MRI under `gems/bundled_gems`
133133
```
134-
$ cat gems/bundled_gems
134+
cat gems/bundled_gems
135135
```
136136

137137
* `did_you_mean` 1.3.0 (helper to suggest method names on method missing)

doc/contributor/updating-jruby-parser.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ First, checkout JRuby in `../jruby`.
88
TruffleRuby's version of the parser:
99

1010
```bash
11-
$ ruby tool/parser_renames.rb < ../jruby/core/src/main/java/org/jruby/parser/RubyParser.y > src/main/java/org/truffleruby/parser/parser/RubyParser.y
11+
ruby tool/parser_renames.rb < ../jruby/core/src/main/java/org/jruby/parser/RubyParser.y > src/main/java/org/truffleruby/parser/parser/RubyParser.y
1212
```
1313

1414
Use it like `tool/import-mri-files.sh` is used in [Updating Ruby](updating-ruby.md).

doc/contributor/updating-ruby-installers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ maintained in the [ruby-versions](https://github.com/postmodern/ruby-versions) r
2828
There is a handy script in the repo that does everything needed:
2929

3030
```bash
31-
$ ./update.sh truffleruby $VERSION
31+
./update.sh truffleruby $VERSION
3232
```
3333

3434
cc `@havenwood` in the PR description.
@@ -38,7 +38,7 @@ cc `@havenwood` in the PR description.
3838
There is a script in the repo that does everything needed:
3939

4040
```bash
41-
$ script/update-truffleruby $VERSION ../ruby-versions/pkg
41+
script/update-truffleruby $VERSION ../ruby-versions/pkg
4242
```
4343

4444
cc `@hsbt` in the PR description.
@@ -52,7 +52,7 @@ Once pushed/merged to master, it's a good idea to create a `ruby-build` release,
5252
so `ruby-build` Homebrew users can get the new TruffleRuby release too:
5353

5454
```bash
55-
$ script/release
55+
script/release
5656
```
5757

5858
See [this comment](https://github.com/rbenv/ruby-build/pull/1318#issuecomment-548399571) for details.
@@ -62,7 +62,7 @@ See [this comment](https://github.com/rbenv/ruby-build/pull/1318#issuecomment-54
6262
There is a script in the repo that does everything needed:
6363

6464
```bash
65-
$ ruby update-truffleruby.rb $VERSION ../ruby-versions/pkg
65+
ruby update-truffleruby.rb $VERSION ../ruby-versions/pkg
6666
```
6767

6868
The script must be run after running the `ruby-versions` script above.

doc/contributor/updating-ruby.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Check out the version of Ruby you want to create the branch for in `../ruby`.
1818
Then create the reference branch in the TruffleRuby repository
1919

2020
```bash
21-
$ git checkout -b vNN
22-
$ tool/import-mri-files.sh
23-
$ git commit -am 'vNN'
21+
git checkout -b vNN
22+
tool/import-mri-files.sh
23+
git commit -am 'vNN'
2424
```
2525

2626
You can then compare between these two branches and yours. For example to see
@@ -36,8 +36,8 @@ In your working branch you can import MRI files again, and you can re-apply
3636
old patches using the old reference branch.
3737

3838
```bash
39-
$ tool/import-mri-files.sh
40-
$ git revert vNN
39+
tool/import-mri-files.sh
40+
git revert vNN
4141
```
4242

4343
You'll usually get some conflicts to work out.

doc/contributor/using-eclipse.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ need a full rebuild. For these reason, we recommend
1616
First, make sure the project is already built from the command line:
1717

1818
```bash
19-
$ jt build
19+
jt build
2020
```
2121

2222
## Generate the Project Files
2323

2424
```bash
25-
$ jt mx eclipseinit
25+
jt mx eclipseinit
2626
```
2727

2828
## Import the Projects
@@ -44,6 +44,6 @@ There should be now 4 projects in your workspace:
4444
## Running from the Eclipse Files Directly
4545

4646
```bash
47-
$ jt ruby -e 'p Truffle'
47+
jt ruby -e 'p Truffle'
4848
Truffle
4949
```

0 commit comments

Comments
 (0)