Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Richard O'Keefe
Handlingas: Dictionary is really quite straightforward. Add a one-line method to Bag: Bag>> associationsDo: aBlock contents associationsDo: aBlock. This is a good idea anyway, because currently there is a bug where aBag associationsDo: aBlock fails to pass Associations to aBlock. Once

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Richard O'Keefe
To me, a bag is first and foremost a multiset. Yes, it's a collection, but it's not *just* a collection. It's a very specific kind of collection with a very salient "characteristic function". In my own Smalltalk library, #asDictionary isn't even *defined* on things that are not dictionaries or

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread Ben Coman
On Thu, 7 Mar 2019 at 02:16, Esteban Maringolo wrote: > I couldn't find a "simple enough" solution to deal with that, so I > moved to emulated Linux [1]. > > I don't know if the long file path is a limitation of Windows itself or > libgit2. > Its a combination, but for our purposes the

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread Dale Henrichs
On 3/6/19 8:18 AM, Sean P. DeNigris wrote: Tim Mackinnon wrote how is this shared repository supposed to work? While I initially liked the space efficiency of the shared approach, I eventually gave up because it created too many (often obscure) problems. It just doesn't seem to be a good

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Richard Sargent
On Wed, Mar 6, 2019 at 10:25 AM Tim Mackinnon wrote: > I still am tempted to make asDictionary work - because the the moment you > get a #key , DNU error - which is definitely not right. > This argument gives me the willies. Sorry. I can see an argument that a sequenceable collection can

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Sven Van Caekenberghe
I am still not convinced. > On 6 Mar 2019, at 19:24, Tim Mackinnon wrote: > > I still am tempted to make asDictionary work - because the the moment you get > a #key , DNU error - which is definitely not right. The error might not be super clear, but it is not wrong, the elements of your

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Tim Mackinnon
I still am tempted to make asDictionary work - because the the moment you get a #key , DNU error - which is definitely not right. So should Bag asDictionary give you a reasonable dictionary, or should it throw a proper exception - something like: DomainError signal: ‘#asDictionary not

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread Esteban Maringolo
I couldn't find a "simple enough" solution to deal with that, so I moved to emulated Linux [1]. I don't know if the long file path is a limitation of Windows itself or libgit2. Because if it's the former, then I'll try this setting in Windows 10 and let you know if it works:

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread p...@highoctane.be
And then the Pharo launcher folder suddenly appears as a 20GB folder... Same league as a Maven .m2, albeit with a messier structure, full of copies all over the place. Is Cargo going to help us there? Phil On Wed, Mar 6, 2019 at 5:18 PM Sean P. DeNigris wrote: > Tim Mackinnon wrote > > how

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread p...@highoctane.be
And when asking the object: #(1 2 4 5 6 7 2 1 4 3) asBag isDictionary we get false. So, not, not a dictionary. I still have been using #valuesAndCounts to get the dictionary out of a bag on several occasions. And is useful indeed. #(1 2 4 5 6 7 2 1 4 3) asBag occurrencesOf: 2 and #(1 2 4 5

Re: [Pharo-users] IMAP in Pharo

2019-03-06 Thread Tim Mackinnon
> On 6 Mar 2019, at 16:08, Sean P. DeNigris wrote: > > cedreek wrote >> Still havent get my head around this FORK/PR cycle but I will for sure one >> day :) > > It took me quite a while to grok. Fork = 'personal remote clone' and: [ PR = > 'UI support for discussing, testing, and accepting

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread Sean P. DeNigris
Tim Mackinnon wrote > how is this shared repository supposed to work? While I initially liked the space efficiency of the shared approach, I eventually gave up because it created too many (often obscure) problems. It just doesn't seem to be a good match for git, although you can get away with it

Re: [Pharo-users] Serializing classes with Fuel

2019-03-06 Thread Konrad Hinsen
Hi Mariano, > Yes, that's the "default" behavior. To fully serialize classes you need > FuelMetalevel packages. This brings a new visitors and mappers to allow you > to fully serialize methods, classes, contexts, etc. Thanks for the pointer - I will explore FuelMetalevel. Konrad.

Re: [Pharo-users] IMAP in Pharo

2019-03-06 Thread Sean P. DeNigris
cedreek wrote > Still havent get my head around this FORK/PR cycle but I will for sure one > day :) It took me quite a while to grok. Fork = 'personal remote clone' and: [ PR = 'UI support for discussing, testing, and accepting commits' ] - Cheers, Sean -- Sent from:

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Sven Van Caekenberghe
I was just explaining how it is now, what I think the rationale is behind it. I understand #asDictionary as working on a collection of pairs/associations (because it basically goes to #withAll:). A bag is just a collection that is optimised for many duplicates, the fact that you have values

Re: [Pharo-users] How exactly is "share repositories between images" supposed to work without tripping each other up?

2019-03-06 Thread Tim Mackinnon
While, I’m still interested in how share repositories works (and debunk some of my myths about it ) - digging into this users issue (isn’t Fuel wonderful) - it would seem that this image wasn’t created with share repositories on. It looking down a very complicated stack (Metacello is very

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Tim Mackinnon
As Richard said - as a bag is relationship between keys and frequencies, I would expect it to be able to convert to a dictionary. It displays in an inspector just like a Dictionary - which is why I figured I could convert to pass it back to the exercise that was written with Dictionaries in

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Richard O'Keefe
Doubtless the original poster expected aBag asDictionary to answer a dictionary mapping the (distinct) elements of the bag to their counts. Mathematically, a bag can usefully be seen as a partial function from a set U to the positive integers, and a dictionary with U keys and positive integer

Re: [Pharo-users] Noob Question - slicing

2019-03-06 Thread K K Subbu
On Wed, 6 Mar 2019 at 12:00, Craig Johnson > wrote: What is the simplest way to copy characters between positions 4 and 8 from a string in Pharo? '1234567890' copyFrom: 5 to: 8 "5678" Page 207 in Updated Pharo by Example book explains more on

Re: [Pharo-users] Symbol equality method #= - weird condition in the Pharo sourcecode

2019-03-06 Thread Sven Van Caekenberghe
> On 6 Mar 2019, at 15:15, Richard O'Keefe wrote: > > Surely a Symbol should never be #= to anything that is not > a Symbol? At least in VW, GST, Dolphin, and VAST, > #a = 'a' > 'a' = #a > both answer false, and I'd be rather upset if a symbol > ever compared equal to a string. The ANSI

Re: [Pharo-users] offers (deb and rpm packages included)

2019-03-06 Thread Michael Zeder
cool @Offray, I added pacman format now, but I have no means to verify, if it installs correctly on Arch/Manjaro/other distros which use the pacman package management. If somebody can verify..? And, I yet have to come up with a way to ensure, that package updates dont break compatibility (vm

Re: [Pharo-users] Symbol equality method #= - weird condition in the Pharo sourcecode

2019-03-06 Thread Richard O'Keefe
Surely a Symbol should never be #= to anything that is not a Symbol? At least in VW, GST, Dolphin, and VAST, #a = 'a' 'a' = #a both answer false, and I'd be rather upset if a symbol ever compared equal to a string. The ANSI Smalltalk standard says in several places that "Symbol objects are

Re: [Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Sven Van Caekenberghe
Why would that work ? What would you expect the output to be ? Try: #(1 2 3) asDictionary it fails in exactly the same way. You need key/value pairs (Associations). These do work Bag new add: #foo->100; asDictionary. Bag new addAll: 'ABABAB'; valuesAndCounts. > On 6 Mar 2019, at

Re: [Pharo-users] Noob Question - slicing

2019-03-06 Thread Sven Van Caekenberghe
In Calypso, select the checkbox next to the virtual category 'instance side', which will show all inherited methods (below Object) in the same browser, scroll to copy. #drop:take: sounds totally obscure to me, way worse than #copyFrom:to: first: or last: And what is your point with the

Re: [Pharo-users] Noob Question - slicing

2019-03-06 Thread Tim Mackinnon
Nice reply Richard - do you ever post any of these in a blog - the one below would be a great one to point to from Exercism... > On 6 Mar 2019, at 12:48, Richard O'Keefe wrote: > > As someone else already pointed out, the standard way to copy > part of any array-like sequence is >aSequence

[Pharo-users] Why can't a Bag answer as a dictionary?

2019-03-06 Thread Tim Mackinnon
I was surprised to find that a Bag can’t convert to a dictionary - e.g. Bag new addAll: 'aacddd’; asDictionary Gives an error - Dnu #key It looks to me like Bag is inheriting a bad version of #associationsDo: and instead could simply forward it to #doWithOccurences:

Re: [Pharo-users] A "with" construct like Pascal - easy to do, but is it terrible?

2019-03-06 Thread Richard O'Keefe
The Pascal 'with' statement is among the most hated features of Pascal and was not copied in successor languages like Ada or Modula-2. It was typically replaced by record constructors, such as Book1 := Book[title : 'C Programming'; author : 'Nuha Ali '; subject

Re: [Pharo-users] [Pharo-dev] [ANN] Pharo 7.0.2 released!

2019-03-06 Thread Norbert Hartl
yeah, bright future we come! Norbert > Am 06.03.2019 um 13:01 schrieb Esteban Lorenzano : > > > >> On 6 Mar 2019, at 12:38, Norbert Hartl > > wrote: >> >> How wonderful is that? How much effort it was compared to the old process? > > zero. > Bah, I needed to

Re: [Pharo-users] Noob Question - slicing

2019-03-06 Thread Richard O'Keefe
As someone else already pointed out, the standard way to copy part of any array-like sequence is aSequence copyFrom: firstIncludedIndex to: lastIncludedIndex How could you have found this by yourself? >From the background, either Click-select Tools-select Playground or hold Ctrl down while

Re: [Pharo-users] [Pharo-dev] [ANN] Pharo 7.0.2 released!

2019-03-06 Thread Esteban Lorenzano
> On 6 Mar 2019, at 12:38, Norbert Hartl wrote: > > How wonderful is that? How much effort it was compared to the old process? zero. Bah, I needed to restart the CI because of the freetype random welcome problem. Esteban > > Norbert > > >> Am 06.03.2019 um 11:32 schrieb Esteban Lorenzano

Re: [Pharo-users] [Pharo-dev] [ANN] Pharo 7.0.2 released!

2019-03-06 Thread Norbert Hartl
How wonderful is that? How much effort it was compared to the old process? Norbert > Am 06.03.2019 um 11:32 schrieb Esteban Lorenzano : > > Hi, > > I just made a bugfix release of Pharo: > > v7.0.2 > <513630.jpeg>

[Pharo-users] [ANN] Pharo 7.0.2 released!

2019-03-06 Thread Esteban Lorenzano
Hi, I just made a bugfix release of Pharo: v7.0.2 estebanlm released this 22 hours ago Bugfix release #2303

Re: [Pharo-users] IMAP in Pharo

2019-03-06 Thread Cédrick Béler
Hi Veincent ;-), > Le 6 mars 2019 à 10:44, > a écrit : > > Hi Cedrik, > > I started something to deal with this as side project: > https://github.com/VincentBlondeau/IMAPClient > > It is at a very early development state. I took a SS3

Re: [Pharo-users] IMAP in Pharo

2019-03-06 Thread vincent.blondeau
Hi Cedrik, I started something to deal with this as side project: https://github.com/VincentBlondeau/IMAPClient It is at a very early development state. I took a SS3 project (http://smalltalkhub.com/#!/~Gotchas/IMAP-Client) andbegan to improve it. Don’t hesitate to fork and add some PRs

[Pharo-users] IMAP in Pharo

2019-03-06 Thread Cédrick Béler
Hi all, Do you know if IMAP is possible in Pharo ? I havent found any implementation (quick search). I’d like to have it to interact/filter my email. POP3 is not really possible. I think it would be a nice addition and maybe a good GSOC project ? Cheers, Cédrick

[Pharo-users] Smalltalk CI - anyone have any luck excluding tests?

2019-03-06 Thread Tim Mackinnon
As part of Exercism we have to show our language track can build and run tests - and they use Travis - so, pretty awesome we have that tooling. So it was pretty straightforward t hook in - and there are enough examples around to support the docs for the .yml and .ston file - however I hit an

Re: [Pharo-users] offers (deb and rpm packages included)

2019-03-06 Thread Esteban Lorenzano
Nice, thank you! (We are working on some packaging for linux, but somehow we are not yet there :( ) Esteban > On 3 Mar 2019, at 17:52, Michael Zeder wrote: > > Hi! > I would like to make two offers: > First, I know, deciding to be provocative can hurt. I did it int the hope > that the

[Pharo-users] [ANN] Pharo Consortium New Academic Member: CIRAD

2019-03-06 Thread Marcus Denker
The Pharo Consortium is very happy to announce that CIRAD has joined the Consortium as an Academic Member. About - CIRAD, the French Agricultural Research Centre for International Development: https://www.cirad.fr/en/home-page - Pharo Consortium: http://consortium.pharo.org The goal of the