I've been trying to learn amber since it was called Jtalk and have a
question. As you know JavaScript fully supports Unicode programming, that is, one can use Unicode for object and function names. I've tried to do some Chinese programming in Amber but there seems is some checking method that will prevent Unicode character being used as selector, class or variable names. I think this is a limit that is not necessary. Pharo/Squeak may have some limitations in Unicode support but Amber can use JavaScript String functions to replace Smalltalk ones so there should not be to many troubles. So please consider support Unicode programming at the very early stage of language since it might be more difficult after the system has grown big. |
Sounds fair to look into, do you know more specifically where to dig?
-- Sent from my Palm Pre 2, wohoo! On Dec 16, 2011 9:23, JG <[hidden email]> wrote: I've been trying to learn amber since it was called Jtalk and have a question. As you know JavaScript fully supports Unicode programming, that is, one can use Unicode for object and function names. I've tried to do some Chinese programming in Amber but there seems is some checking method that will prevent Unicode character being used as selector, class or variable names. I think this is a limit that is not necessary. Pharo/Squeak may have some limitations in Unicode support but Amber can use JavaScript String functions to replace Smalltalk ones so there should not be to many troubles. So please consider support Unicode programming at the very early stage of language since it might be more difficult after the system has grown big. |
Unfortunately, my install of amber, which used to work, doesn't
display a browser anymore. I will try to locate the code once I get it run again. On Dec 16, 4:26 pm, "Göran Krampe" <[hidden email]> wrote: > Sounds fair to look into, do you know more specifically where to dig?-- Sent from my Palm Pre 2, wohoo!On Dec 16, 2011 9:23, JG <[hidden email]> wrote:I've been trying to learn amber since it was called Jtalk and have a > question. As you know JavaScript fully supports Unicode programming, > that is, one can use Unicode for object and function names. I've tried > to do some Chinese programming in Amber but there seems is some > checking method that will prevent Unicode character being used as > selector, class or variable names. I think this is a limit that is not > necessary. Pharo/Squeak may have some limitations in Unicode support > but Amber can use JavaScript String functions to replace Smalltalk > ones so there should not be to many troubles. > So please consider support Unicode programming at the very early stage > of language since it might be more difficult after the system has > grown big. |
In reply to this post by gokr
Sorry for a very late response but I checked and found these lines of code in repl/amber.js var expected = buildExpected(rightmostMatchFailuresExpected); var actualPos = Math.max(pos, rightmostMatchFailuresPos); var actual = actualPos < input.length ? quote(input.charAt(actualPos)) : 'end of input'; return 'Expected ' + expected + ' but ' + actual + ' found.'; |
Some information about this. Actually what I am doing is to export excel tables for financial data of a hospital into json and to analyze those data using Amber. The json-file contents are like this(you need not to know chinese):
list:= < { "rows" : [ { "科室名称" : " 全院", "治愈率(%)" : 58.25, "好转率(%)" : 36.617000579833984, "病死率(%)" : 0.6050000190734863 }, { "科室名称" : " 内科", "治愈率(%)" : 15.333000183105469, "好转率(%)" : 77.73200225830078, "病死率(%)" : 1.1920000314712524 } ] }>If I could use Unicode character in selectors then it would be very easy to do something like: list rows first 科室名称but now I will get a parsing error at "科室名称" and I have to do it this way: list rows first at:'科室名称'and this use case of Unicode is just one of the simplest examples. |
In reply to this post by jim kuo
Hi, To expand the parser to handle Unicode we have to include and exclude special ranges of the Unicode alphabet in the right places of the grammar. Maybe you could open an issue on GitHub so we don't forget about this. Best, Am 11.01.2013 18:58 schrieb "jim kuo" <[hidden email]>:
Göran Krampe-3 wrote |
Free forum by Nabble | Edit this page |