Next step: writes notes for a new article. ;)
This commit is contained in:
79
Makefile
Normal file
79
Makefile
Normal file
@@ -0,0 +1,79 @@
|
||||
######################################################################
|
||||
# A simple makefile to generate notes as epub/pdf/html/plaintext
|
||||
# it requires gnumakefile, a shell, grep and pandoc (with pdf support)
|
||||
######################################################################
|
||||
BUILD_DIR ?= _build/notes
|
||||
NOTES_DIR ?= notes
|
||||
NOTES = $(shell ls $(NOTES_DIR) | grep -E "^[0-9]+-")
|
||||
PANDOC_OPTS = -C
|
||||
PANDOC = pandoc $(PANDOC_OPTS)
|
||||
|
||||
######################################################################
|
||||
# template to generate the targets
|
||||
######################################################################
|
||||
define pandoc_template =
|
||||
NOTES_TARGETS += $$(BUILD_DIR)/$(1).pdf
|
||||
$$(BUILD_DIR)/$(1).pdf:
|
||||
$(PANDOC) -f markdown -t pdf -o $$@ \
|
||||
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||
"$$(NOTES_DIR)/$(1)/README.md"
|
||||
|
||||
NOTES_TARGETS += $$(BUILD_DIR)/$(1).epub
|
||||
$$(BUILD_DIR)/$(1).epub:
|
||||
$(PANDOC) -f markdown -t epub -o $$@ \
|
||||
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||
"$$(NOTES_DIR)/$(1)/README.md"
|
||||
|
||||
NOTES_TARGETS += $$(BUILD_DIR)/$(1).txt
|
||||
$$(BUILD_DIR)/$(1).txt:
|
||||
$(PANDOC) -f markdown -t plain -o $$@ \
|
||||
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||
"$$(NOTES_DIR)/$(1)/README.md"
|
||||
|
||||
NOTES_TARGETS += $$(BUILD_DIR)/$(1).html
|
||||
$$(BUILD_DIR)/$(1).html:
|
||||
$(PANDOC) -f markdown -t html -o $$@ \
|
||||
--resource-path="$$(NOTES_DIR)/$(1)" \
|
||||
"$$(NOTES_DIR)/$(1)/README.md"
|
||||
endef
|
||||
|
||||
######################################################################
|
||||
# default target, used to build automatically the notes
|
||||
######################################################################
|
||||
.PHONY += all
|
||||
all: notes
|
||||
|
||||
######################################################################
|
||||
# create the build directory
|
||||
######################################################################
|
||||
$(BUILD_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
######################################################################
|
||||
# generate all templates based on notes directory name
|
||||
######################################################################
|
||||
$(foreach note,$(NOTES),$(eval $(call pandoc_template,$(note))))
|
||||
|
||||
######################################################################
|
||||
# generate all notes
|
||||
######################################################################
|
||||
.PHONY += notes
|
||||
notes: $(BUILD_DIR) $(NOTES_TARGETS)
|
||||
|
||||
######################################################################
|
||||
# remove all generated articles and notes
|
||||
######################################################################
|
||||
.PHONY += clean
|
||||
clean:
|
||||
rm $(NOTES_TARGETS)
|
||||
|
||||
######################################################################
|
||||
# usage
|
||||
######################################################################
|
||||
help:
|
||||
@echo "Usage: make [help|all|notes|clean]"
|
||||
|
||||
######################################################################
|
||||
# .PHONY target
|
||||
######################################################################
|
||||
.PHONY: $(.PHONY)
|
||||
30
notes/0001-ETF-and-BERT-high-level-implementation/README.md
Normal file
30
notes/0001-ETF-and-BERT-high-level-implementation/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
date: 2023-08-23
|
||||
title: ETF and BERT
|
||||
subtitle: A Clean, Safe and Flexible High Level Serializer in Pure Erlang
|
||||
author: Mathieu Kerjouan
|
||||
keywords: [etf,bert,serialization,implementation]
|
||||
license: CC BY-NC-ND
|
||||
abstract: |
|
||||
Erlang External Term Format, also called Binary Erlang Terms is
|
||||
a format used internally by the BEAM but also by external application,
|
||||
in particular with BERT.
|
||||
todo:
|
||||
- add links to ETF implementation in C
|
||||
- add links to BERT implementation (and BERT-RPC archive)
|
||||
- add usage examples
|
||||
---
|
||||
|
||||
This paper is a draft.
|
||||
|
||||
# ETF and Bert
|
||||
|
||||
# References and Resources
|
||||
|
||||
- [External Term Format Documentation](https://www.erlang.org/doc/apps/erts/erl_ext_dist)
|
||||
|
||||
- [ei C library](https://www.erlang.org/doc/man/ei)
|
||||
|
||||
- [erl_driver C library](https://www.erlang.org/doc/man/erl_driver)
|
||||
|
||||
- [Serialization series — Do you speak Erlang ETF or BERT? (part 1)](https://medium.com/@niamtokik/serialization-series-do-you-speak-erlang-etf-or-bert-part-1-ff70096b50c0)
|
||||
21
notes/README.md
Normal file
21
notes/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Notes and Comments
|
||||
---
|
||||
|
||||
This part of the repository is dedicated for the notes and comments
|
||||
from the developers, to explain the "why" they created something and
|
||||
what was their ideas.
|
||||
|
||||
**All articles MUST be licensed under [CC
|
||||
BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/4.0/)**.
|
||||
|
||||
| Date | Title | Author | Notes |
|
||||
|------------|-----------------------------|--------|-------|
|
||||
| draft | [ETF and BERT High Level Implementation](0001-ETF-and-BERT-high-level-implementation) | Mathieu Kerjouan | R25/R26
|
||||
|
||||
The codes presented in these articles are usually tested under OpenBSD
|
||||
and ParrotLinux (Debian-like distribution) with the latest major
|
||||
release of Erlang (R25 or R26).
|
||||
|
||||
These articles are also available in EPUB, PDF and HTML files. A
|
||||
template is available in [`_template`](_template) directory.
|
||||
11
notes/_template/README.md
Normal file
11
notes/_template/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
date: 2023-02-25
|
||||
title:
|
||||
subtitle:
|
||||
author:
|
||||
keywords:
|
||||
license: CC BY-NC-ND
|
||||
abstract:
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user