brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 110 forks source link

Repeating decimals in table copy/paste output #974

Open jpolitz opened 7 years ago

jpolitz commented 7 years ago

When creating the copy/paste output for a table, rationals should be projected to roughnums before generating plaintext, since it's not useful to have 0.3̅ in plaintext output, especially when copying to a graphing program.

blerner commented 7 years ago

Comment from Josh: projecting to roughnums is necessary, but then the tildes need to be left out (because they're not lexically valid numbers in most graphing programs...)

schanzer commented 7 years ago

Based on #1119, it appears that this is complete -- we now project to roughnums, and leave off the ~. That issue describes further work to be done, but it seems this one is complete. OK to close?

blerner commented 7 years ago

I'm not sure that we project to roughnums, rather we project to "the string representation of this number", which is why #1119 shows 0.3 instead of 0.3333333333333 or something like that.