Out of the Box support for launching, browsing and proxy
Still there are three basic things I miss hardly in a unified way from the out of the box PHARO/ PHARO VM for the standard platforms (Unix, Win, Mac): 1. ability to execute another process (to start another executable process either asynchronous or blocking until the external process is finished) 2. ability to open a browser on a URL 3. Query for the native platform HTTP/HTTPs proxy settings (if there is one) so Zinc and others work behind a proxy. Situation hasnt improved on this side compared to Squeak/Squeak VM times (which also did not provide something like this). I know there is OSProcess, FFI, NB, and my OS-... packages and anyone could roll their own. But I would like to see this included BY DEFAULT in an easy and uniform way: either in the VM or default image even when on exotic platforms it returns ERROR_NOT_AVAILABLE. Any comments? Thanks T.
I remember playing a bit with proxy settings in Ubuntu a couple of years ago. The thing in ubuntu is that they do not use the typical Unix environment variables to set the proxy but use(or use*d* at the time...) the gconf mechanism from GNOME. A detailed explanation is in here [1]. The code for getting the http settings and others from ubuntu got integrated. https://github.com/pharo-project/pharo-vm/blob/55fbd0b0279998a4a33852f5afb3d... We should however take a look and, if it works in latest ubuntu versions we should use it. If not either fix it or throw it away. Also, the other detail is that there is work to do with the proxy settings on the image side: - they are only fetched at startup (so updating while the image is running will not update the image) - it is by default deactivated in other than mac... Here is the code InternetPlugin >> startUp Smalltalk os isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [ :p | NetworkSystemSettings httpProxyServer: p first; httpProxyPort: p second asInteger; useHTTPProxy: true ] ] ifFalse: [ NetworkSystemSettings useHTTPProxy: false ] ] Guille [1] http://stackoverflow.com/questions/7230422/how-to-find-default-proxy-setting... El mar., 10 de mar. de 2015 a la(s) 7:42 p. m., Torsten Bergmann < astares@gmx.de> escribió:
Still there are three basic things I miss hardly in a unified way from the out of the box PHARO/ PHARO VM for the standard platforms (Unix, Win, Mac):
1. ability to execute another process (to start another executable process either asynchronous or blocking until the external process is finished)
2. ability to open a browser on a URL
3. Query for the native platform HTTP/HTTPs proxy settings (if there is one) so Zinc and others work behind a proxy.
Situation hasnt improved on this side compared to Squeak/Squeak VM times (which also did not provide something like this).
I know there is OSProcess, FFI, NB, and my OS-... packages and anyone could roll their own.
But I would like to see this included BY DEFAULT in an easy and uniform way: either in the VM or default image even when on exotic platforms it returns ERROR_NOT_AVAILABLE.
Any comments?
Thanks T.
Guillermo Polito wrote
Smalltalk os isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [ :p | NetworkSystemSettings httpProxyServer: p first; httpProxyPort: p second asInteger; useHTTPProxy: true ] ] ifFalse: [ NetworkSystemSettings useHTTPProxy: false ] ]
Oh god, why?! Why?! Issue 15119: Beautify HTTP Proxy Configuration Fix in inbox: SLICE-Issue-15119-Beautify-HTTP-Proxy-Configuration-SeanDeNigris.1 Refactor -> OOP But I guess it will have to wait until 5.0 :/ ----- Cheers, Sean -- View this message in context: http://forum.world.st/Out-of-the-Box-support-for-launching-browsing-and-prox... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 12 Mar 2015, at 03:38, Sean P. DeNigris <sean@clipperadams.com> wrote:
Guillermo Polito wrote
Smalltalk os isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [ :p | NetworkSystemSettings httpProxyServer: p first; httpProxyPort: p second asInteger; useHTTPProxy: true ] ] ifFalse: [ NetworkSystemSettings useHTTPProxy: false ] ]
Oh god, why?! Why?!
I harvested the class (the plugin was shipped with the VM already) for Squeak against the *explicit* wish of Andreas (because one could do better, which of course never happened⦠Squeak in itâs essenceâ¦) So: I wanted to make sure that it did not brake anything⦠so I added a very conservative check to only end up calling it on the mac, with as little impact as possible. Marcus
I also fail to see why this is soo bad. The plugin passes settings to another object. The plugin is Mac only, from 200 years ago. Yes, we would try to do things different today, but the outside world is messy.
On 12 Mar 2015, at 06:58, Marcus Denker <marcus.denker@inria.fr> wrote:
On 12 Mar 2015, at 03:38, Sean P. DeNigris <sean@clipperadams.com> wrote:
Guillermo Polito wrote
Smalltalk os isMacOS ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [ :p | NetworkSystemSettings httpProxyServer: p first; httpProxyPort: p second asInteger; useHTTPProxy: true ] ] ifFalse: [ NetworkSystemSettings useHTTPProxy: false ] ]
Oh god, why?! Why?!
I harvested the class (the plugin was shipped with the VM already) for Squeak against the *explicit* wish of Andreas (because one could do better, which of course never happened⦠Squeak in itâs essenceâ¦)
So: I wanted to make sure that it did not brake anything⦠so I added a very conservative check to only end up calling it on the mac, with as little impact as possible.
Marcus
Sven Van Caekenberghe-2 wrote
I also fail to see why this is soo bad.
The drama was mostly a joke, something in the spirit of "oh no, Godzilla!". But it's (to me confusingly complex) procedural code hiding in an OO system. Check out the slice. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Out-of-the-Box-support-for-launching-browsing-and-prox... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Sean P. DeNigris wrote
But it's (to me confusingly complex) procedural code hiding in an OO system. Check out the slice.
Also, I forgot to mention, I'm not saying there's anything wrong. We're following 1) make it work 2) make it right. I was just suggesting we're ready for step #2 ;) ----- Cheers, Sean -- View this message in context: http://forum.world.st/Out-of-the-Box-support-for-launching-browsing-and-prox... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Ah, OK, I had a quick look, yes that is much better ;-)
On 12 Mar 2015, at 14:38, Sean P. DeNigris <sean@clipperadams.com> wrote:
Sven Van Caekenberghe-2 wrote
I also fail to see why this is soo bad.
The drama was mostly a joke, something in the spirit of "oh no, Godzilla!". But it's (to me confusingly complex) procedural code hiding in an OO system. Check out the slice.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Out-of-the-Box-support-for-launching-browsing-and-prox... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (6)
-
Guillermo Polito -
Marcus Denker -
Sean P. DeNigris -
stepharo -
Sven Van Caekenberghe -
Torsten Bergmann