What is a Mezzanine function really?/Was article on REBOL
[1/7] from: tim:johnsons-web at: 29-Oct-2001 10:47
My question is: can MEZZANINE functions be really thought of as
virtual source code
?
Here's what the documenation says:
>From Core.pdf:
The source function displays the code for any mezzanine level or
user-defined function:
Mezzanine functions are built-in functions implemented in REBOL. Native
functions
are built-in functions implemented in machine code.
But I'm not sure that it means:
Since there is no source script for the mezzanine functions
doesn't that mean that the rebol binary is actually
COMPOSING (writing the source), and placing it in memory
as it boots?
Kind of 'do-ing a virtual script?
Would this be an example of rebol "writing its own code on the fly"?
I would welcome comments on this.
Trying to put together an article on rebol...
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.johnsons-web.com
[2/7] from: carl:cybercraft at: 30-Oct-2001 10:08
On 30-Oct-01, Tim Johnson wrote:
> My question is: can MEZZANINE functions be really thought of as
> "virtual source code"?
<<quoted lines omitted: 14>>
> Would this be an example of rebol "writing its own code on the fly"?
> I would welcome comments on this.
I've assumed they're just REBOL functions (written in REBOL) that are
unpacked when REBOL is run. So no, I wouldn't think of them as an
example of REBOL writing its own code, but others who actually know
what's happening might know different...
> Trying to put together an article on rebol...
--
Carl Read
[3/7] from: greggirwin:mindspring at: 29-Oct-2001 16:33
Hi Tim,
Hopefully someone from RT can jump in, if necessary, and clarify. For me, I
think the quote from the docs, which you posted, says it pretty well.
Mezzanine functions are built-in functions implemented in REBOL. Native
functions
are built-in functions implemented in machine code.
--Gregg
[4/7] from: al:bri:xtra at: 30-Oct-2001 16:58
Tim wrote:
> But I'm not sure that it means:
> Since there is no source script for the mezzanine functions
> doesn't that mean that the rebol binary is actually
> COMPOSING (writing the source), and placing it in memory
> as it boots?
> Kind of 'do-ing a virtual script?
I believe that the mezzanine functions are present in the Rebol binary, but
are compressed, with the compress function. They are uncompressed when Rebol
starts up.
This is only my belief, I've got no proof. It's just how I would do it,
using the compress function.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
[5/7] from: arolls::idatam::com::au at: 30-Oct-2001 18:37
Here is my idea to discover if that's how they do it.
>> v: compress mold :get-style
== #{
789C2D8D310E833010047BBF62E31ED2A7A1E40194968B008BB00446E28E207E
4F6C73D5EE6A34371D718033F89F6DA9D09910BD16A2BF105410BF2B6B8B...
>> file: read/binary %rebol.exe
== #{
4D5A90000300000004000000FFFF0000B8000000000000004000000000000000
000000000000000000000000000000000000000000000000000000008000...
>> find file v
== none
Damn! Maybe RT encrypt their compressed data as well?
On second thoughts, compress would give different
results for a function compressed along with many
other functions than just a function compressed
by itself. Hmm.
Anton.
[6/7] from: nitsch-lists:netcologne at: 30-Oct-2001 16:59
RE: [REBOL] Re: What is a Mezzanine function really?/Was article on REBOL
Why should they store it as source?
maybe they are able to store the internal form better?
for "meazzine" and "source":
that does not need ascii-storage.
translation rebol->text and text->rebol is good
enough most time
(excluding special tricky bound view-internals.. ;-)
lots of us have got source with mold (or 'source ;-)
changed the result and loaded it back, and it worked.
so its source imho.
-Volker
[arolls--idatam--com--au] wrote:
[7/7] from: al:bri:xtra at: 31-Oct-2001 16:50
Volker wrote:
> Why should they store it as source?
> maybe they are able to store the internal form better?
I believe it is compressed Rebol values.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted