In P7 scrpt variable to tmp when in debugger
Hi, When an executed script throws an error, in the debugger the script lost its variable names and the code is not exactly the same. Any idea why? See screenshot Thanks Hilaire -- Dr. Geo http://drgeo.eu
What happens if you debug the script starting with a "self halt" ? Are the variables there with their original name? looks like decompiled code. A problem with your .sources file? ----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein) On Thursday, April 12, 2018, 10:11:37 a.m. EDT, Hilaire <hilaire@drgeo.eu> wrote: Hi, When an executed script throws an error, in the debugger the script lost its variable names and the code is not exactly the same. Any idea why? See screenshot Thanks Hilaire -- Dr. Geo http://drgeo.eu
On 12 Apr 2018, at 16:10, Hilaire <hilaire@drgeo.eu> wrote:
Hi,
When an executed script throws an error, in the debugger the script lost its variable names and the code is not exactly the same.
Any idea why?
Hello, I changed the way code is compiled for #evaluate: to speed it up, but it turns out that having nice vars is actually more important than speed in most cases. I will change this again and just add it as an optional feature (you then can set an option if you need speed, but the default will be to keep the var names). For an intermediate fix, you can change in OpalCompiler>>#evaluate the send of #generate to #generateWithSource. Marcus
Hi Marcus, Benoit, Nice to know. I was testing in a set up with both .changes and source files. So I was suspecting something like what your described. I can imagine in production code your feature to speed up compilation will be appreciated. For Dr. Geo and Smalltalk sketch, it is better to have variable names. Thanks Hilaire Le 12/04/2018 à 16:31, Marcus Denker a écrit :
Hello,
I changed the way code is compiled for #evaluate: to speed it up, but it turns out that having nice vars is actually more important than speed in most cases.
I will change this again and just add it as an optional feature (you then can set an option if you need speed, but the default will be to keep the var names).
For an intermediate fix, you can change in OpalCompiler>>#evaluate the send of #generate to #generateWithSource.
Marcus
-- Dr. Geo http://drgeo.eu
On 12 Apr 2018, at 17:06, Hilaire <hilaire@drgeo.eu> wrote:
Hi Marcus, Benoit,
Nice to know. I was testing in a set up with both .changes and source files. So I was suspecting something like what your described. I can imagine in production code your feature to speed up compilation will be appreciated. For Dr. Geo and Smalltalk sketch, it is better to have variable names.
I should have a fix ready tomorrow.
Thanks
Hilaire
Le 12/04/2018 à 16:31, Marcus Denker a écrit :
Hello,
I changed the way code is compiled for #evaluate: to speed it up, but it turns out that having nice vars is actually more important than speed in most cases.
I will change this again and just add it as an optional feature (you then can set an option if you need speed, but the default will be to keep the var names).
For an intermediate fix, you can change in OpalCompiler>>#evaluate the send of #generate to #generateWithSource.
Marcus
-- Dr. Geo http://drgeo.eu
Thanks. Le 12/04/2018 à 17:18, Marcus Denker a écrit :
I should have a fix ready tomorrow.
-- Dr. Geo http://drgeo.eu
On 12 Apr 2018, at 17:18, Marcus Denker <marcus.denker@inria.fr> wrote:
On 12 Apr 2018, at 17:06, Hilaire <hilaire@drgeo.eu> wrote:
Hi Marcus, Benoit,
Nice to know. I was testing in a set up with both .changes and source files. So I was suspecting something like what your described. I can imagine in production code your feature to speed up compilation will be appreciated. For Dr. Geo and Smalltalk sketch, it is better to have variable names.
I should have a fix ready tomorrow.
I will for now revert the change: https://github.com/pharo-project/pharo/pull/1199 <https://github.com/pharo-project/pharo/pull/1199> This way it behaves as people expect, I have an idea how to provide an option for the faster way. This will come next. Marcus
On 16 Apr 2018, at 11:18, Marcus Denker <marcus.denker@inria.fr> wrote:
On 12 Apr 2018, at 17:18, Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> wrote:
On 12 Apr 2018, at 17:06, Hilaire <hilaire@drgeo.eu <mailto:hilaire@drgeo.eu>> wrote:
Hi Marcus, Benoit,
Nice to know. I was testing in a set up with both .changes and source files. So I was suspecting something like what your described. I can imagine in production code your feature to speed up compilation will be appreciated. For Dr. Geo and Smalltalk sketch, it is better to have variable names.
I should have a fix ready tomorrow.
I will for now revert the change:
https://github.com/pharo-project/pharo/pull/1199 <https://github.com/pharo-project/pharo/pull/1199>
This way it behaves as people expect, I have an idea how to provide an option for the faster way. This will come next.
1) added compiler option to compile with source embedded: https://github.com/pharo-project/pharo/pull/1200 <https://github.com/pharo-project/pharo/pull/1200> 2) then we can use this when evaluating, which avoids the double recompile that we did: https://github.com/pharo-project/pharo/pull/1201 <https://github.com/pharo-project/pharo/pull/1201> We regain now a lot of speed by avoiding the double recompile, which had been the real source of the speed problem. The pretty-print of course is still done and costs⦠so this could be restructured further. e.g. we could add an explicit option to not pretty print. Marcus
Hello guys, Just a quick word to get some things straight because, quite frankly, I really don't know where we're heading. When Pharo started, the goal was to depart from Squeak and do a *major clean up* of all the code, especially Morphic. The promise of a new, clean & lean Smalltalk attracted a lot of people. And then... I'm looking at the Pharo 7.0 image right now and I just don't get where we're heading. Every Pharo release gets bigger, and bigger, and bigger. I don't mind the environment getting bigger if it adds functionalities or new tools but that's not quite the case here. LOTS of stuff is just duplicated. Do we really need 2 code completion classes (NECController, NOCController) ? Do we really need 2 system browsers (Nautilus, Calypso)? Do we really need 2 compilers (OpalCompiler, Compiler) ? Do we really need 8 delay schedulers (DelayMicrosecondScheduler, DelayMillisecondScheduler, DelayNullScheduler, DelayExperimentalSpinScheduler, DelaySpinScheduler, DelayTicklessScheduler, DelayExperimentalCourageousScheduler, DelayExperimentalSemaphoreScheduler) ? Do we really need 2 inspectors (GTInspector, EyeInspector) ? Do we really need 2 workspaces (GTPlayground, Workspace) ? Et cetera. Et cetera. Et cetera. I could go on, and on, and on... Pharo 5.1 had 5885 classes. Pharo 6.1 had 6481 classes. Pharo 7.0 alpha has 7612 classes. Can you see a trend? Pharo 5.1 had 416 preference settings. Pharo 6.1 had 494 preference settings. Pharo 7.0 alpha has 662 preference settings. Can you see a trend? Pharo 5.1 had a 27.44 MB image. Pharo 6.1 had a 35.18 MB image. Pharo 7.0 alpha has a 47.97 MB image. Can you see a trend? Add to that the fact that Pharo is a nightmare when you want to port code. Just with the 7.0 release, 61 classes will be deprecated (and lots more to come if you search for the string "deprecated" into the code, most of the time hidden in the comments of the soon-to-be-deprecated-in-Pharo-8-I-guess classes). You have code that deals with sockets, should you use the old Socket classes or convert everything to Zodiac? And why do we keep both "frameworks" in the image ? Pharo hasn't been backward compatible with "old socket classes" a looooooong time ago anyway! You have code that deals with dependencies, should you use the old dependents mechanism or convert everything to announcements? UI speaking, what framework should anyone use ? Athens? Something else? You have code that deals with streams, should you use the old stream classes or convert everything to Zinc ? And why do we keep both "frameworks" in the image ? Pharo hasn't been backward compatible with the old stream classes a looooooong time ago anyway! So what's the plan? For instance, should I keep using the Nautilus Browser or I should switch to the Calypso browser and get used to it because Nautilus will be deprecated? Or should I just don't care because a third system browser will be added in Pharo 8 just because "it's cool, let's add this one too!" ? Couldn't we just decide on what's "official" and what's a goodie or an external optional tool/package/framework the same way all other Smalltalks do? If you say Calypso is the official & supported browser, fine! Then just get Nautilus out of the image, create a nice loadable package for it and if someone prefers Nautilus, they'll just have to load it into the image, the same way VW has a gazillion optional tools/packages/frameworks you can load from a parcel! Whenever I get asked a simple question by a newbie like "Oh, which system browser should I use?", quite frankly, I don't know what to answer. Did we include Calypso to deprecate Nautilus later? Is Calypso just a proof of concept? Is it just an optional tool? What about all those delay schedulers?  "I loaded this code from SqueakSource and it just doesn't work". Should I help the guy to fix it or just tell him to convert all the code to the corresponding framework in Pharo? Perhaps a little bit of clarity and details about what's coming and what's the plan would be beneficial to a lot of us. ----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein)
participants (3)
-
Benoit St-Jean -
Hilaire -
Marcus Denker