arclanguage / anarki

Community-managed fork of the Arc dialect of Lisp; for commit privileges submit a pull request.
http://arclanguage.github.io
Other
1.17k stars 160 forks source link

Add unicode conversions to COERCE #135

Closed shawwn closed 5 years ago

shawwn commented 5 years ago
arc> (coerce "foo" 'bytes)
(102 111 111)
arc> (coerce (coerce "foo" 'bytes) 'string)
"foo"
arc> (coerce (coerce "foo" 'bytes) 'string 'utf8)
"foo"
arc> (coerce (coerce "foo" 'bytes) 'string 'latin1)
"foo"
akkartik commented 5 years ago

Thanks for doing this! Looks like there's a failing test:

https://travis-ci.org/arclanguage/anarki/jobs/479559114

Can you try running the tests locally with:

$ hg clone https://bitbucket.org/zck/unit-test.arc
$ ./arc.sh
arc> (load "tests.arc")

?

Many thanks.

akkartik commented 5 years ago

Makes sense. Thank you!