Christopher C. Stacy | 1 Jun 09:20 2005

ext:*top-level-auto-declare*

Is there something like EXT:*TOP-LEVEL-AUTO-DECLARE* for SBCL?

-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
Christophe Rhodes | 1 Jun 10:33 2005
Picon
Picon

Re: ext:*top-level-auto-declare*

"Christopher C. Stacy" <cstacy <at> dtpq.com> writes:

> Is there something like EXT:*TOP-LEVEL-AUTO-DECLARE* for SBCL?

No.

Cheers,

Christophe

-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
Vadim Nasardinov | 4 Jun 22:24 2005
Picon
Picon

x86-arch.c:268: error: invalid lvalue in assignment

I'm having trouble rebuilding the binary RPM sbcl-0.9.0.18-1.i386.rpm
from the source RPM sbcl-0.9.0.18-1.src.rpm provided at

  http://sourceforge.net/project/showfiles.php?group_id=1373

I grabbed both of these from one of Sourceforge mirrors like so:

 | $ curl -O http://easynews.dl.sourceforge.net/sourceforge/sbcl/sbcl-0.9.0.18-1.src.rpm
 | $ curl -O http://easynews.dl.sourceforge.net/sourceforge/sbcl/sbcl-0.9.0.18-1.i386.rpm

I installed the binary RPM in order to bootstrap:

 | $ sudo rpm -Uvh sbcl-0.9.0.18-1.i386.rpm

I then installed the source RPM and attempted a rebuild:

 | $ rpm -ivh sbcl-0.9.0.18-1.src.rpm
 | $ rpmbuild -ba SPECS/sbcl-0.9.0.18-1.spec > sbcl-log.txt 2>&1

The build process goes on for about 8 minutes, produces about 16000
lines of output and terminates with the following error:

 | In file included from x86-arch.c:24:
 | interr.h:15: warning: type qualifiers ignored on function return type
 | x86-arch.c: In function 'arch_skip_instruction':
 | x86-arch.c:88: error: invalid lvalue in increment
 | x86-arch.c: In function 'sigtrap_handler':
 | x86-arch.c:268: error: invalid lvalue in assignment
 | x86-arch.c:273: error: invalid lvalue in assignment
 | gmake: *** [x86-arch.o] Error 1
(Continue reading)

Vadim Nasardinov | 4 Jun 22:44 2005
Picon
Picon

Re: x86-arch.c:268: error: invalid lvalue in assignment

On Sat, 2005-06-04 at 16:24 -0400, Vadim Nasardinov wrote:
> Is it a GCC 4.0 problem?

Google says it is:

http://www.google.com/search?q=%22GCC+4.0%22+%22invalid+lvalue+in+assignment%22

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
Russell McManus | 5 Jun 03:07 2005
Picon

useful code snippet


While writing some code using run-program, I came upon the need for
the following:

(defmacro with-current-directory ((new-dir) &body body)
  (let ((start (gensym)))
    `(let ((,start (sb-unix:posix-getcwd)))
      (unless (char= #\\ (aref ,start (1- (length ,start))))
	(setf ,start (concatenate 'string ,start "/")))
      (setf ,start (parse-namestring ,start))
      (unwind-protect
	   (progn
	     (sb-posix:chdir ,new-dir)
	     , <at> body)
	(sb-posix:chdir ,start)))))

Is there an already existing way to do this sort of thing?

-russ

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
Christophe Rhodes | 5 Jun 10:37 2005
Picon
Picon

Re: useful code snippet

Russell McManus <russell_mcmanus <at> yahoo.com> writes:

> While writing some code using run-program, I came upon the need for
> the following:
>
> (defmacro with-current-directory ((new-dir) &body body)
>   (let ((start (gensym)))
>     `(let ((,start (sb-unix:posix-getcwd)))
>       (unless (char= #\\ (aref ,start (1- (length ,start))))
> 	(setf ,start (concatenate 'string ,start "/")))
>       (setf ,start (parse-namestring ,start))
>       (unwind-protect
> 	   (progn
> 	     (sb-posix:chdir ,new-dir)
> 	     , <at> body)
> 	(sb-posix:chdir ,start)))))
>
> Is there an already existing way to do this sort of thing?

No.  There is at least a plausible argument that RUN-PROGRAM should
respect *DEFAULT-PATHNAME-DEFAULTS* by chdir()ing to the directory
component, which would allow the user to request a different directory
for run-program simply by binding it.  On the other hand, RUN-PROGRAM
is already a deeply scary mess of options, and adding another doesn't
really appeal...

Cheers,

Christophe

(Continue reading)

Russell McManus | 5 Jun 19:42 2005
Picon

Re: useful code snippet

Christophe Rhodes <csr21 <at> cam.ac.uk> writes:

> Russell McManus <russell_mcmanus <at> yahoo.com> writes:
>
>> While writing some code using run-program, I came upon the need for
>> the following:
>>
>> (defmacro with-current-directory ((new-dir) &body body)
>>   (let ((start (gensym)))
>>     `(let ((,start (sb-unix:posix-getcwd)))
>>       (unless (char= #\\ (aref ,start (1- (length ,start))))
>> 	(setf ,start (concatenate 'string ,start "/")))
>>       (setf ,start (parse-namestring ,start))
>>       (unwind-protect
>> 	   (progn
>> 	     (sb-posix:chdir ,new-dir)
>> 	     , <at> body)
>> 	(sb-posix:chdir ,start)))))
>>
>> Is there an already existing way to do this sort of thing?
>
> No.  There is at least a plausible argument that RUN-PROGRAM should
> respect *DEFAULT-PATHNAME-DEFAULTS* by chdir()ing to the directory
> component, which would allow the user to request a different directory
> for run-program simply by binding it.  On the other hand, RUN-PROGRAM
> is already a deeply scary mess of options, and adding another doesn't
> really appeal...

I agree about *DEFAULT-PATHNAME-DEFAULTS*, and indeed I tried this
first, hoping that it would "just work".  I would be willing the
(Continue reading)

Andreas Fuchs | 5 Jun 21:46 2005
Picon

Re: useful code snippet

Today, Russell McManus <russell_mcmanus <at> yahoo.com> wrote:
>
> While writing some code using run-program, I came upon the need for
> the following:

autobench uses a similar macro, so I have a few questions about your
code.

One, wouldn't it be better if the macro also bound
*default-pathname-defaults* to the new-dir? (My implementation assumes
that the user(me) will consistently use with-current-directory and so
skips the whole getcwd thing in favor of just chdir-ing back into
*d-p-defaults*)

> (defmacro with-current-directory ((new-dir) &body body)
>   (let ((start (gensym)))
>     `(let ((,start (sb-unix:posix-getcwd)))
>       (unless (char= #\\ (aref ,start (1- (length ,start))))
> 	  (setf ,start (concatenate 'string ,start "/")))

Two, what's with that #\\ check? In which cases does getcwd return the
\ character as the last element?

>       (setf ,start (parse-namestring ,start))
>       (unwind-protect
> 	   (progn
> 	     (sb-posix:chdir ,new-dir)
> 	     , <at> body)
> 	(sb-posix:chdir ,start)))))

(Continue reading)

Nikodemus Siivola | 6 Jun 09:25 2005
Picon

Re: x86-arch.c:268: error: invalid lvalue in assignment

On Sat, 4 Jun 2005, Vadim Nasardinov wrote:

> Is it a GCC 4.0 problem?

Yes. Current CVS HEAD should build on GCC 4.0.

Cheers,

  -- Nikodemus              Schemer: "Buddha is small, clean, and serious."
                   Lispnik: "Buddha is big, has hairy armpits, and laughs."

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
Florian Weimer | 6 Jun 11:49 2005
Picon

Re: useful code snippet

* Russell McManus:

> 	(sb-posix:chdir ,start)))))

I think you should use fchdir instead because it works in more cases
(deleted directory, unmount is prevented).

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20

Gmane