Giter Club home page Giter Club logo

Comments (8)

mame avatar mame commented on June 12, 2024

Great!

Does Logo emit any extra lines? I don't like to include logo.sh.

from quine-relay.

xyproto avatar xyproto commented on June 12, 2024

Yes, unfortunately, it adds these two lines at the end:

Thank you for using Logo.
Have a nice day.

I can see if I can change the Makefile so that logo.sh isn't needed.

from quine-relay.

pczarn avatar pczarn commented on June 12, 2024

This should work

logo < QR.logo | head -n-2 > QR.lua
LOGO="sh -c 'logo | head -n-2' <"
exec "$LOGO QR.logo > QR.lua"
function ucblogo { sh -c "logo < $1" | head -n-2; }
ucblogo QR.logo > QR.lua

Thanks for other packages!

from quine-relay.

mame avatar mame commented on June 12, 2024

I think that ucblogo prints the message only when the source code is read from stdin.
Did you try to just invoke it with a filename:

logo QR.logo

instead of <$1 logo?

from quine-relay.

pczarn avatar pczarn commented on June 12, 2024

This version always starts REPL and prints the message after bye. @xyproto cleverly passes source code to stdin.

$ logo
? bye
Thank you for using Logo.
Have a nice day.

from quine-relay.

mame avatar mame commented on June 12, 2024

Which version is used? I think that AUR provides ucblogo-6.0 (as far as I read the package information) and the version actually handles a file input correctly:

$ wget http://www.cs.berkeley.edu/~bh/downloads/ucblogo.tar.gz
$ tar xzf ucblogo.tar.gz
$ cd ucblogo-6.0/
$ ./configure
$ make
$ cat ~/t.logo 
PRINT "Hello
BYE
$ ./logo ~/t.logo
Hello
$ 

coms.c of ucblogo prints the message only when loadstream == stdin.

NODE *lbye(NODE *args) {
...
    if (ufun != NIL || loadstream != stdin) exit(0);
...
    ndprintf(stdout, "%t\n", message_texts[THANK_YOU]);
    ndprintf(stdout, "%t\n", message_texts[NICE_DAY]);

from quine-relay.

pczarn avatar pczarn commented on June 12, 2024
/usr/bin/ld: cannot find -ltermcap

After installing aur/termcap

term.o: In function `lcleartext':
/home/piotr/Desktop/src/ucblogo-6.0/term.c:234: undefined reference to `tgoto'
term.o: In function `lsetcursor':
/home/piotr/Desktop/src/ucblogo-6.0/term.c:285: undefined reference to `tgoto'

from quine-relay.

mame avatar mame commented on June 12, 2024

curses provides tgoto.

from quine-relay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.