AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

decimal - binary - string round tripping

Open
#1,174 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

## Feature Request

Use our own decimal/binary and binary/decimal conversion routines for representing time values in strings, instead of relying on each language's standard library, in order to guarantee round trip lossless conversions

## Description

it should be the case that any number of iterations of binary_num -> decimal string -> binary_num should result in identical values forever.
It occurred to me that if we adopted an algorithm like dragonbox, we could guarantee round tripping, irrespective of what a language's standard runtime is doing.
https://github.com/abolz/Drachennest

I'm suggesting dragonbox specifically because not only is it the fastest on the benchmark, it makes explicit round-trip guarantees.
https://github.com/jk-jeon/dragonbox

## Context

This issue comes up whenever we revisit the formatting strings we use in conversion, our options are usually severely constrained on formatting that works losslessly across conversion in Python and C++.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the existing C++ and Python time-value string conversion paths, then review the Dragonbox and Drachennest references; done means repeated binary-to-decimal-string-to-binary conversions preserve identical values.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.