[ANN] New Shen-js released

320 views
Skip to first unread message

Ramil Farkhshatov

unread,
May 28, 2015, 2:14:38 AM5/28/15
to qil...@googlegroups.com
Hello.

After a long delay (sorry about that) new version of Shen-js is released.
You can try it here:

http://gravicappa.github.io/shen-js/shen.html#.doc/welcome.html

New features

* cleaner Shen objects representation,
* green threads (look at the link above for the example),
* better FFI (look at the link above for the example),
* new shiny web UI,
* async-capable VM,
* some other nice things.

Known bugs:

* Broken Node support. Since I am not familiar with Node I haven't tried to
port related code.

Mark Tarver

unread,
May 28, 2015, 4:41:52 AM5/28/15
to qil...@googlegroups.com, ra...@gmx.co.uk, ra...@gmx.co.uk
Brilliant;  I'll link it to the Shen home page.

Mark

Ramil Farkhshatov

unread,
May 28, 2015, 4:48:27 AM5/28/15
to dr.mt...@gmail.com, qil...@googlegroups.com
Mark Tarver <dr.mt...@gmail.com> wrote:

> I'll link it to the Shen home page.

Forgot to mention that I tested it on Chrome and Firefox. I have no idea
about Internet Explorer.

Mark Tarver

unread,
May 28, 2015, 7:42:53 AM5/28/15
to qil...@googlegroups.com, ra...@gmx.co.uk, ra...@gmx.co.uk
Fine under Chrome - IE produces 

Raoul Duke

unread,
May 28, 2015, 1:13:28 PM5/28/15
to qilang
holy cow, cool & congratulations.

Ramil Farkhshatov

unread,
May 28, 2015, 2:57:04 PM5/28/15
to qil...@googlegroups.com
Raoul Duke <rao...@gmail.com> wrote:

> holy cow, cool & congratulations.

Thanks. (-;

Ramil Farkhshatov

unread,
May 28, 2015, 3:00:24 PM5/28/15
to dr.mt...@gmail.com, qil...@googlegroups.com
Mark Tarver <dr.mt...@gmail.com> wrote:

> Fine under Chrome - IE produces
>
> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>

Unfortunately I don't have access to Internet Explorer so I am unable to
debug and fix related issues.

Bruno Deferrari

unread,
May 28, 2015, 3:06:34 PM5/28/15
to qil...@googlegroups.com
Great news!

Regarding Node support, is there anything specific that is broken?

>
> --
> 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 an email to qil...@googlegroups.com.
> Visit this group at http://groups.google.com/group/qilang.
> For more options, visit https://groups.google.com/d/optout.



--
BD

Bruno Deferrari

unread,
May 28, 2015, 3:07:23 PM5/28/15
to qil...@googlegroups.com, Mark Tarver
On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> Mark Tarver <dr.mt...@gmail.com> wrote:
>
>> Fine under Chrome - IE produces
>>
>> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>
>
> Unfortunately I don't have access to Internet Explorer so I am unable to
> debug and fix related issues.
>

I have got that error in Chrome and Safari too, but only sometimes,
maybe there is a race condition?

>> On Thursday, May 28, 2015 at 9:48:27 AM UTC+1, Ramil Farkhshatov wrote:
>> >
>> > Mark Tarver <dr.mt...@gmail.com> wrote:
>> >
>> >> I'll link it to the Shen home page.
>> >
>> > Forgot to mention that I tested it on Chrome and Firefox. I have no idea
>> > about Internet Explorer.
>> >
>> >> On Thursday, May 28, 2015 at 7:14:38 AM UTC+1, Ramil Farkhshatov wrote:
>> >>>
>> >>> Hello.
>> >>>
>> >>> After a long delay (sorry about that) new version of Shen-js is
>> > released.
>> >>> You can try it here:
>> >>>
>> >>> http://gravicappa.github.io/shen-js/shen.html#.doc/welcome.html
>> >>>
>> >>> New features
>> >>>
>> >>> * cleaner Shen objects representation,
>> >>> * green threads (look at the link above for the example),
>> >>> * better FFI (look at the link above for the example),
>> >>> * new shiny web UI,
>> >>> * async-capable VM,
>> >>> * some other nice things.
>> >>>
>> >>> Known bugs:
>> >>>
>> >>> * Broken Node support. Since I am not familiar with Node I haven't
>> > tried
>> >>> to
>> >>> port related code.
>> >>>
>> >
>

Ramil Farkhshatov

unread,
May 28, 2015, 3:21:12 PM5/28/15
to uti...@gmail.com, qil...@googlegroups.com
Bruno Deferrari <uti...@gmail.com> wrote:

> On Thu, May 28, 2015 at 3:14 AM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> > Hello.
> >
> > After a long delay (sorry about that) new version of Shen-js is released.
> > You can try it here:
> >
> > http://gravicappa.github.io/shen-js/shen.html#.doc/welcome.html
> >
> > New features
> >
> > * cleaner Shen objects representation,
> > * green threads (look at the link above for the example),
> > * better FFI (look at the link above for the example),
> > * new shiny web UI,
> > * async-capable VM,
> > * some other nice things.
> >
> > Known bugs:
> >
> > * Broken Node support. Since I am not familiar with Node I haven't tried to
> > port related code.
>
> Great news!
>
> Regarding Node support, is there anything specific that is broken?

Generally it is just outdated: new Shen-js version is too different from
previous one.

Ramil Farkhshatov

unread,
May 28, 2015, 3:22:24 PM5/28/15
to uti...@gmail.com, dr.mt...@gmail.com, qil...@googlegroups.com
Bruno Deferrari <uti...@gmail.com> wrote:

> On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> > Mark Tarver <dr.mt...@gmail.com> wrote:
> >
> >> Fine under Chrome - IE produces
> >>
> >> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>
> >
> > Unfortunately I don't have access to Internet Explorer so I am unable to
> > debug and fix related issues.
> >
>
> I have got that error in Chrome and Safari too, but only sometimes,
> maybe there is a race condition?

Could you open JS console and quote the exact error message?

Bruno Deferrari

unread,
May 28, 2015, 3:26:49 PM5/28/15
to Ramil Farkhshatov, Mark Tarver, qil...@googlegroups.com
On Thu, May 28, 2015 at 4:22 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> Bruno Deferrari <uti...@gmail.com> wrote:
>
>> On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
>> > Mark Tarver <dr.mt...@gmail.com> wrote:
>> >
>> >> Fine under Chrome - IE produces
>> >>
>> >> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>
>> >
>> > Unfortunately I don't have access to Internet Explorer so I am unable to
>> > debug and fix related issues.
>> >
>>
>> I have got that error in Chrome and Safari too, but only sometimes,
>> maybe there is a race condition?
>
> Could you open JS console and quote the exact error message?
>

The text in the page says:

Error occured: Uncaught TypeError: Cannot read property 'init' of undefined

And here is what I see on the console (in Chrome, latest version, running on OSX):

http://i.imgur.com/YvF7tkm.png

This doesn't happen every time, I have to reload the page many times and sometimes it happens.
--
BD

Bruno Deferrari

unread,
May 28, 2015, 3:28:13 PM5/28/15
to Ramil Farkhshatov, Mark Tarver, qil...@googlegroups.com
On Thu, May 28, 2015 at 4:26 PM, Bruno Deferrari <uti...@gmail.com> wrote:
> On Thu, May 28, 2015 at 4:22 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
>> Bruno Deferrari <uti...@gmail.com> wrote:
>>
>>> On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk>
>>> wrote:
>>> > Mark Tarver <dr.mt...@gmail.com> wrote:
>>> >
>>> >> Fine under Chrome - IE produces
>>> >>
>>> >>
>>> >> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>
>>> >
>>> > Unfortunately I don't have access to Internet Explorer so I am unable
>>> > to
>>> > debug and fix related issues.
>>> >
>>>
>>> I have got that error in Chrome and Safari too, but only sometimes,
>>> maybe there is a race condition?
>>
>> Could you open JS console and quote the exact error message?
>>
>
> The text in the page says:
>
> Error occured: Uncaught TypeError: Cannot read property 'init' of undefined
>
> And here is what I see on the console (in Chrome, latest version, running on
> OSX):
>
> http://i.imgur.com/YvF7tkm.png
>
> This doesn't happen every time, I have to reload the page many times and
> sometimes it happens.
>

I just saw that you use the "async" option on <script> tags, could
this be related to that?
--
BD

Ramil Farkhshatov

unread,
May 28, 2015, 3:32:58 PM5/28/15
to uti...@gmail.com, dr.mt...@gmail.com, qil...@googlegroups.com
Bruno Deferrari <uti...@gmail.com> wrote:

> On Thu, May 28, 2015 at 4:22 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> > Bruno Deferrari <uti...@gmail.com> wrote:
> >
> >> On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk>
> wrote:
> >>> Mark Tarver <dr.mt...@gmail.com> wrote:
> >>>
> >>>> Fine under Chrome - IE produces
> >>>>
> >>>> <
> https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg
> >
> >>>
> >>> Unfortunately I don't have access to Internet Explorer so I am unable
> to
> >>> debug and fix related issues.
> >>>
> >>
> >> I have got that error in Chrome and Safari too, but only sometimes,
> >> maybe there is a race condition?
> >
> > Could you open JS console and quote the exact error message?
> >
>
> The text in the page says:
>
> Error occured: Uncaught TypeError: Cannot read property 'init' of undefined
>
> And here is what I see on the console (in Chrome, latest version, running
> on OSX):
>
> http://i.imgur.com/YvF7tkm.png
>
> This doesn't happen every time, I have to reload the page many times and
> sometimes it happens.

Got it. Will fix tomorrow.

Ramil Farkhshatov

unread,
May 28, 2015, 3:33:55 PM5/28/15
to uti...@gmail.com, dr.mt...@gmail.com, qil...@googlegroups.com
Bruno Deferrari <uti...@gmail.com> wrote:

> On Thu, May 28, 2015 at 4:26 PM, Bruno Deferrari <uti...@gmail.com> wrote:
> > On Thu, May 28, 2015 at 4:22 PM, Ramil Farkhshatov <ra...@gmx.co.uk> wrote:
> >> Bruno Deferrari <uti...@gmail.com> wrote:
> >>
> >>> On Thu, May 28, 2015 at 4:00 PM, Ramil Farkhshatov <ra...@gmx.co.uk>
> >>> wrote:
> >>>> Mark Tarver <dr.mt...@gmail.com> wrote:
> >>>>
> >>>>> Fine under Chrome - IE produces
> >>>>>
> >>>>>
> >>>>> <https://lh3.googleusercontent.com/-VNp0Vn4Fb3M/VWb_Kbcm1KI/AAAAAAAAGBE/jHcARRKQHKM/s1600/untitl2.jpg>
> >>>>
> >>>> Unfortunately I don't have access to Internet Explorer so I am unable
> >>>> to
> >>>> debug and fix related issues.
> >>>>
> >>>
> >>> I have got that error in Chrome and Safari too, but only sometimes,
> >>> maybe there is a race condition?
> >>
> >> Could you open JS console and quote the exact error message?
> >>
> >
> > The text in the page says:
> >
> > Error occured: Uncaught TypeError: Cannot read property 'init' of undefined
> >
> > And here is what I see on the console (in Chrome, latest version, running on
> > OSX):
> >
> > http://i.imgur.com/YvF7tkm.png
> >
> > This doesn't happen every time, I have to reload the page many times and
> > sometimes it happens.
> >
>
> I just saw that you use the "async" option on <script> tags, could
> this be related to that?

It is possible.

Raoul Duke

unread,
May 28, 2015, 4:18:14 PM5/28/15
to qilang
> Unfortunately I don't have access to Internet Explorer so I am unable to
> debug and fix related issues.

see things like
https://www.browserstack.com/test-in-internet-explorer

Ramil Farkhshatov

unread,
May 29, 2015, 1:48:23 AM5/29/15
to ra...@gmx.co.uk, dr.mt...@gmail.com, qil...@googlegroups.com, uti...@gmail.com
Should be fixed now.

Mark Tarver

unread,
May 29, 2015, 4:59:26 AM5/29/15
to qil...@googlegroups.com, ra...@gmx.co.uk, ra...@gmx.co.uk, dr.mt...@gmail.com
Your work is now directly linked to the Shen home page.

This is a great result;  definitely worth posting on Y-combinator/Hacker News etc.

Mark

Ramil Farkhshatov

unread,
Jun 3, 2015, 5:09:50 AM6/3/15
to qil...@googlegroups.com
Status update for web ui.

- Added persistent file storage (via IndexedDB).

- Added github loader. Which makes these possible:

(load "https://github.com/gravicappa/js-kl/test.shen")
(module.add-path "https://github.com/vasil-sd/shen-libs")
(module.use [defstruct maths])

- Added `.init.shen` initialisation file loading on startup.

fuzzy wozzy

unread,
Jun 4, 2015, 2:28:23 AM6/4/15
to qil...@googlegroups.com, ra...@gmx.co.uk

this is probably irrelevant to most if not all here because as long as shen-js works well with the latest popular browsers,
this would not be an issue to consider, but for an older firefox browser shen-js was loading up just fine until the newest version
and now this error shows upon loading,

Error occured: NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.removeChild]
Deploying stored filesystem

again, probably nothing to worry about for most here, but as far as popularizing shen-js, it seems that, suppose that there are 100000
lisp programmers, and 1000 shen programmers, then there are probably more than a million javascript programmers some of whom may or 
may not have heard of functional programming let alone shen, or heard of it without being convinced about its usefulness/necessity.

one way to interest a million javascript programmers in shen and shen-js would be to show through small and simple examples how adding
or combining javascript code with shen could help with their programs and projects, but then this too might be a given to most here.



Ramil Farkhshatov

unread,
Jun 5, 2015, 11:11:28 AM6/5/15
to swtch...@gmail.com, qil...@googlegroups.com
fuzzy wozzy <swtch...@gmail.com> wrote:

> Error occured: NS_ERROR_INVALID_POINTER: Component returned failure code:
> 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.removeChild]
> Deploying stored filesystem

Couldn't reproduce. Can you quote exact error message from javascript
console (invoked by Ctrl-Shift-K)?

fuzzy wozzy

unread,
Jun 5, 2015, 10:31:21 PM6/5/15
to qil...@googlegroups.com, ra...@gmx.co.uk

<upright blue triangle symbol> Unknown property 'box-sizing'. Declaration dropped.  shen.css:5

<upright blue triangle symbol> Unknown property 'user-select'. Declaration dropped. shen.css:62

<orange x> TypeError: self.db is undefined

<orange x> NS_ERROR_INVALID_POINTER: Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)   
                                                                                                                        (number 2 in white inside a red circle)        store.js:28

<orange x> InvalidStateError                                  store.js:36


in the lefthand column there appeared what looked like a time stamp for each message,
the underlined links give further messages of what might be javascript code, not sure if that much detail might be needed,
the firefox version is at least 2~3 years old, probably nothing to worry about,
just thought it odd that everything was working perfectly fine until the newest version was tried...

fuzzy wozzy

unread,
Jun 6, 2015, 12:55:47 AM6/6/15
to qil...@googlegroups.com, ra...@gmx.co.uk


my apologies, I got confused,
the line that starts with TypeError has the link of store.js:28,
and the line that starts with NS_ERROR has the link of boot.js:49.

Ramil Farkhshatov

unread,
Jun 6, 2015, 2:40:20 AM6/6/15
to swtch...@gmail.com, qil...@googlegroups.com
fuzzy wozzy <swtch...@gmail.com> wrote:

> <orange x> TypeError: self.db is undefined

Should be fixed.

> <orange x> NS_ERROR_INVALID_POINTER: Component returned failure code:
> 0x80004003 (NS_ERROR_INVALID_POINTER)

Should be fixed as well.

> the firefox version is at least 2~3 years old, probably nothing to
> worry about, just thought it odd that everything was working perfectly
> fine until the newest version was tried...

I added persistent storage (apparently not supported by old Firefox) a
little bit carelessly.

fuzzy wozzy

unread,
Jun 6, 2015, 9:15:56 AM6/6/15
to qil...@googlegroups.com, ra...@gmx.co.uk

now shen-js loads up, but the input box where shen function can be typed to be sent to the output is gone,
is the previous version before the persistent storage still available for download?

1 million javascript programmers would be using the latest browsers anyway, but someone mentioned a glitch
with the latest safari also, but there's potential that 1 million javascript programmers could find shen-js useful
and interesting with proper introduction, that's exciting.

fuzzy wozzy

unread,
Jun 6, 2015, 11:17:07 AM6/6/15
to qil...@googlegroups.com, ra...@gmx.co.uk

I just noticed that shen functions can be typed directly into the output screen now,
so instead of input box that's gone, output screen works like a shen repl, which to me is easier to use.
on the previous version nothing could be typed into the output screen directly.

Ramil Farkhshatov

unread,
Jun 6, 2015, 3:36:05 PM6/6/15
to swtch...@gmail.com, qil...@googlegroups.com
fuzzy wozzy <swtch...@gmail.com> wrote:

>
> now shen-js loads up, but the input box where shen function can be typed to
> be sent to the output is gone,

You shoud be able to type there without separate input box.

> is the previous version before the persistent storage still available for
> download?

Sure. It's stored in git repository after all. But current version
should handle lack of support correctly.

Mark Tarver

unread,
Jun 7, 2015, 7:54:29 PM6/7/15
to qil...@googlegroups.com, ra...@gmx.co.uk, swtch...@gmail.com, ra...@gmx.co.uk
Excellent work that gets better;  I do have a problem under Windows with upload files which I assume allows me to load a file from my computer?  It allows me to browse but I cannot go into any folder.

Mark

Ramil Farkhshatov

unread,
Jun 8, 2015, 3:24:08 AM6/8/15
to dr.mt...@gmail.com, qil...@googlegroups.com
Mark Tarver <dr.mt...@gmail.com> wrote:

> ... which I assume allows me to load a file from my computer?

Correct.

> It allows me to browse but I cannot go into any folder.

Dialog that allows you to choose files from your local filesystem is
created and managed by your browser. And it doesn't support uploading of
directories.

Mark Tarver

unread,
Jun 9, 2015, 6:09:45 AM6/9/15
to qil...@googlegroups.com, dr.mt...@gmail.com, swtch...@gmail.com, ra...@gmx.co.uk
OK; resolved.  We should push this JS work;  I'll post on comp.lang.lisp and comp.lang.functional.

Mark

Artella Coding

unread,
Jun 13, 2015, 7:11:05 AM6/13/15
to qil...@googlegroups.com, ra...@gmx.co.uk
Is there a way for people writing blog posts to automatically load code into your javascript repl? For example Mark Thom has written a post at https://groups.google.com/d/msg/qilang/aTLUwLxcBWc/x_CCVQ3tSvQJ and it would be nice to be able to click a "play" button for each code snippet and have it load in your javascript repl. FPComplete has this on its haskell site e.g. https://www.fpcomplete.com/school/starting-with-haskell/basics-of-haskell/2-my-first-program

Ramil Farkhshatov

unread,
Jun 13, 2015, 4:19:40 PM6/13/15
to artella...@googlemail.com, qil...@googlegroups.com
Artella Coding <artella...@googlemail.com> wrote:

> Is there a way for people writing blog posts to automatically load code
> into your javascript repl? For example Mark Thom has written a post
> at https://groups.google.com/d/msg/qilang/aTLUwLxcBWc/x_CCVQ3tSvQJ and it
> would be nice to be able to click a "play" button for each code snippet and
> have it load in your javascript repl. FPComplete has this on its haskell
> site
> e.g. https://www.fpcomplete.com/school/starting-with-haskell/basics-of-haskell/2-my-first-program

I will think about API for something like that. Currently you can start
REPL with existing file opened by appending `#path/of/file/in/fs` to the
url. Also you can run code from html-pages that are already loaded into
REPL (there is `run` icon at the right bottom corner of code block).

> On Thursday, May 28, 2015 at 7:14:38 AM UTC+1, Ramil Farkhshatov wrote:
> >
> > Hello.
> >
> > After a long delay (sorry about that) new version of Shen-js is released.
> > You can try it here:
> >
> > http://gravicappa.github.io/shen-js/shen.html#.doc/welcome.html
> >
> > New features
> >
> > * cleaner Shen objects representation,
> > * green threads (look at the link above for the example),
> > * better FFI (look at the link above for the example),
> > * new shiny web UI,
> > * async-capable VM,
> > * some other nice things.
> >
> > Known bugs:
> >
> > * Broken Node support. Since I am not familiar with Node I haven't tried
> > to
> > port related code.
> >
>

Ramil Farkhshatov

unread,
Jun 20, 2015, 4:19:47 PM6/20/15
to qil...@googlegroups.com
Now it should work in Internet Explorer® 11. Just barely tested though.
Reply all
Reply to author
Forward
0 new messages