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
May 2020
- 70 participants
- 337 messages
Re: [Pharo-users] mentor question 4
by Stéphane Ducasse
> On 11 May 2020, at 23:19, Richard O'Keefe <raoknz(a)gmail.com> wrote:
>
> I was saying that I expected #($a $b $c) asString ==> 'abcâ.
To me it makes no sense.
I do not understand what is asString in fact.
> If you want something that can be read back, that's what #storeString is for,
>
> On Tue, 12 May 2020 at 01:28, Stéphane Ducasse
> <stephane.ducasse(a)inria.fr> wrote:
>>
>>
>>
>> On 5 May 2020, at 16:16, Richard O'Keefe <raoknz(a)gmail.com> wrote:
>>
>> By the way, while playing with this problem, I ran into a moderately
>> painful issue.
>>
>> There is a reason that Smalltalk has both #printString (to get a
>> printable representation of an object) and #asString (to convert a
>> sequence to another kind of sequence with the same elements.) If I
>> *want* #printString, I know where to find it. The definition in my
>> Smalltalk no reads
>>
>> asString
>> "What should #($a $b $c) do?
>> - Blue Book, Inside Smalltalk, Apple Smalltalk-80:
>> there is no #asString.
>> - ANSI, VW, Dolphin, CSOM:
>> #asString is defined on characters and strings
>> (and things like file names and URIs that are sort of strings),
>> so expect an error report.
>> - VisualAge Smalltalk:
>> '($a $b $c)'
>> - Squeak and Pharo:
>> '#($a $b $c)'
>> - GNU Smalltalk, Smalltalk/X, and astc:
>> 'abc'
>> I don't intend any gratuitous incompatibility, but when there
>> is no consensus to be compatible with, one must pick something,
>> and this seems most useful.
>> "
>> ^String withAll: self
>>
>> Does anyone here know WHY Squeak and Pharo do what they do here?
>>
>>
>> Oops I did not see the quotes on my screen..
>>
>> #( a b c) asString
>>>>> '#(#a #b #c)â
>>
>> this is unclear to me why this is not good but I have no strong opinion
>> that this is good.
>>
>> I worked on printString for literals because I wanted to have
>> self evaluating properties for basic literal like in Scheme and others.
>> where
>> #t
>>>>>
>> #t
>>
>> And I payed attention that we get the same for literal arrays.
>> Now the conversion is open to me.
>>
>> #($a $b $c) asString
>>>>>
>> '#($a $b $c)â
>>
>> In fact I do not really understand why a string
>>
>> #($a $b $c) asString would be '(a b c)â
>> and its use
>> if this is to nicely display in the ui I would have
>> displayString doing it.
>>
>> S.
>>
>>
>>
>> On Wed, 6 May 2020 at 01:20, Richard O'Keefe <raoknz(a)gmail.com> wrote:
>>
>>
>> The irony is that the code I was responding to ISN'T obviously correct.
>> Indeed, I found it rather puzzling.
>> The problem specification says that the input string may contain digits
>> AND SPACES. The original message includes this:
>>
>> Strings of length 1 or less are not valid. Spaces are allowed in the
>> input, but they should be stripped before checking. All other
>> non-digit characters are disallowed.
>>
>> Now it isn't clear what "disallowed" means. I took it to mean "may occur and
>> should simply mean the input is rejected as invalid." Perhaps "may not occur"
>> was the intention. So we shall not quibble about such characters.
>>
>> But I can't for the life of me figure out how Trygve's code checks for spaces.
>> One reason this is an issue is that the behaviour of #digitValue is not
>> consistent between systems.
>> Character space digitValue
>> does not exist in the ANSI standard
>> answers -1 in many Smalltalks (which is a pain)
>> answers a positive integer that can't be mistake for a digit in my Smalltalk
>> raises an exception in some Smalltalks.
>>
>> This is a comment I now have in my Smalltalk library for #digitValue
>> "This is in the Blue Book, but unspecified on non-digits.
>> Squeak, Pharo, Dolphin, VW, VAST, and Apple Smalltalk-80
>> answer -1 for characters that are not digits (or ASCII letters),
>> which is unfortunate but consistent with Inside Smalltalk
>> which specifies this result for non-digits.
>> ST/X and GST raise an exception which is worse.
>> Digitalk ST/V documentation doesn't specify the result.
>> This selector is *much* easier to use safely if it
>> returns a 'large' (>= 36) value for non-digits."
>>
>> Let's compare three versions, the two I compared last time,
>> and the "version A" code I discussed before, which to my mind
>> is fairly readable.
>>
>> "Don't add slowness": 1 (normalised time)
>> "Trygve's code": 6.5
>> "High level code": 30.6 (or 4.7 times slower than Trygve's)
>>
>> Here's the "High level code".
>> ^(aString allSatisfy: [:each | each isSpace or: [each isDigit]]) and: [
>> |digitsReverse|
>> digitsReverse := (aString select: [:each | each isDigit]) reverse.
>> digitsReverse size > 1 and: [
>> |evens odds evenSum oddSum|
>> odds := digitsReverse withIndexSelect: [:y :i | i odd].
>> evens := digitsReverse withIndexSelect: [:x :i | i even].
>> oddSum := odds detectSum: [:y | y digitValue].
>> evenSum := evens detectSum: [:x |
>> #(0 2 4 6 8 1 3 5 7 9) at: x digitValue + 1].
>> (oddSum + evenSum) \\ 10 = 0]]
>>
>> This is the kind of code I was recommending that Roelof write.
>>
>> As a rough guide, by counting traversals (including ones inside existing
>> methods), I'd expect the "high level" code to be at least 10 times slower
>> than the "no added slowness" code.
>>
>> We are in vehement agreement that there is a time to write high level
>> really obvious easily testable and debuggable code, and that's most
>> of the time, especially with programming exercises.
>>
>> I hope that we are also in agreement that factors of 30 (or even 6)
>> *can* be a serious problem. I mean, if I wanted something that slow,
>> I'd use Ruby.
>>
>> I hope we are also agreed that (with the exception of investigations
>> like this one) the time to hack on something to make it faster is AFTER
>> you have profiled it and determined that you have a problem.
>>
>> But I respectfully suggest that there is a difference taking slowness OUT
>> and simply not going out of your way to add slowness in the first place.
>>
>> I'd also like to remark that my preference for methods that traverse a
>> sequence exactly once has more to do with Smalltalk protocols than
>> with efficiency. If the only method I perform on an object is #do:
>> the method will work just as well for readable streams as for
>> collections. If the only method I perform on an object is #reverseDo:
>> the method will work just as well for Read[Write]Streams as for
>> SequenceReadableCollections, at least in my library. It's just like
>> trying to write #mean so that it works for Durations as well as Numbers.
>>
>> Oh heck, I suppose I should point out that much of the overheads in
>> this case could be eliminated by a Self-style compiler doing dynamic
>> inlining + loop fusion. There's no reason *in principle*, given enough
>> people, money, and time, that the differences couldn't be greatly
>> reduced in Pharo.
>>
>> On Tue, 5 May 2020 at 21:50, Trygve Reenskaug <trygver(a)ifi.uio.no> wrote:
>>
>>
>> Richard,
>>
>> Thank you for looking at the code. It is comforting to learn that the code has been executed for a large number of examples without breaking. The code is not primarily written for execution but for being read and checked by the human end user. It would be nice if we could also check that it gave the right answers, but I don't know how to do that.
>>
>> The first question is: Can a human domain expert read the code and sign their name for its correctness?
>>
>>
>> When this is achieved, a programming expert will transcribe the first code to a professional quality program. This time, the second code should be reviewed by an independent programmer who signs their name for its correct transcription from the first version.
>>
>> --Trygve
>>
>> PS: In his 1991 Turing Award Lecture, Tony Hoare said: "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
>>
>> --Trygve
>>
>> On tirsdag.05.05.2020 04:41, Richard O'Keefe wrote:
>>
>> As a coding experiment, I adapted Trygve Reenskoug's code to my
>> Smalltalk compiler, put in my code slightly tweaked, and benchmarked
>> them on randomly generated data.
>>
>> Result: a factor of 6.3.
>>
>> In Squeak it was a factor of ten.
>>
>> I had not, in all honesty, expected it to to be so high.
>>
>> On Tue, 5 May 2020 at 02:00, Trygve Reenskaug <trygver(a)ifi.uio.no> wrote:
>>
>> A coding experiment.
>> Consider a Scrum development environment. Every programming team has an end user as a member.
>> The team's task is to code a credit card validity check.
>> A first goal is that the user representative shall read the code and agree that it is a correct rendering of their code checker:
>>
>> luhnTest: trialNumber
>> | s1 odd s2 even charValue reverse |
>> -----------------------------------------------
>> " Luhn test according to Rosetta"
>> "Reverse the order of the digits in the number."
>> reverse := trialNumber reversed.
>> "Take the first, third, ... and every other odd digit in the reversed digits and sum them to form the partial sum s1"
>> s1 := 0.
>> odd := true.
>> reverse do:
>> [:char |
>> odd
>> ifTrue: [
>> s1 := s1 + char digitValue.
>> ].
>> odd := odd not
>> ].
>> "Taking the second, fourth ... and every other even digit in the reversed digits:
>> Multiply each digit by two and sum the digits if the answer is greater than nine to form partial sums for the even digits"
>> "The subtracting 9 gives the same answer. "
>> "Sum the partial sums of the even digits to form s2"
>> s2 := 0.
>> even := false.
>> reverse do:
>> [:char |
>> even
>> ifTrue: [
>> charValue := char digitValue * 2.
>> charValue > 9 ifTrue: [charValue := charValue - 9].
>> s2 := s2 + charValue
>> ].
>> even := even not
>> ].
>> "If s1 + s2 ends in zero then the original number is in the form of a valid credit card number as verified by the Luhn test."
>> ^(s1 + s2) asString last = $0
>> ---------------------------------
>> Once this step is completed, the next step will be to make the code right without altering the algorithm (refactoring). The result should be readable and follow the team's conventions.
>>
>>
>> P.S. code attached.
>>
>>
>> --
>>
>> The essence of object orientation is that objects collaborate to achieve a goal.
>> Trygve Reenskaug mailto: trygver(a)ifi.uio.no
>> Morgedalsvn. 5A http://folk.uio.no/trygver/
>> N-0378 Oslo http://fullOO.info
>> Norway Tel: (+47) 468 58 625
>>
>>
>>
>> --------------------------------------------
>> Stéphane Ducasse
>> http://stephane.ducasse.free.fr / http://www.pharo.org
>> 03 59 35 87 52
>> Assistant: Julie Jonas
>> FAX 03 59 57 78 50
>> TEL 03 59 35 86 16
>> S. Ducasse - Inria
>> 40, avenue Halley,
>> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
>> Villeneuve d'Ascq 59650
>> France
>>
>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Need help putting my Pharo package under source control
by Stéphane Ducasse
I should go over it because I was working on the mooc and now I should remove all the discussion about Monticello
You should have a look at the new chapters about git in PBE 80 of 2020 :)
> I read the section in 2018-09-29-UPDATEDPHAROBYEXAMPLE:
>
> "Monticello packagesâ just after Figure 3-27
>
> I have a smalltalkhub account and created a repository:
> MCHttpRepository
> location: 'http://smalltalkhub.com/mc/MichaelKentBurns/FredsLunch/main'
> user: ''
> password: â'
>
> In Pharo I registered this as a new smalltalkhub repository:
> 'http://smalltalkhub.com/mc/MichaelKentBurns/FredsLunch/mainâ
>
> And it shows up in the repository list for my package.
>
> Then I think Iâm supposed to poke âSaveâ.
> It was kind of sketchy and popped up exception dialogs while I was typing my comment, but eventually it worked.
>
> I was able to download the resultant .mcz file and unzip it, then change the ^M to newlines to get a readable source.
>
> Iâm not really happy about this process.
>
> I would like to actually save this into my GitHub repository.
> The document mentioned at the top mentions using git, but just says:
>
> There is a chapter in preparation on how to use Git with Pharo. Request it on the Pharo mailing list.
>
> Question 1: Is there such a document? If so, can you point me to it?
>
> Question 2: Is there a way to fileOut a class, or a package?
>
>
>
>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] git and Pharo new book...
by Stéphane Ducasse
Did you see that you can add plugins to Iceberg.
So you can have a Gitea plugin because github is managed as a plugin.
S.
>> This is perfect timing, as I have started to slowly migrate my own repos
>> from SmalltalkHub to a simple, self hosted and self contained Gitea[1]
>
> Hi Offray,
>
> I run Gitea on a Raspberry Pi at home. I have a couple of scripts that
> back up the Gitea data, encrypt the backup with GPG, then uploads
> somewhere. Happy to share if you want them.
>
> On the topic, Iceberg works fine with Gitea. My SOP as follows:
>
> - create repo using Gitea web interface
> - using command line, clone locally via ssh
> - using command line, 'git remote add ...'
>
> Then in Iceberg use the local clone.
>
> Pierce
>
>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Pharo-Sound
by Stéphane Ducasse
> On 14 May 2020, at 15:44, Russ Whaley <whaley.russ(a)gmail.com> wrote:
>
> Okay, so I may just have a compatibility issue w/v8, I suppose. The suggestions on external audio, etc., are great - and a future need for me for sure, but right now, I'd settle for a beep :) - as I'm having troubles (another post on Spec2) updating my display with a 'Correct' or 'Incorrect' - between normal refreshes... so I just wanted an audible beep to let me know things were working. I created a Logger class where I can log and see (in the log) that all the functional code is getting processed properly - I just can't seem to get it to the display.
>
> I may try the FFI route - but it looks to be quite a bit more than I need right now.
>
> Is there a way to completely remove the PharoSound 'package'? It's possible, with me trying to figure out how to use it, I ran something that disabled it in my version. Reloading it didn't help, but perhaps if I could get it completely deleted?
go the repository browser, select it and press unload.
S/
>
> Thanks all!
> Russ
>
> On Thu, May 14, 2020 at 9:36 AM Stéphane Ducasse <stephane.ducasse(a)inria.fr <mailto:stephane.ducasse@inria.fr>> wrote:
> Hi russ
>
> I do not know if the catalog is referring the latest version but in anycase the plugins are all using old libraries and do not really work anymore (because not
> available anymore).
>
> We were discussing monday about it and to propose a binding to more recent libraries such as openAV
> We need help there.
>
> S.
>
>> On 13 May 2020, at 20:49, Russ Whaley <whaley.russ(a)gmail.com <mailto:whaley.russ@gmail.com>> wrote:
>>
>> I'm using Pharo 8 stable (64bit) version.
>>
>> I pulled PharoSound from the Catalog and installed. Installed fine, no errors.
>>
>> I went to the comments on the abstract class. Copied the examples to the Playground, ran them - worked fine (although I don't know how to stop the dang PluckedString example!!)... I digress :)
>>
>> I created my own subclass to play specific sounds at certain events in my application. Worked well. A day later - I have no sound in my image at all now. Nothing works. I reinstalled from the Catalog. Ran the code listed in the AbstractSound comments - nothing.
>>
>> I installed a new Pharo 8 stable 64-bit image - pulled PharoSound in, copied the sampe code from AbstractSound comments... and it worked just fine.
>>
>> Any ideas how I can get sound to work again on my original image? For me, it is a real pain to try and migrate all my code over to a new image. It is apparently a character flaw on my part, but it takes me hours to get Git/Iceberg working properly on a new image. (yes, I'm ashamed). I see a new book on the topic, but I had been following that book while it was wip, and Git/Iceberg just whips my butt. But if going to a new image is the solution, I'll try, try again.
>>
>> What do you think?
>>
>> Thanks,
>> Russ
>>
>> --
>> Russ Whaley
>> whaley.russ(a)gmail.com <mailto:whaley.russ@gmail.com>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr <http://stephane.ducasse.free.fr/> / http://www.pharo.org <http://www.pharo.org/>
> 03 59 35 87 52
> Assistant: Julie Jonas
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
>
>
> --
> Russ Whaley
> whaley.russ(a)gmail.com <mailto:whaley.russ@gmail.com>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] git and Pharo new book...
by Stéphane Ducasse
if you want to contribute to a chapter on other than github solutions.
I would be happy to help editing such chapter.
If you want to you can do a PR with a chapter.
S
> On 14 May 2020, at 03:22, Pierce Ng <pierce(a)samadhiweb.com> wrote:
>
> On Wed, May 13, 2020 at 11:07:00AM -0500, Offray Vladimir Luna Cárdenas wrote:
>> This is perfect timing, as I have started to slowly migrate my own repos
>> from SmalltalkHub to a simple, self hosted and self contained Gitea[1]
>
> Hi Offray,
>
> I run Gitea on a Raspberry Pi at home. I have a couple of scripts that
> back up the Gitea data, encrypt the backup with GPG, then uploads
> somewhere. Happy to share if you want them.
>
> On the topic, Iceberg works fine with Gitea. My SOP as follows:
>
> - create repo using Gitea web interface
> - using command line, clone locally via ssh
> - using command line, 'git remote add ...'
>
> Then in Iceberg use the local clone.
>
> Pierce
>
>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Need help with Spec2
by Stéphane Ducasse
> On 13 May 2020, at 20:42, Russ Whaley <whaley.russ(a)gmail.com> wrote:
>
> I've been using the Spec2-wip.pdf - dated Feb 24, 2020. Is there a newer version? I see something updated about TinyChat - but I don't know how to get that as a pdf, and I doubt TinyChat will address my issues below.
Not yet.
> I am using SpPresenter - with SpBoxLayouts for labels and buttons. (Pharo 8 stable 64bit)
>
> I've been able to figure out (in a very heavy-handed way) how to update the widgets from my model object, and when the UI refreshes (on its own) my data appears. Very good.
>
> What I can't seem to understand is, when model updates, there are times I want it to redisplay NOW - for instance, I want to display a 'saved' or 'correct' in a text field, for just a second or two, then allow the normal model update and display.
>
> In my example, I have a button with a label (SpPresenter>>newButton) label: 'ABC'.
>
> Once my model updates (with the button press action: ), the model is updated and the button label with then be 'DEF' and displays just fine.
>
> However, what I'd like to be able to do is to update the button label (or any other widget label) and have it display immediately... something like, the button says 'ABC', I press the button, then it says 'Correct!' (pause for a second) and then proceeds with the normal update/redisplay process where the button label then displays 'DEF'. This example is changing a label, but I'd like to also change icons, colors, etc.
>
> Clear? So I think my questions are:
>
> How do I tell a particular widget to redisplay?
> And if I can't, how can I tell the window to redisplay.
> how can I pause (very short - just to let the temporary change be visible for a short time) and then allow the normal processing continue - resetting labels, icons, colors, etc. (I'm using '1 seconds asDelay wait.')
> and since I've been talking about buttons - SpButtonPresenter - I don't see how to control width and height - all the way up through the hierarchy. If buttons share a layout (SpBoxLayout) row or column, those are all the same size (although I can't seem to control that sizing). Buttons in the next layout>row - are huge. I'd like to be able to set their size specifically (then I can work on making them relative to the extent later).
> Thanks for listening.
>
> --
> Russ Whaley
> whaley.russ(a)gmail.com <mailto:whaley.russ@gmail.com>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Pharo-Sound
by Russ Whaley
Okay, so I may just have a compatibility issue w/v8, I suppose. The
suggestions on external audio, etc., are great - and a future need for me
for sure, but right now, I'd settle for a beep :) - as I'm having troubles
(another post on Spec2) updating my display with a 'Correct' or 'Incorrect'
- between normal refreshes... so I just wanted an audible beep to let me
know things were working. I created a Logger class where I can log and see
(in the log) that all the functional code is getting processed properly - I
just can't seem to get it to the display.
I may try the FFI route - but it looks to be quite a bit more than I need
right now.
Is there a way to completely remove the PharoSound 'package'? It's
possible, with me trying to figure out how to use it, I ran something that
disabled it in my version. Reloading it didn't help, but perhaps if I
could get it completely deleted?
Thanks all!
Russ
On Thu, May 14, 2020 at 9:36 AM Stéphane Ducasse <stephane.ducasse(a)inria.fr>
wrote:
> Hi russ
>
> I do not know if the catalog is referring the latest version but in
> anycase the plugins are all using old libraries and do not really work
> anymore (because not
> available anymore).
>
> We were discussing monday about it and to propose a binding to more recent
> libraries such as openAV
> We need help there.
>
> S.
>
> On 13 May 2020, at 20:49, Russ Whaley <whaley.russ(a)gmail.com> wrote:
>
> I'm using Pharo 8 stable (64bit) version.
>
> I pulled PharoSound from the Catalog and installed. Installed fine, no
> errors.
>
> I went to the comments on the abstract class. Copied the examples to the
> Playground, ran them - worked fine (although I don't know how to stop the
> dang PluckedString example!!)... I digress :)
>
> I created my own subclass to play specific sounds at certain events in my
> application. Worked well. A day later - I have no sound in my image at
> all now. Nothing works. I reinstalled from the Catalog. Ran the code
> listed in the AbstractSound comments - nothing.
>
> I installed a new Pharo 8 stable 64-bit image - pulled PharoSound in,
> copied the sampe code from AbstractSound comments... and it worked just
> fine.
>
> Any ideas how I can get sound to work again on my original image? For me,
> it is a real pain to try and migrate all my code over to a new image. It
> is apparently a character flaw on my part, but it takes me hours to get
> Git/Iceberg working properly on a new image. (yes, I'm ashamed). I see a
> new book on the topic, but I had been following that book while it was wip,
> and Git/Iceberg just whips my butt. But if going to a new image is the
> solution, I'll try, try again.
>
> What do you think?
>
> Thanks,
> Russ
>
> --
> Russ Whaley
> whaley.russ(a)gmail.com
>
>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Julie Jonas
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
>
--
Russ Whaley
whaley.russ(a)gmail.com
May 14, 2020
Re: [Pharo-users] Uptime
by Stéphane Ducasse
Hi vince
Iâm often working in the alpha version and it is stable but from time to time I have some crashes.
In headless mode and interaction you have processes that can lock the system or others and we got some GC memory corruption.
This is why we will introduce TaskIt-Core in Pharo 90.
S
> On 14 May 2020, at 00:21, Vince Refiti <vince.refiti(a)trapezegroup.com.au> wrote:
>
> Hello Sven
>
> This is the kind of thing I like to see. Gives me more confidence in recommending Pharo to management for production use.
>
> Just some things that still concern me though: Why are people surprised at discovering that Pharo is capable of such uptimes? Are people experiencing instability with Pharo in production settings? If so, what kind of instability are people experiencing?
>
> Thanks, Vince
>
> -----Original Message-----
> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org <mailto:pharo-users-bounces@lists.pharo.org>> On Behalf Of Sven Van Caekenberghe
> Sent: Tuesday, 12 May 2020 6:06 PM
> To: Pharo users <pharo-users(a)lists.pharo.org <mailto:pharo-users@lists.pharo.org>>
> Subject: [Pharo-users] Uptime
>
> EXTERNAL: Do not click links or open attachments if you do not recognize the sender.
>
> Hi,
>
> So here is a little anecdote from the real world. I was planning to update the OS on my Linux server, from Ubuntu 18.04 LTS to 20.04 LTS (Long Term Support). This small (Digital Ocean, 1GB RAM, 1 Core) cloud server runs 3 Pharo images with public facing web sites.
>
> The machine itself reports:
>
> $ uptime
> 12:37:50 up 530 days, 21:46, 1 user, load average: 0.02, 0.04, 0.01
>
> which means it hasn't been powered down or didn't restart in 530 days.
>
> I was surprised to discover that 2 of the Pharo images on that machine did just as well:
>
> $ ./repl.sh
> Connecting to Telnet REPL at locahost:41011 Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Neo Console Pharo-7.0+alpha.build.660.sha.2eb9bd2f41e7b0bd8f9f4190906910f83c178ab1 (32 Bit)
> pharo> get system.uptime
> 405 days 20 hours 29 minutes
> pharo> quit
> Bye!
>
> $ ./repl.sh
> Connecting to Telnet REPL at locahost:41001 Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> Neo Console Pharo4.0 of 18 March 2013 update 40620
>> get system.uptime
> 530 days 21 hours 44 minutes
>> quit
> Bye!
>
> So both Pharo 7 and Pharo 4 kept on doing their jobs for a very long time. I think this is a testament to the stability of Pharo and to what is possible.
>
> Regards,
>
> Sven
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> https://urldefense.com/v3/__http://pharo.org__;!!I_DbfM1H!U29_nUf8k6rmGjsp2… <https://urldefense.com/v3/__http://pharo.org__;!!I_DbfM1H!U29_nUf8k6rmGjsp2…>
> https://urldefense.com/v3/__http://association.pharo.org__;!!I_DbfM1H!U29_n… <https://urldefense.com/v3/__http://association.pharo.org__;!!I_DbfM1H!U29_n…>
> https://urldefense.com/v3/__http://consortium.pharo.org__;!!I_DbfM1H!U29_nU… <https://urldefense.com/v3/__http://consortium.pharo.org__;!!I_DbfM1H!U29_nU…>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Pharo-Sound
by Stéphane Ducasse
Hi russ
I do not know if the catalog is referring the latest version but in anycase the plugins are all using old libraries and do not really work anymore (because not
available anymore).
We were discussing monday about it and to propose a binding to more recent libraries such as openAV
We need help there.
S.
> On 13 May 2020, at 20:49, Russ Whaley <whaley.russ(a)gmail.com> wrote:
>
> I'm using Pharo 8 stable (64bit) version.
>
> I pulled PharoSound from the Catalog and installed. Installed fine, no errors.
>
> I went to the comments on the abstract class. Copied the examples to the Playground, ran them - worked fine (although I don't know how to stop the dang PluckedString example!!)... I digress :)
>
> I created my own subclass to play specific sounds at certain events in my application. Worked well. A day later - I have no sound in my image at all now. Nothing works. I reinstalled from the Catalog. Ran the code listed in the AbstractSound comments - nothing.
>
> I installed a new Pharo 8 stable 64-bit image - pulled PharoSound in, copied the sampe code from AbstractSound comments... and it worked just fine.
>
> Any ideas how I can get sound to work again on my original image? For me, it is a real pain to try and migrate all my code over to a new image. It is apparently a character flaw on my part, but it takes me hours to get Git/Iceberg working properly on a new image. (yes, I'm ashamed). I see a new book on the topic, but I had been following that book while it was wip, and Git/Iceberg just whips my butt. But if going to a new image is the solution, I'll try, try again.
>
> What do you think?
>
> Thanks,
> Russ
>
> --
> Russ Whaley
> whaley.russ(a)gmail.com <mailto:whaley.russ@gmail.com>
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
May 14, 2020
Re: [Pharo-users] Pharo-Sound
by VERHAEGHE Benoit
Hello,
I don't know what is exactly your problem.
If you want I have developed a FFI binding to VLC.
(https://github.com/badetitou/Pharo-LibVLC)
<https://github.com/badetitou/Pharo-LibVLC>
So you can play any kind of audio file (or stream) from pharo.
If you need help you can send me a direct message.
Cheers,
Benoît
Le 14/05/2020 à 11:39, Ben Coman a écrit :
>
>
> On Thu, 14 May 2020 at 02:50, Russ Whaley <whaley.russ(a)gmail.com
> <mailto:whaley.russ@gmail.com>> wrote:
>
> I'm using Pharo 8 stable (64bit) version.
>
> I pulled PharoSound from the Catalog and installed. Installed
> fine, no errors.
>
> I went to the comments on the abstract class. Copied the examples
> to the Playground, ran them - worked fine (although I don't know
> how to stop the dang PluckedString example!!)... I digress :)
>
> I created my own subclass to play specific sounds at certain
> events in my application. Worked well. A day later - I have no
> sound in my image at all now. Nothing works. I reinstalled from
> the Catalog. Ran the code listed in the AbstractSound comments -
> nothing.
>
> I installed a new Pharo 8 stable 64-bit image - pulled PharoSound
> in, copied the sampe code from AbstractSound comments... and it
> worked just fine.
>
> Any ideas how I can get sound to work again on my original image?Â
> For me, it is a real pain to try and migrate all my code over to a
> new image. It is apparently a character flaw on my part, but it
> takes me hours to get Git/Iceberg working properly on a new image.
> (yes, I'm ashamed). I see a new book on the topic, but I had been
> following that book while it was wip, and Git/Iceberg just whips
> my butt. But if going to a new image is the solution, I'll try,
> try again.
>
> What do you think?
>
>
> Sorry I don't the answer Russ, but just to piggy-back your query...
> @all, is sound something that we should now be starting to do via FFI
> rather than existing plugins? [but pls prioritize Russ's question]
> cheers -ben
--
Benoît Verhaeghe
badetitou.github.io
benoit.verhaeghe(a)berger-levrault.com
R&D Engineer at Berger-Levrault
benoit.verhaeghe(a)inria.fr
PHD student at Inria-Lille--Nord-Europe
May 14, 2020