[haiku-development] Re: Solarized Terminal color scheme

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 2 Sep 2015 15:45:07 +0200


Not by much. Do you know, without thinking, that FFFFFFF is opaque white?
Can you tell what color are 5453245, 4543262?

As you see, the text-based format does not make this more confortable to
edit, in the case of colors. It is more readable/modifiable than a binary
blob, but why would you need to modify it directly?


Because problems happens, and having things in text make the plan B option
viable.


For sending them over the network there is little point in using XML. You
can use BArchivable and put them into a BDataIO in binary format, which
will be more efficient.


Except you meant BFlattenable, a BArchivable still use BMessage to do that.


And for debugging, you can write an appropriate tool (there is "message"
to dump BMessages archived to a file, probably it can be used with netcat,
or we could make a wireshark plugin, etc).

XML is supposed to be readable easily both by humans and computers, and it
failed. It is complex to parse, both for humans and for computers, when
compared to other formats, either binary (protobuf, ASN.1, ...) or
text-based (JSON, ...).


Then if not XML i'm still for a standard text format.


There is not yet a standard DTD for converting BMessages into XML. We
could decide on base64, check if the data can be represented as utf-8 and
use that, use CDATA, use uuencode, or some more compact encoding.


I meant that base64 is already used with this purpose, we shouldn't have to
add anything.


* On the other hand, parsing "any" XML file and representing it in some
useful and easy to handle format. XmlNode does this, for example, but it is
probably simpler to use the existing and industry-standard ways: SAX and
DOM. And to use these, we can rely on libxml or a similar existing library.
Is there really a need for a BeAPI-ish wrapper on these?


Well, then why provide new classes in our kits? We could have used std or
libboost...

I think it's not. You can't see the colors in the XML, just numbers. So who
will really want to edit the file manually?


I personally found that any binary blob format is hard to manage when you
need to fix it or make it cooperate with other operating systems. Nowadays
almost any serious DAW is using XML for it's project settings. Not because
they are meant to be edited manually, but it's still more manageable than a
binary blob in pretty much every situation. Outside Haiku any flattened
BMessage will be harder to deal.

It's easier to use Terminal settings window or another color picker to
build your color palette, than manually enter hex-digits in a text file.


Why not both? Using a text based format doesn't exclude this.


I think it is one of the worst examples you could have chosen, sorry :)


Well, so it seems there are hundreds of apps outside there that are flawed
:-), but i don't care much right now if the majority think we don't need an
xml_kit that's OK.

Other related posts: