HNHacker News
TopNewBestAskShowJobs

lbolla

173 karma · joined July 26, 2010

submissionscomments
lbolla··on Run Python Applications Efficiently with malloc_trim
My point is that it does work. I tested with Python 2.7 and Python 3.6+.
lbolla··on Run Python Applications Efficiently with malloc_trim
I developed that tweak for Python 2.7 and I am running in production with Python 3.6. I tested with later Python versions, too.

Do you have some pointers about arenas always using mmap? I'd like to know how that trick can work if that was the case.

lbolla··on Run Python Applications Efficiently with malloc_trim
I discovered a similar trick few years ago: https://stackoverflow.com/questions/35660899/reduce-memory-f...

The idea is to tweak when `mmap` or `malloc` are used by the Python interpreter. One allows memory to be released to the OS right away, whereas the other is not.

It is a useful trick if your application is generating lots of small objects.

lbolla··on Chess Is the Killer App
Chessbrah is also a very fun channel. https://www.youtube.com/user/chessbrah
lbolla··on 110M-year-old dinosaur discovered with skin and soft tissue
Because underwater there is less oxygen, less light and nice fine muddy floors.
lbolla··on Show HN: Easily connect to a VPN in a country of your choice
To watch Netflix for instance.
lbolla··on Sanic – Python 3.5+ web server that's written to go fast
What's up with those latency numbers? Seem huge to me.
lbolla··on One-sentence proof of Fermat's theorem on sums of two squares
It should be "positive" numbers. http://mathworld.wolfram.com/Hardy-RamanujanNumber.html
lbolla··on 91-year-old woman fills out crossword – turns out to be $116k artwork in museum
Actually, one could argue that something is "artistic" if it has the unique property that nobody at all finds it "artistic"...

I recommend the works by Arthur Danto (https://en.wikipedia.org/wiki/Arthur_Danto) for very interesting definitions of "art".

lbolla··on Are We Living in a Computer Simulation?
Actually, "cogito ergo sum" comes from "Discourse on the Method".
lbolla··on Bill Gates loses to Magnus Carlsen in 9 moves
Best commentary of the match, by Jerry! http://www.youtube.com/watch?v=_0QdI0rVoHA&feature=em-upload...
lbolla··on CIS 194: Introduction to Haskell (Spring 2013)
Yeah, I would agree that head, as it is, looks like a mistake. Instead of:

  head :: [a] -> a
I would code it as:

  head :: [a] -> Maybe a
returning Nothing for empty lists. Same applies to tail.

But others have very good reasons to disagree: http://stackoverflow.com/questions/6364409/why-does-haskells...

lbolla··on So You Want to be A Freelancer
Can you share your experience? How did you get started contracting in the UK? Did you contact a head-hunter or do you find your own contracts? How?
lbolla··on Web Framework Benchmarks Round 3
Actually, tornado's test uses Mongo, which makes the test quite uncomparable to others using MySQL! https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
lbolla··on EditREPL - Open Vim from within the Python REPL
IPython has this feature baked in the magic %ed command [1].

[1]: http://ipython.org/ipython-doc/dev/config/editors.html

lbolla··on Using Scala to handle exponential growth at a startup
No. But their "Hey Jude" diagram is worth a watch! https://www.lucidchart.com/pages/examples/flowchart_software
lbolla··on C++11 and Boost - Succinct like Python
My eyes just exploded! ;-)
lbolla··on L'Aquila quake: Italy scientists found guilty of manslaughter
Corruption in Italy is hardwired in the behavior of people and their approach to life. It's enough to live in Italy for a long enough time to understand how people reason and why corruption is so widespread.

Obviously, being Italian doesn't make me an expert in corruption from a legal point of view, but I am pretty positive to know a bit about Italian mentality and facts confirm that corruption is as common in the North as it is in the South (I can cite my sources, if necessary.)

lbolla··on L'Aquila quake: Italy scientists found guilty of manslaughter
Don't be so naive! Scientists are not bound by some force of Nature to tell the truth. The accusation is exactly that they didn't tell all they knew about the earthquake, but they hold back the information in order to "quiet down" the population.

Obviously, I don't know if the accusations are true or false, but, knowing Italy, where "famous" scientists are usually very close to politicians, it would not surprise me at all.

lbolla··on L'Aquila quake: Italy scientists found guilty of manslaughter
This is bullshit, let me tell you. Corruption is everywhere in Italy: North AND South. Public sector AND Private sector. I am Italian, from the North, I lived in Milan for years and I am married with a woman from Rome: I know what I'm saying...
lbolla··on L'Aquila quake: Italy scientists found guilty of manslaughter
This is way more complex than it might appear. Italian speakers can watch this movie: http://www.youtube.com/watch?v=rROgB5QMgHs&feature=playe... It shows a telephone conversation between the chief of "Protezione Civile" (responsible to react and intervene in case of catastrophes) Guido Bertolaso and a politician in the region where the earthquake happened, Daniela Stati.

Bertolaso first tells Stati that they did badly by saying the media that they didn't expect more earthquakes (as they did the day before, after a small shake that did no damage). Bertolaso added that he would fix this error with the media and send the most important scientists he knows to "quiet down" the population, upset by the previous message and by the continuous shakes. The accusation is that scientists didn't actually report what they knew, but they went in front of the media to "quiet" down the population.

Unfortunately, the day after the big earthquake happened and 309 people died.

lbolla··on L'Aquila quake: Italy scientists found guilty of manslaughter
They are not in jail, and I bet they will never go to jail. I say this because, as Italian, I've seen way too many processes ended in first degree with a condemnation, and later on, in the second and third grade, ended with an absolution.
lbolla··on Login vs Log In
I agree with your prediction, but it scares me that a medium that should make communications easier will actually put more barriers between ages.

I already do not understand SMS spelling: in 50 years, probably a 30 years old person will not understand things written by a 15 years old person.

Conservatism in schools has the advantage that we can still read Shakespeare (or Dante) without translation. Languages that change too quickly defy their own purpose (i.e. being a common ground for people to communicate).

lbolla··on Login vs Log In
I agree in principle, but where do schools fit in your picture? Schools should teach you the meaning of things and then, only if the available meanings don't fit your reality, then people should recur to "agreement". I like to think that Shakespeare (or Dante, in my language) words weight more than FB posts to define the meaning of things ;-)
lbolla··on Login vs Log In
I think it really boils down to whom you are addressing: people who ignore things are happy to do as others (even if they are wrong -- they don't know!), whereas people who know things care about correctness (and are annoyed by incorrectness or sloppiness).
lbolla··on Login vs Log In
The most annoying thing to me is seeing that popularity is mislead for authority or correctness. Why would the options chosen by the majority of people be the most correct one? Pitfalls of democracy...
lbolla··on Python for Data Analysis (new O'Reilly book from creator of Pandas)
If you intend "matrix multiplication", there is no "right order": "matrix multiplication" is associative (http://en.wikipedia.org/wiki/Matrix_multiplication).

Numpy has a "matrix" type, so you can write:

        In [7]: A = numpy.matrix('1 2; 3 4; 5 6')                                                         
        In [8]: B = numpy.matrix('1 2 3; 4 5 6')                                                          
        In [9]: C = numpy.matrix('1; 2; 3')                                                               

        In [10]: A * B * C
        Out[10]: 
        matrix([[ 78],                                                                                    
                [170],                                                                                    
                [262]])                                                                                   
        
        In [11]: (A * B) * C                                                                              
        Out[11]:                                                                                          
        matrix([[ 78],
                [170],                                                                                    
                [262]])                                                                                   

        In [12]: A * (B * C)                                                                              
        Out[12]: 
        matrix([[ 78],                                                                                    
                [170],
                [262]])
lbolla··on Stop writing classes...
What surprises me is that no-one mentioned inheritance when speaking about classes. I am not a fan of classes and I prefer the functional approach, whenever possible. In my experience, I found that classes make sense as part of a hierarchy, that is, when subclassed to override/specialize methods or to describe interfaces, like type-classes in Haskell.
lbolla··on Remove Google Search History Before New Privacy Policy Takes Effect
Remember that "if you're not paying for it, you're the product".

http://lifehacker.com/5697167/if-youre-not-paying-for-it-you...

lbolla··on Distant 'waterworld' is confirmed
Gravity depends on m/r^2 where m is the mass of the planet and r its radius. Compared to Earth's, m = 7 m_earth and r = 2.7 r_earth, which gives you a gravity 0.96 times the gravity on Earth. Remarkably similar... But I wonder, if the temperature is 200 degrees, there must be a massive pressure, in order to have liquid water. Where does the pressure come from? Heavy atmosphere?
Page 1 of 2Next →