Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-14 Thread Jon Harper
For info, it works directly on x86 linux Jon On Fri, Aug 14, 2015 at 6:17 AM, Georg Simon georg.si...@auge.de wrote: For me the need lies in the future. I am using a Factor written todo list editor, primarily to learn to use the Factor UI. I now add deadlines. So I want to display

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-14 Thread John Benediktsson
Maybe just format them locally so you see something you expect? . , replace On Thu, Aug 13, 2015 at 9:17 PM, Georg Simon georg.si...@auge.de wrote: For me the need lies in the future. I am using a Factor written todo list editor, primarily to learn to use the Factor UI. I now add

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-14 Thread Andrea Ferretti
By the way, I do not think it is a good idea to directly parse or format numbers based on locale, for portability. I would rather have different functions that also take a locale into account (not necessarily the system one) and a constant with the system locale 2015-08-14 18:52 GMT+02:00 Jon

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-13 Thread John Benediktsson
If we wanted a quick fix, we could have a locale vocabulary that calls some locale-format primitives in the VM. On Thu, Aug 13, 2015 at 3:01 PM, Jon Harper jon.harpe...@gmail.com wrote: So I looked into this, trying to solve it by calling printf through the FFI with a locale setup and cleanup.

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-13 Thread Jon Harper
So I looked into this, trying to solve it by calling printf through the FFI with a locale setup and cleanup. The difficulty comes from the fact that printf is a variadic function.. Factor's ffi doesn't support them, at least no in a cross platform manner, right? So a workaround could be to wrap

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-13 Thread Georg Simon
For me the need lies in the future. I am using a Factor written todo list editor, primarily to learn to use the Factor UI. I now add deadlines. So I want to display numbers in a Factor table. It would have been proper to display them locale dependant, but it is not necessary for now. Am Fri,

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Jon Harper
This is being fixed. Meanwhile, you can adjust your locale settings to workaround: LC_CTYPE=C ./factor Should work. If not, you can try LC_ALL=C Jon Le 11 août 2015 9:30 AM, Georg Simon georg.si...@auge.de a écrit : IN: scratchpad 1.5 numberstring . 1,5.0 I would have expected 1,5

[Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Georg Simon
IN: scratchpad 1.5 numberstring . 1,5.0 I would have expected 1,5 signature.asc Description: PGP signature -- ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Georg Simon
Thank you. LC_CTYPE=C does not help. LC_ALL=C gives 1.5 instead of 1,5 My system is Ubuntu 14.04.2 LTS . But I can just wait for the fix. Georg Am Tue, 11 Aug 2015 09:37:31 +0200 schrieb Jon Harper jon.harpe...@gmail.com: This is being fixed. Meanwhile, you can adjust your locale settings to

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Georg Simon
Am Tue, 11 Aug 2015 12:29:32 +0200 schrieb Jon Harper jon.harpe...@gmail.com: Yes, LC_NUMERIC=C gives 1.5 too. So numberstring is not what I need. Are there already any words to convert numbers to locale _dependant_ strings ? Sorry, it's LC_NUMERIC, not LC_CTYPE. Also, the objective is

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Jon Harper
Sorry, it's LC_NUMERIC, not LC_CTYPE. Also, the objective is really to always have 1.5 in the listener because we want an homoiconic language, so the listener ouptut numbers in source code format which is locale independant. Le 11 août 2015 10:12 AM, Georg Simon georg.si...@auge.de a écrit :

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread John Benediktsson
(I left a B breakpoint in the code below, so unless you like seeing the process arguments each time, you might want do remove the B) On Aug 11, 2015, at 9:02 AM, John Benediktsson mrj...@gmail.com wrote: Properly supporting locales, even in a small way, would be a good thing to add.

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-11 Thread Georg Simon
Am Tue, 11 Aug 2015 09:02:33 -0700 schrieb John Benediktsson mrj...@gmail.com: Thank you. So I didn't overlook existing locales support. Properly supporting locales, even in a small way, would be a good thing to add. Factor is currently locale-independent, partly because of a desire for