Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: OBJECTS.FS ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 44 Topic 3974 of 4160
Post > Topic >>

Re: OBJECTS.FS Question

by Doug Hoffman <no.spam> Mar 27, 2008 at 10:27 PM

Anton Ertl wrote:
> Doug Hoffman <no.spam> writes:
>> If I then make a snapshot image of my Forth system and re-launch that I

>> am unable to get my object x to do anything.


> objects.fs uses
> ALLOCATE and RESIZE to store some of the data on cl*****, and that
> would then be lost.  I guess that's the problem you see.

That's a significant problem to deal with.  A problem that the Neon-like 
model doesn't suffer.  It would have been a more balanced paper had you 
brought these facts out in your "Yet another Forth objects package" 
http://www.complang.tuwien.ac.at/forth/objects/objects.html
especially 
since your prior paper was unduly and inaccurately critical of the 
Neon-like model (that paper was titled "On Standardizing Object-Oriented 
Forth Extensions" but in reality was a rant of Andrew McKewan's work on 
the Neon-like model for Forth. For other readers, see 
http://www.complang.tuwien.ac.at/forth/objects-standard.html
).

In the "Standardizing" paper there was quite a bit that I didn't follow. 
  For example, you make an issue of McKewan's use of state smart words. 
  Why not just point out that the Neon model is easily written without 
them?  Took me less than 5 minutes to do so.

You make issue of the relative speeds of late binding, calling McKewan's 
"inefficient" just because it is a bit slower than a vtable.  In an 
Olympic sprinting race, would we call the silver medalist slow? 
Actually, I was able to speed up McKewans late binding code.  It uses an 
8-way linked list (instead of a single-way) but he was waiting to 
compute the 8-way until run time.  This calculation can be done at 
compile time and speeds things up noticeably.  I have done so.  A linked 
list search is still very fast.  It can be made faster yet by writing 
the routine in assembler.  It's a simple routine.  I don't like 
assembler but even I was able to easily write that.

A serious flaw with Objects.fs is the use of late binding when the class 
of the object is known at compile time.  Like SWOOP, the Neon-like model 
defaults to the extremely fast early binding in those cases.  That's why 
the Neon-like model typically outperforms Objects.fs in real world code. 
  It is also why, IMO, one sees more method factoring in class 
definitions using the Neon or SWOOP early binding default.

The ancient debate of the ordering of object and message seems to me 
irrelevant and a bit silly to obsess over.  For one thing the Neon model 
can *easily* do it either way.  As far as the ordering being natural or 
Forthlike  or non-Forthlike:  We seem to get along just fine with the 
locals syntax ( parameter-message-object ).  Forthers will similarly 
have no problems at all doing the same for objects.


>>  Worse, I cannot even reload the above code 
>> starting with 'interface selector val ...'.
> 
> There is already something stored in ALLOCATEd memory when you include
> objects.fs (in particular, parts of the definition of the OBJECT
> class).
> 
> Should we change the Forth systems to also save ALLOCATEd memory,
> should we change applications and libraries to avoid ALLOCATEd memory,
> or should we just be happy with loading applications from the start on
> every startup (and make the systems compile fast enough)?

Neither.  We could use a different Forth OOP extension that doesn't 
suffer this serious problem.

-Doug


> 
> - anton
 




 44 Posts in Topic:
OBJECTS.FS Question
Doug Hoffman <no.spam&  2008-03-26 21:00:22 
Re: OBJECTS.FS Question
anton@[EMAIL PROTECTED]   2008-03-27 21:36:02 
Re: OBJECTS.FS Question
Bruce McFarling <agila  2008-03-27 18:33:47 
Images and libraries (was: OBJECTS.FS Question)
anton@[EMAIL PROTECTED]   2008-03-28 20:48:24 
Re: Images and libraries
Doug Hoffman <no.spam&  2008-03-29 07:05:58 
Re: Images and libraries
Elizabeth D Rather <er  2008-03-29 06:54:53 
Re: OBJECTS.FS Question
Doug Hoffman <no.spam&  2008-03-27 22:27:11 
Re: OBJECTS.FS Question
Albert van der Horst <  2008-03-28 09:00:39 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-28 22:24:06 
Re: Images and libraries (was: OBJECTS.FS Question)
mhx@[EMAIL PROTECTED] (M  2008-03-29 07:01:59 
Re: Images and libraries (was: OBJECTS.FS Question)
Albert van der Horst <  2008-03-29 17:28:00 
Re: Images and libraries
Andrew Haley <andrew29  2008-03-29 10:29:43 
Re: Images and libraries
anton@[EMAIL PROTECTED]   2008-03-30 19:23:04 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-29 08:51:33 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-29 10:57:17 
Re: Images and libraries (was: OBJECTS.FS Question)
anton@[EMAIL PROTECTED]   2008-03-30 19:40:00 
Re: Images and libraries (was: OBJECTS.FS Question)
Albert van der Horst <  2008-03-31 07:43:03 
Re: Images and libraries (was: OBJECTS.FS Question)
stephenXXX@[EMAIL PROTECT  2008-03-31 13:15:43 
Re: Images and libraries (was: OBJECTS.FS Question)
Bernd Paysan <bernd.pa  2008-03-31 17:33:03 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-29 11:07:13 
Re: Images and libraries (was: OBJECTS.FS Question)
anton@[EMAIL PROTECTED]   2008-03-30 19:14:33 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-30 14:58:43 
Re: Images and libraries (was: OBJECTS.FS Question)
Jonah Thomas <jethomas  2008-03-31 13:12:13 
Re: Images and libraries (was: OBJECTS.FS Question)
Bernd Paysan <bernd.pa  2008-03-31 21:48:45 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-31 11:39:05 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-04-01 08:22:47 
Re: Images and libraries
Bruce McFarling <agila  2008-03-29 08:57:52 
Re: Images and libraries
Doug Hoffman <no.spam&  2008-03-29 18:20:50 
Re: Images and libraries
Bernd Paysan <bernd.pa  2008-03-30 22:10:35 
Re: Images and libraries
Bernd Paysan <bernd.pa  2008-03-30 23:23:34 
Re: Images and libraries (was: OBJECTS.FS Question)
Bruce McFarling <agila  2008-03-30 13:40:29 
Re: Images and libraries
ragofu64@[EMAIL PROTECTED  2008-04-02 17:20:17 
Re: Images and libraries
Doug Hoffman <no.spam&  2008-04-02 20:59:13 
Re: Images and libraries
ragofu64@[EMAIL PROTECTED  2008-04-03 01:19:09 
Re: Images and libraries
Doug Hoffman <no.spam&  2008-04-03 05:58:15 
Re: Images and libraries
ragofu64@[EMAIL PROTECTED  2008-04-03 03:59:41 
Re: OBJECTS.FS Question
ragofu64@[EMAIL PROTECTED  2008-04-29 17:20:20 
Re: OBJECTS.FS Question
Doug Hoffman <no.spam&  2008-04-30 20:22:29 
Re: OBJECTS.FS Question
ragofu64@[EMAIL PROTECTED  2008-05-01 01:06:28 
Re: OBJECTS.FS Question
Doug Hoffman <no.spam&  2008-05-03 12:37:01 
Re: OBJECTS.FS Question
ragofu64@[EMAIL PROTECTED  2008-05-07 06:20:43 
Re: OBJECTS.FS Question
Doug Hoffman <no.spam&  2008-05-07 11:06:44 
Re: OBJECTS.FS Question
ragofu64@[EMAIL PROTECTED  2008-05-07 11:36:26 
Re: OBJECTS.FS Question
ragofu64@[EMAIL PROTECTED  2008-05-10 04:07:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 18 20:34:38 CDT 2008.