This document is dedicated to the process of developing *Serene*. It contains a collection of resources
from the early days of the project and resources that need to be studied and A list of tasks and features
that needs to be done. This document is written using [[https://orgmode.org/][org-mode]]. You can use [[https://emacsclub.github.io/html/org_tutorial.html#sec-7][this cheatsheet]] as a quick guide
for the format but you will get more out of it using org-mode.
For a generic list of resources on compiler design take a look at
[[https://tomassetti.me/resources-create-programming-languages/][the list of resource to create a programming language]] and [[https://www.reddit.com/r/ProgrammingLanguages/comments/8ggx2n/is_llvm_a_good_backend_for_functional_languages/][this list]]
- [[https://blog.llvm.org/posts/2020-11-30-interactive-cpp-with-cling/][Interactive C++ with Cling]]
- [[https://www.wilfred.me.uk/blog/2015/02/21/my-first-llvm-compiler/][My First LLVM Compiler]]
- [[https://mukulrathi.co.uk/create-your-own-programming-language/llvm-ir-cpp-api-tutorial/][A Complete Guide to LLVM for Programming Language Creators]]
- [[https://reader.elsevier.com/reader/sd/pii/0167642394000042?token=CEFF5C5D1B03FD680762FC4889A14C0CA2BB28FE390EC51099984536E12AC358F3D28A5C25C274296ACBBC32E5AE23CD][Dynamic typing: syntax and proof theory]]
- [[https://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.4394][Representing Type Information in Dynamically Typed Languages]]
- [[https://www.researchgate.net/publication/259634489_An_empirical_study_on_the_impact_of_static_typing_on_software_maintainability][An empirical study on the impact of static typing on software maintainability]]
- [[https://medium.com/@ankur_anand/a-visual-guide-to-golang-memory-allocator-from-ground-up-e132258453ed][A visual guide to Go Memory Allocator from scratch (Golang)]]
** Concurrency
- [[https://www.ardanlabs.com/blog/2018/08/scheduling-in-go-part1.html][Scheduling In Go (Series)]]
** Garbage collection
- [[https://v8.dev/blog/high-performance-cpp-gc][GC on V8]]
- [[https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf][Perceus: Garbage Free Reference Counting with Reuse]]
** JIT
- [[https://asmjit.com/][Machine code generator for C++]]
** Compiler
- [[https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64][Stack frame layout on x86-64]]
*** Branch instructions
It would be cool to have macro to instruct the compiler about the likelyhood
of a branch in a conditional. Something similar to kernel's *likely* and *unlikely*
macros
*** Execution Instrumentation
The compiler should be able to embed some code in the program to collect data about
the different execution paths or function instrumentation and other useful data the
can help the compiler to optimize the program even further. For example Imagine a
scenario which we compile a program with out any optimization ( in debug mode ) and
using some test cases or real usage of the program in several iteration we collect
data about the compiled application in a file (let's call it the ADF short for Analytic
Data File), and the we can pass that ADF file to the compiler to let it compile and optimize
the program by using the usual passes alonge side with some extra passes that operate
on ADF
** Lang
*** Scheme
- [[https://call-cc.org][Chicken Scheme - Easy-to-use compiler and interpreter, with lots of libraries]]
- [[https://github.com/barak/stalin][Stalin - Brutally optimizing Scheme compiler, with lots of optimization flags]]
** Utilities
- [[https://www.ralfj.de/blog/2020/12/14/provenance.html][Pointers Are Complicated]]
*** Emacs mode
- [[https://www.wilfred.me.uk/blog/2015/03/19/adding-a-new-language-to-emacs/][Adding A New Language to Emacs]]
- [[https://www.wilfred.me.uk/blog/2014/09/27/the-definitive-guide-to-syntax-highlighting/][The Definitive Guide To Syntax Highlighting]]