Monthly Archives: February 2014

Installing Pharo 30 in 40 seconds

Pharo 3.0 on Mac OS X 10.9 

The out of the box experience. Installing and running Pharo 3.0 on a blank Mac OS X 10.9 account in 40 seconds.

https://www.youtube.com/watch?v=xxljgugI4c4

With 3 extra minutes to demo some networking and image manipulation interactions.
The out of the box experience. Installing and running Pharo 3.0 on a blank Mac OS X 10.9 account in 40 seconds.

https://www.youtube.com/watch?v=xxljgugI4c4

With 3 extra minutes to demo some networking and image manipulation interactions.

Pharo 3.0 on Windows 8.1 

Installing and running Pharo 3.0 on a blank Windows 8.1 machine in under 1 minute.

http://www.youtube.com/watch?v=FKokxrQtrg0

With an extra minute to demo some elementary interactions.

Pharo 3.0 on Ubuntu 13.10

The hacker experience: using ZeroConf to get Pharo 3.0 up and running in a blank Ubuntu 13.10 (32-bit) account in 1 minute flat. Doing some HTTP hacking in the next 5 minutes. Includes terminal headless execution as well.

https://www.youtube.com/watch?v=I5ogPOs3PLM
Please note that there are alternative ways to install and run Pharo [ http://www.pharo.org ].

In addition Damien Cassou developped several installers for Windows, Mac and Linux.
https://ci.inria.fr/pharo-contribution/job/PharoLauncher-Win-Package/

Tagged

Pharo Business: a dedicated mailing-list

Dear Pharoers and Smalltalkers from all over the world

We would really like to push business in our community and we believe that it is important to create a community around business questions.
We created a new mailing-list

http://lists.pharo.org/mailman/listinfo/pharo-business_lists.pharo.org

The idea is to identify 
– potential market
– missing technical solutions that we could build together
– share technical assets from a business perspective (which frameworks for what).

We hope that you will like the idea and that more business can emerge!

Commits: February – Three

30754

30755

30756

30758

30759

30761

30762

30763

30764

30765

30766

30768

30769

30770

30772

30771

30773

30774

30775

30776

30777

30769

VM Simulator is now running Pharo in Pharo

Stefan Marr is doing an important job for the VM. He worked on the virtual machine simulator.

Here is the announce of Stefan:

Now the simulator for the StackInterpreter running in a Pharo 3 image is running 🙂

Over the last years, people have been tinkering with the simulator from time to time, but I have the feeling everyone gave up before the thing was fully functioning, and not even the trivial things have found their way back into the VM code base.
I am aware that Phil was busy with it recently, but I think there was also someone else posting notes here.

Would be great if those people could send me their change sets so that I can try getting everything working again.

The simulator loads up properly, and executes the first 10,000,000 bytecodes.
Which is enough to make it notice that a primitive fails, and to pop up the error dialog.
However, it is a Pharo 1.2 image. Later images trigger some bug, I haven’t identified yet. They execute code, but don’t manage to bring up the display.

Thanks to having a unified code repository, everything I got so far (minus a few small changes) is here:
https://github.com/smarr/pharo-vm/tree/fixes/simulator-bit-rot

More to come soon.
Best regards
Stefan

RaspberryPi

After some efforts, fighting with cross-compilers (cross assemblers) Jean-Baptiste Arnaud finally fixed the PharoS bug on Raspbian and now Pharo http://www.pharo.org runs totally on Raspberry. Well done JB.

https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Cross-Compilation-FastBltBit/

photo

Here is the announce made by Jean-Baptiste

I made some advances and cleans for the RaspberryPi, compilation. I cross compile from an unix slave, that is really faster and this allows me easily to compile the fast bltbit file.

Now I integrated the fastbltbit into the StackVM (there a job associated but at term It will be merged):
https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Cross-Compilation/
https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Cross-Compilation-FastBltBit/
We have a small bug on the git tracker now but once it will solve the job will automatically follow the update.
The version downloadable should work.

We compile the StackVM now for RaspberryPi based on a Raspbian os.

In order to do that you have to:
– get your image
– prepare your RaspberryPi or your cross compile environment
– and compile

First step, the VMMaker image:
Here is the link to the source (basically the job just prepare the source and a image):
https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Cog-Git-Tracker/

You will find a preconfigured image in the image folder.
If you want to create your own and not just extend this one, you need to clone the pharo-vm git repository:
https://github.com/pharo-project/pharo-vm
all the used source code is in mc use the filetree in montecello.
Second Step Preparing the Raspberry:
I used the linux source (raspbian),
Then you can recompile using a RaspberryPi (what I do),
but you need to follow Nick instruction for install all the required dependencies on the RaspberryPi:

On the raspberry PI:
# install build tools
sudo apt-get install gcc g++ cmake

# dependencies for vm plugins
sudo apt-get install libasound2-dev libssl-dev libfreetype6-dev libgl1-mesa-dev

sudo apt-get install build-essential

# to fix:
# /usr/bin/ld: cannot find -lSM
#/usr/bin/ld: cannot find -lICE
# create the following links in: /usr/lib/arm-linux-gnueabihf/

sudo ln -s libSM.so.6 libSM.so
sudo ln -s libICE.so.6 libICE.so

Once the source is installed:

chmod +x platforms/unix/config/version
chmod +x platforms/unix/config/verstamp

Then compile:
I have done a configuration to generate VM on raspbian.
StackRaspbianConfig, you need to subclass and add your plugin + configure Cmake as you want.
“YourSubclass generate”

and recompile (cmake . & make from a terminal in build folder) on the Raspberry Pi, it should work.
My jenkins job actually take the last version of the source VM, and it is able to rebuild it on RaspPi.
You can cross-compile but I do not explore that way.

I hope that help you.

Tagged

Handling of $+ in URLs

There was an interesting discussion about handling URL in Zinc. Zinc is the fully rewritten HTTP client server of Pharo developed by Sven

Zinc has an excellent design and Sven takes really care of it because he uses it in production on the servers of http://www.beta9.be . Zinc is also an important player in the Pharo Web stack with Seaside http://www.seaside.st or other web frameworks (soon there will be a nice new comers around Amber – stay tuned).

Pharo is really grateful for his involvement and contributions. Here is the summary of the discussion:

Hi,

Johan Brichau reported an issue a couple of days ago concerning the handling of $+ in ZnUrl (Pharo 3’s URL class) and in Seaside’s WAUrl. #bleedingEdge of Zinc HTTP Components fixes the issue, as far as I can see. I want to explain the problem and the solution.

Before october 24 of last year, ZnUrl used a ‘better safe than sorry’ safe set when doing percent encoding of unsafe characters. However, the URL spec defines different allowed characters per URL part. This behaviour was then added to Zinc-Resource-Meta-Core, ZnUrl’s package.

Soon after that a discussion with Jan van de Sandt let to a first small change: since ZnUrl interprets the query part of a URL as key-value pairs, it is necessary to treat $= and $& as unsafe, even though they are not according to the URL spec (which doesn’t concern itself with how the query part is interpreted).

All that time, $+ kept on being interpreted as a space, independent of the safe set. As Johan reported, this conflicted with $+ being a safe character. Which eventually let to the functional problem of not being able to enter a + in an input field, in Seaside.

Why only in Seaside ? Because ZnZincServerAdaptor>>#requestUrlFor: was implemented by printing the interpreted incoming ZnUrl and parsing it again. There, the escaping of $+ disappeared and it became an unintended space.

This situation is now fixed by

Changes to ZnPercentEncoder:
– adding an #decodePlusAsSpace boolean option

Changes to ZnResourceMetaUtils:
– #decodePercent: no longer decodes plus as space
– #decodePercentForQuery: does plus as space decoding
– #queryKeyValueSafeSet no longer includes $+
– #parseQueryFrom: not uses #decodePercentForQuery:

Added ZnDefaultServerDelegate>>#formTest1: to test simple form submit encoding handling

Modify ZnZincServerAdaptor>>#requestUrlFor: to build a WAUrl explicitely from the interpreted parts of the incoming ZnUrl instead of going via printing and parsing

Adding new unit tests
– ZnUrlTests>>#testPlusHandling
– ZnServerTests>>#testFormTest1

I think WAUrl should best be changed as well, but that is not my call.

In code, this summarises the implemented behaviour:

ZnUrlTests>>#testPlusHandling
“While percent decoding, a + is translated as a space only in the context of
application/x-www-form-urlencoded get/post requests:
http://en.wikipedia.org/wiki/Percent-encoding#The_application.2Fx-www-form-urlencoded_type
ZnUrl interprets its query part as key value pairs where this translation is applicable,
even though strictly speaking + (and =, &) are plain unreserved characters in the query”

“$+ is not special in the path part of the URL and it remains itself”
self
assert: ‘http://localhost/foo+bar’ asZnUrl firstPathSegment
equals: ‘foo+bar’.
self
assert: ‘http://localhost/foo+bar’ asZnUrl printString
equals: ‘http://localhost/foo+bar’.
“$+ gets decoded to space in the interpreted query part of the URL,
and becomes an encoded space if needed”
self
assert: (‘http://localhost/test?q=foo+bar’ asZnUrl queryAt: #q)
equals: ‘foo bar’.
self
assert: ‘http://localhost/test?q=foo+bar’ asZnUrl printString
equals: ‘http://localhost/test?q=foo%20bar’.
“to pass $+ as $+ in a query, it has to be encoded”
self
assert: ‘http://localhost/test?q=foo%2Bbar’ asZnUrl printString
equals: ‘http://localhost/test?q=foo%2Bbar’

I hope this is a good and correct solution. In any case, it fixes the functional problem that $+ disappeared in WAUrlEncodingFunctionalTest – which I took over in ZnDefaultServerDelegate>>#formTest1:

Thanks Johan for the whole discussion !

Sven

FOSDEM 2014 Talk Videos

the videos of fosdem start to be available:

http://video.fosdem.org/2014/K4401/Saturday/

sadly something went wrong with the Pharo4 one
(the video just is the same as Macel Weiher’s). Stephane Eggermont is checking.

But here is Pharo3:
https://www.youtube.com/watch?v=son_bhZ93ec

this is not yet public, I will do that when putting it on Pharo News, sometimes
the next days.

Commits February Week One

30752
12830 MethodFinderTest>>testPower
https://pharo.fogbugz.com/f/cases/12830

11579 When adding a class variable, the monticello package is not dirty
https://pharo.fogbugz.com/f/cases/11579

12500 No accept/ok button in FileList
https://pharo.fogbugz.com/f/cases/12500

30751
12833 IconicListItem does not give visual feedback about the enablement status
https://pharo.fogbugz.com/f/cases/12833

12628 KeyNotFound in RPackage>>methods in the presence of anonymous classes
https://pharo.fogbugz.com/f/cases/12628

12739 Class definition NOT available in the “Recover Lost Changes” tool
https://pharo.fogbugz.com/f/cases/12739

30750
12255 Integrate Versionner in Pharo 3.0
https://pharo.fogbugz.com/f/cases/12255

30749
12825 SimulateMouseSpecification>>testSimulateClick
https://pharo.fogbugz.com/f/cases/12825

30748
12789 RPackage>>#moveClass:fromPackage:toTag: Ignores Tag
https://pharo.fogbugz.com/f/cases/12789

12827 Part II : Compiling a method often makes nautilus deselect the package
https://pharo.fogbugz.com/f/cases/12827

12522 Package filter input capture all keyboard shortcuts
https://pharo.fogbugz.com/f/cases/12522

12812 Class comments missing in package Spec-Tools and Spec-Tests and BlocEditor should be renamed to BlockEditor
https://pharo.fogbugz.com/f/cases/12812

30747
12822 CategoryAdded announced twice when a class is created
https://pharo.fogbugz.com/f/cases/12822

12803 SimulationGuardException is not referenced and should therefore be moved to “Deprecated” package
https://pharo.fogbugz.com/f/cases/12803

30746
12514 OCSemanticWarnings ignore “cancel” from a confirmation dialog
https://pharo.fogbugz.com/f/cases/12514

12824 Class comment missing for package ConfigurationCommandLineHandler
https://pharo.fogbugz.com/f/cases/12824

12512 SemanticAnalyzer ignores answer from UnknownSelectorWarning
https://pharo.fogbugz.com/f/cases/12512

12442 Nautilus brakes code when removing more than one unused local variables
https://pharo.fogbugz.com/f/cases/12442

12823 Class comment missing in Monticello package
https://pharo.fogbugz.com/f/cases/12823

30745
12813 Class comments missing in Gofer package
https://pharo.fogbugz.com/f/cases/12813

12816 Class comments missing in Multilingual package
https://pharo.fogbugz.com/f/cases/12816

12811 Class comments missing in KernelTests packages
https://pharo.fogbugz.com/f/cases/12811

12789 RPackage>>#moveClass:fromPackage:toTag: Ignores Tag
https://pharo.fogbugz.com/f/cases/12789

12792 remove empty package ReactiveVariable
https://pharo.fogbugz.com/f/cases/12792

30744
12808 #testObsoleteClasses: AnObsoleteEyeContextInspector
https://pharo.fogbugz.com/f/cases/12808

12817 Class comments missing for Polymorph-Widgets package
https://pharo.fogbugz.com/f/cases/12817

12814 FTPConnectionException is not in use and should be moved to Deprecated30 package or renamed
https://pharo.fogbugz.com/f/cases/12814

30743
12801 Class comments missing in AsmJIT package
https://pharo.fogbugz.com/f/cases/12801

12805 Class comments missing in ClassOrganizer package
https://pharo.fogbugz.com/f/cases/12805

12791 Failing test: #testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits
https://pharo.fogbugz.com/f/cases/12791

12795 Class comments missing for package System-FileRegistry
https://pharo.fogbugz.com/f/cases/12795

12799 Class comments missing in Help package
https://pharo.fogbugz.com/f/cases/12799

30742
12794 Class comments missing in UpdateStreamer package
https://pharo.fogbugz.com/f/cases/12794

12802 Class comments missing for Kernel package
https://pharo.fogbugz.com/f/cases/12802

12804 Class comment missing in AST packages
https://pharo.fogbugz.com/f/cases/12804

12797 Class comments missing for tools package
https://pharo.fogbugz.com/f/cases/12797

12796 Class comments missing for Traits package
https://pharo.fogbugz.com/f/cases/12796

12798 Class comments missing in GroupManager package
https://pharo.fogbugz.com/f/cases/12798

12806 Class comment missing in package FreeType + categorizing for FreeTypeCacheTest
https://pharo.fogbugz.com/f/cases/12806

12800 EyeContextInspector should be renamed to EyeMethodContextInspector
https://pharo.fogbugz.com/f/cases/12800

30741
12765 Athens font rendering missing letters and missizing others
https://pharo.fogbugz.com/f/cases/12765

30740
12778 NB generated code user initials
https://pharo.fogbugz.com/f/cases/12778

12788 Please review ProtocolClient(class)>>retrieveMIMEDocument:
https://pharo.fogbugz.com/f/cases/12788

12781 Class comment missing for package Compression
https://pharo.fogbugz.com/f/cases/12781

12787 Class comment missing in package Morphic-Examples
https://pharo.fogbugz.com/f/cases/12787

12785 Class comment missing in Smart suggestions package
https://pharo.fogbugz.com/f/cases/12785

12784 Class comment missing in File package
https://pharo.fogbugz.com/f/cases/12784

12737 Morph sends mouseUp twice to handlers
https://pharo.fogbugz.com/f/cases/12737

12782 Class comments missing in Deprecated package
https://pharo.fogbugz.com/f/cases/12782

12783 Class comments missing in Fuel package
https://pharo.fogbugz.com/f/cases/12783

30739
12772 Missing example methods in Spec
https://pharo.fogbugz.com/f/cases/12772

12309 Manifest-Core should be cleaned
https://pharo.fogbugz.com/f/cases/12309

30738
12771 KeyNotFound: key #localSelectors not found in MethodDictionary
https://pharo.fogbugz.com/f/cases/12771

12769 Add a full class definition menu in nautilus
https://pharo.fogbugz.com/f/cases/12769

30736
12727 Duplicated categories in Nautilus
https://pharo.fogbugz.com/f/cases/12727

12157 Wrong announcement of ClassModifiedClassDefinition
https://pharo.fogbugz.com/f/cases/12157

11670 strange MC package Generated-code-non-existing-package
https://pharo.fogbugz.com/f/cases/11670

30735
12469 Sometimes an empty protocol is created
https://pharo.fogbugz.com/f/cases/12469

30734
12761 Class comments missing for FileSystem package
https://pharo.fogbugz.com/f/cases/12761

11674 MNU: receiver of #> is nil
https://pharo.fogbugz.com/f/cases/11674

12762 Class comments missing in UIManager
https://pharo.fogbugz.com/f/cases/12762

12756 Class comments missing in System-* package
https://pharo.fogbugz.com/f/cases/12756

Tagged

NativeBoost by example: X11

NativeBoost is a Pharo library  supporting FFI based on assembly on the fly generation. Today one nice chapter has been announced. Here is the announce:

Hi guys

today igor helped me to understand some hidden parts of NativeBoost and we massively revisited and expanded the chapter started
by L. Laffont this summer. Now you this is up to you to expand your knowledge 🙂 It was really fun to get the X11 window resize and move 🙂

https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/NativeBoost/NativeBoost.pier.pdf
https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/NativeBoost/NativeBoost.pier.html

Enjoy.

Stef and Igor

Tagged