silt-lang / silt

An in-progress fast, dependently typed, functional programming language implemented in Swift.
MIT License
240 stars 13 forks source link

Implement Punycode #116

Closed CodaFi closed 6 years ago

CodaFi commented 6 years ago

What's in this pull request?

A clean, modern implementation of Punycode from RFC 3492 - something you’d think would be a library by now. We are using Swift’s encoding table (lowers and 10 uppers) because the default table uses lowercase letters and numbers and those will conflict with the mangling.

Goes a ways towards #104

harlanhaskins commented 6 years ago

Tests?

harlanhaskins commented 6 years ago

Not sure how best to test this given our infrastructure...

CodaFi commented 6 years ago

I could plumb a primitive mangler thru and add FileCheck tests

harlanhaskins commented 6 years ago

I think it’s fine as-is, and we can test this along with the mangler.

CodaFi commented 6 years ago

Harlan has agreed to put up the mangler

⛵️