Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. Why shouldn't you use YAML to store eye tracking data? /s

Why shouldn't you use YAML to store eye tracking data? /s

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
57 Posts 32 Posters 15 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q [email protected]
    This post did not contain any content.
    S This user is from outside of this forum
    S This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #13

    Also let's represent all numbers in scientific notation, I'm sure that's going to make it easier to read...

    1 Reply Last reply
    4
    • Q [email protected]
      This post did not contain any content.
      D This user is from outside of this forum
      D This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #14

      This is nasty to look at

      1 Reply Last reply
      3
      • Q [email protected]
        This post did not contain any content.
        R This user is from outside of this forum
        R This user is from outside of this forum
        [email protected]
        wrote on last edited by [email protected]
        #15

        Why you shouldn't use YAML

        D B 2 Replies Last reply
        8
        • R [email protected]

          Why you shouldn't use YAML

          D This user is from outside of this forum
          D This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #16

          The best approach would be to never use yaml for anything

          1 Reply Last reply
          14
          • N [email protected]

            I think SQLite is a great middle ground. It saves the database as a single .db file, and can do everything an SQL database can do. Querying for data is a lot more flexible and a lot faster. The tools for manipulating the data in any way you want are very good and very robust.

            However, I'm not sure how it would affect file size. It might be smaller because JSON/YAML wastes a lot of characters on redundant information (field names) and storing numbers as text, which the database would store as binary data in a defined structure. On the other hand, extra space is used to make common SQL operations happen much faster using fancy data structures. I don't know which effect is greater so file size could be bigger or smaller.

            S This user is from outside of this forum
            S This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #17

            I didn't look to much at the data but I think csv might actually be an appropriate format for this?

            Nice simple plaintext and very easy to parse into a datastructure for analysing/using it in python or similar

            N 1 Reply Last reply
            2
            • Q [email protected]
              This post did not contain any content.
              W This user is from outside of this forum
              W This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #18

              I’d probably just use line delimited JSON or CSV for this use case. It plays nicely with cat and other standard tools and basically all the yaml is doing is wrapping raw json and adding extra parse time/complexity.

              In the end consider converting this to parquet for analysis, you probably won’t get much from compression or row-group clustering, but you will get benefits from the column store format when reading the data.

              Q 1 Reply Last reply
              3
              • Q [email protected]
                This post did not contain any content.
                F This user is from outside of this forum
                F This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #19

                I'm amazed at developers who don't grasp that you don't need to have absolutely everything under the sun in a human readable file format. This is such a textbook case...

                M D C fuckbigtech347@lemmygrad.mlF 4 Replies Last reply
                21
                • W [email protected]

                  I’d probably just use line delimited JSON or CSV for this use case. It plays nicely with cat and other standard tools and basically all the yaml is doing is wrapping raw json and adding extra parse time/complexity.

                  In the end consider converting this to parquet for analysis, you probably won’t get much from compression or row-group clustering, but you will get benefits from the column store format when reading the data.

                  Q This user is from outside of this forum
                  Q This user is from outside of this forum
                  [email protected]
                  wrote on last edited by [email protected]
                  #20

                  Thanks for the advice, but this is just the format of some eyetracking software I had to use not something I develop myself

                  W 1 Reply Last reply
                  2
                  • Q [email protected]
                    This post did not contain any content.
                    deegeese@sopuli.xyzD This user is from outside of this forum
                    deegeese@sopuli.xyzD This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #21

                    If you’re using a library to handle deserialization , the ugliness of the serial format doesn’t matter that much.

                    Just call yaml.load() and forget about it.

                    B 1 Reply Last reply
                    20
                    • nathan@piefed.alphapuggle.devN [email protected]

                      This isn't YAML, this is just sparkling JSON

                      Z This user is from outside of this forum
                      Z This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #22

                      All yaml is just sparkling JSON.

                      O D 2 Replies Last reply
                      20
                      • Q [email protected]

                        Thanks for the advice, but this is just the format of some eyetracking software I had to use not something I develop myself

                        W This user is from outside of this forum
                        W This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #23

                        Ah, well, such is software dependencies.

                        1 Reply Last reply
                        0
                        • Z [email protected]

                          All yaml is just sparkling JSON.

                          O This user is from outside of this forum
                          O This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #24

                          Always has been

                          1 Reply Last reply
                          4
                          • F [email protected]

                            I'm amazed at developers who don't grasp that you don't need to have absolutely everything under the sun in a human readable file format. This is such a textbook case...

                            M This user is from outside of this forum
                            M This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #25

                            Even if you want it to be human readable, you don't need to include the name into every field and use balanced separators.

                            Any CSV variant would be an improvement already.

                            F 1 Reply Last reply
                            8
                            • F [email protected]

                              I'm amazed at developers who don't grasp that you don't need to have absolutely everything under the sun in a human readable file format. This is such a textbook case...

                              D This user is from outside of this forum
                              D This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #26

                              That's it everyone, back to copybooks.

                              1 Reply Last reply
                              2
                              • N [email protected]

                                I think SQLite is a great middle ground. It saves the database as a single .db file, and can do everything an SQL database can do. Querying for data is a lot more flexible and a lot faster. The tools for manipulating the data in any way you want are very good and very robust.

                                However, I'm not sure how it would affect file size. It might be smaller because JSON/YAML wastes a lot of characters on redundant information (field names) and storing numbers as text, which the database would store as binary data in a defined structure. On the other hand, extra space is used to make common SQL operations happen much faster using fancy data structures. I don't know which effect is greater so file size could be bigger or smaller.

                                G This user is from outside of this forum
                                G This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #27

                                SQLite would definitely be smaller, faster, and require less memory.

                                Thing is, it's 2025, roughly 20 years since anybody's given half a shit about storage efficiency, memory efficiency, or even CPU efficiency for anything so small. Presumably this is not something they need to query dynamically.

                                N 1 Reply Last reply
                                3
                                • R [email protected]

                                  Why you shouldn't use YAML

                                  B This user is from outside of this forum
                                  B This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #28

                                  YAML doesn't require any level of accuracy for floating point numbers, and that doc appears to have numbers large enough to run into problems for single-precision floats (maybe double too). That means different parsers could give you different results.

                                  1 Reply Last reply
                                  4
                                  • deegeese@sopuli.xyzD [email protected]

                                    If you’re using a library to handle deserialization , the ugliness of the serial format doesn’t matter that much.

                                    Just call yaml.load() and forget about it.

                                    B This user is from outside of this forum
                                    B This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #29

                                    That works until you realize your calculations are all wrong due to floating point inaccuracies. YAML doesn't require any level of precision for floats, so different parsers on a document may give you different results.

                                    deegeese@sopuli.xyzD 1 Reply Last reply
                                    3
                                    • B [email protected]

                                      That works until you realize your calculations are all wrong due to floating point inaccuracies. YAML doesn't require any level of precision for floats, so different parsers on a document may give you different results.

                                      deegeese@sopuli.xyzD This user is from outside of this forum
                                      deegeese@sopuli.xyzD This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #30

                                      What text based serialization formats do enforce numeric precision?

                                      AFAIK it’s always left up to the writer (serializer)

                                      B S 2 Replies Last reply
                                      9
                                      • G [email protected]

                                        SQLite would definitely be smaller, faster, and require less memory.

                                        Thing is, it's 2025, roughly 20 years since anybody's given half a shit about storage efficiency, memory efficiency, or even CPU efficiency for anything so small. Presumably this is not something they need to query dynamically.

                                        N This user is from outside of this forum
                                        N This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #31

                                        True (in most contexts, probably including this one), but I think that only makes the case for SQLite stronger. What people do still care about is a good flexible, usable and reliable interface. I'm not sure how to get that with YAML.

                                        N 1 Reply Last reply
                                        2
                                        • deegeese@sopuli.xyzD [email protected]

                                          What text based serialization formats do enforce numeric precision?

                                          AFAIK it’s always left up to the writer (serializer)

                                          B This user is from outside of this forum
                                          B This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by [email protected]
                                          #32

                                          Cuelang: https://cuelang.org/docs/reference/spec/#numeric-values

                                          Implementation restriction: although numeric values have arbitrary precision in the language, implementations may implement them using an internal representation with limited precision. That said, every implementation must:

                                          • Represent integer values with at least 256 bits.
                                          • Represent floating-point values with a mantissa of at least 256 bits and a signed binary exponent of at least 16 bits.
                                          • Give an error if unable to represent an integer value precisely.
                                          • Give an error if unable to represent a floating-point value due to overflow.
                                          • Round to the nearest representable value if unable to represent a floating-point value due to limits on precision. These requirements apply to the result of any expression except for builtin functions, for which an unusual loss of precision must be explicitly documented.
                                          deegeese@sopuli.xyzD 1 Reply Last reply
                                          3
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups