> On 01 Jan 2015, at 14:33, <daiy...@yahoo.co.jp <mailto:daiy...@yahoo.co.jp>> 
> <daiy...@yahoo.co.jp <mailto:daiy...@yahoo.co.jp>> wrote:
> 
> Another example from http://www.cliki.net/diff <http://www.cliki.net/diff>
> In the diff.lisp file,
> 
> (defmacro do-file-lines ((line-var pathname-var &optional result) &body body)
>   (let ((stream-var (gensym)))
>     `(with-open-file (,stream-var ,pathname-var :direction :input
>                       :element-type 'character)
>       (do-stream-lines (,line-var ,stream-var ,result)
>         ,@body))))
> 
> (defun diff::intern-files (&rest files)
>   (let ((interner (diff::make-interner))
>         (interned-files nil))
>     (dolist (file files (values interner (nreverse interned-files)))
>       (let ((interned-file nil))
>         (diff::do-file-lines (line file)
>           (let ((code (diff::intern-string interner line)))
>             (push code interned-file)))
>         (push (coerce (nreverse interned-file) 'simple-vector) 
> interned-files)))))
> 
> The compiled code refuses to run, presumably choking at the macro expansion 
> above.
> If I eval the lower diff::intern-files by c-x c-e, the code runs fine.


Works for me:

; SLIME 2014-08-01
CL-USER> (ql:quickload :diff)
To load "diff":
  Load 1 ASDF system:
    diff
; Loading "diff"
[package cl-ppcre]................................
[package impl-specific-gray]......................
[package trivial-gray-streams]....................
[package diff]......
(:DIFF)
CL-USER> (diff::intern-files #P"/tmp/a/a.lisp" #P"/tmp/a/b.lisp")
#<a DIFF::INTERNER>
(#(0 1 2 3 4 5 6 7) #(0 8 2 9 4 10 6 11))
CL-USER> (list (lisp-implementation-type) (lisp-implementation-version))
("ECL" "13.5.1")
CL-USER> 

http://www.centova.com/en/faq/general/troubleshooting/how_to_effectively_report_a_bug_or_problem
 
<http://www.centova.com/en/faq/general/troubleshooting/how_to_effectively_report_a_bug_or_problem>


-- 
__Pascal J. Bourguignon__


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to