International text input on X11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
127 messages Options
1234567
Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
I'll try to do that.   I haven't looked at the code but do you handle
the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP)
etc?

On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:

> On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
>>
>> If I understand correctly, here is what we need to do:
>>
>> 1) Apply the changes of Mr Hachisuka to the VM.
>>  - The diff is in the earlier email from Yoshiki:
>>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
>>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
>>  - Test updated VM to make sure the changes do not cause problems. Make sure
>>    it works without problems for Squeak trunk and for Scratch.
>>  - Apply the update in SVN for both oscog and trunk. I can help here.
>>  - Test the VM. Tim, I need help on this. I do not currently have a working
>>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
>>    apply the patch from Yoshiki's email and see if your resulting Cog VM
>>    continues to work for you as expected on Pi with Scratch?
>>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
>>    you please give his full name for the commit notice? I assume the patch
>>    is MIT licensed.
>>
>
> Hi Yoshiki,
>
> I think that I now understand the VM changes for sqUnixX11.c, and I have applied
> the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
> VM. If these changes are correct, then I will also make a patch and commit them
> to the oscog branch for Cog/Spur VMs.
>
> I arranged the code such that the multibyte recordPendingKeys() logic is used
> if and only if the -compositioninput option is set on the command line or the
> equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
> this is the intended usage, but please let me know if I did not understand.
>
> If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
> then please let me know if these changes work as you expect. If you cannot easily
> make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
> but I would prefer to test them first if possible.
>
> I also found that many of the module command line options are not being passed
> correctly from the VM to the modules. The -compositionsinput option was one
> of these, so I fixed it in this update (and I will check if for Cog/Spur when
> we apply the patch there). But there are others that do not work, so if you
> find other VM options for multilingual support that do not work as expected,
> this may be the reason.
>
> Dave
>
>



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
On Mon, May 23, 2016 at 03:29:53PM -0700, Yoshiki Ohshima wrote:
> I'll try to do that.   I haven't looked at the code but do you handle
> the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP)
> etc?

No, I made no changes to the logic except that it is conditional based
on the value of the compositionInput variable. I do not know if this is
the correct approach. I also found that the -compositioninput flag was
not working (it is supposed to set the compositionInput variable), so
I fixed that in sqUnixMain.c.

I am attaching a copy of the updated function so you can see it more
easily.

Dave


>
> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:
> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
> >>
> >> If I understand correctly, here is what we need to do:
> >>
> >> 1) Apply the changes of Mr Hachisuka to the VM.
> >>  - The diff is in the earlier email from Yoshiki:
> >>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
> >>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
> >>  - Test updated VM to make sure the changes do not cause problems. Make sure
> >>    it works without problems for Squeak trunk and for Scratch.
> >>  - Apply the update in SVN for both oscog and trunk. I can help here.
> >>  - Test the VM. Tim, I need help on this. I do not currently have a working
> >>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
> >>    apply the patch from Yoshiki's email and see if your resulting Cog VM
> >>    continues to work for you as expected on Pi with Scratch?
> >>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
> >>    you please give his full name for the commit notice? I assume the patch
> >>    is MIT licensed.
> >>
> >
> > Hi Yoshiki,
> >
> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied
> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
> > VM. If these changes are correct, then I will also make a patch and commit them
> > to the oscog branch for Cog/Spur VMs.
> >
> > I arranged the code such that the multibyte recordPendingKeys() logic is used
> > if and only if the -compositioninput option is set on the command line or the
> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
> > this is the intended usage, but please let me know if I did not understand.
> >
> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
> > then please let me know if these changes work as you expect. If you cannot easily
> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
> > but I would prefer to test them first if possible.
> >
> > I also found that many of the module command line options are not being passed
> > correctly from the VM to the modules. The -compositionsinput option was one
> > of these, so I fixed it in this update (and I will check if for Cog/Spur when
> > we apply the patch there). But there are others that do not work, so if you
> > find other VM options for multilingual support that do not work as expected,
> > this may be the reason.
> >
> > Dave
> >
> >
>
>
>
> --
> -- Yoshiki



recordPendingKeys.c (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
Ok.  (Still have not looked into it yet) but in regards to handling
different encodings, I think handling UTF-8 is at least an improvement
over the current status so that is fine.  The compositioninput was an
option to the vm module but if the main module handles that, that is
fine, too.

On Mon, May 23, 2016 at 4:09 PM, David T. Lewis <[hidden email]> wrote:

> On Mon, May 23, 2016 at 03:29:53PM -0700, Yoshiki Ohshima wrote:
>> I'll try to do that.   I haven't looked at the code but do you handle
>> the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP)
>> etc?
>
> No, I made no changes to the logic except that it is conditional based
> on the value of the compositionInput variable. I do not know if this is
> the correct approach. I also found that the -compositioninput flag was
> not working (it is supposed to set the compositionInput variable), so
> I fixed that in sqUnixMain.c.
>
> I am attaching a copy of the updated function so you can see it more
> easily.
>
> Dave
>
>
>>
>> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:
>> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
>> >>
>> >> If I understand correctly, here is what we need to do:
>> >>
>> >> 1) Apply the changes of Mr Hachisuka to the VM.
>> >>  - The diff is in the earlier email from Yoshiki:
>> >>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
>> >>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
>> >>  - Test updated VM to make sure the changes do not cause problems. Make sure
>> >>    it works without problems for Squeak trunk and for Scratch.
>> >>  - Apply the update in SVN for both oscog and trunk. I can help here.
>> >>  - Test the VM. Tim, I need help on this. I do not currently have a working
>> >>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
>> >>    apply the patch from Yoshiki's email and see if your resulting Cog VM
>> >>    continues to work for you as expected on Pi with Scratch?
>> >>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
>> >>    you please give his full name for the commit notice? I assume the patch
>> >>    is MIT licensed.
>> >>
>> >
>> > Hi Yoshiki,
>> >
>> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied
>> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
>> > VM. If these changes are correct, then I will also make a patch and commit them
>> > to the oscog branch for Cog/Spur VMs.
>> >
>> > I arranged the code such that the multibyte recordPendingKeys() logic is used
>> > if and only if the -compositioninput option is set on the command line or the
>> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
>> > this is the intended usage, but please let me know if I did not understand.
>> >
>> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
>> > then please let me know if these changes work as you expect. If you cannot easily
>> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
>> > but I would prefer to test them first if possible.
>> >
>> > I also found that many of the module command line options are not being passed
>> > correctly from the VM to the modules. The -compositionsinput option was one
>> > of these, so I fixed it in this update (and I will check if for Cog/Spur when
>> > we apply the patch there). But there are others that do not work, so if you
>> > find other VM options for multilingual support that do not work as expected,
>> > this may be the reason.
>> >
>> > Dave
>> >
>> >
>>
>>
>>
>> --
>> -- Yoshiki
>
>
>



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by David T. Lewis
It

On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:

> On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
>>
>> If I understand correctly, here is what we need to do:
>>
>> 1) Apply the changes of Mr Hachisuka to the VM.
>>  - The diff is in the earlier email from Yoshiki:
>>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
>>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
>>  - Test updated VM to make sure the changes do not cause problems. Make sure
>>    it works without problems for Squeak trunk and for Scratch.
>>  - Apply the update in SVN for both oscog and trunk. I can help here.
>>  - Test the VM. Tim, I need help on this. I do not currently have a working
>>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
>>    apply the patch from Yoshiki's email and see if your resulting Cog VM
>>    continues to work for you as expected on Pi with Scratch?
>>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
>>    you please give his full name for the commit notice? I assume the patch
>>    is MIT licensed.
>>
>
> Hi Yoshiki,
>
> I think that I now understand the VM changes for sqUnixX11.c, and I have applied
> the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
> VM. If these changes are correct, then I will also make a patch and commit them
> to the oscog branch for Cog/Spur VMs.
>
> I arranged the code such that the multibyte recordPendingKeys() logic is used
> if and only if the -compositioninput option is set on the command line or the
> equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
> this is the intended usage, but please let me know if I did not understand.
>
> If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
> then please let me know if these changes work as you expect. If you cannot easily
> make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
> but I would prefer to test them first if possible.

It does buiid.  Yay.  The build directory structure seems to be
different from Cog, though.  How do I test a VM that is just
generated?  Do people set different install directory someways?


--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote:

>
> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:
> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
> >>
> >> If I understand correctly, here is what we need to do:
> >>
> >> 1) Apply the changes of Mr Hachisuka to the VM.
> >>  - The diff is in the earlier email from Yoshiki:
> >>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
> >>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
> >>  - Test updated VM to make sure the changes do not cause problems. Make sure
> >>    it works without problems for Squeak trunk and for Scratch.
> >>  - Apply the update in SVN for both oscog and trunk. I can help here.
> >>  - Test the VM. Tim, I need help on this. I do not currently have a working
> >>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
> >>    apply the patch from Yoshiki's email and see if your resulting Cog VM
> >>    continues to work for you as expected on Pi with Scratch?
> >>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
> >>    you please give his full name for the commit notice? I assume the patch
> >>    is MIT licensed.
> >>
> >
> > Hi Yoshiki,
> >
> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied
> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
> > VM. If these changes are correct, then I will also make a patch and commit them
> > to the oscog branch for Cog/Spur VMs.
> >
> > I arranged the code such that the multibyte recordPendingKeys() logic is used
> > if and only if the -compositioninput option is set on the command line or the
> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
> > this is the intended usage, but please let me know if I did not understand.
> >
> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
> > then please let me know if these changes work as you expect. If you cannot easily
> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
> > but I would prefer to test them first if possible.
>
> It does buiid.  Yay.  The build directory structure seems to be
> different from Cog, though.  How do I test a VM that is just
> generated?  Do people set different install directory someways?
>

I do not think that there is any standard approach for this, but here is
what I do for my own use:

- Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog.
This is the 32-bit JIT VM for Squeak V3 images.

- Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur.
This is the 32-bit JIT Spur VM for Spur images.

- Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64.
This is the 64-bit JIT Spur VM for 64 bit Spur images.

- Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak
file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image.

With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I
want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For
either 32-bit or 64-bit V3 images, I type "squeak".

I also have a script of my own making installed as /usr/local/bin/vmrun
that selects an appropriate VM based on the image format, but I no longer
use it because I usually know which VM I want anyway, so it is better for
me to just use "cog", "spur", "spur64", or "squeak" directly.

Yoshiki, I should mention that since my last email, I have also updated
the SVN oscog branch so that the -compositionInput option will work on Cog
and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
Spur also, and it should now work the same as for the interpreter VM. But
I appreciate very much if you can first confirm that the patch works as
you expect on interpreter VM. Then we can apply the update for Cog/Spur
so that it can be used for Scratch on Raspberry Pi.

I am sorry if I am moving too slowly here, but I do not understand how
multibyte character composition should work, so I am trying to be careful
with the changes.

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
I'd rather avoid touching existing files.  But once I figure out how
to pass --prefix for configure under the cmake regime, I am happy to
go forward from there. (No, Dave, you are moving very fast and prompt!
 Thank you!)

But then I'll try the oscog branch and makes a cleaner now.

On Tue, May 24, 2016 at 8:20 PM, David T. Lewis <[hidden email]> wrote:

> On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote:
>>
>> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:
>> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
>> >>
>> >> If I understand correctly, here is what we need to do:
>> >>
>> >> 1) Apply the changes of Mr Hachisuka to the VM.
>> >>  - The diff is in the earlier email from Yoshiki:
>> >>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
>> >>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
>> >>  - Test updated VM to make sure the changes do not cause problems. Make sure
>> >>    it works without problems for Squeak trunk and for Scratch.
>> >>  - Apply the update in SVN for both oscog and trunk. I can help here.
>> >>  - Test the VM. Tim, I need help on this. I do not currently have a working
>> >>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
>> >>    apply the patch from Yoshiki's email and see if your resulting Cog VM
>> >>    continues to work for you as expected on Pi with Scratch?
>> >>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
>> >>    you please give his full name for the commit notice? I assume the patch
>> >>    is MIT licensed.
>> >>
>> >
>> > Hi Yoshiki,
>> >
>> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied
>> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
>> > VM. If these changes are correct, then I will also make a patch and commit them
>> > to the oscog branch for Cog/Spur VMs.
>> >
>> > I arranged the code such that the multibyte recordPendingKeys() logic is used
>> > if and only if the -compositioninput option is set on the command line or the
>> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
>> > this is the intended usage, but please let me know if I did not understand.
>> >
>> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
>> > then please let me know if these changes work as you expect. If you cannot easily
>> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
>> > but I would prefer to test them first if possible.
>>
>> It does buiid.  Yay.  The build directory structure seems to be
>> different from Cog, though.  How do I test a VM that is just
>> generated?  Do people set different install directory someways?
>>
>
> I do not think that there is any standard approach for this, but here is
> what I do for my own use:
>
> - Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog.
> This is the 32-bit JIT VM for Squeak V3 images.
>
> - Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur.
> This is the 32-bit JIT Spur VM for Spur images.
>
> - Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64.
> This is the 64-bit JIT Spur VM for 64 bit Spur images.
>
> - Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak
> file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image.
>
> With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I
> want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For
> either 32-bit or 64-bit V3 images, I type "squeak".
>
> I also have a script of my own making installed as /usr/local/bin/vmrun
> that selects an appropriate VM based on the image format, but I no longer
> use it because I usually know which VM I want anyway, so it is better for
> me to just use "cog", "spur", "spur64", or "squeak" directly.
>
> Yoshiki, I should mention that since my last email, I have also updated
> the SVN oscog branch so that the -compositionInput option will work on Cog
> and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
> Spur also, and it should now work the same as for the interpreter VM. But
> I appreciate very much if you can first confirm that the patch works as
> you expect on interpreter VM. Then we can apply the update for Cog/Spur
> so that it can be used for Scratch on Raspberry Pi.
>
> I am sorry if I am moving too slowly here, but I do not understand how
> multibyte character composition should work, so I am trying to be careful
> with the changes.
>
> Dave
>
>



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

timrowledge
It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ‘products’ directory. For example on a Pi you build in ………./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ………../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar.

So far as I can work out the Mac vms don’t get moved to products. And I have no idea about Windows vms.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Not an idiot, but plays one in his life.



Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by David T. Lewis
On Tue, May 24, 2016 at 8:20 PM, David T. Lewis <[hidden email]> wrote:

> On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote:
>>
>> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis <[hidden email]> wrote:
>> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote:
>> >>
>> >> If I understand correctly, here is what we need to do:
>> >>
>> >> 1) Apply the changes of Mr Hachisuka to the VM.
>> >>  - The diff is in the earlier email from Yoshiki:
>> >>       http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html
>> >>       http://www2.asu.ac.jp/hachi/v3/scratch14ime.html
>> >>  - Test updated VM to make sure the changes do not cause problems. Make sure
>> >>    it works without problems for Squeak trunk and for Scratch.
>> >>  - Apply the update in SVN for both oscog and trunk. I can help here.
>> >>  - Test the VM. Tim, I need help on this. I do not currently have a working
>> >>    Cog build environment (Unbuntu/autotools/gcc version issues). Can you
>> >>    apply the patch from Yoshiki's email and see if your resulting Cog VM
>> >>    continues to work for you as expected on Pi with Scratch?
>> >>  - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can
>> >>    you please give his full name for the commit notice? I assume the patch
>> >>    is MIT licensed.
>> >>
>> >
>> > Hi Yoshiki,
>> >
>> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied
>> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter
>> > VM. If these changes are correct, then I will also make a patch and commit them
>> > to the oscog branch for Cog/Spur VMs.
>> >
>> > I arranged the code such that the multibyte recordPendingKeys() logic is used
>> > if and only if the -compositioninput option is set on the command line or the
>> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that
>> > this is the intended usage, but please let me know if I did not understand.
>> >
>> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354),
>> > then please let me know if these changes work as you expect. If you cannot easily
>> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch,
>> > but I would prefer to test them first if possible.
>>
>> It does buiid.  Yay.  The build directory structure seems to be
>> different from Cog, though.  How do I test a VM that is just
>> generated?  Do people set different install directory someways?
>>
>
> I do not think that there is any standard approach for this, but here is
> what I do for my own use:
>
> - Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog.
> This is the 32-bit JIT VM for Squeak V3 images.
>
> - Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur.
> This is the 32-bit JIT Spur VM for Spur images.
>
> - Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64.
> This is the 64-bit JIT Spur VM for 64 bit Spur images.
>
> - Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak
> file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image.
>
> With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I
> want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For
> either 32-bit or 64-bit V3 images, I type "squeak".
>
> I also have a script of my own making installed as /usr/local/bin/vmrun
> that selects an appropriate VM based on the image format, but I no longer
> use it because I usually know which VM I want anyway, so it is better for
> me to just use "cog", "spur", "spur64", or "squeak" directly.
>
> Yoshiki, I should mention that since my last email, I have also updated
> the SVN oscog branch so that the -compositionInput option will work on Cog
> and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
> Spur also, and it should now work the same as for the interpreter VM. But
> I appreciate very much if you can first confirm that the patch works as
> you expect on interpreter VM. Then we can apply the update for Cog/Spur
> so that it can be used for Scratch on Raspberry Pi.

In any case, I built an interpreter VM (of trunk, rev. 3730).  But I
get an error:

This interpreter (vers. 0) cannot read image file (vers. 6521)

Any thoughts?


--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by timrowledge
On Wed, May 25, 2016 at 10:02 AM, tim Rowledge <[hidden email]> wrote:
> It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ‘products’ directory. For example on a Pi you build in ………./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ………../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar.

Right.  The modified version of scratch script I made can take the
--vm option that works so I can run the one in the products directory.

For the interpreter VM, I just edited Makefile and pass
--prefix=/home/pi/usr to configure.



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by Yoshiki Ohshima-3
On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima
<[hidden email]> wrote:
> I'd rather avoid touching existing files.  But once I figure out how
> to pass --prefix for configure under the cmake regime, I am happy to
> go forward from there. (No, Dave, you are moving very fast and prompt!
>  Thank you!)
>
> But then I'll try the oscog branch and makes a cleaner now.

I've been assuming that the "oscog" branch is "svn/branches/Cog", and
I can confirm that the -compositioninput flag provided to the main VM
binary is passed to the X11 driver, and other things seem to work.
(The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has
not been added to plugins.ext so the actual Japanese input still does
not work, but it seems close.)
--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In any case, I just copy and pasted the implementation of
recordPendingKeys() from trunk to the Cog branch and it works as
expected in an UTF8 environment.

On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima
<[hidden email]> wrote:

> On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima
> <[hidden email]> wrote:
>> I'd rather avoid touching existing files.  But once I figure out how
>> to pass --prefix for configure under the cmake regime, I am happy to
>> go forward from there. (No, Dave, you are moving very fast and prompt!
>>  Thank you!)
>>
>> But then I'll try the oscog branch and makes a cleaner now.
>
> I've been assuming that the "oscog" branch is "svn/branches/Cog", and
> I can confirm that the -compositioninput flag provided to the main VM
> binary is passed to the X11 driver, and other things seem to work.
> (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has
> not been added to plugins.ext so the actual Japanese input still does
> not work, but it seems close.)
> --
> -- Yoshiki



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by Yoshiki Ohshima-3
On Wed, May 25, 2016 at 11:52 AM, Yoshiki Ohshima
<[hidden email]> wrote:
> On Wed, May 25, 2016 at 10:02 AM, tim Rowledge <[hidden email]> wrote:
>> It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ‘products’ directory. For example on a Pi you build in ………./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ………../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar.
>
> Right.  The modified version of scratch script I made can take the
> --vm option that works so I can run the one in the products directory.

In any case, this is the current scratch script that works with the
new scheme of passing -compositioninput flag without needing the
display module spec.

--
-- Yoshiki



scratch.diff (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
In reply to this post by Yoshiki Ohshima-3
On Wed, May 25, 2016 at 03:42:45PM -0700, Yoshiki Ohshima wrote:

>
> On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima
> <[hidden email]> wrote:
> > On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima
> > <[hidden email]> wrote:
> >> I'd rather avoid touching existing files.  But once I figure out how
> >> to pass --prefix for configure under the cmake regime, I am happy to
> >> go forward from there. (No, Dave, you are moving very fast and prompt!
> >>  Thank you!)
> >>
> >> But then I'll try the oscog branch and makes a cleaner now.
> >
> > I've been assuming that the "oscog" branch is "svn/branches/Cog", and
> > I can confirm that the -compositioninput flag provided to the main VM
> > binary is passed to the X11 driver, and other things seem to work.
> > (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has
> > not been added to plugins.ext so the actual Japanese input still does
> > not work, but it seems close.)
>
> In any case, I just copy and pasted the implementation of
> recordPendingKeys() from trunk to the Cog branch and it works as
> expected in an UTF8 environment.

Excellent, thank you for confirming.

Yes when I said "oscog branch" I should have said "svn/branches/Cog", sorry.

I just committed the update to SVN branches/Cog so that all of the Cog,
Spur, and interpreter VMs will have the new recordPendingKeys() function,
and command line parameters will be passed correctly to the X11 display
module.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
In reply to this post by Yoshiki Ohshima-3
On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote:

> On Tue, May 24, 2016 at 8:20 PM, David T. Lewis <[hidden email]> wrote:
> >
> > Yoshiki, I should mention that since my last email, I have also updated
> > the SVN oscog branch so that the -compositionInput option will work on Cog
> > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
> > Spur also, and it should now work the same as for the interpreter VM. But
> > I appreciate very much if you can first confirm that the patch works as
> > you expect on interpreter VM. Then we can apply the update for Cog/Spur
> > so that it can be used for Scratch on Raspberry Pi.
>
> In any case, I built an interpreter VM (of trunk, rev. 3730).  But I
> get an error:
>
> This interpreter (vers. 0) cannot read image file (vers. 6521)
>
> Any thoughts?
>

Image format 6521 is the 32-bit Spur image format used in Squeak 5.0.
A Spur VM is required to run this image. Tim's latest Scratch work is
updated to the 6521 Spur image format, so an interpreter VM can no longer
be used to run these images.

Squeak 4.6 and earlier will work with the interpreter VM, and I expect that
an older Scratch image should work also, although I do not know exactly when
Scratch moved to Spur 6521.

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

timrowledge

> On 25-05-2016, at 5:48 PM, David T. Lewis <[hidden email]> wrote:
>
> Squeak 4.6 and earlier will work with the interpreter VM, and I expect that
> an older Scratch image should work also, although I do not know exactly when
> Scratch moved to Spur 6521.

Around last August? Basically as soon as we had Cog working. We didn’t really put any effort into making an V3 Cog and in fact so far as I recall it may not be doable without some hassles because we couldn’t make a method entry block that would conform to the alignment parameters Eliot uses to discriminate between something and something else.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: CEQ: Corrupt and Erase Queue



Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
On Wed, May 25, 2016 at 06:22:49PM -0700, tim Rowledge wrote:
>
> > On 25-05-2016, at 5:48 PM, David T. Lewis <[hidden email]> wrote:
> >
> > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that
> > an older Scratch image should work also, although I do not know exactly when
> > Scratch moved to Spur 6521.
>
> Around last August? Basically as soon as we had Cog working. We didn???t really put any effort into making an V3 Cog and in fact so far as I recall it may not be doable without some hassles because we couldn???t make a method entry block that would conform to the alignment parameters Eliot uses to discriminate between something and something else.
>

Cog VMs for V3 images built from the latest sources work fine, yes? The pre-built
VMs have been updated quite recently at http://www.mirandabanda.org/files/Cog/VM/VM.r3692/

So for an image in Spur 6521 format, you need a Spur VM. For images in the earlier
V3 format, any Cog or interpreter VM should work. The Scratch image was moved to
Spur 6521 format approximately last August, so these recent Scratch images require
a Spur VM.

The necessary platforms source updates (Cog/Spur/Interpreter) are now in sync
for the X11 display. We do still need to make sure that ImmX11Plugin is included
in the VM for Scratch on Raspbian (and maybe we need to do some updates to the
plugin, I am not sure), but otherwise we should now be close to having Scratch
character input working for Japanese users.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by David T. Lewis
Thanks for clarification.  I wasn't quite sure that the image in the
All in One was a Spur image, and also the error message (vers. 0) made
me think that the VM was properly built.

On Wed, May 25, 2016 at 5:48 PM, David T. Lewis <[hidden email]> wrote:

> On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote:
>> On Tue, May 24, 2016 at 8:20 PM, David T. Lewis <[hidden email]> wrote:
>> >
>> > Yoshiki, I should mention that since my last email, I have also updated
>> > the SVN oscog branch so that the -compositionInput option will work on Cog
>> > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
>> > Spur also, and it should now work the same as for the interpreter VM. But
>> > I appreciate very much if you can first confirm that the patch works as
>> > you expect on interpreter VM. Then we can apply the update for Cog/Spur
>> > so that it can be used for Scratch on Raspberry Pi.
>>
>> In any case, I built an interpreter VM (of trunk, rev. 3730).  But I
>> get an error:
>>
>> This interpreter (vers. 0) cannot read image file (vers. 6521)
>>
>> Any thoughts?
>>
>
> Image format 6521 is the 32-bit Spur image format used in Squeak 5.0.
> A Spur VM is required to run this image. Tim's latest Scratch work is
> updated to the 6521 Spur image format, so an interpreter VM can no longer
> be used to run these images.
>
> Squeak 4.6 and earlier will work with the interpreter VM, and I expect that
> an older Scratch image should work also, although I do not know exactly when
> Scratch moved to Spur 6521.
>
> Dave
>
>



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

David T. Lewis
The error message "vers. 0" is a bug. It is supposed to give a meaningful
version number for the VM. Funny but I never noticed this before.

Maybe the message should be revised anyway, because one version of the
interpreter can read more than one image format. An interpreter for
32-bit object memory can support image formats 6502, 6504, and 6505.
An interpreter for 64-bit V3 images supports image formats 68000, 68002,
and 68003.

Dave


On Wed, May 25, 2016 at 08:10:25PM -0700, Yoshiki Ohshima wrote:

> Thanks for clarification.  I wasn't quite sure that the image in the
> All in One was a Spur image, and also the error message (vers. 0) made
> me think that the VM was properly built.
>
> On Wed, May 25, 2016 at 5:48 PM, David T. Lewis <[hidden email]> wrote:
> > On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote:
> >> On Tue, May 24, 2016 at 8:20 PM, David T. Lewis <[hidden email]> wrote:
> >> >
> >> > Yoshiki, I should mention that since my last email, I have also updated
> >> > the SVN oscog branch so that the -compositionInput option will work on Cog
> >> > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and
> >> > Spur also, and it should now work the same as for the interpreter VM. But
> >> > I appreciate very much if you can first confirm that the patch works as
> >> > you expect on interpreter VM. Then we can apply the update for Cog/Spur
> >> > so that it can be used for Scratch on Raspberry Pi.
> >>
> >> In any case, I built an interpreter VM (of trunk, rev. 3730).  But I
> >> get an error:
> >>
> >> This interpreter (vers. 0) cannot read image file (vers. 6521)
> >>
> >> Any thoughts?
> >>
> >
> > Image format 6521 is the 32-bit Spur image format used in Squeak 5.0.
> > A Spur VM is required to run this image. Tim's latest Scratch work is
> > updated to the 6521 Spur image format, so an interpreter VM can no longer
> > be used to run these images.
> >
> > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that
> > an older Scratch image should work also, although I do not know exactly when
> > Scratch moved to Spur 6521.
> >
> > Dave
> >
> >
>
>
>
> --
> -- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by David T. Lewis
I see r3732, which has the working recordPendingKeys().  Once
ImmX11Plugin is automatically added to plugins.ext, I think the VM
change is all set.

 Thank you!

On Wed, May 25, 2016 at 5:09 PM, David T. Lewis <[hidden email]> wrote:

> On Wed, May 25, 2016 at 03:42:45PM -0700, Yoshiki Ohshima wrote:
>>
>> On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima
>> <[hidden email]> wrote:
>> > On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima
>> > <[hidden email]> wrote:
>> >> I'd rather avoid touching existing files.  But once I figure out how
>> >> to pass --prefix for configure under the cmake regime, I am happy to
>> >> go forward from there. (No, Dave, you are moving very fast and prompt!
>> >>  Thank you!)
>> >>
>> >> But then I'll try the oscog branch and makes a cleaner now.
>> >
>> > I've been assuming that the "oscog" branch is "svn/branches/Cog", and
>> > I can confirm that the -compositioninput flag provided to the main VM
>> > binary is passed to the X11 driver, and other things seem to work.
>> > (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has
>> > not been added to plugins.ext so the actual Japanese input still does
>> > not work, but it seems close.)
>>
>> In any case, I just copy and pasted the implementation of
>> recordPendingKeys() from trunk to the Cog branch and it works as
>> expected in an UTF8 environment.
>
> Excellent, thank you for confirming.
>
> Yes when I said "oscog branch" I should have said "svn/branches/Cog", sorry.
>
> I just committed the update to SVN branches/Cog so that all of the Cog,
> Spur, and interpreter VMs will have the new recordPendingKeys() function,
> and command line parameters will be passed correctly to the X11 display
> module.
>
> Dave
>
>



--
-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: International text input on X11

Yoshiki Ohshima-3
In reply to this post by David T. Lewis
Hi Tim,

As the VM changes for this matter is in shape (if I'm not mistaken,
the plugins.ext has to have ImmX11Plugin), the following image side
changes will greatly help the usability for kids in Japan and
elsewhere.  Can you add those at some point?

On Sun, May 15, 2016 at 1:19 PM, Yoshiki Ohshima
<[hidden email]> wrote:

> Then on the image side, we need to fix ImmX11>>keyboardFocusForMorph:
> to support non-TextMorphs.  My feeble attempt involves to test whether
> the given morph understand #paragraph and make it read:
>
> -------------------
> keyboardFocusForAMorph: aMorph
>
>         aMorph ifNil: [^ self].
>         [
>                 | left bottom pos height |
>                 pos := aMorph preferredKeyboardPosition.
>                 left := (pos x min: Display width max: 0) asInteger.
>                 (aMorph respondsTo: #paragraph) ifTrue: [
>                         height := (aMorph paragraph
>                                 characterBlockForIndex: aMorph editor selectionInterval first) height
>                 ] ifFalse: [
>                         height := aMorph height].
>                 bottom := (pos y min: Display height max: 0) asInteger
>                          + height.
>                 self setCompositionWindowPositionX: left y: bottom asInteger
>         ] on: Error
>         do: [:ex |].
>
> -------------------
> (#asInteger is sent so that the primitive does not get floats.)
>
> and then to use it StringFieldMorph (and possible a few other classes)
> need its #keyboardFocusChange: to read:
>
> -------------------
> keyboardFocusChange: t1
>         (t1
>                         and: [isKeyboardFocus not])
>                 ifTrue: [lastContents := stringMorph contents].
>         (isKeyboardFocus
>                         and: [t1 not])
>                 ifTrue: [lastContents := nil.
>                         isNumeric
>                                 ifTrue: [self contents: stringMorph contents asNumberNoError printStringNoExponent].
>                         acceptWhenFocusLost
>                                 ifTrue: [self acceptEdits]].
>         isKeyboardFocus := t1.
>         isKeyboardFocus
>                 ifTrue: [selectionStart := 0.
>                         selectionEnd := stringMorph contents size].
>         "This line below"
>         isKeyboardFocus ifTrue: [ActiveHand compositionWindowManager keyboardFocusForAMorph: self].
>         self changed
> -------------------
>
> The result is that when the input method is enabled, and the user
> tries to type into a field, the preedit window shows up right there
> where you are typing in.


--
-- Yoshiki

1234567