Can't name a `fluid.dataset~` with just a number?

So was updating @weefuzzy’s handy abstraction from this thread to merge some datasets for some recent tests I’ve been doing and I realized that I couldn’t just name fluid.dataset~ with a number. That is, something like [fluid.dataset~ 1000].

It throws up a yellow error:

fluid.dataset~: Shared object given no name – won’t be shared!

From the reference file it looks like that it takes no other arguments other than the name, so not sure what it’s parsing the number as.

The intention here is to create unique datasets using #0 without then needing to cleave off bits of text using regexp later (e.g. #0_whatever).

Is there a reason why a fluid.datset~ can’t just take a number as a name?

You can, but you need to put quotes around the #0 (i.e. [fluid.dataset~ "#0"] when you make the box to tell Max it’s a symbol, not an int. After that it should work, although it’s quite possible there would be other places where you have to be explicit with Max that what you’re passing is a symbol not a number.

Fair enough. I’ll take fromsymbol over having to remember what the string/message for regexp any day though!

Ok, the “#0” thing doesn’t work. It resolves to #0 once the object is instantiated and stays as a non-symbol when the patch is saved.

I see what you mean. I’m afraid you’ll need a suffix then (although I don’t follow why you then need to regex it later).

I note that it’s not possible to give either buffer~ or jit.matrix numeric names either.

I see what you mean with buffer~ and jit.matrix. coll is quite verbose with it’s response (“First Argument Must Be a Symbol”) which is helpful. Maybe a more responsive complaint would be good from fluid.dataset~?

Ok, can just do #0 along with combine to spoof one of those jitter-esque names:
Screenshot 2022-03-04 at 1.53.01 pm

I’ve not sorted my hierarchy/structure yet, but at the moment the patch passes along the “unique identifier” part of the name elsewhere so I can reference the contained #0’d datasets, so I regexp off the #0 part and carry on from there. May not be necessary once I sort things.

For now it takes an arbitrary list of datasets and spits out a unique “u103351”-looking dataset as a name.