tag:blogger.com,1999:blog-11788780.post1464409681979281556..comments2023-12-29T13:22:33.104-08:00Comments on JJinuxLand: PyCon: Make Sure Your Programs Crashjjinuxhttp://www.blogger.com/profile/03270879497119114175noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-11788780.post-64955715588589914092012-03-28T09:31:35.780-07:002012-03-28T09:31:35.780-07:00Fixed! Thanks!Fixed! Thanks!jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-35800390937435161762012-03-28T09:08:45.747-07:002012-03-28T09:08:45.747-07:00jj, I think you've got an extra a in Moshe'...jj, I think you've got an extra a in Moshe's name.Tavis Rudd (openid only - no blog)https://www.blogger.com/profile/02741099115279342000noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-35683651915647062432012-03-26T11:53:56.365-07:002012-03-26T11:53:56.365-07:00Anonymous, please don't use the word "bul...Anonymous, please don't use the word "bullshit" on my blog.<br /><br />If you're interested in integrating STM into Python, see this (http://jjinux.blogspot.com/2012/03/pycon-why-pypy-by-example.html).<br /><br />I don't think that having code to recover from crashes quickly is at odds with other approaches to reliable software. For instance, Erlang has an actor-based concurrency model, and Erlang OTP is all about trees of actors that monitor each other and recover from failures quickly.jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-58493109864862914822012-03-25T05:03:51.966-07:002012-03-25T05:03:51.966-07:00It's this kind of bullshit that makes me want ...It's this kind of bullshit that makes me want to move on from python to something like Scala. Compare:<br /><br />Q. How do we make software reliable?<br /><br />Python A: make sure your code recovers quickly after crashing<br /><br />Scala A: use Software Transactional Memory, to mark a block as a single transaction. Simply undo the current transaction if anything goes wrong, then continue from that point.<br /><br />Q. How do we write programs that scale to high performance on multiple cores?<br /><br />Python A: Well, we have the GIL which prevents proper multithreading, and actually makes threads SLOWER on multicore machines, but removing the GIL is hard, even though Jython did it just fine, so we're not going to bother. In short, we have lots of libraries for green threads etc., but none of them work because we won't fix the fundamental problems underlying it all.<br /><br />Scala A: We solve the problem on two fronts. First, we the best of breed Actor model of concurrency, unifying it into the language core, with two main keywords allowing you to choose between heavyweight OS threads and lightweight "green" threads, allowing you to code in the same style no matter which system you need for a particular block of code. Secondly, we provide parallel collections, which allow you to, for instance, iterate over a list, running a block of code on it in parallel, just as you would with non-parallel code.<br /><br />Python is being quickly left behind.Anonymousnoreply@blogger.com