[{"data":1,"prerenderedAt":161},["ShallowReactive",2],{"project-37238368":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":33,"aspects":34,"strip":36,"post_text":39,"what":40,"said":68,"maker_in_thread":103,"shape":106,"grid":109,"attempts":125,"same_week":126,"maker_shows":33,"maker_hidden":154,"reader_version":155,"card":156},"37238368","Cashe","A money library written in Ada","title","Show HN: Cashe - A money library written in Ada","https:\u002F\u002Fgithub.com\u002FAJ-Ianozi\u002FCashe","github.com","ajdude",1692807678,2023,29,7,1423,3109,46,"shown","finance_crypto","money library","library",[21,24,25,26,27],"ada","fixed point decimal","currency exchange","iso currencies","quiet",null,{"positive":31,"neutral":31,"mixed":32,"critical":32},1,0,2,{"idea":35},{"positive":31,"critical":32},[37,32,32,32,32,38,32],5,3,"Introducing Cashe: a Money library written in Ada 2022!\n\nThe purpose of Cashe is to give Money its own high-precision datatype taking advantage of Ada's fixed type decimal system[1]. This allows storing money, associated with a currency, at a defined precision with the choice of utilizing fuzzy or exact equality (see readme for more details).\n\nIt supports ISO Currencies[2] as well as Custom-defined currencies[3], and even a working Currency Exchange[4].\n\nYou can install it using Alire, which is Ada's package manager with a simple `alr with cashe`\n\nThere's quite a bit of examples in the readme,",{"problem":41,"audience":47,"pricing":29,"motivation":54,"time_to_build":29,"stack":58,"openness":67,"stage":67,"team_size":67},{"value":42,"source":43,"evidence":44},"Storing money at defined precision with currency association, with fuzzy or exact equality","maker",[45],{"id":46},"post",{"value":48,"source":43,"evidence":49},"Developers building budgeting or finance software",[50,51],{"id":46},{"id":52,"by":11,"text":53},"37248565","I actually created this library with a budgeting app in mind! In my case, compliant with Ledger rather than Beancount. It's easier than ever to get into Ada these days. There's a…",{"value":55,"source":43,"evidence":56},"Maker created it with a budgeting app in mind, compliant with Ledger",[57],{"id":52,"by":11,"text":53},[59,63],{"value":60,"source":43,"evidence":61},"Ada 2022",[62],{"id":46},{"value":64,"source":43,"evidence":65},"Alire package manager",[66],{"id":46},"unknown",{"praise":69,"objections":81,"requests":89,"questions":90,"alternatives":98},[70],{"value":71,"source":72,"evidence":73},"Interest in Ada and its tooling for precision money handling","commenter",[74,78],{"id":75,"by":76,"text":77},"37242673","jhvkjhk","Cool. I always want to write my own beancount-clone with budgeting. How to deal with precision easily is one of the obstacles; now I wish I can write Ada!",{"id":79,"by":76,"text":80},"37249207","Ha, I guess ledge-like users are the only group caring this topic. Thank you, Ada gave me an ancient feeling because they chose the first programmer's name. It seems to have…",[82],{"value":83,"source":72,"evidence":84},"Using a separate language for currency precision is overkill; a wrapper around big.js suffices",[85],{"id":86,"by":87,"text":88},"37242869","sa46","I use a hand-rolled Money class that’s an ergonomic wrapper around big.js, an arbitrary precision decimal library. I think using a separate language is massive overkill.",[],[91],{"value":92,"source":72,"evidence":93},"Is it worth calling out to a language like Ada for currency precision in JavaScript?",[94],{"id":95,"by":96,"text":97},"37240185","khalidx","For those doing currencies in JavaScript, is it worth it calling out to a language like this that has better support for precision? How do you handle it in your code today?",[99],{"value":100,"source":72,"evidence":101},"Hand-rolled Money class wrapping big.js",[102],{"id":86,"by":87,"text":88},{"comments":31,"answered":32,"key":104},[105],{"id":52,"text":53},{"commenters":37,"max_depth":38,"maker_replies":31,"first_comment_mins":107,"lifespan_hours":108},126,22,[110,112,116,118,119,121,123],[75,32,37,111,76,32],"project\u002Fpositive\u002Fidea",[113,32,32,114,115,32],"37244860","commenter\u002Fneutral\u002Fnone","lemper",[117,32,32,114,76,32],"37245798",[52,32,32,111,11,31],[79,32,32,120,76,32],"other\u002Fneutral\u002Fnone",[95,31,38,122,96,32],"project\u002Fneutral\u002Fidea",[86,31,32,124,87,32],"commenter\u002Fcritical\u002Fidea",[],[127,132,136,141,145,149],{"id":128,"name":129,"points":130,"category":131},"37190743","flipreps",373,"creative",{"id":133,"name":134,"points":135,"category":131},"37194128","Just intonation keyboard",331,{"id":137,"name":138,"points":139,"category":140},"37188659","Rivet",327,"infrastructure",{"id":142,"name":143,"points":144,"category":131},"37188102","Avatartion",162,{"id":146,"name":147,"points":148,"category":140},"37224148","FlakeHub",154,{"id":150,"name":151,"points":152,"category":153},"37234887","Fast vector similarity",141,"data",false,"v2",{"id":157,"name":5,"line":6,"ai":154,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":158,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":159,"url":9,"mix":160,"praise":71,"objection":83,"sub":21},37238368,[21,24,25,26,27],"5000030",[31,31,32,32],1794036640606]