Update the dev.org with completed TODOs

This commit is contained in:
Sameer Rahmani 2021-02-22 16:38:49 +00:00
parent 146e68670a
commit 5974fb52cf
1 changed files with 97 additions and 79 deletions

176
dev.org
View File

@ -1,65 +1,75 @@
* Serene's Development Resources #+TITLE: Serene Development
This document is dedicated to collecting useful resources to help us in the development process. #+AUTHOR: Sameer Rahmani
Any thing that might be useful, tools, other languages to look at, inspirations literally anything. Just #+SEQ_TODO: TODO(t/!) NEXT(n/!) BLOCKED(b@/!) | DONE(d%) WONT_DO(c@/!) FAILED(f@/!)
try to find the best heading for them. IF your not familiar with the org mode markup checkout #+TAGS: DOCS(d) EXAMPLES(e) BOOTSTRAP(b) Old(o) Misc(m)
[[https://emacsclub.github.io/html/org_tutorial.html#sec-7][this cheatsheet]]. #+STARTUP: logdrawer logdone logreschedule indent content align constSI entitiespretty nolatexpreview
#+OPTIONS: tex:t
#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Eule
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [a4paper]
#+LATEX_HEADER: \usepackage{tcolorbox}
#+LATEX_HEADER: \usepackage{mathabx}
#+LATEX_HEADER: \newtcolorbox{infobox}[2][]{colback=cyan!5!white,before skip=14pt,after skip=8pt,colframe=cyan!75!black,sharp corners,title={#2},#1}
* Parser * Serene's Development Resources
First of all you need to read [[https://tomassetti.me/guide-parsing-algorithms-terminology/][All you need to know about Parser algorithms]]. This document is dedicated to the process of developing *Serene*. It contains a collection of resources
Then here is the list or parsers that we have considered from the early days of the project and resources that need to be studied and A list of tasks and features
- Rust parser combinator framework :: https://github.com/Geal/nom/ 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
- LR(1) parser generator for Rust :: https://github.com/lalrpop/lalrpop for the format but you will get more out of it using org-mode.
- A parser combinator library for Rust :: https://github.com/Marwes/combine
- Parsing Expression Grammar (PEG) parser generator for Rust :: https://github.com/kevinmehall/rust-peg
- General purpose parser :: https://pest.rs/
* Considerations
** Hashmaps
*** DOS attack
- https://www.anchor.com.au/blog/2012/12/how-to-explain-hash-dos-to-your-parents-by-using-cats/
- https://en.wikipedia.org/wiki/Collision_attack
* Resources * Resources
For a generic list of resources on compiler design take a look at https://tomassetti.me/resources-create-programming-languages/ For a generic list of resources on compiler design take a look at
https://www.reddit.com/r/ProgrammingLanguages/comments/8ggx2n/is_llvm_a_good_backend_for_functional_languages/ [[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]]
** Parser
First of all you need to read [[https://tomassetti.me/guide-parsing-algorithms-terminology/][All you need to know about Parser algorithms]].
Then here is the list or parsers that we have considered
- [[https://github.com/Geal/nom/][Rust parser combinator framework]]
- [[https://github.com/lalrpop/lalrpop][LR(1) parser generator for Rust]]
- [[https://github.com/Marwes/combine][A parser combinator library for Rust]]
- [[https://github.com/kevinmehall/rust-peg][Parsing Expression Grammar (PEG) parser generator for Rust]]
- [[https://pest.rs/][General purpose parser]]
** Lisp ** Lisp
- Make a Lisp :: https://github.com/kanaka/mal/blob/master/process/guide.md - [[https://github.com/kanaka/mal/blob/master/process/guide.md][Make a Lisp]]
*** Quasiquotation *** Quasiquotation
- Backquote in CL :: http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm - [[http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm][Backquote in CL]]
- Backquote spec in Common Lisp the Language, 2nd Edition :: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node367.html - [[https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node367.html][Backquote spec in Common Lisp the Language, 2nd Edition]]
- Backquote and pretty printing :: http://christophe.rhodes.io/notes/blog/posts/2014/backquote_and_pretty_printing/ - [[http://christophe.rhodes.io/notes/blog/posts/2014/backquote_and_pretty_printing/][Backquote and pretty printing]]
** Rust ** Rust
- The Rust book :: https://doc.rust-lang.org/book/ https://www.reddit.com/r/rust/comments/2s1zj2/the_rust_programming_language_book_as_epub/ - [[https://doc.rust-lang.org/book/][The Rust book]] (in [[https://www.reddit.com/r/rust/comments/2s1zj2/the_rust_programming_language_book_as_epub/][EPUB]] format)
** LLVM ** LLVM
- Brief overview of LLVM :: https://www.infoworld.com/article/3247799/what-is-llvm-the-power-behind-swift-rust-clang-and-more.html - [[https://www.infoworld.com/article/3247799/what-is-llvm-the-power-behind-swift-rust-clang-and-more.html][Brief overview of LLVM]]
- A bit in depth details on LLVM :: https://aosabook.org/en/llvm.html - [[https://aosabook.org/en/llvm.html][A bit in depth details on LLVM]]
- Official LLVM tutorial C++ :: https://llvm.org/docs/tutorial/ - [[https://llvm.org/docs/tutorial/][Official LLVM tutorial C++]]
- Interactive C++ with Cling :: https://blog.llvm.org/posts/2020-11-30-interactive-cpp-with-cling/ - [[https://blog.llvm.org/posts/2020-11-30-interactive-cpp-with-cling/][Interactive C++ with Cling]]
- My First LLVM Compiler :: https://www.wilfred.me.uk/blog/2015/02/21/my-first-llvm-compiler/ - [[https://www.wilfred.me.uk/blog/2015/02/21/my-first-llvm-compiler/][My First LLVM Compiler]]
- A Complete Guide to LLVM for Programming Language Creators :: https://mukulrathi.co.uk/create-your-own-programming-language/llvm-ir-cpp-api-tutorial/ - [[https://mukulrathi.co.uk/create-your-own-programming-language/llvm-ir-cpp-api-tutorial/][A Complete Guide to LLVM for Programming Language Creators]]
** Data structures ** Data structures
- Pure functional datastructures papaer :: https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf - [[https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf][Pure functional datastructures papaer]]
- Dynamic typing: syntax and proof theory :: https://reader.elsevier.com/reader/sd/pii/0167642394000042?token=CEFF5C5D1B03FD680762FC4889A14C0CA2BB28FE390EC51099984536E12AC358F3D28A5C25C274296ACBBC32E5AE23CD - [[https://reader.elsevier.com/reader/sd/pii/0167642394000042?token=CEFF5C5D1B03FD680762FC4889A14C0CA2BB28FE390EC51099984536E12AC358F3D28A5C25C274296ACBBC32E5AE23CD][Dynamic typing: syntax and proof theory]]
- Representing Type Information in Dynamically Typed Languages :: https://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.4394 - [[https://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.4394][Representing Type Information in Dynamically Typed Languages]]
- An empirical study on the impact of static typing on software maintainability :: https://www.researchgate.net/publication/259634489_An_empirical_study_on_the_impact_of_static_typing_on_software_maintainability - [[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]]
** Other languages ** Other languages
- Julia: A Fresh Approach toNumerical Computing :: https://julialang.org/research/julia-fresh-approach-BEKS.pdf - [[https://julialang.org/research/julia-fresh-approach-BEKS.pdf][Julia: A Fresh Approach toNumerical Computing]]
** Cranelift ** Cranelift
- Source tree :: https://github.com/bytecodealliance/wasmtime/tree/master/cranelift - [[https://github.com/bytecodealliance/wasmtime/tree/master/cranelift][Source tree]]
** Memory management ** Memory management
- Visualizing memory management in Golang :: https://deepu.tech/memory-management-in-golang/ - [[https://deepu.tech/memory-management-in-golang/][Visualizing memory management in Golang]]
- TCMalloc : Thread-Caching Malloc :: http://goog-perftools.sourceforge.net/doc/tcmalloc.html - [[http://goog-perftools.sourceforge.net/doc/tcmalloc.html][TCMalloc : Thread-Caching Malloc]]
- A visual guide to Go Memory Allocator from scratch (Golang) :: https://medium.com/@ankur_anand/a-visual-guide-to-golang-memory-allocator-from-ground-up-e132258453ed - [[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 ** Concurrency
- Scheduling In Go (Series) :: https://www.ardanlabs.com/blog/2018/08/scheduling-in-go-part1.html - [[https://www.ardanlabs.com/blog/2018/08/scheduling-in-go-part1.html][Scheduling In Go (Series)]]
** Garbage collection ** Garbage collection
- https://v8.dev/blog/high-performance-cpp-gc - [[https://v8.dev/blog/high-performance-cpp-gc][GC on V8]]
- Perceus: Garbage Free Reference Counting with Reuse :: https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf - [[https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf][Perceus: Garbage Free Reference Counting with Reuse]]
** JIT ** JIT
- https://asmjit.com/ - [[https://asmjit.com/][Machine code generator for C++]]
** Compiler ** Compiler
- Stack frame layout on x86-64 :: https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64 - [[https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64][Stack frame layout on x86-64]]
*** Branch instructions *** Branch instructions
It would be cool to have macro to instruct the compiler about the likelyhood 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* of a branch in a conditional. Something similar to kernel's *likely* and *unlikely*
@ -76,63 +86,71 @@ the program by using the usual passes alonge side with some extra passes that op
on ADF on ADF
** Lang ** Lang
*** Scheme *** Scheme
- Chicken Scheme - Easy-to-use compiler and interpreter, with lots of libraries :: https://call-cc.org - [[https://call-cc.org][Chicken Scheme - Easy-to-use compiler and interpreter, with lots of libraries]]
- Stalin - Brutally optimizing Scheme compiler, with lots of optimization flags :: https://github.com/barak/stalin - [[https://github.com/barak/stalin][Stalin - Brutally optimizing Scheme compiler, with lots of optimization flags]]
** Utilities ** Utilities
- Pointers Are Complicated :: https://www.ralfj.de/blog/2020/12/14/provenance.html - [[https://www.ralfj.de/blog/2020/12/14/provenance.html][Pointers Are Complicated]]
*** Emacs mode *** Emacs mode
- Adding A New Language to Emacs :: https://www.wilfred.me.uk/blog/2015/03/19/adding-a-new-language-to-emacs/ - [[https://www.wilfred.me.uk/blog/2015/03/19/adding-a-new-language-to-emacs/][Adding A New Language to Emacs]]
- The Definitive Guide To Syntax Highlighting :: https://www.wilfred.me.uk/blog/2014/09/27/the-definitive-guide-to-syntax-highlighting/ - [[https://www.wilfred.me.uk/blog/2014/09/27/the-definitive-guide-to-syntax-highlighting/][The Definitive Guide To Syntax Highlighting]]
* Considerations
** Hashmaps
*** DOS attack
- https://www.anchor.com.au/blog/2012/12/how-to-explain-hash-dos-to-your-parents-by-using-cats/
- https://en.wikipedia.org/wiki/Collision_attack
* TODOs * TODOs
** Bootstrap ** Bootstrap
*** TODO Language Spec *** TODO Language Spec :DOCS:
*** TODO A proper List implementation *** TODO A proper List implementation :BOOTSTRAP:
It should be a proper linked list It should be a proper linked list
*** TODO Vector implementation *** TODO Vector implementation :BOOTSTRAP:
*** TODO Hashmap implementation *** TODO Hashmap implementation :BOOTSTRAP:
*** TODO Call stack *** TODO Call stack :BOOTSTRAP:
- [ ] Thread local call stack - [ ] Thread local call stack
- [ ] Handle TCO in the call stack - [X] Handle TCO in the call stack
- [ ] Integration with the Error handling - [X] Integration with the Error handling
*** TODO Meta data support *** TODO Meta data support :BOOTSTRAP:
- [ ] Attachable meta data to any expression - [ ] Attachable meta data to any expression
- [ ] Spec for special meta data that mean something to the interpreter. E.g: docstrings - [ ] Spec for special meta data that mean something to the interpreter. E.g: docstrings
- [ ] Meta data API - [ ] Meta data API
*** TODO Docstring support *** TODO Docstring support :DOCS:BOOTSTRAP:
- [ ] For functions and macros - [ ] For functions and macros
- [ ] For namespaces and projects - [ ] For namespaces and projects
- [ ] API to interact with docstrings and helps - [ ] API to interact with docstrings and helps
*** TODO FFI interface *** TODO FFI interface :BOOTSTRAP:
- [ ] Convertion of Serene types to C types - [ ] Convertion of Serene types to C types
- [ ] Shared libraries dynamic loading - [ ] Shared libraries dynamic loading
- [ ] Integration with namespaces and requirement set - [ ] Integration with namespaces and requirement set
- [ ] Necessary API and checks for library and ABI Availability - [ ] Necessary API and checks for library and ABI Availability
*** TODO Load path and namespace loading *** TODO Load path and namespace loading :BOOTSTRAP:
*** TODO nREPL *** TODO nREPL :BOOTSTRAP:
*** TODO Emacs mode *** TODO Emacs mode :Misc:
*** TODO Number implementation *** TODO Number implementation :BOOTSTRAP:
- [ ] Basic operations - [ ] Basic operations
- [ ] Standard functions in Serene itself - [ ] Standard functions in Serene itself
- [ ] Type infer and conversion - [ ] Type infer and conversion
*** TODO String implementation *** TODO String implementation :BOOTSTRAP:
- [X] Basic implementation
- [ ] Basic operations - [ ] Basic operations
- [ ] Numer <-> String - [ ] Numer <-> String
- [ ] Interpolation - [ ] Interpolation
*** TODO Enum implementation *** TODO Enum implementation :BOOTSTRAP:
- [ ] Embedded data in a variant - [ ] Embedded data in a variant
- [ ] Generate functions based on variants - [ ] Generate functions based on variants
*** TODO Protocol *** TODO Protocol :BOOTSTRAP:
- [ ] Polymorphic functions - [ ] Polymorphic functions
*** TODO Struct implementation *** TODO Struct implementation :BOOTSTRAP:
*** TODO Error handling *** TODO Error handling :BOOTSTRAP:
- [ ] Integration with callstacks - [X] Integration with callstacks
- [ ] Stackable errors - [ ] Stackable errors
*** TODO Multi arity functions *** TODO Multi arity functions :BOOTSTRAP:
*** TODO QuasiQuotation *** TODO QuasiQuotation :BOOTSTRAP:
*** TODO Linter *** TODO Linter :Misc:
*** TODO Document generator *** TODO Document generator :DOCS:Misc:
*** TODO Spec like functionality *** TODO Spec like functionality :BOOTSTRAP:
*** TODO Laziness implementation *** TODO Laziness implementation :BOOTSTRAP:
*** Standard libraries *** Standard libraries
**** TODO IO library **** TODO IO library :BOOTSTRAP:
**** TODO Test library **** TODO Test library :BOOTSTRAP: