Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thou unit #195

Merged
merged 1 commit into from
May 31, 2019
Merged

Add thou unit #195

merged 1 commit into from
May 31, 2019

Conversation

jimmo
Copy link
Contributor

@jimmo jimmo commented May 22, 2019

These come up a lot in PCB design (e.g. track widths are measured in thou)
https://en.wikipedia.org/wiki/Thousandth_of_an_inch

Based on sharkdp/purescript-quantities#38 to add thou to purescript-quantities (so I will add a change to package.json to up the version number if that gets merged).

@@ -261,6 +261,7 @@ imperialUnitDict = Dictionary
, Q.inch ==> ["inches", "inch", "in"]
, Q.yard ==> ["yards", "yard", "yd"]
, Q.foot ==> ["feet", "foot", "ft"]
, Q.thou ==> ["thou", "mils", "mil"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need the two alternative versions (mils and mil)? I have personally never heard of them and I think they could be confused with mile/miles. Admittedly, I have never heard of thou either 😄.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I come across mil much more often than thou. But I don't mind just remembering to use thou. Will update.

(Yes they're silly units, but unfortunately still in use!)

@jimmo jimmo changed the title Add thou unit (with mil and mils aliases). Add thou unit May 29, 2019
@sharkdp
Copy link
Owner

sharkdp commented May 29, 2019

I have published a new version of purescript-quantities: https://pursuit.purescript.org/packages/purescript-quantities/8.3.0

(Also known as `mil` or `mils` but not added as aliases to avoid confusion with `mile`).

These come up a lot in PCB design (e.g. track widths are measured in thou)
https://en.wikipedia.org/wiki/Thousandth_of_an_inch
@sharkdp sharkdp merged commit 9e57a36 into sharkdp:master May 31, 2019
@tomioe
Copy link
Contributor

tomioe commented Aug 1, 2020

Sorry to bump this old issue, but it seems that mil was removed from Parser.purs.

I can't really seem to find the reason why... maybe the commit was reverted/pruned?
In any case, would be OK to send a PR that re-implements mil / mils?

@sharkdp
Copy link
Owner

sharkdp commented Aug 1, 2020

I think the change is gone as the branch was force-pushed.

I'm okay with adding them 👍. Didn't know they would be that popular.

@tomioe
Copy link
Contributor

tomioe commented Aug 1, 2020

You'll add them? Great, thanks!

Yeah, as previously mentioned, mil is still widely used within the world of electronics (component dimensions, PCB layouts, etc.)

@sharkdp
Copy link
Owner

sharkdp commented Aug 1, 2020

Well, if you could send a PR, that would be great.

Changes should be similar to the ones in this PR. Updating purescript-quantities is not needed. This line

, Q.thou ==> ["thou"]

needs to be modified to also include ["thou", "mils", "mil"].

tomioe pushed a commit to tomioe/insect that referenced this pull request Aug 3, 2020
As discussed in this issue: sharkdp#195
@tomioe
Copy link
Contributor

tomioe commented Aug 20, 2020

Just wanted to know if there's any issues with the submitted PR?

sharkdp pushed a commit that referenced this pull request Sep 20, 2020
As discussed in this issue: #195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants