Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- November
- October
- September
- August
- 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
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 3 participants
- 144636 messages
Re: [Pharo-dev] ||
by Frank Shearar
On 5 February 2015 at 21:20, Thierry Goubier <thierry.goubier(a)gmail.com> wrote:
>
>
> 2015-02-05 21:28 GMT+01:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
>>
>>
>>
>> On Thu, Feb 5, 2015 at 11:34 AM, Thierry Goubier
>> <thierry.goubier(a)gmail.com> wrote:
>>>
>>>
>>>
>>> 2015-02-05 18:51 GMT+01:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
>>>>
>>>>
>>>>
>>>> On Thu, Feb 5, 2015 at 2:31 AM, Thierry Goubier
>>>> <thierry.goubier(a)gmail.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>> 2015-02-05 10:55 GMT+01:00 Sven Van Caekenberghe <sven(a)stfx.eu>:
>>>>>>
>>>>>> It is obviously a compromise (or a continuum) between abstractions and
>>>>>> performance.
>>>>>
>>>>>
>>>>> I agree. With a special view in that we are in a sub domain where
>>>>> simple things well designed (Smalltalk, that is) are amazingly good at
>>>>> supporting complex designs.
>>>>>
>>>>>>
>>>>>>
>>>>>> But there should remain a focus on efficiency (not just speed but also
>>>>>> memory), it is hard to fix these things years later.
>>>>>
>>>>>
>>>>> And I like the fact that efficient code and design is often a pleasure
>>>>> to read and learn from :)
>>>>>
>>>>> Now, being radical: could we get rid of pragmas ? The only reason I see
>>>>> to them is that they allow extension by external packages, because we can't
>>>>> have methods which belong to two protocols (*).
>>>>
>>>>
>>>> They are a Smalltalk-centric way of adding arbitrary metadata to
>>>> methods; Smalltalk-centric in that a pragma is a Message instance, may be
>>>> queried for senders, performed, etc, and that it can be parsed using the
>>>> standard compiler (they add no new syntax). They have been broadly used.
>>>> IME they have simplified and reduced code where ever they have been used.
>>>> They don't have to be there but they're a good thing. Why do you want to
>>>> get rid of them?
>>>
>>>
>>> Because the "they have simplified and reduced code where ever they have
>>> been used" is wrong. I just have to give you a counter example:
>>
>>
>> OK, the claim is too strong. But they /have/ simplified code in cases
>> where they're appropriate. And I can cite several examples.
>>
>>>
>>>
>>> One of the uses of pragmas is associating methods containing Gui commands
>>> or settings to specific objects. Based on an object inspected or selected,
>>> you search among all its methods the ones containing a specific pragma (and
>>> you order them by a parameter to that pragma, if you want), and you execute
>>> that method to retrieve the objects you want (presentations, menu commands,
>>> shortcuts, you name it, I use it :)).
>>>
>>> The code to do that is exactly as long as the one which, on the same
>>> object, retrieve all methods under a certain protocol (the latter being
>>> faster than the pragma one, to boot).
>>>
>>> Each method is one line longer ("the pragma").
>>>
>>> Each such method usually has in its name a copy of the pragma
>>> (gtInspectorXXX methods, I'm looking at you), because of course this is far
>>> more user friendly to indicate its purpose in the method name than in only
>>> the pragma.
>>>
>>> (There are two more arguments for the use of pragmas in that context, one
>>> which has a direct counter-example, one which hasn't: )
>>>
>>> Moreover, the semantic of pragmas is "interesting" to describe, and in
>>> some cases, require a good amount of dark magic about a global object
>>> listening to all methods changes and capturing (and executing) certain
>>> methods in a vague relation about when this is going to happen, or being
>>> triggered on specific system events (main menu rebuilding, anyone?). The
>>> funny thing is to see that pattern visible on a profile when loading
>>> packages (talk of a scalable approach).
>>
>>
>> But triggering in the background happens for maintaining change sets,
>> notifying other clients too. It's not as if pragmas introduced such
>> triggering; that kind of triggering has been in use for a long time. And
>> being able to reshape the GUI automatically is very useful.
>
>
> I don't contest the possibilities, it's just that they add a significant
> layer of complexity when non mastered (how many Pharo developpers know which
> event you have to register to to receive all new methods notifications? Is
> that documented in one of the books?), and that, except for using them as
> <primitives> or for extensibility, I see other syntaxes and smalltalk code
> which are simpler.
>
> A good example is that the pragma syntax is never included in the one page
> Smalltalk syntax description :)
>
>>
>>
>>>
>>>
>>>>
>>>> (and yes, I'm biassed)
>>>
>>>
>>> Then you're the right person to give me counter arguments...
>>>
>>> (Now, I'd look differently at pragmas used for gradual typing and so
>>> on... But even for something like FFI, I'd seriously prefer to have
>>> Smalltalk calls to describe the call and its arguments than a kind of script
>>> hidden inside pragmas, just for the discoverability and because it makes one
>>> less idiom to deal with)
>>
>>
>> Why? A good use of pragmas is to associate meta data with a particular
>> method. Having calls off to the side always introduces the need for
>> book-keeping to keep those methods off to the side in sync with the methods
>> they're describing. Typically everyone rolls their own. But here we're
>> adding a level of triggering just to keep the metadata methods in sync.
>
>
> I agree with the "metadata", but I'd prefer a executable, evaluate that
> block as a medata literal than the pragma. Something that says
> "onceAndStoreAsMetadata", to a block, for example. An API to compiled
> methods which says add metadata.
>
> I strongly agree with your keep it in sync argument, still. Pragmas are
> better than nothing.
>
>>
>>
>> There is no such need with pragmas; they are always in sync with the
>> methods they describe because they are embedded in their methods. Instead
>> we can use triggering to do useful things, adding a pane to open inspectors
>> as soon as we define the method that describes the pane, adding or removing
>> a menu entry, etc.
>
>
> Just a naming convention does just that perfectly fine, and with less lines
> (except for extensions by external packages) and faster code in many cases.
>
>>
>>
>> This is one idiom that covers a host of other cases. That's why I claim
>> that whenever I've seen it used it has reduced complexity.
>>
>> Some history. Steve Dahl, I developed pragmas at ParcPlace, with Vassili
>> Bykov adding abstractions for accessing them. The first step was to replace
>> some ugly class-side code to set unwind bits in ensure: and ifCurtailed: by
>> a pragma the compiler would recognise and set the bits itself. The first
>> real use was to make the VisualWorks launcher's menus extensible. Before
>> pragmas the launcher's menu was static and had lots of disabled entries for
>> launching tools that were sold separately such as DLLAndCConnect. With
>> pragmas the launcher's menu was defined with the base system's tools and
>> then extended as each tool package was loaded, or cut-back as each tool was
>> unloaded. So that decoupled the launcher from introducing new tools. A
>> nice result.
>>
>> We then started using it for the browser and one could plug-in a single
>> tool without redefining the browser's menu methods, which decoupled each
>> extension. All this was done in the context of the parcel system, where we
>> could rapidly load packages (parcels ~= Fuel). Pragmas allowed us to
>> decouple these tools where they collided in places like menu definition,
>> tool registration.
>>
>> Then Tami Lee, who was managing the COM connection that turned a VW image
>> into a COM server, became the first "user" of pragmas outside of myself and
>> Steve. She used it to replace a lot of class-side methods that defined the
>> signatures of methods that comprised the server. It was a lovely clean-up.
>> One could define the COM signature for a method in the method itself, and
>> the class side lost about three separate methods that defined all that
>> metadata. One could read the server method itself and understand its
>> semantics without having to consult the class-side methods. One didn't have
>> to know that there was metadata hidden on the class side because it was
>> right there in your face.
>>
>> Then Vassili used it for his cool inspector framework, Trippy, which was
>> similar to Glamour in some ways, and was a huge improvement over the old
>> Inspector framework, again resulting in a much more pluggable, decoupled and
>> extensible system. Vassili also added the abstractions for accessing
>> pragmas in methods.
>>
>> Then we added checking so that one could restrict the compiler to accept
>> only legal pragmas for a given class. But if we defined the legal pragmas
>> in a class-side method, say legalPragmas, then this would be exactly the
>> kind of single point for extensions that causes collisions between packages,
>> each of which might want to add its own set of pragmas. The solution... use
>> a pragma to mark a class-side method as defining a set of legal pragmas for
>> a class. One could have more than one method defining a set of legal
>> pragmas; packages wishing to add their own cool pragmas were decoupled.
>> Once the system because recursive, it had to be a good idea ;-).
>
>
> Ok, I start to see where the abstraction wasn't working so well... since
> pragmas are not executed, when writing a method you can't know if the pragma
> is correct, because even executing the method may not trigger the pragma
> induced code. So you need the legalPragmas to give metadata on metadata for
> the compiler to do a bit of static checking, but it doesn't work for
> system-wide pragmas unless you extend Object :(
>
> And often it doesn't matter if the pragma reference a completely non
> existent method or api, since it is probably never executed by anybody (and
> if it is, it won't probably reify the error message properly as a
> compilation error as it should, because it may be triggered miles away from
> the system browser).
Pragmas don't execute. They're _data_. There is no "calls unknown
sender" because the don't execute.
Eliot's point is that pragmas _describe_, and then other systems act
on those descriptions.
They're just like Java or C# attributes, or Python decorators. Only
they're better, because Java/C# attributes can do anything, whereas
pragmas merely describe.
frank
>> There are other uses; you've seen them. I used them in VMMaker to
>> eliminate metadata that was embedded as sends to methods defined as ^self
>> that Slang had to extract and analyse, and filter-out from generated code.
>> They simplified Slang's code anaylsis, made the simulator more efficient
>> (since there were no longer sends to execute). My point is that in all the
>> cases I've seen, using pragmas has
>> - simplified the code
>> - made it obvious that methods have metadata associated with them
>> - replaced specialized ways of associating metadata with code by the
>> general pragma mechanism
>> and in many of the cases it has
>> - provided a more decoupled system
>> - provided a more dynamic and extensible system
>
>
> Yes, and I can point out some of its shortcomings: it's non-obvious, it's
> limited, tools, even that many years later don't support them well (in
> Squeak or Pharo, at least), its redundant in quite a few variants.
>
> Please, could we improve a bit? Methods belonging to multiple protocols
> would give us the same decoupling as pragmas, and I would be free to avoid
> them where I shouldn't have to use them :)
>
>>
>>
>> I've been meaning to write up the history of pragmas for ages, but
>> Vassili, Steve or I have always been too busy. I think a community paper on
>> their use and history would be worth-while, and might go a long way to
>> reduce antipathies like yours. I will forever be in debt to anyone who
>> wants to volunteer to help me write such a paper.
>
>
> That would certainly be interesting :)
>
>>
>>
>>>
>>>
>>> Thierry
>>>
>>> (Look. I started using Smalltalk in 1992... and up to your description, I
>>> wasn't aware pragmas were supposed to follow message syntax ;) Thanks for
>>> the explanation, by the way)
>>
>>
>> They /have/ to follow literal message syntax. t's all the compiler will
>> accept. That's why there needs to be a paper.
>
>
> Yes!
>
> Thanks for taking the time to argument,
>
> Thierry
>
>>
>>
>>
>> --
>> best,
>> Eliot
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by Jan Vrany
On Fri, 2015-02-06 at 10:47 +0100, Markus Fritsche wrote:
>
> On 06.02.2015 09:33, stepharo wrote:
>
> > In the coming months we will work on putting in place our
> > bootstrapping kernel.
> > There are no Smalltalk able to do that right now.
>
> GNU Smalltalk does just that, if it doesn't find an image, it will be
> bootstrapped by using the shipped .st fileouts.
Smalltalk/X does that too. It does not even need .st fileouts at
bootstrapping time to come up without an image.
Jan
>
> A bit of cheating is involved, a compiler & initialization is
> implemented on the VM side.
>
> So I would say "there are no Smalltalk that are able to do that right
> now the way we want to do it" :-P
>
> (Pissing at the door contest, to refer to another unquoted
> metaphor :-D)
Feb. 6, 2015
Re: [Pharo-dev] [Pharo-users] spotter preview
by Laurent
Hi,
I really like Spotter. The preview feature makes me think that would be
useful to have it in code completion. So often I use the wrong method
because completion does not display class name. The ability to have
code preview in code completion (and maybe class hierarchy too) would
make me open far less browser I think.
An easy first step may be that when I type Shift+enter to open Spotter
it copies the word where the cursor is placed in a text editor in the
Spotter search field.
Cheers,
Laurent
Le lun. 2 févr. 2015 à 22:02, Tudor Girba <tudor(a)tudorgirba.com> a
écrit :
> Hi,
>
> The Glamorous Team is happy to present a new feature in Spotter:
> preview (you toggle it with Cmd+p). We think this boosts the
> usefulness of the Spotter interface significantly.
>
>
>
> For more details, please take a look at:
> http://www.humane-assessment.com/blog/boosting-gtspotter-with-preview
>
> This is available in the Moose image, and it will soon be integrated
> in the Pharo one.
>
> Please let us know what you think.
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by Markus Fritsche
On 06.02.2015 10:52, Guillermo Polito wrote:
> Well, but imagine how complex that bootstrap becomes when you want to
> add to your classes:
>
> - traits
> - layouts
> - slots
> ...
>
> And expressing all that in C also :)
I don't want to imply it's easy.
I once tried to decompose a squeak image, serialize the contents and
then try to create a new working environment from that. I finaly gave up
when I got { "One step forth", "Two steps forth", "One step back", "Two
steps back"}* in any number of combinations...
The image is a a) crafted artefact, not a b) generated one, but I think
pharo is on a good path from a => b.
Feb. 6, 2015
Re: [Pharo-dev] ||
by Thierry Goubier
Hi Eliot,
maybe I'll frame the core question a bit differently, thanks to your
explanations.
I see pragmas used mainly for two things:
1- expressing a link to some metadata used by low level tools: compiler, C
lang generator, etc... primitives for me are part of that. Kind of neat to
see that unified.
2- categorizing things in a decoupled, package-extension compatible way.
I still think there is something in the design that bother me. 1- and 2-
are convention-based, so as is most of Smalltalk anyway, so diregarding
another approach to 2- as convention-based is a bit dishonest: pragmas get
more authority because they look like they have been integrated in the
language definition compared to competing solutions.
No, this is just because I start to wonder if methods shouldn't have a bit
more in that "define, add and manipulate" metadata idea, i.e. make it more
explicit and start to have tools which represent methods as more like
objects and not only text items (methods having metadata, additional slots
or instance variables, counters, statistics, ast, traces, break points,
etc...). And, in a way, a need to have two levels of execution: one which
happens at compile time (i.e. when one accept a method), one which happens
at runtime.
For that, I think pragmas are a start, but they are not the complete
answer. And I think we should solve the package-extension compatible thing
in 2- to not have 2- (which is just for me a plain categorisation issue)
polluting the design by introducing additional/unrelated requirements.
2015-02-05 22:47 GMT+01:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
> Hi Thierry,
>
> A block is far more difficult to deal with than a pragma. A pragma has a
> simple key, its selector, and simple access to its arameters, the
> arguments. A block is opaque. Essentially it can only be executable.
> Pragmas are both executable and function as annotations.
>
Pragmas are executable, but in a context which is not visible at the place
they are written.
>
>
>
>> I strongly agree with your keep it in sync argument, still. Pragmas are
>> better than nothing.
>>
>>>
>>>
>>> There is no such need with pragmas; they are always in sync with the
>>> methods they describe because they are embedded in their methods. Instead
>>> we can use triggering to do useful things, adding a pane to open inspectors
>>> as soon as we define the method that describes the pane, adding or removing
>>> a menu entry, etc.
>>>
>>
>> Just a naming convention does just that perfectly fine, and with less
>> lines (except for extensions by external packages) and faster code in many
>> cases.
>>
>
> Yes, but there end up being lots of naming conventions and they are
> non-obvious. Whereas pragmas, because they are in-your-face in the methods
> in question, don't need conventions. They just need documenting ;-).
>
They are still conventions which needs documentation. Pragmas are, in
allmost all uses, indirections (i.e. a tag meaning something to a far away
object), and the meaning associated to a pragma is, in every case, a
roll-your-own solution. And they are clearly "in your face" :)
>
>
> That's not necessarily true. Some pragmas do cause processing at compile
> time. For example, an FFI signature pragma can be checked at
> compile-time. But it's in keeping with smalltalk that type checking is not
> performed at compile time in most cases, isn't it? Why should one require
> that pragmas be semantically checked at compile time when normal SMalltalk
> code isn't? At least one knows that the message instance the pragma is
> compiled to is a valid object and *can* be performed. So pone does know at
> least that the pragma is executable. Obviously whether that ability to be
> executed only becomes potent with the right receiver. So any compiled
> pragma as the potential to be usefully evaluated.
>
Ok, but its all fuzzy.
It may be executed, but it may be not.
It may send an error if incorrect, but it may fail silently.
It may be executed at compile time, it may be executed sometime later
triggered by the compilation, or it may be executed at runtime, as if it
was normal code. And of course it may not be executed at all ...
You see what I mean?
>
> And often it doesn't matter if the pragma reference a completely non
>> existent method or api, since it is probably never executed by anybody (and
>> if it is, it won't probably reify the error message properly as a
>> compilation error as it should, because it may be triggered miles away from
>> the system browser).
>>
>
>
> There is lots about Smalltalk that is non-obvious, about programming in
> general that is non-obvious. I don't see that as a specific criticism of
> pragmas. Once one knows the idiom it is easy to use; its wide-spread use
> is evidence of that. And hopefully this conversation will help make it
> more obvious :-). That it is limited is also not perhaps a useful
> criticism. The issue is whether it is adequate. I think it is. A literal
> message goes a long way. I'e not heard of complaints about limitations so
> far. Do you have specific examples where pragmas are inadequate? The
> tools /do/ support them. One can do senders and implementors in the
> browser and see the methods that include them, and the implementors of
> pragmas. browseAllSelect: will narrow down the search. There is an API
> for programmatic use (pragmasDo: et al).
>
See [*][**] for the tools support. For me, pragmas, even in their
definition, have serious semantic issues. If they were strictly, as you
describe them, a metadata API access executed at compile time, then they
would be a lot stronger.
Make them sent at compile-time on the method object, and that would
probably solve all the true arguments I have against them :)
for example: <worldMenu> against <tagAndAnnounce: #worldMenu>; <tag:
#gtInspectorExtension> instead of <gtInspectorExtension>, etc...
(<tagAndAnnounce:> would gain a bit of performance, as well).
Thierry
[*] Searching a bit for menu pragmas in a Pharo image seems to return a bit
of a mess. There is so many of them, all differents, and interestingly,
this does not return the code triggered (or using) them, which makes
discovery of what the pragma is used for (and its parameters) an
'interesting' problem.
I suggest a task then: an illustrated sequence of how to search for the
code triggering world menu addition of a new command, for someone which is
new to Pharo ;)
[**] even when used for categorisation, the API is prone to bugs, such as
having a method without pragma overriding a superclass method with pragma
because they have the same name.
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by Guillermo Polito
Well, but imagine how complex that bootstrap becomes when you want to add
to your classes:
- traits
- layouts
- slots
...
And expressing all that in C also :)
El Fri Feb 06 2015 at 10:47:19 AM, Markus Fritsche <mfritsche(a)reauktion.de>
escribió:
>
> On 06.02.2015 09:33, stepharo wrote:
>
> In the coming months we will work on putting in place our bootstrapping
> kernel.
> There are no Smalltalk able to do that right now.
>
>
> GNU Smalltalk does just that, if it doesn't find an image, it will be
> bootstrapped by using the shipped .st fileouts.
>
> A bit of cheating is involved, a compiler & initialization is implemented
> on the VM side.
>
> So I would say "there are no Smalltalk that are able to do that right now
> the way we want to do it" :-P
>
> (Pissing at the door contest, to refer to another unquoted metaphor :-D)
>
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by Markus Fritsche
On 06.02.2015 09:33, stepharo wrote:
> In the coming months we will work on putting in place our
> bootstrapping kernel.
> There are no Smalltalk able to do that right now.
GNU Smalltalk does just that, if it doesn't find an image, it will be
bootstrapped by using the shipped .st fileouts.
A bit of cheating is involved, a compiler & initialization is
implemented on the VM side.
So I would say "there are no Smalltalk that are able to do that right
now the way we want to do it" :-P
(Pissing at the door contest, to refer to another unquoted metaphor :-D)
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by Marcus Denker
>
>> Looking at Pharo, it appears to me to be suffering the same bloat issues as
>> Squeak.
>
> Well if you say that it is that you are just looking at the tip of iceberg.
> This is not for fun that we are massively working on cleaning dependencies and removing
> wrong code or rewriting it. In the coming months we will work on putting in place our bootstrapping kernel.
> There are no Smalltalk able to do that right now. Bootstrapping means a lot in term of quality.
> But we have some work to get there and we are busy with our real work (publishing papers).
>
I think the problem is that people always look at an artefact as âthis what they wantâ as opposed to
âthis is just an imperfect snapshot of steps towards what we wantâ.
e.g. Morphic still is a *mess*. We have some things started (e.g. Anthens) that will, when they are finished,
allow us to simplify things. But right now they are just duplication.
Some of the things are just âscaffoldingâ for better solutions in the future.
So Pharo4 is just a snapshot of a tiny increment. Pharo5 will be another. And so on.
One thing one needs to see is that only the things that are done are done. This is sometimes
to exhausting: even the most trivial, obvious thing needs someone to actually do it.
Marcus
Feb. 6, 2015
Re: [Pharo-dev] [pharo-project/pharo-core] 6a5096: 40477
by stepharo
+1
STef
Le 5/2/15 21:34, Max Leske a écrit :
>
>> On 05 Feb 2015, at 17:46, Ben Coman <btc(a)openInWorld.com
>> <mailto:btc@openInWorld.com>> wrote:
>>
>>
>> On Thu, Feb 5, 2015 at 11:12 PM, GitHub <noreply(a)github.com
>> <mailto:noreply@github.com>> wrote:
>>
>>
>> Log Message:
>> -----------
>> 40477
>>
>> 14669 Delay refactoring (part 2a) - avoid UI locking up when
>> timer event loop is stopped
>> https://pharo.fogbugz.com/f/cases/14669
>>
>>
>>
>> Thanks Max and Marcus for review and pushing this through.
>>
>> Next step is Issue 14353 "Delay refactoring (Part 2) - change from
>> milliseconds to microseconds" and I started to review rebasing this
>> onto the latest build. Now left over from Part 1
>> (https://pharo.fogbugz.com/default.asp?14261) is lots of conditional
>> code wrap of the form...
>>
>> self newCodeEnabled
>> ifTrue: [
>> "my new code"
>> ]
>> ifFalse: [
>> "the old code"
>> ]
>>
>> However this conditional code wrap clutters things making it harder
>> to review changes going forward. So I was wondering it was preferable
>> for me to clean that out first, before pushing 14353 for review. For
>> Part 1 it served a few purposes...
>>
>> (1) It was required to make an instantaneous transition to the new
>> architecture. However this no longer required since integration of
>> Issue 14669 now allows the DelayScheduler to be stopped to change
>> code without locking the system.
>>
>> (2) It provided an emergency fallback to disable the new
>> architecture, since this was deep-diving into critical
>> infrastructure. However Part 1 was integrated in November, so is that
>> long enough for the code to have proved itself?
>
> I would say so, yes.
>
>>
>> (3) It allowed easy switching back and forth for benchmarking. Maybe
>> still useful, but I don't think this is enough on its own to keep the
>> newCodeEnabled conditional code wraps. Benchmarking can still be
>> done on separate build before and after integration of subsequent
>> changes.
>
> You can recompile on the fly if you really need to use the same image.
>
>>
>> Please advise how you'd like me to proceed.
>> cheers -ben
>>
>>
>
> Iâd go ahead and remove the conditionals and the old code. The release
> of Pharo 4 is planned for April I think, so even if something goes
> wrong, thereâs still time to fix it. Removing the clutter will also
> make it easier to review your changes; and it will make writing code
> for you easier.
>
> Pharo 4 is still in development (unless I missed something), and
> development means unstable environment. People who use Pharo 4 are
> aware of that.
>
> Thatâs my two cents anyway.
>
>
> Keep up the great work!
>
> Cheers,
> Max
Feb. 6, 2015
Re: [Pharo-dev] Switching to Pharo from Visualworks
by stepharo
Hi steven
> I have a largish project (Siren) that I have developed in ST80/VisualWorks
> (since 1984) and ported to Squeak in the past.
>
> I'm allows looking for a cleaner free ST80 implementation to host the
> project.
Good. I would love to see Siren in Pharo and I'm ready to help.
> Looking at Pharo, it appears to me to be suffering the same bloat
> issues as
> Squeak.
Well if you say that it is that you are just looking at the tip of iceberg.
This is not for fun that we are massively working on cleaning
dependencies and removing
wrong code or rewriting it. In the coming months we will work on putting
in place our bootstrapping kernel.
There are no Smalltalk able to do that right now. Bootstrapping means a
lot in term of quality.
But we have some work to get there and we are busy with our real work
(publishing papers).
BTW: When I come to friend place I do not start to piss on the door,
usually I try to understand
the tradition of the place and get more information before judging.
I will take your remarks with a bit of salt and reply to you as a
welcome message. :)
> I have a few questions:
>
> Why don't you all use a 6-paned browser (called the package browser in
> Squeak) and control the introduction of top-level meta-categories?
Because you have tags and you can filter packages.
Now the new browser is not the final answer.
You could imagine also that your browser is empty at first and only
contain your projects and that you can add incrementally the class and
packages of interest. Now we did not have the cycle to experiment with
that and hope other people will try.
We should do another pass on cleaning simplifying nautilus.
> Thetop-level (packages or meta-catgories) should be a list of 20 or fewer
> topics such as Magnitudes, Collections, Graphics, Text, Compiler, Tools,
> etc. and each of these should have 20 or fewer categories within it
It is just a view on the world. Why would I be interested in Magnitudes.
I have no idea what it is and I do not care.
But we are working on it. We should restart. First we needed to throw
away the old Browser code.
The default browser is not the end of the road just the current result
of our learning.
We are working on packages meta data and projects but it takes time.
> Iported the package browser to Squeak and reorganized their system
> once, but
> people continued to add top-level categories to make finding their code
> easier. I tried to add the facility to the Pharo browser a year or so ago,
> and gave up because I couldn't figure how out how to subclass and
> refine the
> existing browser framework (and the fact that it seems to be under
> construction).
We should do a pass on it. Now to me the sith pane is not the right way
to me.
Did you see that there are tags inside packages.
BTW Pharo packages are real objects not string comparisons and it took
us time to make this changes.
> Why do you still use the (terrible, IMHO) Squeak graphics and UI packages
> (Morphic, Balloon, etc)? It appears that new mostly-redundant systems are
> still being added to replace these, right?
Give me 5 Million $ and you will see. Pharo will not look like it is.
We are not Alan Kay to raise money.
> Can't someone reimplement the
> VisualWorks "Wrapper" UI framework (or something like it) on top of OpenGL
> contexts as in VW? It's help up pretty well after over 25 years. (David
> Leibs and I toasted it just last December in Australia.)
We have Spec which is a Wrapper frmeworks but there are plenty of space
for improvements.
And we are WORKING on OUR FREE time on making Athens (vector graphics
API supporting different back ends)
fully rendering the system. In fact nicolai hess is pushing this massive
effort.
How many engineers were working for free in VisualWorks?
How many people were paid? So far we got three engineers working in
Pharo for 3 years.
> How does a newbie learn what all the new packages are for? Glamour, Ring,
> AsmJit, Zinc, etc. are neat names, but if they're not part of higher-level
> packages it makes navigating the system (and even figuring out what
> they're
> for) pretty difficult.
We know. We started to add meta data to package and based on that we
want to display the package description.
But days here are only 24 hours.
> Are there any benchmarks of the current VMs compared to VisualWorks? The
> last time I used Squeak (a few years ago) it was still pretty slow. I
> have a
> real-time event scheduler in Siren that I use to schedule MIDI, so I
> can run
> "drum roll" tests to see how the VM performs.
check Cog VM.
Now there is Spur a new memory manager coming along and it will speed
things.
Read the blog of clement bera or eliot miranda.
Then clement is working on Sista an image level inliner and optimizer
and it will bring really new perspective.
> How does Pharo handle user primitives or foreign function calls? Is anyone
> maintaining the old SWIG implementation of Smalltalk? I used it quite
> a bit
> to have Smalltalk code create and manage C++ signal processing graphs
> in the
> past. SWIG is still going strong, and it's embarrassing that there's no
> mention at all of Smalltalk on the SWIG pages.
Ronie Saldago did a SWIG package.
>
> I'm not trying to start a fight, and I really did like the initial Pharo
> mission statement of making a tighter, cleaner open-source ST80
> implementation.
We are doing it. This is just that you do not see it.
Each commit produces before integration a 3mb image shrunk automatically.
> Is that dream still what motivates the community?
More than ever.
We have a now a dependency analyser browser developed by a student
we regularly addressed worng dependency.
If just takes time and concentration.
> If yes, where are the minimalists hiding?
We have 11k images fully bootstrap (doing just 2+4 ).
Now modular does not means that it has to be minimal.
We got a 60 k image that only does beep without a compiler... so not
really useful.
We are working on it systematically.
Now we should
- not confuse ui concerns and the system
- code quality is not something that can be displayed
- when we use a class from a large package we import all the
classes of that packages so
merging packages is the wrong approach.
- modularity without maps does not work and we should keep maps of
working package sets
coherent when a change happen.
Stef
> Stephen Pope
> HeavenEverywhere Media and FASTLabInc.com <http://FASTLabInc.com>
> Santa Barbara, CA USA
>
> --
>
> Stephen Travis Pope Santa Barbara, California, USA
> http://HeavenEverywhere.com <http://HeavenEverywhere.com/>
>
Feb. 6, 2015