Re: [Pharo-users] Distribution of test method name length

2019-06-23 Thread Kasper Osterbye
Quite interesting! I was wondering about the correlation to number of arguments due to the particularities of the keyword syntax which might give longer method names in the first place. Best, Kasper

[Pharo-users] All the little cute icons

2019-05-23 Thread Kasper Osterbye
I was wondering about all the cute icons I see in the browser, Iceberg, etc. I assume they all are intended to mean something, but where is the documentation of that? best, Kasper

[Pharo-users] Defensive programming or not

2019-09-23 Thread Kasper Osterbye
Cheers all, In trying to fix one of the issues in Pharo, I came to wonder about the prefered style in in dealing with preconditions to methods in Pharo. In the method Random>>nextInt: anInteger - There is a check if anInteger is negative - There is no check that anInteger is anInteger

Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Kasper Osterbye
Hi Roelof I saw your posts earlier, and will try to take a look. I am not into the advent of code myself, but love a good puzzle. Would it be possible to provide a link to the puzzle you are trying to solve?

Re: [Pharo-users] BlockClosure

2019-10-23 Thread Kasper Osterbye
On Wed, Oct 23, 2019 at 2:21 PM p...@highoctane.be wrote: > It is like Object>>in: aBlock no? > Yes. But because it is an operator, you can write "obj => block => block => block". You can not write "obj in: block in: block in: block", because smalltalk will think it is a selector named

Re: [Pharo-users] BlockClosure

2019-10-23 Thread Kasper Osterbye
You can define a method "=>" in Object as: => aBlock ^ aBlock value: self That would allow you to write expressions like this: 7 => [ :x | x+3 ] => [ :x| x*3 ], if you further define "=>" in Array as: => aBlock ^ aBlock valueWithArguments: self you are able to write your example: (([ :f :g |

[Pharo-users] Code overview - or maybe not

2019-12-19 Thread Kasper Osterbye
In an other thread Steve Davies mentions that Pharo can be a bit overwhelming. Indeed I have had the same feeling. I was struggling for weeks (not every day, but still) to find out how to change the system to be able to give background color to text. As part of my attempt at understanding the

Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-25 Thread Kasper Osterbye
@Tim. I just verified that it load on a fresh P8. I am on a mac, but that should not make any difference. [image: image.png] Best, Kasper

Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-25 Thread Kasper Osterbye
I do not think the PP2 is used in the github parser actually. The github parser was just a addon to the rest of the stuff, and the pillar markdown parser used PP2. Anyways, if you have any questions, feel free to ask. Best, Kasper

Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-27 Thread Kasper Osterbye
into a separate > project, or have a baseline group that just loads the parser? > > Tim > > > On 25 Mar 2020, at 19:46, Kasper Osterbye > wrote: > > > > I do not think the PP2 is used in the github parser actually. The github > parser was just a addo

Re: [Pharo-users] Unicode migration from SmalltalkHub to Github

2020-04-01 Thread Kasper Osterbye
Awesome. If you have a little spare energy, make an issue or pull request on https://github.com/pharo-open-documentation/awesome-pharo - this stuff should be there!

Re: [Pharo-users] Do we have a simple markdown parser?

2020-03-24 Thread Kasper Osterbye
I have a github-markdown which translates into pillar - and from pillar you can get many things. It is lacking several aspects, as I personally was most interested in rendering it inside pharo. The major thing missing (because I could not figure out how to render them) is tables. But take a look

[Pharo-users] Name of coding pattern

2020-05-26 Thread Kasper Osterbye
Hi. I was looking at the zink stream, and noticed this pattern with strm tag: 'h1' do: aBlockWhichWriteTheTitle It is also used in baselines, and I have used it myself a few times. Is anyone aware of this having a name? Best, Kasper

[Pharo-users] Re: Pharo and Virtual Realitity

2020-11-20 Thread Kasper Osterbye
Hi This is the coolest thing for a long time. I think this is super interesting to start exploring. The first steps are what you show on your github, but the idea that you you will have a full universe of pharo code, running and being able to manipulate it is truely awesome. I had been thinking

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

2021-01-10 Thread Kasper Osterbye
Just my input to the cache thing. Pharo has a class named LRUCache (Least Recently Used Cache), which is very helpful for such. If you want to store it on disk instead of the image Estaban's suggestion seems like the way to go. Best, Kasper

[Pharo-users] SpTablePresenter - can one edit cells using that?

2021-01-15 Thread Kasper Osterbye
Cheers, I was looking at class SpTablePresenter. It does not seem like there is a way to edit the values in the cells. Is that correct? If so, is there an other table class which will allow that? Best, Kasper

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

2021-01-21 Thread Kasper Osterbye
As it happened, I ran into the exact same scenario as Joachim just the other day, that is, the external provider of my csv had added some new columns. In my case manifested itself in an error that an integer field was not an integer (because new columns were added in the middle). Reading through

[Pharo-users] Re: Looking for more non-trivial example application based on Spec2 to learn from...

2021-05-12 Thread Kasper Osterbye
I am currently working on a administrative system to keep track of our sheeps (about 30 ewes and 50-60 lambs a year). It is not finished yet, but if anyone wants I can make the currently private git public or give access.The intended user is my wife who is not an easy customer :-) It uses a

[Pharo-users] Re: Looking for more non-trivial example application based on Spec2 to learn from...

2021-05-13 Thread Kasper Osterbye
My sheep project - Ovina2 - is now public for other to be scared about. I am on my way out the door, so databases will have to wait until monday when I am back from kayaking. This is the link: https://github.com/kasperosterbye/ovina2 The two main presenters are OvinaHistoryPresenter and

[Pharo-users] Re: about class name

2021-05-28 Thread Kasper Osterbye
I am working alone on my app, but I can see the problem with inconsistency in class names. No discussions with my colleagues though :-/ One very high level comment is: had Pharo had namespaces/scopes of some sort I do believe the problem would have looked differently. It it is interesting with

[Pharo-users] Re: Question about Spec2 and SpTablePresenter

2021-07-04 Thread Kasper Osterbye
Cheers, From what code you provide I can not spot any error. I do not use your persistence strategy myself, so I first thought that it might be an issue related to that - for instance something with the identity of objects from the recentFileList and the savedEntry messing up. But that would

[Pharo-users] Re: Question about Spec2 and SpTablePresenter

2021-07-05 Thread Kasper Osterbye
> On 5 Jul 2021, at 09.30, Mark O'Donoghue > wrote: > > Thanks Kasper > > Thanks for your thoughts. > (BTW - I have been using your sheep app as an informal reference – many > thanks) Your welcome. It seems like SpTablePresenter is work in development in many ways. I run into its

[Pharo-users] Re: pharo 8 - method versions - how to see author/timestamp?

2021-02-04 Thread Kasper Osterbye
I went in and updated the corresponding github issue ( https://github.com/pharo-project/pharo/issues/7283). The tool is really useful, and it would be nice to have the author and timestamp in place again. >

[Pharo-users] Re: pharo 8 - method versions - how to see author/timestamp?

2021-02-05 Thread Kasper Osterbye
Based on your comments Esteban, I have suggested to close the corresponding issue 7283. Closer integration to git from within the image sounds promising. >

[Pharo-users] Re: Hack to show timestamp and author on versions of methods

2021-02-10 Thread Kasper Osterbye
Cheers Wonderful to have this hack. While I am looking forward to getting git-history in-image, I still appreciate the existing tool for its finer granularity and the fact that I am amble to go back to every save I did. Best, Kasper > On 10 Feb 2021, at 16.49, Davide Varvello via

[Pharo-users] Re: A question about packaging

2021-02-16 Thread Kasper Osterbye
As Sven said it is done using categories. In practice I often use the small “extension” button in the lower right corner of the method editor of the browser. If you press that, the system comes up with a small menu of existing packages, and you can select yours. — Kasper > On 16 Feb 2021, at

[Pharo-users] Re: ABBench: Lightweight Microbenchmarking Library

2021-08-13 Thread Kasper Osterbye
Cheers That looks really interesting - I saw that you use an underlying statistical test for the nul hypothesis. That is a cool way to approach it. Best, Kasper > On 12 Aug 2021, at 19.44, Evan Donahue wrote: > > Hello, > > I've just released a utility I've been using for the past few

[Pharo-users] Re: The ideal font for Pharo

2021-09-07 Thread Kasper Osterbye
Wrt to emoji, I have at a number of times wanted to use other math symbols as binary methods (fx ‘⊕´). For some symbols it is allowed, for some allowed the font does not show properly, and some are not allowed (eg ‘≌’). Some letters in non-latin alphabets are allowed as keyword methods (for

[Pharo-users] Is Pharo part of hactoberfest?

2021-09-30 Thread Kasper Osterbye
I got an invitation to participate in something called hactoberfest? It is on the link: https://hacktoberfest.digitalocean.com It looks like fun, and a way to draw attention to open source software development. If Pharo (and its sub-projects) is not

[Pharo-users] Re: How do I remove old classes?

2021-07-23 Thread Kasper Osterbye
Not knowing your specific usage, this tends to happen if you have an instance of class X, and then remove the class. To save the instance from going stale, Smalltalk has always made an Obsolete class. You can find the offending X instance by inspecting this: ReferenceFinder findAllPathsTo: X

[Pharo-users] Re: What am I doing wrong with Spec2 in Pharo 9?

2022-02-10 Thread Kasper Osterbye
It might be something else, but the browser to the left is looking at the instance side, whereas the browser to the right is looking at the class side. Hence, your class side method openAttributeEditorOn: do not know about the instance side method valueAtColumn:row: It is hard to guess from

[Pharo-users] Re: Null Object Pattern

2022-03-17 Thread Kasper Osterbye
Sean When the compiler inlines some methods, I would find it most surprising if it was turned of in half the code (or just in yours :-) ). When I am reading some code, I would rather have some consistency. So I would just implement a whenNil: method which is a true message, and put a comment

[Pharo-users] Re: Detecting keystrokes in Spec2 input fields

2022-03-12 Thread Kasper Osterbye
If it is in the TextPresenter you might be looking for whenTextChangedDo: or whenSubmitDo: Both inherited from SpAbstractTextPresenter Best, Kasper > On 12 Mar 2022, at 11.26, Robert Briggs via Pharo-users > wrote: > > Hi > > Is there a simple way to detect when a use makes a keystroke in

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

2022-02-27 Thread Kasper Osterbye
|item| > item := collectBlock value: each. > (selectBlock value: each) ifTrue: [newSet add: item]]. > ^newSet > > select: selectBlock thenCollect: collectBlock > "Override Collection>>select:thenCollect: like OrderedCollection. > Beware: 'self speci

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

2022-02-26 Thread Kasper Osterbye
All the answers have been good. I am somewhat provoked (in the good sense of forcing me to think) by Siemen who sort of think of it as a code-smell. Best, Kasper > On 26 Feb 2022, at 17.14, Siemen Baader wrote: > > Hi Kasper, > > perhaps not what you are asking, but I find that this kind of

[Pharo-users] Re: What can you do with Pharo?

2022-02-02 Thread Kasper Osterbye
Cheers I restarted with smalltalk in the form of Pharo a few years back, so in a somewhat similar situation. I have done several different things: Contributed to a number of different things in the Pharo community, fixing issues, commented on issues, and been involved in one of the sub-areas of

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

2022-01-26 Thread Kasper Osterbye
Cheers all I have noticed that I often ends up with quite a number of nested expressions, for example: (((json at: 'tree') select: [ :e | (e at: 'type') = ‘blob' ]) collect: [:e | Path from: (e at: 'path')]) select: [ :p | p segments last

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

2022-04-12 Thread Kasper Osterbye
Hi Konrad Sorry, but which version of Pharo are we talking about. I just tried with Pharo 10, which has no flatten method for arrays at all, somewhere along the version I believe the method was renamed to flattened. #(1 #(2 #(a b) 3) 4) flattened >>> #(1 2 #a #b 3 4) as one would expect.

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

2022-04-20 Thread Kasper Osterbye
Yes, that one I have come across several times - even without trying to port anything, merely because it is how beginsWith: should work (supporting the empty string). I have no idea about the rationale though. Best, Kasper > On 20 Apr 2022, at 14.07, Richard O'Keefe wrote: > > I've just

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

2022-04-26 Thread Kasper Osterbye
I have now raised it as an issue on the issue tracker Issue #11165 in https://github.com/pharo-project/pharo/issues/11165 Best, Kasper > On 26 Apr 2022, at 12.11, Steffen Märcker

[Pharo-users] Re: Please check older Issue tracker entries!

2022-05-20 Thread Kasper Osterbye
One meta-issue is that some issues might be raised in Pharo, but should be raised in some sub-project (Spec, Iceberg, Microdown, …). I for one has been working mostly in Microdown, and would not obviously discover an issue regarding Microdown raised in the Pharo project. Perhaps it is just I

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

2022-04-29 Thread Kasper Osterbye
The two methods are changed to do the right thing. We are still waiting for the CI server to check if that broke anything. During the change, 4 places was identified which was simplified by doing it right (aka empty prefix always true). Best, Kasper

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

2022-04-28 Thread Kasper Osterbye
> Kasper Osterbye schrieb am Dienstag, 26. April 2022 14:50:51 (+02:00): > > I have now raised it as an issue on the issue tracker > > Issue #11165 <https://github.com/pharo-project/pharo/issues/11165> in > https://github.com/pharo-project/pharo/issues/11165 > <ht

[Pharo-users] Sourcecode for the simulation code in bluebook part 3?

2022-09-01 Thread Kasper Osterbye
Cheers, I am looking for the source code used in bluebook part 3 on simulation. Does that exist anywhere? Also, I have been looking for libraries which implement coroutines and continuations. Best, Kasper

[Pharo-users] Re: Sourcecode for the simulation code in bluebook part 3?

2022-09-01 Thread Kasper Osterbye
> Also, I have been looking for libraries which implement coroutines and > continuations. Somehow I had missed the Contination library in Pharo. Best, Kasper

[Pharo-users] Re: mapping CamelCase to

2022-10-22 Thread Kasper Osterbye
ifTrue: [ split add: word contents. word := WriteStream on: '' ]. word nextPut: char ]. split add: word contents. ^ split asArray You should then use cute join and asLowercase to go rest of the way. Best, Kasper > On 22 Oct 2022,

[Pharo-users] Re: mapping CamelCase to

2022-10-22 Thread Kasper Osterbye
My feeling is that it cannot be solved by regular expressions. The reason it that there is the regular expressions in smalltalk/pharo does not have look-ahead or backtracking. In your example the capital Y is part of MY, but C starts a new word. I do not know of anyway to express that in

[Pharo-users] Re: mapping CamelCase to

2022-10-26 Thread Kasper Osterbye
> > What's wrong with > > $- join: (s cutCamelCase collect: [ :each | each asLowercase]) There is no method called cutCamelCase in Pharo. If there was, this was exactly the right solution to use something existing. Best, Kasper

[Pharo-users] Re: Pharo nanoseconds or clock ticks

2022-09-13 Thread Kasper Osterbye
s still not available in ARM64 builds, we need to define it using some > handwritten assembly. > There is an open issue for that > https://github.com/pharo-project/pharo/issues/11609 > > G > >> El 5 sept 2022, a las 8:30, Kasper Osterbye >> escribió: >> >>

[Pharo-users] Pharo nanoseconds or clock ticks

2022-09-05 Thread Kasper Osterbye
Cheers I am looking for a way to get to the nanosecond or clock ticks of my computer as I want to do some rather low level performance measurements. I have not been able to find it. I am on macos. Is it already in the image, or is there a library I can to load? Best, Kasper

[Pharo-users] ESUG 2022 Camp smalltalk

2022-08-11 Thread Kasper Osterbye
Cheers Does anyone know if there will be a camp smalltalk the weekend before the conference? The page https://esug.github.io/2022-Conference/camp2022.html seems untouched. I had planned to participate. Best, Kasper

[Pharo-users] 3D graphics?

2024-05-24 Thread Kasper Osterbye
Cheers all I am looking for classes which can be used to build 3D pictures. Spheres, Boxes, etc. It is a fun thing for me to build, but on the other hand, if it is already done, I will use them. Also, I am interested in 3D figures being outputtet in STL files. Is that done? It is an easier