Re: New repo in kdereview: kalk

2021-05-04 Thread Carl Schwan
You probably want to look at https://doc.qt.io/qt-5/qlocale.html#toFloat for converting the numbers from strings to floats. This also probably means that you need to tell Flex to consider 1.000,000 as a single token and find a way to convert it as a float before giving it to Bison. I hope this hel

Re: New repo in kdereview: kalk

2021-05-04 Thread Thomas Baumgart
On Dienstag, 4. Mai 2021 19:00:13 CEST hanyoung wrote: > Flex doesn't take care of separators, MPFR and GMP do. Flex is merely > scanning for numbers and operators to pass to Bison. That's true. For lexical analysis this does not really matter. How about a space as thousand delimiter? Swed

Re: New repo in kdereview: kalk

2021-05-04 Thread Thomas Baumgart
Han, On Dienstag, 4. Mai 2021 11:36:04 CEST hanyoung wrote: > Pushed an inelegant solution - include "," as decimal separator in flex. As > long as there aren't any more decimal separator we're cool. Not sure if this appropriate, but I wanted to warn you about the dilemma that in some locale t

Re: New repo in kdereview: kalk

2021-05-04 Thread hanyoung
Flex doesn't take care of separators, MPFR and GMP do. Flex is merely scanning for numbers and operators to pass to Bison. Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, May 5, 2021 12:56 AM, Thomas Baumgart wrote: > Han, > > On Dienstag, 4. Mai 2021 11:36:0

Re: New repo in kdereview: kalk

2021-05-04 Thread hanyoung
Pushed an inelegant solution - include "," as decimal separator in flex. As long as there aren't any more decimal separator we're cool. Regards, Han ‐‐‐ Original Message ‐‐‐ On Tuesday, May 4, 2021 6:54 AM, Albert Astals Cid wrote: > Added a failing test > athttps://invent.kde.org/plas

Re: New repo in kdereview: kalk

2021-05-03 Thread Albert Astals Cid
El dilluns, 3 de maig de 2021, a les 0:49:37 (CEST), Albert Astals Cid va escriure: > El diumenge, 2 de maig de 2021, a les 8:43:42 (CEST), hanyoung va escriure: > > Change the default output to float, however I'm not sure how to add > > autotest. I want to unit test InputManager but it's not a l

Re: New repo in kdereview: kalk

2021-05-02 Thread Albert Astals Cid
El diumenge, 2 de maig de 2021, a les 8:43:42 (CEST), hanyoung va escriure: > Change the default output to float, however I'm not sure how to add autotest. > I want to unit test InputManager but it's not a library. I wrote you an autotest https://invent.kde.org/plasma-mobile/kalk/-/merge_request

Re: New repo in kdereview: kalk

2021-05-01 Thread hanyoung
Change the default output to float, however I'm not sure how to add autotest. I want to unit test InputManager but it's not a library. ‐‐‐ Original Message ‐‐‐ On Sunday, May 2, 2021 6:04 AM, Albert Astals Cid wrote: > El dissabte, 1 de maig de 2021, a les 7:26:24 (CEST), hanyoung va es

Re: New repo in kdereview: kalk

2021-05-01 Thread Albert Astals Cid
El dissabte, 1 de maig de 2021, a les 7:26:24 (CEST), hanyoung va escriure: > I've fixed the keyboard bug and change the division result between two > integers to float. I don't think that changing knumber to do that is a great idea, keeping integer divisions as fraction instead of float seems

Re: New repo in kdereview: kalk

2021-04-30 Thread hanyoung
I've fixed the keyboard bug and change the division result between two integers to float. Also the qml warning has been fixed. Regards, Han ‐‐‐ Original Message ‐‐‐ On Saturday, May 1, 2021 5:13 AM, Albert Astals Cid wrote: > El divendres, 30 d’abril de 2021, a les 15:31:11 (CEST), han

Re: New repo in kdereview: kalk

2021-04-30 Thread Albert Astals Cid
El divendres, 30 d’abril de 2021, a les 15:31:11 (CEST), hanyoung va escriure: > Kalk has now switched to the (modified) KNumber as base data type now. The > real number precision is hard coded to 16 for now. Also during SoK, binary > mode was introduced. Running it i get qrc:/qml/CalculationPa

Re: New repo in kdereview: kalk

2021-04-30 Thread hanyoung
Kalk has now switched to the (modified) KNumber as base data type now. The real number precision is hard coded to 16 for now. Also during SoK, binary mode was introduced. Regards, Han

Re: New repo in kdereview: kalk

2021-02-21 Thread Ivan Čukić
Hi all, Cool idea for the project. I went through the C++ part of the code, and have a few suggestions. > > Please reconsider your decision. > https://blog.acolyer.org/2020/10/02/toward-an-api-for-the-real-numbers/ +1 for the plea of not reinventing numerics however fun it is to play with flex

Re: New repo in kdereview: kalk

2021-02-19 Thread Milian Wolff
On Donnerstag, 18. Februar 2021 23:55:32 CET Albert Astals Cid wrote: > El dijous, 18 de febrer de 2021, a les 17:05:22 CET, hanyoung va escriure: > > Hello everyone! > > > > I want to move kalk to kdereview. > > It's the calculator for Plasma Mobile (it also works great on desktop). > > > > http

Re: New repo in kdereview: kalk

2021-02-18 Thread Albert Astals Cid
El dijous, 18 de febrer de 2021, a les 17:05:22 CET, hanyoung va escriure: > Hello everyone! > > I want to move kalk to kdereview. > It's the calculator for Plasma Mobile (it also works great on desktop). > > https://invent.kde.org/plasma-mobile/kalk There's a typo in the invent.kde.org descript

Re: New repo in kdereview: kalk

2021-02-18 Thread Albert Astals Cid
El dijous, 18 de febrer de 2021, a les 17:05:22 CET, hanyoung va escriure: > Hello everyone! > > I want to move kalk to kdereview. > It's the calculator for Plasma Mobile (it also works great on desktop). > > https://invent.kde.org/plasma-mobile/kalk > > It's not a QML version of kcalc, the math

New repo in kdereview: kalk

2021-02-18 Thread hanyoung
Hello everyone! I want to move kalk to kdereview. It's the calculator for Plasma Mobile (it also works great on desktop). https://invent.kde.org/plasma-mobile/kalk It's not a QML version of kcalc, the math engine is written with bison/flex. And it also supports Unit conversion thanks to KUnitCon