Java dict access


    Apr 17 2017 | 8:51 am
    hi, do you know how to access a dict from Java. Is there a special dict api like in C? Or do i have to use scripting?
    thanks,
    O.

    • Apr 17 2017 | 3:45 pm
      ... unfortunately they are not accessible by Java and AFAIK there are plans to do further development on Java, besides maintenance....
    • Apr 18 2017 | 8:53 am
      I guess it's the same with coll. But how do we read a big data collection in Max with Java, without writing a file to disk?
    • Apr 18 2017 | 8:53 am
      Hi 11Olsen, yes that's definitely possible. you can send is as a serialized string and "unpack" it with [dict deserialize] and feed it back into a Max dict. Same way for receiving dicts. I have done that as a workaround... not very elegant though.
    • Apr 18 2017 | 9:03 am
      For big data collection hmmm, don't have a good idea. Any chance to move your code to Javascript? That actively developed at least...
    • Apr 18 2017 | 9:55 am
      I don't think that is gonna work. Or at least that's above my skills. But thats a possibillity i never thought of. Theoretically, could one find javascript replacements for all data types of JAVA?
      The JAVA code does FFT Analyzes and heavily uses inheritance and all that oo language stuff. How does that translate to js?
    • Apr 18 2017 | 10:07 am
      Some of the limitations of JS are that you can't do signal work inside JavaScript and there is not all the low access to the system. Also it is single threaded in Max (to a certain degree you can bypass that with the Task object). So it may not be an option for you. I was just thinking, maybe it would be possible to use a SQlite database to store and communicate your datas between Max and Java. Max ships with a SQLite instance....
    • Apr 18 2017 | 10:14 am
      yes that might work if the JAVA SQLite interface can read an "in-memory" database created with Max. Otherwise it's like writing an external file again. Thanks for your thougts, Jan.
      O.
    • Apr 18 2017 | 10:20 am
      If you give it try I would be interested in the results. Sound like something thay may come in handy to me very soon.....
      J
    • Apr 18 2017 | 2:28 pm
      It will not work for me as the condition for seperate db connections using the same in-memory db is, they operate in the same thread.
    • Apr 19 2017 | 8:48 am
      As we can access a Msp buffer in Java can't we code serialized dict into it in an atoi-like way?