Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- 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
December 2014
- 70 participants
- 473 messages
Fastest way to do case insensitive search and replace?
by Markus Fritsche
Hi,
is there a way to search case insensitively and replace in Strings in
one shot?
If
MethodFinder methodFor: #(('HaLLol' 'll' 'tt') 'Hattol')
doesn't find anything, does that mean "no" right away?
Kind regards
Markus
Dec. 11, 2014
Re: [Pharo-users] New Pharo user, some questions
by kilon alios
can you resize the pharo windows ? I saw you struggle with it there
It also looks like its crawling there , which iPad is this , which
generation ?
On Thu, Dec 11, 2014 at 10:09 AM, phil(a)highoctane.be <phil(a)highoctane.be>
wrote:
> Pharo on iPad.
>
> http://youtu.be/7MNsUiCc5FQ
> Le 10 déc. 2014 21:26, "dboeren" <boerend(a)gmail.com> a écrit :
>
> Now that my image is working properly again and the fires have been put
>> out,
>> I wanted to introduce myself a bit better...
>>
>> My name is David Boeren. I first learned Smalltalk back in college many
>> years ago, we used Smalltalk V in an object oriented programming class I
>> took which was first-half Smalltalk, second-half C++. This would be about
>> 1992 I think? In recent years I've mainly been using Java, with
>> occasional
>> Python dabblings. I remember installing Squeak once or twice over the
>> years, but to be honest it felt a bit clunky, perhaps this was just an
>> early
>> primitive version or whatever.
>>
>> Recently, I've been getting the itch to try out some different
>> languages. I
>> was kind of looking at Scala or Clojure, one co-worker suggested Erlang,
>> and
>> so forth. But after doing a brief review I ended up coming back to
>> Smalltalk which even after all these years still stands right up with the
>> cutting edge I think. Sure, there are a few things that I think would be
>> a
>> little different if it were designed today like tuple support or whatever,
>> but it feels like the right choice for something I'm going to use mainly
>> for
>> "fun" projects and the interactive environment is awesome.
>>
>>
>> One thing I wanted to ask about is the status of getting Pharo running on
>> iOS (or at least iPad). I found some old posts but nothing much within
>> the
>> last couple of years. I know there were app store policy issues in the
>> past
>> but I think that Apple has opened things up a bit since then, you can now
>> get Pythonista in the app store, or Codea. Is there still an obstacle or
>> is
>> it just something that hasn't been gotten around to yet? I'd love to get
>> it
>> running on my iPad Mini and be able to transmit code back and forth
>> between
>> there and my laptop to work on it wherever I'm at.
>>
>>
>> Second, I'm running into an oddity and I'm not sure what I'm doing wrong
>> or
>> whether this is a bug of some sort, this has to do with trying to replace
>> unicode characters in a string which seems like it should be a
>> straightforward operation. Here is my code:
>>
>> "Fetch the raw JSON data from dtdb.co"
>> response := 'http://dtdb.co/api/cards/' asUrl retrieveContents
>> asString.
>>
>> "Clean up the data a bit to make it a little more regular"
>> response := response copyReplaceAll: 'null' with: '""'.
>> response := response copyReplaceAll: '\u2022' with: ','.
>> response := response copyReplaceAll: '\u009e' with: 'e'.
>>
>> Basically I'm just pulling some JSON data and then doing a few string
>> replacements to make the data suit my needs. The first one works. The
>> second one works. Since the third one ALSO uses a \uXXXX code I would
>> expect it to work too, but it does not - the accented characters are still
>> there.
>>
>> To get a bit more visibility into this, I copied the CopyReplaceAll code
>> from SequenceableCollection into a scratch class method and adding some
>> Transcript output:
>>
>> copyReplaceIn: aString All: oldSubCollection with: newCollection
>> "Answer a copy of the receiver in which all occurrences of
>> oldSubCollection have been replaced by newCollection "
>>
>> | startSearch currentIndex endIndex |
>>
>> Transcript show: 'start' ; cr.
>> startSearch := 1.
>> [(currentIndex := aString indexOfSubCollection: oldSubCollection
>> startingAt: startSearch) > 0]
>> whileTrue: [
>> Transcript show: 'Found at index ' ; show:
>> currentIndex ; cr.
>> endIndex := currentIndex + oldSubCollection size
>> - 1.
>> aString := aString
>> copyReplaceFrom: currentIndex
>> to: endIndex
>> with: newCollection.
>> startSearch := currentIndex +
>> newCollection size].
>> Transcript show: 'done' ; cr.
>> ^ aString
>>
>> A minimal test seemed to work:
>> HelloWorld copyReplaceIn: 'R\u00e9my Lapointe' All: '\u00e9' with: 'e'.
>>
>> start
>> Found at index 2
>> done
>>
>> Testing this with the real data worked too:
>> HelloWorld copyReplaceIn: ('http://dtdb.co/api/cards/' asUrl
>> retrieveContents asString) All: '\u00e9' with: 'e'.
>> start
>> Found at index 22379
>> Found at index 22500
>> done
>>
>>
>> However, when I went back to using the regular copyReplaceAll:With: method
>> it does not work and I'm not sure why. When it executes this:
>> aString indexOfSubCollection: oldSubCollection startingAt: startSearch
>>
>> The value comes back as 0 even though it's the same data from
>> 'http://dtdb.co/api/cards/' asUrl retrieveContents asString (I added a
>> "self
>> halt" to be able to step into the method and view the variable values),
>> and
>> I'm not sure what the difference is. There shouldn't be a limit on the
>> size
>> of the collection, should there? The whole thing is around 116k which is
>> big but not ridiculously so. It is however big enough that the debugger
>> can't show the whole value, or at least I haven't found a way to do so.
>>
>>
>> And last, is there a good video tutorial for the Pharo beginner on how to
>> use the various browsers, debugger, tools, etc... that come with Pharo? I
>> would like to start learning more about the best ways to use these in my
>> development processes. I'm also having a lot of trouble finding the
>> correct
>> classes and message for what I want to do, searching online w/ Google
>> often
>> seem to turn up outdated information (or for a different smalltalk flavor)
>> and it can take a while to figure out the correct way to do things. Is
>> there a good central reference for the APIs somewhere? I know that you
>> can
>> search in the browser but I usually don't know the name to search for. It
>> would be good to have a handy reference detailing how to do all the
>> commonplace stuff.
>>
>> Thanks!
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/New-Pharo-user-some-questions-tp4795325.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>>
Dec. 11, 2014
Re: [Pharo-users] New Pharo user, some questions
by kilon alios
That is what a pharo app is , its just a copy of the ide, the language and
the tools together with some additional code.
You can hide the IDE from the user of course but it would be still there
unless you remove it.
If you plan to distribute the exposed IDE you need to check with Apple
license terms because I think they still have restrictions on this. So your
limitation is Apple and not Pharo ;)
Of course if you want to use the IDE only for yourself you have no issues
there and you dont need Apple's permission. Of course since people dont
code Pharo on their ipads (I am not a fa of the idea myself I like my 27''
iMac too much :D) you most likely run into unresolved problems.
So I would not recommend Pharo on iOS personally even though people have
done this , but you can try it yourself and make your own mind ;)
On Thu, Dec 11, 2014 at 6:06 AM, David Boeren <boerend(a)gmail.com> wrote:
> Sorry, I may not have been clear with my iOS question. What I'm
> interested in is running the development environment on iPad, not just a
> deployed app (although that is handy too). There are other apps that let
> you write code, compile it, and run it all on your iOS device without
> needing a computer or external compiler so I'm thinking that if they pass
> the app store criteria that perhaps Pharo or another Smalltalk could also
> do so.
>
> Thanks for the video link, I'll check it out.
>
>
> On Wed, Dec 10, 2014 at 4:53 PM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> I cant answer your JSON question but I can answer the other two questions
>> a) iOS b) Pharo video tutorial
>>
>> a) as far iOS is concerned, yes pharo runs fine on it. I am not so sure
>> about the new vm Cog but there are 2 commercial pharo apps by the same
>> developer on Apple Story one is called DrGeo, which is a very cool app for
>> teaching kids and grown apps about geometry and iStoa which is another
>> educational app. So yes pharo looks fine on iOS platform.
>>
>> b) about video tutorial, I am actually making a series of tutorial that I
>> call "Pharo Video Tutorial" using Pharo 3 and now I am using Pharo 4 , I
>> like to teach people the cutting edge and you can find a playlist with
>> those tutorial here
>>
>>
>> https://www.youtube.com/watch?v=Ol5ivaEATLQ&list=PLqbtQ7OkSta0ULYAd7Qdxof85…
>>
>> you can ommit the first one is about a general intro to pharo and the
>> second which is how to install pharo , the rest are all 100% practical and
>> I try to keep the blah blah to a minimum. Excluding the first hour you
>> have a total of 3 hours cut down to 10 minutes more or less video tutorials
>> that will give you a very solid introduction to Pharo. Is an ongoing effort
>> so subscribe to be notified about new tutorials.
>>
>> On Wed, Dec 10, 2014 at 10:26 PM, dboeren <boerend(a)gmail.com> wrote:
>>
>>> Now that my image is working properly again and the fires have been put
>>> out,
>>> I wanted to introduce myself a bit better...
>>>
>>> My name is David Boeren. I first learned Smalltalk back in college many
>>> years ago, we used Smalltalk V in an object oriented programming class I
>>> took which was first-half Smalltalk, second-half C++. This would be
>>> about
>>> 1992 I think? In recent years I've mainly been using Java, with
>>> occasional
>>> Python dabblings. I remember installing Squeak once or twice over the
>>> years, but to be honest it felt a bit clunky, perhaps this was just an
>>> early
>>> primitive version or whatever.
>>>
>>> Recently, I've been getting the itch to try out some different
>>> languages. I
>>> was kind of looking at Scala or Clojure, one co-worker suggested Erlang,
>>> and
>>> so forth. But after doing a brief review I ended up coming back to
>>> Smalltalk which even after all these years still stands right up with the
>>> cutting edge I think. Sure, there are a few things that I think would
>>> be a
>>> little different if it were designed today like tuple support or
>>> whatever,
>>> but it feels like the right choice for something I'm going to use mainly
>>> for
>>> "fun" projects and the interactive environment is awesome.
>>>
>>>
>>> One thing I wanted to ask about is the status of getting Pharo running on
>>> iOS (or at least iPad). I found some old posts but nothing much within
>>> the
>>> last couple of years. I know there were app store policy issues in the
>>> past
>>> but I think that Apple has opened things up a bit since then, you can now
>>> get Pythonista in the app store, or Codea. Is there still an obstacle
>>> or is
>>> it just something that hasn't been gotten around to yet? I'd love to
>>> get it
>>> running on my iPad Mini and be able to transmit code back and forth
>>> between
>>> there and my laptop to work on it wherever I'm at.
>>>
>>>
>>> Second, I'm running into an oddity and I'm not sure what I'm doing wrong
>>> or
>>> whether this is a bug of some sort, this has to do with trying to replace
>>> unicode characters in a string which seems like it should be a
>>> straightforward operation. Here is my code:
>>>
>>> "Fetch the raw JSON data from dtdb.co"
>>> response := 'http://dtdb.co/api/cards/' asUrl retrieveContents
>>> asString.
>>>
>>> "Clean up the data a bit to make it a little more regular"
>>> response := response copyReplaceAll: 'null' with: '""'.
>>> response := response copyReplaceAll: '\u2022' with: ','.
>>> response := response copyReplaceAll: '\u009e' with: 'e'.
>>>
>>> Basically I'm just pulling some JSON data and then doing a few string
>>> replacements to make the data suit my needs. The first one works. The
>>> second one works. Since the third one ALSO uses a \uXXXX code I would
>>> expect it to work too, but it does not - the accented characters are
>>> still
>>> there.
>>>
>>> To get a bit more visibility into this, I copied the CopyReplaceAll code
>>> from SequenceableCollection into a scratch class method and adding some
>>> Transcript output:
>>>
>>> copyReplaceIn: aString All: oldSubCollection with: newCollection
>>> "Answer a copy of the receiver in which all occurrences of
>>> oldSubCollection have been replaced by newCollection "
>>>
>>> | startSearch currentIndex endIndex |
>>>
>>> Transcript show: 'start' ; cr.
>>> startSearch := 1.
>>> [(currentIndex := aString indexOfSubCollection: oldSubCollection
>>> startingAt: startSearch) > 0]
>>> whileTrue: [
>>> Transcript show: 'Found at index ' ; show:
>>> currentIndex ; cr.
>>> endIndex := currentIndex + oldSubCollection size
>>> - 1.
>>> aString := aString
>>> copyReplaceFrom: currentIndex
>>> to: endIndex
>>> with: newCollection.
>>> startSearch := currentIndex +
>>> newCollection size].
>>> Transcript show: 'done' ; cr.
>>> ^ aString
>>>
>>> A minimal test seemed to work:
>>> HelloWorld copyReplaceIn: 'R\u00e9my Lapointe' All: '\u00e9' with: 'e'.
>>>
>>> start
>>> Found at index 2
>>> done
>>>
>>> Testing this with the real data worked too:
>>> HelloWorld copyReplaceIn: ('http://dtdb.co/api/cards/' asUrl
>>> retrieveContents asString) All: '\u00e9' with: 'e'.
>>> start
>>> Found at index 22379
>>> Found at index 22500
>>> done
>>>
>>>
>>> However, when I went back to using the regular copyReplaceAll:With:
>>> method
>>> it does not work and I'm not sure why. When it executes this:
>>> aString indexOfSubCollection: oldSubCollection startingAt: startSearch
>>>
>>> The value comes back as 0 even though it's the same data from
>>> 'http://dtdb.co/api/cards/' asUrl retrieveContents asString (I added a
>>> "self
>>> halt" to be able to step into the method and view the variable values),
>>> and
>>> I'm not sure what the difference is. There shouldn't be a limit on the
>>> size
>>> of the collection, should there? The whole thing is around 116k which is
>>> big but not ridiculously so. It is however big enough that the debugger
>>> can't show the whole value, or at least I haven't found a way to do so.
>>>
>>>
>>> And last, is there a good video tutorial for the Pharo beginner on how to
>>> use the various browsers, debugger, tools, etc... that come with Pharo?
>>> I
>>> would like to start learning more about the best ways to use these in my
>>> development processes. I'm also having a lot of trouble finding the
>>> correct
>>> classes and message for what I want to do, searching online w/ Google
>>> often
>>> seem to turn up outdated information (or for a different smalltalk
>>> flavor)
>>> and it can take a while to figure out the correct way to do things. Is
>>> there a good central reference for the APIs somewhere? I know that you
>>> can
>>> search in the browser but I usually don't know the name to search for.
>>> It
>>> would be good to have a handy reference detailing how to do all the
>>> commonplace stuff.
>>>
>>> Thanks!
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/New-Pharo-user-some-questions-tp4795325.html
>>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>>
>>>
>>
>
Dec. 11, 2014
Re: [Pharo-users] New Pharo user, some questions
by phil@highoctane.be
Pharo on iPad.
http://youtu.be/7MNsUiCc5FQ
Le 10 déc. 2014 21:26, "dboeren" <boerend(a)gmail.com> a écrit :
> Now that my image is working properly again and the fires have been put
> out,
> I wanted to introduce myself a bit better...
>
> My name is David Boeren. I first learned Smalltalk back in college many
> years ago, we used Smalltalk V in an object oriented programming class I
> took which was first-half Smalltalk, second-half C++. This would be about
> 1992 I think? In recent years I've mainly been using Java, with occasional
> Python dabblings. I remember installing Squeak once or twice over the
> years, but to be honest it felt a bit clunky, perhaps this was just an
> early
> primitive version or whatever.
>
> Recently, I've been getting the itch to try out some different languages.
> I
> was kind of looking at Scala or Clojure, one co-worker suggested Erlang,
> and
> so forth. But after doing a brief review I ended up coming back to
> Smalltalk which even after all these years still stands right up with the
> cutting edge I think. Sure, there are a few things that I think would be a
> little different if it were designed today like tuple support or whatever,
> but it feels like the right choice for something I'm going to use mainly
> for
> "fun" projects and the interactive environment is awesome.
>
>
> One thing I wanted to ask about is the status of getting Pharo running on
> iOS (or at least iPad). I found some old posts but nothing much within the
> last couple of years. I know there were app store policy issues in the
> past
> but I think that Apple has opened things up a bit since then, you can now
> get Pythonista in the app store, or Codea. Is there still an obstacle or
> is
> it just something that hasn't been gotten around to yet? I'd love to get
> it
> running on my iPad Mini and be able to transmit code back and forth between
> there and my laptop to work on it wherever I'm at.
>
>
> Second, I'm running into an oddity and I'm not sure what I'm doing wrong or
> whether this is a bug of some sort, this has to do with trying to replace
> unicode characters in a string which seems like it should be a
> straightforward operation. Here is my code:
>
> "Fetch the raw JSON data from dtdb.co"
> response := 'http://dtdb.co/api/cards/' asUrl retrieveContents
> asString.
>
> "Clean up the data a bit to make it a little more regular"
> response := response copyReplaceAll: 'null' with: '""'.
> response := response copyReplaceAll: '\u2022' with: ','.
> response := response copyReplaceAll: '\u009e' with: 'e'.
>
> Basically I'm just pulling some JSON data and then doing a few string
> replacements to make the data suit my needs. The first one works. The
> second one works. Since the third one ALSO uses a \uXXXX code I would
> expect it to work too, but it does not - the accented characters are still
> there.
>
> To get a bit more visibility into this, I copied the CopyReplaceAll code
> from SequenceableCollection into a scratch class method and adding some
> Transcript output:
>
> copyReplaceIn: aString All: oldSubCollection with: newCollection
> "Answer a copy of the receiver in which all occurrences of
> oldSubCollection have been replaced by newCollection "
>
> | startSearch currentIndex endIndex |
>
> Transcript show: 'start' ; cr.
> startSearch := 1.
> [(currentIndex := aString indexOfSubCollection: oldSubCollection
> startingAt: startSearch) > 0]
> whileTrue: [
> Transcript show: 'Found at index ' ; show:
> currentIndex ; cr.
> endIndex := currentIndex + oldSubCollection size -
> 1.
> aString := aString
> copyReplaceFrom: currentIndex
> to: endIndex
> with: newCollection.
> startSearch := currentIndex +
> newCollection size].
> Transcript show: 'done' ; cr.
> ^ aString
>
> A minimal test seemed to work:
> HelloWorld copyReplaceIn: 'R\u00e9my Lapointe' All: '\u00e9' with: 'e'.
>
> start
> Found at index 2
> done
>
> Testing this with the real data worked too:
> HelloWorld copyReplaceIn: ('http://dtdb.co/api/cards/' asUrl
> retrieveContents asString) All: '\u00e9' with: 'e'.
> start
> Found at index 22379
> Found at index 22500
> done
>
>
> However, when I went back to using the regular copyReplaceAll:With: method
> it does not work and I'm not sure why. When it executes this:
> aString indexOfSubCollection: oldSubCollection startingAt: startSearch
>
> The value comes back as 0 even though it's the same data from
> 'http://dtdb.co/api/cards/' asUrl retrieveContents asString (I added a
> "self
> halt" to be able to step into the method and view the variable values), and
> I'm not sure what the difference is. There shouldn't be a limit on the
> size
> of the collection, should there? The whole thing is around 116k which is
> big but not ridiculously so. It is however big enough that the debugger
> can't show the whole value, or at least I haven't found a way to do so.
>
>
> And last, is there a good video tutorial for the Pharo beginner on how to
> use the various browsers, debugger, tools, etc... that come with Pharo? I
> would like to start learning more about the best ways to use these in my
> development processes. I'm also having a lot of trouble finding the
> correct
> classes and message for what I want to do, searching online w/ Google often
> seem to turn up outdated information (or for a different smalltalk flavor)
> and it can take a while to figure out the correct way to do things. Is
> there a good central reference for the APIs somewhere? I know that you can
> search in the browser but I usually don't know the name to search for. It
> would be good to have a handy reference detailing how to do all the
> commonplace stuff.
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://forum.world.st/New-Pharo-user-some-questions-tp4795325.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>
Dec. 11, 2014
Re: [Pharo-users] command line access to MetaRepoForPharo30
by Esteban Lorenzano
> On 11 Dec 2014, at 09:00, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
>
>> On 11 Dec 2014, at 05:54, Yanni Chiu <yanni(a)rogers.com> wrote:
>>
>> Is there something broken in the MetaRepoForPharo30 on SmalltalkHub?
>>
>> This was the first time I was trying the command line interface to install code, and it took me a while to figure out that it was the MetaRepoForPharo30 repository (and not my image/vm). In the log below, when looking for configurations in the Fuel repo, the result is normal. Also, SS3 and mc.stfx.eu/ZincHTTPComponents gave normal results.
>>
>> =====
>>
>> Pharo3.0
>> Latest update: #30860
>>
>> yanni@foobar:~/cc/work$ ./pharo Pharo.image --version
>> M: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
>> NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
>> git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm(a)gmail.com> Jenkins build #14535
>>
>> =====
>>
>> yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main
>
> That cannot work, there is no ConfigurationOfMetaRepoForPharo30
> MetaRepoForPharo30 is special, it contains many different configurations.
> The config command tries to be clever and resolves one configuration based on the repository name.
if you do:
$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main <http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main> ConfigurationOfWhatYouWant
it should work. This is the help for that command:
Command line handler for dealing with Metacello configurations from the command line
Usage: config [--help] <repository url> [<configuration>] [--install[=<version>]] [--group=<group>] [--username=<username>] [--password=<password>]
--help show this help message
<repository url> A Monticello repository name
<configuration> A valid Metacello Configuration name
<version> A valid version for the given configuration
<group> A valid Metacello group name
<username> An optional username to access the configuration's repository
<password> An optional password to access the configuration's repository
Examples:
# display this help message
pharo Pharo.image config
# list all configurations of a repository
pharo Pharo.image config $MC_REPOS_URL
# list all the available versions of a confgurtation
pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo
# install the stable version
pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install
#install a specific version '1.5'
pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5
#install a specific version '1.5' and only a specific group 'Tests'
pharo Pharo.image config $MC_REPOS_URL ConfigurationOfFoo --install=1.5 --group=Tests
(which you have if you type
$ ./pharo Pharo.image config âhelp
)
Esteban
>
>> Error: Unable to resolve ConfigurationOfMetaRepoForPharo30
>> GoferConfigurationReference(Object)>>error:
>> GoferConfigurationReference(GoferReference)>>resolveWith:
>> Gofer>>resolved in Block: [ :each | each resolveWith: self ]
>> Array(SequenceableCollection)>>collect:
>> Gofer>>resolved
>> GoferLoad>>initializeOn:
>> GoferLoad class(GoferOperation class)>>on:
>> Gofer>>execute:do:
>> Gofer>>execute:
>> Gofer>>load
>> ConfigurationCommandLineHandler>>configuration
>> ConfigurationCommandLineHandler>>project
>> ConfigurationCommandLineHandler>>listConfigurationDetails
>> ConfigurationCommandLineHandler>>list
>> ConfigurationCommandLineHandler>>activate
>> ConfigurationCommandLineHandler class(CommandLineHandler class)>>activateWith:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
>> BlockClosure>>on:do:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
>> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: (self arguments ifEmpty: [ ...etc...
>> BlockClosure>>on:do:
>> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
>> PharoCommandLineHandler>>activate
>> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
>> PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
>> WorldState>>runStepMethodsIn:
>> WorldMorph>>runStepMethods
>> WorldState>>doOneCycleNowFor:
>>
>> yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/Fuel/main
>> 'Available versions for ConfigurationOfFuel'
>> 1.0
>> 1.0-baseline
>> 1.1
>> 1.1-baseline
>> 1.2
>> 1.2-baseline
>> 1.3
>> 1.4
>> 1.5
>> 1.5-baseline
>> 1.6
>> 1.6-baseline
>> 1.6.1
>> 1.7
>> 1.7-baseline
>> 1.8
>> 1.8-baseline
>> 1.8-beta1
>> 1.8-forMarea
>> 1.8.1
>> 1.8.1-baseline
>> 1.8.2
>> 1.8.2-baseline
>> 1.9
>> 1.9-alphaForTanker
>> 1.9-alphaForTanker-baseline
>> 1.9-baseline
>> 1.9.1
>> 1.9.2
>> 1.9.2-baseline
>> 1.9.3
>> 1.9.3-baseline
>> 1.9.4
>> 2.0.0-baseline
>> bleedingEdge
>> development
>> last
>> stable
>>
>>
>>
>
>
Dec. 11, 2014
Re: [Pharo-users] command line access to MetaRepoForPharo30
by Sven Van Caekenberghe
> On 11 Dec 2014, at 05:54, Yanni Chiu <yanni(a)rogers.com> wrote:
>
> Is there something broken in the MetaRepoForPharo30 on SmalltalkHub?
>
> This was the first time I was trying the command line interface to install code, and it took me a while to figure out that it was the MetaRepoForPharo30 repository (and not my image/vm). In the log below, when looking for configurations in the Fuel repo, the result is normal. Also, SS3 and mc.stfx.eu/ZincHTTPComponents gave normal results.
>
> =====
>
> Pharo3.0
> Latest update: #30860
>
> yanni@foobar:~/cc/work$ ./pharo Pharo.image --version
> M: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm(a)gmail.com> Jenkins build #14535
>
> =====
>
> yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main
That cannot work, there is no ConfigurationOfMetaRepoForPharo30
MetaRepoForPharo30 is special, it contains many different configurations.
The config command tries to be clever and resolves one configuration based on the repository name.
> Error: Unable to resolve ConfigurationOfMetaRepoForPharo30
> GoferConfigurationReference(Object)>>error:
> GoferConfigurationReference(GoferReference)>>resolveWith:
> Gofer>>resolved in Block: [ :each | each resolveWith: self ]
> Array(SequenceableCollection)>>collect:
> Gofer>>resolved
> GoferLoad>>initializeOn:
> GoferLoad class(GoferOperation class)>>on:
> Gofer>>execute:do:
> Gofer>>execute:
> Gofer>>load
> ConfigurationCommandLineHandler>>configuration
> ConfigurationCommandLineHandler>>project
> ConfigurationCommandLineHandler>>listConfigurationDetails
> ConfigurationCommandLineHandler>>list
> ConfigurationCommandLineHandler>>activate
> ConfigurationCommandLineHandler class(CommandLineHandler class)>>activateWith:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
> PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: (self arguments ifEmpty: [ ...etc...
> BlockClosure>>on:do:
> PharoCommandLineHandler(BasicCommandLineHandler)>>activate
> PharoCommandLineHandler>>activate
> PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
> PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
> WorldState>>runStepMethodsIn:
> WorldMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
>
> yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/Fuel/main
> 'Available versions for ConfigurationOfFuel'
> 1.0
> 1.0-baseline
> 1.1
> 1.1-baseline
> 1.2
> 1.2-baseline
> 1.3
> 1.4
> 1.5
> 1.5-baseline
> 1.6
> 1.6-baseline
> 1.6.1
> 1.7
> 1.7-baseline
> 1.8
> 1.8-baseline
> 1.8-beta1
> 1.8-forMarea
> 1.8.1
> 1.8.1-baseline
> 1.8.2
> 1.8.2-baseline
> 1.9
> 1.9-alphaForTanker
> 1.9-alphaForTanker-baseline
> 1.9-baseline
> 1.9.1
> 1.9.2
> 1.9.2-baseline
> 1.9.3
> 1.9.3-baseline
> 1.9.4
> 2.0.0-baseline
> bleedingEdge
> development
> last
> stable
>
>
>
Dec. 11, 2014
command line access to MetaRepoForPharo30
by Torsten Bergmann
If I remember correctly "config" looks up the config within a project repo.
Thats why it should work with all repos that contain a SINGLE ConfigurationOfXXX
package (or with repos where the name is matching) - like Fuel => ConfigurationOfFuel or others.
Just dig into the code.
The "MetaRepoForPharo30" is a repository with MANY configurations as this repo
is not a project repo. MetaRepoForPharo30 is an assembling repo to drive the configuration browser
in Pharo 3.0. There is also a MetaRepoForPharo40 for the config browser in Pharo 4.0
So basically in your example Pharo looks for "ConfigurationOfMetaRepoForPharo30" which it will
not find as there is no Pharo project "MetaRepoForPharo30".
So "config" option is intended to be used for project repos to easily access the config
in them - you should not use it with one of the meta repos (MetaRepoForPharo30, MetaRepoForPharo40).
bye
T.
Dec. 11, 2014
Re: [Pharo-users] New Pharo user, some questions
by Sven Van Caekenberghe
> On 11 Dec 2014, at 04:41, David Boeren <boerend(a)gmail.com> wrote:
>
> That's the next line of code after what I quoted:
>
> "Parse the JSON data returned by the api"
> data := NeoJSONReader fromString: response.
>
> But, prior to the JSON parsing I was doing a couple of string replacements to patch up the data. The system I'm moving the data into doesn't accept accented characters or bullets, and it wants empty strings instead of nulls.
You can do the replacements after parsing too, just manipulating the generated data structures. I would say that is conceptually more correct.
> All the JSON stuff works fine. It's just the string operations with copyReplaceAll:with: that aren't working as expected for some reason.
>
> Or are you saying that the data I get from from asUrl retrieveContents is not a "proper string" and maybe that's why it's not working?
>
>
> On Wed, Dec 10, 2014 at 6:34 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> > On 10 Dec 2014, at 21:26, dboeren <boerend(a)gmail.com> wrote:
> >
> > "Fetch the raw JSON data from dtdb.co"
> > response := 'http://dtdb.co/api/cards/' asUrl retrieveContents asString.
>
> Why no do
>
> NeoJSONReader fromString: 'http://dtdb.co/api/cards/' asUrl retrieveContents
>
> ?
>
> You'll get the data back, nicely parsed and converted to proper Pharo strings.
>
> Sven
>
Dec. 11, 2014
command line access to MetaRepoForPharo30
by Yanni Chiu
Is there something broken in the MetaRepoForPharo30 on SmalltalkHub?
This was the first time I was trying the command line interface to install code, and it took me a while to figure out that it was the MetaRepoForPharo30 repository (and not my image/vm). In the log below, when looking for configurations in the Fuel repo, the result is normal. Also, SS3 and mc.stfx.eu/ZincHTTPComponents gave normal results.
=====
Pharo3.0
Latest update: #30860
yanni@foobar:~/cc/work$ ./pharo Pharo.image --version
M: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm(a)gmail.com> Jenkins build #14535
=====
yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main
Error: Unable to resolve ConfigurationOfMetaRepoForPharo30
GoferConfigurationReference(Object)>>error:
GoferConfigurationReference(GoferReference)>>resolveWith:
Gofer>>resolved in Block: [ :each | each resolveWith: self ]
Array(SequenceableCollection)>>collect:
Gofer>>resolved
GoferLoad>>initializeOn:
GoferLoad class(GoferOperation class)>>on:
Gofer>>execute:do:
Gofer>>execute:
Gofer>>load
ConfigurationCommandLineHandler>>configuration
ConfigurationCommandLineHandler>>project
ConfigurationCommandLineHandler>>listConfigurationDetails
ConfigurationCommandLineHandler>>list
ConfigurationCommandLineHandler>>activate
ConfigurationCommandLineHandler class(CommandLineHandler class)>>activateWith:
PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]
BlockClosure>>on:do:
PharoCommandLineHandler(BasicCommandLineHandler)>>activateSubCommand:
PharoCommandLineHandler(BasicCommandLineHandler)>>handleSubcommand
PharoCommandLineHandler(BasicCommandLineHandler)>>handleArgument:
PharoCommandLineHandler(BasicCommandLineHandler)>>activate in Block: [ self handleArgument: (self arguments ifEmpty: [ ...etc...
BlockClosure>>on:do:
PharoCommandLineHandler(BasicCommandLineHandler)>>activate
PharoCommandLineHandler>>activate
PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:
PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]
WorldState>>runStepMethodsIn:
WorldMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
yanni@foobar:~/cc/work$ ./pharo Pharo.image config http://smalltalkhub.com/mc/Pharo/Fuel/main
'Available versions for ConfigurationOfFuel'
1.0
1.0-baseline
1.1
1.1-baseline
1.2
1.2-baseline
1.3
1.4
1.5
1.5-baseline
1.6
1.6-baseline
1.6.1
1.7
1.7-baseline
1.8
1.8-baseline
1.8-beta1
1.8-forMarea
1.8.1
1.8.1-baseline
1.8.2
1.8.2-baseline
1.9
1.9-alphaForTanker
1.9-alphaForTanker-baseline
1.9-baseline
1.9.1
1.9.2
1.9.2-baseline
1.9.3
1.9.3-baseline
1.9.4
2.0.0-baseline
bleedingEdge
development
last
stable
Dec. 11, 2014
Re: [Pharo-users] New Pharo user, some questions
by David Boeren
Sorry, I may not have been clear with my iOS question. What I'm interested
in is running the development environment on iPad, not just a deployed app
(although that is handy too). There are other apps that let you write
code, compile it, and run it all on your iOS device without needing a
computer or external compiler so I'm thinking that if they pass the app
store criteria that perhaps Pharo or another Smalltalk could also do so.
Thanks for the video link, I'll check it out.
On Wed, Dec 10, 2014 at 4:53 PM, kilon alios <kilon.alios(a)gmail.com> wrote:
> I cant answer your JSON question but I can answer the other two questions
> a) iOS b) Pharo video tutorial
>
> a) as far iOS is concerned, yes pharo runs fine on it. I am not so sure
> about the new vm Cog but there are 2 commercial pharo apps by the same
> developer on Apple Story one is called DrGeo, which is a very cool app for
> teaching kids and grown apps about geometry and iStoa which is another
> educational app. So yes pharo looks fine on iOS platform.
>
> b) about video tutorial, I am actually making a series of tutorial that I
> call "Pharo Video Tutorial" using Pharo 3 and now I am using Pharo 4 , I
> like to teach people the cutting edge and you can find a playlist with
> those tutorial here
>
>
> https://www.youtube.com/watch?v=Ol5ivaEATLQ&list=PLqbtQ7OkSta0ULYAd7Qdxof85…
>
> you can ommit the first one is about a general intro to pharo and the
> second which is how to install pharo , the rest are all 100% practical and
> I try to keep the blah blah to a minimum. Excluding the first hour you
> have a total of 3 hours cut down to 10 minutes more or less video tutorials
> that will give you a very solid introduction to Pharo. Is an ongoing effort
> so subscribe to be notified about new tutorials.
>
> On Wed, Dec 10, 2014 at 10:26 PM, dboeren <boerend(a)gmail.com> wrote:
>
>> Now that my image is working properly again and the fires have been put
>> out,
>> I wanted to introduce myself a bit better...
>>
>> My name is David Boeren. I first learned Smalltalk back in college many
>> years ago, we used Smalltalk V in an object oriented programming class I
>> took which was first-half Smalltalk, second-half C++. This would be about
>> 1992 I think? In recent years I've mainly been using Java, with
>> occasional
>> Python dabblings. I remember installing Squeak once or twice over the
>> years, but to be honest it felt a bit clunky, perhaps this was just an
>> early
>> primitive version or whatever.
>>
>> Recently, I've been getting the itch to try out some different
>> languages. I
>> was kind of looking at Scala or Clojure, one co-worker suggested Erlang,
>> and
>> so forth. But after doing a brief review I ended up coming back to
>> Smalltalk which even after all these years still stands right up with the
>> cutting edge I think. Sure, there are a few things that I think would be
>> a
>> little different if it were designed today like tuple support or whatever,
>> but it feels like the right choice for something I'm going to use mainly
>> for
>> "fun" projects and the interactive environment is awesome.
>>
>>
>> One thing I wanted to ask about is the status of getting Pharo running on
>> iOS (or at least iPad). I found some old posts but nothing much within
>> the
>> last couple of years. I know there were app store policy issues in the
>> past
>> but I think that Apple has opened things up a bit since then, you can now
>> get Pythonista in the app store, or Codea. Is there still an obstacle or
>> is
>> it just something that hasn't been gotten around to yet? I'd love to get
>> it
>> running on my iPad Mini and be able to transmit code back and forth
>> between
>> there and my laptop to work on it wherever I'm at.
>>
>>
>> Second, I'm running into an oddity and I'm not sure what I'm doing wrong
>> or
>> whether this is a bug of some sort, this has to do with trying to replace
>> unicode characters in a string which seems like it should be a
>> straightforward operation. Here is my code:
>>
>> "Fetch the raw JSON data from dtdb.co"
>> response := 'http://dtdb.co/api/cards/' asUrl retrieveContents
>> asString.
>>
>> "Clean up the data a bit to make it a little more regular"
>> response := response copyReplaceAll: 'null' with: '""'.
>> response := response copyReplaceAll: '\u2022' with: ','.
>> response := response copyReplaceAll: '\u009e' with: 'e'.
>>
>> Basically I'm just pulling some JSON data and then doing a few string
>> replacements to make the data suit my needs. The first one works. The
>> second one works. Since the third one ALSO uses a \uXXXX code I would
>> expect it to work too, but it does not - the accented characters are still
>> there.
>>
>> To get a bit more visibility into this, I copied the CopyReplaceAll code
>> from SequenceableCollection into a scratch class method and adding some
>> Transcript output:
>>
>> copyReplaceIn: aString All: oldSubCollection with: newCollection
>> "Answer a copy of the receiver in which all occurrences of
>> oldSubCollection have been replaced by newCollection "
>>
>> | startSearch currentIndex endIndex |
>>
>> Transcript show: 'start' ; cr.
>> startSearch := 1.
>> [(currentIndex := aString indexOfSubCollection: oldSubCollection
>> startingAt: startSearch) > 0]
>> whileTrue: [
>> Transcript show: 'Found at index ' ; show:
>> currentIndex ; cr.
>> endIndex := currentIndex + oldSubCollection size
>> - 1.
>> aString := aString
>> copyReplaceFrom: currentIndex
>> to: endIndex
>> with: newCollection.
>> startSearch := currentIndex +
>> newCollection size].
>> Transcript show: 'done' ; cr.
>> ^ aString
>>
>> A minimal test seemed to work:
>> HelloWorld copyReplaceIn: 'R\u00e9my Lapointe' All: '\u00e9' with: 'e'.
>>
>> start
>> Found at index 2
>> done
>>
>> Testing this with the real data worked too:
>> HelloWorld copyReplaceIn: ('http://dtdb.co/api/cards/' asUrl
>> retrieveContents asString) All: '\u00e9' with: 'e'.
>> start
>> Found at index 22379
>> Found at index 22500
>> done
>>
>>
>> However, when I went back to using the regular copyReplaceAll:With: method
>> it does not work and I'm not sure why. When it executes this:
>> aString indexOfSubCollection: oldSubCollection startingAt: startSearch
>>
>> The value comes back as 0 even though it's the same data from
>> 'http://dtdb.co/api/cards/' asUrl retrieveContents asString (I added a
>> "self
>> halt" to be able to step into the method and view the variable values),
>> and
>> I'm not sure what the difference is. There shouldn't be a limit on the
>> size
>> of the collection, should there? The whole thing is around 116k which is
>> big but not ridiculously so. It is however big enough that the debugger
>> can't show the whole value, or at least I haven't found a way to do so.
>>
>>
>> And last, is there a good video tutorial for the Pharo beginner on how to
>> use the various browsers, debugger, tools, etc... that come with Pharo? I
>> would like to start learning more about the best ways to use these in my
>> development processes. I'm also having a lot of trouble finding the
>> correct
>> classes and message for what I want to do, searching online w/ Google
>> often
>> seem to turn up outdated information (or for a different smalltalk flavor)
>> and it can take a while to figure out the correct way to do things. Is
>> there a good central reference for the APIs somewhere? I know that you
>> can
>> search in the browser but I usually don't know the name to search for. It
>> would be good to have a handy reference detailing how to do all the
>> commonplace stuff.
>>
>> Thanks!
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/New-Pharo-user-some-questions-tp4795325.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>
Dec. 11, 2014