Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

PREBOL questions

 [1/7] from: robert:muench:robertmuench at: 24-Nov-2002 12:47


Hi, I want to get some feedback about PREBOL and I have some questions/ideas for it. At the moment Rebol doens't has any library concept how to reuse commone code. I know that several people have done their own solution. But as always these are not complatible or need a bit infrastructure around your Rebol development process (specific directories, specific source-code method,...). Now we have PREBOL. It's already a cool script but how do you use it while developing? I don't want to run PREBOL each time. So I need something like a native "include" (I'm currently just using DO). It works but I'm not sure if there aren't better ways to do it. Any comments? Further I would like to be able to write the PREBOL directives while developing. But adding #include to my scripts won't run it with the normal Rebol interpreter. So how about using ;#include for PREBOL? It shouldn't be to hard I think. AFAIK PREBOL will include the whole file. Is there any way to find our what stuff is used from an include file and to strip the unused code? At the moment I'm using one big library file. So even for small scripts, everything is included. I know that Rebol is very dynamic etc. but maybe it's possible to write a trace-log, that can later be used by PREBOL for filtering. What do you think? Robert

 [2/7] from: nitsch-lists:netcologne at: 24-Nov-2002 16:00


Robert M. Muench wrote:
>Hi, I want to get some feedback about PREBOL and I have some >questions/ideas for it. At the moment Rebol doens't has any library
<<quoted lines omitted: 17>>
>maybe it's possible to write a trace-log, that can later be used by >PREBOL for filtering. What do you think? Robert
why not building each time? when using building scripts i have a [do %buidl-and-run.r quit] at the top of of each subscript and the building script deletes that. maybe an extension: #delete [do %buidl-and-run.r quit]? or the editor runs the building script in the directory instead of the actual file. -volker

 [3/7] from: greggirwin:mindspring at: 24-Nov-2002 11:36


Hi Robert, RMM> Now we have PREBOL. It's already a cool script but how do you use it RMM> while developing? I don't want to run PREBOL each time. So I need RMM> something like a native "include" (I'm currently just using DO). It RMM> works but I'm not sure if there aren't better ways to do it. Any RMM> comments? Graham and I just mentioned this on IOS/Developer. I want to be able to run things interactively, but then build from the same source. There's no good solution for that using PREBOL at this point. What I do now is have a little script that does the build and runs the processed script. Mine is separate, unlike Volker's, so my source doesn't get modified when built. Building is plenty fast, but I did mod PREBOL so it doesn't output any info to the console if everything goes OK. RMM> Further I would like to be able to write the PREBOL directives while RMM> developing. But adding #include to my scripts won't run it with the RMM> normal Rebol interpreter. So how about using ;#include for PREBOL? It RMM> shouldn't be to hard I think. I don't think using a comment will be so easy because PREBOL does a LOAD/ALL so it can find the directives as issue! values. Comments would never show up for it to process, right? RMM> AFAIK PREBOL will include the whole file. Is there any way to find our RMM> what stuff is used from an include file and to strip the unused code? At RMM> the moment I'm using one big library file. So even for small scripts, RMM> everything is included. I know that Rebol is very dynamic etc. but RMM> maybe it's possible to write a trace-log, that can later be used by RMM> PREBOL for filtering. What do you think? Robert There's also not an easy way to find out if something has already been #included. Right now I'm using a dual system that doesn't thrill me. I have a main script that contains the #includes for everything and all the secondary scripts (i.e. #included scripts) use VALUE? and DO to load things they need. That won't hold up long term on a large scale though. Ultimately I think I'll want, and need, a good dialect to handle all this. Building an optimizer would be a good bit of work I think. --Gregg -- Gregg

 [4/7] from: lennart:nylen:biz at: 25-Nov-2002 7:42


2002-11-24 12:47:52, "Robert M. Muench" <[robert--muench--robertmuench--de]> wrote:
>Further I would like to be able to write the PREBOL directives while >developing. But adding #include to my scripts won't run it with the >normal Rebol interpreter. So how about using ;#include for PREBOL? It >shouldn't be to hard I think.
Actually, using a semicolon before each and every PREBOL directive would avoid any issue! clashes. I'd say it's better to restrict (a certain form of) comments than issues. Then again I bet RT made their choice based on how easy it'd be to implement PREBOL using issues for directives. Still, making it a PREBOL standard that ";#" marks the beginning of a directive wouldn't be such a bad idea IMHO. /Lennart Fridén ([lennart--nylen--biz]) The World is not sane so why should I be?

 [5/7] from: robert:muench:robertmuench at: 25-Nov-2002 7:54


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 3>>
> Subject: [REBOL] Re: PREBOL questions > why not building each time?
I thougth about this too but it IMO sound a bit tedious. But I have to say I didn't tried it yet.
> when using building scripts i have a [do %buidl-and-run.r > quit] at the top of of each subscript and the building script > deletes that.
Sorry but I don't understand this. Can you give an example? What's a subscript? And what gets deleted? Robert

 [6/7] from: robert:muench:robertmuench at: 25-Nov-2002 7:54


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 3>>
> Subject: [REBOL] Re: PREBOL questions > Graham and I just mentioned this on IOS/Developer.
Hi, some other thread here are just discussing if IOS conference is useful for such things. I have to say without threading etc. it's not that useful to me for long ongoing discussions. Further for high volume it's not very comfortable. That's why I mostly stay to the ML. Anyway...
> I don't think using a comment will be so easy because PREBOL > does a LOAD/ALL so it can find the directives as issue! > values. Comments would never show up for it to process, right?
Seems that I didn't took a deep enought look in it. What happens if you run a PREBOLed script just normal (adding a do... In front of each include)? Now I think it should run and nothing special should happen to/with the issue! Values.
> There's also not an easy way to find out if something has > already been #included.
Really? IMO this should be possible. What's tricky is to find out what to include from an included file. Including it completely is easy.
> Ultimately I think I'll want, and need, a good dialect to > handle all this. Building an optimizer would be a good bit of > work I think.
Yep, I agree. And this dialect should be loaded by default (like VID) and support two modes: 1. Development mode: Just pre-process and run immediatly wihtout output 2. Release mode: Strip, create one-file output, compress etc. Robert

 [7/7] from: nitsch-lists:netcologne at: 25-Nov-2002 11:56


Robert M. Muench wrote:
>>-----Original Message----- >>From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 13>>
>Sorry but I don't understand this. Can you give an example? What's a >subscript? And what gets deleted? Robert
lets say i have files %lib.r, %gui.r, %main.r etc, all in one directory. the main script is build and run by %build.r . then %lib.r beginns rebol[..] do %build.r quit the library code same for %gui.r and %main.r when i open %lib.r in editor, edit run it there., then the complete script is build and run. my %build.r removes the line do %build.r quit in the target and includes only the library code. -volker

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted