Mirko Vukovic | 3 Feb 18:30
Picon

how to access a stream's file descriptor

Hello,

when I print a stream associated with an open file, I can see the file name there.

How can I query the stream to get the associated file name?

(I did look in the manual, and looked under sb-sys, but found nothing.)

Thank you,

Mirko

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
Marco Antoniotti | 1 Feb 14:16
Picon

ELS 2012, Zadar, Croatia

Apologies for the multiple postings. 

PAPER SUBMISSION DEADLINE EXTENDED 

European Lisp Symposium 2012, Zadar, Croatia, April 30th - May 1st, 2012 

http://european-lisp-symposium.org 

The purpose of the European Lisp Symposium is to provide a forum for 
the discussion and dissemination of all aspects of design, 
implementation and application of any of the Lisp and Lisp-inspired 
dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP, 
Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, and so on. We 
encourage everyone interested in Lisp to participate. 

The main theme of the 2012 European Lisp Conference is 
"Interoperability: Systems, Libraries, Workflows".  Lisp based and 
functional-languages based systems have grown a variety of solutions 
to become more and more integrated with the wider world of Information 
and Communication Technologies in current use.  There are several 
dimensions to the scope of the solutions proposed, ranging from 
"embedding" of interpreters in C-based systems, to the development of 
abstractions levels that facilitate the expression of complex context 
dependent tasks, to the construction of exchange formats handling 
libraries, to the construction of theorem-provers for the "Semantic 
Web".  The European Lisp Symposium 2012 solicits the submission of 
papers with this specific theme in mind, alongside the more 
traditional tracks which have appeared in the past editions. 

We invite submissions in the following forms: 

Papers: Technical papers of up to 15 pages that describe original 
results or explain known ideas in new and elegant ways. 

Demonstrations: Abstracts of up to 4 pages for demonstrations of 
tools, libraries, and applications. 

Tutorials: Abstracts of up to 4 pages for in-depth presentations about 
topics of special interest for at least 90 minutes and up to 180 
minutes. 

Lightning talks: Abstracts of up to one page for talks to last for no 
more than 5 minutes. 

All submissions should be formatted following the ACM SIGS guidelines 
and include ACM classification categories and terms. For more 
information on the submission guidelines and the ACM keywords, see: 
http://www.acm.org/sigs/publications/proceedings-templates and 
http://www.acm.org/about/class/1998. 

Important dates: 

February 15th 2012: submission deadline (extended deadline) 
March 7th 2012: acceptance results 

April 30th 2012: Conference opens 

Program Commitee. 
Chair: 
Marco Antoniotti, Università degli Studi di Milano Bicocca, Milan, ITALY 

Local organizers: 
Damir Cavar, Eastern Michigan University 
Franjo Pehar, University of Zadar 
Damir Kero, University of Zadar 

Members: 
Giuseppe Attardi, Università degli Studi di Pisa, Pisa, ITALY 
Pascal Costanza, Intel, Bruxelles, BELGIUM 
Marc Feeley, Université de Montreal, Montreal, CANADA 
Scott McKay, Google, U.S.A. 
Kent Pitman, U.S.A. 
Christophe Rhodes, Department of Computing, Goldsmiths, University of London, London, UNITED KINGDOM 
Robert Strandh, LABRI, Université de Bordeaux, Bordaux, FRANCE 
Didier Verna, EPITA / LRDE, FRANCE 
Taiichi Yuasa, Kyoto University, JAPAN

--
Marco Antoniotti

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Marco Antoniotti | 23 Jan 13:28
Picon

[Sbcl-devel] ELS2012 Zadar, Croatia, Call for Papers

Apologies for the multiple postings...

===========================================================================

European Lisp Symposium 2012, Zadar, Croatia, April 30th - May 1st, 2012
http://european-lisp-symposium.org

The purpose of the European Lisp Symposium is to provide a forum for
the discussion and dissemination of all aspects of design,
implementation and application of any of the Lisp and Lisp-inspired
dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP,
Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, and so on. We
encourage everyone interested in Lisp to participate.

The main theme of the 2012 European Lisp Conference is
"Interoperabilty: Systems, Libraries, Workflows".  Lisp based and
functional-languages based systems have grown a variety of solutions
to become more and more integrated with the wider world of Information
and Communication Technologies in current use.  There are several
dimensions to the scope of the solutions proposed, ranging from
"embedding" of interpreters in C-based systems, to the development of
abstractions levels that facilitate the expression of complex context
dependent tasks, to the construction of exchange formats handling
libraries, to the construction of theorem-provers for the "Semantic
Web".  The European Lisp Symposium 2012 solicits the submission of
papers with this specific theme in mind, alongside the more
traditional tracks which have appeared in the past editions.

We invite submissions in the following forms:

Papers: Technical papers of up to 15 pages that describe original
results or explain known ideas in new and elegant ways.

Demonstrations: Abstracts of up to 4 pages for demonstrations of
tools, libraries, and applications.

Tutorials: Abstracts of up to 4 pages for in-depth presentations about
topics of special interest for at least 90 minutes and up to 180
minutes.

Lightning talks: Abstracts of up to one page for talks to last for no
more than 5 minutes.

All submissions should be formatted following the ACM SIGS guidelines
and include ACM classification categories and terms. For more
information on the submission guidelines and the ACM keywords, see:
http://www.acm.org/sigs/publications/proceedings-templates and
http://www.acm.org/about/class/1998.

Important dates:

Jan 31st 2012: submission deadline
Feb 21st 2012: acceptance results

April 30th, 2012 Conference opens

Program Commitee.
Chair:
Marco Antoniotti, Università degli Studi di Milano Bicocca, Milan, ITALY

Local organizers:
Damir Ćavar, Eastern Michigan University
Franjo Pehar, University of Zadar
Damir Kero, University of Zadar

Members:
Giuseppe Attardi, Università degli Studi di Pisa, Pisa, ITALY
Pascal Costanza, Intel, Bruxelles, BELGIUM
Marc Feeley, Université de Montreal, Montreal, CANADA
Scott McKay, Google, U.S.A.
Kent Pitman, U.S.A.
Christophe Rhodes, Department of Computing, Goldsmiths, University of London, London, UNITED KINGDOM
Robert Strandh, LABRI, Université de Bordeaux, Bordaux, FRANCE
Didier Verna, EPITA / LRDE, FRANCE
Taiichi Yuasa, Kyoto University, JAPAN

--
Marco Antoniotti

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
Burton Samograd | 20 Jan 23:46
Picon
Gravatar

Setf in macroexpansion causing warning about variable being defined but not used

Hello,

I am wondering if anyone can explain the reason for the defined
but not used variable in setf that this code is experiencing:

CL-USER> (set-macro-character  #\$
                      (lambda (stream char)
                        (declare (ignore char))
                        (let ((v (read stream)))
                          (list (get v 'setf-handler-name) v))))

(defmacro defactive (var value &key write-handler read-handler)
  (let ((setf-handler-name (gensym)))
    `(progn
       (defparameter ,var ,value)
       (defmacro ,setf-handler-name (,var)
         (let ((read-handler (gensym)))
           `(let ((,read-handler (get ',',var :read-handler)))
              (if ,read-handler
                  (funcall ,read-handler (eval ,',var))
                  ,',var))))
       (defsetf ,setf-handler-name (,var) (new-val)
         (let ((write-handler (gensym)))
           `(let ((,write-handler (get ',',var :write-handler)))
              (when ,write-handler
                (funcall ,write-handler (eval ,',var) ,new-val))
              (setf ,',var ,new-val))))
       (setf (get ',var 'setf-handler-name) ',setf-handler-name)
       (setf (get ',var :write-handler) ,write-handler)
       (setf (get ',var :read-handler) ,read-handler)
       ,value)))

(defmacro setactive (var &key read-handler write-handler)
  `(progn
     (when ,read-handler
       (setf (get ',var :read-handler) ,read-handler))
     (when ,write-handler
       (setf (get ',var :write-handler) ,write-handler))))

(defactive x 0
  :write-handler (lambda (old-val new-val) (format t "old: ~A  new:
~A" old-val new-val))
  :read-handler (lambda (val) (format t "value: ~A" val) val))
;(setactive x :read-handler (lambda (val) (format t "~A !!! ~A" val)))
;(setactive x :write-handler (lambda (old-val new-val) (format t "~A
!!! ~A" old-val new-val)))

(defactive d6 (random 6)
  :read-handler (lambda (val) (let ((old val)) (setf d6 (random 6)) old)))

STYLE-WARNING: redefining COMMON-LISP-USER::DEFACTIVE in DEFMACRO
STYLE-WARNING: redefining COMMON-LISP-USER::SETACTIVE in DEFMACRO
1
CL-USER> (setf $x 10)
; in: SETF (#:G1129 X)
;     (LET* ((#:G1175 X))
;       (MULTIPLE-VALUE-BIND (#:G1176)
;           10
;         (LET ((#:G1177 #))
;           (WHEN #:G1177 (FUNCALL #:G1177 # #:G1176))
;           (SETF X #:G1176))))
;
; caught STYLE-WARNING:
;   The variable #:G1175 is defined but never used.
;
; compilation unit finished
;   caught 1 STYLE-WARNING condition
old: 0  new: 10
10

--
Burton Samograd
http://kruhft.dyndns.org

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Giovanni Gigante | 13 Jan 12:16
Picon

GLIBC_2.14 not found


I've installed the 1.0.55 amd64 binary distribution.
When I try to run SBCL, it fails with:

sbcl: /lib/libc.so.6: version `GLIBC_2.14' not found (required by sbcl)

running on debian 5.0.8, kernel 2.6.26-2-amd64 #1 SMP

gg

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
Tamas Papp | 11 Jan 15:21
Picon

"never used" warning when combining &rest and &key arguments

Sometimes I find it useful to combine &rest and &key arguments in a
lambda list, especially if I want the key arguments to show up in the
editor hints, have defaults, etc, but I plan to pass them to another
function.  For example, (ignore what mosaic is, it is not relevant)

(defun make-mosaic-vector (mosaic &rest make-array-arguments 
                                  &key (element-type t) initial-element
                                       initial-contents)
  (make-mosaic-vector% :mosaic mosaic
                       :elements (apply #'make-array (mosaic-size mosaic)
                                        make-array-arguments)))

But unless I

(declare (ignore element-type initial-element initial-contents))

SBCL gives me a style-warning about these variables.  I am not
reporting this as a bug because I am not sure what the correct
behavior is (and I could not find anything about this in the HS), but
my intuition is that those variables are used, in the form of
make-array-arguments.  Am I wrong, or is this a (minor) bug?

Best,

Tamas

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
Rupert Swarbrick | 3 Jan 13:17
Picon
Gravatar

Strange package locking behaviour

Hi,

Can anyone explain the following to me?

CL-USER> (sb-ext:with-unlocked-packages (:sb-kernel)
           (sb-impl::package-lock-violation-p (find-package :sb-kernel) 'sb-kernel:type-expand))
  0: (SB-IMPL::PACKAGE-LOCK-VIOLATION-P #<PACKAGE "SB-KERNEL">
                                        SB-KERNEL:TYPE-EXPAND)
  0: SB-IMPL::PACKAGE-LOCK-VIOLATION-P returned NIL
NIL
CL-USER> (sb-ext:with-unlocked-packages (:sb-kernel)
           (defun sb-kernel::foo (form) (typexpand form)))
  0: (SB-IMPL::PACKAGE-LOCK-VIOLATION-P #<PACKAGE "SB-KERNEL"> SB-KERNEL::FOO)
  0: SB-IMPL::PACKAGE-LOCK-VIOLATION-P returned T
  0: (PACKAGE-LOCK-VIOLATION #<PACKAGE "SB-KERNEL"> :SYMBOL SB-KERNEL::FOO
                             :FORMAT-CONTROL "proclaiming ~S as a function"
                             :FORMAT-ARGUMENTS (SB-KERNEL::FOO))
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
; Evaluation aborted on #<SYMBOL-PACKAGE-LOCKED-ERROR "proclaiming ~S as a function" {C6E8429}>.

I've traced SB-IMPL::PACKAGE-LOCK-VIOLATION-P and
SB-IMPL::PACKAGE-LOCK-VIOLATION. I don't understand why I only get a
violation on the second example, since it seems to me I should have
turned them off in both.

I hope I'm not missing something obvious...

Rupert
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
Tamas Papp | 10 Dec 11:15
Picon

redefining structures

Redefining structures (with a different layout, or factoring out parts
to an included structure, etc) sometimes causes glitches like

The value
  #S(AXIS
     :TITLE "y"
     :TITLE-MARGIN 20
     :DECORATION-MARGIN #S(XY :X 25 :Y 45)
     :MARK 3
     :ANNOTATION-DISTANCE 6
     :SPACING #S(XY :X 50 :Y 30))
is not of type
  AXIS.
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME interactive evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING {1007A1CD33}>)

Backtrace:
  0: ((SB-PCL::FAST-METHOD MARGIN (AXIS (EQL :TITLE))) ..)[:EXTERNAL]
  1: ((SB-PCL::FAST-METHOD MARGIN (T (EQL T))) ..)

in SBCL, even when I recompile everything.  Am I doing something
wrong?  Just curious, not a big deal as uninterning & recompiling is a
workaround.

I am using 1.0.54.

Best,

Tamas

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
Tamas Papp | 5 Dec 09:27
Picon

large functions

Hi,

I am working on AD (automatic differentiation) code in SBCL, and ran
into a problem with implementing it.  This is how it works at the
moment: I take a graph of elementary operations --- think of it as a
long let*, eg

(let* ((var1 x)
       (var2 y)
       (var3 (+ var1 var2))
       ...))

an turn it into another list of elementary operations.  I thought I
could just put it in a LAMBDA and compile, but I get 

Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.

PROCEED WITH CAUTION.
   [Condition of type SB-KERNEL::CONTROL-STACK-EXHAUSTED]

errors when I try to compile it (toy example at the end of the message).

I am looking for advice on how to do this some other way that

1. works,
2. gives reasonably fast code -- hints are enough, I will benchmark it
   anyway 
3. allows me to leverage the existing CL facilities to a large extent.

My fallback solution would be allocating a large array, and
implementing elementary operations as

(let ((v (make-array size :element-type 'double-float)))
  (setf (aref v 0) x)
  (setf (aref v 1) y)
  (setf (aref v 2) (+ (aref v 0) (aref v 1)))
  ...

but then I lose a lot of advantages.

Best,

Tamas

PS.: Contrived toy example:
(defmacro defcrazy (n)
  "Contrived example."
  `(defun crazy (x)
     (check-type x double-float)
     (let* ,(loop repeat n collecting '(x (1+ x)))
       x)))
(defcrazy 500)                          ; works
(defcrazy 5000)                         ; control stack exhausted

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
jcm | 4 Dec 16:48
Favicon

Writing non-ascii characters to a file

Is there a tutorial somewhere on writing non-ascii characters to a file?

I have latin-1 encoded characters in a db, and I'm not sure how to write
those out.  I can use flexi-streams:string-to-octets and back, but how can
I use with-open-file to write the correct characters to a text file?

Sorry if this is a simple question, but this is my first foray into
encoding, and I'm sticking with SBCL to do it.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
jcm | 4 Dec 14:55
Favicon

Encoding issue

I'm using this article as a jumping off point to deploy hunchentoot as a
service:

http://zaries.wordpress.com/2010/11/09/lisp-web-server-from-scratch-using-hunchentoot-and-nginx/

But I'm having an encoding issue.  When I start this app from my personal
account, or even the system user that is used by the
'/etc/init.d/hunchentoot start' script, everything works fine.

However, when I start hunchentoot as a server, and attempt to output one
particular name via db query and xml output, I get this:

4: ((FLET #:LAMBDA769)
    #<TYPE-ERROR
      expected-type: BASE-CHAR datum: #\LATIN_CAPITAL_LETTER_A_WITH_TILDE>)
.
.
.
15: (REPLACE "JIM" "JIMÉNEZ, ANGELA")
16: (XML-EMITTER::WRITE-ESCAPED
     "JIMÉNEZ, ANGELA"
     #<SB-IMPL::STRING-OUTPUT-STREAM {CD0D891}>)
17: (XML-EMITTER:SIMPLE-TAG "opt" "JIMÉNEZ, ANGELA" (("val" 783)) NIL)

Even though this form:

(format t "Encoding~%")
(format t "~A~%" (sb-impl::default-external-format))

Outputs:

Encoding
UTF-8

because I have this:

LC_CTYPE=en_US.UTF-8; export LC_CTYPE

in the 'start-hunchentoot' script called by the /etc/init.d/hunchentoot
script.

What other encoding settings should I check to figure out the discrepancy?

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help

Gmane