@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> Since when did anyone consider the Americans civilised?
<1> The Horror! The Horror!
<2> whoa that's clever! never heard that one before
<3> I can't believe that python doesn't free allocated memory.. ever
<2> you're seeing normal OS behavir
<4> earle: Just some of it.
<2> most OSs don't shrink heaps
<4> Thatt's OK if you're overcommitting, but who's doing that nowadays?
<3> xihr: http://pastebin.com/747666
<3> xihr: that doesn't suprise you?
<3> xihr: with the current 2.4 memory management, it'd be impossible (without forking ridiculously) to write a long running python server which was constnatly manipulating and procsesing new data?
<3> without eventually bringing the system down anyways
<3> in python 2.5 it seems to be fixed.. or at least.. it free's memory.
<2> it's shrinking here
<3> ?
<2> so I don't know what your problem is



<3> xihr: that program in that pastebin doesnt shrink
<3> in 2.5 it does.. 2.4 it does not
<2> running 2.4
<2> whether heaps actually can shrink is a function of the OS, not Python
<2> if you allocate stuff and then free it, your application heap may or may not shrink
<4> xihr: Yes, but CPython had that leak.
<2> which leak?
<3> xihr: under linux 2.6.9 that app in 2.4 does not shrink.. in 2.5 it does
<4> http://evanjones.ca/python-memory.html
<3> xihr: what OS are you using which this functions properly on?
<2> Linux 2.4.x, Python 2.4
<2> the heap shrinks afterwards (not enormously but some)
<3> ok, it's 38.4M when it isa llocated, and 2.7M when its free (resident memory sizes)
<3> under Python 2.5
<3> now under python 2.4.. its 38.5M when its allocated, and 34.5MB when its deleted, and the same when its collected.
<2> I hadn't heard about that bug
<3> so under 2.4, how would you possibly write a server whcih was consntantly handling new requests, processing data, doing db requests and updates, without eventually running out of memory and bringing the machine down?
<2> the nature of the bug only invokes itself when you're dealing with very big data structures, right?
<2> most server processes handling requests don't
<3> yeah, im dealing wtih big data structures
<3> :)
<2> right
<3> so i guess i could have the thing restart the process every N hours or something, but that' just horrible
<2> I'm surprised, really, that's a pretty silly allocator bug
<3> 2.5 it works, but my app doesnt seem to work under 2.5
<3> some weird minidom parser problems
<2> well 2.5 is still alpha
<3> yeah.. what type of realistic timeframe do you think will be before there's a stable 2.5?
<3> 6mos? 12mos?
<2> only a few months probably
<2> it'll probably be ready before you launch, or shortly thereafter
<2> I wouldn't worry about it
<3> yeah so for now im just going to have it restart the thing every 3 hours or something
<0> anyone who uses IronPython here?
<3> nothing like have to have a while 1: fork() loop to get something to work right
<3> ;)
<3> nasty seeing a fork() and waitpid() loop
<5> hund: A rauter?
<3> ok i have a patch that fixes the python memory allocation and freeing for 2.4.3
<6> SgtUnix: or, rooter ?
<3> www.bluelavatech.com/~earle/obmalloc.diff
<5> nicolas: Perhaps
<3> wow that patch solved all my problems
<3> how silly
<7> anyone knows what ValueError: unpack list of wrong size means?
<2> a, b, c = 1, 2, 3, 4, 5
<2> it means you're doing that
<7> oh, ok
<7> oh, think I fixed the problem :)
<7> thanks :)
<8> What should I put for the realm & host in urllib2.HTTPBasicAuthHandler().add_p***word('realm', 'host', 'usr', 'p***') ?
<8> I tried putting the "Basic" for realm and the host of what I'm trying to urlopen() but it still returns a Authentication Required message
<8> Any ideas?
<2> realm and host are just things shown in the prompt dialog
<2> it means that you're not setting up HTTP authentication properly, it has nothing to do with those two arguments
<8> ImportError: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: __pure_virtual
<8> you guys ever get something like this trying to 'import mysqldb' ?
<8> i installed the mysqldb python package from the sf.net site
<9> docs.python.org/ref/types.html says number data types are immutable. what happens in a for i in range(1,10): kind of thing then?
<9> what's the reason for all the immutable variables anyway? does it have something to do with making things easier on the interpreter?
<10> the variables aren't immutable



<2> i is just ***igned with different objects
<10> the objects are
<2> as for why immutable objects, usually to avoid unexpected consequences in dynamic languages
<2> if someone has a reference and it's mutable, it can change underneath you unexpectedly
<2> that's usually not intended with fundamental types like ints and strings
<9> so myString = "test" would be mutable?
<2> no
<2> that's a reason why they AREN'T mutable
<2> which is what you asked for
<9> ok, I'm a little confused. I thought what you were saying applied to objects only, not fundemental types like strings and ints (are these variables?)
<9> I guess i'm not too clear on what the difference between a variable and object is
<9> probably should do some reading
<2> a variable is just a reference to an object
<9> so I can change a variable to point to many different objects?
<2> each variable can only reference one object
<11> then why is it called variable
<2> but multiple variables can reference the same object:: a = b = anObject()
<11> it should be called absolute/static
<10> a variable can only reference one object at a time
<9> right, I meant at different times
<9> sequentially
<2> es
<2> variables can be rebound so they're not "absolute/static," you're just being silly
<2> since you can change what variables reference and mutate the objects they reference (provided the object itself is mutable), they're called what they're called in every other programming language: a variable
<9> oh, i see even basic types like int are objects in python?
<2> yes
<9> ok, thanks
<11> is it me or the evolution of programming language is now a self generating endeavour to eventually call the person to go up in smoke
<10> huh?
<11> like in star trek, as in case of an android
<2> in English this time?
<2> if you mean that programming requires actual thinking, then: yes
<11> there seem to be more efforts to explore programming languages than exploring how it can accomplish certain things.
<11> i guess people are getting smarter and there's nothing for them to do. they've become a language designer of sort.
<2> Python's type model is manifest typing, it's been around since Lisp
<11> it used to be that people who program FORTRAN don't care what it does underneath. they're taught to use the language to accomplish tasks.
<2> yes, and those people wrote awful, buggy, insecure code
<2> so go figure
<11> and the software was good.
<11> all the Unix utilities were written way back then.
<2> not in FORTRAN
<11> they do as advertised.
<2> the C programming language was created for the purpose of making Unix
<2> so those very people you're talking about WERE language designers
<8> Who uses python w/ mysql?
<12> ftw.
<13> re
<14> how do I check to see if i have python installed from shell?
<2> type:: python
<14> swift:29> python
<14> python: Command not found
<2> then probably not
<14> how do I check to see if i have php installed from shell?
<15> whereis python
<2> why are you asking here?
<15> or find python
<14> oh
<14> donno
<2> find python definitely won't work; you mean locate
<15> oops yep you're right 'find' is a script that i've written
<14> i know it has php installed but when i type php i get the same thing as when i type python : command not foudn
<2> ask in #php, this is #python
<14> k
<16> what's the standard url for introductory python documentation these days?
<16> i mean, is it www.python.org/doc/ or is it docs.python.org?
<16> I just want to know which one to use when people ask me.
<16> Personally, I'd prefer docs.python.org, but www.python.ord/doc/ comes up first on google, as people have been peevishly reminding me lately.
<16> s/ord/org/
<4> Mit vli.
<17> Hello. How do I get the filename of the script?
<17> sys.what?
<13> sys.argv
<18> anyone used wxpython here?
<18> I have some problems with ListBox


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

#flash
#politics
#nhl
#computers
tcl test integer
#politics
#sendmail
#beginner
#red
#politics



Home  |  disclaimer  |  contact  |  submit quotes