unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Semyonov <cmstr@dsemy.com>
Cc: emacs-devel@gnu.org
Subject: Re: Copyright assignment and questions about package submission
Date: Sat, 26 Dec 2020 17:01:39 -0500	[thread overview]
Message-ID: <jwv8s9kme1y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87k0t7ci1n.fsf@dsemy.com> (Daniel Semyonov's message of "Thu, 24 Dec 2020 17:58:28 +0200")

>> Please fill the form below and send it to the FSF as instructed so they
>> can send you the relevant paperwork to sign.
> Thanks, I've sent the form.

BTW, I just looked at your package.

The code looks clean, but when I tried to enable it in my main Emacs
session it got stuck in `swsw-update`, apparently more specifically
inside `swsw--get-possible-ids` (see sample backtrace below obtained
with `debug-on-quit`).

It looks like your algorithm has a bad asymptotic complexity (my session
has currently 88 frames, most of them with a single window in it).


        Stefan



Debugger entered--Lisp error: (quit)
  (closure ((char-lists (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)) t) (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists)))((103 106 106 107 102 103))
  mapcan((closure ((char-lists (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)) t) (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) ((97 97 97 97 97 97) (115 97 97 97 97 97) (100 97 97 97 97 97) (102 97 97 97 97 97) (103 97 97 97 97 97) (104 97 97 97 97 97) (106 97 97 97 97 97) (107 97 97 97 97 97) (108 97 97 97 97 97) (97 115 97 97 97 97) (115 115 97 97 97 97) (100 115 97 97 97 97) (102 115 97 97 97 97) (103 115 97 97 97 97) (104 115 97 97 97 97) (106 115 97 97 97 97) (107 115 97 97 97 97) (108 115 97 97 97 97) (97 100 97 97 97 97) (115 100 97 97 97 97) (100 100 97 97 97 97) (102 100 97 97 97 97) (103 100 97 97 97 97) (104 100 97 97 97 97) (106 100 97 97 97 97) (107 100 97 97 97 97) (108 100 97 97 97 97) (97 102 97 97 97 97) (115 102 97 97 97 97) (100 102 97 97 97 97) (102 102 97 97 97 97) (103 102 97 97 97 97) (104 102 97 97 97 97) (106 102 97 97 97 97) (107 102 97 97 97 97) (108 102 97 97 97 97) (97 103 97 97 97 97) (115 103 97 97 97 97) (100 103 97 97 97 97) (102 103 97 97 97 97) (103 103 97 97 97 97) (104 103 97 97 97 97) (106 103 97 97 97 97) (107 103 97 97 97 97) (108 103 97 97 97 97) (97 104 97 97 97 97) (115 104 97 97 97 97) (100 104 97 97 97 97) (102 104 97 97 97 97) (103 104 97 97 97 97) ...))
  (if char-lists (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists))) (list nil))
  swsw--get-possible-ids((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108))
  apply(swsw--get-possible-ids ((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)))
  (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists)))
  (if char-lists (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists))) (list nil))
  swsw--get-possible-ids((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108))
  apply(swsw--get-possible-ids ((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)))
  (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists)))
  (if char-lists (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists))) (list nil))
  swsw--get-possible-ids((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108))
  apply(swsw--get-possible-ids ((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)))
  (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists)))
  (if char-lists (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists))) (list nil))
  swsw--get-possible-ids((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108))
  apply(swsw--get-possible-ids ((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)))
  (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists)))
  (if char-lists (mapcan #'(lambda (inner) (mapcar #'(lambda (outer) (cons outer inner)) (car char-lists))) (apply #'swsw--get-possible-ids (cdr char-lists))) (list nil))
  swsw--get-possible-ids((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108))
  apply(swsw--get-possible-ids ((97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108) (97 115 100 102 103 104 106 107 108)))
  (let ((acc 0) (len (swsw--get-id-length)) char-lists) (while (< acc len) (setq char-lists (cons swsw-id-chars char-lists)) (setq acc (1+ acc))) (apply #'swsw--get-possible-ids char-lists))
  (setq swsw-window-list nil swsw-ids (let ((acc 0) (len (swsw--get-id-length)) char-lists) (while (< acc len) (setq char-lists (cons swsw-id-chars char-lists)) (setq acc (1+ acc))) (apply #'swsw--get-possible-ids char-lists)))
  swsw-update()
  (progn (swsw-update) (if (eq swsw-display-function 'lighter) nil (funcall swsw-display-function t)) (add-hook 'window-configuration-change-hook #'swsw-update) (add-hook 'minibuffer-setup-hook #'swsw-update) (add-hook 'minibuffer-exit-hook #'swsw-update) (add-hook 'after-delete-frame-functions #'swsw-update))
  (if swsw-mode (progn (swsw-update) (if (eq swsw-display-function 'lighter) nil (funcall swsw-display-function t)) (add-hook 'window-configuration-change-hook #'swsw-update) (add-hook 'minibuffer-setup-hook #'swsw-update) (add-hook 'minibuffer-exit-hook #'swsw-update) (add-hook 'after-delete-frame-functions #'swsw-update)) (if (eq swsw-display-function 'lighter) nil (funcall swsw-display-function nil)) (remove-hook 'window-configuration-change-hook #'swsw-update) (remove-hook 'minibuffer-setup-hook #'swsw-update) (remove-hook 'minibuffer-exit-hook #'swsw-update) (remove-hook 'after-delete-frame-functions #'swsw-update))
  (let ((last-message (current-message))) (progn (set-default 'swsw-mode (cond ((eq arg 'toggle) (not (default-value 'swsw-mode))) ((and (numberp arg) (< arg 1)) nil) (t t)))) (if swsw-mode (progn (swsw-update) (if (eq swsw-display-function 'lighter) nil (funcall swsw-display-function t)) (add-hook 'window-configuration-change-hook #'swsw-update) (add-hook 'minibuffer-setup-hook #'swsw-update) (add-hook 'minibuffer-exit-hook #'swsw-update) (add-hook 'after-delete-frame-functions #'swsw-update)) (if (eq swsw-display-function 'lighter) nil (funcall swsw-display-function nil)) (remove-hook 'window-configuration-change-hook #'swsw-update) (remove-hook 'minibuffer-setup-hook #'swsw-update) (remove-hook 'minibuffer-exit-hook #'swsw-update) (remove-hook 'after-delete-frame-functions #'swsw-update)) (run-hooks 'swsw-mode-hook (if (default-value 'swsw-mode) 'swsw-mode-on-hook 'swsw-mode-off-hook)) (if (called-interactively-p 'any) (progn (customize-mark-as-set 'swsw-mode) (if (and (current-message) (not (equal last-message (current-message)))) nil (let ((local "")) (message "Swsw mode %sabled%s" (if (default-value ...) "en" "dis") local))))))
  swsw-mode(toggle)
  funcall-interactively(swsw-mode toggle)
  call-interactively(swsw-mode record nil)
  command-execute(swsw-mode record)
  execute-extended-command(nil "swsw-mode" nil)
  funcall-interactively(execute-extended-command nil "swsw-mode" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)




  reply	other threads:[~2020-12-26 22:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24 13:05 Copyright assignment and questions about package submission Daniel Semyonov
2020-12-24 14:28 ` Stefan Monnier
2020-12-24 15:58   ` Daniel Semyonov
2020-12-26 22:01     ` Stefan Monnier [this message]
2020-12-26 22:13       ` Stefan Monnier
2020-12-27  9:30         ` Daniel Semyonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8s9kme1y.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cmstr@dsemy.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).