Quit command

20 views
Skip to first unread message

Toby Gifford

unread,
Jan 5, 2017, 3:19:09 AM1/5/17
to extemp...@googlegroups.com
Does extempore have a command that will cause it to quit? Other than deliberately seg-faulting.

Andrew Sorensen

unread,
Jan 5, 2017, 4:17:12 AM1/5/17
to extemp...@googlegroups.com, Toby Gifford
You're probably after:

(quit 0)

But this is still pretty brute force. There's no elegant quit.


On 5 January 2017 6:19:08 pm AEST, Toby Gifford <toby.g...@gmail.com> wrote:
Does extempore have a command that will cause it to quit? Other than deliberately seg-faulting.


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Toby Gifford

unread,
Jan 5, 2017, 6:45:07 PM1/5/17
to extemp...@googlegroups.com
How does the aot build system manage it? What I'm trying to do is call extempore like a command line function and parse it's output in a perl script. I'm doing this already with "extempore --print-devices", but want to do something similar with "extempore --eval \"(sys:load \"libs/external/portmidi.xtm\") (pm_print_devices)\"
or equivalent with --run option. Is there a recommended way to control what extempore outputs? I guess I can redirect STDOUT from within an extempore script, though that's probably not portable

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Extempore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelan...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Sorensen

unread,
Jan 5, 2017, 6:55:19 PM1/5/17
to extemp...@googlegroups.com
You're obviously going to have some trouble with this as we use stdout as the Extempore log :(

But that aside you just want this right?

<start file blah.xtm>
(println "Toby's output goes here!")
(quit 0)
<close file blah.xtm>

$ ./extempore --run blah.xtm

OR alternatively

$ ./extempore --eval "(begin (println \""Toby output\"") (quit 0))"

where the \""quoting\"" will depend on the platform and the shell (this example from windows powershell)



To unsubscribe from this group and stop receiving emails from it, send an email to extemporelang+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Extempore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelang+unsubscribe@googlegroups.com.

Andrew Sorensen

unread,
Jan 5, 2017, 6:56:38 PM1/5/17
to extemp...@googlegroups.com
would you not be better off writing to a file and then parsing the file with perl?

Andrew Sorensen

unread,
Jan 5, 2017, 7:12:38 PM1/5/17
to extemp...@googlegroups.com
another alternative might be to use system, popen etc..


Reply all
Reply to author
Forward
0 new messages