[chuck-users] proposal

Ge Wang gewang at CS.Princeton.EDU
Wed Aug 31 21:59:02 EDT 2005

Hi Eduard and all,

Adding .name() to Shreds is a very good idea.  I would also find this 
useful.  Perhaps we can allow names to be set and gotten like:

     // for Shred foo
     "foo(d)!!!" => foo.name;
     // print out the name
     <<< foo.name() >>>;

or some other syntax?

We will also add this name to the --status output.

By the way, the interface to machine.* will be changed soon to return 
shreds, not the id.  The id is still available via the .id() member.  
We can add overloaded versions of these to set names.


On Aug 31, 2005, at 8:39 PM, eduard wrote:

> Hi Ge and others,
> I have a proposal, which I don't know if people would agree it is 
> important but that I personally would find handy. I am a newbie with 
> chuck and maybe there is a way to accomplish such thing. If that were 
> the case my apologies but I couldn't figure it out from reading the 
> documentation.
> The proposal is to be able to have a  "name" public method for Shreds.
> This comes in handy when one runs the same ck-program several times 
> with different settings each time and therefore being able to 
> differentiate from each other easily.
> It has happened to me that I've removed shreds that I didn't want to.
> One could assign the name by issuing:
> machine.add("foo.ck", "foo_1")  //where foo_1 would be the name 
> obviously.
> hmm.., now that I am writting this lines I'm thinking could add and 
> remove shreds by doing:
> machine.add("foo.ck") => int foo_1_id;
> machine.remove( foo_1_id );
> However this would require keeping a "main" program, and the foo_1_id, 
> would be a local variable from the first run of the program....
> So in the end, I think it would be nice to issue ./chuck ^ and see the 
> status with more representative names than those from the ck-program 
> filenames.
> Sorry, I went a bit messy by the end of the email.
> Eduard
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list