YadidYadid is a Visual Studio Code extension for the 8th programming langauge. Yadid ("friend" in Hebrew) gets its name from the fact that 8th's creator - Ron Aaron - lives in Israel, and I like to think of this extension as a friendly contribution to the community.
FeaturesForth - and its derivatives - are actually quite frustrating to make an effective extension and syntax highlighter for. This is because they have little-to-no syntax and are very context dependent. For this reason, Yadid's primary goals are to provide:
Context-Aware Syntax HighlightingYadid's syntax highlighting has no intention - nor will it ever - of highlighting every known word in the dictionary. I personally believe this is not only difficult to maintain, but an eye sore and not effective. It would be like a C syntax highlighter only calling attention to the libc functions and nothing else. Of what use is that to anyone? Instead, Yadid highlights words that fit one of the following criteria:
In addition, because Yadid is picky about this, it can go further and only highlight those words in the state(s) they are legally allowed to be used in! This is where Yadid shines. For example, consider the following animation of code being edited and notice how the highlighting changes based on the state: Notice how when defining the word There are many of these situations for which I hope Yadid will be very helpful. I've found this especially true with respect to literal arrays and maps. For example, literal characters are not allowed in literal arrays (this has bit me multiple times) and so won't be highlighted there. Running 8th ScriptsThe currently open file can be run as an 8th script with the "Run File" command ( Project BuildingIf open in an Workspace and there is a 8th build project setup in the folder, then the "Build Project" ( Opening LibrariesQuite often you want to either look at a library for reference or need to make quick edits in one of your own libraries. The "Open Libaries Folder" and "Open Core Libraries Folder" command palette actions will launch a new VSCode window and immediately open the libraries folder you selected. The core libraries folder is always considered to be relative to the RequirementsThis extension assumes you have Known Issues and QuirksIn order to guarantee that what's highlighted is valid 8th code, there are a couple areas where what isn't highlighted is valid 8th, but doesn't show that way. Put another way, there may be a few cases that present false negatives, but there should be no false positives. Literal arrays and map items not padding the
Defining words on the different lines:
Regular expressions are distinguished from The effort required to correct these (very minor) issues would be untenable, though. I can't see myself even attempting to do so. Future PlansThere are a couple features that I still plan on adding:
Bugs and Feature RequestsIf you find something that you think is wrong or have a feature request, feel free to open up an issue on GitHub. Also, if you find this extension helpful and want to give a shout-out, a great place to do so would be on the 8th forums! |