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.
Read original articleThe GitHub URL provided contains information about "sharpl," a custom Lisp interpreter written in C#. This interpreter offers various features including bindings with lexical or dynamic scope, branching using `if` and `if-else`, method definition with `^`, lambdas, closures, tail calls, varargs, composition, quoting, composite types like arrays, maps, and pairs, iterators, libraries, evaluation with `eval`, testing with `check`, benchmarks, and debugging with `emit`. For more in-depth details and examples, you can refer to the sharpl GitHub repository at https://github.com/codr7/sharpl.
Related
Show HN: a Rust lib to trigger actions based on your screen activity (with LLMs)
The GitHub project "Screen Pipe" uses Large Language Models to convert screen content into actions. Implemented in Rust + WASM, inspired by `adept.ai`, `rewind.ai`, and `Apple Shortcut`. Open source under MIT license.
Common Expression Language interpreter written in Rust
The GitHub repository features a Common Expression Language (CEL) implementation in Rust, offering a CEL-parser and interpreter for evaluating expressions. It emphasizes simplicity, speed, safety, and portability, providing examples and guidance in Rust, Java, Go, and TypeScript. Detailed documentation is available on the GitHub page.
Bio – experimental Lisp dialect, written in Zig
Bio is an experimental Lisp dialect on GitHub, featuring macros, garbage collection, and lambda expressions. Documentation is ongoing, with examples in `std.lisp` and `test.lisp`. Explore for more details.
Show HN: Llm2sh – Translate plain-language requests into shell commands
The `llm2sh` utility translates plain language into shell commands using LLMs like OpenAI and Claude. It offers customization, YOLO mode, and extensibility. Installation via `pip` is simple. User privacy is prioritized. Contributions to the GPLv3-licensed project are welcome. Users should review commands before execution. Visit the GitHub repository for details.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."
- Users are curious about the potential for FFI/interop and the rationale behind using C#.
- The author seeks advice on optimizing performance and mentions additional features in the repository.
- There are references to similar projects and resources, such as IronScheme and Norvig's Lisp tutorial.
- Concerns are raised about certain language design choices, like making integers iterable.
- Suggestions include adding macro documentation and improving code block syntax highlighting in the README.
I'm afraid I've been out of the C# loop too long to know what's fast and what isn't these days.
Now that maybe I have the attention of some serious C# nerds, any assistance in making this thing run faster would be much appreciated.
It's not terrible atm, given a managed host language, but I'm sure there are plenty of knobs left to turn.
See the benchmarks section in the README for more info, and the same benchmarks ported to Python in python/fib.py.
Oh, and there's some undocumented yet potentially useful stuff in /Libs; strings, terminal control and IO mainly.
I don't much like the odds of Lisp vs. Nintendo hardware kickstarters.
I wrote a lisp in C# based on that, it was only a 100+ ish lines of code. It was a great way to get into Lisp.
(reduce + (range 1 3) 0)
and if you find yourself wanting the natural number iteration regularly maybe (^upto (n) (range 1 (- n 1)))
as sugar.This concern brought to you by e.g. the great pain induced by the difference between
for x in "foo":
and for x in "foo",:
in python, for example.It may turn out in practice that a lispy language and/or programmers who make different mistakes to me will make it not an issue ... but were it -my- project I'd probably comment out the iterator implementation for int and see if its absence annoyed me enough to decide it was worth bringing back.
(when perpetrating language myself I often find that some of my favourite bits of clever don't pass the 'annoyed me enough' test and end up as documentation examples or similar in the end instead ... hopefully you have better luck ;)
```lisp
(+ 1 2)
```
Related
Show HN: a Rust lib to trigger actions based on your screen activity (with LLMs)
The GitHub project "Screen Pipe" uses Large Language Models to convert screen content into actions. Implemented in Rust + WASM, inspired by `adept.ai`, `rewind.ai`, and `Apple Shortcut`. Open source under MIT license.
Common Expression Language interpreter written in Rust
The GitHub repository features a Common Expression Language (CEL) implementation in Rust, offering a CEL-parser and interpreter for evaluating expressions. It emphasizes simplicity, speed, safety, and portability, providing examples and guidance in Rust, Java, Go, and TypeScript. Detailed documentation is available on the GitHub page.
Bio – experimental Lisp dialect, written in Zig
Bio is an experimental Lisp dialect on GitHub, featuring macros, garbage collection, and lambda expressions. Documentation is ongoing, with examples in `std.lisp` and `test.lisp`. Explore for more details.
Show HN: Llm2sh – Translate plain-language requests into shell commands
The `llm2sh` utility translates plain language into shell commands using LLMs like OpenAI and Claude. It offers customization, YOLO mode, and extensibility. Installation via `pip` is simple. User privacy is prioritized. Contributions to the GPLv3-licensed project are welcome. Users should review commands before execution. Visit the GitHub repository for details.
"Maxwell's equations of software" examined
Ken Shirriff's blog post analyzes a historic Lisp code snippet, showcasing Lisp's core principles. It highlights code-data interchangeability and the essence of Lisp programming, referencing Alan Kay's "Maxwell's Equations of Software."