[Pharo-dev] Xtreams in Pharo 3

Sven Van Caekenberghe sven at stfx.eu
Tue Nov 19 10:49:23 EST 2013


On 18 Nov 2013, at 23:12, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:

> The tests pass with this hack PEGInfinity>>adaptToInteger: anInteger andCompare: selector 
>     "This makes optimized inlining of timesRepeat: work."
>     ^#( < <= ~= ) includes: selector

I asked Marcus for the way to do it, and if you add:

PEGParser class>>#compiler
	^ super compiler
		options: #(- optionInlineTimesRepeat);
		yourself

And do a

 PEGParser recompile

All tests in Xtreams-ParsingTests should be green.

> But then they take 10 times longer than Squeak thanks to timesRepeat: inlining "optimization".
> Maybe timesRepeat: inlining should be restricted to the case when receiver is an integer literal... Or just removed.

I am not sure I understand, that is more for the compiler guys.

> 2013/11/18 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
> Ah, NotFoundError is also undeclared in Squeak, it is the VisualWorks class name.
> It could go into Xtreams-Support...
> 
> For PEG parsing test, I think you are right, this is timesRepeat:
> They passed in Squeak last time I tried.
> But these are advanced features not required for legacy Stream replacement.
> 
> 
> 2013/11/18 Esteban A. Maringolo <emaringolo at gmail.com>
> 
> One more reason to look after Pharo 3 :)
> Esteban A. Maringolo
> 
> 
> 2013/11/18 Sven Van Caekenberghe <sven at stfx.eu>:
> > Hi,
> >
> > This evening I tried to load Nicolas Cellier’s Xtreams (http://www.squeaksource.com/Xtreams/) into Pharo #30582. This went almost flawless !
> >
> > I went for
> >
> >   ConfigurationOfXtreams project bleedingEdge load.
> >
> > which loaded
> >
> >   a MetacelloFetchingMCSpecLoader(linear load :
> >         linear load : 1.3-baseline [ConfigurationOfXtreams]
> >                 load : Xtreams-Support-nice.11
> >                 load : Xtreams-Core-nice.20
> >                 load : Xtreams-Terminals-nice.31
> >                 load : Xtreams-Transforms-nice.23
> >                 load : Xtreams-Substreams-nice.19
> >                 load : Xtreams-CoreTests-nice.20
> >                 load : Xtreams-TerminalsTests-nice.17
> >                 load : Xtreams-TransformsTests-nice.14
> >                 load : Xtreams-SubstreamsTests-nice.13
> >                 load : Xtreams-Parsing-cwp.6
> >                 load : Xtreams-ParsingTests-cwp.5
> >                 load : Xtreams-TerminalsFileSystem-nice.3
> >                 load : Xtreams-TerminalsFileSystemTests-nice.2)
> >
> > There is one Undeclared in XTReadStream>>#detect: (NotFoundError should be NotFound in Pharo).
> >
> > Unit tests passed, except for the PEGParser related ones, most probably because Opal optimises #timesRepeat: which is overridden in PEGInfinity, I am not sure how this should be fixed, maybe with an Opal compiler directive somewhere ?
> >
> > Running the tests resulted in some external semaphore warnings in the Transcript.
> >
> > I also loaded Nicolas’ new #legacy layer (Xtreams-LegacyStreamAPI-nice.1), I’ll have to study that, it sure looks interesting.
> >
> > In any case: great work, thanks Nicolas !
> >
> > Sven
> >
> >
> 
> 
> 





More information about the Pharo-dev mailing list