probablykasper / cpc

Text calculator with support for units and conversion
https://crates.io/crates/cpc
MIT License
128 stars 14 forks source link

Dividing by a unit over time #8

Closed djmattyg007 closed 3 years ago

djmattyg007 commented 3 years ago

I haven't been able to find a way to make this kind of query work:

❯ ./cpc '500 megabytes / 3 megabytes per second'
Parsing error: Expected end of input, found LexerKeyword(Per) at 5

❯ ./cpc '500 megabytes / 3 megabytes/second'
Eval error: Unit has no child[0]

Thanks for creating this project by the way, it looks amazing :) Queries like this are one thing I still tend to use Google for, so I see it as a way to continue de-googling my life.

probablykasper commented 3 years ago

Data rate units aren't actually supported yet, so cpc '2 megabytes per second' doesn't work either. Would be great to have support for it.

Thanks, appreciate the suggestions!

probablykasper commented 3 years ago

Closed by #22