#481 ('m)[1] (meval)

None
closed
nobody
Lisp Core (471)
5
2016-01-31
2003-12-28
No

('m)[1] currently returns m(1). It should return m[1].

Discussion

  • Stavros Macrakis

    Logged In: YES
    user_id=588346

    Peculiarly,

    (m)[1] => m[1] -- actually parses as m[1]
    (1,'m)[1] => m[1]
    (0+'m)[1] => m[1]

     
  • Stavros Macrakis

    Logged In: YES
    user_id=588346

    cf bug 866706

     
  • Robert Dodier

    Robert Dodier - 2006-07-22

    Logged In: YES
    user_id=501686

    Observed in 5.9.3cvs. A few more notes.

    display2d:false;
    ('m)[1];
    :lisp $_
    => ((MQAPPLY ARRAY) ((MQUOTE) $M) 1)
    :lisp (displa $_)
    => 'm[1]
    :lisp (meval $_)
    => (($M SIMP) 1)

     
  • Robert Dodier

    Robert Dodier - 2006-07-22
    • labels: --> Lisp Core
     
  • Robert Dodier

    Robert Dodier - 2012-08-12

    Still present in current version (just before 5.28).

    Culprit seems to be MQAPPLY1 in src/mlisp.lisp. Not clear how to resolve the problem.

    For the record, here's another anomaly from MQAPPLY1.

    foo : bar;
    foo[1];
    => bar[1] --- expected, since foo evaluates to bar
    (foo + 0)[1];
    => bar[1] --- expected, since foo + 0 evaluates to bar
    ('foo + 0)[1];
    => bar[1] --- oops, too much evaluation

     
  • Kris Katterjohn

    Kris Katterjohn - 2016-01-31
    • status: open --> closed
    • Group: --> None
     
  • Kris Katterjohn

    Kris Katterjohn - 2016-01-31

    This has been fixed by commit [33666c]. The problem was in MAPPLY1, which was ignoring the ARRAY flag is the operator was MQUOTE.

    Now:

    (%i1) ('m)[1];
    (%o1) m[1]
    
     

    Related

    Commit: [33666c]

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks