Steve Youngs <steve@xxxxxxxx> writes:
> * Zajcev Evgeny <lg@xxxxxxxx> writes:
>
> > Steve Youngs <steve@xxxxxxxx> writes:
> >> ,----
> >> | (eval-when-compile
> >> | (autoload 'url-retrieve "url"))
> >> `----
> >>
> >> I _strongly_ object to this.
>
> [...]
>
> > Hehe, i understand your complains, however they are not quite in
> > place .. xwem-weather *still* not depended on any external package.
> > However if you want it to use configured url library (for example
> > to access web via proxy) you can do it.
>
> Have you stopped for a moment to consider why fetching the weather
> data via a proxy will, in most cases, be a bad thing? A proxy
> server's main role is to cache web content to facilitate faster
> browsing. The last thing you want xwem-weather doing is grabbing a
> cached version of the data file (unless you'd rather see last week's
> weather of course).
>
> I can't think of _any_ reason why xwem-weather should use a proxy. It
> is just plain stupid.
>
I'm having couple of reasons to use proxying:
1) In case there no other methods to access web. In Russia this
method of controlling user's usage of the web resources is widely
spreaded. You are closed by proxy with authentification - and
admin always can see what you are doing in the web ..
2) Connection to proxy does not block, i.e. local connection goes
without blocking for SXEmacs proccess (proxy blocks waiting for
connection), so you can continue working in the SXEmacs while
doing connection to remote site. On slow and unstable
connections this becames determinative reason ..
By the way, no you wont get cached version of weather data, proxies
are smart, they knows when to refresh cache, this is defined in one of
HTTP RFCs, so you will always get up to dated weather ..
> And even if there was a legitimate reason for xwem-weather using a
> proxy, why the hell can't we just add the needed code to
> xwem-weather.el instead of dragging in W3?
Why adding already written code that can be simple reused? However I
agree, it just can be a good idea to drag url library out of W3
package and put it into xemacs-base or net-utils package :)
>
> > There is new custom variable - `xwem-weather-fetch-function' and
> > two fetching functions that you can use in the configuration:
>
> > o `xwem-weather-fetch-direct' - When you are having direct access to
> > the internet.
>
> > o `xwem-weather-fetch-with-url' - When you are having url library
> > installed and configured to access web.
>
> Suppose for a moment that you've convinced me that your xwem-weather
> changes are good (in reality, you are a _long_ way from doing
> that)... `xwem-weather-fetch-function' needs to be tweaked. It should
> list (in a choice menu) the available functions that can be used
> (direct, W3, auto, other).
Noticed!
>
> > By default fetcher is autoconfigurable, firstly it tries access web
> > directly and only then(if fails) tries to use url library.
>
> I'm not sure that this would even work, would it? What will happen
> with a slow connection? I've seen occasions where the connection has
> stalled for while (even to the point of timeout). Won't...
>
> ,----[ from `xwem-weather-fetch-direct' ]
> | (while (eq (process-status http) 'open)
> | (dispatch-event (next-event)))
> `----
>
> ...cause `xwem-weather-fetch-default' skip to using x-w-f-with-url if
> there is a long enough pause?
>
If direct connection fails(for example timeout) it tries with-url
method, if it fails(for example w3 package is not installed) as well
it will try direct connection once more at next try .. so
autoconfiguration will fall to with-url method only and only if direct
connection _does not_ work and connection using url library _does_ work
> > and as you already got, lines
>
> > (eval-when-compile
> > (autoload 'url-retrieve "url"))
>
> > just shuts up compiler's warnings
>
> Yes, I would have been forced to steal all of your vodka if you'd
> brought in compiler warnings. :-P
>
> > As to url library code quality - it is very qualitative and work
> > perfectly, yes it is old, but old does not mean bad :)
>
> But what is does mean is that people don't install it because it is
> old. Whether it works or not doesn't come into the equation for lots
> of people. They see that it's old, and that all the teenage geeks are
> using that W3M thing, or worse, they laugh at W3 while they go
> clickety click click with their rat in Firefox.
>
> I monitor the XEmacs lists and comp.emacs.xemacs quite closely, W3
> never gets mentioned. Why? Because nobody is using it. Newbies
> don't install it unless they install via sumo package. Even then,
> they don't actually use it. I even remember talking to a fine young
> Russian about it on IRC once... he told me he used W3M. :-P
Yes, as browser - W3 is shit, but as resource for reusing code related
to Web processing is great place of hunny :)
--
XWEM - Sizzles under SXEmacs!
|