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
Re: [Pharo-users] how do you use scripts?
by Alexandre Bergel
Hi!
I am not sure what you mean by âscriptâ.
> - What kind of actions do you put in scripts?
I usually write two kind of scripts:
- Roassal visualizations
- Short script, usually a gofer action to load a particular application
> - Do you rely on script files stored on the disk at all?
Not at all. No idea how this work. Even if I would, I am not sure I would use it
> - Where do you store your scripts (in one folder, in many folders)?
instance method.
> - Do you version your scripts?
Using Monticello
> - Do you store them in separate files with dedicated names, or tend to put multiple snippets in one larger file?
>
No
> - Do you rely on the names of the scripts?
I rely on the method name
> - Why do you use a script file and not a class?
I solely use classes.
Alexandre
Dec. 12, 2014
Re: [Pharo-users] Extending GTSpotter
by kilon alios
could not agree more, this is a great tool with a huge potential and really
upgrades the Pharo experience.
I have not see anything similar in other IDEs I have been using in the
past.
On Fri, Dec 12, 2014 at 2:07 PM, Esteban Lorenzano <estebanlm(a)gmail.com>
wrote:
>
> shift+enter is better.
> I will remove Spotlight soon⦠honestly spotter is so much better than even
> when not everything is working perfect, is already a huge improvement
>
> Esteban
>
> On 12 Dec 2014, at 12:11, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>
> I would like to get Shift+Enter (because Cmd+Enter will be useful in other
> contexts), but we wanted to have something that can live next to the
> Spotlight for a while.
>
> But, now that we are over the first set of problems, I would like to use
> Shift+Enter. Any objections?
>
> Cheers,
> Doru
>
>
>
> On Fri, Dec 12, 2014 at 12:33 PM, stepharo <stepharo(a)free.fr> wrote:
>>
>> I got the same problem and Cmd+ENter was already used on my machine set
>> up.
>> So it was not really simple.
>>
>> Le 11/12/14 17:25, Damien Pollet a écrit :
>>
>> Cmd+Enter: âPackage'
>>>>
>>> Doru, your blog post does not mention this piece of information: how
>>> to invoke GTSpotter
>>> It does not seem to be mentioned in your announcement email either; I
>>> found it here after going through threads talking about GTSpotter.
>>>
>>> Nobody else asked for it, so I'm guessing it was well-known before and
>>> I'm the only one who failed to get addicted to whatever the shortcut
>>> was doing before? How do we make discoverable affordances for such
>>> behaviors in the image?
>>>
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>
Dec. 12, 2014
Re: [Pharo-users] Extending GTSpotter
by Esteban Lorenzano
shift+enter is better.
I will remove Spotlight soon⦠honestly spotter is so much better than even when not everything is working perfect, is already a huge improvement
Esteban
> On 12 Dec 2014, at 12:11, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>
> I would like to get Shift+Enter (because Cmd+Enter will be useful in other contexts), but we wanted to have something that can live next to the Spotlight for a while.
>
> But, now that we are over the first set of problems, I would like to use Shift+Enter. Any objections?
>
> Cheers,
> Doru
>
>
>
> On Fri, Dec 12, 2014 at 12:33 PM, stepharo <stepharo(a)free.fr <mailto:stepharo@free.fr>> wrote:
> I got the same problem and Cmd+ENter was already used on my machine set up.
> So it was not really simple.
>
> Le 11/12/14 17:25, Damien Pollet a écrit :
>
> Cmd+Enter: âPackage'
> Doru, your blog post does not mention this piece of information: how
> to invoke GTSpotter
> It does not seem to be mentioned in your announcement email either; I
> found it here after going through threads talking about GTSpotter.
>
> Nobody else asked for it, so I'm guessing it was well-known before and
> I'm the only one who failed to get addicted to whatever the shortcut
> was doing before? How do we make discoverable affordances for such
> behaviors in the image?
>
>
>
>
>
>
> --
> www.tudorgirba.com <http://www.tudorgirba.com/>
>
> "Every thing has its own flow"
Dec. 12, 2014
Re: [Pharo-users] New Pharo user, some questions
by stepharo
Le 11/12/14 14:44, phil(a)highoctane.be a écrit :
>
>
> On Thu, Dec 11, 2014 at 12:01 PM, kilon alios <kilon.alios(a)gmail.com
> <mailto:kilon.alios@gmail.com>> wrote:
>
> 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 ?
>
>
> This is an iPad2. Pure Morphic is fine, what is not is Nautilus. I
> guess with AltBrowser it would be fine.
>
> I've had a game I wrote for kids (internal stuff done for my wife's
> kids help practice) and it was fine with drag and drop and all.
>
> Now for games on iOS I do use Monkey-X. But I'd love to have a Pharo
> set of classes that would be gaming specific.
Me too.
I proposed a topic going in that direction for array based board game.
Now could you spend some time to describe what you would like and what
classes would be needed?
> We could have very fast plugins for all the game engine and script it
> with Pharo. Kind of what one does with Lua.
>
> The touch paradigm is different from what one can do on a desktop. It
> is not that Pharo has to work on an iPad. What would be nicer is to
> have an image running on it and to which one would connect remotely
> for remote coding.
Yes :)
> What I was interested in with the bluetooth keyboard project is to see
> how to have a kind of dynabook style thing. But Apple has crippled a
> lot of things, like for an external keyboard support like this one has
> to use internal undocumented APIs for the gsEvents and this will
> prevent anything to go to the AppStore. And then one sees apps like
> iAWriter which has such keyboard support, that's weird.
It depends who is the application validator. My impression is that their
process sucks.
I talked once with john and it was a bit surnatural.
> Also, as a result, you realize that there is no ESC key on an iPad,
> that you miss a ton of keys that you take for granted on a desktop.
> Also, all keyboard scancodes are different in various brands and it is
> a true ball of knots. No wonder Apple has one supersimplified protocol
> for input that prevents your from doing powerful keyboard based
> things. Meh.
>
> Long story short, Android looks much better in that regard, and that's
> where I am looking at these days.
>
> I've got a new Galaxy Alpha Octocore thing and frankly, it blows any
> iPhone 6 out of the water. I am done with iOS I'd say.
> When going to places, there are so much more Android devices than
> iDevices... These Android things are like the beige boxes of the 90's.
> You know who won at the time.
>
> So, next holidays, I'll have a look at CogDroid from JB.
Cool. JB will be happy and I hope he will push the rewrite of the event
model further.
> When one can buy a full quad core stick PC with 2G of RAM and 8G of
> storage for less than $50, well, choice is clear.
>
> An old example:
> http://www.laptopmag.com/reviews/mini-pcs/mk808-android-mini-pc
>
> That's where I want Pharo to run.
>
> Phil
>
>
> On Thu, Dec 11, 2014 at 10:09 AM, phil(a)highoctane.be
> <mailto:phil@highoctane.be> <phil(a)highoctane.be
> <mailto:phil@highoctane.be>> wrote:
>
> Pharo on iPad.
>
> http://youtu.be/7MNsUiCc5FQ
>
> Le 10 déc. 2014 21:26, "dboeren" <boerend(a)gmail.com
> <mailto:boerend@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
> <http://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.
>
>
>
>
>
>
> --
> ---
> Philippe Back
> Visible Performance Improvements
> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
> Mail:phil@highoctane.be <mailto:Mail%3Aphil@highoctane.be> | Web:
> http://philippeback.eu
> Blog: http://philippeback.be | Twitter: @philippeback
> Youtube: http://www.youtube.com/user/philippeback/videos
>
> High Octane SPRL
> rue cour Boisacq 101 | 1301 Bierges | Belgium
>
> Pharo Consortium Member - http://consortium.pharo.org/
> Featured on the Software Process and Measurement Cast -
> http://spamcast.libsyn.com
> Sparx Systems Enterprise Architect and Ability Engineering EADocX
> Value Added Reseller
>
Dec. 12, 2014
Re: [Pharo-users] Extending GTSpotter
by kilon alios
no objections here :)
On Fri, Dec 12, 2014 at 1:11 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>
> I would like to get Shift+Enter (because Cmd+Enter will be useful in other
> contexts), but we wanted to have something that can live next to the
> Spotlight for a while.
>
> But, now that we are over the first set of problems, I would like to use
> Shift+Enter. Any objections?
>
> Cheers,
> Doru
>
>
>
> On Fri, Dec 12, 2014 at 12:33 PM, stepharo <stepharo(a)free.fr> wrote:
>>
>> I got the same problem and Cmd+ENter was already used on my machine set
>> up.
>> So it was not really simple.
>>
>> Le 11/12/14 17:25, Damien Pollet a écrit :
>>
>> Cmd+Enter: âPackage'
>>>>
>>> Doru, your blog post does not mention this piece of information: how
>>> to invoke GTSpotter
>>> It does not seem to be mentioned in your announcement email either; I
>>> found it here after going through threads talking about GTSpotter.
>>>
>>> Nobody else asked for it, so I'm guessing it was well-known before and
>>> I'm the only one who failed to get addicted to whatever the shortcut
>>> was doing before? How do we make discoverable affordances for such
>>> behaviors in the image?
>>>
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
Dec. 12, 2014
Re: [Pharo-users] New Pharo user, some questions
by stepharo
> This is an iPad2. Pure Morphic is fine, what is not is Nautilus. I
> guess with AltBrowser it would be fine.
Yes one day we will have to put Nautilus to a diet.
> I've had a game I wrote for kids (internal stuff done for my wife's
> kids help practice) and it was fine with drag and drop and all.
>
> Now for games on iOS I do use Monkey-X. But I'd love to have a Pharo
> set of classes that would be gaming specific. We could have very fast
> plugins for all the game engine and script it with Pharo. Kind of what
> one does with Lua.
>
> The touch paradigm is different from what one can do on a desktop. It
> is not that Pharo has to work on an iPad. What would be nicer is to
> have an image running on it and to which one would connect remotely
> for remote coding.
>
> What I was interested in with the bluetooth keyboard project is to see
> how to have a kind of dynabook style thing. But Apple has crippled a
> lot of things, like for an external keyboard support like this one has
> to use internal undocumented APIs for the gsEvents and this will
> prevent anything to go to the AppStore. And then one sees apps like
> iAWriter which has such keyboard support, that's weird.
>
> Also, as a result, you realize that there is no ESC key on an iPad,
> that you miss a ton of keys that you take for granted on a desktop.
> Also, all keyboard scancodes are different in various brands and it is
> a true ball of knots. No wonder Apple has one supersimplified protocol
> for input that prevents your from doing powerful keyboard based
> things. Meh.
>
> Long story short, Android looks much better in that regard, and that's
> where I am looking at these days.
>
> I've got a new Galaxy Alpha Octocore thing and frankly, it blows any
> iPhone 6 out of the water. I am done with iOS I'd say.
> When going to places, there are so much more Android devices than
> iDevices... These Android things are like the beige boxes of the 90's.
> You know who won at the time.
>
> So, next holidays, I'll have a look at CogDroid from JB. When one can
> buy a full quad core stick PC with 2G of RAM and 8G of storage for
> less than $50, well, choice is clear.
>
> An old example:
> http://www.laptopmag.com/reviews/mini-pcs/mk808-android-mini-pc
>
> That's where I want Pharo to run.
>
> Phil
>
>
> On Thu, Dec 11, 2014 at 10:09 AM, phil(a)highoctane.be
> <mailto:phil@highoctane.be> <phil(a)highoctane.be
> <mailto:phil@highoctane.be>> wrote:
>
> Pharo on iPad.
>
> http://youtu.be/7MNsUiCc5FQ
>
> Le 10 déc. 2014 21:26, "dboeren" <boerend(a)gmail.com
> <mailto:boerend@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
> <http://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.
>
>
>
>
>
>
> --
> ---
> Philippe Back
> Visible Performance Improvements
> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
> Mail:phil@highoctane.be <mailto:Mail%3Aphil@highoctane.be> | Web:
> http://philippeback.eu
> Blog: http://philippeback.be | Twitter: @philippeback
> Youtube: http://www.youtube.com/user/philippeback/videos
>
> High Octane SPRL
> rue cour Boisacq 101 | 1301 Bierges | Belgium
>
> Pharo Consortium Member - http://consortium.pharo.org/
> Featured on the Software Process and Measurement Cast -
> http://spamcast.libsyn.com
> Sparx Systems Enterprise Architect and Ability Engineering EADocX
> Value Added Reseller
>
Dec. 12, 2014
Re: [Pharo-users] New Pharo user, some questions
by stepharo
> Now that my image is working properly again and the fires have been put out,
> I wanted to introduce myself a bit better...
I still do not understand what happen. Because we use Pharo heavily
around and never got that behavior.
>
> 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
Us too :)
But we are working on it. Pharo will be more than Smalltalk :)
> 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.
Many people in the Pharo community are using Pharo for making a living
with it so it may come.
>
> 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.
There is a PharoVM for iOS (now you do not get the JIT because of idiot
Apple policy).
>
>
> 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'.
You should read the chapter on Zinc-Encodings.
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessf…
>
> 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. 12, 2014
how do you use scripts?
by Tudor Girba
Hi,
As input for designing new features that better support scripting in Pharo,
we would benefit from a bit more input around the role scripts play in your
development life.
To this end, I would like to invite you to share your scripting experience.
Here are some questions to start from, but feel free to diverge:
- What kind of actions do you put in scripts?
- Do you rely on script files stored on the disk at all?
- Where do you store your scripts (in one folder, in many folders)?
- Do you version your scripts?
- Do you store them in separate files with dedicated names, or tend to put
multiple snippets in one larger file?
- Do you rely on the names of the scripts?
- Why do you use a script file and not a class?
Cheers,
Doru
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 12, 2014
Re: [Pharo-users] Roassal HTML exporter
by Tudor Girba
Nice result!
Doru
On Fri, Dec 12, 2014 at 1:20 AM, Alexandre Bergel <alexandre.bergel(a)me.com>
wrote:
>
> Hi!
>
> We have worked very hard on a Roassal exporter for the Web.
>
> Milton has produced the class RTHTML5Exporter, which may be simply invoked
> as: RTHTML5Exporter new export: aRoassalView.
>
> Check this out:
> https://dl.dropboxusercontent.com/u/31543901/RoassalHTML/index.html
>
> Try moving the mouse above the circle or dots in the curve.
>
> The html file you see from your web browser is the result of do-iting the
> following expression:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | c b c2 |
> c := RTComposer new.
>
> "======"
> b := RTGraphBuilder new.
> b view: c view.
> b edges
> connectFrom: #superclass;
> useInLayout.
>
> b edges
> if: [ :fromClass :toClass | toClass name beginsWith: 'TR' ];
> connectTo: #dependentClasses;
> color: (Color blue alpha: 0.3).
>
>
> b nodes
> if: [ :cls | cls name beginsWith: 'RT' ];
> color: Color blue.
> b nodes
> color: Color red.
> b layout cluster.
>
> b global
> normalizeSize: #numberOfMethods min: 5 max: 40 using: #sqrt;
> alphaColor: 0.4.
>
> b addAll: TRShape withAllSubclasses, RTShape withAllSubclasses.
>
> b build.
> c group.
>
> "======"
> c2 := RTCharterBuilder new.
> c2 view: c view.
>
> c2 interaction popup.
> c2 extent: 300 @ 200.
> c2 points: (RTShape withAllSubclasses sortedAs: #numberOfMethods).
> c2 connectDotColor: Color blue.
>
> c2 points: (TRShape withAllSubclasses sortedAs: #numberOfMethods).
> c2 stackX.
> c2 allY: #numberOfMethods.
> c2 connectDotColor: Color red.
>
> c2 axisX.
> c2 axisY.
> c2 build.
> c group.
> "======"
>
> c layout: RTVerticalLineLayout new.
> c propagateHighlightToAll.
> "======"
>
> legend := RTLegendBuilder new.
> legend view: c view.
> legend addText: 'This is a demonsration of a combination of builders'.
> legend addText: 'The above visualization shows the dependencies between
> Roassal and Trachel shapes.'.
> legend addText: 'Curves indicate the distribution of the number of
> methods'.
> legend build.
> "======"
>
> RTHTML5Exporter new export: c view.
> c view
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 12, 2014
Re: [Pharo-users] Extending GTSpotter
by Tudor Girba
I would like to get Shift+Enter (because Cmd+Enter will be useful in other
contexts), but we wanted to have something that can live next to the
Spotlight for a while.
But, now that we are over the first set of problems, I would like to use
Shift+Enter. Any objections?
Cheers,
Doru
On Fri, Dec 12, 2014 at 12:33 PM, stepharo <stepharo(a)free.fr> wrote:
>
> I got the same problem and Cmd+ENter was already used on my machine set up.
> So it was not really simple.
>
> Le 11/12/14 17:25, Damien Pollet a écrit :
>
> Cmd+Enter: âPackage'
>>>
>> Doru, your blog post does not mention this piece of information: how
>> to invoke GTSpotter
>> It does not seem to be mentioned in your announcement email either; I
>> found it here after going through threads talking about GTSpotter.
>>
>> Nobody else asked for it, so I'm guessing it was well-known before and
>> I'm the only one who failed to get addicted to whatever the shortcut
>> was doing before? How do we make discoverable affordances for such
>> behaviors in the image?
>>
>>
>>
>
>
--
www.tudorgirba.com
"Every thing has its own flow"
Dec. 12, 2014