electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Faux Pas Quartet and friends Music From Last Thursday
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
Why would you want to murder a shred?
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Antimon



Joined: Jan 18, 2005
Posts: 3619
Location: Sweden
Audio files: 254
G2 patch files: 95

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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. Wink

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 1611
Location: Berks County, PA
Audio files: 34

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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.

_________________
one finds oneself counting,
one knows not what,
notes in a stream, steps in a forest,
years in a life, items in a list of todo's;
counting,
planning,
always getting ready to come down on the one
Back to top
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 3619
Location: Sweden
Audio files: 254
G2 patch files: 95

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
emSynth

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use