Author |
Message |
Antimon

Joined: Jan 18, 2005 Posts: 4146 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Sun Aug 19, 2012 7:12 am Post subject:
Why would you want to murder a shred? Subject description: ...or how I stopped worrying and learned to love the while condition |
 |
|
There is currently a little discussion on the mailing list regarding how you kill shreds in a controlled fashion. I try to keep an open mind and want to learn stuff, so my question is if anyone here feels that a ChucK where you can't kill shreds from the outside is useless, and if so, for what purpose do you use ChucK in this manner?
My knee-jerk reaction (stemming from best practices for Java threads) is that you don't kill a shred, you send it a message and let it shut itself down, usually by changing some property so that the condition for the main while loop in the shred switches from true to false.
I usually don't spork shreds from the command line, I rather have everything in one big source code file, and I understand that many of you have loads of little source code files that you don't want to mix together. So the problem there is that you can't send a message to a shred from the command line.
Regarding that I wonder, are many of these shreds noodle-type things that play themselves completely, or do you control them using HID or MIDI or OSC? If it's noodles then OK, we're at a dead end, but if you control them why not have a standardized way to kill shreds from HID, MIDI or OSC that you always include first thing?
I'm not posting this to the ChucK mailing list since I feel like I am not part of the ChucKists who feel that this is a problem, but rather than derail that thread I post this. Feel free to ignore if you want.
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
Acoustic Interloper

Joined: Jul 07, 2007 Posts: 1943 Location: Berks County, PA
Audio files: 81
|
Posted: Wed Aug 22, 2012 7:23 am Post subject:
Re: Why would you want to murder a shred? Subject description: ...or how I stopped worrying and learned to love the while condition |
 |
|
Antimon wrote: |
My knee-jerk reaction (stemming from best practices for Java threads) is that you don't kill a shred, you send it a message and let it shut itself down, usually by changing some property so that the condition for the main while loop in the shred switches from true to false.
I usually don't spork shreds from the command line, I rather have everything in one big source code file, and I understand that many of you have loads of little source code files that you don't want to mix together. So the problem there is that you can't send a message to a shred from the command line. |
I agree with all of that. Java deprecated the methods for stopping threads from the outside because it's hard to do cleanly in the library and it is sloppy and error prone from the application perspective. It probably is worse on multicore.
I too just use one source file per project. One could use an off-the-shelf preprocessor to glue "libraries" together, but an "import" statement would be better.
Is the language actively being developed, or is it essentially in maintenance mode? I am on the maillist, but most days I don't read it. I have to admit that finding time to learn SC (after all it's got a BOOK) and getting better at using my Pacarana have higher priority for me. I am using ChucK with a student, though, because I really like its dataflow model of programming. _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks. |
|
Back to top
|
|
 |
Antimon

Joined: Jan 18, 2005 Posts: 4146 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Wed Aug 22, 2012 2:42 pm Post subject:
Re: Why would you want to murder a shred? Subject description: ...or how I stopped worrying and learned to love the while condition |
 |
|
Acoustic Interloper wrote: |
I agree with all of that. Java deprecated the methods for stopping threads from the outside because it's hard to do cleanly in the library and it is sloppy and error prone from the application perspective. It probably is worse on multicore.
I too just use one source file per project. One could use an off-the-shelf preprocessor to glue "libraries" together, but an "import" statement would be better.
Is the language actively being developed, or is it essentially in maintenance mode? I am on the maillist, but most days I don't read it. I have to admit that finding time to learn SC (after all it's got a BOOK) and getting better at using my Pacarana have higher priority for me. I am using ChucK with a student, though, because I really like its dataflow model of programming. |
Well ChucK isn't Java, and I'm not dismissing the idea that you might want to be able to kill shreds, I just want to learn about the kind of workflow where you want to do that.
Regarding development, I think I've seen a "new version coming up" message once a year for a while now. It may be that at one time this promise will be fulfilled, but I'm not holding my breath. _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
 |
|