Code Monkey home page Code Monkey logo

si_units's People

Contributors

fabien-chouteau avatar jellix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

si_units's Issues

Prettier output of (large) duration values

Currently we treat a duration the same way as any other unit. While this is fine for duration values less than 1000 seconds or so, it easily becomes unusual, or even unreadable once we start prefixing seconds to express kilo seconds or even Mega seconds (i.e. 1 hour would be expressed as 3.6 ks, one day is 86.4 ks, and one year is about 31.5 Ms). Though technically correct this is not how humans usually express such values.

Special handling needed for Aft => 0

If you specify Aft => 0 in the Image subprograms, it prints "0.6 " instead of the expected "600 m", because even with Aft = 0, there is at least one digit after the decimal point.

UTF-8 support for returned strings

  • Problem
    Right now, SI_Units uses strings encoded in iso-8859-1 (i.e. Ada.Characters.Latin_1), which is fine for most purposes. One drawback is that we do not support the Ohm-sign (i.e. Greek Letter Omega). This can be worked around by simply providing your own unit name when instantiating any of the Image functions.

  • Proposed solution
    It would be nice to directly support UTF-8 encoded character strings in SI_Units.Names and subsequent use.

  • Implementation effort
    The actual string concatenation within the library is agnostic to the string content itself, so the whole change should in effect be just be a matter of declaring the returned string as Ada.Strings.UTF_Encoding.UTF_8_String to declare the intent and adding the changing the string used for the Ohm symbol in SI_Units.Names.

  • Expected impact
    Mostly documenation, library users should be made aware that the encoding is generally UTF-8. As this is a subtype of String, no code compatibility issues to previous versions are expected.

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.