I am thinking of the ideal version of this, an object that would give
you an inlet for STDIN then two outlets for STDOUT and STDERR, plus a
status outlet and an inlet to set what to run. It could be something
like this:
[process /usr/bin/python]
Then you could send python bits to it via the first inlet, and receive
the reply via the outlets. So something like a cleaner [shell].
.hc
On Jul 1, 2010, at 2:25 PM, Kim Cascone wrote:
I like having the outlet on [shell] so I can pipe data to the console
Hans-Christoph Steiner wrote:
motex/system works for me:
.hc
On Jun 24, 2010, at 6:58 PM, Kim Cascone wrote:
I send the following message to both the [popen] and the [shell]
externals:[cd /usr/lib/pd/extra && ls -al > ~/Desktop/foobar.txt]
when sent to [popen] it crashes Pd but sending it to [shell] worked fine
below is the crash report (pd -stderr) after sending it to [popen]
FYI: I got rid of the [moonlib] version of [popen] as well as its
help file as you can see the flatspace one is being loaded===================================
tried /usr/lib/pd/extra/flatspace/popen.pd_linux and succeeded
*** buffer overflow detected ***: pd terminated ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb76deef8] /lib/tls/i686/cmov/libc.so.6[0xb76dd000] /lib/tls/i686/cmov/libc.so.6[0xb76dc28d] /usr/lib/pd/extra/flatspace/popen.pd_linux[0xb70e2b9f] pd(pd_typedmess+0x2ab)[0x80b71db] ======= Memory map: ======== 08048000-08111000 r-xp 00000000 08:03 35809 /usr/bin/pd 08111000-08112000 r--p 000c8000 08:03 35809 /usr/bin/pd 08112000-08113000 rw-p 000c9000 08:03 35809 /usr/bin/pd 08113000-08520000 rw-p 08113000 00:00 0 09f9f000-0a089000 rw-p 09f9f000 00:00 0 [heap] b42f3000-b4348000 r-xp 00000000 08:03 34905 /usr/lib/ liboil-0.3.so.0.3.0 b4348000-b4349000 r--p 00055000 08:03 34905 /usr/lib/ liboil-0.3.so.0.3.0 b4349000-b4360000 rw-p 00056000 08:03 34905 /usr/lib/ liboil-0.3.so.0.3.0 b4360000-b4362000 rw-p b4360000 00:00 0 b4362000-b4366000 r-xp 00000000 08:03 482419 /lib/libattr.so. 1.1.0 b4366000-b4367000 r--p 00003000 08:03 482419 /lib/libattr.so. 1.1.0 b4367000-b4368000 rw-p 00004000 08:03 482419 /lib/libattr.so. 1.1.0 b4368000-b436b000 r-xp 00000000 08:03 482538 /lib/libuuid.so.1.2 b436b000-b436c000 r--p 00002000 08:03 482538 /lib/libuuid.so.1.2 b436c000-b436d000 rw-p 00003000 08:03 482538 /lib/libuuid.so.1.2 b436d000-b4405000 r-xp 00000000 08:03 34677 /usr/lib/ libxvidcore.so.4.2 b4405000-b440f000 rw-p 00098000 08:03 34677 /usr/lib/ libxvidcore.so.4.2 b440f000-b4479000 rw-p b440f000 00:00 0 b4479000-b4502000 r-xp 00000000 08:03 33520 /usr/lib/ libx264.so.68 b4502000-b4504000 rw-p 00088000 08:03 33520 /usr/lib/ libx264.so.68 b4504000-b450b000 rw-p b4504000 00:00 0 b450b000-b4526000 r-xp 00000000 08:03 1406274 /usr/lib/sse2/ libspeex.so.1.5.0 b4526000-b4527000 r--p 0001a000 08:03 1406274 /usr/lib/sse2/ libspeex.so.1.5.0 b4527000-b4528000 rw-p 0001b000 08:03 1406274 /usr/lib/sse2/ libspeex.so.1.5.0 b4528000-b4598000 r-xp 00000000 08:03 33499 /usr/lib/ libschroedinger-1.0.so.0.2.0 b4598000-b4599000 ---p 00070000 08:03 33499 /usr/lib/ libschroedinger-1.0.so.0.2.0 b4599000-b459a000 r--p 00070000 08:03 33499 /usr/lib/ libschroedinger-1.0.so.0.2.0 b459a000-b459b000 rw-p 00071000 08:03 33499 /usr/lib/ libschroedinger-1.0.so.0.2.0 b459b000-b45b8000 r-xp 00000000 08:03 36726 /usr/lib/ libopenjpeg-2.1.3.0.so b45b8000-b45b9000 r--p 0001c000 08:03 36726 /usr/lib/ libopenjpeg-2.1.3.0.so b45b9000-b45ba000 rw-p 0001d000 08:03 36726 /usr/lib/ libopenjpeg-2.1.3.0.so b45ba000-b45ce000 r-xp 00000000 08:03 33583 /usr/lib/ libopencore-amrwb.so.0.1.1 b45ce000-b45cf000 rw-p 00014000 08:03 33583 /usr/lib/ libopencore-amrwb.so.0.1.1 b45cf000-b45fc000 r-xp 00000000 08:03 33581 /usr/lib/ libopencore-amrnb.so.0.1.1 b45fc000-b45fd000 rw-p 0002c000 08:03 33581 /usr/lib/ libopencore-amrnb.so.0.1.1 b45fd000-b4609000 r-xp 00000000 08:03 35799 /usr/lib/ libgsm.so.1.0.12 b4609000-b460a000 rw-p 0000b000 08:03 35799 /usr/lib/ libgsm.so.1.0.12 b460a000-b4645000 r-xp 00000000 08:03 36722 /usr/lib/ libfaad.so.0.0.0 b4645000-b4646000 ---p 0003b000 08:03 36722 /usr/lib/ libfaad.so.0.0.0 b4646000-b4647000 r--p 0003b000 08:03 36722 /usr/lib/ libfaad.so.0.0.0 b4647000-b464a000 rw-p 0003c000 08:03 36722 /usr/lib/ libfaad.so.0.0.0 b464a000-b4658000 r-xp 00000000 08:03 33922 /usr/lib/ libfaac.so.0.0.0 b4658000-b465b000 rw-p 0000d000 08:03 33922 /usr/lib/ libfaac.so.0.0.0 b465b000-b46eb000 r-xp 00000000 08:03 36716 /usr/lib/ libdirac_encoder.so.0.1.0 b46eb000-b46ed000 rw-p 00090000 08:03 36716 /usr/lib/ libdirac_encoder.so.0.1.0 b46ed000-b46ee000 rw-p b46ed000 00:00 0 b46ee000-b46fd000 r-xp 00000000 08:03 409348 /usr/lib/i686/ cmov/libavutil.so.50.16.0 b46fd000-b46fe000 rw-p 0000f000 08:03 409348 /usr/lib/i686/ cmov/libavutil.so.50.16.0 b46fe000-b4701000 rw-p b46fe000 00:00 0 b4701000-b473b000 r-xp 00000000 08:03 482466 /lib/ libncursesw.so.5.7 b473b000-b473c000 ---p 0003a000 08:03 482466 /lib/ libncursesw.so.5.7 b473c000-b473e000 r--p 0003a000 08:03 482466 /lib/ libncursesw.so.5.7 b473e000-b473f000 rw-p 0003c000 08:03 482466 /lib/ libncursesw.so.5.7 b473f000-b4744000 r-xp 00000000 08:03 35655 /usr/lib/ libgdbm.so.3.0.0 b4744000-b4745000 r--p 00004000 08:03 35655 /usr/lib/ libgdbm.so.3.0.0 b4745000-b4746000 rw-p 00005000 08:03 35655 /usr/lib/ libgdbm.so.3.0.0 b4746000-b4749000 r-xp 00000000 08:03 482430 /lib/libcap.so.2.11 b4749000-b474a000 r--p 00002000 08:03 482430 /lib/libcap.so.2.11 b474a000-b474b000 rw-p 00003000 08:03 482430 /lib/libcap.so.2.11 b474b000-b4760000 r-xp 00000000 08:03 35314 /usr/lib/ libICE.so.6.3.0 b4760000-b4761000 rw-p 00014000 08:03 35314 /usr/lib/ libICE.so.6.3.0 b4761000-b4763000 rw-p b4761000 00:00 0 b4763000-b476a000 r-xp 00000000 08:03 35345 /usr/lib/libSM.so. 6.0.0 b476a000-b476b000 r--p 00006000 08:03 35345 /usr/lib/libSM.so. 6.0.0 b476b000-b476c000 rw-p 00007000 08:03 35345 /usr/lib/libSM.so. 6.0.0 b476c000-b4773000 r-xp 00000000 08:03 35765 /usr/lib/ libgomp.so.1.0.0 b4773000-b4774000 r--p 00006000 08:03 35765 /usr/lib/ libgomp.so.1.0.0 b4774000-b4775000 rw-p 00007000 08:03 35765 /usr/lib/ libgomp.so.1.0.0 b4775000-b47aa000 r-xp 00000000 08:03 409468 /usr/lib/i686/ cmov/libswscale.so.0.11.0 b47aa000-b47ab000 rw-p 00034000 08:03 409468 /usr/lib/i686/ cmov/libswscale.so.0.11.0 b47ab000-b47b8000 r-xp 00000000 08:03 410417 /usr/lib/i686/ cmov/libavutil.so.49.15.0 b47b8000-b47b9000 r--p 0000c000 08:03 410417 /usr/lib/i686/ cmov/libavutil.so.49.15.0 b47b9000-b47ba000 rw-p 0000d000 08:03 410417 /usr/lib/i686/ cmov/libavutil.so.49.15.0 b47ba000-b47bd000 rw-p b47ba000 00:00 0 b47bd000-b4872000 r-xp 00000000 08:03 409849 /usr/lib/i686/ cmov/libavformat.so.52.37.0 b4872000-b4879000 rw-p 000b5000 08:03 409849 /usr/lib/i686/ cmov/libavformat.so.52.37.0 b4879000-b48c5000 rw-p b4879000 00:00 0 b48c5000-b4da2000 r-xp 00000000 08:03 409836 /usr/lib/i686/ cmov/libavcodec.so.52.32.0 b4da2000-b4dad000 rw-p 004dc000 08:03 409836 /usr/lib/i686/ cmov/libavcodec.so.52.32.0 b4dad000-b51cf000 rw-p b4dad000 00:00 0 b51cf000-b52da000 r-xp 00000000 08:03 36599 /usr/lib/ libcxcore.so.1.0.0 b52da000-b52db000 r--p 0010a000 08:03 36599 /usr/lib/ libcxcore.so.1.0.0 b52db000-b52e2000 rw-p 0010b000 08:03 36599 /usr/lib/ libcxcore.so.1.0.0 b52e2000-b52eb000 rw-p b52e2000 00:00 0 b52eb000-b531b000 r-xp 00000000 08:03 482499 /lib/libpcre.so. 3.12.1 b531b000-b531c000 r--p 0002f000 08:03 482499 /lib/libpcre.so. 3.12.1 b531c000-b531d000 rw-p 00030000 08:03 482499 /lib/libpcre.so. 3.12.1 b531d000-b5326000 r-xp 00000000 08:03 36707 /usr/lib/ liba52-0.7.4.so b5326000-b5327000 rw-p 00008000 08:03 36707 /usr/lib/ liba52-0.7.4.so b5327000-b5328000 rw-p b5327000 00:00 0 b5328000-b5339000 r-xp 00000000 08:03 36284 /usr/lib/ libv4lconvert.so.0 b5339000-b533a000 r--p 00010000 08:03 36284 /usr/lib/ libv4lconvert.so.0 b533a000-b533b000 rw-p 00011000 08:03 36284 /usr/lib/ libv4lconvert.so.0 b533b000-b538b000 rw-p b533b000 00:00 0 b538b000-b5390000 r-xp 00000000 08:03 35785 /usr/lib/ libgpm.so.2.0.0 b5390000-b5391000 r--p 00004000 08:03 35785 /usr/lib/ libgpm.so.2.0.0 b5391000-b5392000 rw-p 00005000 08:03 35785 /usr/lib/ libgpm.so.2.0.0 b5392000-b542d000 r-xp 00000000 08:03 482516 /lib/libslang.so. 2.1.3 b542d000-b5430000 r--p 0009a000 08:03 482516 /lib/libslang.so. 2.1.3 b5430000-b543d000 rw-p 0009d000 08:03 482516 /lib/libslang.so. 2.1.3 b543d000-b5473000 rw-p b543d000 00:00 0 b5473000-b54a2000 r-xp 00000000 08:03 482464 /lib/ libncurses.so.5.7 b54a2000-b54a4000 r--p 0002e000 08:03 482464 /lib/ libncurses.so.5.7 b54a4000-b54a5000 rw-p 00030000 08:03 482464 /lib/ libncurses.so.5.7 b54a5000-b54c1000 r-xp 00000000 08:03 35476 /usr/lib/ libcaca.so.0.99.16 b54c1000-b54c2000 r--p 0001b000 08:03 35476 /usr/lib/ libcaca.so.0.99.16 b54c2000-b5549000 rw-p 0001c000 08:03 35476 /usr/lib/ libcaca.so.0.99.16 b5549000-b554d000 rw-p b5549000 00:00 0 b554d000-b5560000 r-xp 00000000 08:03 35550 /usr/lib/ libdirect-1.0.so.0.1.0 b5560000-b5561000 r--p 00012000 08:03 35550 /usr/lib/ libdirect-1.0.so.0.1.0 b5561000-b5562000 rw-p 00013000 08:03 35550 /usr/lib/ libdirect-1.0.so.0.1.0 b5562000-b5569000 r-xp 00000000 08:03 35632 /usr/lib/ libfusion-1.0.so.0.1.0 b5569000-b556a000 r--p 00006000 08:03 35632 /upd_gui: pd
process exited Aborted
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
The arc of history bends towards justice. - Dr. Martin Luther
King, Jr.
I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits. - Martin
Luther King, Jr.
On 01/07/10 20:20, Hans-Christoph Steiner wrote:
I am thinking of the ideal version of this, an object that would give you an inlet for STDIN then two outlets for STDOUT and STDERR, plus a status outlet and an inlet to set what to run. It could be something like this:
[process /usr/bin/python]
Then you could send python bits to it via the first inlet, and receive the reply via the outlets. So something like a cleaner [shell].
.hc
I had a similar idea once, more along the lines of using Pd for hooking up pipes as a shell:
https://code.goto10.org/svn/maximus/2007/pish/
I have no recollection any more of how far I got with that project, so it probably doesn't work let alone build...
BTW/OT just yesterday I figured out how to redirect stdout to stderr in bash:
#!/bin/bash
echo "this goes to stdout"
echo "this goes to stderr" 1>&2
(Which should have been obvious from the familiar "pd -stderr 2>&1")
#!/bin/bash echo "this goes to stdout" echo "this goes to stderr" 1>&2 (Which should have been obvious from the familiar "pd -stderr 2>&1")
Yep I use a similar trick in UNIX find, like trying to find .pd files:
I am thinking of the ideal version of this, an object that would give you
an inlet for STDIN then two >outlets for STDOUT and STDERR, plus a status outlet and an inlet to set what to run. It could be >something like this:
[process /usr/bin/python]
Then you could send python bits to it via the first inlet, and receive the
reply via the outlets. So >something like a cleaner [shell].
NIce hc. That's an interesting object, sending messages in a simple way to a shell process running in the background should be fairly easy. Just didn't get what you mean by status outlet..
best regards, Pedro
On Jul 2, 2010, at 3:47 AM, Pedro Lopes wrote:
#!/bin/bash echo "this goes to stdout" echo "this goes to stderr" 1>&2 (Which should have been obvious from the familiar "pd -stderr 2>&1")
Yep I use a similar trick in UNIX find, like trying to find .pd files:
- find / -name "*.pd*" -type f -print 2>/dev/null
I am thinking of the ideal version of this, an object that would
give you an inlet for STDIN then two >outlets for STDOUT and STDERR,
plus a status outlet and an inlet to set what to run. It could besomething like this:
[process /usr/bin/python]
Then you could send python bits to it via the first inlet, and
receive the reply via the outlets. So >something like a cleaner
[shell].NIce hc. That's an interesting object, sending messages in a simple
way to a shell process running in the background should be fairly
easy. Just didn't get what you mean by status outlet..
Want to implement it? :-D The status outlet would give you info like
the name of the process running, whether its still running, etc.
.hc
Programs should be written for people to read, and only incidentally
for machines to execute.
It could also be interesting to kill the process from pd. A bit of kill scripting is easy.
About implementing, I can try to sketch something out.. but nothing earlier than the 16th... I have a deliverable to get ready until then! :(
Best regards, Pedro
On Fri, Jul 2, 2010 at 9:42 PM, Hans-Christoph Steiner hans@at.or.atwrote:
On Jul 2, 2010, at 3:47 AM, Pedro Lopes wrote:
#!/bin/bash
echo "this goes to stdout" echo "this goes to stderr" 1>&2 (Which should have been obvious from the familiar "pd -stderr 2>&1")
Yep I use a similar trick in UNIX find, like trying to find .pd files:
- find / -name "*.pd*" -type f -print 2>/dev/null
I am thinking of the ideal version of this, an object that would give you
an inlet for STDIN then two >outlets for STDOUT and STDERR, plus a status outlet and an inlet to set what to run. It could be >something like this:
[process /usr/bin/python]
Then you could send python bits to it via the first inlet, and receive
the reply via the outlets. So >something like a cleaner [shell].
NIce hc. That's an interesting object, sending messages in a simple way to a shell process running in the background should be fairly easy. Just didn't get what you mean by status outlet..
Want to implement it? :-D The status outlet would give you info like the name of the process running, whether its still running, etc.
.hc
Programs should be written for people to read, and only incidentally for machines to execute.
- from Structure and Interpretation of Computer Programs
On Thu, 1 Jul 2010, Hans-Christoph Steiner wrote:
I am thinking of the ideal version of this, an object that would give you an inlet for STDIN then two outlets for STDOUT and STDERR, plus a status outlet and an inlet to set what to run. It could be something like this: [process /usr/bin/python]
Yes, it's a good idea. I sometimes dream of things like that. Make sure you add something for the child process ID, and have a "kill" (or general "signal") feature.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Exactly my point. Having a kill inlet or a kill message. I can make some prototypes from the 16th forth, nothing till then... work comes first!
On Sun, Jul 4, 2010 at 3:56 PM, Mathieu Bouchard matju@artengine.ca wrote:
at. Make sure you add something for the child process ID, and have a "kill" (or general "signal") feature.
I guess there should be a third inlet for the signals? I see
something like this:
STDIN signals process name
| | |
| | |
[process /usr/sbin/httpd]
| | |
| | |
STDOUT STDERR status messages, like PID, current process name,
state, etc.
.hc
On Jul 4, 2010, at 12:04 PM, Pedro Lopes wrote:
Exactly my point. Having a kill inlet or a kill message. I can make some prototypes from the 16th forth, nothing till then...
work comes first!On Sun, Jul 4, 2010 at 3:56 PM, Mathieu Bouchard
matju@artengine.ca wrote: at. Make sure you add something for the child process ID, and have a
"kill" (or general "signal") feature.-- Pedro Lopes contacto: jazz@radiozero.pt website: http://web.ist.utl.pt/Pedro.Lopes
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone." --Bjarne Stroustrup (creator of C++)
On 2010-07-08 01:09, Hans-Christoph Steiner wrote:
I guess there should be a third inlet for the signals? I see something like this:
STDIN signals process name | | | | | | [process /usr/sbin/httpd] | | | | | | STDOUT STDERR status messages, like PID, current process name, state, etc.
hmm, iirc "process name" is there mainly to override the process given as the argument.
sending a new "process name" (e.g. "/usr/sbin/apache2") into the last inlet surely won't start the new process, would it? for me starting a new process seems to be a very "hot" action.
then i don't see a reason why we need different inlets for "process name" and "signals", as both are there to control the the current/future process from "outside".
so i would basically simplify this to the attached interface.
as for sending signals: even though i like signals very much, there is no such concept on w32 (or at least it is not readily available for the little programmer). personally i would hate to have the 5th object for the same task that is still highly platform dependent.
On Jul 8, 2010, at 3:30 AM, IOhannes m zmoelnig wrote:
On 2010-07-08 01:09, Hans-Christoph Steiner wrote:
I guess there should be a third inlet for the signals? I see
something like this:STDIN signals process name | | | | | | [process /usr/sbin/httpd] | | | | | | STDOUT STDERR status messages, like PID, current process name, state, etc.
hmm, iirc "process name" is there mainly to override the process given as the argument.
sending a new "process name" (e.g. "/usr/sbin/apache2") into the last inlet surely won't start the new process, would it? for me starting a new process seems to be a very "hot" action.
then i don't see a reason why we need different inlets for "process name" and "signals", as both are there to control the the current/ future process from "outside".
so i would basically simplify this to the attached interface.
as for sending signals: even though i like signals very much, there is no such concept on w32 (or at least it is not readily available for
the little programmer). personally i would hate to have the 5th object for the same task
that is still highly platform dependent.
Your example seems backwards to me. STDIN is definitely a hot action,
and most likely the inlet that is going to be used the most. I
imagine many users would never change the program that is being run.
STDOUT will most likely be the main outlet used, i.e the result, so
that really should be the first outlet. The process information is
meta/info/status stuff like in [hid], [comport], etc. so it should be
the right outlet like them.
I could see combining the signal and process inlets into one second
meta inlet, but it seems to me that since there are just two messages
(run and signal), why not just make each have their own inlet and
spare the patcher from having to build up messages as much.
.hc
'You people have such restrictive dress for women,’ she said, hobbling
away in three inch heels and panty hose to finish out another pink-
collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
On 2010-07-08 18:24, Hans-Christoph Steiner wrote:
Your example seems backwards to me. STDIN is definitely a hot action,
STDIN is far from being a hot action "definitely". it's entirely at the process's disposition, whether it will do something with the stdin or not.
anyhow, whether it's backward or not depends on your pov. if you see [process] as an object that interacts with system-processes, then i think my approach is straight-forward. if you think of the object as being a representation of the process, and thus the process being just another Pd-object, then my approach looks backwards.
it seems like I (IOhannes) see this object as an interface to the external world (ihde's "external" tool), whereas you (Hans-Christoph) see the ibject as a way to internalize functionality into Pd (ihde's tool "as an extension")
this basically means, that the question is not solveable :-)
and most likely the inlet that is going to be used the most.
or not. i prefer to not make too many assumptions about what the users are going to do, but rather try to make the interface consistent, regardless of what they are actually doing.
i guess, people are using [shell] to startup an small script. and startup the script again. and again, not worrying to much about the output (mainly due to the fact how stdout/stderr are handled with [shell]). if [process] is gooing to replace [shell], then people are probably going to use the meta-inlets and -outlets most. so...
anyhow, the proposed object is merely an extension to the current [shell]. you could even write an abstraction with the current [shell] and some small wrapper-script that is more or less doing the same as proposed.
it probably would be a good idea to keep compatibility.
I imagine many users would never change the program that is being run. STDOUT will most likely be the main outlet used, i.e the result, so that really should be the first outlet. The process information is meta/info/status stuff like in [hid], [comport], etc. so it should be the right outlet like them.
i'm thinking more in terms of extensibility. it seems like we all agree on the meta-outlet being a [route]able-message. i think of the stdout and stderr as being messages without a given selector. putting the stderr and stdout before the meta, makes it hard to add new backtalk channels (e.g. pipes).
its similar to [route] where the reject-outlet moves to the right, whenever you add new selectors. it's one of the behaviours that annoyed me most. (so that's an argument for both sides)
I could see combining the signal and process inlets into one second meta inlet, but it seems to me that since there are just two messages (run and signal), why not just make each have their own inlet and spare the patcher from having to build up messages as much.
hmm, what's harder to do: create one of those fuzzy messages, or fiddling with the tiny iolets? personally i think the former is simpler to do. in addition, i think that the former is simpler to read as well, as it is an implicit documentation)
anyhow, i'm still convinced that creating and deleting a process (the guts of this object) is "hotter" than sending data to it, which it might or might not ignore.
fgmasdr IOhannes
We have [ggee/shell], [motex/system], [flatspace/popen], and [moonlib/
popen], so I see little reason to make "yet another" or a
replacement. Instead, the idea that is most interesting to me is to
make an object that allows you to easily run externals processes as if
they were pd objects. That's why STDIN, STDOUT, and STDERR would be
the focus.
.hc
On Jul 8, 2010, at 12:48 PM, IOhannes m zmoelnig wrote:
On 2010-07-08 18:24, Hans-Christoph Steiner wrote:
Your example seems backwards to me. STDIN is definitely a hot
action,STDIN is far from being a hot action "definitely". it's entirely at the process's disposition, whether it will do
something with the stdin or not.anyhow, whether it's backward or not depends on your pov. if you see [process] as an object that interacts with system- processes, then i think my approach is straight-forward. if you think of the object as being a representation of the process,
and thus the process being just another Pd-object, then my approach looks backwards.it seems like I (IOhannes) see this object as an interface to the external world (ihde's "external" tool), whereas you (Hans-Christoph) see the ibject as a way to internalize functionality into Pd (ihde's tool "as an extension")
this basically means, that the question is not solveable :-)
and most likely the inlet that is going to be used the most.
or not. i prefer to not make too many assumptions about what the users are
going to do, but rather try to make the interface consistent, regardless of what they are actually doing.i guess, people are using [shell] to startup an small script. and startup the script again. and again, not worrying to much about the output (mainly due to the fact how stdout/stderr are handled with
[shell]). if [process] is gooing to replace [shell], then people are probably going to use the meta-inlets and -outlets most. so...anyhow, the proposed object is merely an extension to the current [shell]. you could even write an abstraction with the current [shell] and some small wrapper-script that is more or less doing the same as proposed.
it probably would be a good idea to keep compatibility.
I imagine many users would never change the program that is being run. STDOUT will most likely be the main outlet used, i.e the result, so that
really should be the first outlet. The process information is meta/info/ status stuff like in [hid], [comport], etc. so it should be the right outlet like them.i'm thinking more in terms of extensibility. it seems like we all agree on the meta-outlet being a [route]able- message. i think of the stdout and stderr as being messages without a given
selector. putting the stderr and stdout before the meta, makes it hard to add
new backtalk channels (e.g. pipes).its similar to [route] where the reject-outlet moves to the right, whenever you add new selectors. it's one of the behaviours that
annoyed me most. (so that's an argument for both sides)I could see combining the signal and process inlets into one second
meta inlet, but it seems to me that since there are just two messages (run and signal), why not just make each have their own inlet and spare
the patcher from having to build up messages as much.hmm, what's harder to do: create one of those fuzzy messages, or fiddling with the tiny iolets? personally i think the former is simpler to do. in addition, i think that the former is simpler to read as well, as it is an implicit documentation)
anyhow, i'm still convinced that creating and deleting a process (the guts of this object) is "hotter" than sending data to it, which it
might or might not ignore.fgmasdr IOhannes
All information should be free. - the hacker ethic
Yes of course, there's a lot of "wheels" out there, no need to reinvent it. Just combine a bit with the possibility of sending signals, STDIN, STDOUT, status and STDERR and we get ourselves a new "car".
On Thu, Jul 8, 2010 at 6:03 PM, Hans-Christoph Steiner hans@at.or.atwrote:
We have [ggee/shell], [motex/system], [flatspace/popen], and [moonlib/popen], so I see little reason to make "yet another" or a replacement. Instead, the idea that is most interesting to me is to make an object that allows you to easily run externals processes as if they were pd objects. That's why STDIN, STDOUT, and STDERR would be the focus.
.hc
On Jul 8, 2010, at 12:48 PM, IOhannes m zmoelnig wrote:
On 2010-07-08 18:24, Hans-Christoph Steiner wrote:
Your example seems backwards to me. STDIN is definitely a hot action,
STDIN is far from being a hot action "definitely". it's entirely at the process's disposition, whether it will do something with the stdin or not.
anyhow, whether it's backward or not depends on your pov. if you see [process] as an object that interacts with system-processes, then i think my approach is straight-forward. if you think of the object as being a representation of the process, and thus the process being just another Pd-object, then my approach looks backwards.
it seems like I (IOhannes) see this object as an interface to the external world (ihde's "external" tool), whereas you (Hans-Christoph) see the ibject as a way to internalize functionality into Pd (ihde's tool "as an extension")
this basically means, that the question is not solveable :-)
and most likely the inlet that is going to be used the most.
or not. i prefer to not make too many assumptions about what the users are going to do, but rather try to make the interface consistent, regardless of what they are actually doing.
i guess, people are using [shell] to startup an small script. and startup the script again. and again, not worrying to much about the output (mainly due to the fact how stdout/stderr are handled with [shell]). if [process] is gooing to replace [shell], then people are probably going to use the meta-inlets and -outlets most. so...
anyhow, the proposed object is merely an extension to the current [shell]. you could even write an abstraction with the current [shell] and some small wrapper-script that is more or less doing the same as proposed.
it probably would be a good idea to keep compatibility.
I imagine
many users would never change the program that is being run. STDOUT will most likely be the main outlet used, i.e the result, so that really should be the first outlet. The process information is meta/info/status stuff like in [hid], [comport], etc. so it should be the right outlet like them.
i'm thinking more in terms of extensibility. it seems like we all agree on the meta-outlet being a [route]able-message. i think of the stdout and stderr as being messages without a given selector. putting the stderr and stdout before the meta, makes it hard to add new backtalk channels (e.g. pipes).
its similar to [route] where the reject-outlet moves to the right, whenever you add new selectors. it's one of the behaviours that annoyed me most. (so that's an argument for both sides)
I could see combining the signal and process inlets into one second meta inlet, but it seems to me that since there are just two messages (run and signal), why not just make each have their own inlet and spare the patcher from having to build up messages as much.
hmm, what's harder to do: create one of those fuzzy messages, or fiddling with the tiny iolets? personally i think the former is simpler to do. in addition, i think that the former is simpler to read as well, as it is an implicit documentation)
anyhow, i'm still convinced that creating and deleting a process (the guts of this object) is "hotter" than sending data to it, which it might or might not ignore.
fgmasdr IOhannes
All information should be free. - the hacker ethic
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Thu, 8 Jul 2010, IOhannes m zmoelnig wrote:
On 2010-07-08 18:24, Hans-Christoph Steiner wrote:
Your example seems backwards to me. STDIN is definitely a hot action,
STDIN is far from being a hot action "definitely". it's entirely at the process's disposition, whether it will do something with the stdin or not.
It depends what one means by "hot". Miller's Pd Intro doesn't develop the concept of "hotness" sufficiently enough to make some important distinctions, and this is what we are stumbling upon in this case.
I realise now that I have tended to ignore Miller's definition in favour of my own intuitive concepts.
I would call "hot" any message that goes beyond modifying the contents of the object, be it outputting by outlets, writing to a file, etc.
But it still doesn't explain things like whether displaying something on screen can be considered a hot action. Perhaps "hot" vs "cold" is insufficient and we should use 3 or 4 words instead of 2.
anyhow, whether it's backward or not depends on your pov. if you see [process] as an object that interacts with system-processes, then i think my approach is straight-forward. if you think of the object as being a representation of the process, and thus the process being just another Pd-object, then my approach looks backwards.
That change of perspective is related to what I mean, too.
In the end it depends on which border-crossings constitute the hot concept : if I only do "sed s/foo/bar/" with stdin and stdout, I could call it cold from the perspective of whether inputting causes an immediate outputting, and then I'd say cold. But if I consider the overall use of that object over time, inlet messages eventually cause the outlet messages to be produced (albeit with a different timing), which may be called hot in the context of that patch, or cold in the context of the patch containing that patch (depending on whether those messages reach an [outlet]). And then if I do "sed s/foo/bar/ > /tmp/bar" I'm doing something that can be considered hot or cold for various reasons including who will look at "/tmp/bar", and what it is that we call an "output".
i prefer to not make too many assumptions about what the users are going to do, but rather try to make the interface consistent, regardless of what they are actually doing.
do you have ideas for which words we could introduce in documentation, to replace the ambiguïty and insufficiency of the "hot" concept ? that's a topic I'm getting quite interested in.
going to use the meta-inlets and -outlets most. so...
Excuse me, what's a meta-inlet ?
it seems like we all agree on the meta-outlet being a [route]able-message.
which messages are not "[route]able" ?
i think of the stdout and stderr as being messages without a given selector.
what is "a message without a selector" ? Pd does not know this concept.
And btw, why wouldn't we have this swiss-army [process] thingy work with byte values just like mrpeach's socket thingies would do ?... Do you think it would be natural, that the most flexible shell-tool would be in sync with the most flexible network-tools, for things as similar to each other as sockets and pipes are ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
personally i would hate to have the 5th object for the same task that is still highly platform dependent.
I understand what you mean, but also understand that making such cross-platform object would require a large amount of effort or at least a group of people that can contribute for the different OSs out there.
The fun side of being open source is also this one. As Ive said before I can try to help with this object from 16th up, but even so I'd never would do it for Windows, simply because I have no interest in it :) But once again, the beauty of open source is that if a thing is readable enough and easily extensible, it then can be altered to fit more operating systems. (beware that the differences between OSs will show at some point... that's something to consider*).
shell in Win. Nor how to kill a process, and so forth...
On Thu, Jul 8, 2010 at 8:30 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote:
personally i would hate to have the 5th object for the same task that is still highly platform dependent.
On 2010-07-08 18:27, Pedro Lopes wrote:
The fun side of being open source is also this one. As Ive said before I can try to help with this object from 16th up, but even so I'd never would do it for Windows, simply because I have no interest in it :) But once again, the beauty of open source is that if a thing is readable enough and easily extensible, it then can be altered to fit more operating systems. (beware that the differences between OSs will show at some point... that's something to consider*).
- i.e.: I have no clue on how to run a process on the background of the
shell in Win. Nor how to kill a process, and so forth...
me neither. but i do know that there are no signals in w32 as we know them from un*x. if an object is designed around features not available on a certain platform, chances are low that the object will ever be available on this very platform, regardless of whether there is a team of experts waiting to port it or not.
fmasdr IOhannes