TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: HasanCAD on October 21, 2010, 03:52:16 AM

Title: New Lisp any suggestions are welcomed
Post by: HasanCAD on October 21, 2010, 03:52:16 AM
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
;|-------------------Layers List----------------------
                q_|_|| _\|| q_|| _\|                 
                                                     
  يقوم بتحديد ميل الخط من خلال اختيار نقطتين عليه     
                   و من الممكن ان يختار المستخدم     
                بين ان يرسم خط بين النقطتين او لا     
                                                     
------------------------------------------------------
  Author: Hasan M. Asous, 2010                       
  Copyright © 2010 by HasanCAD, All Rights Reserved. 
  Contact: HasanCAD @ TheSwamp.org,                   
           asos2000 @ CADTutor.net                   
           HasanCAD@gmail.com                         
------------------------------------------------------
  Version: 1     20 Oct 2010                         
____________________________________________________|;

;     q_|_|| _\|| q_|| _\|     ;
;       Mainroutine Start      ;

(defun c:TanLine (/ p1 p2 p3)
  ;Copyright © by HasanCAD
  (vl-load-com)

  (HSN:DDwnMnuSetSysVar)
 
  (and
    (setq doc (cond (doc) ((vla-get-ActiveDocument
   (vlax-get-Acad-Object)))))
    (setq spc (if (zerop (vla-get-activespace doc))
      (if (= (vla-get-mspace doc) :vlax-true)
(vla-get-modelspace doc)
                (vla-get-paperspace doc))
              (vla-get-modelspace doc)))

    (setq p1 (trans (getpoint "\nFirst Point اختار النقطة الاولى على الخط ")1 0))
    (setq p2 (trans (getpoint p1 "\nSecond Point اختار النقطة الثانية على الخط")1 0))
    (setq p3 (trans (getpoint "\nText insertion Point قم بتحديد مكان النص")1 0))
    )

  (setq tan2 (/ (- (cadr p2) (cadr p1)) (- (car p2) (car p1))))

  (if (not TL-Line) (setq TL-Line "Yes"))
  (initget "Yes No")
  (setq TL-Line (cond ( (getkword (strcat "\nChoose هل تريد رسم خط بين النقطتين [Yes/No] <" TL-Line ">: ") ) ) ( TL-Line ) ))
  (if (equal TL-Line "Yes")
    (progn
      (HSN:TL-Text)
      (HSN:TL-Line)
      )
    (progn
      (HSN:TL-Text)
      )
    )
  (HSN:ReDDwnMnuSetSysVar)
  (vla-EndUndoMark ActDoc)
  )

;     q_|_|| _\|| q_|| _\|     ;
;       Mainroutine End        ;

;     q_|_|| _\|| q_|| _\|     ;
;       Subroutine Start       ;

(defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
  )

(defun HSN:DDwnMnuSetSysVar ()
  ;Copyright © by HasanCAD
  (setq OldOS (getvar "osmode"))
  (setq OldDynmode (getvar "dynmode"))
  (setq OldDynprompt (getvar "dynprompt"))
 
  (setvar "osmode" 33)
  (setvar "dynmode" 1)
  (setvar "dynprompt" 1)
  (setvar "cmdecho" 0)       
  )

(defun HSN:ReDDwnMnuSetSysVar ()
  ;Copyright © by HasanCAD
  (setq *error* TERR$)
  (setvar "osmode" OldOS)
  (setvar "dynmode" OldDynmode)
  (setvar "dynprompt" OldDynprompt)
  )

(defun HSN:TL-Text ()
  ;Copyright © by HasanCAD
       (entmakex (list
   (cons 0 "TEXT")
                   (cons 10  p3)
                   (cons 40 2.2)
                   (cons 1  (strcat (rtos (* tan2 100)) "%"))
   ))
  )

(defun HSN:TL-Line ()
  ;Copyright © by HasanCAD
       (entmake (list
  (cons 0 "LINE")
                  (cons 10 p1)
                  (cons 11 p2)
  ))
  )

;     q_|_|| _\|| q_|| _\|     ;
;        Subroutine End        ;

(princ "\n  TanLine.lsp ~ Copyright © by HasanCAD")
(princ "\n     ...Type TanLine to Invoke...   ")
(princ)
Title: Re: New Lisp any suggestions are welcomed
Post by: jvillarreal on October 21, 2010, 10:34:23 AM
It doesn't restore variables at error.
You need to add (HSN:ReDDwnMnuSetSysVar) to your error function.

Your'e using endundomark at the end of your routine without starting one at the beginning and using the variable ActDoc which is causing an error.
Title: Re: New Lisp any suggestions are welcomed
Post by: Tharwat on October 21, 2010, 12:00:06 PM
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
(defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
  )


I liked this part of codes. Can I use it with my future routines ?

Good luck

Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 21, 2010, 12:10:27 PM
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
(defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
  )


I liked this part of codes. Can I use it with my future routines ?

Good luck



Its just a shame that it won't work as uFlag is never initiated in the first place... yet another block of code blindly copied from one of my programs...
Title: Re: New Lisp any suggestions are welcomed
Post by: Tharwat on October 21, 2010, 12:33:06 PM
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
(defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
  )
I liked this part of codes. Can I use it with my future routines ?
Good luck

Its just a shame that it won't work as uFlag is never initiated in the first place... yet another block of code blindly copied from one of my programs...

Undoubtly. I do know that codes very well, and that's why I indicated to. But I did not expect that prompt of action.   :lol:
Title: Re: New Lisp any suggestions are welcomed
Post by: CAB on October 21, 2010, 12:53:56 PM
With all the code you have out there, better get used to it Lee.  :-)

Maybe this would be better:
Code: [Select]
(defun *error* (msg)
  (if (= 8 (logand 8 (getvar 'UNDOCTL)))
    (or (and doc (vla-EndUndomark doc))
        (and *doc* (vla-EndUndomark *doc*)))) ;LeeMac
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
)
Title: Re: New Lisp any suggestions are welcomed
Post by: CAB on October 21, 2010, 01:02:07 PM
Maybe this would be better.
Code: [Select]
(defun *error* (msg)
  (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-get-activedocument (vlax-get-acad-object))) ;LeeMac
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
)
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 21, 2010, 01:09:54 PM
With all the code you have out there, better get used to it Lee.  :-)

Yeah, I suppose...
Title: Re: New Lisp any suggestions are welcomed
Post by: LE3 on October 21, 2010, 01:30:16 PM
With all the code you have out there, better get used to it Lee.  :-)

Yeah, I suppose...

just my two pesos worth of nothing...  :evil:

sooner or later some lines of code will end up looking the same... what i see is that he is copying your headers, notes and annotation style - but if you see that from the other side, it is good for you, because you are making an standard for someone to follow - now if end up being an exact clone of your own stuff, then is another story...

ok, let's drop some other two pesos if i may.... :)

...
Title: Re: New Lisp any suggestions are welcomed
Post by: gile on October 21, 2010, 02:00:46 PM
My 2 cents,

(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") won't work with me ("Fonction annulée" "quitter / sortir abandon") :evil:

IMO there's no need for 'uFlag' or (= 8 (logand 8 (getvar 'UNDOCTL))), you can run 'vla-EndUndomark' even is there wasn't any vla-StartUndomark before.
Title: Re: New Lisp any suggestions are welcomed
Post by: CAB on October 21, 2010, 07:10:59 PM
Perhaps I am miss remembering the situation.
What I remember is when you open a drawing and do nothing but execute a vla-EndUndomark it causes an error.

No time to test it, on the way out. :-(
Title: Re: New Lisp any suggestions are welcomed
Post by: m4rdy on October 21, 2010, 11:08:04 PM
Code: [Select]
(defun HSN:DDwnMnuSetSysVar ()
 [color=red][b] ;Copyright © by HasanCAD[/b][/color]
   ...........
  )

(defun HSN:ReDDwnMnuSetSysVar ()
  [color=red][b];Copyright © by HasanCAD[/b][/color]
  .....................
  )

(defun HSN:TL-Text ()
  [color=red][b];Copyright © by HasanCAD[/b][/color]
       ..................
  )

(defun HSN:TL-Line ()
 [color=red][b] ;Copyright © by HasanCAD[/b][/color]
       ...............................
  )

I think i have to read  http://en.wikipedia.org/wiki/Copyright (http://en.wikipedia.org/wiki/Copyright) first before i use ('copy') some of that 'familiar' subroutine. :|
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 01:19:08 AM
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
(defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
  (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
      (princ (strcat "\n** Error: " msg " **")))
  (princ)
  )


I liked this part of codes. Can I use it with my future routines ?

Good luck



Its just a shame that it won't work as uFlag is never initiated in the first place... yet another block of code blindly copied from one of my programs...
You have to understand Lee, most of the LISPers here are production people and learned to code out of necessity. As a result, the mentality is more about getting it to work, rather than the learning what everything does. When I first started coding, I blindly took subroutines/code segments and used them without knowing exactly how they worked. Not because I didn't care or wasn't smart enough to figure it out, it was because I had more pressing matters to worry about: making deadlines and just cutting a routine that will turn X steps into one in a minimal amount of time or perform that difficult/impossible task without a little code. Sadly, most don't have the luxury to learn it properly, from the bottom up and just pick up what they need at that moment.
Do not take this as an attack, I just want you to have an idea as to why some just 'take' code and use it. They know it works because they see it does or a reliable source told them it would; not every line is understood, but eventually it will be.
Title: Re: New Lisp any suggestions are welcomed
Post by: pkohut on October 22, 2010, 01:52:39 AM
Code: [Select]
(defun HSN:TL-Line ()
  ;Copyright © by HasanCAD
       (entmake (list
  (cons 0 "LINE")
                  (cons 10 p1)
                  (cons 11 p2)
  ))
  )
I think i have to read  http://en.wikipedia.org/wiki/Copyright (http://en.wikipedia.org/wiki/Copyright) first before i use ('copy') some of that 'familiar' subroutine. :|


Yep, surprised it's taken this long for someone to bring it up. Think I might have stomped on his copyright claim 20 or so years ago.
Title: Re: New Lisp any suggestions are welcomed
Post by: Kerry on October 22, 2010, 05:03:50 AM
Let's try another way

HasanCAD,

What does the Copyright notice mean to you ??
 
 
Title: Re: New Lisp any suggestions are welcomed
Post by: cmwade77 on October 22, 2010, 11:25:51 AM
Its just a shame that it won't work as uFlag is never initiated in the first place... yet another block of code blindly copied from one of my programs...

Lee, your code is too good not to copy, but I definitely always try to credit you (and others) when using their code. If I ever do miss crediting you or someone else, please let me know, sometimes I am in a time crunch and may not put it in there.

I do at least try to make sense of the code first and modify it or delete what I don't need when I can, but sometimes I am not positive what everything does.
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 11:37:30 AM
No worries Chris, its not that I'm completely against people directly copying my code without an understanding of everything it does, but if the code has been directly copied, I would expect a mark against it to say that it has, eg..

Code: [Select]
(somecode) ;; Lee Mac

As you can imagine, I don't particularly like people straight copy/pasting code and then having the audacity to plaster their copyright notices all over it...

I'm sure most of the code used regularly does look similar, and this is unavoidable, but all the same, its quite easy to tell if a block of code has been the result of copy/paste, and that which the author has written for themselves.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 12:00:24 PM
Honest question:
Why do you care?




Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 12:06:15 PM
Honest question:
Why do you care?

Yeah, I see your question probably stems from the fact that nothing comes of it, as there is no commercial gain involved - but it gets to you when something you've written/created/recorded is blatently copied straight with no hint of accreditation - would you not feel the same? Also, at this point, who's to stop someone pointing the finger at me claiming that I have copied HasanCAD?
Title: Re: New Lisp any suggestions are welcomed
Post by: HasanCAD on October 22, 2010, 12:16:53 PM
What does the Copyright notice mean to you ??

Sorry for being late in answer

A lisp comes out to light from a beginner Coder and happy with that
And want to say to all it's my first step on the programming road

Thats it no thing more
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 12:25:45 PM
Honest question:
Why do you care?

Yeah, I see your question probably stems from the fact that nothing comes of it, as there is no commercial gain involved - but it gets to you when something you've written/created/recorded is blatently copied straight with no hint of accreditation - would you not feel the same? Also, at this point, who's to stop someone pointing the finger at me claiming that I have copied HasanCAD?

nope, i wouldnt care.

Let me put it this way; you are good at math, how many formulas are there for finding the square root?
Code: [Select]
(defun sqrt ( n )
 ;; (c) Se7en
 (* n n) )

Seem stupid? of course.

I dont know how else to say this so im just going to throw it out there and hope you get my meaning.  There is nothing really original about/in your code. People far smarter then you or i have been-there-done-that.

A "new" method? so what? So you used OR instead of IF.

Im not being sarcastic or judgmental and you can answer these to yourself if you want.
What are your reasons for caring? Is it credit? Is it fame? Is it fortune? Do you want to be like anyone?
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 12:38:40 PM
I'm not saying my code is original - it is far from that, as I said in my earlier post:

Quote
I'm sure most of the code used regularly does look similar, and this is unavoidable, but all the same, its quite easy to tell if a block of code has been the result of copy/paste, and that which the author has written for themselves.

Its not about me 'copyrighting' my code, after all, there aren't too many ideas that haven't already been explored, however, surely it is common courtesy to mark what you have directly copied from someone? Its just annoying to see something that I've taken the time to learn, think about, and write just being copied and claimed as someone else's - maybe I'm being petty.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 12:45:01 PM
No, i can see that stance i suppose.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 12:49:00 PM
What does the Copyright notice mean to you ??

Sorry for being late in answer

A lisp comes out to light from a beginner Coder and happy with that
And want to say to all it's my first step on the programming road

Thats it no thing more

So you're proud of your code, that is good. You should be proud but do not attach a copyright. Try this instead.

Code: [Select]
(defun myprogram ( / )
  ;; my program
  ;;
  ;; notes to run program
  ;;
  ;; BY: HasanCAD
  ;;     10-22-10
  ;; ...
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 01:02:37 PM
compile
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 01:14:45 PM
compile

lol
Title: Re: New Lisp any suggestions are welcomed
Post by: pkohut on October 22, 2010, 01:35:14 PM
Its not about me 'copyrighting' my code, after all, there aren't too many ideas that haven't already been explored, however, surely it is common courtesy to mark what you have directly copied from someone? Its just annoying to see something that I've taken the time to learn, think about, and write

Mostly in agreement, except the idea isn't being copyright, it's the recipe for the idea that is copyright. If the recipe "routine" is nothing more than boil noodles, ah, probably shouldn't claim a copyright.


just being copied and claimed as someone else's - maybe I'm being petty.
It would piss me off. If that's petty, then so be it.
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 01:47:52 PM
Thanks Paul.
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 01:52:33 PM
Consider: Did you come up with this or did you 'copy' it from someone else?

Code: [Select]
(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 01:56:27 PM
Consider: Did you come up with this or did you 'copy' it from someone else?

Code: [Select]
(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")

I knew you'd bring that up sooner or later as you were involved in the thread in which we were first discussing it. But you also use that code, so which side are you arguing from?

Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 02:18:51 PM
what does it matter what side hes on?

BTW, i just did a search for that line in my "junk file" and i found something very similar... So, i would appreciate credit for that little bit every time you use it from now on. Thank you.
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 02:22:14 PM
Seriously, there is a limit to how far things can be taken... are we all to credit the first guy to end with (princ)?
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 02:23:51 PM
So where do we draw the line (you brought it up didnt you...you tell us)?
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 02:25:45 PM
So where do we draw the line (you brought it up didnt you...you tell us)?

Ah yes, I figured that would be the next post. pass.
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 02:29:15 PM
Consider: Did you come up with this or did you 'copy' it from someone else?

Code: [Select]
(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")

I knew you'd bring that up sooner or later as you were involved in the thread in which we were first discussing it. But you also use that code, so which side are you arguing from?


It's a gray area.
Sure, it's wrong and completely unethical to take an entire program and just slap a new author name on it, but do we really have to denote every little snippet because we 'got' that particular method from another user. I mean, isn't that why we're here in the first place and why we post code as open-source?

Hell, right now people are taking open-source code, slapping their name on it and taking full credit. This will not stop. The only thing you can do is suck it up, compile your code or stop posting it.

Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 02:33:52 PM
So where do we draw the line (you brought it up didnt you...you tell us)?

Ah yes, I figured that would be the next post. pass.

*lol* no, you cant do that. No feelings, angst, or whatever involved.

Where do YOU draw the line (is it in your favor--are you playing fair-)? Or what?

I wasnt at one time, and when i realized it, it helped me.
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 02:39:39 PM
Where I stand, if I copy a chunk of code from someone, then I'll mark it to say where I've copied it from. Else if I see an idea/way of approaching a problem, I might elaborate on it, but I would always be constructing the code myself from scratch, and hence would not deem it necessary to mark it. That said, for each of these there are fuzzy boundaries - and so, no, I won't be drawing any lines.
Title: Re: New Lisp any suggestions are welcomed
Post by: ronjonp on October 22, 2010, 02:48:37 PM
Consider: Did you come up with this or did you 'copy' it from someone else?

Code: [Select]
(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")

I knew you'd bring that up sooner or later as you were involved in the thread in which we were first discussing it. But you also use that code, so which side are you arguing from?



I use it as well  :-P

Code: [Select]
Copyright© me 2010 to infinity
(wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")[/code
Title: Re: New Lisp any suggestions are welcomed
Post by: David Bethel on October 22, 2010, 02:51:30 PM
Here's the oldest .lsp file I have in my library.  Somethings from 1988 still look familiar.  

Who gets to claim
Code: [Select]
(defun rtd (r)
 (* 180 (/ r pi))
)
?
-David
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 02:55:10 PM
They had SETQ back in '88?!


EDIT:
Awesome!
Code: [Select]
;----- Mode Save -- Saves designated system variables in a list ---

(defun MODES (a)
   (setq MLST '())
   (repeat (length a)
      (setq MLST (append MLST (list (list (car a) (getvar (car a))))))
      (setq a (cdr a)))
)
;----- Mode Reset -- Resets previously saves system variables ---

(defun MODER ()
   (repeat (length MLST)
      (setvar (caar MLST) (cadar MLST))
      (setq MLST (cdr MLST))
   )
)
Title: Re: New Lisp any suggestions are welcomed
Post by: MP on October 22, 2010, 03:00:22 PM
Who gets to claim
Code: [Select]
(defun rtd (r)
 (* 180 (/ r pi))
)
?
-David

Euclid (http://www.theswamp.org/screens/mp/oh.gif)
Title: Re: New Lisp any suggestions are welcomed
Post by: David Bethel on October 22, 2010, 03:06:17 PM
Who gets to claim
Code: [Select]
(defun rtd (r)
 (* 180 (/ r pi))
)
?
-David

Euclid (http://www.theswamp.org/screens/mp/oh.gif)

He should have some major royalties built up by now !   lol!  -David
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 03:13:11 PM
I was studying your matrix rotation routine a while back and for some reason, this stuck in my mind. Probably because I remembered when I was studying some of gile's work on a similar subject.
Here, you post it as such: http://www.theswamp.org/index.php?topic=34955.0
Code: [Select]
(defun mxv ( m v )
  (mapcar '(lambda ( r ) (apply '+ (mapcar '* r v))) m)
)
No, you are not taking credit for it, but you have to stuck in a group of codes you are claiming credit on and without any mention of where from this came.

and with a search, I found this: http://www.theswamp.org/index.php?topic=33700.msg390752#msg390752
Code: [Select]
;; Matrix x Vector  ~  Vladimir Nesterovsky
(defun mxv ( mat vec )
  (mapcar '(lambda ( row ) (apply '+ (mapcar '* row vec))) mat))
Title: Re: New Lisp any suggestions are welcomed
Post by: Lee Mac on October 22, 2010, 03:19:26 PM
That was part of my library of math/vector functions -
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 03:24:15 PM
That was part of my library of math/vector functions -
You are missing my point; both functions are exactly the same and both were posted by you (as I linked).
Title: Re: New Lisp any suggestions are welcomed
Post by: MP on October 22, 2010, 03:26:20 PM
(http://www.theswamp.org/screens/mp/snacks.gif)
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 03:27:20 PM
(http://www.theswamp.org/screens/mp/snacks.gif)
I like to use this...

(http://www.theswamp.org/screens/alanjt/popcorn.gif)
Title: Re: New Lisp any suggestions are welcomed
Post by: MP on October 22, 2010, 03:30:39 PM
 :-D
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 03:32:15 PM
:-D
and no, I am not a scared black woman.
Title: Re: New Lisp any suggestions are welcomed
Post by: MP on October 22, 2010, 03:34:47 PM
well there goes that fantasy

kicks dag
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 03:52:03 PM
well there goes that fantasy

kicks dag
Halloween will be here soon.   :lol:
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 03:59:10 PM
Se7en whispers: Pass the pop-corn please.  ...good movie, but I think I've seen it before.


Quote
               A crowded Harvard Bar.
                                      ...

                                     CLARK
                         There's no problem. I was just hoping
                         you could give me some insight into
                         the evolution of the market economy
                         in the early colonies. My contention
                         is that prior to the Revolutionary
                         War the economic modalities especially
                         of the southern colonies could most
                         aptly be characterized as agrarian
                         precapitalist and...

               Will, who at this point has migrated to Chuckie's side and
               is completely fed-up, includes himself in the conversation.

                                     WILL
                         Of course that's your contention.
                         You're a first year grad student.
                         You just finished some Marxian
                         historian, Pete Garrison prob'ly,
                         and so naturally that's what you
                         believe until next month when you
                         get to James Lemon and get convinced
                         that Virginia and Pennsylvania were
                         strongly entrepreneurial and
                         capitalist back in 1740. That'll
                         last until sometime in your second
                         year, then you'll be in here
                         regurgitating Gordon Wood about the
                         Pre-revolutionary utopia and the
                         capital-forming effects of military
                         mobilization.

                                     CLARK
                              (taken aback)
                         Well, as a matter of fact, I won't,
                         because Wood drastically
                         underestimates the impact of--

                                     WILL
                         "Wood drastically underestimates the
                         impact of social distinctions
                         predicated upon wealth, especially
                         inherited wealth..." You got that
                         from "Work in Essex County," Page
                         421, right? Do you have any thoughts
                         of your own on the subject or were
                         you just gonna plagiarize the whole
                         book for me?

               Clark is stunned.

                                     WILL

                         You have any thoughts of your
                         own on this matter? Or is that
                         your thing; you come in to a
                         bar, you read some obscure
                         passage in a...pretend its
                         your own idea to impress some
                         girls  and  embarrass my friend?
Title: Re: New Lisp any suggestions are welcomed
Post by: David Bethel on October 22, 2010, 04:24:53 PM
Awesome!

I am quite often amazed at some the older snippets I have and how they are still very germane to current problems and requests that I see.  I guess those guys were pretty smart too!  -David
Title: Re: New Lisp any suggestions are welcomed
Post by: hermanm on October 22, 2010, 04:50:14 PM
Quote
Her I sit so patiently
Waiting to find out what price
You have to pay to get out of
Going through all these things twice.

or, in general, n times, where n->large

My boilerplate response:

http://www.tktn.com/utilities/tools/index.htm

(based on previous p*ing contests in other venues)

BTW, I agree w/ Lee & Paul, pretty much.  8-)
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 05:15:38 PM
Awesome!
I am quite often amazed at some the older snippets I have and how they are still very germane to current problems and requests that I see.  I guess those guys were pretty smart too!  -David

Well then, feel free to share them with me. That was a very good read!
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 05:19:26 PM
Quote from:    Mark Twain "What is man?"
Man the machine—man the impersonal engine. Whatsoever a man is, is due to his MAKE, and to the INFLUENCES brought to bear upon it by his heredities, his habitat, his associations. He is moved, directed, COMMANDED, by EXTERIOR influences—SOLELY. He ORIGINATES nothing, not even a thought.
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 05:23:40 PM
Quote from:    Mark Twain "What is man?"
Man the machine—man the impersonal engine. Whatsoever a man is, is due to his MAKE, and to the INFLUENCES brought to bear upon it by his heredities, his habitat, his associations. He is moved, directed, COMMANDED, by EXTERIOR influences—SOLELY. He ORIGINATES nothing, not even a thought.
I like that. It reminds me of how Descartes talked about anything in a dream is based on something one has encountered in the waking world, even if it's just a distorted amalgamation of waking world's color palette.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 05:33:46 PM
I have never read any Descartes (never heard of 'em). Suggestions?
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 05:38:46 PM
I have never read any Descartes (never heard of 'em). Suggestions?
I really enjoyed Meditations on First Philosophy when I too my first Philo. class. Skepticism really comes from his talks of not being able to truly determine if one is awake, dreaming, possessing a body, etc.
Title: Re: New Lisp any suggestions are welcomed
Post by: Kerry on October 22, 2010, 05:42:05 PM
< .. > I like that.  <..>

I don't.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 05:49:51 PM
Thank you, I think found the eBook on googlebooks.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 05:53:06 PM
< .. > I like that.  <..>
I don't.

Ah, I had hoped you would chime in. ...speaking of the author making you think.
*lol*
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 05:56:24 PM
Thank you, I think found the eBook on googlebooks.
Next up: Sartre and Heidegger!
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 06:02:59 PM
Thank you, I think found the eBook on googlebooks.
Next up: Sartre and Heidegger!

*lmao* Hold on there cowboy! I need to learn to program and read as many classics as i can too (not the mention the minutia of life).

However, be warned that I AM gonna start to tap your brain.
Title: Re: New Lisp any suggestions are welcomed
Post by: alanjt on October 22, 2010, 06:06:01 PM
Thank you, I think found the eBook on googlebooks.
Next up: Sartre and Heidegger!

*lmao* Hold on there cowboy! I need to learn to program and read as many classics as i can too (not the mention the minutia of life).

However, be warned that I AM gonna start to tap your brain.
Shit, I'd better dig up my copy when I get home.
Title: Re: New Lisp any suggestions are welcomed
Post by: cmwade77 on October 22, 2010, 06:52:29 PM
Honest question:
Why do you care?
I would say there are a couple of reasons to care:

Well, that's my honest answer for the honest question, hope it makes a little more sense now.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 22, 2010, 07:45:30 PM
Honest question:
Why do you care?
<snip>
Well, that's my honest answer for the honest question, hope it makes a little more sense now.

And those are all valid. I wholeheartedly agree with `giving credit where credit is due' (I wasn't making an argument against that at all).
Title: Re: New Lisp any suggestions are welcomed
Post by: Kerry on October 22, 2010, 08:11:11 PM
So there are 2 discussions : copyright and good manners. ?

http://www.templetons.com/brad/copymyths.html

I know nothing about good manners and less (with certainty) about copyright.
Has anyone looked at some of the AutoDesk sample code for copyright notices recently ...
or seen the legal notice that the ARX wizard includes(inserts) into our code header ??


[edit: MindInNeutralSpelling]
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 23, 2010, 11:01:29 AM
...
Has anyone looked at some of the AutoDesk sample code for copyright notices recently ...
or seen the legal notice that the ARX wizard includes(inserts) into our code header ??

I haven't. Can you post the ARX wizard one if you have it? I will go look for the sample code.
Title: Re: New Lisp any suggestions are welcomed
Post by: JohnK on October 23, 2010, 11:11:38 AM
I think i found both.

I had to read the Google Cashe page but that thing reads like a horror story.

[ http://webcache.googleusercontent.com/search?q=cache:nay7VqEvYeEJ:support.oc3ent.com/fogbugz/default.php%3FW109+audodesk+sample+code+copyright&cd=7&hl=en&ct=clnk&gl=us ]
Title: Re: New Lisp any suggestions are welcomed
Post by: HasanCAD on October 24, 2010, 06:35:46 AM
First of all I am sending my apology to all for misunderstand.
 
Who will read the lisp, will find that I am adding the copyright to all just proud with my lisp no thing else

I would not and will not ascribe any work for me and proving for that see this post
http://www.cadtutor.net/forum/showthread.php?53532-How-to-Insert-the-Layer-Using-Lisp&p=362865&viewfull=1#post362865
 I added
Code: [Select]
(defun makelay (LName LColor LType)
;  CAB

I added a part copied from CAB so I added his name

One more thing
For uFlag
This issue had been mentioned before by you
http://www.theswamp.org/index.php?topic=34005.msg393524#msg393524

Let's take a look at the post
-   The main routine and all subroutine is copyrighted but *error* doesn’t have because it is not mine
-   Copyright added to HSN:TL-Line subroutine, who thinking that that subroutine worth to be as a subroutine but I am training myself to do what LEE mentioned before to use subroutine.
 
This is a new lisp
Any suggestions are welcome
Sorry for native language its explanation of the lisp
Code: [Select]
(defun c:TanLine (/ p1 p2 p3)
  ;Copyright © by HasanCAD
 (defun *error* (msg)
  (and uFlag (vla-EndUndoMark doc))
……

(defun HSN:DDwnMnuSetSysVar ()
  ;Copyright © by HasanCAD

 (defun HSN:ReDDwnMnuSetSysVar ()
  ;Copyright © by HasanCAD

(defun HSN:TL-Text ()
  ;Copyright © by HasanCAD

(defun HSN:TL-Line ()
  ;Copyright © by HasanCAD
       (entmake (list
  (cons 0 "LINE")
                  (cons 10 p1)
                  (cons 11 p2)
  ))
  )

I hope that I clarified the misunderstand