Brian Harvey wrote >I still don't see the point. If you take a computation that is naturally >expressed as ONE PROCESS with 100,000 procedure calls, and instead make it >100,000 processes, each with (in effect) one procedure call, you haven't >saved any storage. If Logo would have needed 100,000 procedure calls, it's >because there are 100,000 pieces of saved state needed for the computation. >Why does it matter whether those 100,000 frames are on one stack or >divided among 100,000 processes? > >If you're saying that you can't have 100,000 processes each doing 100,000 >procedure calls, then I agree -- but that's not a fair argument. Logo >doesn't do that. No language does that. > >Maybe I should put it this way: Instead of 100,000 stack frames, you have >100,000 bird nests. (If you're not using birds, then you are doing something >that would be a tail call in Logo, and it's not going to grow the stack.) > 100,000 houses. Bird nests are only needed if a computation in a house needs to receive data or requests from other houses. And yes, languages like ToonTalk can have 100,000 processes each doing procedure calls. I just tried to fill a ToonTalk city with 160,000 houses (it started getting too slow and paging too much after 50,000). In every house a robot is working away counting (they needn't be doing the same thing - I'm just lazy). If you want to try it yourself, change the city size to 200 (that is 200x200 blocks where each block holds 4 houses). You can find a remote control for the size of your city in the Options notebook. Then train a robot to get the robot that repeatedly adds 1 and load him in a truck together with a box with a 1 in it. If you are patient enough you can then just let that robot start up the other 159,999 processes but once some of those processes start working that robot won't get a time slice very often. So train another robot to drop copies of the robot you trained into a truck. Wait a few minutes and then start flying around the city visiting houses. Why would kids want so many processes? Because I think each object should be a process. And I believe that kids think so to. The idea of objects that are "dead" unless they are processing some message from the outside is strange, even if it is the way C++, Java, Object Logo, etc. work. > >That's why I proposed a compromise: Allow a process to mutate only its >own private variables. So as long as you avoid mutation you can have >shared data. So are objects private to a process? How do they communicate between processes? Or is it that the instance variables of the objects are private to the process, but object references are global? Best, -ken kahn --------------------------------------------------------------- Please post messages to the Logo forum to logo-l@gsn.org. Mail questions about the list administration to logofdn@gsn.org. To unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home