GithubHelp home page GithubHelp logo

Comments (5)

Turbo87 avatar Turbo87 commented on August 22, 2024 1

from my understanding serde is meant more for (de)serialization of generic data (strings, numbers, lists, maps, etc.), but in this case the file has a fixed format, that does not seem to fit very well with using something like serde.

I also tried several of the more fancy parsing libraries but in the end using regex seemed easiest. I noticed though that igc-rs is just using plain string processing, which is probably also good enough.

The other main difference currently is that rust-igc is based on byte arrays, while igc-rs operates on strings. Technically IGC files have to be ASCII, but nobody really cares apparently and there are plenty of files around that have non-ASCII characters. Most seem to be UTF8, but there are definitely also some that use Latin1 instead.

from ogn-web-gateway.

estk avatar estk commented on August 22, 2024

I'm looking into this, as you suggested re our email conversation :)

from ogn-web-gateway.

estk avatar estk commented on August 22, 2024

Ok, after a bit of consideration, I feel like a good place to start will be to extend https://github.com/Turbo87/rust-igc to also serialize IGC, then depend on that to create the file. How does that approach sound?

from ogn-web-gateway.

Turbo87 avatar Turbo87 commented on August 22, 2024

well, now that you've found the other IGC parser... :D

due to the low-level nature of igc-rs it might be quite a bit easier to use that to write IGC files. I've opened Joey9801/igc-rs#6 to discuss the possibility of adding writing capabilities to that crate.

from ogn-web-gateway.

estk avatar estk commented on August 22, 2024

Yeah sounds good, additionally I was wondering why in rust-igc you didn't use serde to do the seralization/deserialization?

from ogn-web-gateway.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.