New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand $0 to canvas id in messages #346

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@danomatika
Contributor

danomatika commented Apr 5, 2018

Back by popular demand....

[loadbang]
|
[ $0 <
|
[print]

-----------
print: 1003

Pulled from Pd-l2ork, so has been tested in the wild. This also includes a compatibility check to be safe, although the only issue would be for people "expecting" a 0 from $0 within a message which I doubt there are any. (Philosophical $ selector design issues aside...)

EDIT: I also updated the message help patch:

screen shot 2018-04-05 at 9 26 23 pm

@danomatika danomatika requested review from umlaeute and millerpuckette Apr 5, 2018

@danomatika danomatika added this to the 0.49 milestone Apr 5, 2018

@danomatika danomatika added the feature label Apr 5, 2018

@danomatika

This comment has been minimized.

Contributor

danomatika commented Apr 6, 2018

From Jonathan Wilkes on the pd-list:

That will add a malloc/free for every method call to a msg box. So I'd measure the performance impact before using that implementation.

On the l2ork dev list I mentioned a potential way to cache the glist in the t_messresponder to avoid allocation at message evaluation time. But we haven't implemented that yet (nor measured the current performance hit).

Anyone have any thoughts on performance of this implementation? Should we find an alternative approach?

@Spacechild1

This comment has been minimized.

Contributor

Spacechild1 commented Apr 6, 2018

here's an alternative implementation: #347

@danomatika

This comment has been minimized.

Contributor

danomatika commented Apr 6, 2018

Closing this for now in favor of #347.

@danomatika danomatika closed this Apr 6, 2018

@umlaeute

This comment has been minimized.

Contributor

umlaeute commented Jun 6, 2018

@danomatika should we delete this branch?

@danomatika

This comment has been minimized.

Contributor

danomatika commented Jun 6, 2018

@umlaeute umlaeute deleted the feature/msg-dollarzero branch Jun 6, 2018

@danomatika

This comment has been minimized.

Contributor

danomatika commented Jun 14, 2018

Here's the relevant commit from the Purr Data implementation: https://git.purrdata.net/jwilkes/purr-data/merge_requests/200

I wonder if there is some advantage over this approach to that of Purr Data?

@Spacechild1

This comment has been minimized.

Contributor

Spacechild1 commented Jun 14, 2018

personally, I'm not a big fan of Jonathan's solution (canvas_dollarzero taking a t_pd * argument and checking if it's messresponder_class), I rather took the chance to get rid of some global state in binbuf_realizedollarsym and binbuf_eval. Performance wise there shouldn't be any significant difference (I haven't measured, though!), so I think it's rather a matter of taste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment