[ANN] Shen OS Kernel 20.0 Release

210 views
Skip to first unread message

Bruno Deferrari

unread,
Apr 23, 2017, 9:06:01 PM4/23/17
to qil...@googlegroups.com
Hi everyone. A new release of Shen OS Kernel was published on Github.

Details can be found here:


The files named "ShenOSKernel-${VERSION}.${EXTENSION}" contain pre-generated klambda files, make sure to download those if you don't want to generate the .kl files yourself.

A full changelog that includes changes in previous releases can be found here (specially 19.3, a bugfix release that was never announced to the mailing list):


A matching release of Shen-SBCL will be published shortly, meanwhile you can clone the repository here:


It has been updated to Shen OS Kernel 20.0 already, and includes fixes that make it work with newer versions of SBCL on Windows.

If anyone finds any issue when upgrading their port, please let me know.

--
BD

Chris Double

unread,
Apr 23, 2017, 10:39:00 PM4/23/17
to qil...@googlegroups.com
If I load "make.shen" and run (make) on the new sources from shen
scheme (which is using Shen 19.3) I notice the generated KLambda
definitions for dict, etc are prefixed with "shen." but in the
packaged KLambda files they aren't. Am I doing something wrong for
them to be different?

--
http://bluishcoder.co.nz

Bruno Deferrari

unread,
Apr 23, 2017, 10:42:28 PM4/23/17
to qil...@googlegroups.com
Yes, it is a bug in shen-scheme, because of how it overrides system function checking (because of it, the calls to systemf -- what makes those functions not have prefixes when compiled with older versions -- in make.shen are ignored). This will not be a problem anymore once I publish the next shen-scheme release.

Meanwhile, you can use the SBCL port (and probably most other ports) if you want to regenerate the .kl files (any version >= 19.2 will do).


--
http://bluishcoder.co.nz

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Chris Double

unread,
Apr 23, 2017, 11:21:27 PM4/23/17
to qil...@googlegroups.com
On Mon, Apr 24, 2017 at 2:42 PM, Bruno Deferrari <uti...@gmail.com> wrote:
> Yes, it is a bug in shen-scheme, because of how it overrides system function
> checking (because of it, the calls to systemf -- what makes those functions
> not have prefixes when compiled with older versions -- in make.shen are
> ignored). This will not be a problem anymore once I publish the next
> shen-scheme release.
>
> Meanwhile, you can use the SBCL port (and probably most other ports) if you
> want to regenerate the .kl files (any version >= 19.2 will do).

That makes sense, thanks. 'dict', etc work fine now. Looks like the
version is stlil set to 19.3.1 in the source:

https://github.com/Shen-Language/shen-sources/blob/master/sources/declarations.shen#L85

--
http://bluishcoder.co.nz

Bruno Deferrari

unread,
Apr 23, 2017, 11:21:57 PM4/23/17
to qil...@googlegroups.com
Ouch! thanks for spotting that, will fix now.
 


--
http://bluishcoder.co.nz

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Bruno Deferrari

unread,
Apr 23, 2017, 11:28:31 PM4/23/17
to qil...@googlegroups.com
I updated the download files in place (and tag), for anyone who has downloaded one of the distribution files already, please download it again to get the version fix.
--
BD

Tatsuya Tsuda

unread,
Apr 24, 2017, 9:27:57 AM4/24/17
to Shen
Thanks for the update!
Did a straight update of Shen-C to 20.0.

One thing noticed is that you have to also update the test suite due to the new filter function, or otherwise it will fail at the qmachine test.
About the performance, without any dict function overwrites, the test suite run time went from 190 secs to 133 secs.

Tatsuya Tsuda

2017年4月24日月曜日 10時06分01秒 UTC+9 Bruno Deferrari:

Bruno Deferrari

unread,
Apr 24, 2017, 9:38:11 AM4/24/17
to qil...@googlegroups.com
On Mon, Apr 24, 2017 at 10:19 AM, Tatsuya Tsuda <ota...@gmail.com> wrote:
Thanks for the update!
Did a straight update of Shen-C to 20.0.

One thing noticed is that you have to also update the test suite due to the new filter function, or otherwise it will fail at the qmachine test.
About the performance, without any dict function overwrites, the test suite run time went from 190 secs to 133 secs.


Thanks, that interesting information. I have only compared the SBCL and Scheme ports so far, but the experience was the same, both got faster without any additional changes when upgraded to the 20.0 kernel, but the performance improvements in Shen-C look far more impressive :)

If you already provided your own `hash`, adding your own dict functions will help but not that much, the pure Shen implementation of dicts may not be optimal but it is decent (given a performant `hash` function). I suggest you take care of the `*/or` functions first, it is less work and I think it will yield greater gains (read https://github.com/Shen-Language/wiki/wiki/PortDeveloperNotes#exception-less-or-functions to see which ones are good to override).
 
Tatsuya Tsuda

2017年4月24日月曜日 10時06分01秒 UTC+9 Bruno Deferrari:
Hi everyone. A new release of Shen OS Kernel was published on Github.

Details can be found here:


The files named "ShenOSKernel-${VERSION}.${EXTENSION}" contain pre-generated klambda files, make sure to download those if you don't want to generate the .kl files yourself.

A full changelog that includes changes in previous releases can be found here (specially 19.3, a bugfix release that was never announced to the mailing list):


A matching release of Shen-SBCL will be published shortly, meanwhile you can clone the repository here:


It has been updated to Shen OS Kernel 20.0 already, and includes fixes that make it work with newer versions of SBCL on Windows.

If anyone finds any issue when upgrading their port, please let me know.

--
BD

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send email to qil...@googlegroups.com.

Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Bruno Deferrari

unread,
Apr 24, 2017, 9:48:15 AM4/24/17
to qil...@googlegroups.com
For port maintainers: if possible, can you take and share a measurement of how long does it take for your port to run the test suite before and after the upgrade to 20.0? Nothing should get slower for any port (and it is likely that things get a bit faster), but just to be sure.
--
BD

Tatsuya Tsuda

unread,
Apr 24, 2017, 9:57:22 PM4/24/17
to Shen
Yes, I have my own native hash function (djb2 hash).
I have now overwritten value/or and <-address/or, but they didn't show noticeable performance improvements.
For exception handling in Shen-C, it is based on sigsetjmp/siglongjmp and it seems to be fast enough.

2017年4月24日月曜日 22時38分11秒 UTC+9 Bruno Deferrari:
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+un...@googlegroups.com.
To post to this group, send email to qil...@googlegroups.com.

Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

deech

unread,
Apr 25, 2017, 4:06:40 PM4/25/17
to Shen
I have updated the shen-elisp port (https://github.com/deech/shen-elisp) and provided native Elisp implementations of the 'dict' API. There is no noticeable difference in performance possibly because I was using native hash maps before. The test suite completes successfully in 40-45 seconds.
-deech

Bruno Deferrari

unread,
Apr 25, 2017, 4:12:03 PM4/25/17
to qil...@googlegroups.com
On Tue, Apr 25, 2017 at 5:06 PM, deech <aditya...@gmail.com> wrote:
I have updated the shen-elisp port (https://github.com/deech/shen-elisp) and provided native Elisp implementations of the 'dict' API. There is no noticeable difference in performance possibly because I was using native hash maps before. The test suite completes successfully in 40-45 seconds.
-deech


To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.

To post to this group, send email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

deech

unread,
Apr 25, 2017, 4:15:39 PM4/25/17
to Shen
Haha, *just* fixed that!

Bruno Deferrari

unread,
Apr 25, 2017, 4:15:48 PM4/25/17
to qil...@googlegroups.com
On Tue, Apr 25, 2017 at 5:12 PM, Bruno Deferrari <uti...@gmail.com> wrote:
On Tue, Apr 25, 2017 at 5:06 PM, deech <aditya...@gmail.com> wrote:
I have updated the shen-elisp port (https://github.com/deech/shen-elisp) and provided native Elisp implementations of the 'dict' API. There is no noticeable difference in performance possibly because I was using native hash maps before. The test suite completes successfully in 40-45 seconds.
-deech



(I mean the dict<- instead of <-dict)
 

And another question, I notice that dicts are implemented here in the same way they are implemented in pure Shen instead of using native hash tables, is there any limitation to elisp's hash tables that prevented you from using them?



--
BD

deech

unread,
Apr 25, 2017, 4:17:43 PM4/25/17
to Shen
It does use a hash table underneath. All vectors in shen-elisp are hash tables.
BD

Mark Thom

unread,
Apr 26, 2017, 9:39:24 PM4/26/17
to Shen
I've updated my port to version 20, and it will soon be available on Github (Hackage will be a while).

It passes the version 20 test suite with a run time of 45 seconds.

Bruno Deferrari

unread,
Apr 27, 2017, 9:28:06 PM4/27/17
to qil...@googlegroups.com
Ok, just made a new release of shen-scheme that has been updated to work with the new kernel version.

On Wed, Apr 26, 2017 at 10:39 PM, Mark Thom <markjor...@gmail.com> wrote:
I've updated my port to version 20, and it will soon be available on Github (Hackage will be a while).

It passes the version 20 test suite with a run time of 45 seconds.

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.

To post to this group, send email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Neal Alexander

unread,
Apr 28, 2017, 3:00:39 AM4/28/17
to Shen
Does shen-scheme build with Chez scheme? Oracle open sourced it, and the performance is supposedly pretty good.


On Friday, April 28, 2017 at 3:28:06 AM UTC+2, Bruno Deferrari wrote:
Ok, just made a new release of shen-scheme that has been updated to work with the new kernel version.
On Wed, Apr 26, 2017 at 10:39 PM, Mark Thom <markjor...@gmail.com> wrote:
I've updated my port to version 20, and it will soon be available on Github (Hackage will be a while).

It passes the version 20 test suite with a run time of 45 seconds.

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+un...@googlegroups.com.

To post to this group, send email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Bruno Deferrari

unread,
Apr 28, 2017, 8:50:14 AM4/28/17
to qil...@googlegroups.com
On Fri, Apr 28, 2017 at 3:44 AM, Neal Alexander <nha...@gmail.com> wrote:
Does shen-scheme build with Chez scheme? Oracle open sourced it, and the performance is supposedly pretty good.


Not yet. It is first on the list, but it will take some time (a big chunk has to be rewritten to support non R7RS schemes, and I don't have much time to spend on it at the moment, there are some pending things in Shen OS Kernel that I want to take care off first).
 
On Friday, April 28, 2017 at 3:28:06 AM UTC+2, Bruno Deferrari wrote:
Ok, just made a new release of shen-scheme that has been updated to work with the new kernel version.

On Wed, Apr 26, 2017 at 10:39 PM, Mark Thom <markjor...@gmail.com> wrote:
I've updated my port to version 20, and it will soon be available on Github (Hackage will be a while).

It passes the version 20 test suite with a run time of 45 seconds.

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+un...@googlegroups.com.
To post to this group, send email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.

To post to this group, send email to qil...@googlegroups.com.
Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Chris Double

unread,
May 1, 2017, 3:52:04 AM5/1/17
to qil...@googlegroups.com
I'm getting values of 'closure' as the tail of the list when doing a
'dict-keys'. Here's an example:

(set a (dict 10))
(dict-> (value a) "abcd" 10)
(dict-keys (value a))
=> ["abcd"]
(dict-> (value a) "abcde" 10)
(dict-keys (value a))
=> ["abcde" "abcd"]

(dict-> (value a) "abcdefgh" 10)
(dict-keys (value a))
=> ["abcde" "abcd" | #<closure> anon-fn-1331]

It happens if the 'hash' of the key is the same as a previous hash in
the dictionary but is a different object. ie. a hash collision with
the key.

This is using the default 'dict' and 'hash' implementations. This is
in Shen Wasp, but in Shen C a similar issue occurs but it's an error:

(dict-keys (value a))
Should be a function object

--
http://bluishcoder.co.nz

Bruno Deferrari

unread,
May 1, 2017, 8:35:22 AM5/1/17
to qil...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Shen" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qilang+unsubscribe@googlegroups.com.
To post to this group, send an email to qil...@googlegroups.com.

Visit this group at https://groups.google.com/group/qilang.
For more options, visit https://groups.google.com/d/optout.



--
BD

Chris Double

unread,
May 1, 2017, 9:26:43 AM5/1/17
to qil...@googlegroups.com
On Tue, May 2, 2017 at 12:35 AM, Bruno Deferrari <uti...@gmail.com> wrote:
> Fixed in
> https://github.com/Shen-Language/shen-sources/commit/c581033743494bfe301c45fee2130256a1437d52

Thanks, this fixed it for me.

--
http://bluishcoder.co.nz

Tatsuya Tsuda

unread,
May 1, 2017, 11:45:58 AM5/1/17
to Shen, chris....@double.co.nz
Seems that Shen-C has an issue for the evaluation of lists in lambda application.


(cons 1 [2 3])
=> [1 2 3]

(defun f (x y) (cons x y))
(f 1 [2 3])
=> [1 2 3]

((/. x y (cons x y)) 1 [2 3])
=> Should be a function object

Thanks for the catch!


Tatsuya Tsuda

2017年5月1日月曜日 16時52分04秒 UTC+9 Chris Double:

Tatsuya Tsuda

unread,
May 1, 2017, 10:56:31 PM5/1/17
to Shen, chris....@double.co.nz
Fixed the list evaluation issue in Shen-C and confirmed the dict-fold fix by updating Shen-C to 20.1.


2017年5月2日火曜日 0時45分58秒 UTC+9 Tatsuya Tsuda:
Reply all
Reply to author
Forward
0 new messages