Re: [chuck-users] manual, was; Geting strange key combinations
On 10/21/06, Adam Tindale
The manual is badly outdated. I am in the process of a major revision. Maybe we can start a page on the wiki of things to revise in the manual for the next release. If anyone wants to help I would greatly appreciate it.
Sure. I still don't speak Latex but I'd be happy to add stuff that pops up on the forum or that I stumble into myself to such a page. The forum is a good source for such material because there are a lot of people just starting out there and they ask questions if the manual is unclear or outdated. I'd be happy to write a few paragraphs as well on areas I'm comfortable with. Oh, and could somebody please go into what the word "new" means in ChucK, exactly? It's currently mentioned in the manual exactly once (in that sense). It creates a new instance of a object and it's somehow syntactically similar to "!" and that's about it as far as the manual is concerned. This made the public static classes thing quite hard to understand for me untill Spencer demonstrated a while ago you can get around it (and now I understand that assignment trick). So, great plan, I'd be happy to contribute to this wiki page but we'll still need the list because I predict that the people who discover something is missing from the manual are probably not the people who can write the manual entry.... My cents, Kas.
Ok, I took the liberty of starting this; http://wiki.cs.princeton.edu/index.php/ChucK/Manual It's linked from the front page below bugs and feature requests (which seemed like a sensible place). It'll need more structure to sort "I don't understand X and think it needs clarification" from "here's a paragraph for Adam to add to page n" but let's just start and see where we crash. Kas.
Im not totally familiar with 'new', but as I understand it, it is mostly used to create 'anonymous' instances of objects. There is very little difference between these two statements: Object theObject @=> myObjectReference; new Object @=> myObjectReference; The single difference is that the first statement also adds a reference to the new Object called 'theObject' to the current namespace. So you can access the single object created in that statement using theObject.member and also myObjectReference.member. The second statement creates an Object that is only accessible by myObjectReference.member. The only similarity to ! is that they are unary operators, i.e. they take one operand. spencer On Oct 21, 2006, at 3:01 PM, Kassen wrote:
On 10/21/06, Adam Tindale
wrote: The manual is badly outdated. I am in the process of a major revision. Maybe we can start a page on the wiki of things to revise in the manual for the next release. If anyone wants to help I would greatly appreciate it. Sure. I still don't speak Latex but I'd be happy to add stuff that pops up on the forum or that I stumble into myself to such a page.
The forum is a good source for such material because there are a lot of people just starting out there and they ask questions if the manual is unclear or outdated.
I'd be happy to write a few paragraphs as well on areas I'm comfortable with.
Oh, and could somebody please go into what the word "new" means in ChucK, exactly? It's currently mentioned in the manual exactly once (in that sense). It creates a new instance of a object and it's somehow syntactically similar to "!" and that's about it as far as the manual is concerned. This made the public static classes thing quite hard to understand for me untill Spencer demonstrated a while ago you can get around it (and now I understand that assignment trick).
So, great plan, I'd be happy to contribute to this wiki page but we'll still need the list because I predict that the people who discover something is missing from the manual are probably not the people who can write the manual entry....
My cents, Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 10/21/06, Spencer Salazar
The only similarity to ! is that they are unary operators, i.e. they take one operand.
Got it. I just looked it up and page 51 (of the pdf file numbering) is the only place in the manual that mentions "new" in this sense. It says; ------------------- ! + - new (unary) These operators come before one operand. // logical invert if( !true == false ) <<<"yes">>>; // negative -1 => int foo; // instantiate object new object @=> object @ bar; -------------- That last line could use some explanation as far as I'm concerned. I understand we are creating a new object and asigning it but then what? The second "@" is very confusing to me. Eventually it seems to be called "bar" but then why do we need the "@=>" and mention "object" again? This one line is used to explain what "new" does and as far as I can tell two forms of asignment at the same time. To put it bluntly; that's too much for me in on go without context. I propose simplifying that line and explaining the principles hinted at in some more depth in their own sections; I stared at that line for quite a while. Kas.
participants (2)
-
Kassen
-
Spencer Salazar