Live data from Hacker News

Steel – An embeddable and extensible Scheme dialect

github.com

71–80 of 192 posts

Re: Steel – An embeddable and extensible Scheme dialect

#71

I want this to succeed!! please do not let the word "srfi" ever appear in the packages list...naming libraries with obscure numbers no one remembers was a terrible terrible idea that all schemes seem to perpetuate

It is a standard. What do you expect? But there are some or many Schemes that offer their own libs on top or below SRFI implementations, which then have readable names.

I expect people to willing not conform when nonconformance improves the art.

Re: Steel – An embeddable and extensible Scheme dialect

#72
post #32
post #26

Should have named it Steele since it's dragging Rust users half-way to Lisp :).

Why would you want to do that? Lisp is dynamically typed and has a GC.

It's a joke that you seem to have missed.

> We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp.

Guy Steele on Java

Re: Steel – An embeddable and extensible Scheme dialect

#73
post #18
post #7

Earlier quoted context omitted.

One option that might be suitable for a DSL, is implicit parens based on whitespace. A newline opens a new paren, and the paren closes when it reaches another line with the same indentation e.g: (defun factorial (x) (if (zerop x) 1 (* x (factorial (- x 1))))) could be rewritten as defun factorial (x) if (zerop x) 1 * x (factorial (- x 1))

Existing SRFI: SRFI 49 "Indentation-sensitive syntax": https://srfi.schemers.org/srfi-49/srfi-49.html

Thanks, I knew that there must be prior art out there. :)

Re: Steel – An embeddable and extensible Scheme dialect

#74

Earlier quoted context omitted.

Starting with R5RS compliance, then once that is achieved moving on to R7RS. I borrowed the R5RS test suite from chibi here - https://github.com/mattwparas/steel/blob/master/cogs/r5rs.sc... - only a few of these tests don't yet pass. Something like 135 pass, 4 fail, 20 skipped since I haven't implemented the primitives yet. I've only tested against a few SRFIs so far, but am also attempting to run the R7RS benchmark…

Thanks! Was this originally a "just because" project, or do you expect it to offer some improvements or advantages over existing embeddable Schemes like Chibi (as you mentioned)?

Originally started it as a school project, which then during the pandemic morphed into something to work on while cooped up. It is really a passion project, working on it is fun! There are some interesting design things I wanted to explore, like how to get good performance out of safe Rust, using unrolled linked lists or vlists instead of naive linked lists, using contracts, etc.

Chibi is an impressive scheme implementation, and it will take a long time before Steel can hit the same level of compliance as Chibi. There is not a Chibi equivalent in native Rust that I am aware of. There are other embedded scripting languages for Rust that are pleasant - but no schemes of the maturity of Chibi. So in that regard, I'm hoping to offer a compelling scheme in native Rust to make integration with Rust applications relatively easy and painless.

I also don't have a particularly strong need to be 100% completely compliant with the scheme specs. The plan is to have compatibility layers so that portable scheme code can be used, however there are things about scheme that I think Racket (for example) improved on, and I'd like to explore that as well as much as I can.

Re: Steel – An embeddable and extensible Scheme dialect

#75
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 than that.

I've only used languages like Python, Rust, C, Java, JavaScript, and they all have a very similar vibe, you have a std lib, which can interact with many things, you can build UIs, networking libraries and all that. And I could probably start using any language that is "similar" to these.

But I could never use one of these scheme/lisp languages, as I can't really grasp them.

Sorry, this comment is all over the place, because I can't really explain what's going on in my head when I see languages like this. I'd call myself a proficient programmer, but every time I look at these languages, it feels like as I've never seen code once in my lifetime.

Any help or hint at what I'm missing, is appreciated.

Re: Steel – An embeddable and extensible Scheme dialect

#77

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…

[deleted]

Re: Steel – An embeddable and extensible Scheme dialect

#78

Earlier quoted context omitted.

Thanks for the recommendation, with some brief poking around it does seem promising! It looks like the algorithm is this? https://github.com/fitzgen/bacon-rajan-cc The link to the paper seems dead unfortunately from this blog post https://nim-lang.org/blog/2020/12/08/introducing-orc.html I could see how it works as a drop in replacement for Rc

The bacon-rajan-cc link says it's stop-the-world. Samsara seems to be fully concurrent.

The bacon-rajan-cc link has only -implemented- a stop-the-world version, but notes right at the top of the README that it -can- be concurrent, and the stop-the-world-only-ness is only 'Currently.'

https://trout.me.uk/gc/ has two Recycler papers if you want more details.

Re: Steel – An embeddable and extensible Scheme dialect

#79

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…

Basically the differences are in the concepts you'll use to write code. Lisps themselves are very different from each other, but just like the languages you're used to, many lisp distributions have standard libraries that can be called, and those building blocks can be used to build applications or whatever else. In this case specifically, Steel provides the facility to call Rust functions within a Steel program: https://github.com/mattwparas/steel.

So, although I haven't used Steel, it looks like the advantage you'd get from using it is the opportunity to take advantage of features it provides like transducers and contracts, which are feature common to some other Lisps as well.

So, just like choosing any other language, it boils down to a series of tradeoffs.

Re: Steel – An embeddable and extensible Scheme dialect

#80
post #44

Earlier quoted context omitted.

You might find the Recycler algorithm interesting - nim's ORC collector is ARC + Recycler and seems to be working out rather well.

Thanks for the recommendation, with some brief poking around it does seem promising! It looks like the algorithm is this? https://github.com/fitzgen/bacon-rajan-cc The link to the paper seems dead unfortunately from this blog post https://nim-lang.org/blog/2020/12/08/introducing-orc.html I could see how it works as a drop in replacement for Rc

https://trout.me.uk/gc/ - see recycler-overview.pdf and recycler-algorithm.pdf

As with /lisp/ I tend to grab my own copies of papers I think I'll want to refer to later in case the original URL vanishes in a puff of bitrot :)

Post reply on HN