From Curiosity to Confusion: My Journey of Creating Confuscript in Ruby
summary
Built a toy language called ConfuseScript that flips semantics: plus acts like minus, multiply like divide, and variables initialize with null while output uses the literal token console input. Implementation uses Ruby and the Treetop library with a parsing expression grammar to generate ASTs, node classes that evaluate against a hash-based context, and minimal evaluator logic so the whole thing fits a weekend project. Source is open source and ready to run and extend.
AI-written summary · about
chapters (8)
- 0:00Introduction to Confuscript
- 1:26The motivation and goals
- 2:57Confuscript demonstrations
- 5:37Anatomy of the language
- 10:13Defining grammar and nodes
- 12:55Evaluation and final demos
- 16:27Q&A session
- 18:53Why learn to build languages
related talks
39mEsoteric, Obfuscated, Artistic Programming in Ruby
29mSmalruby: Visualizing Ruby with Bidirectional Transpiration
26mSlaying the Dragon
43mGrammars, Parsers, and Interpreters, In Ruby
46mInventing a language (placeholder title)
34mHijacking Ruby Syntax in Ruby
45mSoftly, softly typing
33mSyntax Isn't Everything: NLP for Rubyists
