Author Topic: Comparing List Variables  (Read 4356 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10665
Re: Comparing List Variables
« Reply #15 on: February 09, 2009, 01:20:16 PM »
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Comparing List Variables
« Reply #16 on: February 09, 2009, 01:23:35 PM »
Sorry, wasn't trying to be a dk, or diminish how nice the function is, just sayin' (as you would yourself). :/
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10665
Re: Comparing List Variables
« Reply #17 on: February 09, 2009, 01:38:03 PM »
Sorry, wasn't trying to be a dk, or diminish how nice the function is, just sayin' (as you would yourself). :/

Oh no. I didnt take any offense at all! ...I screwed up by calling it iterative (I said `Red' instead of `Blue' and you corrected me. I cant get angry, if i did i would be a psychopath).

Me? I dont really care about ``Forum Face'' (That is one of the reasons why i use a Pseudo name and i will always address people with their pseudo names in public) so i dont really care about the glory or the failures; I try. Besides, I'm human. I know *I* know the difference and i don't really care if people think i do or not. I know *I* read SICP and that is enough sense of accomplishment for me...I dont need to flaunt it.

TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: Comparing List Variables
« Reply #18 on: February 09, 2009, 02:04:25 PM »
Quote
that one looks like something Tony wrote around 1692.

In Reini Urban's AutoLISP FAQ, this routine is attributed to Serge Volkov.

Quote
;;; Removes an item from a list (double elements allowed)
  ;;;   (remove 0 '(0 1 2 3 0)) -> (1 2 3)
  (defun REMOVE (ele lst)      ; by Serge Volkov
    (apply 'append (subst nil (list ele) (mapcar 'list lst))))
Speaking English as a French Frog

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Comparing List Variables
« Reply #19 on: February 09, 2009, 02:28:32 PM »
Guess I misread the "meh". Forum face, that's a good one. :D

In Reini Urban's AutoLISP FAQ, this routine is attributed to Serge Volkov.

Quote
;;; Removes an item from a list (double elements allowed)
  ;;;   (remove 0 '(0 1 2 3 0)) -> (1 2 3)
  (defun REMOVE (ele lst)      ; by Serge Volkov
    (apply 'append (subst nil (list ele) (mapcar 'list lst))))

You could be right, my comment was based on the fact that semantically, it looks like something Tony would have penned way back. Having said that, some "solutions" are often the same verbatim, but are arrived at by different camps completely independently, because the path of least resistance, logically speaking, for some folks is very similar, tho that would not necessarily be true for Tony and Reini (I remember some lisp philosophy wars back when, oh my).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst