Re: Communication between JAVA and python

2005-02-24 Thread Ulrich Schaefer
Jacques Daussy wrote:
Hello
How can I transfert information between a JAVA application and a 
python script application. I can't use jython because, I must use 
python interpreter.I think to socket or semaphore, but can I use it 
on Windows plateform ?

Try XML-RPC (a simple implementation of remote procedure call via HTTP 
sockets).
It's built-in in Python since 2.2 
(http://www.python.org/doc/2.4/lib/module-xmlrpclib.html),
in Java use e.g. Apache XML-RPC (http://ws.apache.org/xmlrpc/).

Ulrich
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python becoming less Lisp-like

2005-03-14 Thread Ulrich Hobelmann
Torsten Bronger wrote:
HallÃchen!
Tach!
Moreover, I dislike the fact that new features are implemented
partly in the interpreter and partly in Python itself.  It reminds
me of TeX/LaTeX, where the enormous flexibility of TeX is used to
let it change itself in order to become a LaTeX compiler.  However,
the underlying constructs are utterly ugly, as are some of Python's
features (e.g. __getattr__ and such, and descriptors, in order to
get nice class properties).
Well, I think TeX is just an awful, weird language with (AFAIK) dynamic 
scoping.  Thinking of Lisp macros, I'd say that implementing features on 
top of a small language core is GREAT!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python docs [was: function with a state]

2005-03-25 Thread Ulrich Hobelmann
[EMAIL PROTECTED] wrote:
The Python doc, though relatively incompetent, but the author have
Really, how could those morons even dream of creating a language, 
and even writing docs to accompany it??

tried the best. This is in contrast to documentations in unix related
things (unix tools, perl, apache, and so on etc), where the writers
have absolutely no sense of clear writing, and in most cases don't give
a damn and delight in drivel thinking of it as literary.
Well, man-pages are at least coherent and precise.
It's not literature, it's technical documentation!
I think that this is an excellent description of your own writing.
:)
To be sure, he's a stupid troll, but I think you shouldn't insult 
him for being bad at English.  I bet you (or most Western people 
anyway) have trouble getting fluent in an Asian language.  Imagine 
the lingua franca were Chinese, non English...
--
http://mail.python.org/mailman/listinfo/python-list


Re: Lambda: the Ultimate Design Flaw

2005-04-01 Thread Ulrich Hobelmann
alex goldman wrote:
Daniel Silva wrote:

At any rate, FOLD must fold.

I personally think GOTO was unduly criticized by Dijkstra. With the benefit
of hindsight, we can see that giving up GOTO in favor of other primitives
failed to solve the decades-old software crisis.
The fault of goto in imperative languages is that it has no 
arguments, thus creating spaghetti of gotos and assignments.

Continuations rule!
--
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Phases of the moon [was Re: A Moronicity of Guido van Rossum]

2005-10-01 Thread Ulrich Hobelmann
Paul F. Dietz wrote:
> Bart Lateur wrote:
> 
>> As a similar example: I've been told by various women independently,
>> that "there are more babies born near a full moon."
> 
> That's also a myth.

Right, everybody knows that it's not natural (moon) light that 
influences reproductive behavior, it's artificial light -- TV.

When TV is turned off by a power failure, lots of people that usually 
never have sex start making love, and lots of people that usually use 
contraception lose their minds and forget about it.

9 months later more babies are born, unless that's also a myth.

-- 
We're glad that graduates already know Java,
so we only have to teach them how to program.
somewhere in a German company
(credit to M. Felleisen and M. Sperber)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: check html file size

2005-10-05 Thread Ulrich Hobelmann
Richard Gration wrote:
> Are you fucking seriously fucking expecting some fucking moron to
> translate your tech geeking fucking code moronicity? Fucking try writing
> it fucking properly in fucking Perl first.

Fucking excuse me?

Fucking maybe you should fucking go fucking fuck your fucking self...

Seriously, Xah might be a troll, but this is just pathetic.

-- 
We're glad that graduates already know Java,
so we only have to teach them how to program.
somewhere in a German company
(credit to M. Felleisen and M. Sperber)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: check html file size

2005-10-06 Thread Ulrich Hobelmann
Sherm Pendley wrote:
> I'm guessing you didn't get the joke then. I think Richard's response was a
> parody of Xah's "style" - a funny parody, at that.

If you take all the line noise in Perl as swearing ;)
I suppose I'm lucky I can't read it.

-- 
We're glad that graduates already know Java,
so we only have to teach them how to program.
somewhere in a German company
(credit to M. Felleisen and M. Sperber)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Perl-Python-a-Day: Sorting

2005-10-10 Thread Ulrich Hobelmann
Xah Lee wrote:
> To sort a list in Python, use the “sort” method. For example:
> 
> li=[1,9,2,3];
> li.sort();
> print li;

Likewise in Common Lisp.  In Scheme there are probably packages for that 
as well.  My apologies for not being very fluent anymore.

CL-USER> (setf list (sort '(1 9 2 3) #'<))  ; input
(1 2 3 9)   ; output

The second argument is mandatory too (comparison function).

> Note that sort is a method, and the list is changed in place.

Same here.  To be safe, assign the result to "list".

> Suppose you have a matrix, and you want to sort by second column.
> Example Solution:
> 
> li=[[2,6],[1,3],[5,4]]
> li.sort(lambda x, y: cmp(x[1],y[1]))
> print li; # prints [[1, 3], [5, 4], [2, 6]]

CL-USER> (setf list (sort '((2 6) (1 3) (5 4))
  #'(lambda (x y) (< (second x) (second y)
((1 3) (5 4) (2 6)) ; output

> The argument to sort is a function of two arguments, that returns -1,
> 0, 1. This function is a decision function that tells sort() how to
> decide the order of any two elements in your list. If the first
> argument is “less” then second argument, the function should return
> -1. If equal, then 0. Else, 1.

In CL you only need a smaller-than function.  I guess if elements are 
"equal", they don't need sorting anyway.

> li=[
> 'my283.jpg',
> 'my23i.jpg',
> 'web7-s.jpg',
> 'fris88large.jpg',
> ]

CL-USER> (setf list '("my283.jpg" "my23i.jpg" "web7-s.jpg" 
"fris88large.jpg"))

> def myComp (x,y):
> import re
> def getNum(str): return float(re.findall(r'\d+',str)[0])
> return cmp(getNum(x),getNum(y))

CL-USER> (defun my-comp (x y)
   (flet ((getnum (s)
(parse-integer s :start (position-if #'digit-char-p s)
   :junk-allowed t)))
 (< (getnum x) (getnum y

> li.sort(myComp)
> print li # returns ['web7-s.jpg', 'my23i.jpg', 'fris88large.jpg',
> 'my283.jpg']

CL-USER> (setf list (sort list #'my-comp))
("web7-s.jpg" "my23i.jpg" "fris88large.jpg" "my283.jpg") ; output

> li=[[2,6],[1,3],[5,4]]
> li.sort(key=lambda x:x[1] ) # is equivalent to the following
> #li.sort(lambda x, y: cmp(x[1],y[1]))
> print li; # prints [[1, 3], [5, 4], [2, 6]]

CL-USER> (setf list (sort '((2 6) (1 3) (5 4)) #'< :key #'second))
((1 3) (5 4) (2 6)) ; output

Here some people might jump in and say "lists might be more readable 
than vectors, but lists are slow."
If they are slow for your data set, just use vectors instead ;)

-- 
State, the new religion from the friendly guys who brought you fascism.
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-06 Thread Ulrich Hobelmann
Pascal Bourguignon wrote:
> Do you have an "Approved by Xah Lee" seal logo they could put on their web 
> page?

Funny, that'd *exactly* mirror the opinion I have of PHP :D

(btw, why is this posted to every newsgroup EXCEPT a PHP one?  make us 
feel good?)

-- 
Majority, n.: That quality that distinguishes a crime from a law.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-18 Thread Ulrich Hobelmann
Martin P. Hellwig wrote:
> Xah Lee wrote:
> 
> Nice rant, btw in most EU countries the software creator can not 
> withdraw the responsibility of his/her/it creation, regardless of what 
> the disclaimer says. The law is the leading authority and not some 
> Disclaimer/EULA, that's why most US EULA's are unauthoritative in the EU.

Actually most EULAs are unauthoritative in both the USA and (parts of) 
the EU, because the customer usually doesn't know or sign the EULA 
before he buys the software.  At least that's what I heard.

The piece that a European programmer can never withdraw responsibility 
could be a big problem to open-source software, though.  I'm not sure 
I'd want to freely publish anything that could result in liability for me.

-- 
If you have to ask what jazz is, you'll never know.
Louis Armstrong
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: IT Industry Predicament

2006-01-20 Thread Ulrich Hobelmann
Xah Lee wrote:
> • The reason fucking languages like C and family mask technically

Contrary to popular opinion, languages don't multiply.  Certainly they 
don't have sex.  Most (human) languages merely have something called 
gender, and words don't interact.  C has a bastard child called C++, 
true, but that was basically created by genetic manipulation of the 
original C, and indeed it's said to be 100% backward-compatible to C.

> Solution: Understand and spread the word that writing bug-free software
> are not difficult at all, and quality software can be as intuitive as
> extra hands. When good programers understand this and catch on, good

Yes, please go ahead.  Oh, you said "good programmers."  Never mind.

I know, don't feed the troll.  Sorry 'bout that.

-- 
The problems of the real world are primarily those you are left with
when you refuse to apply their effective solutions.
Edsger W. Dijkstra
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: accountability & lying thru the teeth

2006-02-14 Thread Ulrich Hobelmann
Xah Lee wrote:
> here's a site: http://www.longbets.org/bets that takes socially
> important predictions. I might have to enter one or two.
> 
> i longed for such a accountable predictions for a long time. Usually,
> some fucking fart will do predictions, but the problem is that it's not
[...]

OMG, he's back.

I predict, Xah will haunt us for years to come.

-- 
Suffering from Gates-induced brain leakage...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-12 Thread Ulrich Hobelmann
Jürgen Exner wrote:
> Just for the records at Google et.al. in case someone stumbles across Xah's
> masterpieces in the future:
> Xah is very well known as the resident troll in many NGs and his
> 'contributions' are less then useless.

And you are the resident troll-reply service, posting this reply every time?

> Best is to just ignore him.

You just broke that rule.

> But for heaven's sake unless you want to embarrass yourself really badly
> don't take any of his postings serious because he has proven again and again
> that he has no clue whatsoever about computer science or programming.

Fine.  Many people don't.  Whoever takes the time to read Xah's postings 
(I don't) will probably be able to find that out by himself.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-12 Thread Ulrich Hobelmann
jan V wrote:
> Did you know that some deranged people take sexual pleasure out of starting
> fires? Apparently some of the latest forest/bush fires in southern Europe
> were even started by firemen (with their pants down?).

I've only heard of people trying to extinguish fires with their pants 
down.  Oh well...

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-22 Thread Ulrich Hobelmann
Keith Thompson wrote:
> "Xah Lee" <[EMAIL PROTECTED]> writes:
> [the usual]

At least he noticed that tar sucks.  There's nothing better than tarring 
your backup back to disk, only to notice that the pathnames were "too 
long."  Great!

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-23 Thread Ulrich Hobelmann
l v wrote:
> Xah Lee wrote:
>> (circa 1996), and email should be text only (anti-MIME, circa 1995),
> 
> I think e-mail should be text only.  I have both my email and news 
> readers set to display in plain text only.  It prevents the marketeers 

Be generous in what you accept and conservative in what you send ;)

I always send plaintext emails, but Thunderbird can also display HTML. 
Of course I don't let it load remote images in the HTML, so no feedback 
for the marketers.

> and spammers from obtaining feedback that my email address is valid.  A 
> surprising amount of information can be obtained from your computer by 
> allowing HTML and all of it's baggage when executing on your computer. 

When that HTML execution accesses further remote resources.

> Phishing comes to my mind first and it works because people click the 
> link without looking to see where the link really takes them.

That's a problem, yes.  As usual, education helps.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-23 Thread Ulrich Hobelmann
Roger Leigh wrote:
>> At least he noticed that tar sucks.  There's nothing better than tarring 
>> your backup back to disk, only to notice that the pathnames were "too 
>> long."  Great!
> 
> That's been fixed for quite some time, though.  The current GNU tar
> (1.15.1) writes POSIX.1-2001 (PAX) archives, and has read them for
> quite a long time before.

Don't remember where it bit me.  Either Free- or NetBSD, or Mac OS 10.3, 
but it was sometime after 2002...  probably not GNU tar, though.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-25 Thread Ulrich Hobelmann
[EMAIL PROTECTED] wrote:
> In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote:
>>> the argument that usenet should never change seems a little
>>> heavy-handed and anachronistic.
>> No, simple since there *are* alternatives: web based message boards. Those 
>> alternatives *do* support HTML formatting (often the subset mentioned 
> 
> ... and generally these "web based message boards" (i.e. forums I
> assume you mean) have none of the useful tools that Usenet offers and
> are much, much slower.

That is because NNTP and its applications didn't evolve to feed the 
glitzy need lots of users have.

Sadly web forums (esp. the ugly, slw PHPBB, and the unspeakable 
Google groups) are increasingly replacing usenet, but there are 
exceptions (DragonflyBSD).

On the information side (in contrast to the discussion side) RSS is 
replacing Usenet, with some obvious disadvantages: go on vacation, 
return after a week, and -- yahoo! -- all your RSS feeds only turn of 
the, say, most recent 30 articles, while your newsgroups all show 
everything you missed.

There is no real reason why NNTP couldn't be used like RSS (i.e. contain 
a small description and a web link as message text), or why a newsgroup 
shouldn't we written in HTML and contain a (default, or user-provided) 
CSS sheet.  If things were that way, suddenly people *would* use Outlook 
and Thunderbird for news-reading, while today everything is just 
Browser+HTTP.

Oh, yes:

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Usenet, HTML (was Re: Jargons of Info Tech industry)

2005-08-26 Thread Ulrich Hobelmann
John Bokma wrote:
> Ulrich Hobelmann <[EMAIL PROTECTED]> wrote:
> 
>> On the information side (in contrast to the discussion side) RSS is 
>> replacing Usenet,
> 
> LOL, how? I can't post to RSS feeds. Or do you mean for lurkers?

I said "information side", meaning stuff like RSS is used for.

>> There is no real reason why NNTP couldn't be used like RSS (i.e.
>> contain a small description and a web link as message text),
> 
> It has been used like that for ages (or as long as I can remember).

Yes, but for some reason people jumped onto the RSS hype.  I wonder why. 
  Heck, even I am subscribed to a bunch of RSSes, because those 
institutions don't offer NNTP ;)

>> or why a
>> newsgroup shouldn't we written in HTML and contain a (default, or
>> user-provided) CSS sheet.
> 
> It's called www. It's already here (or there)

Well, but forums only emulate the posting/reply structure.  It would 
make more sense to use NNTP for that, and use $WHATEVER, e.g. HTML, for 
markup inside the posts.  WWW is something else; a bunch of pages with 
hyperlinks to each other.  Maybe we shouldn't call web forums and other 
dynamic websites www, as they don't really follow that purpose.  They 
are just abuses of HTTP/HTML/JS for thin clienting. ;)

>> If things were that way, suddenly people
>> *would* use Outlook and Thunderbird for news-reading,
> 
> But why do you want that? (Oh, and you can't read news with Outlook). Why 
> do you want more people on Usenet? 

No, I'm not talking about usenet.  I'm glad if the SNR keeps as high 
(haha) as it is, and messages in plain text.

I'm talking about using the technology for communication, instead of 
reinventing the wheel with crappy web forums.

Oh, and I've heard there are people reading our in-house newsgroup with 
Outlook.

>> while today
>> everything is just Browser+HTTP.
> 
> And what's wrong with that?

It's slow and pointless.  All interaction that's more than clicking a 
link has to be emulated with Javascript (heard of Ajax already?) to make 
it more smooth.

NNTP has advantages like giving you only the headlines first, so you can 
choose what to check out.  Then you can get the article if you like (in 
the communication case) or the news description (in the RSSoid case) and 
maybe click on a link inside.  Saves bandwidth and is quite faster than 
waiting for some overloaded PHP server to send you a bunch of HTML 
tables.  Responding doesn't involve *any* HTTP requests, just a keypress 
and you're typing.

Web forums are stone-age, as are most web-pages.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-26 Thread Ulrich Hobelmann
Mike Meyer wrote:
> "Mike Schilling" <[EMAIL PROTECTED]> writes:
>> Another advantage is that evewry internet-enabled computer today already 
>> comes with an HTML renderer (AKA browser)
> 
> No, they don't. Minimalist Unix distributions don't include a browser
> by default. I know the BSD's don't, and suspect that gentoo Linux
> doesn't. 
> 
> HTML is designed to degrade gracefully (never mind that most web
> authors and many browser developers don't seem to comprehend this), so
> you don't really need a "subset" html to get the safety features you
> want. All you need to do is disable the appropriate features in the
> HTML renderer in your news and mail readers. JavaScript, Java, and any
> form of object embedding. Oh yeah, and frames.

That's a good idea.  I have parts of it disabled.  The advantage of 
disabling them all is that you don't have to visit all those crappy 
modern websites, because they don't work.

What I hate about most are the sites that don't even *mention* that they 
want cookies.  Often I have to wonder, reinput input fields etc. and 
then after ten minutes trying *bang*, the idea, maybe to allow cookies 
for that site.  Some people really don't have a clue, but kludgy "web 
standards technologies" (by the oh-so-omnisavant W3C) kind of force it.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-26 Thread Ulrich Hobelmann
John Bokma wrote:
> [EMAIL PROTECTED] wrote:
> 
>> In comp.lang.perl.misc John Bokma <[EMAIL PROTECTED]> wrote:
> 
> [ web based boards ]
> 
>>> And which useful tools do you require?
>>>
>> A choice of news readers to suit different people with different
>> interfaces,
> 
> - different browsers, different stylesheets, different board styles 
> (themes).

But the UI is still *forced* on you by the website; no choice.  There's 
only a very limited choice, and it invariably *includes* the UI.  With 
NNTP *you* choose how to interpret and display the data you get.

> http://www.phpbb.com/mods/

Great.  How can I, the user, choose, how to use a mod on a given web 
server?  What if the web server runs another board than PHPBB?

>> A forum provides a
>> single, usually rather limited, interface for the user with no way for
>> the user to change it radically.
> 
> Does the user want this? And with a user stylesheet you can change it 
> quite radically :-)

The look, not the feel.

> And in return the user gets: colors, fonts, font sizes, embedding of 
> images, flash, you name it. Moving avatars, even sounds.

As I wrote earlier, you *could* run a web forum over NNTP, and use HTML 
posts instead of plain text.  It would have the advantages of NNTP.

> Oh, yes, I would love to see an XML interface on the board I use. Maybe 
> I can just install a mod, or write one myself.

What would that XML be for?  Any particular *use*?

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-26 Thread Ulrich Hobelmann
John Bokma wrote:
> Ulrich Hobelmann <[EMAIL PROTECTED]> wrote:
> 
>> What I hate about most are the sites that don't even *mention* that
>> they want cookies.  Often I have to wonder, reinput input fields etc.
>> and then after ten minutes trying *bang*, the idea, maybe to allow
>> cookies for that site.
> 
> So your browser doesn't warn you?

About what?  I have cookies off, with explicit exception for sites where 
I want cookies.  When the crappy website doesn't bother to MENTION that 
it wants cookies, i.e. give me an error page, how am I to know that it 
needs cookies?  Do I want EVERY website to ask me "do you allow XY to 
set a cookie?"  NO!

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-26 Thread Ulrich Hobelmann
John Bokma wrote:
>> I have cookies off, with explicit exception for sites where 
>> I want cookies.  When the crappy website doesn't bother to MENTION that 
>> it wants cookies, i.e. give me an error page, how am I to know that it 
>> needs cookies?  Do I want EVERY website to ask me "do you allow XY to 
>> set a cookie?"  NO!
> 
> So what do you want? An error page for every site that wants to set a 
> cookie?

No, the few sites where I actually have to log in to do anything useful, 
when they're well-coded, tell me that they need cookies, and if I think 
I like that website I make an exception entry for that site, allowing 
cookies.  Most sites just bombard you with useless, crap cookies (maybe 
advertising), so they are silently ignored by my browser.

The only thing I hate is when I am directed to some website that needs 
cookies, but doesn't tell me.  A couple times I did a survey, wasting 
maybe 10 minutes of my life for a good cause, and then there was an 
error. Great!  I guess that page needed cookies, but didn't bother to 
tell me.  Back button didn't work, either, so I just left that website.

OTOH, people who can't code can be fun, too, such as when you visit a 
website and there are lots of PHP, Java, SQL, or ASP errors ;)

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-26 Thread Ulrich Hobelmann
John Bokma wrote:
[cookies]
> Delete them after each session automatically, except the ones on the 
> exception list.

But why?  I simply don't even take them, except my exception list ;)

Some people have all cookies turned off.

> You are clearly not an average user, so your usage pattern 
> probably only messes up the stats they obtain via cookies anyway.
> 
> I have long ago given up on manually accepting each and every cookie, and 
> trying to guess it's purpose.

Exactly.  That's why I don't do that.  I just block them all, except 
some good sites where I want to be auto-logged in.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-27 Thread Ulrich Hobelmann
Mike Meyer wrote:
>> This can be designed much better by using iframes, maybe even Ajax.
 >
> Definitely with Ajax. That's one of the things it does really well.

But then you're probably limited to the big 4 of browsers: MSIE, 
Mozilla, KHTML/Safari, Opera.  Ok, that should cover most desktop users, 
but you might run into problems on embedded.

I've also noticed that especially web forums and dynamic websites take 
up looots of memory on my machine (but then I have lts).

>>> Why can't we use the Web for what it was meant for: viewing hypertext
>>> pages? Why must we turn it into a wrapper around every application
>>> imaginable?
>> Because it works?
> 
> Because you can - if you know how to use HTML properly - distribute
> your application to platforms you've never even heard of - like the
> Nokia Communicator.

If the NC has software that can properly interpret all that HTML, CSS, 
JavaScript plus image formats, yes.  But who guarantees that?  I'd 
rather develop a native client for the machine that people actually WANT 
to use, instead of forcing them to use that little-fiddly web browser on 
a teeny tiny display.

And again: connections might be slow, a compact protocol is better than 
loading the whole UI every time.  And while Ajax might work, despite the 
UI being maybe too big for the little browser window, and even if it 
works, it's still probably more work than a simple, native UI.  First of 
all it needs to load all the JS on first load, secondly sometimes for a 
flexible UI you'd have to replace huge parts of the page with something 
else.  Native UIs are more up to the task.

> I started writing web apps when I was doing internal tools development
> for a software development company that had 90+ different platform
> types installed inhouse. It was a *godsend*. By deploying one

If that's 90+ GUI platforms, then I agree.  I just wonder who wrote 
fully standards compliant web browsers for those 90 platforms.  If you 
have one Windows GUI (maybe C#), one Mac GUI (Cocoa), one Gtk GUI for X, 
you're done.  A GUI should be the smallest bunch of work on any given 
application, so it's not prohibitive to write a couple of them, IMHO. 
But then I've only ever used Swing and Cocoa and the latter *is* really 
convenient, might be that the others are a PITA, who knows...

> well-written app, I could make everyone happy, without having to do
> versions for the Mac, Windows, DOS (this was a while ago), getting it
> to compile on umpteen different Unix version, as well as making it
> work on proprietary workstation OS's.

Well, stick to POSIX and X APIs and your stuff should run fine on pretty 
much all Unices.  I never understood those people who write all kinds of 
weird ifdefs to run on all Unices.  Maybe that was before my time, 
during the Unix wars, before POSIX.  And if it's not Unix, what's a 
prop. workstation OS?

> Of course, considering the state of most of the HTML on the web, I
> have *no* idea why most of them are doing this.

Yep.  Maybe it would be best to reengineer the whole thing as ONE UI 
spec+action language, incompatible with the current mess, compact, so it 
can be implemented with minimum fuss.  And most of all, I wouldn't use a 
MARKUP language, as a real application is not text-based (at least not 
as characteristic #1).

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jargons of Info Tech industry

2005-08-27 Thread Ulrich Hobelmann
Mike Meyer wrote:
> Try turning off JavaScript (I assume you don't because you didn't
> complain about it). Most of the sites on the web that use it don't
> even use the NOSCRIPT tag to notify you that you have to turn the
> things on - much less use it to do something useful.

I had JS off for a long time, but now so many websites expect it, and 
even make browsing more convenient, that I grudgingly accepted it. ;)

> Sturgeon's law applies to web sites, just like it does to everything
> else.

Yep.  Filtering is the future in the overloaded world.

-- 
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
Dogbert
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Writing portable applications (Was: Jargons of Info Tech industry)

2005-08-28 Thread Ulrich Hobelmann
Mike Meyer wrote:
>> I'd rather develop a native client for the machine that people
>> actually WANT to use, instead of forcing them to use that
>> little-fiddly web browser on a teeny tiny display.
> 
> You missed the point: How are you going to provide native clients for
> platforms you've never heard of?

Who says I have to?  With open protocols, everybody can.  I know many 
platforms that STILL don't have a browser that would work with most 
websites out there.  They all have NNTP, SMTP and POP clients. 
Text-mode, GUI-mode, your choice.

>> And again: connections might be slow, a compact protocol is better
>> than loading the whole UI every time.  And while Ajax might work,
>> despite the UI being maybe too big for the little browser window, and
>> even if it works, it's still probably more work than a simple, native
>> UI.  First of all it needs to load all the JS on first load, secondly
>> sometimes for a flexible UI you'd have to replace huge parts of the
>> page with something else.  Native UIs are more up to the task.
> 
> I'm not arguing that native UI's aren't better. I'm arguing that web
> applications provide more portability - which is important for some
> applications and some developers.

Like Java provides more portability.  Unless you ran NetBSD in 2003 
(there was no Java back then that worked for me), hm, IRIX?, Plan9, BeOS 
the list goes on...  LOTS of platforms don't have the manpower to 
develop a client that renders all of the huge bloated wagonload of W3C 
tech that was only designed for *markup* from the beginning.

>>> I started writing web apps when I was doing internal tools development
>>> for a software development company that had 90+ different platform
>>> types installed inhouse. It was a *godsend*. By deploying one
>> If that's 90+ GUI platforms, then I agree.
> 
> Why do you care if they are GUI or not? If you need to provide the
> application for them, you need to provide the application for
> them. Them not being GUI just means you can't try and use a standard
> GUI library. It also means you have to know what you're doing when you
> write HTML so that it works properly in a CLUI. But your native app
> would have to have a CLUI anyway.

Ok, UI then ;)
I don't care what UIs people like and use.

>> I just wonder who wrote fully standards compliant web browsers for
>> those 90 platforms.
> 
> Nobody. I doubt there's a fully standards compliant web browser

Nobody, huh?  Then how could you run just ANY web application on those 
platforms?

> available for *any* platform, much less any non-trivial collection of
> them. You write portable web applications to the standards, and design
> them to degrade gracefully. Then you go back and work around any new

Oh right, they degrade gracefully.  So without Javascript or cookies 
(the former is often not implemented) you get a HTML page with an error 
notice -- if you're lucky.

A server AND client for a simple protocol designed for its task (i.e. 
not FTP for instance) can be implemented in much less work than even 
designing even part of a web application backend that does that kind of 
stuff.  Plus you're not bound by HTTP request structure, you can use 
publish/subscribe or whatever communication style you want for efficiency.

> bugs you've uncovered in the most popular browsers - which
> historically are among the *worst* at following standards.
> 
>> If you have one Windows GUI (maybe C#), one Mac GUI (Cocoa), one Gtk
>> GUI for X, you're done.
> 
> You think you're done. A lot of developers think you can stop with the
> first one or two. You're all right for some applications. For others,
> you're not.  Personally, I like applications that run on all the
> platforms I use - and your set doesn't cover all three of those
> systems.

Ok, I'd be interested to hear what those are.  VMS, RiscOS, Mac OS 9...?

>>> well-written app, I could make everyone happy, without having to do
>>> versions for the Mac, Windows, DOS (this was a while ago), getting it
>>> to compile on umpteen different Unix version, as well as making it
>>> work on proprietary workstation OS's.
>> Well, stick to POSIX and X APIs and your stuff should run fine on
>> pretty much all Unices.
> 
> You know, the same kind of advice applies to writing portable web
> apps. Except when you do it with HTML, "portability" means damn near
> any programmable device with a network interface, not some relatively
> small fraction of all deployed platforms.

Only that even years ago lots of even small platforms would run X, but 
even today MANY platforms don't run a browser with XHTML/HTML4+JS+CSS 
(well, okay, the CSS isn't that important).

>> I never understood those people who write all kinds of weird ifdefs
>> to on all Unices. Maybe that was before my time, during the
>> Unix wars, before POSIX.
> 
> There were standards before POSIX. They didn't cover everything people
> wanted to do, or didn't do them as fast as the OS vendor wanted. So
> Unix vendors added their own

Re: Writing portable applications

2005-08-29 Thread Ulrich Hobelmann
Mike Meyer wrote:
> I'm still waiting for an answer to that one - where's the Java toolkit
> that handles full-featured GUIs as well as character cell
> interfaces. Without that, you aren't doing the job that the web
> technologies do.

Where is the text-mode browser that would even run part of the web apps 
I use, like home-banking, all web forums, server configuration 
interfaces, etc.?  I think we should leave both these questions open. 
(In fact, as to UIs using Java, blech!  Haven't seen a really good one...)

 I just wonder who wrote fully standards compliant web browsers for
 those 90 platforms.
>>> Nobody. I doubt there's a fully standards compliant web browser
>> Nobody, huh?  Then how could you run just ANY web application on those
>> platforms?
> 
> The same way you write POSIX applications in the face of buggy
> implementations - by working around the bugs in the working part of
> the implementation, and using conditional code where that makes a
> serious difference.

But as soon as some user of platform 54 tries your website, she'll 
encounter some weird behavior without even knowing why.  And maybe so 
will you, especially if you don't have that platform there for testing. 
  I don't understand how this web thing changes anything...  With POSIX 
at least you have a real bug-report for the guy responsible for it.  If 
a platform keeps being buggy, with no fixes coming, screw them.  Every 
user will see that sooner or later, and these platforms die.  Even 
Windows is quite stable/reliable after 10+ years NT!

>>> available for *any* platform, much less any non-trivial collection of
>>> them. You write portable web applications to the standards, and design
>>> them to degrade gracefully. Then you go back and work around any new
>> Oh right, they degrade gracefully.  So without Javascript or cookies
>> (the former is often not implemented) you get a HTML page with an
>> error notice -- if you're lucky.
> 
> You left off the important part of what I had to say - that the
> application be written by a moderately competent web author.

But if you can cater for all kinds of sub-platforms, then why not just 
provide a CLI as well as those GUI interfaces, when we're duplicating 
work to begin with? ;)

If it doesn't run without JS, then you lock out 90% of all alive 
platforms (and maybe 1% of all alive users :D) anyway.

>> A server AND client for a simple protocol designed for its task
>> (i.e. not FTP for instance) can be implemented in much less work than
>> even designing even part of a web application backend that does that
>> kind of stuff.
> 
> Well, if it that easy (and web applications are dead simple), it
> should be done fairly frequently. Care to provide an example?

We have all the web standards, with various extensions over the years. 
Some FTP clients even don't crash if they see that some server doesn't 
yet support the extension from RFC [EMAIL PROTECTED]  Then there's tons of 
inter-application traffic in XML already, growing fast.  Then there are 
s-expressions (Lisp XML if you want).  Then probably thousands of ad-hoc 
line-based text protocols, but I don't know how well they can be 
extended.  There's CORBA.  Most web standards are simple, at least if 
you would subtract the weird stuff (and IMHO there should be new 
versions of everything with the crap removed).  XML is somewhat simple, 
just hook libxml.

There's NNTP.  There's RSS.  There's Atom.  The latter two emerged quite 
painlessly, even though you could maybe use some website for what they 
provide.  But this way you have lots of clients for lots of platforms 
already.

>>> You think you're done. A lot of developers think you can stop with
>>> the
>>> first one or two. You're all right for some applications. For others,
>>> you're not.  Personally, I like applications that run on all the
>>> platforms I use - and your set doesn't cover all three of those
>>> systems.
>> Ok, I'd be interested to hear what those are.  VMS, RiscOS, Mac OS 9...?
> 
> FreeBSD, OS X and a Palm Vx.

Didn't I say, a GUI for the Mac, for X11, and Windows?  That only leaves 
out the Palm.  I heard they aren't too hard to program for, either.  But 
I haven't heard of a really decent browser for pre-OS5 PalmOS (not sure 
about OS5).

>> If a system's scheduler, or select implementation sucks, though, I'd
>> complain to the vendor or simply abandon the platform for
>> another. Competition is good :)
> 
> Complaining to the vendor doesn't always get the bug fixed. And
> refusing to support a platform isn't always an option. Sometimes, you
> have to byte the bullet and work around the bug on that platform.

Sure, but you can tell your customers that unfortunately their system 
vendor refuses to fix a bug and ask THEM to ask that vendor.  Boy, will 
they consider another platform in the future, where bugs do get fixed ;)

>>> same thing applies to threads, except such code typically includes a
>>> third option of not using threads at all. And so

Re: Writing portable applications

2005-08-30 Thread Ulrich Hobelmann
Mike Meyer wrote:
> If your web apps are well-written, any of them should work. As
> previously stated, Sturgeon's law applies to the web, so chances are
> good they aren't well-written.

:)

>> But as soon as some user of platform 54 tries your website, she'll
>> encounter some weird behavior without even knowing why.  And maybe so
>> will you, especially if you don't have that platform there for
>> testing. I don't understand how this web thing changes anything...
> 
> The only difference is that the user of Platform 54 has a chance to
> use your app. Sure, it may not work because that platforms bugs are
> radically different from the bugs in the platforms you tested
> on. Raising the possibility of your app working from "no way in hell"
> to "maybe" is significant.

Ok, there's a chance...

>> With POSIX at least you have a real bug-report for the guy responsible
>> for it.  If a platform keeps being buggy, with no fixes coming, screw
>> them.  Every user will see that sooner or later, and these platforms
>> die.  Even Windows is quite stable/reliable after 10+ years NT!
> 
> You do? All your porters reliably give you bug reports? Can I have
> some?

No, I mean, when you compile something on POSIX and it doesn't work, you 
have a bug to report.  Of course many vendors might ignore them, and 
often don't send you any feedback at all (unfortunately), probably 
because contact between the company's programmer and you is considered 
bad for some reason (I'd consider it good support).

> These don't answer the question. Maybe because I didn't explain it
> fully. Do you have an example of an application that implements a
> simple protocol along with a client and server where HTTP+HTML were
> considered as an alternative, and rejected as "more difficult" than
> the path actually chosen?

No, because I don't know who considered HTTP+HTML before going the other 
way.  HTTP certainly is used increasingly (for XML transfers, WebDAV, 
RSS, ...), because it's quite simple widely implemented.  But as I said, 
there's RSS as a new standard, there's DAV and others.  They don't use 
HTML, because custom protocols can be easy but have advantages.  I guess 
it differs.  Some applications make a lot of sense in a hypertext 
context; others don't.

>> There's NNTP.  There's RSS.  There's Atom.  The latter two emerged
>> quite painlessly, even though you could maybe use some website for
>> what they provide.  But this way you have lots of clients for lots of
>> platforms already.
> 
> NNTP predates HTTP. Atom (and I assume RSS) uses HTTP as a transport,
> so there's no new protocol invovled - just a new file format.

Yes.  I consider HTML a kind of protocol in that sense, though.  It's a 
format, and it needs interpretation, too.

>> Sure, but you can tell your customers that unfortunately their system
>> vendor refuses to fix a bug and ask THEM to ask that vendor.  Boy,
>> will they consider another platform in the future, where bugs do get
>> fixed ;)
> 
> Yup. You and that platform vendor are no win the set of vendors that
> don't fix bugs. Personally, I'd rather provide a workaround and keep
> the customer.

Short-term definitely.  Long-term I'd try to migrate the customer 
(depending on how much influence I have in their IT context).

>>> Not all platforms are POSIX. If you're ok limiting your application
>>> to
>>> a small subset of the total number of platforms available, then
>>> there's no advantage to using web technologies. Some of us aren't
>>> satisifed with that, though.
>> Sure.  You have to look where your users are.  Chances are that with
>> obscure systems they can't use most web-apps either.
> 
> Right. Chances are they can only use well-written ones. If you write
> those, your stuff will stand out for them.

Very good point.  You give me back my faith in web-apps ;)

>> That's true, though I think the future of development lies in
>> overcoming that program-code-as-text thing (NOT visual programming,
>> just tool-based, structured).  Smalltalk did it decades ago.
> 
> Last time I looked at smalltalk, it still presented program code as
> text. So I think you need to clarify what you mean.

You have class and method browsers, while most Java and C code is still 
edited file-wise (though with options to hide methods except for their 
declaration header).  I think it makes sense to ignore the file thing 
and just use browsers like that (kind of like having every C function in 
one file, but with the headers and visibility of functions managed by 
your IDE/build system, not by you by hand.

>>> You don't have to guess - finding examples of XUL isn't hard at all. I
>>> think XML gets used in a lot of places where it isn't appropriate. One
>>> of the few places where it is appropriate is where you want a file
>>> format that lots of independent implementations are going to be
>>> reading. This could well be one of those times.
>> Maybe, but for applications that aren't predominantly concerned about
>> text, I'd 

float64 print digits

2007-03-02 Thread Ulrich Dorda
I need a pytho nscript to read numbers(with loads of digits) from a 
file, do some basic math on it and write the result out to another file.

My problem: I don't get python to use more digits:

In order to try this I type:

The normal precision one:
 >>> from numpy import *
 >>> x=1.23456789123456789123456789
 >>> print "%35.25e" %x
1.23456789123456790e+000


Now I try to use float64 to get more digits

 >>> z=zeros(3,float64)
 >>> z[0]
0.0
 >>> type(z[0])

 >>> z[0]=1.23456789123456789123456789
 >>> type(z[0])

 >>> print "%35.25e" %z[0]
1.23456789123456790e+000

This cuts the digits just like the 32bit case.

Can anyone please help me get more digits?

Thank you very much in advance,

Ulrich


-- 
http://mail.python.org/mailman/listinfo/python-list