Author Topic: "AutoLISP/XLISP 2.0 migration..." by Tony T  (Read 1786 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
"AutoLISP/XLISP 2.0 migration..." by Tony T
« on: January 15, 2022, 05:03:27 PM »
A little bit ago I thought I'd try loading/using xlisp on my laptop (macbook) so I could do a little Lisp on the weekends--when a parent of two little ones can find free time on the weekends-. I used Xlisp a little here and there for a while but I just ran out of free time to define any missing AutoLisp pieces/functions. However, the other day I was doing some maintence on my server and I found some old "AutoLisp files" I must have had from a while back. Most of what I found was junk but I did find one file that was very interesting.  "AutoLISP/XLISP 2.0 migration and cross-language programming utilities." by Tony Tanzillo.

This has given me a bit of motivation--and a head-start--into revisiting Xlisp.

So if anyone reading this has a way to get ahold of Tony, please pass along my "Thank You"!

Here is the file if anyone is interested.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #1 on: January 15, 2022, 05:36:22 PM »
How about xlisp with LT ? There was a program that allowed lisp with LT Autodesk did not like that and set the lawyers to work.
A man who never made a mistake never made anything

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #2 on: January 15, 2022, 07:05:33 PM »
I don't know what Lisp for LT is.

The XLisp compiler/interpreters was forked a few times. I am using one of the orig forks (xlisp plus) that was abandoned and made to compile again for x86 and 64 bit stuff many years later. XLisp plus was last updated in 2010, but it still runs good enough to play with.
https://almy.us/xlisp.html

However the orig XLisp was picked back up and ported/updated. You can find that one here:
https://github.com/dbetz/xlisp

The attachment I posted was just Tony's "init file" he used for his version of XLisp (which doesn't work on any new architecture; he probably used his in DOS).

XLisp is just another compiler/engine you find anywhere for countless other languages. TCL, LUA, Python, Perl, Scheme, etc. In Windows no other languages are built in so you have to download a thing like this. Where as in *nix (unix, linux, etc) we have some compilers/interpreters built in to the OS like Perl, python, TCL, etc. but not any Lisp languages (hence, why I had to download a thing like this). But generally speaking, I wouldn't use Lisp (Xlisp, AutoLisp, etc.) to do general scripting though; this was just so I could play around.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

d2010

  • Bull Frog
  • Posts: 323
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #3 on: January 16, 2022, 05:52:59 PM »
his has given me a bit of motivation--and a head-start--into revisiting Xlisp.
So if anyone reading this has a way to get ahold of Tony, please pass along my "Thank You"!

inside the AutoLisp.Xlisp.Txt, same function contain bugs
Code: [Select]
(defun strlen (x3)   (length x3) )
;;You replace , with corect function
(Defun str_len(x3) (if (= (type x3) (read "STR")) (strlen x3) -9))
(Defun mystrlen(x3) (if (= (type x3) (read "STR")) (length x3) -9))
« Last Edit: January 17, 2022, 10:07:11 AM by d2010 »

baitang36

  • Bull Frog
  • Posts: 213
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #4 on: January 16, 2022, 07:38:43 PM »
A little bit ago I thought I'd try loading/using xlisp on my laptop (macbook) so I could do a little Lisp on the weekends--when a parent of two little ones can find free time on the weekends-. I used Xlisp a little here and there for a while but I just ran out of free time to define any missing AutoLisp pieces/functions. However, the other day I was doing some maintence on my server and I found some old "AutoLisp files" I must have had from a while back. Most of what I found was junk but I did find one file that was very interesting.  "AutoLISP/XLISP 2.0 migration and cross-language programming utilities." by Tony Tanzillo.

This has given me a bit of motivation--and a head-start--into revisiting Xlisp.

So if anyone reading this has a way to get ahold of Tony, please pass along my "Thank You"!

Here is the file if anyone is interested.
Is this language too old to find how to play on  64 bit windows system

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #5 on: January 16, 2022, 10:22:53 PM »
his has given me a bit of motivation--and a head-start--into revisiting Xlisp.
So if anyone reading this has a way to get ahold of Tony, please pass along my "Thank You"!

inside the AutoLisp.Xlisp.Txt, same function contain bugs
Code: [Select]
(defun strlen (x3)   (length x3) )
You replace , with corect function
(Defun strlen(x3) (if (= (type x3) (read "STR")) (strlen x3) -9))

No. You have to remember that the code in that file is for XLISP not AutoLISP. However, AutoLISP was built from XLISP but XLISP changed after Common Lisp and Scheme came around. Both projects changed after that.

Is this language too old to find how to play on  64 bit windows system
The version I am using on my laptop is "XLISP Plus" which does have a 32 bit Windows (or a "generic") version that you may be able to run but it may not work well.

The second (real) XLISP will run on Windows but it has evolved to copy XScheme so you will mostly likely not be able to use the file I attached in that version.

This one: https://github.com/dbetz/xlisp will compile and run on windows but is NOT XLISP any more. It is modeled after XScheme and Common lisp.

This version (XLISP Plus): https://almy.us/xlisp.html you may be able to run one of the Windows versions.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #6 on: January 17, 2022, 08:31:50 AM »
it could be very interesting for an AutoLisp and VisualLisp enthusiast
to learn more about Common Lisp . . .
. . .
. . . But we need a way, a modern development environment
and also a goal, a purpose, a reason to do it . . .

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #7 on: January 17, 2022, 10:48:49 AM »
I think there is a big misunderstanding about this thread. XLISP, CommonLisp, Scheme, etc. are not development environments; they are languages. They are programs to read a filetype. Just like AutoCAD is a ".DWG intrepeter", XLISP would be a ".LSP interpreter". If you want a `development environment' for .lsp files you can have your pick of a thousand different text editors.

If I can draw on that analogy a bit more:
If you did not have AutoCAD on your machine, if you double clicked on a .DWG file nothing would happen. AutoCAD is the program that reads .DWG files. As we all know .DWG files do not do anything but imagine if you double clicked a ".lsp" file and stuff happened like when you double click a ".BAT" file. That is what XLISP, CommonLisp, etc. is. It is not a `development environment`, you type up files (like you draw .dwg files) in a text editor and send those files to a program like XLISP, CommonLisp, Scheme, etc interpreter. It then knows how to do stuff based on your instructions written in Lisp. Your instructions can be anything you want; you are, currently, only used to writing lisp instructions to operate in a small environment (AutoCAD, blocks, layers, etc) where as, with an interpreter like this, your environment would then be the computer.

If none of that makes sense, I'm sorry but, this thread may not be for you.
If you don't want to make/change/add/delete/download files on your computer using Lisp then this thread may not be for you.
If you don't want to create a "bank account program" or "address book program" or "goo-gah widget program" then this thread isn't for you.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #8 on: January 17, 2022, 11:18:25 AM »
certainly my way of expressing certain concepts is not correct.
But when I say "development environment '" I want mean an editor, an interpreter, a debugger. . .

And when I speak of goals, of purpose, of reason, I want to say that I would like that the possibilities of a professional language to be extended, for example, to software development in an ACAD or BCAD environment and other similar programs.

however I am able to understand that Common Lisp or C # or C ++ are languages ​​and not environments
. . .
I said that badly !

(Did I write any other nonsense?)
« Last Edit: January 17, 2022, 11:23:51 AM by domenicomaria »

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: "AutoLISP/XLISP 2.0 migration..." by Tony T
« Reply #9 on: January 17, 2022, 08:20:39 PM »
In excel you can talk to Autocad using VBA.

 'Check if AutoCAD application is open. If is not opened create a new instance and make it visible.
    On Error Resume Next
    Set acadApp = GetObject(, "AutoCAD.Application")

I believe this does not work with LT would xlisp be any more helpful or is the issue that you can not get the LT Application. It certainly was solved previously.
A man who never made a mistake never made anything