-
Notifications
You must be signed in to change notification settings - Fork 242
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
feature request: "dump" method in [text] #867
Comments
What exactly do you mean with "complete contents"? In which format would you except to get content? |
I guess all lines sequentially? |
What about seperators? And what's the use case? BTW, there's already |
Isn't that what [text tolist] does? It does it in a way so that the whole text buffer can be restored with [text fromlist]. If [text dump] is meant to output all lines sequentially, then there is already [text sequence]. I don't see what [text dump] could bring to the table that is new. |
Not really. |
The only thing that I can imagine is joining all lines to a single list, ignoring all seperators and without conversion. I'm not saying there aren't any use cases for this, but I'm not sure they are frequent enough to warrant a dedicated function... |
Ok, I understand now the third case. But then I feel even stronger that an implementation that intentionally loses much information warrants its own subclass. I consider it a quite specialized case. |
Hi,
basically it would be the same function as dump in cyclone/coll. Which is the contrary to [text tolist]: to get all lines in a text object with one click. I need this often to parse data from textfiles, and usually have to build a [until]-contraption (which either reads the number of lines before banging, or stops it with a right-inlet bang). But it seems to me that dumping all contents at once would be an important use-case to add another method - as it was in coll.
Joao
…On 29.03.22 17:35, Roman Haefeli ***@***.***> wrote:
Ok, I understand now the third case. But then I feel even stronger that
an implementation that intentionally loses much information warrants its
own subclass. I consider it a quite specialized case.
—
Reply to this email directly, view it on GitHub
<#867 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFW34Z4JLL7YT5CLATAU7LVCMPLBANCNFSM4KFG5RHQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The opposite of
The |
we could make that more explicit as a functionality in the documentation |
basically it would be the same function as dump in cyclone/coll.
The [dump( method for [cyclone/coll] outputs all lines *sequentially*. This
is the same as sending [line 0, bang( to [text sequence]. So what are you
missing exactly?
I was never missing anything, as I always managed to find a way to get the
output I wanted. Being what I could think a general use case, it might be
better to make it more available.
I don't use [text sequence], as that concept isn't that interesting to me.
But if something is there and now is clear, I can have a quick look to see
if it works.
|
You should really check the documentation of an object before making a feature request...
Yes please :-) I've already posted an example: #867 (comment) |
Trying to think of a new 'dump' message... maybe create a 'dump' message for [text sequence] that would be the same as "line 0, bang" but would also ignore waits (not stopping when reaching them). |
But that's what |
nope, if you have waits, it'll stop at them. |
But only if you use the I think you just read the documentation, which indeed says:
This is actually not quite correct. @porres to the rescue! |
yeah, the whole thing says "This is a zero length list. It output all lines starting from current one to next waiting point (but note there aren't any waits in this example so all lines are output)" and yeah, you need flags to specify waits. so, my idea of a dump message would be to ignore waits and output them all sequentially anyway |
there's a typo there, should be "outputs" |
Ah, I didn't look at the most recent Pd version :-) So this is already covered.
But we already have Maybe the |
In my idea, it would output everything EVEN if we have waits, cause it'll stop now if we have waits... Not that I have a use case for this, and this is also not what this original request needs |
??? If you don't want to use waits, you wouldn't write
|
But I have to say that a "dump" message to plain [text] ("text define") wouldn't be bad! |
I would agree that Anyway, we're now only talking about semantic sugar. There is nothing a "dump" method would offer in terms of functionality. It wouldn't even save a lot of keystrokes... |
I don't have a use case, but it would allow one to use both |
??? You can have both I think it's always a good idea to come up with a use case before proposing a feature ;-) |
With a dump method, it's possible to get the complete contents of a text, without building some specific circuit for it.
The text was updated successfully, but these errors were encountered: