Skip to content

Conversation

@cess11
Copy link
Contributor

@cess11 cess11 commented May 8, 2018

Congrats on taking the first step to contributing to the Sample Programs in Every Language repository!

For simplicity, please make sure that your pull request includes one and only one sample program and language.

Please Complete the Following

  • I would NOT like credit for my contribution in the article (credit will be included otherwise)
  • I named the pull request using <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README

Notes

Right, so I got to make notes here at the pull request.

Next up would be to write web server versions of the picolisp examples.

If there are no Factor or Forth contributions I could probably add those as well.

@jrg94 jrg94 self-assigned this May 8, 2018
@jrg94 jrg94 self-requested a review May 8, 2018 14:24
@jrg94 jrg94 added enhancement Any code that improves the repo hello world See: https://sampleprograms.io/projects/hello-world/ reverse string See: https://sampleprograms.io/projects/reverse-string/ labels May 8, 2018
@jrg94
Copy link
Member

jrg94 commented May 8, 2018

Alright, so I cleaned up a couple things! Everything looks great.

I have a couple questions though. Both picoLisp examples run a bit odd using the online editor: https://www.jdoodle.com/execute-picolisp-online

If I run the Hello World example:

: -> "Welcome to Picolisp online ide from JDoodle.com"
: Hello, World!
-> "Hello, World!"
: 


 JDoodle - Timeout -  Some common reasons for Timeout 
Your Program may have a endless loop 
Please check the program and try again or contact JDoodle support at jdoodle@nutpan.com for more info.

Meanwhile, the string reversal example:

: -> "Welcome to Picolisp online ide from JDoodle.com"
: 
EOF Overrun
Command exited with non-zero status 1

@cess11
Copy link
Contributor Author

cess11 commented May 8, 2018

Hi!

I'm not sure why the first shows a warning. It doesn't seem to when I turn on "interactive mode".

The second probably fails because the web REPL lacks a stdin, and it seems that it tries to run the loop or script once again when 'read fails, until it hits the output or heap limit. It also seems to happen if one tries to enter values in the stdin field.

I tested both snippets in a local REPL, this is the first time I've seen a web version for picoLisp so I'm not aware of the implementation details.

@jrg94
Copy link
Member

jrg94 commented May 8, 2018

Do you have a link to the local REPL you're using? I'd like to include it in the article.

@cess11
Copy link
Contributor Author

cess11 commented May 8, 2018

http://software-lab.de/picoLisp.tgz for the rolling release, under Debian-style systems 'apt-get install picolisp' usually works, while 'pacman -S picolisp' usually works under Arch-style systems.

If you want me to I can do a couple of simple asciinema recordings you could use.

@jrg94 jrg94 changed the title Pil pull Hello World & Reverse a String in picoLisp May 8, 2018
@jrg94 jrg94 changed the title Hello World & Reverse a String in picoLisp Hello World & Reverse a String in PicoLisp May 8, 2018
@jrg94
Copy link
Member

jrg94 commented May 8, 2018

Hey, if you want, that would be awesome! I don't have a Linux machine on hand to run those tests locally.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great! Thanks for your help.

@jrg94 jrg94 merged commit d93627e into TheRenegadeCoder:master May 8, 2018
@cess11
Copy link
Contributor Author

cess11 commented May 8, 2018

Good enough?

Could probably take some more time tomorrow or during weekend to record writing down scripts and running those rather than just grabbing a short REPL session.

https://asciinema.org/a/HdFjKizOUYKdcyFoG6h4RPhjn

https://asciinema.org/a/cEkKRFzW3CIUqPXrBryPIUMBx

@jrg94
Copy link
Member

jrg94 commented May 8, 2018

This is great stuff. I appreciate the help. 😄

I'll probably embed these directly into the articles, if you don't mind.

@jrg94
Copy link
Member

jrg94 commented May 8, 2018

Also, just for reference, it seems the online REPL runs off the hook without the (bye) command.

@cess11
Copy link
Contributor Author

cess11 commented May 8, 2018

Of course, embedding them was the idea.

Ah, right, good to know. I fiddled some with it but decided it didn't change much, perhaps that online REPL doesn't recognise '# as a comment operator or something.

@jrg94 jrg94 added this to the 250 Snippets milestone Aug 13, 2018
riley-martine pushed a commit to riley-martine/sample-programs that referenced this pull request Dec 7, 2023
Hello World & Reverse a String in PicoLisp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Any code that improves the repo hello world See: https://sampleprograms.io/projects/hello-world/ reverse string See: https://sampleprograms.io/projects/reverse-string/

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants