readline
Charm-MacOS
readline | Charm-MacOS | |
---|---|---|
2 | 8 | |
23 | 0 | |
- | - | |
10.0 | 0.0 | |
about 3 years ago | about 1 year ago | |
Go | xBase | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
readline
-
Charm: a new language in, with, and for Go
... I kind of am, though. Which is why I didn't know what to do. I don't see a lot of free open source projects with extensive documentation in their README. Some, yes, but for example here's the readline library I'm using. I, in my well-meaning ignorance, supplied 50 pages of documentation and people are behaving like I ate a baby 'cos it's in the wrong format. I will now put it all in the README as people would like, but I did genuinely act out of ignorance and not out of a wish to insult the customs of the tribe.
-
Guide: Hush Shell-Scripting Language
> I would like to see a framework for creating rich REPLs that would be language agnostic, so that I could get a state of the art auto-completion dialog no matter which language I decided to make into a shell.
It's doable with existing tools. You have LSP to provide the syntactical framework and there's no shortage of alternatives to readline (I'd written my own[1] to use in murex[2], and open sourced that).
[1] https://github.com/lmorg/readline
[2] https://murex.rocks
The problem you still face is that a good shell will offer autocompletion suggestions for strings that aren't language keywords or function names. eg
- file names; and there's a lot of hidden logic in how to do this. Do you build in fzf-like support, just include fzf wholesale but increase your dependency tree, or go for basic path completion. Do you check metadata (eg hidden files and system files on Windows), include dot-prefixed files on Linux / UNIX, etc. How do you know when to return paths, or paths and files, or even know not to return disk items at all? (see next point)
- flags for existing CLI tools (assuming you want compatibility with existing tools). Fish and murex will parse man pages to populate suggestions, others rely entirely on the community to write autocompletion scripts.
- Are you including variables in your completion of strings. And if so are you reading the variables to spot if it's a path and then following that path. eg `cd $HOME/[tab]` should then return items inside a your home directory even though you've not actually specified your home directory as a string. That means the shell needs to expand the variables to see if it's a valid path. But that's a shell decision rather than a language feature.
Some of these lists might take a while to populate so you then have another problem. Do you delay the autocompletion list (bad UX because it slows the user down) or provide the autocompletion sooner. And if the latter, how do you do that without:
1. changing the items under what you're about to select causing you to accidentally select the wrong option
2. communicate that there are update clearly
3. ensure the UI is consistent when slower loading entries might not fit the same dimensions as the space allocated for the list (if you dynamically size your completions to fit the screen real estate)
4. ensure that there's still something present while you're lazy loading the rest of the suggestions; and that those early entries on the completion list are worthwhile and accurate
5. what about sorting the list? Alphabetical? By feature? etc
The REPL in murex was inspired by IDEs so I've spent a lot of time trying to consider how to provide the best UX around autocompletion. One thing I've learnt is that it's a lot harder to get right than it seems on the surface.
Charm-MacOS
-
Charm: a new language in, with, and for Go
There's source code here, a Mac executable with auxiliary files here, and there's a manual here which also has notes in pink to explain the reasoning behind my choices. If you like the project, please add a star to the source code repo. Thanks!
-
Charm 0.2.2: Now with return types, inner functions, transactions, and better encapsulation
There is a manual here with extensive notes (in pink) for langdevs. The source code is here and Mac OS object code can be found here.
-
Charm 0.2.1: now with enumerated types.
Source code; Mac OS object code; manual.
- August 2022 monthly "What are you working on?" thread
-
Best REPL for a language
So, here's the source code, and here's the Mac executable plus resource files. Both come with lots of example code and a manual in .pdf form with extensive notes for langdevs. The description of the bells and whistles of the REPL are near the end of the manual, in the section titled "The hub".
-
How would you remake the web?
Here's the source code etc, here's a compiled Mac OS version, and here's a manual with extensive notes for other langdevs about what I'm trying to do.
-
Langception: I wrote a Forth in Charm, which I also wrote
Mac OS object code for Charm : https://github.com/tim-hardcastle/Charm-MacOS
-
Charm 0.1: a data-oriented scripting language
See my shiny newish language paradigm! Or, alternatively, come and stare at the crazy guy trying to put the fun into functional! (Mac executable, manual in .pdf form and demo code here, source code etc here. Or if you just want to read about it without getting your hands dirty, here’s a version of the manual with extensive notes for langdevs.)
What are some alternatives?
Lisp-in-Charm
butter - A tasty language for building efficient software. WIP
stshell
utop - Universal toplevel for OCaml
hush - Hush is a unix shell based on the Lua programming language
boba - A general purpose statically-typed concatenative programming language.
u-boot - "Das U-Boot" Source Tree
shelljs - :shell: Portable Unix shell commands for Node.js
kuroko-wasm-repl - In-browser REPL for Kuroko
go-regex - A High Performance PCRE Regex Package That Uses A Cache.
charm - The Charm Tool and Library 🌟