<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.lisp.lispworks.general">
    <title>gmane.lisp.lispworks.general</title>
    <link>http://blog.gmane.org/gmane.lisp.lispworks.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12254"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12253"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12252"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12251"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12250"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12249"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12248"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12247"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12246"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12245"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12244"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12243"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12242"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12241"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12240"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12239"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12238"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12237"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12236"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lispworks.general/12235"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12254">
    <title>output-pane in toolbar</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12254</link>
    <description>&lt;pre&gt;
Hi folks,

A cocoa question:

Does anyone have experience of using custom components in the toolbar? Specifically, I would like to create a custom component using an output-pane.

While this basically works, it creates problems with resizing of the toolbar – if the user selects small size, the custom component is not resized accordingly. Worse, if only icons are selected (as opposed to the default of icons+text), the toolbar shrinks but leaves a gray area below it.

There must be some way to respond to resize events for the toolbar (?)

Regards
Erik


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Erik Ronström</dc:creator>
    <dc:date>2013-05-21T06:41:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12253">
    <title>Re: Multi-line-text-input-pane and the Return key</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12253</link>
    <description>&lt;pre&gt;
Hi Paul,

I use the following definition:

(make-instance
  'capi:multi-line-text-input-pane
  :cursor :i-beam
  :font font
  :foreground color
  :text text
  :text-change-callback
  (lambda (text pane interface position)
    (declare (ignore text pane interface position))
    (text-node-update-editor node))
  :editing-callback
  (lambda (pane type)
    (declare (ignore pane))
      (when (eq type :end)
        (text-node-delete-editor node)))
  :gesture-callbacks
  `((#\Return . ,(lambda (tip)
                   (declare (ignore tip))
                   (text-node-delete-editor node)))))

On Windows the Return and Ctrl+Return key combinations are processed 
exactly as I want. On Linux in LW Personal the Return gesture is not 
caught.

At the same time I was wrong regarding the Esc key. It is caught neither 
in LWW nor LW Personal for Linux. It seems that in Linux the pane just 
loses the focus and in that case I remove the pane (I call 
text-node-delete-editor).

On Windows everything is OK but I would like to process the Esc key as well.

Thanks,
David

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>David Sorokin</dc:creator>
    <dc:date>2013-05-19T06:04:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12252">
    <title>Re: Multi-line-text-input-pane and the Return key</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12252</link>
    <description>&lt;pre&gt;
I recall doing something along these lines several years ago (probably 
to detect loss of focus).

Look at :navigation-callback and :editing-callback and build a state 
machine that tracks the state of the widget.  FWIW, here's a note from 
my code (LWW):

(defclass text-input-pane (capi:text-input-pane)
   ((state :initform nil)
    (ended :initform nil)  ;; correction for inconsistent state change 
(see states below)
    (model-update-callback :initarg :model-update-callback)
    (model-slot :initarg :model-slot)
    (fmt :initarg :fmt))
   (:default-initargs
    :callback-type :interface-item
    :callback 'tip-fini
    :model-slot nil
    :buttons '(:ok t :cancel t :cancel-function tip-cancel)
    :fmt "~,4F"
    :navigation-callback 'tip-editing
    :editing-callback 'tip-editing))

;; possible paths vs. callbacks
;; edit, hit enter -&amp;gt; START, RETURN, END
;; edit, hit TAB -&amp;gt; START, TAB-FORWARD, END
;; edit, click to focus elsewhere -&amp;gt; START, END
;; edit, click check-mark -&amp;gt; START, tip-fini
;; edit, click check-mark, call do-update -&amp;gt; START, tip-fini, END

pt

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Paul Tarvydas</dc:creator>
    <dc:date>2013-05-18T13:49:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12251">
    <title>Re: Multi-line-text-input-pane and the Return key</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12251</link>
    <description>&lt;pre&gt;
This is very strange. I just tested on Windows. Before it I tested on 
Linux. So, gesture #\Return works on Windows but doesn't work on Linux 
in my case. At the same time, gesture #\Esc (or, #\Escape ?) works on 
Linux but doesn't work on Windows... I only define the 
:gesture-callbacks initarg. Here I use LW Profession 32-bit for Windows 
and LW Personal for Linux.

Thanks,
David

18.05.2013 12:30, David Sorokin пишет:


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>David Sorokin</dc:creator>
    <dc:date>2013-05-18T13:00:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12250">
    <title>Multi-line-text-input-pane and the Return key</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12250</link>
    <description>&lt;pre&gt;
Hi!

Is there a way to catch when the user presses the Return key in 
multi-line-text-input-pane? Then I need to remove the pane. At the same 
time, Ctrl+Return should work as usual, i.e. a caret should go to the 
next line.

The rationale is as follows. This is a diagram editor. When double 
clicking the mouse on a text block, a new multi-line-text-input-pane is 
created directly in the diagram. When pressing Ctrl+Return, the caret 
should go to the next line in the pane. When pressing Return only, the 
multi-line-text-input-pane must be deleted and the text block must be 
set a new value. When pressing Esc, the changes must be cancelled and 
the pane must be removed from the diagram too.

I try to define the :gesture-callbacks initarg. Pressing on the Esc 
button is caught successfully but I cannot catch pressing the Return 
button. I need namely a multi line text input.

Thanks,
David

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>David Sorokin</dc:creator>
    <dc:date>2013-05-18T08:30:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12249">
    <title>Load images in dialog</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12249</link>
    <description>&lt;pre&gt;
Hi all,

I want to load images or make font lookups in a dialog, is it possible? As the documentation on interface states, the way to do it for ordinary windows is to put it into interface-display :before (or :after). But for display-dialog, that method is not called.

The only solution I've found so far is to defer creation of the images to the display-callback of my output-pane, and cache it from there. But it's quite ugly and seems like a last resort.

Regards
Erik


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Erik Ronström</dc:creator>
    <dc:date>2013-05-13T23:14:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12248">
    <title>Re: display-dialog: draw-image on output-pane</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12248</link>
    <description>&lt;pre&gt;
Hello everyone!

I've solved my problem! Thank you a lot for your help.

best regards,
Phil

On Mon, May 13, 2013 at 7:02 PM, Paul Tarvydas &amp;lt;paultarvydas&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Philipp Bach</dc:creator>
    <dc:date>2013-05-13T17:12:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12247">
    <title>Re: display-dialog: draw-image on output-pane</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12247</link>
    <description>&lt;pre&gt;
Read the capi reference manual pages for "output-pane" and "interface".

I think you want to create an interface which has one pane (the 
output-pane).

The output-pane should be declared with a :display-callback function 
(which draws the image into itself).  You need to supply that function 
because in a windowing system, windows can be dragged over each other - 
the O/S needs to know how to restore the window once it has been 
re-exposed.  The O/S calls the :display-callback to repaint the window...

You'll also need to read the manual page for "callback".  This describes 
the options you can set for the various function signatures when a 
callback function is called.  For example, if you declare a callback 
style of :interface, then your callback function will be called with the 
interface as the sole argument.  You will have to "reach" into the 
interface to grab the output-pane.  In this case, you need to declare 
the output-pane with an :accessor function (that's "standard" CL / CLOS, 
so look in whatever book you're reading), when you declare the 
output-pane field within the interface.

I forget which is which, but :data and :element callback styles can give 
the actual output-pane...

Remember:

1.  The CAPI classes are OO classes.  Functionality you may want, may be 
supplied in superclasses (so follow the hyperlinks in the docs).

2.  The run-time structure of an interface is a hierarchical tree. (You 
can use the interface-builder tool to help you build a first cut, but 
your example is quite simple).  You can reach up and down using various 
accessor functions described in the docs.

ask again, if still unclear

pt

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Paul Tarvydas</dc:creator>
    <dc:date>2013-05-13T17:02:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12246">
    <title>Re: display-dialog: draw-image on output-pane</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12246</link>
    <description>&lt;pre&gt;Hi Phil,

Just guessing here...  Have you tried creating a specific CAPI interface for your dialog and define a :CREATE-CALLBACK function?


Best,
Cam


On 12 mai 2013, at 12:43, Philipp Bach &amp;lt;philipp.wilfried.bach&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Camille Troillard</dc:creator>
    <dc:date>2013-05-13T16:33:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12245">
    <title>display-dialog: draw-image on output-pane</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12245</link>
    <description>&lt;pre&gt;
Hello!

I'm new to Lisp and Lispworks and I have the task to edit a
display-dialog. I should add a output-pane with an image on it to a
display-dialog. The problem is that all my attempts to achieve that
ends up with the "Error No color-user found for #&amp;lt;CAPI:OUTPUT-PANE
222833FF&amp;gt;".

So I think I understand why this error is happen. So I have to put the
image on the output pane after the window is created. But how is that
possible with an display-dialog?

I tried combinations with these code pieces:

(capi:display-dialog
 (capi:make-container
  (setq image-pane
        (make-instance 'capi:output-pane))))

(capi:apply-in-pane-process image-pane 'gp:draw-image image-pane
(gp:load-image image-pane image-path) 0 0)

Is there someone with a good advice what I'm doing wrong?

Thank you,
Phil

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Philipp Bach</dc:creator>
    <dc:date>2013-05-12T10:43:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12244">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12244</link>
    <description>&lt;pre&gt;
Jeff Massung &amp;lt;massung&amp;lt; at &amp;gt;gmail.com&amp;gt; writes:


That's a good point, and may be suitable in my current case after
all. In another case, I really do need bit vectors because bit-and,
bit-or, etc can be way, way, way faster than doing the logical bit
operators on octet vectors.

Zach


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Zach Beane</dc:creator>
    <dc:date>2013-05-08T15:15:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12243">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12243</link>
    <description>&lt;pre&gt;I'm sure this has been considered, but is there a specific reason to want
the bytes in a bit-vector format as opposed to just having a couple
functions for accessing the bits in the byte vector?

(defun get-bit (bytes i)
  (ldb (byte 1 (logand i 7)) (elt bytes (ash i -3))))

(defun set-bit (bytes i n)
  (let ((pos (ash i -3)))
    (setf (elt bytes pos) (dpb n (byte 1 (logand i 7)) (elt bytes pos)))))

?

Jeff M.


On Mon, May 6, 2013 at 1:41 PM, Zach Beane &amp;lt;xach&amp;lt; at &amp;gt;xach.com&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Jeff Massung</dc:creator>
    <dc:date>2013-05-08T13:35:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12242">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12242</link>
    <description>&lt;pre&gt;
"Pascal J. Bourguignon" &amp;lt;pjb&amp;lt; at &amp;gt;informatimago.com&amp;gt; writes:


I am aware of the portable techniques, and I am looking for non-portable
but supported mechanisms with smaller constant factors.

Zach

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Zach Beane</dc:creator>
    <dc:date>2013-05-08T09:39:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12241">
    <title>Registration deadline for ECLM in one week</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12241</link>
    <description>&lt;pre&gt;
Hi everybody,

The registration deadline for the European Common Lisp Meeting
in Madrid is May 15.  The ECLM is an excellent opportunity to
meet other Lispworkers.

http://weitz.de/eclm2013/

We hope to see you in Madrid,

Edi &amp;amp; Arthur

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Arthur Lemmens</dc:creator>
    <dc:date>2013-05-08T09:35:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12240">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12240</link>
    <description>&lt;pre&gt;
Zach Beane &amp;lt;xach&amp;lt; at &amp;gt;xach.com&amp;gt; writes:


It's fast (O(n) n=number of bits or number of bytes) and it's supported
by any conforming implementation (conforming code):


(defun octets-from-bits (bits &amp;amp;key (start 0) (end (length bits)))
  (bytes-from-bits 8 bits :start start :end end))

(defun bytes-from-bits (width bits &amp;amp;key (start 0) (end (length bits)))
  (let* ((size  (ceiling (- end start) width))
         (bytes (make-array size :element-type `(unsigned-byte ,width))))
    (loop
      :for d :below size
      :for bstart :from start :by width
      :do (setf (aref bytes d)
                (loop
                  :repeat (min width (- (length bits) bstart))
                  :for p = 1 :then (* 2 p)
                  :for i :from bstart
                  :unless (zerop (aref bits i))
                  :sum p)))
    bytes))

(defun octets-to-bits (bytes &amp;amp;key (start 0) (end (length bytes)))
  (bytes-to-bits 8 bytes :start start :end end))

(defun bytes-to-bits (width bytes &amp;amp;key (start 0) (end (length bytes)))
  (let* ((size (* width (- end start)))
         (bits (make-array size :element-type 'bit)))
    (loop
      :with d = -1
      :for s :from start :below end
      :for byte = (aref bytes s)
      :do (loop
            :repeat width
            :do (setf (aref bits (incf d)) (logand 1 byte)
                      byte (ash byte -1))))
    bits))

(assert (equalp (octets-from-bits #*100001101111111100000000100000000000000110101010010101011100)
                #(97 255 0 1 128 85 170 3)))

(assert (equalp (octets-to-bits #(97 255 0 1 128 85 170 3))
                #*1000011011111111000000001000000000000001101010100101010111000000))



&lt;/pre&gt;</description>
    <dc:creator>Pascal J. Bourguignon</dc:creator>
    <dc:date>2013-05-08T01:46:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12239">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12239</link>
    <description>&lt;pre&gt;
Tim Bradshaw &amp;lt;tfb&amp;lt; at &amp;gt;cley.com&amp;gt; writes:


Maybe I'm working at the wrong level -- I would be happy with a fast,
supported routine to (possibly destructively?) bash an octet vector into
a bit vector, and vice versa

Zach

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Zach Beane</dc:creator>
    <dc:date>2013-05-07T20:04:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12238">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12238</link>
    <description>&lt;pre&gt;
On 7 May 2013, at 15:29, Pascal J. Bourguignon wrote:


Yes, I think that's the point: I had been assuming that reading BITs meant decoding "bytes"[1] into bits on read, but that's wrong.  That means that it's unlikely that read-sequence can ever be useful for filling a bit-vector from a file in any useful way, simply because I assume that the intent would be to use a file with more than one bit per "byte".

I'm still a little queasy that, if I open an input file with element-type BIT, then I can get an element that is bigger than a bit from it. I realise, now, I won't if I do something like this:

(defun ts (f &amp;amp;key (v #*00101001010))
  (let ((i (make-array (length v))))
    (with-open-file (s f :direction ':output
                       :if-exists ':supersede
                       :element-type 'bit)
      (write-sequence v s))
    (with-open-file (s f :direction ':input
                       :element-type 'bit)
      (read-sequence i s))
    (values v i f)))

but if I open a file I did not create I might, and do on at least a couple of implementations.  I'd have expected an error in that case.

--tim

[1] By "byte" I mean whatever the right term for unit-of-file-construction is: an octet on Unix. I am not sure what the right term is for that, traditionally: record?

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Tim Bradshaw</dc:creator>
    <dc:date>2013-05-07T18:55:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12237">
    <title>Re: Mouse cursors</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12237</link>
    <description>&lt;pre&gt;
Thanks Martin for the reply! This is for the specialized diagram editor 
I'm working on. Comparing with other tools, I find that your LW is very 
good for this task.

David

07.05.2013 18:33, Martin Simmons пишет:


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>David Sorokin</dc:creator>
    <dc:date>2013-05-07T15:06:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12236">
    <title>Re: Mouse cursors</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12236</link>
    <description>&lt;pre&gt;

There is no predefined portable cursor for two-headed diagonal sizing, but I
can confirm that we map :top-right-corner and :bottom-left-corner to the
SIZENESW cursor on Windows (and likewise for SIZENESE).

&lt;/pre&gt;</description>
    <dc:creator>Martin Simmons</dc:creator>
    <dc:date>2013-05-07T14:33:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12235">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12235</link>
    <description>&lt;pre&gt;
Tim Bradshaw &amp;lt;tfb&amp;lt; at &amp;gt;cley.com&amp;gt; writes:


Well, the point is that it's implementation specific how binary elements
are stored into binary files (and therefore how they're read back).

What the standard says is that:

(let ((word (1+ (random 100)))                           ; no limit really
      (bits #(0 1 1 1 0 1)))
  (when (nth-value 1 (subtypep `(unsigned-byte ,word) `integer))
    (with-open-file (out "TEST.BIN" 
                         :element-type `(unsigned-byte ,word)
                         :direction :output
                         :if-does-not-exist :create
                         :if-exists :supersede)
      (write-sequence bits  out))
    (with-open-file (inp "TEST.BIN" 
                         :element-type `(unsigned-byte ,word)
                         :direction :input)
      (let ((v (make-array (file-length inp) :element-type `(unsigned-byte ,word))))
        (read-sequence v inp)
        (assert (= (file-length inp) (length bits))
                () "file length=~S expected=~S" (file-length inp) (length bits))
        (assert (equalp bits v)
                () "bits=~S read=~S" bits v)))))


For BITs, some implementation indeed write #(0 1 1 1 0 1) as (od -t x1):

0000000 00 01 01 01 00 01
0000006

while clisp packs bits (and bytes), but apart from when the byte size is
the same as the underlying file system byte size, this will require a
header specifying the file size (actually, just the number of bytes in
the last word):

0000000 06 00 00 00 2e
0000005





It's a concern for the implementation, if you use the BIT type.



Now, it is expected that (unsigned-byte 8) will map octet-by-octet the
contents of the file (on POSIX systems) to the octet vector.  You can
then do whatever bit decoding you want, in whatever bit order or bytesex
you want.  Of course, it wouldn't work to read 9-track magnetic tapes
on a 36-bit host.



&lt;/pre&gt;</description>
    <dc:creator>Pascal J. Bourguignon</dc:creator>
    <dc:date>2013-05-07T14:29:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lispworks.general/12234">
    <title>Re: Converting a file to a bit-vector?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lispworks.general/12234</link>
    <description>&lt;pre&gt;
On 6 May 2013, at 22:09, Zach Beane wrote:

It looks to me as if it probably does but it doesn't support reading BITs from files, which makes the point moot really (ie when I tried this I get an error from READ-SEQUENCE when it tries to store something bigger than a BIT into the first element of the array).

I am not sure what (open ... :element-type 'bit) is meant to do: for both the implementations I tried (LW and CCL) it seems to create a stream which reads 8-bit bytes, which strikes me as wrong (I'd want an error or a bit) but probably I am misreading the spec, since they both do this.

Related to this is the question of bit-order: if you *could* read bits from a file what order do you want the bits in a byte in?

--tim

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug&amp;lt; at &amp;gt;lispworks.com
http://www.lispworks.com/support/lisp-hug.html


&lt;/pre&gt;</description>
    <dc:creator>Tim Bradshaw</dc:creator>
    <dc:date>2013-05-07T11:46:37</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.lisp.lispworks.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.lispworks.general</link>
  </textinput>
</rdf:RDF>
