0d examples
Examples
Transpiler
“Compiler” that transpiles a Scheme project to JavaScript.
doc/Start Here.md
and doc/*.md
document a snapshot of the current diagrams and code that make up the transpiler written in drawware / 0D. Includes commentary on warts and wish-list.
At this moment, I am writing a line-by-line description of RWR (the ReWRiter tool).
Includes ideas about:
- front end processing, towards RT (recursive text)
- virtual commas (improved upon in Find-and-Replace by tokenization)
- escaping whitespace
- unquoting
- list constants
- converting to JavaScript
- 4 successive stages of transpiling
- rewriting single characters
- rewriting symbols
- emitting expression statements as JavaScript
- emitting list syntax as JavaScript
- macros for JavaScript
- cleanup
- 4 successive stages of transpiling
- utilities
- faking lisp functions in JavaScript
- RWR
- a simple DSL that is used to accompany OhmJS and avoids manual writing of JavaScript for OhmJS
- ABC
- an ultra-simple “language” to demonstrate the basics of OhmJS
- interpreter basics
- compiler basics
Includes odin0D (0d/*.odin
), but, the latest version of odin0d is in the find and replace
repo listed below.
https://github.com/guitarvydas/transpiler
Find and Replace
https://github.com/guitarvydas/find-and-replace
A proposed markdown syntax for a macro that adds a find-and-replace skin for use in other languages, like Python, JavaScript, Rust, Odin, etc.
Written in diagrammatic form - drawware/0D.
Shows parsing of markdown & HTML as a programming language.
Contains the latest version of odin0d (0d/*.odin
)
- augments Messages with provenance trails (cause)
- includes a short essay 2023-10-15 Examining Dynamic Structure.md
- Datum
- splits apart data operands from control flow
- a datum is defined as a simple struct containing 4 fields
data
clone()
reclaim()
asString()
Contains the evolution of virtual commas into “Delineate Words”
The code runs from the diagrams. Not as complete nor as documented-in-detail-as-text as the transpiler repo. Ask me - I would be glad to explain. Maybe questions will lead me towards targeting better documentation.
[N.B. It can be argued that textual documentation is not actually needed, since a picture is worth a thousand words :-]
See Also
Blogs
obsidian blogs (see blogs that begin with a date 202x-xx-xx-)
Videos
videos - programming simplicity playlist
Books
leanpub’ed (disclaimer: leanpub encourages publishing books before they are finalized - these books are WIPs)
Programming Simplicity Takeaways, and, Programming Simplicity Broad Brush
Discord
Programming Simplicity all welcome, I invite more discussion of these topics, esp. regarding Drawware and 0D
@paul_tarvydas
Mastodon
(tbd, advice needed re. most appropriate server(s))