Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 144618 messages
[Pharo-project] [Preview] Help System with new model
by Torsten Bergmann
Hi,
sorry for the delay on the help system - but time is
rare these days.
I know some of you are impatient - therefore I've commited my
restructured code for the help system for you to look what
is coming - even when it is not fully finished. But the restructured
new model is now in place - I have to add more tests and
adapt the "help on the help system" to document my ideas.
I also want to work on compatibility with Squeak as the
first version had. Currently the new stuff only work
in Pharo.
What is new
===========
While we had 3 model classes in my initial version (and after
Dannys additions even more classes) I now reduced the model
to a very, very simple approach with just one model class.
We now have a HelpBrowser that is "just" displaying topics.
A topic (see class HelpTopic) is
- providing a title and optionally an icon
- able to have subtopics,
- provides contents (that is displayed be the browser),
- can be identified by a unique key (so we can later open the
help browser on a specific topic from within other tools)
You can create help topics from each and anything.
To try it out just load the baseline (in Pharo 1.0 or 1.1):
--------------------------------------------
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfHelpSystem';
load.
((Smalltalk at: #ConfigurationOfHelpSystem) project version: '1.0-baseline') load
--------------------------------------------
You can open the help browser from the world tool menu or via
code:
HelpBrowser open
You can open the help browser on any object that is able to
be converted into a help topic (via method #asHelpTopic).
So you can write for instance:
HelpBrowser openOn: Integer
opening a short API help/system reference on the Integer class.
The above expression is the short form for:
HelpBrowser openOn: (SystemReference forClass: Integer)
If you want you can include the subclasses:
HelpBrowser openOn: (SystemReference hierarchyFor: Integer)
or even methods
HelpBrowser openOn: (SystemReference hierarchyWithMethodsFor: Integer)
You can browse the whole system reference documentation using:
HelpBrowser openOn: SystemReference
But these are only a few examples what we can extract from the
system.
However - the major goal is NOT an API browser, the idea is to
provide a simple architecture to provide browsable help contents
depending on the context. For instance it should also be possible
to use the help system to provide end user help on any commercial
application that is written with Pharo.
As I said you can convert any text data into topics to be displayed
by the help system: the browser is able to open on anything that
is convertable to a root topic using #asHelpTopic. More on this later.
When you open the help browser it provides help for the
whole system, so
HelpBrowser open
is the same as
HelpBrowser openOn: SystemHelp
which internally uses the class CustomHelp and subclasses to provide
written text and API help to form a system wide help system.
If you want you can also load "Metacello-Help" and "Squeak-Help"
from the http://www.squeaksource.com/HelpSystem repository to see
how the new topics are automatically used when they were just loaded.
Yes, I would like to see a richer text support (using markup
language) and written text documentation accessible directly
from within the image. But the first step was to get a simple
model, the next step would be to see if the extension mechanism
is good enough (CustomHelp, HelpBuilder with own builders, ...)
Some more notes on the architecture and extension ideas:
========================================================
1. the model as I said before is now reduced to a single class
(HelpTopic)
2. When you open the help browser on an object the method #asHelpTopic
is sent to the object by the browser to get the root node of
the displayed topic hierarchy:
HelpBrowser openOn: myObject
Typically the object does not convert itself to a help topic structure,
usually it dispatches to a builder (see HelpBuilder and subclasses)
who does all this.
So the help text can be already in the image even when the help
system itself is NOT YET THERE/LOADED and if you want to provide help text
in whatever form you are not dependent on the help system itself!!!
Later a builder can extract and convert the data. You can have builders
for anything - even a builder who gets informations from the web or
hard disk.
But note: if you want to have your own help shown up in the
standard help then you have to at least use the "CustomHelp" subclass
mechanism.
3. The help browser is a simple tree view and is currently limited to
ASCII text. One step in the future could be to provide a "contentType"
(similar to MIME) to support other content types (for instance active
morphs displayed in clean up book morphs, HTML help with scamper in
the help browser, ...)
4. I dont expect the basic model to change much further - maybe
Take care: all of this is still unfinished but in a usable state.
The "Help on Help" is not yet updated. The tests are not reviewed,
just brouht to green.
So you have to rely on the implementation, all the informations
in this mail or directly ask questions.
Bye
Torsten
--
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02
March 28, 2010
Re: [Pharo-project] Squeak VM+FT2Plugin, all Pharo 1.0 rc3 tests green
by laurent laffont
>
>
>
>> In debian (I don't really know ubuntu), you have apt-file to search for a
>> package's file:
>> apt-file search asoundlib.h
>>
>> And a really great command is "auto-apt run" which installs automagically
>> all needed packages for a given command. You can try:
>> auto-apt run ../unix/cmake/configure
>>
>> when it detects a missing header, it will search the corresponding package
>> and prompt you to install it.
>>
>>
>>
>
> I tried both tools but don't seem to work...I don't know why. They just do
> nothing. But anyway, I do it manually :)
>
you have to run
apt-file update
in order to populate / refresh apt file cache.
> If someone is interested, these are all the packages I needed to install in
> order not to have problems in my Ubuntu 9.10:
>
> sudo apt-get install linux-libc-dev libecasound2.2-dev libasound2-dev
> libc6-dev gnulib libc6-dev libpulse-dev libxrender-dev uuid-dev
>
Should be on Pharo website, given the popularity of Ubuntu.
> Ok.....but not only plugins. For exaple, if I don't want UTF-8 ?
>
>
errr... maybe it's time to ask to the vm-dev list :)
>
>
> ufff.....what an idiot...thanks! did you already discovered I am a newbie
> here ? :)
>
Me too, but a little less every day :)
Laurent Laffont
March 28, 2010
[Pharo-project] how to contribute test to pharo
by Hilaire Fernandes
I can't find any information in the website
Hilaire
March 28, 2010
Re: [Pharo-project] Squeak VM+FT2Plugin, all Pharo 1.0 rc3 tests green
by Mariano Martinez Peck
2010/3/28 laurent laffont <laurent.laffont(a)gmail.com>
>
> 2010/3/28 Mariano Martinez Peck <marianopeck(a)gmail.com>
>
>> Hi Laurent. I have been trying to compile the VM directly from your
>> sources, but I found some problems.
>>
>>
>> The first one was that I haven't installed cmake. Thus, I have to do a
>> sudo apt-get install cmake. After that, it could do the configure.
>>
>> Then, the second error is that when trying to configure, there are some
>> libraries or headers not found. I attach the output of the configure
>> command.
>>
>
> In debian-based distro headers are in separate packages, the ones that ends
> with -dev. (flamewar inside:) that's why I've switched to ArchLinux, far
> more simple).
>
>
Yes. I know that problem ;) With SqueakDBX I had the same problem when
installing the dev packages of the database client libraries.
> So when a header is not found, like asoundlib.h, the easy way is to go to
> http://packages.ubuntu.com/ , go down the page to "Search the contents of
> packages" and fill the search field with the name of file.
> You will see that it's libasound2-dev package.
>
>
Good link! I didn't know how to easily search it. Thanks
> In debian (I don't really know ubuntu), you have apt-file to search for a
> package's file:
> apt-file search asoundlib.h
>
> And a really great command is "auto-apt run" which installs automagically
> all needed packages for a given command. You can try:
> auto-apt run ../unix/cmake/configure
>
> when it detects a missing header, it will search the corresponding package
> and prompt you to install it.
>
>
>
I tried both tools but don't seem to work...I don't know why. They just do
nothing. But anyway, I do it manually :)
If someone is interested, these are all the packages I needed to install in
order not to have problems in my Ubuntu 9.10:
sudo apt-get install linux-libc-dev libecasound2.2-dev libasound2-dev
libc6-dev gnulib libc6-dev libpulse-dev libxrender-dev uuid-dev
>
>> In addition, is the output of the configure written somewhere like
>> config.log or similar ?
>>
>
> It seems no. You can do
> ../unix/cmake/configure > config.log
>
>
yes, thanks :)
>
>
>>
>> 2) why the "squeak" executable has "hardcoded" the parameters "-pathenc
>> UTF-8 -encoding UTF-8 -plugins /usr/local/lib/squeak/3.11.13-2135
>> -vm-sound-oss"
>> is that correct ? do I ALWAYS want all those parameters ? And if I don't
>> want them, how can I execute a "clean" squeak ?
>>
>>
> May be you can remove sound related plugin... take a look at
> ../unix/cmake/configure --help
> ...
> --without-<plugin> do not build the named plugin
> ....
>
Ok.....but not only plugins. For exaple, if I don't want UTF-8 ?
>
> You can also generate your own src using the Pharo-Core with VMMaker image
> I've made
> http://lolgzs.free.fr/pharo/squeak-vm/PharoCore-1.0-VMMaker-1.2.tar.gz
>
> VMMaker is already configured. Just remove the sound plugin from external
> plugins, adapt paths to your system and click "Entire".
>
>
Thanks. I did this several times, but in MacOS, not linux. But this step is
the same :)
>
>
>>
>> Finally, in another thread, Eliot told me how to be able to debug SqueakVM
>> with Gdb and threads. He told me to do:
>>
>> ../unix/cmake/configure CFLAGS="-g3 -pthread" LIBS=-lpthread
>>
>> but configure says:
>>
>> unknown option: CFLAGS=-g3 -pthread
>> unknown option: LIBS=-lpthread
>>
>
> you forgot the --
>
>
ufff.....what an idiot...thanks! did you already discovered I am a newbie
here ? :)
Thanks for everything.
Mariano
> ../unix/cmake/configure --CFLAGS="-g3-pthread"
>
> Laurent Laffont
>
>
>>
>> Do you know how can I do this ? should I send this email to vm mailing
>> list ?
>>
>> Thanks a lot in advance!
>>
>> Mariano
>>
>>
>>
>> On Sun, Mar 28, 2010 at 12:50 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
>>
>>> Your optimization flags are probably ignored by cmake: see this thread
>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003736.html
>>>
>>> You could also give these flags a try on x86 cpus: -O3
>>> -fomit-frame-pointer -mfpmath=sse -march=native
>>>
>>>
>>> Levente
>>>
>>>
>>> On Sun, 28 Mar 2010, laurent laffont wrote:
>>>
>>> More benchmarks.
>>>>
>>>> Updated procedure with gcc optimizations activated:
>>>> wget
>>>>
>>>> http://lolgzs.free.fr/pharo/squeak-vm/Squeak-3.11.3.2135-pharo-src.tar.gz
>>>> tar -xvzf Squeak-3.11.3.2135-pharo-src.tar.gz
>>>> cd Squeak-3.11.3.2135-pharo-src/
>>>> mkdir build && cd build
>>>> ../unix/cmake/configure --CFLAGS="-O2"
>>>> make
>>>> sudo make install
>>>>
>>>>
>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin
>>>> ==========================================
>>>> 334421946 bytecodes/sec; 8026581 sends/sec
>>>> 334640522 bytecodes/sec; 7449884 sends/sec
>>>> 334421946 bytecodes/sec; 7449884 sends/sec
>>>> 334421946 bytecodes/sec; 7675486 sends/sec
>>>> 327156549 bytecodes/sec; 7598782 sends/sec
>>>>
>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O2
>>>> ==========================================
>>>> 330109606 bytecodes/sec; 9183392 sends/sec
>>>> 331177231 bytecodes/sec; 9190792 sends/sec
>>>> 330535829 bytecodes/sec; 9198204 sends/sec
>>>> 329896907 bytecodes/sec; 9220511 sends/sec
>>>> 330963154 bytecodes/sec; 8973857 sends/sec
>>>>
>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O3
>>>> ==========================================
>>>> 296811594 bytecodes/sec; 10138464 sends/sec
>>>> 296467863 bytecodes/sec; 10129460 sends/sec
>>>> 296639629 bytecodes/sec; 10138464 sends/sec
>>>> 296124927 bytecodes/sec; 7920675 sends/sec
>>>> 296296296 bytecodes/sec; 7926179 sends/sec
>>>>
>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
>>>> ==========================================
>>>> 306586826 bytecodes/sec; 7218843 sends/sec
>>>> 308248043 bytecodes/sec; 7209717 sends/sec
>>>> 308805790 bytecodes/sec; 7223415 sends/sec
>>>> 309552599 bytecodes/sec; 7218843 sends/sec
>>>> 309927360 bytecodes/sec; 7269453 sends/sec
>>>>
>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification + CFLAGS=-O2
>>>> ==========================================
>>>> 293073840 bytecodes/sec; 8807546 sends/sec
>>>> 292070735 bytecodes/sec; 8841684 sends/sec
>>>> 281628162 bytecodes/sec; 8896858 sends/sec
>>>> 294422081 bytecodes/sec; 8903804 sends/sec
>>>>
>>>> Laurent Laffont
>>>>
>>>>
>>>> 2010/3/28 Mariano Martinez Peck <marianopeck(a)gmail.com>
>>>>
>>>>
>>>>>
>>>>> 2010/3/27 laurent laffont <laurent.laffont(a)gmail.com>
>>>>>
>>>>> OK, I've tried the Smalltalk one...
>>>>>
>>>>>>
>>>>>> With rev 2151 gnuification (awk) is done as I have gnu-interp.c
>>>>>> and gnu-interp.c.log in my build directory.
>>>>>>
>>>>>> Benchmark gives me:
>>>>>>
>>>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
>>>>>> ==========================================
>>>>>> 312385600 bytecodes/sec; 7320778 sends/sec
>>>>>> 310868245 bytecodes/sec; 8271046 sends/sec
>>>>>> 310679611 bytecodes/sec; 8271046 sends/sec
>>>>>> 310868245 bytecodes/sec; 7232576 sends/sec
>>>>>> 310491206 bytecodes/sec; 8271046 sends/sec
>>>>>>
>>>>>> compared to
>>>>>>
>>>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin
>>>>>> ==========================================
>>>>>> 334421946 bytecodes/sec; 8026581 sends/sec
>>>>>> 334640522 bytecodes/sec; 7449884 sends/sec
>>>>>> 334421946 bytecodes/sec; 7449884 sends/sec
>>>>>> 334421946 bytecodes/sec; 7675486 sends/sec
>>>>>> 327156549 bytecodes/sec; 7598782 sends/sec
>>>>>>
>>>>>> so it seems that on my machine rev 2135 without gnuification is a
>>>>>> little
>>>>>> better. I have GCC 4.4.3, Linux 32bits.
>>>>>>
>>>>>>
>>>>>> I don't understand....it is slower with the gnuification ?
>>>>>
>>>>> weird....
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Laurent Laffont
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sat, Mar 27, 2010 at 8:55 PM, Levente Uzonyi <leves(a)elte.hu>
>>>>>> wrote:
>>>>>>
>>>>>> On Sat, 27 Mar 2010, laurent laffont wrote:
>>>>>>>
>>>>>>> I've tried gnuification on rev 2151. cmake/configure OK. But while
>>>>>>>
>>>>>>>> building:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> /home/lol/sandbox/squeakvm/Squeak-3.11.3.2151-pharo-src/build/gnu-interp.c:25104:2:
>>>>>>>> erreur: #error GNUIFICATION FAILED ( 0 )
>>>>>>>>
>>>>>>>>
>>>>>>> Which gnuification method did you try?
>>>>>>> There are two different versions. The origial version is an awk
>>>>>>> script
>>>>>>> which is run when you're building the vm with make. This is executed
>>>>>>> by
>>>>>>> default if you have awk installed.
>>>>>>> There's another version written in smalltalk (linked by Mariano into
>>>>>>> this
>>>>>>> thread) which is not used by VMMAker at the moment, you probably
>>>>>>> don't need
>>>>>>> that. If you applied the latter one, you have to make sure that the
>>>>>>> first
>>>>>>> one is not executed. You can't gnuifying the sources twice.
>>>>>>> Since both do the same, the best you can do now is to ignore the
>>>>>>> smalltalk version. If VMMaker will adopt Gnuifier.st we can remove
>>>>>>> the awk
>>>>>>> dependency from the build process, until then you shouldn't apply it
>>>>>>> if your
>>>>>>> platform has awk installed.
>>>>>>>
>>>>>>>
>>>>>>> Levente
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Laurent Laffont
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, Mar 27, 2010 at 6:47 PM, laurent laffont
>>>>>>>> <laurent.laffont(a)gmail.com>wrote:
>>>>>>>>
>>>>>>>> Does it mean latest SVN source is already "Gnuified" ? With latest
>>>>>>>>
>>>>>>>>> rev.
>>>>>>>>>> I
>>>>>>>>>>
>>>>>>>>>> have a little drop in benchmarks. However I'd rather put a stable
>>>>>>>>>>>
>>>>>>>>>>> release
>>>>>>>>>>
>>>>>>>>>> for Pharo 1.0 than latest trunk. What do you think ?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> The so-called "gnuification" is a transformation of the interp.c
>>>>>>>>>> file.
>>>>>>>>>> So
>>>>>>>>>> this is done after generating the sources with VMMaker. The cmake
>>>>>>>>>> configuration that comes with revision 2135 does not have this
>>>>>>>>>> step
>>>>>>>>>> enabled,
>>>>>>>>>> and the more recent version that I used, revision 2151, has it.
>>>>>>>>>> The
>>>>>>>>>> magic is
>>>>>>>>>> in the awk script in unix/cmake/gnuify.awk which produes
>>>>>>>>>> gnu-interp.c.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> OK thanks. I will take a look.
>>>>>>>>>
>>>>>>>>> Laurent Laffont
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>>> Adrian
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Laurent Laffont
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Adrian
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>>>
>>>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>
>>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>>
>>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>
>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>> Pharo-project mailing list
>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>>
>>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
March 28, 2010
Re: [Pharo-project] Squeak VM+FT2Plugin, all Pharo 1.0 rc3 tests green
by Stéphane Ducasse
thanks!
Indeed may be this is time to start a git for the VMs source code :)
Stef
On Mar 28, 2010, at 9:41 PM, laurent laffont wrote:
> I've updated the source archive with Levente's patch which fixes multiple CFLAGS options.
>
> http://lolgzs.free.fr/pharo/squeak-vm/Squeak-3.11.3.2135-pharo-src.tar.gz
>
> Laurent Laffont
>
>
> On Sun, Mar 28, 2010 at 7:42 PM, laurent laffont <laurent.laffont(a)gmail.com> wrote:
> Thank you !
>
> Here the result:
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin + --CFLAGS="-O3 -fomit-frame-pointer -mfpmath=sse -march=native -s -mtune=generic"
> ==========================================
> 339072847 bytecodes/sec; 9560580 sends/sec
> 338848444 bytecodes/sec; 9552573 sends/sec
> 338177014 bytecodes/sec; 9473233 sends/sec
> 337953795 bytecodes/sec; 9496896 sends/sec
> 338848444 bytecodes/sec; 9496896 sends/sec
>
> so the best performance I have so far.
>
> Laurent Laffont
>
>
>
> On Sun, Mar 28, 2010 at 6:10 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
> On Sun, 28 Mar 2010, laurent laffont wrote:
>
> Thanks for the link. When I clean my build directory and run configure with
> only one option (CFLAGS="-02") then it's OK.
>
> With several CFLAGS options it's strange, and now I understand why
> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003740.html
>
> There's a full fix here: http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003742.html
>
>
>
> I'm starting to think that git can be better for squeak-vm than svn, so we
> can propose branches with patches included....
>
>
> Probably yes.
>
>
> Levente
>
>
> Thanks
>
> Laurent Laffont
>
>
> On Sun, Mar 28, 2010 at 5:50 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
>
> Your optimization flags are probably ignored by cmake: see this thread
> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003736.html
>
> You could also give these flags a try on x86 cpus: -O3 -fomit-frame-pointer
> -mfpmath=sse -march=native
>
>
> Levente
>
>
> On Sun, 28 Mar 2010, laurent laffont wrote:
>
> More benchmarks.
>
> Updated procedure with gcc optimizations activated:
> wget
> http://lolgzs.free.fr/pharo/squeak-vm/Squeak-3.11.3.2135-pharo-src.tar.gz
> tar -xvzf Squeak-3.11.3.2135-pharo-src.tar.gz
> cd Squeak-3.11.3.2135-pharo-src/
> mkdir build && cd build
> ../unix/cmake/configure --CFLAGS="-O2"
> make
> sudo make install
>
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin
> ==========================================
> 334421946 bytecodes/sec; 8026581 sends/sec
> 334640522 bytecodes/sec; 7449884 sends/sec
> 334421946 bytecodes/sec; 7449884 sends/sec
> 334421946 bytecodes/sec; 7675486 sends/sec
> 327156549 bytecodes/sec; 7598782 sends/sec
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O2
> ==========================================
> 330109606 bytecodes/sec; 9183392 sends/sec
> 331177231 bytecodes/sec; 9190792 sends/sec
> 330535829 bytecodes/sec; 9198204 sends/sec
> 329896907 bytecodes/sec; 9220511 sends/sec
> 330963154 bytecodes/sec; 8973857 sends/sec
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O3
> ==========================================
> 296811594 bytecodes/sec; 10138464 sends/sec
> 296467863 bytecodes/sec; 10129460 sends/sec
> 296639629 bytecodes/sec; 10138464 sends/sec
> 296124927 bytecodes/sec; 7920675 sends/sec
> 296296296 bytecodes/sec; 7926179 sends/sec
>
> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
> ==========================================
> 306586826 bytecodes/sec; 7218843 sends/sec
> 308248043 bytecodes/sec; 7209717 sends/sec
> 308805790 bytecodes/sec; 7223415 sends/sec
> 309552599 bytecodes/sec; 7218843 sends/sec
> 309927360 bytecodes/sec; 7269453 sends/sec
>
> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification + CFLAGS=-O2
> ==========================================
> 293073840 bytecodes/sec; 8807546 sends/sec
> 292070735 bytecodes/sec; 8841684 sends/sec
> 281628162 bytecodes/sec; 8896858 sends/sec
> 294422081 bytecodes/sec; 8903804 sends/sec
>
> Laurent Laffont
>
>
> 2010/3/28 Mariano Martinez Peck <marianopeck(a)gmail.com>
>
>
>
> 2010/3/27 laurent laffont <laurent.laffont(a)gmail.com>
>
> OK, I've tried the Smalltalk one...
>
>
> With rev 2151 gnuification (awk) is done as I have gnu-interp.c
> and gnu-interp.c.log in my build directory.
>
> Benchmark gives me:
>
> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
> ==========================================
> 312385600 bytecodes/sec; 7320778 sends/sec
> 310868245 bytecodes/sec; 8271046 sends/sec
> 310679611 bytecodes/sec; 8271046 sends/sec
> 310868245 bytecodes/sec; 7232576 sends/sec
> 310491206 bytecodes/sec; 8271046 sends/sec
>
> compared to
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin
> ==========================================
> 334421946 bytecodes/sec; 8026581 sends/sec
> 334640522 bytecodes/sec; 7449884 sends/sec
> 334421946 bytecodes/sec; 7449884 sends/sec
> 334421946 bytecodes/sec; 7675486 sends/sec
> 327156549 bytecodes/sec; 7598782 sends/sec
>
> so it seems that on my machine rev 2135 without gnuification is a little
> better. I have GCC 4.4.3, Linux 32bits.
>
>
> I don't understand....it is slower with the gnuification ?
>
> weird....
>
>
>
>
> Laurent Laffont
>
>
>
> On Sat, Mar 27, 2010 at 8:55 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
>
> On Sat, 27 Mar 2010, laurent laffont wrote:
>
> I've tried gnuification on rev 2151. cmake/configure OK. But while
>
> building:
>
>
>
> /home/lol/sandbox/squeakvm/Squeak-3.11.3.2151-pharo-src/build/gnu-interp.c:25104:2:
> erreur: #error GNUIFICATION FAILED ( 0 )
>
>
> Which gnuification method did you try?
> There are two different versions. The origial version is an awk script
> which is run when you're building the vm with make. This is executed by
> default if you have awk installed.
> There's another version written in smalltalk (linked by Mariano into
> this
> thread) which is not used by VMMAker at the moment, you probably don't
> need
> that. If you applied the latter one, you have to make sure that the
> first
> one is not executed. You can't gnuifying the sources twice.
> Since both do the same, the best you can do now is to ignore the
> smalltalk version. If VMMaker will adopt Gnuifier.st we can remove the
> awk
> dependency from the build process, until then you shouldn't apply it if
> your
> platform has awk installed.
>
>
> Levente
>
>
>
>
> Laurent Laffont
>
>
> On Sat, Mar 27, 2010 at 6:47 PM, laurent laffont
> <laurent.laffont(a)gmail.com>wrote:
>
> Does it mean latest SVN source is already "Gnuified" ? With latest
>
> rev.
> I
>
> have a little drop in benchmarks. However I'd rather put a stable
>
> release
>
> for Pharo 1.0 than latest trunk. What do you think ?
>
>
> The so-called "gnuification" is a transformation of the interp.c
> file.
> So
> this is done after generating the sources with VMMaker. The cmake
> configuration that comes with revision 2135 does not have this step
> enabled,
> and the more recent version that I used, revision 2151, has it. The
> magic is
> in the awk script in unix/cmake/gnuify.awk which produes
> gnu-interp.c.
>
>
> OK thanks. I will take a look.
>
> Laurent Laffont
>
>
>
>
> Cheers,
> Adrian
>
>
> Laurent Laffont
>
>
>
> Adrian
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
>
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
>
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
March 28, 2010
Re: [Pharo-project] Squeak VM+FT2Plugin, all Pharo 1.0 rc3 tests green
by laurent laffont
I've updated the source archive with Levente's patch which fixes multiple
CFLAGS options.
http://lolgzs.free.fr/pharo/squeak-vm/Squeak-3.11.3.2135-pharo-src.tar.gz
Laurent Laffont
On Sun, Mar 28, 2010 at 7:42 PM, laurent laffont
<laurent.laffont(a)gmail.com>wrote:
> Thank you !
>
> Here the result:
>
> Squeak VM 3.11.3 -r 2135 + FT2Plugin + --CFLAGS="-O3 -fomit-frame-pointer
> -mfpmath=sse -march=native -s -mtune=generic"
> ==========================================
> 339072847 bytecodes/sec; 9560580 sends/sec
> 338848444 bytecodes/sec; 9552573 sends/sec
> 338177014 bytecodes/sec; 9473233 sends/sec
> 337953795 bytecodes/sec; 9496896 sends/sec
> 338848444 bytecodes/sec; 9496896 sends/sec
>
> so the best performance I have so far.
>
> Laurent Laffont
>
>
>
> On Sun, Mar 28, 2010 at 6:10 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
>
>> On Sun, 28 Mar 2010, laurent laffont wrote:
>>
>> Thanks for the link. When I clean my build directory and run configure
>>> with
>>> only one option (CFLAGS="-02") then it's OK.
>>>
>>> With several CFLAGS options it's strange, and now I understand why
>>>
>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003740.html
>>>
>>
>> There's a full fix here:
>> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003742.html
>>
>>
>>
>>> I'm starting to think that git can be better for squeak-vm than svn, so
>>> we
>>> can propose branches with patches included....
>>>
>>>
>> Probably yes.
>>
>>
>> Levente
>>
>>
>> Thanks
>>>
>>> Laurent Laffont
>>>
>>>
>>> On Sun, Mar 28, 2010 at 5:50 PM, Levente Uzonyi <leves(a)elte.hu> wrote:
>>>
>>> Your optimization flags are probably ignored by cmake: see this thread
>>>>
>>>> http://lists.squeakfoundation.org/pipermail/vm-dev/2010-January/003736.html
>>>>
>>>> You could also give these flags a try on x86 cpus: -O3
>>>> -fomit-frame-pointer
>>>> -mfpmath=sse -march=native
>>>>
>>>>
>>>> Levente
>>>>
>>>>
>>>> On Sun, 28 Mar 2010, laurent laffont wrote:
>>>>
>>>> More benchmarks.
>>>>
>>>>>
>>>>> Updated procedure with gcc optimizations activated:
>>>>> wget
>>>>>
>>>>> http://lolgzs.free.fr/pharo/squeak-vm/Squeak-3.11.3.2135-pharo-src.tar.gz
>>>>> tar -xvzf Squeak-3.11.3.2135-pharo-src.tar.gz
>>>>> cd Squeak-3.11.3.2135-pharo-src/
>>>>> mkdir build && cd build
>>>>> ../unix/cmake/configure --CFLAGS="-O2"
>>>>> make
>>>>> sudo make install
>>>>>
>>>>>
>>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin
>>>>> ==========================================
>>>>> 334421946 bytecodes/sec; 8026581 sends/sec
>>>>> 334640522 bytecodes/sec; 7449884 sends/sec
>>>>> 334421946 bytecodes/sec; 7449884 sends/sec
>>>>> 334421946 bytecodes/sec; 7675486 sends/sec
>>>>> 327156549 bytecodes/sec; 7598782 sends/sec
>>>>>
>>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O2
>>>>> ==========================================
>>>>> 330109606 bytecodes/sec; 9183392 sends/sec
>>>>> 331177231 bytecodes/sec; 9190792 sends/sec
>>>>> 330535829 bytecodes/sec; 9198204 sends/sec
>>>>> 329896907 bytecodes/sec; 9220511 sends/sec
>>>>> 330963154 bytecodes/sec; 8973857 sends/sec
>>>>>
>>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin + CFLAGS=-O3
>>>>> ==========================================
>>>>> 296811594 bytecodes/sec; 10138464 sends/sec
>>>>> 296467863 bytecodes/sec; 10129460 sends/sec
>>>>> 296639629 bytecodes/sec; 10138464 sends/sec
>>>>> 296124927 bytecodes/sec; 7920675 sends/sec
>>>>> 296296296 bytecodes/sec; 7926179 sends/sec
>>>>>
>>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
>>>>> ==========================================
>>>>> 306586826 bytecodes/sec; 7218843 sends/sec
>>>>> 308248043 bytecodes/sec; 7209717 sends/sec
>>>>> 308805790 bytecodes/sec; 7223415 sends/sec
>>>>> 309552599 bytecodes/sec; 7218843 sends/sec
>>>>> 309927360 bytecodes/sec; 7269453 sends/sec
>>>>>
>>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification + CFLAGS=-O2
>>>>> ==========================================
>>>>> 293073840 bytecodes/sec; 8807546 sends/sec
>>>>> 292070735 bytecodes/sec; 8841684 sends/sec
>>>>> 281628162 bytecodes/sec; 8896858 sends/sec
>>>>> 294422081 bytecodes/sec; 8903804 sends/sec
>>>>>
>>>>> Laurent Laffont
>>>>>
>>>>>
>>>>> 2010/3/28 Mariano Martinez Peck <marianopeck(a)gmail.com>
>>>>>
>>>>>
>>>>>
>>>>>> 2010/3/27 laurent laffont <laurent.laffont(a)gmail.com>
>>>>>>
>>>>>> OK, I've tried the Smalltalk one...
>>>>>>
>>>>>>
>>>>>>> With rev 2151 gnuification (awk) is done as I have gnu-interp.c
>>>>>>> and gnu-interp.c.log in my build directory.
>>>>>>>
>>>>>>> Benchmark gives me:
>>>>>>>
>>>>>>> Squeak VM 3.11.3 -r 2151 + FT2Plugin + Gnuification
>>>>>>> ==========================================
>>>>>>> 312385600 bytecodes/sec; 7320778 sends/sec
>>>>>>> 310868245 bytecodes/sec; 8271046 sends/sec
>>>>>>> 310679611 bytecodes/sec; 8271046 sends/sec
>>>>>>> 310868245 bytecodes/sec; 7232576 sends/sec
>>>>>>> 310491206 bytecodes/sec; 8271046 sends/sec
>>>>>>>
>>>>>>> compared to
>>>>>>>
>>>>>>> Squeak VM 3.11.3 -r 2135 + FT2Plugin
>>>>>>> ==========================================
>>>>>>> 334421946 bytecodes/sec; 8026581 sends/sec
>>>>>>> 334640522 bytecodes/sec; 7449884 sends/sec
>>>>>>> 334421946 bytecodes/sec; 7449884 sends/sec
>>>>>>> 334421946 bytecodes/sec; 7675486 sends/sec
>>>>>>> 327156549 bytecodes/sec; 7598782 sends/sec
>>>>>>>
>>>>>>> so it seems that on my machine rev 2135 without gnuification is a
>>>>>>> little
>>>>>>> better. I have GCC 4.4.3, Linux 32bits.
>>>>>>>
>>>>>>>
>>>>>>> I don't understand....it is slower with the gnuification ?
>>>>>>>
>>>>>>
>>>>>> weird....
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Laurent Laffont
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sat, Mar 27, 2010 at 8:55 PM, Levente Uzonyi <leves(a)elte.hu>
>>>>>>> wrote:
>>>>>>>
>>>>>>> On Sat, 27 Mar 2010, laurent laffont wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> I've tried gnuification on rev 2151. cmake/configure OK. But while
>>>>>>>>
>>>>>>>> building:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /home/lol/sandbox/squeakvm/Squeak-3.11.3.2151-pharo-src/build/gnu-interp.c:25104:2:
>>>>>>>>> erreur: #error GNUIFICATION FAILED ( 0 )
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Which gnuification method did you try?
>>>>>>>> There are two different versions. The origial version is an awk
>>>>>>>> script
>>>>>>>> which is run when you're building the vm with make. This is executed
>>>>>>>> by
>>>>>>>> default if you have awk installed.
>>>>>>>> There's another version written in smalltalk (linked by Mariano into
>>>>>>>> this
>>>>>>>> thread) which is not used by VMMAker at the moment, you probably
>>>>>>>> don't
>>>>>>>> need
>>>>>>>> that. If you applied the latter one, you have to make sure that the
>>>>>>>> first
>>>>>>>> one is not executed. You can't gnuifying the sources twice.
>>>>>>>> Since both do the same, the best you can do now is to ignore the
>>>>>>>> smalltalk version. If VMMaker will adopt Gnuifier.st we can remove
>>>>>>>> the
>>>>>>>> awk
>>>>>>>> dependency from the build process, until then you shouldn't apply it
>>>>>>>> if
>>>>>>>> your
>>>>>>>> platform has awk installed.
>>>>>>>>
>>>>>>>>
>>>>>>>> Levente
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Laurent Laffont
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sat, Mar 27, 2010 at 6:47 PM, laurent laffont
>>>>>>>>> <laurent.laffont(a)gmail.com>wrote:
>>>>>>>>>
>>>>>>>>> Does it mean latest SVN source is already "Gnuified" ? With
>>>>>>>>> latest
>>>>>>>>>
>>>>>>>>> rev.
>>>>>>>>>>
>>>>>>>>>>> I
>>>>>>>>>>>
>>>>>>>>>>> have a little drop in benchmarks. However I'd rather put a
>>>>>>>>>>> stable
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> release
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> for Pharo 1.0 than latest trunk. What do you think ?
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> The so-called "gnuification" is a transformation of the
>>>>>>>>>>> interp.c
>>>>>>>>>>> file.
>>>>>>>>>>> So
>>>>>>>>>>> this is done after generating the sources with VMMaker. The cmake
>>>>>>>>>>> configuration that comes with revision 2135 does not have this
>>>>>>>>>>> step
>>>>>>>>>>> enabled,
>>>>>>>>>>> and the more recent version that I used, revision 2151, has it.
>>>>>>>>>>> The
>>>>>>>>>>> magic is
>>>>>>>>>>> in the awk script in unix/cmake/gnuify.awk which produes
>>>>>>>>>>> gnu-interp.c.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> OK thanks. I will take a look.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Laurent Laffont
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Cheers,
>>>>>>>>>>
>>>>>>>>>>> Adrian
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Laurent Laffont
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Adrian
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>>>
>>>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Pharo-project mailing list
>>>>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>>>>>
>>>>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>
>>>>>>>> Pharo-project mailing list
>>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Pharo-project mailing list
>>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> Pharo-project(a)lists.gforge.inria.fr
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
March 28, 2010
Re: [Pharo-project] Error parsing XML File
by Stéphane Ducasse
tx!
On Mar 28, 2010, at 9:24 PM, jaayer wrote:
> ---- On Sun, 28 Mar 2010 11:47:43 -0700 Hernán Morales Durand <hernan.morales(a)gmail.com> wrote ----
>
>> Hi Alex,
>> Try with the attached XML file in your Pharo directory
>>
>> XMLDOMParser
>> parseDocumentFromFileNamed:
>> (FileDirectory default fullNameFor: 'likelySubtags.xml')
>>
>> however, it seems to be fixed in XML-Parser-JAAyer.72
>> Cheers,
>
> The problem was due to XMLStreamReader>>nextMatchAll: relying on #position: and #position and MultiByteFileStream understanding stream position in terms of bytes rather than characters. That's why it worked when Alexandre tried parsing a string containing multi-byte UTF-8 characters--the position of a ReadStream on a string corresponds to the position of characters in the string regardless of their width--but failed when Fabrizio tried to parse a file containing those same characters. It is fixed now and a little faster, too.
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
March 28, 2010
Re: [Pharo-project] Error parsing XML File
by jaayer
---- On Sun, 28 Mar 2010 11:47:43 -0700 Hernán Morales Durand <hernan.morales(a)gmail.com> wrote ----
>Hi Alex,
> Try with the attached XML file in your Pharo directory
>
>XMLDOMParser
>Â Â Â Â parseDocumentFromFileNamed:
>Â Â Â Â Â Â Â Â (FileDirectory default fullNameFor: 'likelySubtags.xml')
>
>however, it seems to be fixed in XML-Parser-JAAyer.72
>Cheers,
The problem was due to XMLStreamReader>>nextMatchAll: relying on #position: and #position and MultiByteFileStream understanding stream position in terms of bytes rather than characters. That's why it worked when Alexandre tried parsing a string containing multi-byte UTF-8 characters--the position of a ReadStream on a string corresponds to the position of characters in the string regardless of their width--but failed when Fabrizio tried to parse a file containing those same characters. It is fixed now and a little faster, too.
March 28, 2010
Re: [Pharo-project] A little quizzzzzzz : find the problem :)
by Stéphane Ducasse
http://code.google.com/p/pharo/issues/detail?id=2228
of course!
Stef
On Mar 28, 2010, at 9:18 PM, Stéphane Ducasse wrote:
> fileStream
> "Answer the file stream with position set at the beginning of my string.
> Answer a read only copy to avoid syntax errors when accessed via
> multiple processes."
>
> | theFile |
> (sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].
> theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
> theFile position: filePositionHi.
> ^ theFile
>
> string
> "Answer the receiver's string if remote files are enabled.
> Use a read only copy to avoid syntax errors when accessed via
> multiple processes."
>
> | theFile |
> (sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^''].
> theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
> ^[theFile position: filePositionHi.
> theFile nextChunk] ensure: [theFile close]
>
>
> text
> "Answer the receiver's string asText if remote files are enabled.
> Use a read only copy to avoid syntax errors when accessed via
> multiple processes."
>
> | theFile |
> (sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].
> theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
> ^[theFile position: filePositionHi.
> theFile position > theFile size ifTrue: [
> self error: 'RemoteString past end of file' ].
> theFile nextChunkText] ensure: [theFile close]
>
> I imagine a good soul could fix that and nicely published in the inbox :)
>
> Stef Did I say something negative about the past :)
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
March 28, 2010
[Pharo-project] A little quizzzzzzz : find the problem :)
by Stéphane Ducasse
fileStream
"Answer the file stream with position set at the beginning of my string.
Answer a read only copy to avoid syntax errors when accessed via
multiple processes."
| theFile |
(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].
theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
theFile position: filePositionHi.
^ theFile
string
"Answer the receiver's string if remote files are enabled.
Use a read only copy to avoid syntax errors when accessed via
multiple processes."
| theFile |
(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^''].
theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
^[theFile position: filePositionHi.
theFile nextChunk] ensure: [theFile close]
text
"Answer the receiver's string asText if remote files are enabled.
Use a read only copy to avoid syntax errors when accessed via
multiple processes."
| theFile |
(sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].
theFile := (SourceFiles at: sourceFileNumber) readOnlyCopy.
^[theFile position: filePositionHi.
theFile position > theFile size ifTrue: [
self error: 'RemoteString past end of file' ].
theFile nextChunkText] ensure: [theFile close]
I imagine a good soul could fix that and nicely published in the inbox :)
Stef Did I say something negative about the past :)
March 28, 2010