Jump to content

Recommended Posts

Posted

Hi guys,

As a beginner in lisp, i have no idea if lisp is used today for something else than autocad - autolisp. Maybe some links - for me lisp seems to be very powerfull. Thanks!

Posted

I am no expert by any means, but as I understand it, AutoLISP and Visual LISP are branches of Common LISP (CL), and at one point (early on) LISP was actually more functionally capable than ObjectARX (C++) which is now the highest level development language for AutoCAD. Give Common LISP or even Vital LISP some searching on the interwebs, and that should show you others as well. :thumbsup:

Posted

If you think AutoLisp is powerful, then you have no idea. AL was originally "stolen" from XLisp 1.0 in the early 80's, and then cut down extremely to make it fit into 64KB by ADesk. Much of what was already in XLisp is unavailable in AL (even today with the Vital/Visual Lisp extension to AL) we still don't have object orientation like the original XLisp 0.0 had to begin with, never mind the new Common Lisp's CLOS object system.

 

I'm attempting something to either extend AutoLisp / add another lisp into acad: http://alisp-ext.wikidot.com/

 

At present I'm leaning towards ECL. To see a sample of what it can do, their alpha IDE is written mostly in ECL with linking to Windows' dotnet libraries through the rdnzl lisp extension.

 

There was a question which seemed to be CL related, where I actually used the ECL LispShell to test the answer: http://www.cadtutor.net/forum/showthread.php?70943-LISP-count-alphabet

Posted

Irneb,

I am not an expert in AutoLISP like many who post in this forum. But I think I have just enough knoledge to get by with my civil engineering work. My goal is to do something similar to civil-3D but in 2D which is quite adequate for highway design.

 

As for object orientation, I am also wondering why autodesk cannot achieve it by implemnting something like CL mentioned in the link given in your reply. After all it was the inventor of Lisp, John Macarthy, who envisioned many years ago that computing will be just like any other service available to people and that day has dawned. Why cannot lisp (or some form of it) do it?.

Posted

I too am extending LISP, in my own albeit small way, through coding .NET LispFunction Methods (too many to post here, but happy to share).

 

I came from a Transportation group that worked primarily in Land Desktop, and now have transferred into a Utilities group and am leading our transition to Civil 3D (not an easy transition, or learning curve). Irneb knows way more than I about the intricacies of programming in general, let alone LISP, but I've chosen to focus on LISP + .NET primarily because of working with Civil 3D.

 

Civil 3D has greatly been relegated to .NET or ObjectARX (C++) API Feature Exposure... For example, one will only be able to use vlax-Dump-Object on some of the lower level AECC* Objects, and even if a Property Object can be accessed, it's Properties, and Methods may not be exposed to the LISP Interpreter. Very disappointing; hence my plight.

Posted

Adesk's got some political aversion to lisp. It appears for at least the last 2 decades that they would rather want it gone from their lives. Though they do realize that if they remove it they will effectively remove a large portion of their client base. So they leave it in place, with minimal (if any) upgrade. While then "encouraging" the use of other languages & API's.

 

Through the close to 30 years Lisp was part of acad, it's been a consistent language - most of the addon's written in the 80's would still work now. Some upgrades early on, the major one around mid 90's where the memory allowances were greatly increased, the the VL extensions (which wasn't actually an adesk thing - they just bought it from someone else). The only "upgrades" I know of which they did since the millennium was to add the layerstate functions, and recently the get/set properties (2012). Everything except the vlax functions would have been sorted if AL had some OO inside it, it would have been possible to have the full ObjectARX system available which would have made most ActiveX (vlax) stuff unnecessary (only where working with external programs would it be useful).

 

If you compare this to all the other languages & API's they've tried to encourage, you'll note it's the only one which lasted as long (even with the restricted capabilities). E.g. the original EXP extensions (late 80's - mid/late 90's) were written in C - this has since "died". Then they introduced the ARX extensions to be written in C++ (around mid 90's), this is still used. Then by late 90's VBA, since 2009/10 it's been removed from acad (only available as a separate download). Since the mid 2000's the DotNet stuff, slowly getting to become a replacement for ARX it seems.

 

I think the EXP extensions were dropped since C doesn't have object orientation. And OO is a natural principal for this type of extension - i.e. an entity is an object with properties, methods and events, with some entities having similar (or even the same) - i.e. inheritance - it just follows naturally to have your program structured the same way. So they had to re-invent a library (API) which was object oriented, and then had to move to a language which had OO capabilities (they chose C++ - in particular MS's Visual C++). Why they didn't then open AL into the CL sphere is my biggest :shock: ... I mean at that stage CL was arguably the most "experienced" OO language available. And especially the tie-down onto MSVC made it near impossible to get acad working on anything but MS-OS's (see the restrictions for ACadMac).

 

VBA was introduced since MS added it to their windows programs - thus many programmers were starting to use it and were starting to request its availability in acad. VBA had OO built-in (though a bas-tard-ized and inconsistent OO), so it wasn't too badly suited. Though many programmers consider VBA (or even straight VB) to be one of the most inferior languages out there, that's not to say it was not used extensively. It's probably the most used language in (at least MS products) for the last decade or so, possibly with full VB a close 2nd. It's been dropped since MS has dropped it. If that's a good/bad thing is for another thread's discussion. Effectively ADesk followed MS's lead by taking on their new favorite "toy" DotNet (either VB.Net / C#, though you should be able to use other languages as well e.g. F# / Python, though examples are hard to come by). To me DotNet's (at least C#) a "nice" language, it reminds me a lot of Java - i.e. fully OO, also less cryptic than I find C / C++ to be. Though most of these languages still have a too verbose syntax (for me), possibly with the exception of stuff like Python / Ruby.

 

Languages come in 4 major groupings, called generations. 1st Gen is raw bitcode (i.e 1's and 0's) - like the computers used in the 2nd World-War to break the Nazi's enigma code, it's not much different from setting switches on/off depending on the required input-process-output of the "program". 2nd is a simplification of bitcode called Assembly, basically giving some sets of bitcodes a descriptive abreviation like MOV (to copy some data between RAM and a CPU register). 3rd is what's generally known as a "programming language" - most (if not all) you'll see would fall into this grouping. 4th is a pipe-dream of a "natural programming language" - i.e. type an English sentence and the computer understands you, I've seen some of these (e.g. Q&A in the 80's had a query language like this).

 

Most of these 3rd gen languages are not exactly "on" the 3.0 mark. Some could be classed closer to 2.5 (like C), or closer to 3.5 (like Python). I think lisp is one of those which are as close to 3.0 as you can get. It's the "natural" (excuse the pun) 3d generation language. Giving all the capabilities you can possibly expect from something which isn't assembly, but not so verbose as to become just a CPU instruction set.

 

Programmers fall into various groups. You'll see many who have one (or more) preferred languages. You'll even find some who actively despise anything except their favorite (I might be one of these :shock:, though I'm not proud of it). But usually a programmer has at least a handful of "tools" in his/her toolbox and picks the one which works best for the job at hand. So generally, I'd say RM's idea is about par for the course - do some things in Lisp where possible (since it's the easiest tool to wield), but where it simply wont fit into that cranny use the next finer-grained tool.

 

My history with programming comes quite a way. I'm by no means an expert in all that is, not even in some that is. I know just enough to realize how ignorant I truly am :lol:. But through all the languages I've been touched by (chronologically: GWBasic / BasicA / Pascal / AutoLisp / C++ / Java / Delphi / VB / VBA / ObjectPAL / JavaScript / ASP / VBScript / PHP / VB.Net / C# / Free Pascal / Lazarus / Python / Common Lisp / F#), C++ was the one which alternately bored / disgusted me the most, Lisp (both AL & CL) was love-at-first-sight and it's still there: even with AL's aging anorexic appearance, I still feel it to be THE language I'd use before anything else - if possible. That last codicil is why I started the alisp-ext wiki, I want it to be possible more often - thus I want it to be more like my 2nd love CL.

 

The only hiccup with CL is the IDE (Integrated Development Environment), most are not much better than VLIDE. IMO MS's Visual Studio is the nicest IDE ever, things like Intellisence, AutoComplete, etc. make even C/C++ bearable (and that's saying a lot)! A close 2nd would be Borland's Delphi, then Lazarus, and then VBA. The ECL's LispShell/LispEdit is not too bad for an Alpha open source, though it's behind even VLIDE - and since it's nearly 6 years without update, it seems it's going nowhere fast :(.

 

Please note: I've never come across any programmer who can create a meaningful large program by simply typing into any single language (never mind more than one). No matter how much experience they have in that particular lang. Though I've not met anyone with an eidetic memory (possibly they could do this). Every one would need at least some reference material while programming, and if the IDE cannot help you to the material it makes life a whole lot more complex. Thus I absolutely hate having to program in an IDE which doesn't at least have some form of contextual help, and I think most programmers would feel similar. So for any newbie I'd encourage them not to feel bad for looking up stuff in the help, I know of guru's whose F1 key is always the first to die on their keyboard ;)

Posted

Awesome infoormation, Irne. :thumbsup:

 

Your comment about 'if the IDE cannot help you to the material' immediately brings me to the dropping of the ActiveX documentation from VLIDE's help. It's there, but one has to hunt for it (or use that online version you pointed me to, which is nice but not the same), rather than it simply being incorporated into the VLIDE's help (as it has been for years).

 

... Long live LISP!

Posted
My goal is to do something similar to civil-3D but in 2D which is quite adequate for highway designquite adequate for highway design

 

NOt sure how you would do this taking into account that you need a 3Dmodel of a surface to start with and their is more emphasis on accuracy of earth works visual models etc. 30 yr civil engineer

Posted

Bigal,

I remember you asking a similar question on a thread originated by me sometime ago. I responded and you never replied back.

You are a forum diety and I believe I should take what you are asking for very seriously.

To begin with you made a mess in the quote. You said 30 years civil engineer. You or me?. I qualified my statement saying that my attempt is for 2D views. It is obvious to anybody that corridor modelling cannot be done with 2D. Experienced engineers can visualize how a completed road will look like from cross sections and layouts with fill and cut slopes marked on them. Nobody asks for 3Dviews or drive throughs (unlike walk throughs in Building projects) before approving tender or construction drawings either in this part of the world (South East Asia) or in Nigeria where I worked for many years (1975 - 1986). Many Italian, Israel and Middle eastern consutants were doing road designs with the state of the art software packages at that time. It does not matter if a draftperson takes some time to draw the details rather than use something like Civil 3D which uses corridor assemblies to accomplish the same thing. Civil 3D is not expensive according to a 3rd party vendor in Singapore; only about US$ 3500.00 . These software packages are becoming cheaper and cheaper. In 1990 when I arrived here my employer was considering to buy a package called Moss, it was prohibitively expensive; hence my attempt develop a software in AutoLisp. I had previously developed cross sections and earth works computaions individual cross sections. I successful in the attempt. A part of an expressway and a dual carriageway was built with these software and I thought Lisp is powerful. There was a long period of inactivity in the road design as I tranfered to another company which was handling mainly infrastructure project. I am a little bit free now decided to get back to my unfinished job.

This forum is helping me immensely to accomplish my task. I am a certified Java programmer (obtained in 2002 at the first attempt) and quite conversant with C#. I have the visual studio, therefore I will atempt 3D later. For now I will attempt Chapter 8, 9, cross sections and earth works as per Civil 3D tutorial.

The moto at the bottom of your posting should be an answer too.

BTW, I am Sri Lankan, are you originally Indian by any chance?. Forgive me for asking this silly question if you are not.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...