Live data from Hacker News

Steel – An embeddable and extensible Scheme dialect

github.com

151–160 of 192 posts

Re: Steel – An embeddable and extensible Scheme dialect

#151

Can someone explain these scheme and lisp languages to me? Every time I look at these languages, I can't grasp what you can use them for. And why one would use them. I always feel like I'm missing something. In the example scripts and code snippets, I can see that you can define functions, that you can use lists, mathematical operations, you can build some algorithms, you can print text, but it never goes further tha…

> you have a std lib, which can interact with many things, you can build UIs, networking libraries and all that.

Racket has all of that: https://docs.racket-lang.org

Common Lisp too: https://common-lisp.net/libraries

Clojure too: https://www.clojure-toolbox.com

(Or you could even just build anything within Emacs with Emacs Lisp: https://en.wikipedia.org/wiki/Emacs_Lisp)

> And I could probably start using any language that is "similar" to these.

Then you probably could start also using any of the Lisps mentioned. Most likely you are just hung up on the surface syntax, which does not take long to get used to.

Re: Steel – An embeddable and extensible Scheme dialect

#152
post #93

Earlier quoted context omitted.

Turing-completeness in a config file is an anti-pattern. Write an external program to generate the config file instead.

Putting arbitrary bounds on how people use their computers is an anti-pattern.

Right, but his concern about security is not just to restrict how you use your computer, but to try to keep it safe in a manageable way.

However, the current state of guarantees around it is not at the point where Turing-completeness is the biggest issue. You can have a simple config, but the rest of the system is still unverifyiable and running unknown blobs.

I think the reasonable way out of it is through restricted capabilities. We won't get a fully verifyiable system we can inspect anytime soon. Probably not before the dark days of mandatory and somewhat provable ad impressions.

Re: Steel – An embeddable and extensible Scheme dialect

#153
post #125
post #97

Earlier quoted context omitted.

The keybindings is one of the major selling points of helix. It uses kakoune style object-verb action (like vim visual mode) by default with multiple selections. If you're comfortable with emacs bindings then you're better off with a lightweight emacs alternative.

As an evil user, this is potentially huge to me. Emacs happens to have the best balance of easy to setup configuration (relatively), powerful package ecosystem, and proper hackability of all editors I've found. It's not very fast though and has some conventions that feel archaic.

I'm also an Emacs evil user (neovim too). I think the kakoune editing model has the potential to surpass even the vim/evil model. Its default object-verb order makes it easy to preview and change selection before proceeding with the action. That's not possible with vim's normal mode. Vim does have the visual model. But then kakoune model also uses multiple cursors, making it more powerful. I really wanted to try kakoune model in Emacs. But the package needs a bit more updates.

Another issue I have with evil is that it changes a lot of Emacs' default bindings, making it hard to do certain tasks. Some operations simply don't work at all. The kakoune package doesn't do this - at least not in insert mode.

> It's not very fast though and has some conventions that feel archaic

Sadly, multithreading is an afterthought for Emacs. There is just too much legacy stuff to make it easy. The language design is also from another era. The default dynamic binding feels very alien when almost every language everyone knows is lexical binding by default. On the other hand, scheme feel very modern due to very careful language design. But the effort to switch Emacs to scheme didn't find much steam.

There is one aspect where none of the new editors (hx with scheme and nvim with lua)can match Emacs. Emacs is entirely written in elisp with the C parts acting merely as libraries. The extension language for other editors is just an addition to their core editing code.

Re: Steel – An embeddable and extensible Scheme dialect

#154
post #88

Earlier quoted context omitted.

I’ve written a large application in Lisp. Hated parentheses before, hate them even more now. It needlessly obscures code. Maybe it’s a personal issue, idk. But it’s not out of ignorance nor is code readability a trivial point.

Yeah it is a personal issue, there are people who really like Lisp syntax (I'm one of them). That doesn't mean anything bad, of course, some people like dark text on a light background, others light text on a dark background. Everyone is different and that's what makes the world so awesome. I see something like: some-var: I64 := a * b - c ^ d ^ e; ...and my brain gives out, while I find: (let ((some-var (- (* a b) (^…

I think you've just accidentally demonstrated why most people don't like Lisp syntax.

Re: Steel – An embeddable and extensible Scheme dialect

#155

Earlier quoted context omitted.

A-expressions are a choice, and it is fine to argue whether it is a good one. There are plenty of other ways of achieving honiconic syntax.

What's an A-expression? I tried looking it up but didn't find anything. I have heard of M-expressions but never of an actual implementation. Scheme also seems to have some SRFIs involving alternate syntax that's whitespace dependent, like SRFI 119 (wisp), SRFI 110 (sweet-expressions or T-expressions), or SRFI 49.

A mistype of S-expression that is outside the edit window.

Re: Steel – An embeddable and extensible Scheme dialect

#157

Earlier quoted context omitted.

I saw your comment on the thread. A. Most WebAssembly implementations are bigger than Helix itself. B. WebAssembly is immature. C. Lisp is perfectly fine. Even if you don't like it, it's not the end of the world if you have to use it to configure Helix.

A. It's true that Wasmer is bigger, but even my phone has 16GB of RAM and 1TB of storage space. B. There are probably more computers running WebAssembly loads today than Lisp ones. C. Lisp is a mature language, almost too mature. I used it extensively in the '80s and it served me well then, but that was 40 years ago. At least have the decency to use a more modern language like Lua, which is what Neovim uses.

A. Sure, but it isn't sufficiently beneficial for the cost.

B. WebAssembly is immature for developing a plugin system because of the lack of a sufficient ABI: https://github.com/WebAssembly/component-model

C. There aren't any other languages that meet the criteria. Lua was a no-go from the start. The maintainers did not like the language, and it necessitated adding more C code to Helix which could complicate building even further. https://github.com/helix-editor/helix/discussions/3806#discu...

Re: Steel – An embeddable and extensible Scheme dialect

#158

Earlier quoted context omitted.

I would use Helix in the terminal if it supported Emacs keybindings tbh but I don't want to relearn another set of keybindings. Still I'd be interested in what it becomes.

Out of curiosity, if you’re familiar with Emacs, what’s your motivation for wanting to use Helix? Built-in LSP support?

- Curiosity

- Speed, even though emacs with the emacsclient is pretty much instant

- Font support, for some reason the terminal with Emacs sometimes doesn't render as well as it should

- Some keybindings issues in the terminal like Ctrl-Backspace not working properly.

- See if there are good workflows/defaults I could use in Emacs

Re: Steel – An embeddable and extensible Scheme dialect

#159
post #88

Earlier quoted context omitted.

Yeah it is a personal issue, there are people who really like Lisp syntax (I'm one of them). That doesn't mean anything bad, of course, some people like dark text on a light background, others light text on a dark background. Everyone is different and that's what makes the world so awesome. I see something like: some-var: I64 := a * b - c ^ d ^ e; ...and my brain gives out, while I find: (let ((some-var (- (* a b) (^…

How do you look at the latter and know the code structure? Are you counting parentheses? Or are you relying on conventions around white space indentation. If the latter, are you not concerned a misplaced parentheses might make the code different from it appears? There could be bugs not shown in the indentation. Most lispers I know code in eMacs or other smart editors that provide auto code formatting and colored pare…

Use an editor that auto-inserts parens and that indents the code correctly. Now nothing bad can happen. And the parens are used to edit code structurally.

re typing: Coalton brings Haskell-like typing on top of CL. https://github.com/coalton-lang/coalton/ Other lisps are typed: typed racket, Carp… and btw, SBCL's compiler brings some welcome type warnings and errors (unlike Python, for instance).

Re: Steel – An embeddable and extensible Scheme dialect

#160

Earlier quoted context omitted.

Why? Emacs has Emacs Lisp and Neovim has Lua, it's great to be able to configure, write plugins and helper functions, in the same language.

So, if I use an editor config off the Internet, I need to inspect it for malware, because it's code, not configuration? Yes, there are languages for configuration - Jsonnet, Starlark, Dhall, which are execution safe - unlike Lisp and Lua!

FWIW, the plugin system is supposed to have sandboxing as well.
Post reply on HN