{"id":23251469,"url":"https://github.com/dplassgit/ssl-compilers","last_synced_at":"2025-04-06T02:18:14.972Z","repository":{"id":223198414,"uuid":"757776105","full_name":"dplassgit/ssl-compilers","owner":"dplassgit","description":"Compilers for \"SSL\", a \"simple scripting language\"","archived":false,"fork":false,"pushed_at":"2024-04-09T01:33:45.000Z","size":4107,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2024-04-09T02:38:41.404Z","etag":null,"topics":["compiler","compiler-construction","toy-language"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dplassgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-15T00:23:51.000Z","updated_at":"2024-04-14T23:48:53.419Z","dependencies_parsed_at":"2024-04-09T02:38:03.003Z","dependency_job_id":null,"html_url":"https://github.com/dplassgit/ssl-compilers","commit_stats":null,"previous_names":["dplassgit/ssl-compilers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplassgit%2Fssl-compilers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplassgit%2Fssl-compilers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplassgit%2Fssl-compilers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dplassgit%2Fssl-compilers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dplassgit","download_url":"https://codeload.github.com/dplassgit/ssl-compilers/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423510,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","compiler-construction","toy-language"],"created_at":"2024-12-19T09:18:28.993Z","updated_at":"2025-04-06T02:18:14.945Z","avatar_url":"https://github.com/dplassgit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSL Compilers\n\nCompilers for \"SSL\", a \"simple scripting language.\"\n\nJust for fun, I want to write the same compiler in different source languages.\n\nThe compilers all emit x64 assembly language.\n\n## Language\n\nSee [language overview](docs/LANGUAGE.md).\n\n## Development history\n\nI built the Python version first. It's also the smallest, at only about 500 lines.\n\nThen I built the Java version, including some JUnit tests. I have the most\nexperience with Java (including the d2lang compiler).\n\nC++ was a challenge, because I hadn't written any in a long time (like, 25 years).\nI don't remember C++ being so annoying with declaring every method in the header\nfile.\n\nNext I built the golang version. This is now the most golang I have ever written\n(about 700 lines). Since golang doesn't really have classes, it was odd to have\nto add `(this *Parser)` for every method. Also, golang doesn't have method \noverloading, which I also found surprising.\n\nThe C version was really annoying because:\n  * It doesn't have \"simple\" string concatenation\n  * No built-in map, set, list\n\nI had heard lots about Kotlin but never written a line of code before this \nproject. I think I enjoyed the Kotlin version the most so far, maybe because\nof how it so easily builds string literals. The language reminds me of the best\nparts of Java and the best parts of Python.\n\n(At this point I started writing tests with the code, instead of having to run\nagainst the samples manually.)\n\nRuby was ok. It thinks it's a better Python, but to me, I feel it's like\nthe worst of Python and JavaScript...\n\nScala was new for me as well. It seems to be a cross between Kotlin and Python.\nI liked the ability to automatically run tests whenever a file changed (via the\n`~test` command in `sbt`.)\n\nI went back and added tests for Python, Go and C++, when I revamped the two-character\nsymbol lexical analysis.\n\nThe awk implementation was kind of fun, but annoying, because it's completely\nun-type-checked. If you mistype a variable, it defaults to null/undefined, instead of\ngiving an error...\n\nRust was a challenge; I started and stopped it a few times before finally \ngetting the basics figured out. I still don't quite understand its memory or\nmodule models, but know just enough to be dangerous.\n\nFuture languages may include:\n   * [d2lang](https://github.com/dplassgit/d2lang)\n   * D\n   * [Sly](https://github.com/dabeaz/sly) (a Python parser generator)\n   * [ANTLR](https://www.antlr.org/) (\"Another Tool for another parser generator\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplassgit%2Fssl-compilers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdplassgit%2Fssl-compilers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdplassgit%2Fssl-compilers/lists"}