[Pharo-users] Re: [ANN] class-diff: a new tool for comparing classes

2024-07-25 Thread Richard O'Keefe
nt to be shown methods inherited by *both* classes from Object (although methods inherited from Object by one class and redefined or inherited from another class by the other are ones I do want to see). On Wed, 24 Jul 2024 at 14:06, Richard O'Keefe wrote: > > Thanks for the advice about

[Pharo-users] Re: [ANN] class-diff: a new tool for comparing classes

2024-07-23 Thread Richard O'Keefe
e image > examples. In the main menu, you have "Help -> Spec 2 demo" and "Help -> Spec > 2 examples". And you also have the book in > https://github.com/SquareBracketAssociates > > Hernán > > > El mar, 23 jul 2024 a las 10:30, Richard O'Keefe

[Pharo-users] Re: [ANN] class-diff: a new tool for comparing classes

2024-07-23 Thread Richard O'Keefe
That's a very nice tool. There are two tweaks I'd like to see. Two classes having methods with the same *name* isn't the same as two classes having the same *method*. When the two classes have a method with the same name, there are at least three possibilities: - The methods are the same method

[Pharo-users] Re: Getting started with the easy projects

2024-05-17 Thread Richard O'Keefe
3 May 2024, at 14:27, Sebastian Jordan Montano < > sebastian.jor...@inria.fr> wrote: > > You have the guide how to contribute to a fix in Pharo: > https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo > > Sebastian > > - Mail original - > >

[Pharo-users] Re: Getting started with the easy projects

2024-05-03 Thread Richard O'Keefe
What I was really asking was about the very basic mechanics of it. "Where are the instructions about how to sign up" meant "do I have to register somewhere and if so where and how?" "Where are the instructions about what to do" meant "suppose I have registered and have the latest Pharo open on my l

[Pharo-users] Getting started with the easy projects

2024-04-26 Thread Richard O'Keefe
https://github.com/orgs/pharo-project/projects/8 lists some easy projects. I'd like to make a contribution. Where are the instructions on how to sign up and what to do? Fair warning, I'll probably need a bit of hand-holding...

[Pharo-users] Re: How to log pharo output to stdio safely?

2024-04-19 Thread Richard O'Keefe
In the C world, - flush forces data from user-space buffers to OS buffers - sync forces data from OS buffers to devices - there is no standard documented way to force devices to move data from buffers to persistent storage even when the device has such an operation and the OS knows how to u

[Pharo-users] Re: String concatenation performance

2024-03-18 Thread Richard O'Keefe
Let me start by giving some figures from my Smalltalk, on an Intel core I5-6200U @ 2.3 Ghz CPU laptop with 8GB of memory running Ubuntu 22.04 and gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0. Smalltalk is compiled to C then finished with the system C compiler. Static whole-program compilation is all

[Pharo-users] Re: Finding references to non existent classes in Pharo

2024-03-10 Thread Richard O'Keefe
I created a method referring to a non-existent "Snark" class. To my astonishment, "Code Search|References to it" quietly failed to do anything visible. It didn't find it, and it didn't say that it couldn't find it. However, "Code Search|Method source with it" DID find the reference. Pharo 9 and Pha

[Pharo-users] Re: "Print it" redirection

2024-02-21 Thread Richard O'Keefe
What stops you copy and paste? Using ANSI Smalltalk, you'd do [:stream | stream print: 1000 factorial; cr; close] value: (FileStream write: 'factorial.txt'. Pharo has never provided an ANSI-compatible FileStream class, which is a pain for trying to write portable code. In Pharo you have to wri

[Pharo-users] Re: A little post Why class number is an idiotic quality metric?

2024-02-10 Thread Richard O'Keefe
"First this is a stupid metrics because to have less code or less classes is super easy just remove features. For example if you want to have less classes in Pharo just remove the refactoring engine for example and you will instantaneously less class. " That's a straw man argument. When people sa

[Pharo-users] Books about Pharo

2024-01-24 Thread Richard O'Keefe
This is a new thread because it's not limited to any specific topic. If you have questions about Pharo, especially "how do I do in Pharo", you can always ask in this mailing list. You can, if you like playing Russian Roulette, ask a Large Language Model "AI". But there is an amazing resource yo

[Pharo-users] Re: Iterating over a Dictionary

2024-01-24 Thread Richard O'Keefe
This has not changed since Smalltalk-80. Running Smalltalk-80 and looking in the browser, I see Dictionary>> do: aBlock super do: [:assoc | aBlock value: assoc value]. 'super' here is Set, a Dictionary being implemented as a Set of Associations (which was always a bad idea). Dictionary>>do: h

[Pharo-users] Re: Iterating over a Dictionary

2024-01-24 Thread Richard O'Keefe
Wrong. If you want to iterate of the associations of a dictionary, you need #associationsDo:. #do: passes the *values* to the block, *NOT* the associations. On Wed, 24 Jan 2024 at 05:28, Joachim Tuchel wrote: > > AI knows little about Smalltalk ;-) > > You can use do: with each Association as a p

[Pharo-users] Re: Iterating over a Dictionary

2024-01-24 Thread Richard O'Keefe
There are many books about Smalltalk. Stephane Ducasse has made many of them available as FREE pdfs. Of course Pharo by Example would be a good start. The latest edition of Pharo by Example I have ready to hand is 8.0, 2020, where what you want is chapter 13, Collections. aCollection do: [:eleme

[Pharo-users] Re: Troubleshooting ByteArray

2024-01-17 Thread Richard O'Keefe
So the method is expecting some kind of string, but it received a ByteArray, which is NOT any kind of string. What's in the ByteArray? Where did it come from? Why isn't it a string? On Thu, 18 Jan 2024 at 04:34, sergio ruiz wrote: > > Hi, all. > > I am working on creating a PDF with Artefact >

[Pharo-users] Re: [ Security ] Accessing private information from Pharo image

2024-01-17 Thread Richard O'Keefe
Back in the days when an entire department would share something like a VAX and think themselves lucky, the advance was never to let secrets *rest* in your address space any longer than you had to. Bring the secret into memory just the instant before you need it, use it, then scrub that area of mem

[Pharo-users] Re: Smallscript - A Smalltalk-Inspired Scripting Language

2023-12-28 Thread Richard O'Keefe
Does anyone else remember F-Script? A "Smalltalk-inspired scripting language" for MacOS X, providing full interoperation with Objective C and the whole Cocoa frameworks system. The last update was 5 years ago, which is a pity, because 1. It was so well integrated with MacOS X (as it was then) that

[Pharo-users] Re: The worst programmer

2023-09-05 Thread Richard O'Keefe
>From a similar personal experience, sometimes the team leader speaks up for you and the manager fires you anyway. On Tue, 5 Sept 2023 at 22:07, Guillermo Polito wrote: > Haha, yes, it was a fun read, congrats Tim! :D > > El 5 sep. 2023, a las 10:03, Noury Bouraqadi > escribió: > > Glad you poi

[Pharo-users] Re: Picking neighbouring elements

2023-04-24 Thread Richard O'Keefe
of using > an object-oriented language. It made my day. > > I searched the Web for your Smalltalk library and found this link: > http://www.cs.otago.ac.nz/staffpriv/ok/astc-1711.tar.gz > > Is there a newer version available somewhere? > > Cheers, > Bernhard > > &

[Pharo-users] Re: Picking neighbouring elements

2023-04-21 Thread Richard O'Keefe
pperBounds. "transformed reduction" > ^strictSup reduce: sequence > > We can also use a different notation similar to a data flow: > > minimum <~ upperBounds <~ sequence > > Of course, if we know how the sequence is sorted, we should use another > algorithm. As

[Pharo-users] Re: Picking neighbouring elements

2023-04-20 Thread Richard O'Keefe
successor of x in c = the smallest element of c that is larger than x min {y | y in c . y > x} predecessor of x in c = the largest element of c that is smaller than x max {y | y in c . y < x} On Thu, 20 Apr 2023 at 21:08, Steffen Märcker wrote: > Dear Richard, > > thanks for that additional pi

[Pharo-users] Re: Collection>>reduce name clash with transducers

2023-04-20 Thread Richard O'Keefe
I've always called the block in #inject:into: the *combining* function. Perhaps the reason I don't think of it as a "reducing" function is that setOfSets inject: Set new into: [:acc :each | acc union: each] has a block that combines its arguments in a way that makes the result bigger, not smaller.

[Pharo-users] Re: Collection>>reduce name clash with transducers

2023-04-15 Thread Richard O'Keefe
general and faster: It does not create an > intermediate OrderedCollection and it treats the common case of binary > blocks efficiently. Note the implementation can more compact and optimized > if it was specialized in certain class. For instance, > SequenceableCollection allows accessing

[Pharo-users] Re: Collection>>reduce name clash with transducers

2023-04-14 Thread Richard O'Keefe
mplementations of that message. Something I consider undesirabe. > 3) Currently, I cannot think of a good name that is not too far away from > what we're familiar with. > > Do you have some constructive comments and ideas? > > Kind regards, > Steffen > > > > > Steffen Märck

[Pharo-users] Re: Collection>>reduce naming

2023-04-13 Thread Richard O'Keefe
, in some languages it seems > the same name is used for both reductions with and without an initial > value. There's even a list on WP on the matter: > https://en.wikipedia.org/wiki/Fold_%28higher-order_function%29#In_various_languages > > Kind regards, > Steffen > > Richa

[Pharo-users] Re: Collection>>reduce naming

2023-04-13 Thread Richard O'Keefe
The standard prelude in Haskell does not define anything called "fold". It defines fold{l,r}{,1} which can be applied to any Foldable data (see Data.Foldable). For technical reasons having to do with Haskell's non-strict evaluation, foldl' and foldr' also exist. But NOT "fold". https://hackage.h

[Pharo-users] Re: Collection>>reduce naming

2023-04-13 Thread Richard O'Keefe
Actually, #inject:into: is what is normally called fold or foldl, and #reduce: is commonly called fold1. It is very confusing to call foldl1 #fold:. To the best of my knowledge, the name 'reduce' comes from APL. "Z <- LO/R has the effect of placing the function LO between adjacent pairs of item

[Pharo-users] Re: Comparison of blocks

2023-04-13 Thread Richard O'Keefe
There is no agreement between Smalltalk systems about how to compare block contexts for equality. In Smalltalk-80 (and I have two versions of Smalltalk-80 to compare), block equality is identity. The same in VisualAge Smalltalk 8.6.3. The same in GNU Smalltalk. The same in Smalltalk/X-JV. Squea

[Pharo-users] Re: [vwnc] Block evaluation with n+1 arguments

2023-04-12 Thread Richard O'Keefe
You say - The source object returns multiple values as a tuple (for good reasons). - The block processes theses values but needs another argument (at the first place). On the first point, we have to take your word for it. It's not clear why you could not pass an n+1-element array to the source m

[Pharo-users] Re: [vwnc] Block evaluation with n+1 arguments

2023-04-10 Thread Richard O'Keefe
>From the slides: "What is the difference between a block and a simple object understanding #value?" The slides give the wrong answer. The right answer is that - a block can see the variables of the blocks, method, and object containing it which allows ENCAPSULATION of long term and short te

[Pharo-users] Re: Block evaluation with n+1 arguments

2023-04-10 Thread Richard O'Keefe
(1) I have #value:valueWithArguments: in my personal library. (2) The way to answer your question is to look at #valueWithArguments:, It normally goes through a primitive. However, it *does* have backup code that you could adapt. (3) Without benchmarking, it's not clear whether the cost of

[Pharo-users] Re: A blog on graph algorithms library of Pharo

2023-04-05 Thread Richard O'Keefe
Warmest congratulations to the author(s) of this library. It's a lot of work, and it's available to the Pharo community. It doesn't suit my graph-processing needs, but that doesn't stop me appreciating the contribution. On Wed, 5 Apr 2023 at 04:29, DK Goutham wrote: > Dear Pharo Users, > > Here'

[Pharo-users] Re: Wow - Chat GPT understands Smalltalk

2023-03-26 Thread Richard O'Keefe
I tried it on three "dead" languages: - a bubble-sort in Pop-2 - a system of linear equations solver in IMP-80 - the array concatenation example in SNOBOL 4 from Rosetta Code. It got the first one right -- despite 'array' access being written 'subscr(index, array)' -- and the second one almost righ

[Pharo-users] Re: Sacrilegeous question : what are compelling use cases for Pharo

2023-01-25 Thread Richard O'Keefe
To Konrad Hinsen: you HERO. On Thu, 26 Jan 2023 at 02:40, Konrad Hinsen wrote: > "Richard O'Keefe" writes: > > > Thus I hypothesise that there is room for Smalltalk as a tool for > > *generating* and configuring HPC code. > > Yes. But it will be hard

[Pharo-users] Re: Sacrilegeous question : what are compelling use cases for Pharo

2023-01-17 Thread Richard O'Keefe
Much sympathy for your life situation. Most of the Smalltalk code I personally develop is developed using a classic text editor, is batch compiled, and runs headless. Smalltalk is *STILL* an amazing language without the "addictive" IDE. (In fact the more "conventional" Smalltalk systems I use hav

[Pharo-users] Re: Sacrilegeous question : what are compelling use cases for Pharo

2023-01-17 Thread Richard O'Keefe
Back when I was a University lecturer, I sometimes amused myself by rewriting student (or other staff!) Java code in Smalltalk. I generally got about a factor of 6 smaller. Of course, that was before Java 8, which copied blocks and higher-order collection methods from Smalltalk. On Sat, 14 Jan 2

[Pharo-users] Re: IWST proceedings online

2023-01-11 Thread Richard O'Keefe
doesn't like the PDF much; other pdf tools on Ubuntu are also unhappy but not fatally so. On Thu, 12 Jan 2023 at 17:32, Richard O'Keefe wrote: > Excellent news, for which many thanks. > > On Wed, 11 Jan 2023 at 20:18, stephane ducasse > wrote: > >> Hi guys >>

[Pharo-users] Re: IWST proceedings online

2023-01-11 Thread Richard O'Keefe
Excellent news, for which many thanks. On Wed, 11 Jan 2023 at 20:18, stephane ducasse wrote: > Hi guys > > I’m happy to sahre with you this EXCELLENT news. The proceedings > of IWST 22 are now online > International Workshop on Smalltalk Technologies 2022 > > ceur

[Pharo-users] ANSI instance creation methods for RunArray

2022-12-23 Thread Richard O'Keefe
Here's a teeny tiny Christmas present: ANSI-compatible instance creation methods for RunArray. 'From Pharo9.0.0 of 11 May 2020 [Build information: Pharo-9.0.0+build.293.sha.d27b9cd0a533a234cd3491ce7db3c2ce7085e3a5 (64 Bit)] on 24 December 2022 at 5:14:53.947536 pm'! !RunArray methodsFor: 'adding'

[Pharo-users] Re: mapping CamelCase to

2022-11-06 Thread Richard O'Keefe
But there IS a #cutCamelCase method in Pharo. It comes from Roassal2. Here it is, copied from Pharo 9.0.0: cutCamelCase "Breaks apart words written in camel case. It's not simply using piecesCutWhere: because we want to also deal with abbreviations and thus we need to decide based on three charac

[Pharo-users] Re: mapping CamelCase to

2022-10-26 Thread Richard O'Keefe
mbols that contain non-alphanumeric characters, like #== ? What do you want done with underscores and digits in strings like 'INTL_61_123_456'? On Wed, 26 Oct 2022 at 22:41, Richard O'Keefe wrote: > What's wrong with > > $- join: (s cutCamelCase collect: [ :each | eac

[Pharo-users] Re: mapping CamelCase to

2022-10-26 Thread Richard O'Keefe
What's wrong with $- join: (s cutCamelCase collect: [ :each | each asLowercase]) where s is the string you want to transform? I'm sure you're aware of the proverb: You have a problem and you decide to solve it with a regular expression. Now you have TWO problems. MYWeirdName and MyWeirdName

[Pharo-users] Re: A question about #beginsWith: and #endsWith:

2022-04-26 Thread Richard O'Keefe
t, this will lead to subtle inconsistencies. Hence, I > consider this a bug rather than a feature. > > Kind regards, > Steffen > > > > Richard O'Keefe schrieb am Samstag, 23. April 2022 02:37:48 (+02:00): > > Dan Ingalls is of course a big NAME in the > world of

[Pharo-users] A question about #beginsWith: and #endsWith:

2022-04-20 Thread Richard O'Keefe
I've just tracked down a nasty little problem porting some code to Pharo. As a result, I have added to the comments in my own versions of these methods.beginsWith: aSequence "Answer true if aSequence is a prefix of the receiver. This makes sense for all sequences. There is

[Pharo-users] Re: Intended behaviour of flatten and flatCollect:

2022-04-13 Thread Richard O'Keefe
: is generally not in any sense flat. I repeat: NONE of this can be blamed on Smalltalk history. #flattened was born crufty in 2015 and #flatCollect: is a recent addition to Pharo. On Thu, 14 Apr 2022 at 02:03, Richard O'Keefe wrote: > It would help to know which version of Pharo you a

[Pharo-users] Re: Intended behaviour of flatten and flatCollect:

2022-04-13 Thread Richard O'Keefe
It would help to know which version of Pharo you are using. #(1 2 3) flatten raises an exception in Pharo 9 because there is no #flatten in Array's protocol. Collection has #flatCollect: -- #gather: was not a terribly helpful name, -- but #flatCollect: is horribly misleading. #flatCollect:a

[Pharo-users] Re: Intended behaviour of flatten and flatCollect:

2022-04-13 Thread Richard O'Keefe
"Flattening" is problematic in every programming language I know that has something like it in its library. It was born problematic in Lisp and it has continued problematic ever since. (I am aware of several Smalltalk systems offering it. With the exception of Squeak and Pharo, no two of them agr

[Pharo-users] Re: [ANN] Pharo 10 released!

2022-04-05 Thread Richard O'Keefe
Congratulations. I am very impressed, especially by improvements coming with a healthy reduction in size. The Pharo team continue to amaze me. On Tue, 5 Apr 2022 at 22:41, Esteban Lorenzano wrote: > Dear Pharo users and dynamic language lovers: > > We have released Pharo version 10

[Pharo-users] Re: Null Object Pattern

2022-03-20 Thread Richard O'Keefe
Never forget that the Proxy pattern was developed in the context of a TYPED programming language. So "Clients can't tell whether they work with a subject or its proxy” means WITH REFERENCE TO A STATED PROTOCOL. Doing this in Ada or Java is fine, because you define an interface type, and that make

[Pharo-users] Re: Null Object Pattern

2022-03-19 Thread Richard O'Keefe
seen subclass from nil or ProtoObject and > forward almost everything to the target. It’s really very easy. > > On Mar 19, 2022, at 3:14 AM, Richard O'Keefe wrote: > > An object should be a Proxy or Stub only with reference to a specific > protocol, which should be kept narrow.

[Pharo-users] Re: Null Object Pattern

2022-03-19 Thread Richard O'Keefe
ject is identical to nil you should use `nil == myObject` to > ensure that there was not an override of #’isNil’ or #’==‘ by the object’s > class. > > James > > On Mar 17, 2022, at 2:27 AM, Richard O'Keefe wrote: > > My chief concern is that I am a bear of very little brain

[Pharo-users] Re: Null Object Pattern

2022-03-17 Thread Richard O'Keefe
8 nanoseconds. Is that worth it? Maybe, maybe not. > > Note that I described my position as a “concern,” not an ideological > objection. Mostly I’m giving a rationale for something that doesn’t seem to > be explained very well for you. I accept that there may be a time for > inli

[Pharo-users] Re: Null Object Pattern

2022-03-16 Thread Richard O'Keefe
We're still not on the same page. You seem to have some ideological objection to inlining that I am completely failing to comprehend. Just because a procedure call (message send) is inlined doesn't in the least mean it *isn't* a procedure call (message send), just as compiling a procedure call (mes

[Pharo-users] Re: BlockClosure folding

2022-03-16 Thread Richard O'Keefe
Pattern? I'd call it an antipattern myself. Note that we can already construct { block1 . block2 . block3 } and write { block1 . block2 . block3 } allSatisfy: [:each | each value]. so we don't have to abuse the #, selector or write a single new method to get the "flattened" structu

[Pharo-users] Re: BlockClosure folding

2022-03-16 Thread Richard O'Keefe
The motivating example can be written aHasDot := a includes: $.. bHasDot := b includes: $.. ^aHasDot = bHasDot ifFalse: [bHasDot] ifTrue: [aHasDot ifTrue: [a < b] ifFalse: [a > b]] (Dijkstra was right. People *do* forget that '='

[Pharo-users] Re: Null Object Pattern

2022-03-15 Thread Richard O'Keefe
I have a bad feeling about this. To start with, why do you CARE whether a particular method is inlined or not? However, I’m struggling a bit with the refactor due to inlining. Since #ifNil: variants might be inlined, it seems that something like: anObject with a long chain of messages ifNotNil:

[Pharo-users] Re: Pharo with Style (new version) is now available as physical book

2022-03-13 Thread Richard O'Keefe
Congratulations. On Sun, 13 Mar 2022 at 08:44, stephane ducasse wrote: > > https://www.amazon.fr/Pharo-Style-Stéphane-Ducasse/dp/232218201X/ref=sr_1_1?__mk_fr_FR=ÅMÅŽÕÑ&crid=15GN4OFOFHK56&keywords=Pharo+with+style&qid=1647113931&sprefix=pharo+with+style%2Caps%2C60&sr=8-1 >

[Pharo-users] Re: Too many parenthesis - a matter of syntax

2022-02-28 Thread Richard O'Keefe
too. > > Best, > > Kasper > > On 27 Feb 2022, at 00.42, Richard O'Keefe wrote: > > I was bemused to realise that I've actually been programming > for literally 50 years. It finally seeped through my thick > skull I make enough mistakes that if it's hard

[Pharo-users] Re: Too many parenthesis - a matter of syntax

2022-02-26 Thread Richard O'Keefe
I was bemused to realise that I've actually been programming for literally 50 years. It finally seeped through my thick skull I make enough mistakes that if it's hard to read, I probably got it wrong. And THIS code fragment is hard to read. I don't care if you use parentheses or pipes, it's hard

[Pharo-users] Re: Pharo-WebView

2021-12-17 Thread Richard O'Keefe
Ta muchly. Appreciated. On Fri, 17 Dec 2021 at 06:03, Tomaž Turk wrote: > Dear all, > > Pharo-WebView package is now available on GitHub at > https://github.com/eftomi/Pharo-Webview. > > Pharo-WebView is a package which implements a binding to webview dll > library available at https://github.

[Pharo-users] Re: InstanceVariables

2021-12-08 Thread Richard O'Keefe
If you are coming from a Pascal background, instance variables of an object correspond to fields of a record. They are called instance variables - because they are variables - that belong to INSTANCES of a class (object) as opposed to class variables - which are variables - that belong to the C

[Pharo-users] Re: Pharo Graphs

2021-12-01 Thread Richard O'Keefe
Brilliant! Ta muchly. On Thu, 2 Dec 2021 at 03:56, Sebastian Jordan Montano < sebastian.jor...@inria.fr> wrote: > Hello everybody, > > We are happy to announce that we have a brand new library for graphs > algorithms in Pharo! We have implemented some of the most-know graph > algorithms like: D

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-31 Thread Richard O'Keefe
somebody has a good implementation already available? > > Cheers, > Guille > > > El 31 ago 2021, a las 0:58, Richard O'Keefe escribió: > > > > Ah, you have run into the insufficiently well known > > "ScaledDecimal looks like what you need but isn'

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Richard O'Keefe
Ah, you have run into the insufficiently well known "ScaledDecimal looks like what you need but isn't". In VisualAge, you have a data type that is basically a reflection of iBM mainframe "packed decimal" format, and perfectly suits the needs of an SQL or COBOL interface. It gives you round-trippi

[Pharo-users] Re: Private Methods

2021-08-20 Thread Richard O'Keefe
uage have it...yes...next > addition will be namespaces...other...I don't know...at last we have Java > > El jue., 19 ago. 2021 9:00, Richard O'Keefe escribió: >> >> Many years ago there was a proposal in the Squeak mailing list about >> enforcing >

[Pharo-users] Re: Private Methods

2021-08-19 Thread Richard O'Keefe
Many years ago there was a proposal in the Squeak mailing list about enforcing a naming convention, "pvt", I implemented that in my Smalltalk system. The compiler enforces the rule that pvt.[A-Z].* message can only be sent to (self|super) (basicNew|basicNew: n|new|new: n|pvtNew: n)? in a class me

[Pharo-users] Re: Introducing new feature dataTypes for the PolyMath/DataFrame project

2021-08-08 Thread Richard O'Keefe
when you really honestly can. The distinctions we need to make are not the distinctions that the class hierarchy makes. For example, how about the distinction between *ordered* factors and *unordered* factors? On Mon, 9 Aug 2021 at 03:03, Konrad Hinsen wrote: > > "Richard O'K

[Pharo-users] Re: Introducing new feature dataTypes for the PolyMath/DataFrame project

2021-08-08 Thread Richard O'Keefe
I am not quite sure what the point of the datatypes feature is. x := nil. aSequence do: [:each | each ifNotNil: [ x := x ifNil: [each class] ifNotNil: [x commonSuperclassWith: each class]]]. doesn't seem terribly complicated. My difficulty is that from a statistics/data science perspective

[Pharo-users] Re: The Greatest Contributors to Smalltalk since 1980

2021-07-25 Thread Richard O'Keefe
I'd like to call Stephan Ducasse for special mention for providing the free Smalltalk books site. And I'd like to mention all the other people who contributed to the Squeak books and the continuing Pharo documentation work. Producing good documentation is hard work and when you're not being paid f

[Pharo-users] Re: [ANN] Pharo 9 released!

2021-07-16 Thread Richard O'Keefe
Congratulations. This must have been a huge amount of work. On Thu, 15 Jul 2021 at 21:15, Esteban Lorenzano wrote: > Dear World and dynamic language lovers: > > The time has come for Pharo 9 ! > > Pharo is a pure object-oriented programming language and a powerful > enviro

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Richard O'Keefe
"first we are not good in math" First, I am not criticising YOU. Pharo's weird ScaledDecimal is Squeak's weird ScaledDecimal and you have not changed it. Fine. "second Pharo is what we have and we never said that it is the best system ever" True, but irrelevant. "third I never saw a piece

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Richard O'Keefe
2Decimal floats are (a) part of the IEEE 758-2008 standard for floating-point arithmetic, (b) implemented as part of the instruction set in IBM z/Series and POWER computers, (c) allowed for in the current C standard, (d) partially supported by GCC https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Decima

[Pharo-users] Re: Rounding in Floats

2021-06-16 Thread Richard O'Keefe
The problem is that while it is possible to read the ANSI Smalltalk standard as requiring ScaledDecimals to be fixed point numbers (which are a kind of exact rational number of the form x * 10**y, x and y integers), in Squeak and Pharo ScaledDecimal numbers are NOT fixed-point numbers. They are un

[Pharo-users] Re: Rounding in Floats

2021-06-15 Thread Richard O'Keefe
x27; readStream >>> (67/10) Is there a specification you could show us? Some test data? On Tue, 15 Jun 2021 at 14:24, Esteban Maringolo wrote: > > On Mon, Jun 14, 2021 at 10:37 PM Richard O'Keefe wrote: > > > For what it's worth, I expected ScaledDecimal to act

[Pharo-users] Re: Rounding in Floats

2021-06-14 Thread Richard O'Keefe
icipate these situations, am I the only one > being bitten by these issues? > > Thanks in advance for any hints about these problems. > > > Best regards, > > [1] Dolphin Smalltalk, JS, Python, Ruby, Dart produces the same output as > Pharo. > [2] VisualWorks, VAST, Ex

[Pharo-users] Re: creating a subclass in system browser

2021-04-29 Thread Richard O'Keefe
I hadn't actually noticed the "+" sign but it was there in V7 and is there in V9 on Windows. On Wed, 28 Apr 2021 at 03:15, Sanjay Minni wrote: > Don't think it's there in v9. Check in v8 > > On Tue, 27 Apr, 2021, 7:50 pm Russ Whaley, wrote: > >> Can you send a screenshot of the plus button? I'

[Pharo-users] Re: Help Needed: Looking for projects to use in a study of transforming deprecations

2021-04-06 Thread Richard O'Keefe
This sounds like a very nice tool. Just a word about this particular example: Collection >> includesAllOf: values self deprecated: ‘Use #includesAll: instead’ transformWith: ‘`@rec includesAllOf: `@arg’ -> ‘`@rec includesAll: `@arg’. ^ self includesAll: values Sure

[Pharo-users] Re: change process variable while process is running

2021-03-29 Thread Richard O'Keefe
Code fragments are by definition incomplete. SharedQueue with a "d". On Sun, 28 Mar 2021 at 03:38, wrote: > thanks! I am now sure I am using the highest priority. > > one last question about this, maybe very newbie nut I would like to > understand things. > > so, in your code example for the Pr

[Pharo-users] Re: change process variable while process is running

2021-03-26 Thread Richard O'Keefe
Open a Playground in Pharo. Enter the following text. (((ProcessorScheduler selectors) select: [:each | each endsWith: 'Priority']) collect: [:each | {Processor perform: each. each}]) sorted: [:x :y | x first <= y first] Select it, the ctrl-i or "Inspect It" from a menu). That gives you a

[Pharo-users] Re: [ANN] Develop in Pharo 9, run on Javascript

2021-03-13 Thread Richard O'Keefe
Well done! On Sat, 13 Mar 2021 at 04:17, Noury Bouraqadi wrote: > Hi everyone, > > We have been working on porting PharoJS to Pharo 9 for a while now. > And we managed to reach the end of the tunnel this week. > All PharoJS tests are now green on Pharo 9. > > Find out more at: https://github.com

[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread Richard O'Keefe
Why do the parameters for the sequencer have to be *process* variables? Why can't they be instance variables of an object? SequenceControl (mutex v1 v2 ...) initialize mutex := Mutex new. v1 := default for v1. v2 := default for v2. ... v1 ^v1 v1: x validate x all by i

[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread Richard O'Keefe
How do you modify a variable in another process? DON'T. Yes, it is possible. No, it's an amazingly bad idea in any programming language. First, let us see a simple, obvious, and portable way to do what you want. (It has one minor problem which I'll get to.) shared := Array new: 1. shared at: 1 p

[Pharo-users] Re: Strings in Playground are read only in Pharo 9

2021-03-01 Thread Richard O'Keefe
For what it's worth, the ANSI Smalltalk standard says "The protocols specified for literals do not include any messages that modify the state of the literal objects. The effect of sending a message to an object that is the value of a literal that modifies the state of the literal is undefined."

[Pharo-users] Re: NeoCSVReader and wrong number of fieldAccessors

2021-01-07 Thread Richard O'Keefe
s without > intermediate structures and because it can convert individual fields (parse > numbers, dates, times, ...) while parsing. > > Like you said, some generated CSV output out in the wild is very > irregular. I try to stick with standard CSV as much as possible. > > Sven > > &g

[Pharo-users] Re: NeoCSVReader and wrong number of fieldAccessors

2021-01-06 Thread Richard O'Keefe
se is not importing trillions of records all day, and for a few > hundred or maybe sometimes thousands, it is good/fast enough. > > > Joachim > > > > > > Am 06.01.21 um 05:10 schrieb Richard O'Keefe: > > NeoCSVReader is described as efficient. What is that >

[Pharo-users] Re: NeoCSVReader and wrong number of fieldAccessors

2021-01-05 Thread Richard O'Keefe
NeoCSVReader is described as efficient. What is that in comparison to? What benchmark data are used? Here are benchmark results measured today. (5,000 data line file, 9,145,009 characters). methodtime(ms) Just read characters 410 CSVDecoder>>next 3415 astc's CSV reader

[Pharo-users] Re: is there a better way

2021-01-02 Thread Richard O'Keefe
What do you want the code to do? Have you profiled the code to see where the time is going? A quick look at the code shows - Paintings does one web get - each Painting does two more web gets ! and the first of those seems to be pretty pointless, as it refetches an object that Paintings a

[Pharo-users] Re: Can a class be not equal to itself?

2021-01-01 Thread Richard O'Keefe
tever it takes to make precisely that happen. On Fri, 1 Jan 2021 at 23:35, Konrad Hinsen wrote: > "Richard O'Keefe" writes: > > > #deepCopy is one of those things that is best avoided, > > because it violates the key principle of OOP that an > > In the abstract,

[Pharo-users] Re: Can a class be not equal to itself?

2020-12-31 Thread Richard O'Keefe
;t want to make copies of classes, you must avoid ALL of #deepCopy, #shallowCopy, AND #copy. On Fri, 1 Jan 2021 at 13:59, Richard O'Keefe wrote: > #deepCopy is one of those things that is best avoided, > because it violates the key principle of OOP that an > object is in charge of it

[Pharo-users] Re: Can a class be not equal to itself?

2020-12-31 Thread Richard O'Keefe
#deepCopy is one of those things that is best avoided, because it violates the key principle of OOP that an object is in charge of its own data and behaviour. It can not so much break invariants as crush them and bury them in an unmarked grave, just like #shallowCopy. On Fri, 1 Jan 2021 at 03:25

[Pharo-users] Re: [exercism bowling challenge] Is there a better way to do this

2020-12-22 Thread Richard O'Keefe
Yes, there is a better way to do it. I found this particular problem at the Programming Praxis web site, which took it from http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata This is a superb example of how an informal specification and a set of test cases can diverge. The specification

[Pharo-users] Re: Please explain self

2020-12-12 Thread Richard O'Keefe
#subclassResponsibility is defined in Object. A good way to find this out is to - select 'subclassResponsibility' with the mouse - type Control-M Control-M asks for a list of the iMplementors of the method. Control-N asks for a list of the seNders of the message. This particular method just rais

[Pharo-users] Re: Energy efficiency of Pharo/Smalltalk

2020-10-20 Thread Richard O'Keefe
art: > > > https://thenewstack.io/which-programming-languages-use-the-least-electricity/ > > Cheers, > > > On Thu, Oct 15, 2020 at 8:41 PM Richard O'Keefe wrote: > >> It doesn't make a whole lot of sense to talk about the energy efficiency >> of a

[Pharo-users] Re: Energy efficiency of Pharo/Smalltalk

2020-10-15 Thread Richard O'Keefe
It doesn't make a whole lot of sense to talk about the energy efficiency of a programming language. For example, I've seen the run time of a C benchmark go from 50 seconds to 1 microsecond when the optimisation level was changed. It doesn't even make much sense to talk about the energy efficiency

[Pharo-users] Re: exercism bowling challenge

2020-09-25 Thread Richard O'Keefe
olution is > more elegant'. For me it is an approach discussion. > > > > čt 24. 9. 2020 v 15:16 odesílatel Richard O'Keefe > napsal: > >> Since the problem can be solved, and has been solved, in programming >> languages that do not support object-oriented pr

[Pharo-users] Re: exercism bowling challenge

2020-09-24 Thread Richard O'Keefe
Since the problem can be solved, and has been solved, in programming languages that do not support object-oriented programming, there is obviously no unique "right" factoring of this problem into classes. I'll be honest with you: this is the only Pharo exercism I have not tackled, and the reason i

[Pharo-users] Re: roman numbers

2020-09-19 Thread Richard O'Keefe
> toRomans(number){ > i = return the greatest key less than or equal to given key from > ‘romansDic' . > if (number == i ){ > return romansDic.get(number) > } > return string_concat(romansDic.get(i), toRomans(number-i)) > } > > Sorry for the pseudocode.

[Pharo-users] Re: roman numbers

2020-09-17 Thread Richard O'Keefe
Roman numerals are much more complicated and much less consistent than most people realise. The regular M DC LX VI system is both more modern and less capable than anything the Romans would have recognised. In particular, - in the 8th century, N (short for "nulla") was adopted for zero - the Ro

[Pharo-users] Re: How can I make this more OOP

2020-09-15 Thread Richard O'Keefe
of asking a object > if its a collection or a item. > > > refrain from using respondTo: > I make code difficult to evolve and can introduce vicious bugs. > > S. > > Roelof > > > Op 14-9-2020 om 14:28 schreef Richard O'Keefe: > > "OOP is not asking a

  1   2   3   4   >