r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[SDK]

Graham
28-Nov-2005
[215]
I use officially
 hmm... what secrets does that imply ? :)
Gregg
28-Nov-2005
[216]
Sorry, no secrets. Just that it's the one I use. I don't use the 
2.6. Core beta encapper for anything official.
Graham
1-Dec-2005
[217]
Just reading the prerebol specifications.  You can conditionally 
include files for compilation, but can you declare parts of the source 
to be conditionally "compiled" into the exe ?
Volker
1-Dec-2005
[218x3]
This one?
(Oops - There was request on "all" for this group)
Graham, conditional works. there is a #if .
Graham
1-Dec-2005
[221]
volker, I can't see how #if allows me to remove chunks of code that 
I don't want incorporated into the exe
Volker
1-Dec-2005
[222]
Because if allows you to insert code IIRC. Now if you insert a little 
code or a lot depending on the if?
Graham
1-Dec-2005
[223x2]
As I understand it, #if allows me to conditionally evaluate some 
Rebol code, or to include source files into my code.
Yes, insert .. but not remove
Volker
1-Dec-2005
[225]
Have to look up the doc..
Graham
1-Dec-2005
[226x3]
http://www.rebol.com/docs/sdk/prebol.html
I guess I could include a "comment {" to comment out the whole section, 
but I'd prefer something else!
Hmm.  Are comments stripped out in the encapped binary?
Ashley
1-Dec-2005
[229]
Yes.
Graham
1-Dec-2005
[230]
So, in that case I could include a conditional comment to remove 
large chunks of source code ...
Volker
1-Dec-2005
[231]
In the case of #do the result of the expression will be placed in 
the output file. For example:
    version: #do [1.2.3 + 0.0.1]
will create the output:
    version: 1.2.4
Graham
1-Dec-2005
[232]
? .. is that a non-sequitur
Volker
1-Dec-2005
[233]
The #if and #either commands will put the results of their blocks 
into the output file. For example:
    version: #if [new-version] [2.3.4] [1.2.3]
will result in:
    version: 2.3.4
Graham
1-Dec-2005
[234x3]
I see.
I'll give that a go :)
don't those commands evaluate the expressions .. I just want to include 
the source
Volker
1-Dec-2005
[237x2]
Now if you put your code dafely in a lot of [] and evaluate that?
dafely->safely
Graham
1-Dec-2005
[239x2]
Getting too complicated ..
Perhaps I need to ask for this feature in prerebol
Ammon
1-Dec-2005
[241]
try something like:

code: [executable code]
#if [condition] compose [(code)]
Gabriele
2-Dec-2005
[242x2]
Graham, I don't understand your question.
#if [condition] [
    ; this part is included only if condition is true
    your code here
]
non conditional code here
Graham
3-Dec-2005
[244]
Gabriele, I think I just misunderstood the documentation.
Pekr
4-Dec-2005
[245x2]
Couldn't SDK be redone in different way? I really don't want to miss 
rebcode for SDK. That is not good, given the frequency SDK gets updated 
;-) It lags behind usefull stuff for so long! It would be good, if 
the new release plan would count on SDK updates to come more often, 
or somehow magically Encap could use different kernels - you would 
pass it as a parameter:-)
dunno if technicall solvable, but basically such Encap would be kind 
of launcher, which would "boot" rebol - it would unpack it from executable 
into memory. But dunno if technically solvable :-)
Graham
4-Dec-2005
[247]
you mean the sdk could use any rebol binary to encap with ?
Pekr
4-Dec-2005
[248]
yes
Graham
4-Dec-2005
[249]
sounds like a good solution.
Pekr
4-Dec-2005
[250]
but not sure if technically doable?
Graham
4-Dec-2005
[251x2]
would it also work cross platform?
Carl can do anything given sufficient reason/time
Pekr
4-Dec-2005
[253]
but imo such executable boots rebol anyway ...
Graham
4-Dec-2005
[254]
So, I could create cross platform binaries
Pekr
4-Dec-2005
[255x4]
that would save RT from feeding us new SDKs just because new kernels 
were released ....
not sure - such loader/booter, would be platform dependant anyway, 
no?
not sure if I am not mistakenly inspired by some solution posted 
to ml few weeks ago? IIRC someone did self-extracting executable 
(archive), where there was rebol and scripts .... I just don't remember, 
if when you create such archive, you can instruct it to start some 
app ...
http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlKQTC
Ashley
4-Dec-2005
[259]
I don't think this would be a good idea as the SDK lets you choose 
what mezz code you wish to include, and things like console help 
and desktop are excluded by default.
Graham
4-Dec-2005
[260]
Unless Carl has a way of stripping out rebol/base from the binaries 
...
Ashley
4-Dec-2005
[261]
Difficult, as trying to map:


 "I'll take base and not include any of the networking mezz source"

to:


 "Encap using latest rebview but exclude all the graphics and networking 
 code *I* know I'm not going to need"

doesn't sound too easy to me.
Pekr
4-Dec-2005
[262x2]
Ashley - as Graham said - use Base/Face ... include your mezzanines. 
Most of the time they will be compatible
But ask yourself, how often do you need to remove some specific code 
from your app? How mcuh will you save? Rebol is not resources savy 
anyway, at least not in the runtime, for most embedded apps to work 
with ...
Ashley
4-Dec-2005
[264]
Most of the GUI work I do does not use VID or networking, so enface 
without any of the view-* or prot-* scripts is what I want. I do 
not want to use a loader front-end based on rebview that includes 
all this code. The cost in executable size may be small (less than 
100Kb), but it's the start-up time and memory cost that I like to 
get as lean as possible. This will become more of an issue if and 
when REBOL is ported to small memory footprint devices.