Skip to content

Commit 48f1b26

Browse files
committed
Revert 2nd edition content accidentally pushed to public repo
Removes JIT chapter, 2nd edition cover/publishing assets, edition-specific Makefile targets, and related config that were accidentally force-pushed to the public repository. Restores default build target to pdf-a4 (1st edition).
1 parent d9dbd87 commit 48f1b26

35 files changed

Lines changed: 120 additions & 2431 deletions

.gitignore

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,3 @@ images/diag-*.png
2727
site
2828
.asciidoctor
2929
.DS_Store
30-
/VERSION
31-
/images/cover.jpg
32-
/vendor/
33-
/.bundle/
34-
/Gemfile.lock
35-
CLAUDE.local.md
36-
.mcp.json
37-
/backlog/
38-
/output/
39-
publishing/missfont.log
40-
beam-book-2nded.pdf
41-
beam-book-2nded-content.pdf
42-
back_of_cover.pdf
43-
back_jacket.pdf

CLAUDE.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

EDITION_STRATEGY.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

Makefile

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
ASSET_CHAPTERS = $(shell find chapters -type f)
2-
VERSION = 1.0.$(shell git rev-list v1.0..HEAD --count)
32

4-
.PHONY: all pdf pdf-a4 pdf-publish pdf-2nded epub html docker docker-build clean serve
3+
.PHONY: all pdf pdf-a4 pdf-publish epub html docker docker-build clean serve
54

6-
all: pdf-2nded
5+
all: pdf-a4 html
76

8-
pdf: pdf-2nded
7+
pdf: pdf-a4
98

109
pdf-a4: beam-book-a4.pdf
1110

1211
pdf-publish: beam-book-publish.pdf
1312

14-
pdf-2nded: beam-book-2nded.pdf
15-
1613
chapters/contributors.txt:
1714
{ \
1815
echo '[cols="3*",frame=none,grid=none]'; \
@@ -44,10 +41,9 @@ beam-book-a4.pdf: style/pdf-online-theme.yml style/pdf-theme.yml chapters/opcode
4441
-a source-highlighter=rouge \
4542
-a rouge-style=pastie \
4643
-a rouge-linenums-mode=table \
47-
-a version=$(VERSION) \
4844
online-book.asciidoc -o $@
4945

50-
# Print-ready 6×9 for PoD (1st edition format)
46+
# Print-ready 6×9 for PoD
5147
pub: beam-book-publish.pdf
5248

5349
beam-book-publish.pdf: style/custom-print-highlight-theme.yml style/pdf-publish-theme.yml chapters/opcodes_doc.asciidoc print-book.asciidoc book.asciidoc chapters/contributors.txt $(ASSET_CHAPTERS) style/pdf-theme.yml
@@ -59,33 +55,8 @@ beam-book-publish.pdf: style/custom-print-highlight-theme.yml style/pdf-publish-
5955
-a source-highlighter=rouge \
6056
-a rouge-style=pastie \
6157
-a rouge-linenums-mode=table \
62-
-a version=$(VERSION) \
63-
print-book.asciidoc -o $@ --trace
64-
65-
# 2nd edition 7.5×9.25 format (content only, used by workspace Makefile)
66-
beam-book-2nded-content.pdf: style/custom-print-highlight-theme.yml style/pdf-2nded-theme.yml chapters/opcodes_doc.asciidoc print-book.asciidoc book.asciidoc chapters/contributors.txt $(ASSET_CHAPTERS) style/pdf-theme.yml
67-
bundle exec asciidoctor-pdf -r asciidoctor-diagram \
68-
-r ./style/custom-pdf-converter.rb \
69-
-r ./style/custom-admonition-block.rb \
70-
-a config=./style/ditaa.cfg \
71-
-a pdf-fontsdir=./style/fonts \
72-
-a source-highlighter=rouge \
73-
-a rouge-style=pastie \
74-
-a rouge-linenums-mode=table \
75-
-a pdf-themesdir=style \
76-
-a pdf-theme=pdf-2nded \
77-
-a version=$(VERSION) \
7858
print-book.asciidoc -o $@ --trace
7959

80-
# 2nd edition complete book with cover and back jacket
81-
beam-book-2nded.pdf: beam-book-2nded-content.pdf cover.pdf publishing/back_of_cover.md publishing/back_jacket.md
82-
pandoc -f markdown+raw_tex+yaml_metadata_block --pdf-engine=xelatex \
83-
-o back_of_cover.pdf publishing/back_of_cover.md
84-
pandoc -f markdown+raw_tex+yaml_metadata_block --pdf-engine=xelatex \
85-
-o back_jacket.pdf publishing/back_jacket.md
86-
pdfunite cover.pdf back_of_cover.pdf beam-book-2nded-content.pdf back_jacket.pdf $@
87-
rm -f back_of_cover.pdf back_jacket.pdf
88-
8960
# EPUB version
9061
epub: beam-book.epub
9162

@@ -95,7 +66,6 @@ beam-book.epub: chapters/opcodes_doc.asciidoc epub-book.asciidoc book.asciidoc c
9566
-a config=./style/ditaa.cfg \
9667
-a source-highlighter=rouge \
9768
-a rouge-style=pastie \
98-
-a version=$(VERSION) \
9969
epub-book.asciidoc -o $@ --trace
10070

10171

@@ -106,8 +76,7 @@ html: chapters/contributors.txt $(ASSET_CHAPTERS)
10676
-o site/index.html online-book.asciidoc --trace \
10777
-a source-highlighter=rouge \
10878
-a rouge-style=thankful_eyes \
109-
-a rouge-linenums-mode=table \
110-
-a version=$(VERSION)
79+
-a rouge-linenums-mode=table
11180
rsync -R code/*/*.png site
11281

11382
code/book/ebin/generate_op_doc.beam: code/book/src/generate_op_doc.erl

VERSION_2E

Lines changed: 0 additions & 1 deletion
This file was deleted.

book.asciidoc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ under the Creative Commons license. This printed edition is provided for conveni
5454
For more information on the Creative Commons license, visit:
5555
link:https://creativecommons.org/licenses/by/4.0/[].
5656

57-
Second Edition, 2026 — Version {version} +
58-
ISBN: TBD
57+
First Edition, 2025
58+
ISBN: 978-91-531-4253-9
5959
[.text-center]
60-
© 2025-2026 Erik Stenman.
60+
© 2025 Erik Stenman.
6161

6262
// tag::toc[]
6363
[break-before=recto, include-title=true]
@@ -99,9 +99,6 @@ include::chapters/calls.asciidoc[]
9999
[break-before=recto,leveloffset=+1,include-title=true]
100100
include::chapters/beam_loader.asciidoc[]
101101

102-
[break-before=recto,leveloffset=+1,include-title=true]
103-
include::chapters/jit.asciidoc[]
104-
105102
[break-before=recto,leveloffset=+1,include-title=true]
106103
include::chapters/scheduling.asciidoc[]
107104

chapters/beam.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ a deallocate instruction, and the function is done.
293293

294294
=== The BEAM Interpreter
295295

296-
NOTE: This section is not about the ((JIT)) compiler (see xref:CH-JIT[]),
297-
which is the newer way of executing BEAM code but which only runs on
298-
supported platforms, but about the BEAM instruction interpreter which
299-
has been around for much longer and works on all platforms.
296+
NOTE: This section is not about the ((JIT)) compiler, which is the newer
297+
way of executing BEAM code but which only runs on supported platforms, but
298+
about the BEAM instruction interpreter which has been around for much
299+
longer and works on all platforms.
300300

301301
The BEAM ((interpreter)) is implemented with a technique called _((direct
302302
threaded code))_(((threaded code))). In this context the word _threaded_

chapters/beam_instructions.asciidoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ Erlang code for the compiler (beam_opcodes.hrl and beam_opcodes.erl) and to
4848
generate C code for the emulator (beam_opcodes.c and beam_opcodes.h; for
4949
the traditional BEAM interpreter beam_hot.h, beam_warm.h, beam_cold.h are
5050
also generated; and for BeamAsm beamasm_emit.h and beamasm_protos.h are
51-
generated). See xref:CH-JIT[] for how the JIT uses these generated files
52-
to dispatch each BEAM instruction to its native code emitter.
51+
generated).
5352

5453
Any line in the file starting with "#" is a comment and ignored by
5554
`beam_makeops`. The file can contain definitions, which turns into a

chapters/beam_modules.asciidoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,9 @@ TypeChunk = <<
493493
----
494494

495495
The Type chunk holds simplified type information used by the JIT compiler
496-
for optimization (see xref:CH-JIT[] for how BeamAsm uses this information
497-
to specialize generated code). Each type entry is a fixed 16-byte record.
498-
The data is not in Erlang external term format, so it cannot be decoded
499-
with `binary_to_term`. See `beam_types.erl` in the compiler for the
500-
encoding.
496+
for optimization. Each type entry is a fixed 16-byte record. The data is
497+
not in Erlang external term format, so it cannot be decoded with
498+
`binary_to_term`. See `beam_types.erl` in the compiler for the encoding.
501499

502500
Parsing:
503501

chapters/compiler.asciidoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,7 @@ not expect it to be stable.
701701
The last stage of a normal compilation is the external BEAM assembly code
702702
format, as a sequence of individual BEAM instructions represented as Erlang
703703
terms. Some low level optimizations such as dead code elimination and peep
704-
hole optimisations are done on this level. The compiler also performs type
705-
analysis and alias analysis during the SSA passes and records the results
706-
in the Type chunk of the `.beam` file. The JIT compiler uses this type
707-
information to specialize the generated native code (see xref:CH-JIT[]).
704+
hole optimisations are done on this level.
708705

709706
The BEAM code is described in detail in
710707
xref:CH-Instructions[] and xref:AP-Instructions[]

0 commit comments

Comments
 (0)