Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Sean P. DeNigris
Camillo Bruni-3 wrote > > it's rather easy to create an image that works with the replaced classes. > But creating a nice loadable > slice / changeset is a rather fragile and tedious task :P > Ha ha... yes, I've noticed that too :) Also, the unintended consequences when people start to use it (

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Stéphane Ducasse
Ok so join forces and propose something. On Jun 14, 2012, at 3:19 PM, Denis Kudriashov wrote: > 2012/6/14 Stéphane Ducasse > If one group of guys would take the lead we could introduce XTream in 2.0 and > slowly start to integrate and deprecate slowly the old streams. Who is > interested in

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Damien Cassou
On Thu, Jun 14, 2012 at 3:19 PM, Denis Kudriashov wrote: > I am very very want it:) I guess the question was not "who would like this?" but more "who will take the lead and make it happen?" To you or Nicolas want to take the lead and make it happen? -- Damien Cassou http://damiencassou.seaside

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Denis Kudriashov
2012/6/14 Stéphane Ducasse > If one group of guys would take the lead we could introduce XTream in 2.0 > and slowly start to integrate and deprecate slowly the old streams. Who is > interested in that? > > I am very very want it:)

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread petton . nicolas
Stéphane Ducasse writes: > If one group of guys would take the lead we could introduce XTream in > 2.0 and slowly start to integrate and deprecate slowly the old > streams. Who is interested in that? Me. Nico > > Stef > > Tx > > now there is a difference between adjustments and f

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Stéphane Ducasse
I would also really like to have a chapter based on the documentation (if any). > If one group of guys would take the lead we could introduce XTream in 2.0 and > slowly start to integrate and deprecate slowly the old streams. Who is > interested in that?

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Stéphane Ducasse
>> > > Indeed, with the new FS being almost ready in 2.0 the next big mess to > tackle are the streams. > > Personally I really liked the clean separation of the low level stream > features (bytes) and the high-level interfaces to it (converters, > characters...) > > but the question remains

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Camillo Bruni
>>> >> +100. >> I gave up on trying to mold the current Streams into something a bit more >> reasonable and still be backwards compatible quite some time ago. >> >> That other thread about Converters? >> Totally related. For example, you can't do what Sven did in the Zn >> converters without brea

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Stéphane Ducasse
If one group of guys would take the lead we could introduce XTream in 2.0 and slowly start to integrate and deprecate slowly the old streams. Who is interested in that? Stef Tx now there is a difference between adjustments and fully new API and I would have preferred adjus

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Nicolas Cellier
2012/6/14 Henrik Sperre Johansen : > On 14.06.2012 08:43, Igor Stasenko wrote: >> >> On 14 June 2012 08:33, Stéphane Ducasse  wrote: >>> >>> Tx >>> >>> now there is a difference between adjustments and fully new API and I >>> would have preferred adjustments. >>> >>> Stef >> >> IMO, Xtreams design

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Nicolas Cellier
Here is a bit less dumb evaluation of stream protocols, top 100 Stream-messages sent in Pharo2.0 but by Stream: selectors := (Stream withAllSubclasses inject: Set new into: [:allSelectors :aClass | allSelectors addAll: aClass selectors; yourself]) sorted. references := selectors collect: [:e | e

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Frank Shearar
On 13 June 2012 23:11, Frank Shearar wrote: > On 13 June 2012 20:25, Stéphane Ducasse wrote: >> I would have really prefer that Xtreams provide a compatible API. >> Because changing API means also rewrite documentation…. > > If I recall correctly, Michael & Martin said that it was impossible to >

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Henrik Sperre Johansen
On 14.06.2012 08:43, Igor Stasenko wrote: On 14 June 2012 08:33, Stéphane Ducasse wrote: Tx now there is a difference between adjustments and fully new API and I would have preferred adjustments. Stef IMO, Xtreams design is simply superior. +100. I gave up on trying to mold the current Str

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Damien Cassou
On Wed, Jun 13, 2012 at 6:09 PM, wrote: >> Now Damien, if streaming is only intended for arrays and strings, I'd >> expect the expression 'OrderedCollection new writeStream' to raise an >> error... :/ agree, that should be fixed > Indeed. Also, just for my information, why aren't we using Nil

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-14 Thread Nicolas Cellier
I would address the problem with a compatibility layer like 'foo' reading withLegacyProtocol You have many options to add a protocol - simply add the protocol at XTReadStream/XTWriteSTream roots - just create another Xtreams wrapper, - use a Trait I wish I had lightweight traits, I mean with

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Igor Stasenko
On 14 June 2012 08:33, Stéphane Ducasse wrote: > Tx > > now there is a difference between adjustments and fully new API and I would > have preferred adjustments. > > Stef IMO, Xtreams design is simply superior. But i agree, we cannot throw existing streams out.. too much things tied to them, and

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Stéphane Ducasse
Tx now there is a difference between adjustments and fully new API and I would have preferred adjustments. Stef On Jun 14, 2012, at 12:11 AM, Frank Shearar wrote: > On 13 June 2012 20:25, Stéphane Ducasse wrote: >> I would have really prefer that Xtreams provide a compatible API. >> Because

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Frank Shearar
On 13 June 2012 20:25, Stéphane Ducasse wrote: > I would have really prefer that Xtreams provide a compatible API. > Because changing API means also rewrite documentation…. If I recall correctly, Michael & Martin said that it was impossible to provide a compatible API because the ANSI Stream prot

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Denis Kudriashov
Hi I try it on Pharo1.4 - all tests green. http://www.squeaksource.com/Xtreams.html page contains gofer scripts. Without last ffi packages (for VW I thing) all are loadable and work good. 2012/6/13 Stéphane Ducasse > I would have really prefer that Xtreams provide a compatible API. > Because c

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Stéphane Ducasse
I would have really prefer that Xtreams provide a compatible API. Because changing API means also rewrite documentation…. Nicolas else did you get Xtream working well in Pharo? Because we will nearly killed all the old FileDirectory code. So stream would be good candidate to clean too. Stef > I

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Nicolas Cellier
By the way, OrderedCollection new writing write: ({1. 2. 3.} as: OrderedCollection); conclusion 2012/6/13 Nicolas Cellier : > If it's about switching to a clean library maximizing the power of > composition use Xtreams. > If it's about maximizing compatibility, use Nile. The compo

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Nicolas Cellier
If it's about switching to a clean library maximizing the power of composition use Xtreams. If it's about maximizing compatibility, use Nile. The composition in Nile is done via Traits, this is interesting but spectrum is quite narrow. Nile also introduces lazy streams and filters, but this is less

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Denis Kudriashov
And why no Xtreams? 2012/6/13 > Guillermo Polito writes: > > > Ok, just was expecting (very very deeply) not having to modify too > > much in Glorp :). Anyway, I'll see what can I do in this front. > > > > Now Damien, if streaming is only intended for arrays and strings, I'd > > expect the expr

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread petton . nicolas
Guillermo Polito writes: > Ok, just was expecting (very very deeply) not having to modify too > much in Glorp :). Anyway, I'll see what can I do in this front. > > Now Damien, if streaming is only intended for arrays and strings, I'd > expect the expression 'OrderedCollection new writeStream' to

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Guillermo Polito
Ok, just was expecting (very very deeply) not having to modify too much in Glorp :). Anyway, I'll see what can I do in this front. Now Damien, if streaming is only intended for arrays and strings, I'd expect the expression 'OrderedCollection new writeStream' to raise an error... :/ On Wed, Jun 13

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Levente Uzonyi
On Wed, 13 Jun 2012, Guillermo Polito wrote: soo, what do I do? :D Streaming into an OrderedCollection is unnecessary, because OrderedCollection is already a stream-like object. If I were implementing Smalltalk now, I would probably add the stream protocol to it (#nextPut:, #nextPutAll:, et

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Damien Cassou
On Wed, Jun 13, 2012 at 2:56 PM, Guillermo Polito wrote: > oc := OrderedCollection new. > ws := oc writeStream. streaming over an OrderedCollection is officially not supported for standard streams (see http://scg.unibe.ch/scgbib?query=Cass09a for details). You can only stream over an Array or Str

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Guillermo Polito
soo, what do I do? :D On 6/13/12, Camillo Bruni wrote: > yup I know that :D > And I provided a fix on e year ago, that got lost in a big refactoring... > - I added an explicit #streamSpecies on the Collection classes. > - By default it returns the same class > - on Set / OrderedCollection / Symbo

Re: [Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Camillo Bruni
yup I know that :D And I provided a fix on e year ago, that got lost in a big refactoring... - I added an explicit #streamSpecies on the Collection classes. - By default it returns the same class - on Set / OrderedCollection / Symbol it returns the mutable types (LinkedList as well I think) - over

[Pharo-project] WriteStream, nextPutAll:, OrderedCollections

2012-06-13 Thread Guillermo Polito
Hi guys! I'm chasing a bug that appeared in glorp under pharo 1.4. Now, the bug is due to some behavior changed in OrderedCollection I think. Look at this piece of code: oc := OrderedCollection new. ws := oc writeStream. "this explodes" ws nextPutAll: (OrderedCollection with: 1 with: 2 with: 3