S39.1 install with Tk boot up slow and buggy

125 views
Skip to first unread message

Robert Herman

unread,
Apr 24, 2025, 2:43:52 PM4/24/25
to Shen
I recently installed S39.1 with Tk on my Windows 11 box. I have had ActiveState's tcl v. 8.6 on my computer. I am on a relatively powerful and current laptop, but the gui takes ~5 or more seconds to populate the interface window.

I've also had it crash when trying to run the included calculator.shen program based on the YouTube video that also shows how to modify the bottom row buttons.

It's been many years (2018-ish) since I have played with SP, now S39.1, and I don't have a comparison.

I installed SBCL, built the exe's, changed paths in the two files per the README.txt, and the non-tk shen-sbcl.exe works as expected as a REPL.

Any tips on what may be going on here? Thanks!


Bruno Deferrari

unread,
Apr 25, 2025, 8:45:34 AM4/25/25
to qil...@googlegroups.com

Hi Robert, this is probably not the issue, but asking just in case:

Is your laptop using an ARM-based CPU by any chance? If so, it might be running the x86 Shen binaries under emulation, which would explain why it is so slow.


--
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 view this discussion, visit https://groups.google.com/d/msgid/qilang/3af2db69-fc50-48f6-ac57-9de3cb6d9859n%40googlegroups.com.


--
BD

dr.mt...@gmail.com

unread,
Apr 25, 2025, 8:50:59 AM4/25/25
to Shen
I have to reinstall this on my desktop following a shop repair.
I'll get back.

Mark

dr.mt...@gmail.com

unread,
Apr 25, 2025, 10:05:51 AM4/25/25
to Shen
Its 5 seconds to startup for my 9 year old laptop which 
isn't bad.  Desktop might be faster.  I haven't tried the
calculator program yet.

M.

dr.mt...@gmail.com

unread,
Apr 25, 2025, 10:30:48 AM4/25/25
to Shen
The calculator works fine as far as I can see.  
I just had to change some path names.

M.

dr.mt...@gmail.com

unread,
Apr 26, 2025, 7:24:09 AM4/26/25
to Shen
I've just got it on my desktop; had to change some pathnames again.
Also the default Windows editor lied about the contents of a file and
so I sacked it and replaced it by another.  Shen/tk takes 5 seconds to boot 
up with the IDE.

But there is one thing about Shen/tk that is important and I had forgotten
it.  You have to kill Shen/tk cleanly.  There is an option Exit in the IDE for
doing that.  Click on it and you will get

This will cleanly disconnect TCL/tk.  Are you sure you want to do this?

OK     Cancel

Then you click OK.  Then you can kill the windows.  If you do not you
will end up with a zombie TCL/tk process which will eat up your interaction
in your next session.   You will enter a world of confusion and the zombie
has to be killed through the Windows task manager.  

Robert Herman

unread,
May 6, 2025, 5:47:19 AM5/6/25
to Shen
Bruno, sorry for the late reply, but I do have an AMD CPU, however, I did build Shen using my installed SBC. Wouldn't it create the proper binary for Shen?

Thanks.

Rob

Robert Herman

unread,
May 6, 2025, 5:47:23 AM5/6/25
to Shen
Thank you. Yes, I do use the Exit option in the IDE.

Perhaps Bruno is right about it running on my AMD-based CPU? I did build Shen using my installed SBCL version that was up to date.

Rob

Robert Herman

unread,
May 6, 2025, 5:47:28 AM5/6/25
to Shen
I'll try again, since it has been a few weeks. Thanks.

Rob

Bruno Deferrari

unread,
May 6, 2025, 7:28:41 AM5/6/25
to qil...@googlegroups.com
Hi Robert, AMD is fine (it is an x86-64 CPU same as Intel), and that means that no emulation mode is being used to run the Shen binaries. So what I mentioned is not an issue in your case.

SBCL on Windows doesn't support ARM64 CPUs, so if you had been using an ARM64 CPU, you would still be using emulation even if you had built Shen yourself https://sbcl.org/platform-table.html



--
BD

Robert Herman

unread,
May 6, 2025, 2:03:12 PM5/6/25
to Shen
Bruno, Temporary dyslexia with AMD and ARM ;) yes, of course, thank you.

Robert Herman

unread,
May 6, 2025, 2:03:31 PM5/6/25
to Shen
Running "loadme.shen" from the Tk IDE results in the following clean output:

```
(0-) false
calc.evaluate-display
(fn calc.evaluate-display)

run time: 0.015625 secs
loaded
[tk.general#type tk.buttons#type tk.labels#type tk.frames#type tk.windows#type tk.entries#type tk.texts#type tk.packing#type tk.grids#type tk.canvases#type tk.messageboxes#type tk.fonts#type tk.drawing#type tk.winfos#type]
true
(fn calc.show) : (label --> (string --> string))
calc.infix : symbol
(fn calc.calculator) : (--> symbol)
(fn calc.call-calculator) : (--> symbol)

run time: 0.046875 secs

typechecked in 10657 inferences
loaded
[]

run time: 0.0625 secs


(0+)
```

But, when I then try to load calculator.shen a Tk window pops up with this error:

"The value cons is not of type NUMBER"

A gui of the calculator layout with buttons does not appear. Should I be sequencing this different on loading? I first loaded loadme.shen first through the Tk IDE, and then calculator.shen ghrough the IDE.

dr.mt...@gmail.com

unread,
May 6, 2025, 2:10:39 PM5/6/25
to Shen
After loading; you need to enter  (fn calc.calculator) or  (calc.calculator) to 
reconfigure the F1 key to call the calculator; you'll see the text
change from F1 to Calculator.  Then click on this button.

M.

Robert Herman

unread,
May 8, 2025, 5:53:20 AM5/8/25
to Shen
That did the trick, thank you, Mark!

dr.mt...@gmail.com

unread,
May 8, 2025, 3:02:29 PM5/8/25
to Shen
It might be an idea to install the IDE under Shen/Scheme.  I just need
the command for invoking a thread in Scheme.  In the install.lsp file
for Shen/SBCL we have

#+SBCL
(DEFUN thread (Lazy) (SB-THREAD:MAKE-THREAD Lazy))

#+SBCL
(DEFUN terminate (Thread) (trap-error (SB-THREAD:TERMINATE-THREAD Thread) (LAMBDA (E) Thread)))

#+SBCL
(update-lambda-table 'thread 1)

#+SBCL
(update-lambda-table 'terminate 1)

AFAIK the essential command for TCL/tk + IDE is the one in red.   

Mark 

Bruno Deferrari

unread,
May 8, 2025, 8:04:28 PM5/8/25
to qil...@googlegroups.com
`thread` has the same name in Shen/Scheme, what it doesn't provide is `terminate` because there is no equivalent in Chez.

(0-) (thread (freeze (pr "hello")))
#<thread 1>
hello

--
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.


--
BD

dr.mt...@gmail.com

unread,
May 9, 2025, 2:51:29 PM5/9/25
to Shen
I get 

Shen, www.shenlanguage.org, copyright (C) 2010-2023, Mark Tarver
version: S38.3, language: Scheme, platform: chez-scheme 10.0.0
port 0.36, ported by Bruno Deferrari


(0-) (thread (freeze (print 6)))
fn: thread is undefined

M.

Bruno Deferrari

unread,
May 9, 2025, 3:24:14 PM5/9/25
to qil...@googlegroups.com
You need version 0.39: https://github.com/tizoc/shen-scheme/releases/tag/v0.39

Sorry I think I haven't announced a release in this group in a while, only through GitHub's automatic notifications.




--
BD
Reply all
Reply to author
Forward
0 new messages