Getting standard ports under source control

97 views
Skip to first unread message

Robert Koeninger

unread,
Apr 4, 2017, 8:47:27 PM4/4/17
to Shen
I made a github repo for the sbcl port source and got it building on ci.

Problem is, when I build locally, and run Shen.exe, I get the repl, but it doesn't respond to input. I can type characters, but <enter> doesn't make anything happen. Any ideas on what this might be?

Also, is there a way to pipe input to Shen.exe? I want to be able to have the CI script direct it to the tests and run them, like in my port.

Also also, there was a short back and forth between Bruno and I about what a pre-built downloadable of shen-sources might look like, and this would be a application of it. Instead of having the klambda/ and tests/ checked into the git repo, it could be downloaded and extracted as a dependency into a sub-directory that is .gitignore'd. The package would really just need to contain klambda/, tests/ at a minimum, probably also a copy of the license.

Also also also, the repo for shen-sbcl can be transferred to the Shen-Language github org, so it can receive community support, have bugs filed against it, and be visible to passers-by.

Bruno Deferrari

unread,
Apr 4, 2017, 9:30:23 PM4/4/17
to qil...@googlegroups.com
On Tue, Apr 4, 2017 at 9:39 PM, Robert Koeninger <robertk...@gmail.com> wrote:
I made a github repo for the sbcl port source and got it building on ci.

Problem is, when I build locally, and run Shen.exe, I get the repl, but it doesn't respond to input. I can type characters, but <enter> doesn't make anything happen. Any ideas on what this might be?


I have no idea what it could be. On which platform are you running it? if you type the "^" character and enter, does it suspend the current input and show the prompt again?
 
Also, is there a way to pipe input to Shen.exe? I want to be able to have the CI script direct it to the tests and run them, like in my port.


Neal Alexander has his own fork of the SBCL port which contains some extra features: https://github.com/NHALX/Shen-SBCL
What I think you will find useful is the ability to run a script without having to open the REPL.
 
Also also, there was a short back and forth between Bruno and I about what a pre-built downloadable of shen-sources might look like, and this would be a application of it. Instead of having the klambda/ and tests/ checked into the git repo, it could be downloaded and extracted as a dependency into a sub-directory that is .gitignore'd. The package would really just need to contain klambda/, tests/ at a minimum, probably also a copy of the license.

Also also also, the repo for shen-sbcl can be transferred to the Shen-Language github org, so it can receive community support, have bugs filed against it, and be visible to passers-by.

Having the repo in the Shen-Language org is easy, what is missing is a voluntary to own it. Ideally someone that uses the SBCL port and has some Common Lisp knowledge (enough to review and test patches).

I can help with reviews with needed, maybe even write some patches, but I would rather not be the main maintainer of that repository, I don't think I would be able to pay it the attention it deserves, and I don't use the SBCL port much.

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

Robert Koeninger

unread,
Apr 4, 2017, 11:46:42 PM4/4/17
to Shen
The "^" causes "line read aborted", and a new prompt with the same number "(0-)". Using SBCL 1.3.15 and the KL copy from my ShenSharp repo, version 19.3.1.

I don't know much about CL either, I just wanted it to have a proper repo with build script and CI. And I'd never seen Neal's repo. That should be linked somewhere.
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 5, 2017, 7:46:41 AM4/5/17
to qil...@googlegroups.com
On Wed, Apr 5, 2017 at 12:19 AM, Robert Koeninger <robertk...@gmail.com> wrote:
The "^" causes "line read aborted", and a new prompt with the same number "(0-)". Using SBCL 1.3.15 and the KL copy from my ShenSharp repo, version 19.3.1.


Ok, that means it is at least reading and interpreting the input characters. What are you typing that doesn't work? and what OS?
 
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

Samuel Falvo II

unread,
Apr 5, 2017, 7:58:26 PM4/5/17
to Shen
Is ENTER returning the correct character code, or does Shen not care if it's \r or \n?  Also, I've seen some key mappings cause the ENTER key on the numeric keypad to return some ESC string instead of a more sane character code.  Are you pressing RETURN (next to the apostrophy key on US keyboard layouts, above the right-hand shift key), or ENTER (on the numeric keypad)?  Does it behave the same with both keys?

Robert Koeninger

unread,
Apr 5, 2017, 10:40:34 PM4/5/17
to Shen
I'm just trying "(+ 1 2)". Running on Windows 10. The pre-built windows binary that comes in the standard download works just fine.

Bruno Deferrari

unread,
Apr 5, 2017, 10:52:10 PM4/5/17
to qil...@googlegroups.com
I just cloned your repo and updated my version of SBCL to the latest (1.3.16).

I compiled a new binary of Shen using the files in that repository and with this SBCL version on OSX, but I can't reproduce the issue:

faust /t/shen-sbcl git:master✓ > ./Shen.exe

Shen, copyright (C) 2010-2015 Mark Tarver
www.shenlanguage.org, Shen 19.3.1
running under Common Lisp, implementation: SBCL
port 2.0 ported by Mark Tarver

(0-) (+ 1 2)
3

(1-) (output "1 + 2 = ~A" (+ 1 2))
1 + 2 = 3"1 + 2 = 3"

I don't know what it could be, input obviously works, otherwise "^" would not work for aborting input.

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 8, 2017, 10:42:46 AM4/8/17
to qil...@googlegroups.com
Robert, were you able to figure this out?
--
BD

Bruno Deferrari

unread,
Apr 8, 2017, 3:25:00 PM4/8/17
to qil...@googlegroups.com
I'm playing with the SBCL port a bit, making sure it works fine with Shen 20 (not released yet).

After removing the overwrite function for `shen.lookup-func` I was able to compile the new version of the kernel. All tests pass and time went down from 5.7 to 4.6 seconds on my machine, without any other changes.

While I go through it I'm going to pay attention to see if I notice something that may be related to the issue you have with REPL input.
--
BD

Bruno Deferrari

unread,
Apr 8, 2017, 4:23:00 PM4/8/17
to qil...@googlegroups.com
Uploaded here, using Robert's repository as a base:

https://github.com/Shen-Language/shen-sbcl

Changes so far:

- updated to ShenOS 20 pre-release
- add *sterror* port
- add (exit N) function.

--
BD

Robert Koeninger

unread,
Apr 8, 2017, 4:23:24 PM4/8/17
to Shen
It also works fine in my Ubunutu VM, so it looks like a Windows-specific problem.

I remember when working on Shen for .Net, I had to add some buffering to the standard input stream so the Shen REPL would read each line in correctly. Without that buffering, the user would need to hit enter twice.

This isn't exactly the same symptom though. Here, it just never recognizes the end of the input stream. Which is weird, because the version of Shen.exe that comes in the standard download was probably built on a windows machine, as I believe Mark works on windows.
BD

Robert Koeninger

unread,
Apr 9, 2017, 8:17:06 PM4/9/17
to Shen
Bruno, I pulled your changes back into my repo. I builds locally, but I get this error on CI:

https://travis-ci.org/rkoeninger/shen-sbcl#L1572

Symbol "EXIT" not found in the SB-EXT package.

It still has the input problem. Maybe sbcl isn't passing through the newline char?

--
BD



--
BD



--
BD

Bruno Deferrari

unread,
Apr 9, 2017, 8:29:14 PM4/9/17
to qil...@googlegroups.com
On Sun, Apr 9, 2017 at 9:13 PM, Robert Koeninger <robertk...@gmail.com> wrote:
Bruno, I pulled your changes back into my repo. I builds locally, but I get this error on CI:

https://travis-ci.org/rkoeninger/shen-sbcl#L1572

Symbol "EXIT" not found in the SB-EXT package.

It still has the input problem. Maybe sbcl isn't passing through the newline char?


Well, it seems the SBCL version travis uses it too old. I just checked and sb-ext:exit requires 1.0.56.55 or greater (and that travis install has 1.0.55).

Anyway, I pushed a change that uses SBCL's foreign function interface to call the system's exit funcition, that should do for now.

I will let you know if I figure out whats up with newlines. I checked the code that handles reading lines in the REPL but I couldn't find anything wrong. In case you want to experiment with it, It is the function toplineread_loop in toplevel.shen.

Try adding this as the first line in that function:

  Byte _ <- (do (output "byte: ~A~%" Byte) (fail))

It is going to be noisy, but it will let you see what bytes are being read by Shen, newlines shoud contain 10, 13 or a combination of both.
 
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 9, 2017, 8:42:43 PM4/9/17
to qil...@googlegroups.com
I created an account on travis and added the repo in Shen-Language.


Btw, note that I updated the README to link to that one, remember that if you pull from the new repo because your README is going to point to the new one.
--
BD

Robert Koeninger

unread,
Apr 9, 2017, 9:56:43 PM4/9/17
to Shen
Pull in your change - CI build works again.

So i added the (do (print V3817) ...) statement to toplineread_loop. When I typed "(+ 1 2)" and hit Enter, it spit out "400430320490320500410100".

So all the character codes appear to be multiplied by 10.

SBCL also only passes through line feed (10), which should work.

Bruno Deferrari

unread,
Apr 9, 2017, 10:24:02 PM4/9/17
to qil...@googlegroups.com
I created a new issue here: https://github.com/Shen-Language/shen-sbcl/issues/1

We can continue there.

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

Robert Koeninger

unread,
Apr 10, 2017, 12:29:53 AM4/10/17
to Shen
Can I transfer the source repo to the Shen-Language organization? It's weird to have issues opened on the fork.

I believe I need the ability to create repos in the org to do the transfer. And think you'll have to delete the fork (?) since they'll have the same name.

Bruno Deferrari

unread,
Apr 10, 2017, 8:06:28 AM4/10/17
to qil...@googlegroups.com
Mmm... afaik, not without losing the already created issues (it is not that they are many).

I think the only non-destructive way to make it a non-fork is to ask Github support to do it.

Alternatively I have to delete and repush as mirror, thats going to make it a repo on its own instead of a fork (issues will be lost).

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 10, 2017, 8:11:38 AM4/10/17
to qil...@googlegroups.com
Ok, done, it was quicker than I thought.
--
BD
Reply all
Reply to author
Forward
0 new messages