Show HN: ClifferBasic, a simple BASIC interpreter as a .NET REPL
ClifferBasic is a GitHub repository featuring a BASIC interpreter as a REPL, allowing interactive command execution, variable management, and arithmetic operations, with plans for future enhancements and additional commands.
Read original articleClifferBasic is a GitHub repository that showcases a simple BASIC interpreter environment implemented as a REPL (Read-Eval-Print Loop) using the Cliffer CLI library. The program allows users to execute BASIC-like commands interactively, manage programs, and perform variable assignments and arithmetic operations. To start the REPL, users can run the ClifferBasic executable. Commands can be executed, such as printing text or running saved programs. The interpreter supports various commands including `cls` to clear the screen, `delete` to remove a line from a program, `end` to terminate execution, and `let` for variable assignments. An example session demonstrates how to assign values to variables and print results, as well as save programs to storage. The project structure includes key files such as ClifferBasic.cs, which serves as the entry point, and BasicReplContext.cs, which manages command input and execution. Future enhancements planned for the project include the addition of more commands, support for arrays, structured programming constructs, and improved documentation. For further information, the repository can be accessed directly on GitHub.
Related
Git-cliff – Generate changelog from the Git history
A customizable changelog generator, git-cliff, is now in version 2.0. It supports regex parsers, config files, and conventional commits. Integration available for Rust, Python, and Node.js. Copyright spans 2021-2024.
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
PC-BASIC, a cross-platform interpreter for GW-BASIC
PC-BASIC is a versatile emulator offering bug-for-bug compatibility with Microsoft GW-BASIC. It supports legacy BASIC applications, classic games, various platforms, graphics, music, and features like printing and serial port support.
Teaching Programming with Basic
The article discusses the educational value of programming in GW-BASIC, emphasizing fundamental concepts like variables and loops. Despite criticisms, starting with BASIC can provide a solid foundation for beginners.
Show HN: Lisp in C#
The GitHub URL provides details about "sharpl," a custom Lisp interpreter in C#. It includes features like lexical/dynamic scope, branching, method definition, lambdas, closures, varargs, and more. Visit https://github.com/codr7/sharpl for details.
I think .NET is a fantastic platform, and I'm still surprised there's not more attempts at building languages on top of it, especially when you consider how IronPython was built to "prove" .NET was a terrible platform, but the Jython developer fell in love with .NET as a result of his attempt, heck, Microsoft hired the developer! At least thats how I've heard the story told on random HN comments over the years. :)
I havent had the pleasure of building a full interpreter yet, so props on doing the work.
Edit:
A few weeks ago I tried VB .NET and theres something nice about it, it feels like when I write some pieces of code, I can verbalize what it is, instead of some obscure character someone gave a meaning to, but building out VB .NET projects means translating C# to VB .NET the entire time, since most .NET things today are all in C# and it can be more effort than just writing in C#. There is something really nice and almost elegant about BASIC.
My only complaint with Microsoft was that VB6 made native binaries, I wish they had done VB7 with threading support before .NET became a thing.
I REALLY hope they open source Visual Basic 6 with the MIT License, would love to see what might happen if people fork it and make improvements to it...
That's also a BASIC built in .NET. It's focus is on "pedagogy" (teaching programming a step at a time in a revealing pattern sort of way), and offers a lot of fun silly things like a Turtle module and other basic GUI tools.
[0] Apparently not to be confused with SmallBASIC, a C/C++-based somewhat math-focused one: https://github.com/smallbasic/SmallBASIC
Related
Git-cliff – Generate changelog from the Git history
A customizable changelog generator, git-cliff, is now in version 2.0. It supports regex parsers, config files, and conventional commits. Integration available for Rust, Python, and Node.js. Copyright spans 2021-2024.
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
PC-BASIC, a cross-platform interpreter for GW-BASIC
PC-BASIC is a versatile emulator offering bug-for-bug compatibility with Microsoft GW-BASIC. It supports legacy BASIC applications, classic games, various platforms, graphics, music, and features like printing and serial port support.
Teaching Programming with Basic
The article discusses the educational value of programming in GW-BASIC, emphasizing fundamental concepts like variables and loops. Despite criticisms, starting with BASIC can provide a solid foundation for beginners.
Show HN: Lisp in C#
The GitHub URL provides details about "sharpl," a custom Lisp interpreter in C#. It includes features like lexical/dynamic scope, branching, method definition, lambdas, closures, varargs, and more. Visit https://github.com/codr7/sharpl for details.