CompuServe Thread

#LISP -> ADS Converters?

12 messages in this thread
#21638From: Jerry WorkmanNov 23, 1991 3:13 PM
Angelo, I've "rolled my own" ADS converter using a program similar to the UNIX program "sed". It simply makes global substitutions of all of the functions rearranging parameters and adjusting the parens, etc. It does not handle MAPCAR, LAMBDA, and lots of other things for that matter. It does handle 60% to 70% of the work however. Jerry
#21825From: Angelo Guarino [DTI Inc]Nov 25, 1991 7:55 AM
Jerry, I was thinking of doing the same. Am I going crazy or what (this goes under the heading of "Are all those Hallucinogenics I did as a young man, comming back to haunt me? <G>)? Don't I remember someone marketing a LISP to ADS converter? … I think a brochure for it came with the package when we became a "developer", but for the life of me, I can't find it anywhere. Do you OR DOES ANYONE ELSE remember seeing or hearing about something like this? Hoping the men in the "white coats" aren't on their way … Ang
#21869From: Tony Tanzillo [LISP TM]Nov 25, 1991 11:12 AM
Angelo – Well, I wouldn't believe any cliams of being able to convert LISP to ADS thru a one-step black-box contraption. It just isn't possible. Some of the fundamental properties of interpreted LISP make it virtually impossible: 1. Dynamic binding (C++ is just becoming capable of "late binding"). 2. Dynamic scoping: This alone would give you a headache of monumental proportions. It is the nature of the beast (more plainly, that an interpreted LISP program is fully-capable of manufacturing and executing lisp code on the fly), that is what makes it virtually impossible. Of course, if you impose some heavy restrictions on the LISP code that is to be converted to .C, then it is possible, and in fact, I know of at least on LISP development system that generates .C source from .LSP input, for deployment of the application, but this system requires the .LSP code to be explicitly coded with conversion to .C in mind, and requires the .LSP program to declare types, amongst other things. I think Jerry's approach is probably the most realistic one, at least insofar as converting *existing* AutoLISP programs to ADS. -TonyT.
#21911From: Angelo Guarino [DTI Inc]Nov 25, 1991 4:03 PM
Tony, I'm a big fan of black boxes. Once when I was doing a aircraft control system design, I had a "whole lot" of'em <g>. They were typically based on ceramic unobtainium chips with in a delerium housing <G>. Yo Tony (said with a Brooklyn accent) .. I'm glad you responded because I've been meaning to ask you something. "What's a nice Italian boy like you doing on a forum like this? <G>" But seriously, a while ago, a fella was ask'n around about drawing a "wire" and you pointed him to a "pipe" utility you wrote. I was thinking of writing one that used polylines. Does it work with 3D polylines? If so, I'd like to talk to you regarding this utility. Send me MAIL an "we'll talk". Glad that I have a reason to hate the Dallas Cowboys again … Ang <Redskin Fan>
#21967From: Tony Tanzillo [LISP TM]Nov 25, 1991 9:11 PM
Ang – Well, omma gonna tella you disa only once, okay?<g>. I think the guy you're talking about is Jay Parisi, I didn't write any 3DTUBE thing, but I do have a program that sweeps extrustions along 3D paths, using a sort of virtual milling-machine metaphor. Of course, if the extrusion profile is a circle, then it makes a tube, but the extrusion (or "tool profile"), can be just about anything at all. I believe there's a 3DTUBE program in the libraries that already does this, which you might want to have a look at. It sure would be nice if you could do calculations on them, of course.<g> -TonyT.
#21984From: Ted BouskillNov 25, 1991 10:15 PM
Tony, how can you say that AutoLISP can accomplish something that 'C' cannot? AutoLISP was written in 'C', therefore, 'C' can accomplish the same tasks. The contructs in AutoLISP could be and will be converted into 'C' functions. With C++, it's even easier. Ted
#22027From: Tony Tanzillo [LISP TM]Nov 26, 1991 2:09 AM
Ted – Well, you sure do seem to have a penchant for "therefore <assertion>.." Tell me, do you know what dynamic binding is? And if so, please explain it a bit? In the act of doing so you should come to the realization that THERE IS NO compiled language that is capable of dynamic binding. But, I really don't want to get into another computer science debate. The major distinction I was making, is not between LISP and C, or LISP and any other language. Instead, the distinction is between interpreted and compiled languages. Dynamic binding is a characterstic that is inherint to _some_ interpreted languages, such as LISP, but it is entirely impossible to do in a compiled computer program, unless that compiled program IS ITSELF AN INTERPRETER of its own source code, and if that's the case, then the code that it interprets isn't compiled, and you arrive at the old chicken/egg paradox. Therefore <…assertion coming…> AutoLISP is capable of something that no computer program that has been compiled from its source code, into a second language (machine code) is capable of, which is dynamic binding. -TonyT.
#22183From: Don BrownNov 26, 1991 11:38 PM
Tony… (Yea, I'm back. Been a while, eh? "Hello everybody!!!") Couldn't alot of the AutoLisp routines that we have written be converted to 'C'? For example, you have a simple routine that picks points & draws lines. Or even simpler. (Princ "\nHello World!") Either of these could be converted. It would seem to me that something could be written to convert simple routines. But, then comes the question, if it's so simple, why even convert it? wDonw
#22198From: Tony Tanzillo [LISP TM]Nov 27, 1991 12:55 AM
Don – Hi! Long time-no type. Yes, many AutoLISP functions could be passed thru a black-box, and come out the other side as C functions. But, keep in mind that AutoLISP functions do not contain declarations, and symbols can reference values outside of the body of the function they appear in. In C, you can decalre a symbol as a global, but you can't reference a variable bound to another environment, dynamically, which is what they refer to as 'dynamic scoping'. There are probably many functions that will convert, some easily, and some not so easily, but I'd really love to see someone illustrate how to convert any AutoLISP program that does something like this: (eval (read "(some-function some-argument)")) You can do it, all you need is to bind a LISP interpreter to your ADS program. <g> -TonyT.
#22219From: Angelo Guarino [DTI Inc]Nov 27, 1991 7:45 AM
Tony, Fortunately (or unforutately … as the case maybe), being engineers, we don't do anything like that in our programs (I'll leave techiniqes like that to those folks who buy fractal programs <g>). Anyway…my initial question still stands unanswered!! DOESN'T ANYBODY ELSE REMEMBER SOMEONE MARKETING A CONVERTER? I swear I remember getting a "nice slick" in the mail, or with my developer's kit. Wondering if it was "live" or it was Memorex? ….. Ang
#22243From: Tony Tanzillo [LISP TM]Nov 27, 1991 11:21 AM
Angelo – Well, I realize that you don't see anything like that often, but if there is a 'black-box' converter that doesn't impose limitations on what it can convert to .C (and there are many more limitations than this), then I'd be very skeptical about its ability to do that. No, I've never seen or heard of any .LSP->.C converter. -TonyT.
#22280From: Angelo Guarino [DTI Inc]Nov 27, 1991 3:21 PM
Tony, I guess I "chalk it up" my aberation to old age and a wild youth. Keeping a lookout for "flash-backs"… Ang