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

Rebol > Lisp

 [1/8] from: tbrownell::l3technology::com at: 11-Feb-2003 20:30


Hey, How difficult would it be to build an interpreter that converted Rebol code to say Lisp (or any other language for that matter?) Wouldn't that solve alot of problems? Speed, compiler, GUI etc etc. TB

 [2/8] from: greggirwin:mindspring at: 11-Feb-2003 22:11


Hi Terry, TB> How difficult would it be to build an interpreter that converted Rebol code TB> to say Lisp (or any other language for that matter?) TB> Wouldn't that solve alot of problems? Speed, compiler, GUI etc etc. Certainly doable for a defined subset of things you could write with REBOL - provided that subset can map to capabilities available in the target language. As a matter of fact, that's one of the areas where I think dialects will be quite useful. Now, to say generally that you want to be able to convert *any* REBOL program into any other particular language...that's going to be a darn lot of work. -- Gregg

 [3/8] from: gchiu:compkarori at: 12-Feb-2003 23:11


On Tue, 11 Feb 2003 20:30:26 -0800 "Terry Brownell" <[tbrownell--L3TECHNOLOGY--COM]> wrote:
>How difficult would it be to build an interpreter that >converted Rebol code >to say Lisp (or any other language for that matter?) > >Wouldn't that solve alot of problems? Speed, compiler, >GUI etc etc.
I think Joe Marshall attempted this a few years ago, and gave up. -- Graham Chiu

 [4/8] from: tim:johnsons-web at: 12-Feb-2003 8:56


I've been trying to wrap my tiny brain around a similar concept for a while: Given the advanced text processing and introspective qualities of rebol, it might be possible to write rebol code that would read rebol code (as a prototype) and convert into comparable code in another language. It would be easier if the target language had an API that accomodated such an effort. I have a project to do that entails building an 'object-oriented' interface in Ansi C (not C++). My approach to this would be bearing in mind that I might want to auto-convert from one language to another. But one has to have means, method, AND motivation. This approach is doable, I think, and in fact the concept of prototyping and transformational programming is not given as much attention by the rebol community as I would like to see. (My Humble Opinion Alone) I believe that LISP and Scheme have been used for such tasks. -tim- * Gregg Irwin <[greggirwin--mindspring--com]> [030211 20:40]:
> Hi Terry, > TB> How difficult would it be to build an interpreter that converted Rebol code
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [5/8] from: rgaither:triad:rr at: 12-Feb-2003 15:01


Hi Tim,
> I've been trying to wrap my tiny brain around a similar > concept for a while: > Given the advanced text processing and introspective > qualities of rebol, it might be possible to write > rebol code that would read rebol code (as a prototype) > and convert into comparable code in another language.
It certainly is possible and rebol offers the right kind of flexibility in this area. It is not a trivial task even with rebol as the tool though.
> It would be easier if the target language had an API > that accomodated such an effort.
I'm not sure what you mean by this.
> I have a project to do that entails building an > 'object-oriented' interface in Ansi C (not C++).
If you are going to tackle such a project I would recommend you review the design of Objective-C. It has such a simple implementation approach that it should be a good basis to start from. http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/index.html I would ask why though - is the goal to have some higher level design language that outputs C for portability or is it just a learning project? I know there are valid reasons for wanting C as the end result but such goals always bring up questions in my mind. Questions that typically lead me to the opinion that a better option is being overlooked. There is however a lot of value in identifying the higher level design language ( Dialect :-) ) that will address the problem space no matter what the final solution is.
> My approach to this would be bearing in mind that > I might want to auto-convert from one language to > another.
This is an oft sought after, and very elusive goal. It is this goal, from a different angle - interoperability rather than generation, that makes Microsoft's CLI/CLR technology interesting. I couldn't find a really good link to CLI/CLR specifics in my two minute google searches. I would appreciate it it anyone has a nice definitive resource on the topic. Here is a fluffy starter piece for those interested. http://www.greymatter.com/Buyers/HardCopy/Issue14/TECHTOPICSs.pdf
> But one has to have means, method, AND motivation.
:-) FWIW, Rod. Rod Gaither [rgaither--triad--rr--com] 336-644-9247 Oak Ridge, NC USA

 [6/8] from: tim:johnsons-web at: 12-Feb-2003 12:08


Hi Rod: * Rod Gaither <[rgaither--triad--rr--com]> [030212 11:36]:
> >It would be easier if the target language had an API > >that accomodated such an effort. > > I'm not sure what you mean by this.
/ ***** EXAMPLE ***** / make block! ; rebol make_block() // c
> >I have a project to do that entails building an > >'object-oriented' interface in Ansi C (not C++). > > If you are going to tackle such a project I would > recommend you review the design of Objective-C. > It has such a simple implementation approach > that it should be a good basis to start from.
This is specifically target project for a client. Along with meeting the goals, it's worth investigating a rebol-to-C angle, just for edification.
> http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/index.html > > I would ask why though - is the goal to have some > higher level design language that outputs C for > portability or is it just a learning project?
Again. Specifically targeted project for a client, but that client is a learning institution. But I did do a bid not too long ago on converting a rebol source project to "C". Also, I don't know many of the details, but one of my brothers is a Section Engineer for Motorola. He tells me that they use perl and rebol extensively for internal programming and frequently convert rebol and/o perl code to C. Perhaps imbedded programming?
> I know there are valid reasons for wanting C as the > end result but such goals always bring up questions > in my mind. Questions that typically lead me to the > opinion that a better option is being overlooked.
I'm only using C as an example here. But here is another thought - bear in mind that I am just think out loud ther - what about an imbedded programming project where the target was C or assembler? Wouldn't it be nice to write it in rebol, than automagically convert it to C or ASM. God! What a pipe dream! [recovering ASM programmer here]
> There is however a lot of value in identifying the > higher level design language ( Dialect :-) ) that will
<<quoted lines omitted: 7>>
> generation, that makes Microsoft's CLI/CLR technology > interesting.
I program primarily in REBOL these days, but I would not be serving myself well, (or my clients) if I focused on all-rebol-all-the-time. Dare I mention it :-), but we don't even know if rebol will persist as a programming language or as a business entity. I mean, have to tell my clients that I won't be around forever, right? :-)
> I couldn't find a really good link to CLI/CLR specifics in > my two minute google searches. I would appreciate it
<<quoted lines omitted: 3>>
> >But one has to have means, method, AND motivation. > :-)
And thanks for the links Rod! -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [7/8] from: rgaither:triad:rr at: 12-Feb-2003 17:33


> Wouldn't it be nice to write it in rebol, than > automagically convert it to C or ASM. God! What > a pipe dream! [recovering ASM programmer here]
I've got a whole list of items that fit your excellent description - "nice + automagically"!
> I program primarily in REBOL these days, but I would not > be serving myself well, (or my clients) if I focused > on all-rebol-all-the-time. Dare I mention it :-), but > we don't even know if rebol will persist as a programming > language or as a business entity.
I'm just the reverse - hardly any REBOL on a day to day basis and it is my primary language (Progress 4GL) that I have concerns about its long term viability. Though I agree there are reasons for concern on the REBOL front as well.
> And thanks for the links Rod!
Glad to add something since I didn't have code to share. Thanks, Rod. Rod Gaither [rgaither--triad--rr--com] 336-644-9247 Oak Ridge, NC USA

 [8/8] from: g:santilli:tiscalinet:it at: 13-Feb-2003 1:22


Hi Tim, On Wednesday, February 12, 2003, 10:08:11 PM, you wrote: TJ> / ***** EXAMPLE ***** / TJ> make block! ; rebol TJ> make_block() // c You can't do that unless you include a REBOL interpreter in the generated source code. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

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