Author Topic: LISP PACKAGER  (Read 6674 times)

0 Members and 1 Guest are viewing this topic.

domenicomaria

  • Swamp Rat
  • Posts: 724
Re: LISP PACKAGER
« Reply #30 on: December 30, 2020, 02:26:53 PM »
ONLY ONE STANDALONE FILE
is USEFUL when I have to give the file to someone
. . .
I cannot give the MAIN FILE
and ALL MY LIBRARIES !






ribarm

  • Gator
  • Posts: 3265
  • Marko Ribar, architect
Re: LISP PACKAGER
« Reply #31 on: December 30, 2020, 02:47:01 PM »
No one wants you to give all your library subs... I am saying that when you code, you should actually put needed subs along with main routine and not to keep them separated... What will happen if you loose your library subs - no use of main routines... I know that you backup well your files, but without library subs your other files will be useless... And with this procedure, you actually are doing what should be done as default action IMHO... Yes I think better ever than never, but when I code, I am always avoiding to do things that I would have to do later in future... Yes my library of lisps is big, but then again not so big that with modern computers and good hardware it wouldn't be possible to backup in relatively quick way...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

domenicomaria

  • Swamp Rat
  • Posts: 724
Re: LISP PACKAGER
« Reply #32 on: December 30, 2020, 03:46:38 PM »
Quote
I am saying that when you code, you should actually put needed subs along with main routine and not to keep them separated...
. . . it is frequent that a subroutine contains another sub routine . . .
it is possible that there are more subroutine nested levels . . .
...
all the times that I need a subroutine, it is not so easy to add it to the main file,
it is not so easy to add it and all the nested subroutines . . .
. . .
however, it happens that I need to modify or implement a subroutine
. . .
But if all the times that I work on a new project, I add all the subroutines to it,
when I modify a subroutine, I have to modify it in ALL THE MAIN FILES . . .
. . .
I believe that is good to keep 2 different types of files.

1 - The files that DO SOMETHING
2 - the LIBRARY FILES.

And when I need a STANDALONE FILE,
I will use the VOVKA ASSEMBLER
(or my too much complicated old PACKAGER that has 1950 rows !)
« Last Edit: December 31, 2020, 01:25:38 AM by domenicomaria »

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: LISP PACKAGER
« Reply #33 on: December 30, 2020, 10:34:27 PM »
I keep(t) a library of `sub-routines' as well (when I programmed in AutoLisp and now when I use C/C++). A good directory structure and proper programming habits is/are essential.

The argument about the possibility of loosing library code (`sub routines') is a bad argument.

With AutoLisp, I kept a file per subroutine.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ribarm

  • Gator
  • Posts: 3265
  • Marko Ribar, architect
Re: LISP PACKAGER
« Reply #34 on: December 30, 2020, 10:46:07 PM »
The argument about the possibility of loosing library code (`sub routines') is a bad argument.

You can say it so from your point of view... I am not saying or wanting that it can/should happen to anyone, but still there is such a possibility, so argument is just fine... I want to say that if/when you actually loose such a file/files, all your work is worthless, nothing is/would be working... If you though keep a good practice to implement subs within routines, when you loose library, still something may work after all... I have to say that once I was in situation to recover from ransomware attack and half of my data on PC were polluted and I had to permanantly remove affected files... Luckily I have a good practice that I backup my important stuff on external drives, so nothing really good wasn't destoyed, but as you see it can happen and really in reality of all of us...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

domenicomaria

  • Swamp Rat
  • Posts: 724
Re: LISP PACKAGER
« Reply #35 on: December 30, 2020, 11:13:24 PM »
Quote
Luckily I have a good practice that I backup
my important stuff on external drives,
so nothing really good wasn't destoyed

This is the solution !

ciao

domenicomaria

  • Swamp Rat
  • Posts: 724
Re: LISP PACKAGER
« Reply #36 on: December 31, 2020, 01:29:06 AM »
Quote
A good directory structure and proper programming habits is/are essential.

Yes. Without this, it is impossible to do something good!

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: LISP PACKAGER
« Reply #37 on: December 31, 2020, 12:03:49 PM »
The argument about the possibility of loosing library code (`sub routines') is a bad argument.

You can say it so from your point of view... I am not saying or wanting that it can/should happen to anyone, but still there is such a possibility, so argument is just fine... I want to say that if/when you actually loose such a file/files, all your work is worthless, nothing is/would be working... If you though keep a good practice to implement subs within routines, when you loose library, still something may work after all... I have to say that once I was in situation to recover from ransomware attack and half of my data on PC were polluted and I had to permanantly remove affected files... Luckily I have a good practice that I backup my important stuff on external drives, so nothing really good wasn't destoyed, but as you see it can happen and really in reality of all of us...
Of course you should be backing up your files--that goes without saying.

The more experience you have, you should resist keeping your library-subs in your main function files because that eliminates the potential for weird behavior/results. -i.e. if your library subs are constant it makes tracking down errors easier. Hence why I created LiFP and VovKa created his tool...

I do not agree with using AutoLisp for this task--it would be akin to using a teaspoon to dig a pool, in my oppinion--but I agree with the method. I believe everyone should maintain their libabries and keep them as clean as possible--and that includes putting them under version control as well. I created my version (LiFP) because I also wanted a way to preform this operation on many projects at once and I could do that with simple batch scripts and windows scheduler--or whenever I felt like it. I could double-click a batch script and update all my code on the network for all the departments in seconds if I ever changed my library sub routines (much of my job at one time was "custom solutions developer" (aka: I wrote programs in AutoLisp, VBA, C++, etc) for multiple departments.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org