Re: Lisp refactoring puzzle
I might argue that it isn't quite right (or politic) to call those who resist technological changes "idiots" so much as to observe they often have goals which cannot wait for the ideal expressive system. People love python not because Python is the platonic programming language, but because it does what they need it to do right now. Ditto (often) for Lisp. It is easy to point out an example of forward thinking languages like Mathematica, and who knows, perhaps it will be the template upon which languages are built in the next 100 years. But if it is, there will be tons of other technologies which _didn't_ make it but which might have seemed equally advanced. Early adoption is always a risk, and few people want to deal with it when technology exists now that solves their problem now, however sub-optimally. That is hardly idiotic, Xah. -- http://mail.python.org/mailman/listinfo/python-list
Re: Unknown function operation deciphering, exercise in readability by program reasoning
On Dec 4, 4:49 pm, Barb Knox wrote: > In article > <46365e1d-42d8-4b3b-8e69-941472467...@u25g2000pra.googlegroups.com>, > small Pox wrote: > > > Rules : > > No need to add any additional hurdles -- the code as presented is > thoroughly unreadable by humans. > > > @1@ No execution of the function, only checking syntax > > What about "desk checking" (a lost art from the oldene dayes)? > > > @2@ No profiling using a debugger or profiler > > > @3@ Editing allowed to make simpler variables > > Maybe if you had done that yourself before posting it then I would have > tried to understand it. As it is, no way. > > > > > > > > > > > (defun unknown-function (nano-thermite-911-FBI-fat-per-diem-bustards- > > kept-their-odious-mouth-shut-on-anthrax-and-911-lie) > > (let (BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS- > > PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS > > I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) > > (while (or I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- > > SPEECH-ON-KHAZARS nano-thermite-911-FBI-fat-per-diem-bustards-kept- > > their-odious-mouth-shut-on-anthrax-and-911-lie) > > (if nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- > > odious-mouth-shut-on-anthrax-and-911-lie > > (if (consp nano-thermite-911-FBI-fat-per-diem-bustards-kept- > > their-odious-mouth-shut-on-anthrax-and-911-lie) > > (setq I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- > > SPEECH-ON-KHAZARS (cons (cdr nano-thermite-911-FBI-fat-per-diem- > > bustards-kept-their-odious-mouth-shut-on-anthrax-and-911-lie) > > I-AM-THE-WITNESS-DOT-COM-has-MR- > > BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) > > nano-thermite-911-FBI-fat-per-diem-bustards-kept- > > their-odious-mouth-shut-on-anthrax-and-911-lie (car nano-thermite-911- > > FBI-fat-per-diem-bustards-kept-their-odious-mouth-shut-on-anthrax- > > and-911-lie)) > > (setq BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY- > > NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI- > > MURDERERS (cons nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- > > odious-mouth-shut-on-anthrax-and-911-lie BERNARD-MADOFF-PHILIP-MARKOFF- > > MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL-WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE- > > KATSEV-MOSSAD-DUBAI-MURDERERS) > > nano-thermite-911-FBI-fat-per-diem-bustards-kept- > > their-odious-mouth-shut-on-anthrax-and-911-lie nil)) > > (setq nano-thermite-911-FBI-fat-per-diem-bustards-kept-their- > > odious-mouth-shut-on-anthrax-and-911-lie (car I-AM-THE-WITNESS-DOT-COM- > > has-MR-BENJAMIN-FREEDMAN-SPEECH-ON-KHAZARS) > > I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN-SPEECH- > > ON-KHAZARS (cdr I-AM-THE-WITNESS-DOT-COM-has-MR-BENJAMIN-FREEDMAN- > > SPEECH-ON-KHAZARS > > BERNARD-MADOFF-PHILIP-MARKOFF-MIKHAIL-KHODORKOVSKY-NEOCONS-PAUL- > > WOLFOWITZ-LEWIS-SCOOTER-LIBBY-MOSHE-KATSEV-MOSSAD-DUBAI-MURDERERS)) > > -- > --- > | BBB b \ Barbara at LivingHistory stop co stop uk > | B B aa rrr b | > | BBB a a r bbb | Quidquid latine dictum sit, > | B B a a r b b | altum videtur. > | BBB aa a r bbb | > - I think this is correct: (defun unknown-function (sym0) (let (sym1 sym2) (while (or sym2 sym0) (if sym0 (if (consp sym0) (setq sym2 (cons (cdr sym0) sym2) sym0 (car sym0)) (setq sym3 sym4 (cons sym0 sym1) sym0 nil)) (setq sym0 (car sym2) sym2 (cdr sym2 sym1)) Thank emacs, not me. -- http://mail.python.org/mailman/listinfo/python-list
