The S series kernels are less friendly than the pre-S to the introduction of functions that are not defined within a Shen session. The S series copes more rigorously with undefined functions than the pre-S (see
and polices the role of partial applications more effectively. But one casualty is the ability to easily import functions that are part of the native platform.
S 33.0 copes with this by introducing a foreign declaration that usurps the usual S series
protocols and declares the function to be defined outside the session.
e.g. 32.03
Shen, copyright (C) 2010-2020 Mark Tarver
www.shenlanguage.org, Shen Professional Edition 32.03
running under Common Lisp, implementation: SBCL
port 3.2 ported by Mark Tarver
commercially licensed to Mark Tarver
(0-) (foo 1 2 3)
fn: foo is undefined
(1-) (APPEND [1 2 3] [4 5 6])
The value
(1 2 3)
is not of type
(OR FUNCTION SYMBOL)
(2-) (cl.kl-to-lisp [f a b])
fn: cl.kl-to-lisp is undefinedcl.kl-to-lisp exists but is buried inside the image.
____________________________________________________________________
Shen, www.shenlanguage.org, copyright (C) 2010-2022, Mark Tarver
version: S33.0, language: Common Lisp, platform: SBCL 2.0.0
port 3.2, ported by Mark Tarver
(0-) (APPEND [1 2 3] [4 5 6])
The value
(1 2 3)
is not of type
(OR FUNCTION SYMBOL)
when binding FUNCTION
(1-) ((foreign APPEND) [1 2 3] [4 5 6])
[1 2 3 4 5 6]
(2-) (cl.kl-to-lisp [f a b])
fn: cl.kl-to-lisp is undefined
(3-) ((foreign cl.kl-to-lisp) [f a b])
[f [QUOTE a] [QUOTE b]]
This is useful in simplifying Yggdrasil which actually needs 'foreign' code to work wrt Lisp. It seems useful enough to incorporate in a new kernel release.
Expect as a cloud patch in SP and in a kernel release later.
Mark