Live data from Hacker News

Gerbil – An opinionated dialect of Scheme designed for systems programming

github.com

71–80 of 80 posts

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#71
post #68
post #61

Earlier quoted context omitted.

Agree with the sentiment, but at the same time understand the rationale - FFI implies alot of GC/memory internal interfacing stuff, and to some extent expects a c-based implementation (not e.g. JVM,CLR,etc). If r7 & library interface are widely adopted, some flavors of FFI could evolve within the library/srfi process and gradually become defacto standards.. Probably hoping too much.. but in any event..

That didn't happen with R5RS, why would it happen now? Face it, by refusing to be opinionated they ensured Scheme will remain a toy.

Because r7rs large is an effort that probably is bigger than common lisp. It is very much not a toy language.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#72
post #60
post #8

Can anyone explain why there are so many implementations of Scheme written in Scheme? What is the point of doing that (apart from learning purposes)? I know, for example that people want Racket VM to be implemented in Chez Scheme because Chez is super fast. But what about all other implementations? Also, as I'm currently writing R5RS/Clojure hybrid in Kotlin, can anyone please share any _simple_ standard algorithm of…

A single unifying scheme standard? You must be new here..

r7rs is what you seek

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#73
post #28

Earlier quoted context omitted.

Yeah, you are right. I've already implemented everything from r5rs, but macro system. And I don't know where to start, just can't wrap my head around it. And people say that Scheme has a very minimalist design and is easy to implement...

You may find this paper helpful [1]. As noted there, syntax-rules consists really of two different parts: (1) the hygiene-preserving macro expander and (2) the pattern-matching facility. Once you wrap your head around the two pieces, it's actually pretty straightforward to implement them both. It's very common to write some "low-level" macro facility as a stepping-stone to syntax-rules (such as explicit-renaming macr…

Hey, thank you so much for that! Haven't seen some of those papers. Looks promising. Cheers!

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#74
post #70
post #48

Earlier quoted context omitted.

> A problem with Scheme is excessive fragmentation. Yes. And not only that, but also the fact that each Scheme implementation is slightly (at best) different from all other implementations. I guess that is because Scheme standards are not that strict (for example, compare with Java specs)

They're fairly strict; if you code to RnRS and use only SRFIs then you'll find your code to be fairly portable... And nigh-useless. The problem with the Scheme standards is that the committee refuses to be opinionated about implementation details, and so the standard is defined in terms of itself with little to no consideration for the environment in which Scheme will operate. In practical terms, this means that if y…

I don't know, every time I check different common implementations (Racket, Guile, Chicken, Chez, Kawa) - they all act very different. Very often even a very simple code snippet works fine in one implementation, but not in the other(s).

And while writing my own Scheme, I literally had to choose "Ok, I will implement this Racket-way; This I will implement Guile-way" etc.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#75
post #68

Earlier quoted context omitted.

That didn't happen with R5RS, why would it happen now? Face it, by refusing to be opinionated they ensured Scheme will remain a toy.

Because r7rs large is an effort that probably is bigger than common lisp. It is very much not a toy language.

If it doesn't have an ffi it will remain a toy that relies on implementations to make it useful.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#76
post #74
post #70

Earlier quoted context omitted.

They're fairly strict; if you code to RnRS and use only SRFIs then you'll find your code to be fairly portable... And nigh-useless. The problem with the Scheme standards is that the committee refuses to be opinionated about implementation details, and so the standard is defined in terms of itself with little to no consideration for the environment in which Scheme will operate. In practical terms, this means that if y…

I don't know, every time I check different common implementations (Racket, Guile, Chicken, Chez, Kawa) - they all act very different. Very often even a very simple code snippet works fine in one implementation, but not in the other(s). And while writing my own Scheme, I literally had to choose "Ok, I will implement this Racket-way; This I will implement Guile-way" etc.

I have found that you fairly easily can write portable r6rs code, but whenever you step outside r6rs (for stuff that isn't standard, like networking) it becomes an exhibition of cond-expand abuse.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#77
post #61

Earlier quoted context omitted.

I feel that not standardising a low level FFI for r7rs large is a mistake. They should at least recommend some reasonably low level stuff that can be used to build abstractions.

Agree with the sentiment, but at the same time understand the rationale - FFI implies alot of GC/memory internal interfacing stuff, and to some extent expects a c-based implementation (not e.g. JVM,CLR,etc). If r7 & library interface are widely adopted, some flavors of FFI could evolve within the library/srfi process and gradually become defacto standards.. Probably hoping too much.. but in any event..

I think that the best way to go about it (at least if you want to be successful) would be to write a SRFI that could easily be impkemented using the FFIs that are already out there.

Managing that, but still being flexible enough to be useful, is a huge amount of work, at least if you want to do more than just "call this c function".

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#78
post #59
post #25

Earlier quoted context omitted.

Some excellent comments there. Looking around a bit, I came across a couple of implementations that might be of interest for those wanting to mash up "some kind of system programming" and "scheme": Bigloo (interpret / compile to executables, java byte code or experimentally dot.net) and larceny (interpret / direct compile to machine code / optionally via c): http://www-sop.inria.fr/mimosa/fp/Bigloo/ http://www.larcen…

Chicken Scheme https://www.call-cc.org/ is another good one - compiles to binary, many libraries (eggs)

And can't compete in speed. But does have more libraries.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#79
post #58
post #46

Earlier quoted context omitted.

Yes, Chez & Stalin are the fastest in these benchmarks, which seems to match what the community usually answers when asked about quick implementations. Sadly Stalin is unmaintained. Its whole program optimization techniques were really advanced. I remember it even got my ivory-tower professors, who were big in the static analysis field, excited. Now, a tricky question. I'm mostly unfamiliar with Scheme for writing re…

> Will the ongoing merger of Chez with Racket make the latter a clear winner in the Scheme camp? Academically they have all the super giants of Scheme. It is now within the past few years with the renaming to Racket that the success story is just now unfolding after over 20 years of development. I think Racket will end up being the clear leader not just of scheme but of Lisp. Reminds me of when R just took off 5 or 6…

That would be amazing. I think the issue with Scheme, and in general most Lisps has been excessive fragmentation.

Re: Gerbil – An opinionated dialect of Scheme designed for systems programming

#80
post #46

Earlier quoted context omitted.

Yes, Chez & Stalin are the fastest in these benchmarks, which seems to match what the community usually answers when asked about quick implementations. Sadly Stalin is unmaintained. Its whole program optimization techniques were really advanced. I remember it even got my ivory-tower professors, who were big in the static analysis field, excited. Now, a tricky question. I'm mostly unfamiliar with Scheme for writing re…

R7RS ftw.

http://snow-fort.org/link/ very portable packages that are quite complete. R7RS provides for portable code.
Post reply on HN