all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eric Ludlam <ericludlam@gmail.com>
Cc: "Eric M. Ludlam" <zappo@gnu.org>, emacs-devel@gnu.org
Subject: Re: eieio-debug-methodinvoke
Date: Thu, 22 Jan 2015 11:56:58 -0500	[thread overview]
Message-ID: <jwv1tmmc42m.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <54C06B06.4010101@gmail.com> (Eric Ludlam's message of "Wed, 21 Jan 2015 22:14:14 -0500")

> I did a git pull tonight to check it out. I'm looking forward to trying out
> multiple-dispatch and native type dispatch method handling.  I spent a lot
> of time optimizing the eieio version. Hopefully some of those same high
> level tricks remain.  (Comments indicate so.)

I haven't made a thorough comparison, but it seems that the new
dispatch code is significantly faster.  Here's the little test I used:

   (defclass sm-class0 () ())
   (defclass sm-class1 () ())
   
   (defmethod sm-fib ((x sm-class0)) 0)
   (defmethod sm-fib ((x sm-class1)) 1)
   (defmethod sm-fib (x)
     (cond ((eq x 0) (sm-fib (sm-class0 "toto")))
           ((eq x 1) (sm-fib (sm-class1 "toto")))
           (t (+ (sm-fib (- x 1)) (sm-fib (- x 2))))))

I byte-compiled it with emacs-24, and then ran the .elc with both
emacs-24 and master: for (sm-fib 23), the emacs-24 code took about twice
as much time to complete.

> In the meantime, my CEDET can't seem to load old .ede files. :( I'll assume
> I need to recompile or something for now.

It "should" work without recompiling anything.  So please, before
recompiling, try to keep the problem around to see if we can fix it.

> That function was useful when I was trying to get the method invocation
> order to be correct, and I needed a way to debug it.  Since those old
> structures are gone, this function won't be needed by me anymore.

Ah, that makes sense.

> Press SPC on any line that indicates there might be more to it, such
> as a #<list o stuff> or #<overlay >  or some # object (usually colored) to
> open it up.  If there are lists upon lists, you can keep drilling in, even
> recursive structures are opened.

Aha!

> Example:
> If you have (semantic-mode 1) enabled, you could do:
> M-x data-debug-eval-expression RET (semantic-fetch-tags) RET
> in some Emacs Lisp buffer.  You can navigate around the data structure
> browsing the tags using SPC to open/close, or n/p to move up/down or N/P to
> move up/down while also opening what's under point.

Ah, nice, indeed (tho I wouldn't put a quote in front of symbols since
that confuses the difference between the value and an expression which
returns this value).

> I have that fcn bound to M-: by default, and hooked into edebug via
> an A binding so I can eval large data values.  I've become quite dependent
> on it.

Its interactive spec should probably use read--expression (which clearly
needs to be renamed to something without "--") so as to get completion.


        Stefan



  reply	other threads:[~2015-01-22 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 18:48 eieio-debug-methodinvoke Stefan Monnier
2015-01-22  3:14 ` eieio-debug-methodinvoke Eric Ludlam
2015-01-22 16:56   ` Stefan Monnier [this message]
2015-01-22 19:51     ` eieio-debug-methodinvoke Stefan Monnier

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

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

  git send-email \
    --in-reply-to=jwv1tmmc42m.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=ericludlam@gmail.com \
    --cc=zappo@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.