{"id":15747039,"url":"https://github.com/rwaskiewicz/screamscript","last_synced_at":"2025-03-31T06:25:16.062Z","repository":{"id":117137502,"uuid":"275388313","full_name":"rwaskiewicz/SCREAMSCRIPT","owner":"rwaskiewicz","description":"SWEET SCREAMS ARE MADE OF THIS","archived":false,"fork":false,"pushed_at":"2020-07-12T19:25:59.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T23:03:40.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwaskiewicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2020-06-27T14:24:30.000Z","updated_at":"2020-08-30T18:20:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"64460f7e-0a93-4ced-8b9f-f4d337a9cf93","html_url":"https://github.com/rwaskiewicz/SCREAMSCRIPT","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"dbbc13393b6143f951ae5a677736d1558483b1d5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2FSCREAMSCRIPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2FSCREAMSCRIPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2FSCREAMSCRIPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaskiewicz%2FSCREAMSCRIPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwaskiewicz","download_url":"https://codeload.github.com/rwaskiewicz/SCREAMSCRIPT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246425407,"owners_count":20775136,"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":[],"created_at":"2024-10-04T05:02:26.275Z","updated_at":"2025-03-31T06:25:16.044Z","avatar_url":"https://github.com/rwaskiewicz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SCREAMSCRIPT\n\n_The language of your screams_\n\n\u003chr\u003e\n\nSCREAMSCRIPT is a dynamic programming language heavily influenced by the Lox programming language.  One might even say I\ntook my implementation from the [Tree-Walk Interpreter](http://craftinginterpreters.com/a-tree-walk-interpreter.html) \ncomponent of [Crafting Interpreters](http://craftinginterpreters.com), then just edited the source so that keywords,\nidentifiers, etc. could only be ~CAPTIAL~ SCREAM CASED, because that's exactly what I did. I even left the class names \nin place.\n\n## Why\n\nBecause I wanted to take a joke at work a little too far.\n\n## Interesting Tidbits\n\nIn the process of \"making\" SCREAMSCRIPT there were some interesting items of note that popped up:\n\n### Variable vs Class Identifiers\n\nThis implementation of Lox/SCREAMSCRIPT doesn't distinguish identifiers as `class` or `variable` types. It's a big ol'\n`Map` that stores everything together.  As a result, the casing-convention of `CapitalCasing` class names and using\n`lowercase` for variable names was really the only thing keeping them from colliding. Without further changes, it's\npossible to define a class and override it accidentally (or purposefully, it's a dynamic programming language where\nthis is _technically_ designed to be as such, even in Lox).\n\n```\n$ ./runScreamRepl.sh \n     \nBUILD SUCCESSFUL in 1s\n4 actionable tasks: 4 executed\n\nAHHHHHHH \u003e CLASS BAGEL {}\nAHHHHHHH \u003e PRINT BAGEL;\nBAGEL\nAHHHHHHH \u003e VAR B = BAGEL();\nAHHHHHHH \u003e PRINT B;\nBAGEL INSTANCE\nAHHHHHHH \u003e VAR BAGEL = B;\nAHHHHHHH \u003e PRINT BAGEL;\nBAGEL INSTANCE\nAHHHHHHH \u003e VAR C = BAGEL();\nCAN ONLY CALL FUNCTIONS AND CLASSES!\n[LINE 1]\nAHHHHHHH \u003e PRINT \"OHHHHHHHHH\";\nOHHHHHHHHH\n```\n\n### Keywords\n\nKeywords should be SCREAM'ed. Like everything else. That's how you know it's all important. This really only required a\nfew small changes in the `Scanner` and `TokenType` classes.  There were however a few cases where Java `String` literals\nwere used instead of a static variable, which also hand replaced.\n\n### String Variables\n\nThe contents of `String`s need to SCREAM. The `Scanner` was updated accordingly to signal to the user they've done\nwrong by not screaming. If you don't scream it, you don't believe it.\n\nWhy don't people normalize text in SCREAM rather that lowercase? The world may never know. \n\n### Error Messages\n\nError messages were also manually converted to SCREAM. I did at a `.toUpperCase` call to the method that creates the\nerror, but this gave a small appreciation for the places we need error handling throughout the language impl.\n\n## Running\n\nI feel like there shouldn't need to be a disclaimer that SCREAMSCRIPT is not a production language. But if you are\ninclined to run this, here's how you'd do it.\n\n### REPL\n\n`runScreamRepl.sh` is a very, very simple shell script in the root of this project that runs the build step (for the \nlanguage) and starts the REPL:\n```sh\n$ ./runScreamRepl.sh \n\nBUILD SUCCESSFUL in 1s\n4 actionable tasks: 4 executed\nAHHHHHHH \u003e VAR I = \"HELLO WORLD!\";\nAHHHHHHH \u003e PRINT I;\nHELLO WORLD!\nAHHHHHHH \u003e\n```\n\n### Scream Files\n\n`runScreamFile.sh` is a very, very simple shell script in the root of this project that runs the build step (for the \nlanguage) and runs a provided file. Examples live in `scr/main/resources/scream-scripts`, and still use the `.scream`\nextension.\n\nFor bacon.scream:\n```\nCLASS BACON {\n    EAT() {\n        PRINT \"CRUNCH CRUNCH CRUNCH!\";\n    }\n}\n\nBACON().EAT();\n```\n\nWe can run it as follows:\n```sh\n$ ./runScreamFile.sh -- src/main/resources/scream-scripts/ch12-classes/bacon.scream \n\nBUILD SUCCESSFUL in 1s\n4 actionable tasks: 4 executed\nCRUNCH CRUNCH CRUNCH!\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaskiewicz%2Fscreamscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwaskiewicz%2Fscreamscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaskiewicz%2Fscreamscript/lists"}