» davids list
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

davids list

acl(admin devvvv vvvvgroup)

Patch-Format (XML)

There are several weird structures which are pretty bad to interpret with common XML Parsers. Since XML is a very flexible format for storing data it makes sense to use it, especially when we are planning to provide different interfaces for vvvv patches. These intefaces could/should be able to process the XML Tree easily. This is't provided right now. Here are my hints:

  • Actual data should be stored in elements, not in attributes. There is no rule about it. But i think it is smart to differ between enumerated information (e.g.slicecount and visible) and flexible information (e.g. value of slices).
  • therefore the element PIN should have childelemts SLICE for every sclice. Right now we have an attribute value, which contains all values of all slices as a comma separated string. Especially for storing strings containing a comma again this is no good. you can never teach a common xml parser to split that string into the right slices.
  • element BOUNDS is a self closing element so it should close itself
  • element LINK is the same.

here is what i think:

{CODE(ln=>1)} <PATCH nodename="something.v4p">

    <NODE id="2" nodename="IoBox (String)">
      <BOUNDS height="" left="" top="" type="" width="" />
      <LINK dstnodeid="" dstpinname="" hiddenwhenlocked="" srcnodeid="" srcpinname="" />
      <PIN pinname="" slicecount="">
        <SLICE>content of slice 0</SLICE>
        <SLICE>content of slice 1</SLICE>
        <SLICE>content of slice 2</SLICE>
      </PIN>
   </NODE>
 </PATCH>^

for conversion with old releases there would be a need of a converter. which should not be a problem because that would be just the processing of the xml as it is right now into the new format.

Saving binary data within a patch

Saving a patch wich includes a binary byte string (e.g in a IOBox) causes vvvv to reject the patch when trying to reopen it. This is no good. The problem: XML is not made for storing binary data. There is a common workaround though: encode the strings as a base64 byte stream. when open a patch recover that stream to its original byte stream.

See:http://www.flipcode.com/cgi-bin/fcarticles.cgi?show=64114http://www.xml.com/pub/a/98/07/binary/binary.html


i´d suggest different encodings -- as base64 might be cool for embedding jpgs, for normal text strings it would be great if they are somehow readable in the xml source file
but aren´t cdata sections for storing 8bit data?

  • oschatz

That was my thought too. But how to differ between different string types? Example: We have two IOBoxes: one with the string "hello world" the other with a binary data (e.g. a jpeg file). how should vvvv know which encoding it has to use? same problem with loading a patch!

either just check it or encode just the characters which are not valid within xml (should be 98% of all 8bit chars anyway) -oschatz

anonymous user login

Shoutbox

~2d ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/

~2d ago

joreg: 6 session beginner course part 1 "Playground" starts November 4th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~2d ago

joreg: Save the date: Oktober 17: vvvv meetup in Berlin!

~4d ago

joreg: 12 session online vvvv beginner course postponed to start November 4th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-class/

~15d ago

~24d ago

joreg: Webinar on October 2nd: Rhino meets Realtime with vvvv https://visualprogramming.net/blog/2024/webinar-rhino-meets-realtime-with-vvvv/

~29d ago

joreg: Introducing: Support for latest Ultraleap hand-tracking devices: https://visualprogramming.net/blog/2024/introducing-support-for-new-ultraleap-devices/

~1mth ago

joreg: 2 day vvvv/fuse workshop in Vienna as part of NOISE festival on Sept. 13 and 14: https://www.noise.ist/vienna

~1mth ago

joreg: New beginner video tutorial: World Cities https://youtu.be/ymzrK7tZLBI

~1mth ago

catweasel: https://colour-burst.com/2023/01/26/macroscopic/ yeah, ' is there anyone who cares about slides anymore...' Well me for a start! :D