Hacker News new | past | comments | ask | show | jobs | submit login
LispKit: framework for Lisp-based extension/scripting languages for macOS apps (github.com/objecthub)
99 points by ingve on May 8, 2018 | hide | past | favorite | 30 comments




It would be awesome if this had an FFI for calling Swift code.


Has anyone here used guile from swift? How do the two projects compare?


The purely functional nature of LispKit was always a turnoff for me.


It is not purely functional. The main difference from r7rs scheme is that lists are immutable, but that has been the idiomatic way in scheme anyway.

It even supports generalised set!.


LispKit Lisp is purely functional [1].

I did read the GitHub announcement but was just trying to make the point that re-using names of software packages isn't a good idea, thanks for providing an example.

[1] https://en.wikipedia.org/wiki/Lispkit_Lisp


Can you still put mutable cells (refs) inside these lists?


I doubt that would be an issue. I think it has more to do about the correctness of the list implementation. In r5rs you can mutate a list from underneath your own feet, and ensuring a correct program state requires some extra checks that may slow list operations down.



It is a pitty that it does not run under linux/windows. Gnustep does not seem to help here (or wxSwift).


Somewhat tangential, but if you want to use Lisp with JS or Lua, you can use Lumen: https://github.com/sctb/lumen

I only mention it because it pretty much runs everywhere, and macOS already has a few JS and Lua-based extension mechanisms.


Shawn, Is your Lumen system compatible with COMMON-LISP (Lisp-2), or Scheme (Lisp-1) ? If Lumen is a Lisp-1 then it does not allow the same name to be used for a function and a variable simultaneously. If Lumen is a Lisp-2 then functions and variables are in separate namespaces.

Perhaps someone knows if there a library of code that you can load to make all the common-lisp functions available to you? Would that make your system a common lisp?

Is there an equivalent library you can load to make Lumen a Scheme at some compatibility level?

Thanks for your info and sharing your work.


The cool thing about Lumen is that it’s literally JavaScript: every lumen expression compiles into equivalent JS (or Lua). There aren’t any special calling conventions.

I would say Lumen is quite close to Scheme out of the box, but without syntax transformers. It wouldn't be hard to implement the missing parts of Scheme.

If you want to collaborate on some of this, shoot me an email. :)


Why is it called LispKit when there's no Lisp in it?


”LispKit implements a core language based on the R7RS (small) Scheme standard.”

Don’t you consider Scheme a Lisp?


Scheme is a Lisp like language, not a Lisp.

Parenthesis is probably the only thing they have in common.


Your claim is revisionist and, in my view, nonsense. Scheme is most certainly a Lisp. I mean, you can think what you like, and of course postmodernism is a thing, "the author is dead" and so forth, but if you look at the history, it's very, very clear that Scheme is a Lisp; that is, it is a member of the Lisp language family.

You can even read the words of the people who invented and developed the language:

"SCHEME is essentially a full-funarg LISP." - page 1, "Scheme, an interpreter for extended lambda calculus", Sussman and Steele, Dec 1975. AI memo #349.

"SCHEME is a dialect of LISP." - abstract, "The Revised Report on SCHEME, a Dialect of LISP", Steele and Sussman, Jan 1978. AI memo #452.

"Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language [...] Scheme differs from Common Lisp in its emphasis upon simplicity and function over compatibility with older dialects of Lisp." - page 4, "The Revised Revised Report on Scheme, or An UnCommon Lisp", Rees and Clinger (eds.), Aug 1985. AI memo #848.

"Scheme has influenced the evolution of Lisp. [...] Scheme was the first major dialect of Lisp to [do many things]" - introduction, "Revised^3 Report on the Algorithmic Language Scheme", Rees and Clinger (eds.), Dec 1986. ACM SIGPLAN Notices 21(12).

"Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language" - summary of the R4RS, the R5RS, the R6RS and even the bloody R7RS.

Compare and contrast to the opening words of the Introduction to CLtL2, which are "Common Lisp is a new dialect of Lisp, a successor to MacLisp, influenced strongly by Zetalisp and to some extent by Scheme and Interlisp."

If Scheme is "not a Lisp", then neither is Common Lisp.


Common Lisp is a successor ro Maclisp, which was a successor for the original Lisp implementation. Common Lisp was designed such that the old code can be ported to a modernized version of Lisp. This code moved from Lisp 1.5 to Maclisp to ZetaLisp and to Common Lisp.

Scheme OTOH has its own code bases, its own libraries, its own standards, its own books, its own community.

It is a Lisp, but that has become more or less meaningless for practical work. Being 'a Lisp" means practically very little. It's just a name with an unclear definition and less and less practical value. Thus 'a Lisp' means mostly an unspecified bunch of dialects which are in practical terms mostly unrelated.

I prefer a stronger definition, where Lisp means those dialects and their implementation which actually share code, books, libraries, tools.

Otherwise people get the impression of some compatibility, which in real life isn't given.

It's like a family member, which used to carry your name, but now has left the house and has its own life.


Ctrl+F "dialect" makes my point.


CL is a lisp dialect as well. Just because it is the biggest doesn't make it the only lisp entitled to be called a lisp


Why not call a Scheme a Scheme?

That would be natural since the language is a direct implementation of the Scheme R7RS standard and not compatible with other Lisp dialects.


> Just because it is the biggest doesn't make it the only lisp entitled to be called a lisp

That's not what's being argued, though.


Scheme is a classical example for a lisp-1. CL is a lisp-2.

> Parenthesis is probably the only thing they have in common.

Besides separation of namespaces in a lisp-2 and full, native support for continuations in scheme, which differences do you see/consider relevant?


The standard library and built-in forms that actually define the language semantics?


Macros is the most glaring omission that I can see.

Scheme's closest equivalents are neat academic exercises, but I don't consider them complete macro systems.


You do know that something like defmacro can be implemented in about 10 lines using syntax-case?


For folks who are confused, an interesting and useful article on why Scheme could be considered a Lisp, why it might not, and why it doesn't really matter. http://wiki.c2.com/?IsSchemeLisp


While it's true folks argue that it doesn't really matter (evidence: the section 'Arguments why it doesn't matter' on that page), I'll counter-argue that they're wrong. Scheme simply isn't the same language as Lisp. That's okay: the entire world doesn't need to standardise on a single language (although if it's going to, Lisp would be preferable to Scheme).

And, honestly, the arguments that it doesn't matter presented on that page are pretty weak. 'It's a pointless distraction' is an assertion, not an argument. Scheme and Lisp are different; they have different philosophies and they solve the same problems in different ways; recognising those differences is recognising the facts; ignoring them is simply ignoring reality. 'The benefits of choice far outweigh the disadvantages of redundant/wasted development work on two incompatible platforms' is clearly, I believe, falsified by the experience of the last couple of decades. When I think of the work which went into Racket (originally a Scheme, but now its own thing) and Clojure, I think of how much better Lisp could have been if that effort had instead been spent on it (and aficionados of either of those languages could say the same thing about effort spent on the other, on Lisp & on other Lisp-like languages).


Well,I think that lisp is a language family and common lisp is the most prominent member. I would guess this is the most common view.


Dylan is also a Lisp.

Is Lispkit running Dylan code?

If Lispkit only runs the Scheme dialect of Lisp and basically implements the specific R7RS dialect of Scheme, why call it Lisp and not Scheme?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: