Веб Зображення Новини Групи Блоги Перекладач Gmail Ще »
Групи, які ви переглядали нещодавно | Довідка | Увійти
Головна сторінка Груп Google
Mistake in the specification of rotatef ?
Занадто багато тем, що мають бути показані першими. Для того, щоб показати тему першою, зніміть цю опцію з іншої теми.
Під час обробки вашого запиту сталася помилка. Будь ласка, повторіть вашу спробу пізніше.
флаг
  7 повідомлення - Згорнути всі  -  Перекласти все вказаною мовою: Перекладено (переглянути всі оригінали)
Група, до якої ви додаєте допис, - група Usenet. Відтак, будь-хто в Інтернеті бачитиме вашу електронну адресу.
Вашу відповідь не було надіслано.
Ваш допис надіслано
 
Від:
Кому:
Копія:
Продолжить:
Додати копію: | Додати продовження: | Редагувати тему
Тема:
Підтвердження:
З метою підтвердження введіть символи, наведені на зображенні нижче, або числа, які чуєте, натиснувши значок доступу. Прослухайте і введіть цифри, що чуєте
 
Spiros Bousbouras  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 04:17
Групи новин: comp.lang.lisp
Від: Spiros Bousbouras <spi...@gmail.com>
Дата: Wed, 4 Nov 2009 18:17:12 -0800 (PST)
Місцевий час: Чт 5 Лис 2009 04:17
Тема: Mistake in the specification of rotatef ?
In http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm
we read: "In the form (rotatef place1 place2 ... placen), the values
in place1 through placen are read and written". Does it mean "saved"
instead of "written" ?

And while I'm at it, is there an errata list for the HS somewhere ?


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Vassil Nikolov  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 04:39
Групи новин: comp.lang.lisp
Від: Vassil Nikolov <vniko...@pobox.com>
Дата: Wed, 04 Nov 2009 21:39:02 -0500
Місцевий час: Чт 5 Лис 2009 04:39
Тема: Re: Mistake in the specification of rotatef ?

On Wed, 4 Nov 2009 18:17:12 -0800 (PST), Spiros Bousbouras <spi...@gmail.com> said:

> In http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm
> we read: "In the form (rotatef place1 place2 ... placen), the values
> in place1 through placen are read and written". Does it mean "saved"
> instead of "written" ?

  No; here "write" is used in a sense similar to the first meaning of
  "write" given in the Glossary.

> And while I'm at it, is there an errata list for the HS somewhere ?

  I am only aware of one distributed over Usenet (and the Web)...

  ---Vassil.

--
"Even when the muse is posting on Usenet, Alexander Sergeevich?"


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Vassil Nikolov  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 05:30
Групи новин: comp.lang.lisp
Від: Vassil Nikolov <vniko...@pobox.com>
Дата: Wed, 04 Nov 2009 22:30:08 -0500
Місцевий час: Чт 5 Лис 2009 05:30
Тема: Re: Mistake in the specification of rotatef ?

On Wed, 04 Nov 2009 21:39:02 -0500, Vassil Nikolov <vniko...@pobox.com> said:

> On Wed, 4 Nov 2009 18:17:12 -0800 (PST), Spiros Bousbouras <spi...@gmail.com> said:
>> In http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm
>> we read: "In the form (rotatef place1 place2 ... placen), the values
>> in place1 through placen are read and written". Does it mean "saved"
>> instead of "written" ?
>   No; here "write" is used in a sense similar to the first meaning of
>   "write" given in the Glossary.

  Or maybe I misunderstood the question (wasn't it at least a little
  ambiguous, though?).  Perhaps a better answer would be that the fact
  that the values read are _saved_, if that means "assigned to
  temporary variables inside ROTATEF", is an internal implementation
  detail, while the fact that the values of the places are read, and
  then values (which form a permutation of the values read) are
  _written_ into those places, is part of ROTATEF's specification.

  ---Vassil.

--
"Even when the muse is posting on Usenet, Alexander Sergeevich?"


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Kaz Kylheku  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 06:41
Групи новин: comp.lang.lisp
Від: Kaz Kylheku <kkylh...@gmail.com>
Дата: Thu, 5 Nov 2009 04:41:02 +0000 (UTC)
Місцевий час: Чт 5 Лис 2009 06:41
Тема: Re: Mistake in the specification of rotatef ?
On 2009-11-05, Spiros Bousbouras <spi...@gmail.com> wrote:

> In http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm
> we read: "In the form (rotatef place1 place2 ... placen), the values
> in place1 through placen are read and written". Does it mean "saved"
> instead of "written" ?

The text makes no sense.  Taken as is, it implies that the values are
stored twice. It looks like the result of careless edit; as if
originally, the text had said that all of the values are read and written, and
then went on to explain what exactly happens.

You can fix it simply by deleting the word "then"; it is the "then" separating
the "written" and "stored" which makes it look like they are distinct,
sequenced events, rather than independent remarks on the same situation.

Also, notably abesent is a ``Side Effects:'' paragraph, but this inconsistency
is repeated elsewhere in the document, like SETF/PSETF.

For instance for the PUSH macro we have:

``Side Effects:

  The contents of place are modified.''


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Vassil Nikolov  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 07:25
Групи новин: comp.lang.lisp
Від: Vassil Nikolov <vniko...@pobox.com>
Дата: Thu, 05 Nov 2009 00:25:50 -0500
Місцевий час: Чт 5 Лис 2009 07:25
Тема: Re: Mistake in the specification of rotatef ?

On Thu, 5 Nov 2009 04:41:02 +0000 (UTC), Kaz Kylheku <kkylh...@gmail.com> said:

> On 2009-11-05, Spiros Bousbouras <spi...@gmail.com> wrote:
>> In http://www.lispworks.com/documentation/HyperSpec/Body/m_rotate.htm
>> we read: "In the form (rotatef place1 place2 ... placen), the values
>> in place1 through placen are read and written". Does it mean "saved"
>> instead of "written" ?
> The text makes no sense.  Taken as is, it implies that the values are
> stored twice. It looks like the result of careless edit; as if
> originally, the text had said that all of the values are read and written, and
> then went on to explain what exactly happens.
> You can fix it simply by deleting the word "then"; it is the "then" separating
> the "written" and "stored" which makes it look like they are distinct,
> sequenced events, rather than independent remarks on the same situation.

  It seems I was more wrong than I thought earlier in my preceding
  responses---quite wrong, in fact, and it indeed is proper that it
  should be "saved" there (have I been just not noticing that
  "then"...).  In other words, it is specified that _all_ values are
  obtained _before_ _any_ place is changed, which would matter in case
  the value of one of the places depends on the value of another.
  That is independent of any side effects which might occur while
  accessing a place.

  In other words, assuming that no side effects are taking place while
  accessing P1 or P2, and assuming that fresh symbols are used as
  needed,

    (rotatef p1 p2)

  must _not_ be executed as if it expanded into

    ;; (i)
    (let (t1)
      (setf t1 p1)
      (setf p1 p2)
      (setf p2 t1))

  but it must be executed as if it expands into

    ;; (ii)
    (let (t1 t2)
      (setf t1 p1)
      (setf t2 p2)
      (setf p1 t2)
      (setf p2 t1))

  Now I can even actually recognize this as being related to the
  notorious inability of Algol's call-by-name to support a universal
  swapping operation, with the essence of the counterexample being

    (rotatef n (aref a n))

  ---note how there are no side effects when accessing either N or
  (AREF A N) and how (i)'s way from above would lead to

    (let (t1)
      (setf t1 n)
      (setf n (aref a n))
      (setf (aref a n) t1))

  doing the wrong thing.

  ---Vassil.

--
"Even when the muse is posting on Usenet, Alexander Sergeevich?"


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Vassil Nikolov  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 07:46
Групи новин: comp.lang.lisp
Від: Vassil Nikolov <vniko...@pobox.com>
Дата: Thu, 05 Nov 2009 00:46:57 -0500
Місцевий час: Чт 5 Лис 2009 07:46
Тема: Re: Mistake in the specification of rotatef ?

On Thu, 05 Nov 2009 00:25:50 -0500, Vassil Nikolov <vniko...@pobox.com> said:

> ...
>   but [(ROTATEF P1 P2)] must be executed as if it expands into
>     ;; (ii)
>     (let (t1 t2)
>       (setf t1 p1)
>       (setf t2 p2)
>       (setf p1 t2)
>       (setf p2 t1))

  ...with the mechanics of setf expanders _having been applied_, so
  that there is a "safe fix" on the storage locations for P1 and P2
  before any updates are made.  That proviso is significant because
  without it

    (let (t1 t2)
      (setf t1 n)
      (setf t2 (aref a n))
      (setf n t2)
      (setf (aref a n) t1))

  loses, too.  (Algol's problem was that it did not have a mechanism
  equivalent to Common Lisp's setf expanders.)

  I hope it takes me no more than a finite number of posts to catch
  all my mistakes in this thread...

  ---Vassil.

--
"Even when the muse is posting on Usenet, Alexander Sergeevich?"


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Scott Burson  
Переглянути профіль   Перекласти вказаною мовою: Перекладено (переглянути оригінал)
 Більше налаштувань 5 Лис, 17:43
Групи новин: comp.lang.lisp
Від: Scott Burson <fset....@gmail.com>
Дата: Thu, 5 Nov 2009 07:43:09 -0800 (PST)
Місцевий час: Чт 5 Лис 2009 17:43
Тема: Re: Mistake in the specification of rotatef ?
On Nov 4, 6:17 pm, Spiros Bousbouras <spi...@gmail.com> wrote:

> And while I'm at it, is there an errata list for the HS somewhere ?

An informal errata list is maintained at

  http://www.cliki.net/Proposed%20ANSI%20Revisions%20and%20Clarifications

-- Scott


Ви мусите увійти перед публікацією повідомлень.
Аби надіслати допис, будь ласка, спочатку приєднайтеся до цієї групи.
Будь ласка, поновіть своє прізвисько на сторінці налаштування передплати перед тим, як надіслати свій допис.
У вас немає права надсилання дописів до цієї групи.
Кінець повідомлень
« Повернутися до обговорень « Новіша тема     Старіша тема »

Створити групу - Групи Google - Домашня сторінка Google - Правила користування послугою - Заява про конфіденційність і нерозголошення інформації
©2009 Google