<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-1440405560330732771</id><updated>2009-12-17T01:42:07.664-08:00</updated><title type='text'>The Good Soldier LMeyerov</title><subtitle type='html'>a grad student's tale of survival in the face of absurd web programming models, systems insecure almost by design, disconnected language theories, and the berkeley meat grinder</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default?start-index=26&amp;max-results=25'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>125</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-8404685610564813488</id><published>2009-12-17T01:19:00.000-08:00</published><updated>2009-12-17T01:42:07.680-08:00</updated><title type='text'>Exciting</title><content type='html'>Yesterday I finished rewriting my CSS layout grammars to be functionally pure (and restrict almost all iteration to that over nodes): with a bit more work, I think you can represent them in the language of Rep's very simple grammars (though not if you want good parallelism ;-)). This is important because, if I generate solvers based on such a grammar, it's ok to only support a restricted language. Result 1: win!&lt;br /&gt;&lt;br /&gt;Today, I've been extending my documentation on the grammars. Part of this is the negative space. I haven't even read the specification of margins/padding/clearance/tables. I remembered that, while I also don't handle overflow (visible, auto, scroll, hidden) and exotic positioning styles (absolute, fixed, etc.), they didn't seem hard. Beyond some interactions with floats, they weren't -- haven't created new language levels with them yet, but added the informal intuition of what changes. Result 2: win!&lt;br /&gt;&lt;br /&gt;I already have floats (well, left-floats), inlines, and boxes. Now just tables, margins, and padding, and we'll support most websites! That means there's a pure, linear time representation of CSS with clear (speculative) data parallelism and a simple language -- making it incremental and parallel might not be so bad. Still worried about the renderer..&lt;br /&gt;&lt;br /&gt;Almost done with our extended TR, just want to add the translation from CSS to BSS. Looking good :D  Worst-case scenario, I drop out of grad school and become a CSS consultant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-8404685610564813488?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/8404685610564813488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=8404685610564813488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8404685610564813488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8404685610564813488'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/12/exciting.html' title='Exciting'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7738534599304264123</id><published>2009-12-14T02:25:00.000-08:00</published><updated>2009-12-14T03:21:03.978-08:00</updated><title type='text'>When should something be a language feature?</title><content type='html'>Adrienne and I had been hacking on a JavaScript library for controlling capabilities (see previously posted snippets). We have some semblance of an understanding of its pros and cons, both in abstractions provided and strategy used to implement them. My suspicion is that it belongs as a language feature. That's a big claim.&lt;br /&gt;&lt;br /&gt;I described our library to a friend who does a lot of security research. He does more systems and dynamic analysis techniques than linguistic ones so he didn't have intuition for my claim. More precisely, I think he fell under the &lt;a href="http://www.paulgraham.com/avg.html"&gt;blub paradox&lt;/a&gt;: he got along fine without it, and can hack together something if he really needs it, so why bother with the extra language complexity? When something should be a language feature is a tough but stimulating question, and I think some of my reasons for this project are representative:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Performance. &lt;a href="http://www.billbuxton.com/"&gt;Bill Buxton&lt;/a&gt;, in his "order of magnitude" principle, states changing a dimension of something by a magnitude makes it a new thing. In this case, if a security feature is cheap, you feel fine using it -- imagine how we'd write C code if processes and message passing were as threads with shared memory! Using language support, we can do some dirty tricks. Lightweight threads in functional languages is essentially this.&lt;/li&gt;&lt;li&gt;Conciseness. Similarly, if we struggle to write something, we won't. There's a world of a difference in writing functional code in C++ and Haskell or even O'Caml. If you have to write C++ code, it's possible to write most functional stuff with some encoding and library help, but if you want to write functional style code, you'll be more productive in other languages. This is the OOM principle all over again.&lt;/li&gt;&lt;li&gt;Expressiveness. At a bigger scale, abstractions like continuations and aspects are fundamentally difficult to encode locally -- shoe-horning them into legacy code is tough.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Legibility. Most of our time is spent reading, analyzing, testing, and revisiting code: removing boilerplate and standardizing idioms strengthens large and long-term projects. Data binding -- even if not at the Flapjax level -- is a crowd favorite here. SQL is probably another good example (... until it falls down).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Automation. Spread through is a notion of global or standardized idioms: manually handling them increases the risk of error. My favorite example is manual garbage collection.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tool support. If a feature is important, we'll probably want program analysis help (verification, testing, etc.) and IDE support for it -- which are easier to do when a feature is made a language feature. Package/import handling in Eclipse for Java apps is just the tip of the iceberg here.&lt;/li&gt;&lt;li&gt;TCB. The trusted computing base should be as small as possible: if a security critical property requires a lot of funny code and usage assumptions... that's bad. The whole multi-process browser architecture movement is, in a sense, about this (... though it's not the only way once you think about it like this).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Finally... Understanding. The approach of making a calculus based around a feature is in part due to this: what's going on at a basic level and how necessary is it? What happens if we deeply embed it -- what's the value and impact?  For a research project, making an idiom a language feature is an enlightening approach, even if it'll be watered down to a library later. I find this somewhat similar to denotational and typed approaches to coding.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The points above are about the value-added benefit of doing something at the language layer.. I think there's a sniff test that would have a bit more to it.  E.g., hovering around most of these reasons is some sort of notion of global or pervasive property. Something a developer is always doing or needing to somehow maintain.&lt;br /&gt;&lt;br /&gt;Why something should be a language feature is a subtle question -- I still don't really know. Another perspective is to ask when something &lt;span style="font-style: italic;"&gt;should not&lt;/span&gt; be a language feature. Where is the line?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7738534599304264123?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7738534599304264123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7738534599304264123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7738534599304264123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7738534599304264123'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/12/when-should-something-be-language.html' title='When should something be a language feature?'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-2005763762224523776</id><published>2009-12-04T02:34:00.001-08:00</published><updated>2009-12-04T03:19:26.277-08:00</updated><title type='text'>Getting closer to a quals topic</title><content type='html'>Trying to figure out what my thesis project is going to be. The theme of my research at Berkeley has shifted, overall, from AJAX application abstractions (user level, inference, etc.) to browser design (security, performance, and  specification).&lt;br /&gt;&lt;br /&gt;I think my security work has been exciting and we're close to where I want to be with it (still want to combine our project on rich security abstractions with the one on lightweight browser security primitives for a powerful but feasible middle ground over the course of the next year). Unfortunately, I think the politics of (web) security research and web standards will limit the impact of this work in the short-term and the PL community wouldn't find it too interesting despite being driven by  new linguistic abstractions  (as opposed to the trend of coarse  software architectures or  analysis-driven approaches nobody uses). It's getting too frustrating for what I "know" is right. If I wanted a quick thesis, however, doing the unification, verifying a DOM policy language subset,  and improving the language primitives / policy language with some guidance from more case studies would probably be the way to go.&lt;br /&gt;&lt;br /&gt;The parallel browser stuff is getting more appealing in terms of popular interest, a vehicle for principled work, and a concrete set of problems. The rub is the theoretical component: what's actually new? Is it "just" engineering? I think the engineering challenge is crucial: just like we don't know how to build a multicore OS, which is recognized as a fundamental systems research question, so is building the browser, which is now essentially the 'other' stuff that's expected but not in the kernel. As I look at my Kindle and iPhone, I know I could use the speed. There's a clear problem -- but could it be solved by some guy who knows assembly, a few simple algorithms, or network-friendly compression algorithms? Luckily, answering even that is an open and crucial systems question.&lt;br /&gt;&lt;br /&gt;However... appealing to the PLer inside, I'm finding common abstractions between my algorithms. The DOM tree is a structured model and a *lot* of computations that tax your CPU are centered around it. After writing another couple of components, I want to step back and figure out: what's an appropriate DSL for writing these browser-style algorithms? Currently, my suspicion is some sort of parallel, incremental (interactive/reactive), and continuous tree language (e.g.,  pipelines of attribute grammars). There is a lot of theoretical performance work in this area, but it suffers from lack of application, scaling, and unification.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Applying such a language to the variety of challenges in  browser development will both make it compelling and flush out algorithmic concerns that aren't apparent when 'just' looking at traditional parsing tasks. Furthermore, hopefully I'll come out with generally useful artifacts:  the next yacc and some browser components (like my layout grammars). So, "PICTL: The Parallel, Incremental, and Continuous Tree Language; or, How to Build a Parallel Browser."&lt;br /&gt;&lt;br /&gt;We'll see. Should keep me busy for the next couple of years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-2005763762224523776?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/2005763762224523776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=2005763762224523776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2005763762224523776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2005763762224523776'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/12/getting-closer-to-quals-topic.html' title='Getting closer to a quals topic'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7243375652438104016</id><published>2009-11-12T00:54:00.000-08:00</published><updated>2009-11-12T02:44:02.225-08:00</updated><title type='text'>Fast and Parallel Webpage Layout</title><content type='html'>Realized I haven't posted this one yet. We submitted our first full paper about some of the parallel web browser work. I'm working on cleaning up the extended TR, but the short &lt;a href="http://www.eecs.berkeley.edu/%7Elmeyerov/projects/pbrowser/pubfiles/playout.pdf"&gt;10 page version&lt;/a&gt; is a more approachable glimpse:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The web browser is a CPU-intensive program.  Especially on mobile devices, loading of webpages is too slow, spending much of its time in processing a document's appearance.  Due to power constraints, most hardware improvements will come in the form of parallel architectures.  This is also true of mobile devices such as phones.  Current browsers, however, do not yet fully exploit hardware parallelism, so we are designing a parallel mobile browser. In this paper, we introduce new algorithms for CSS selector matching, layout solving, and font rendering, which represent key components for a fast layout engine. Evaluation on popular sites shows speedups as high as 80x.  We also formulate layout solving with attribute grammars, enabling us to not only parallelize our algorithm but prove that it computes in O(log) time and without reflow.&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;Irrespective of how you feel about our solution, the intro benchmark section surprises most people I talk to about what's actually slow in browsers. Below are basic CPU times and then (not included in the paper) JavaScript times when loading some popular pages. You might suspect that these are not representative of running pages; I found that harder to benchmark, but at least in cases of animations (e.g., loading emails), it's actually still true. Finally, keep in mind&lt;span style="font-style: italic;"&gt; handhelds are and will be ~10x+ slower than laptops&lt;/span&gt;: 200ms on the laptop used below is 2s+ on a handheld.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4m57DDHVrBA/SvvO8LgXJQI/AAAAAAAAAL8/NvG8QIiYHEc/s1600-h/post2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 249px;" src="http://1.bp.blogspot.com/_4m57DDHVrBA/SvvO8LgXJQI/AAAAAAAAAL8/NvG8QIiYHEc/s400/post2.png" alt="" id="BLOGGER_PHOTO_ID_5403139711237039362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Overall CPU task time (ms) when loading a page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4m57DDHVrBA/SvvO7rqNdiI/AAAAAAAAAL0/5_3pFf2dJZ8/s1600-h/post1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 233px;" src="http://1.bp.blogspot.com/_4m57DDHVrBA/SvvO7rqNdiI/AAAAAAAAAL0/5_3pFf2dJZ8/s400/post1.png" alt="" id="BLOGGER_PHOTO_ID_5403139702688413218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JavaScript CPU task time (ms) when loading a page.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As a disclaimer (and solicitation for input!) the paper is still in draft form. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7243375652438104016?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7243375652438104016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7243375652438104016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7243375652438104016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7243375652438104016'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/11/fast-and-parallel-webpage-layout.html' title='Fast and Parallel Webpage Layout'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_4m57DDHVrBA/SvvO8LgXJQI/AAAAAAAAAL8/NvG8QIiYHEc/s72-c/post2.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-2455353603055907267</id><published>2009-11-02T11:40:00.000-08:00</published><updated>2009-11-02T12:15:18.092-08:00</updated><title type='text'>Back from OOPSLA</title><content type='html'>... and now am in a very long email thread about the semantics of synchronous postMessage ('sendMessage') if different origin frames are allowed to run in different processes. Do we model it with yield? To who? Or can there be a deadlock? Will post once I have a semblance of understanding.&lt;br /&gt;&lt;br /&gt;Good times. Big ups to the WebDSL and Angular teams for great demos.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-2455353603055907267?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/2455353603055907267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=2455353603055907267' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2455353603055907267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2455353603055907267'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/11/back-from-oopsla.html' title='Back from OOPSLA'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-3365994823109531701</id><published>2009-10-01T10:53:00.000-07:00</published><updated>2009-10-01T11:00:06.930-07:00</updated><title type='text'>As much as I like smart phones</title><content type='html'>Closed devices still feel like an Orwellian &lt;a href="http://benzilla.galbraiths.org/2009/09/29/thoughts-on-palm-and-jamie-zawinski/"&gt;fantasy-land&lt;/a&gt;. It's hard to imagine these absurd licensing distinctions between handhelds and laptops will exist in say, 5 years. Feels just like when I was doing radio and everyone was trying to deal with the whole internet thing. Maybe that means some folks won't ever get it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-3365994823109531701?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/3365994823109531701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=3365994823109531701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/3365994823109531701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/3365994823109531701'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/10/as-much-as-i-like-smart-phones.html' title='As much as I like smart phones'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-849662644837236402</id><published>2009-09-30T00:30:00.000-07:00</published><updated>2009-09-30T01:05:10.391-07:00</updated><title type='text'>POPL program is out</title><content type='html'>I'm steadily  more and more of a PLDI and ICSE guy, but a few POPL papers look fun this time around:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;programming with angelic non-determinism (berkeley bias ;-))&lt;/li&gt;&lt;li&gt;coarse-grained transactions (... brown bias ;-))&lt;/li&gt;&lt;li&gt;verified JIT&lt;/li&gt;&lt;li&gt;integrating typed and untyped code in a scripting language (... what happened to Arjun's paper about it? and will anything happen with the es4 effort beyond cutting down trees?)&lt;/li&gt;&lt;li&gt;monads in action&lt;/li&gt;&lt;li&gt;paralocks&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Only one paper looked like it has a chance of blowing my mind about how we write programs. I must be getting old.&lt;br /&gt;&lt;br /&gt;In contrast, Wes Weimer gave a great talk today about applying random program edits to fixing bugs. There's been a lot of work in the area -- my favorite was on doing it for programs with illegible type errors -- Wes' trick of reusing existing program fragments was neat, but more interesting was the evaluation on non-toy programs. It works, and even though I suspect it only succeeds for bugs that are already simple to fix, it suggests we're getting close to realistically rethinking the triage process.&lt;br /&gt;&lt;br /&gt;Finally, there was surprise about a suggestion to farm out testing to EC2: the current examples of scaling were 4-8 core machines, not 16-20,000 ones I'm used to -- our group's interest in so little cores for mobiles should be the exception, not rule. I'm seeing a lot of that in the community; e.g., there was an otherwise great talk about optimizing points-to analysis recently that I felt also missed the boat here. If there's an age old algorithm that we need to speed up by a few magnitudes, chances are, you can put it on EC2. Scientists have been doing it for years; now it's open for the masses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-849662644837236402?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/849662644837236402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=849662644837236402' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/849662644837236402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/849662644837236402'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/09/popl-program-is-out.html' title='POPL program is out'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-6842230424831625572</id><published>2009-08-28T23:50:00.000-07:00</published><updated>2009-08-29T13:33:23.031-07:00</updated><title type='text'>Securing the web with continuations!</title><content type='html'>The payoff from the previous posts:&lt;br /&gt;&lt;br /&gt;Say Alice is an iframe inside Bob and wants to start a shared library with Bob.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;alice.html:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;library = {y: {x: "call me Ishmael"}};&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bob.html:&lt;/span&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;var library  = makePostMembrane(document.getElementById('alice').contentWindow).getRoot("library");&lt;br /&gt;alert(library.y().x())&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Technical aside: unfortunately, Strands etc. do not support continuations captured in redefined field accessors (setters/getters), so I didn't quite achieve the transparency goal of "library.y.x", but close :) Maybe try hacking in support if I have time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The architecture is somewhat interesting:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;One cross-frame 'networking' library for using the string-passing abilities of postMessage to make sharing closures and objects between frames no different from passing to them to functions/actors in the same context: no more JSON and strange asynchronous protocols.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Optionally, our &lt;a href="http://lmeyerov.blogspot.com/2009/02/success.html"&gt;membrane library&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;More optionally, one of our view/policy libraries&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Digging deeper..&lt;br /&gt;&lt;br /&gt;To build 1), transparent sharing, we load libraries to CPS the page and construct proxy objects  that proxy shared-object interactions between frames viz. the asynchronous postMessage primitive for passing strings between frames. Pretty quickly, it's clear there are distributed object usage concerns like deadlock. Our library helps a bit (e.g., handshaking for initialization and caching), but the push for process-per-origin/process-per-frame has created serious usability problems. The pickling support doesn't help you with the concurrency, and my tactic of using continuations hides the ugliness in the typical case, but, in reality (and, arguably, in the normal code without the library),  there are yields in the middle of event handling! Invariants might not be held when control is resumed if folks aren't careful. Perhaps &lt;a href="http://www.flapjax-lang.org/"&gt;flapjax to the rescue&lt;/a&gt;? :) A transactional approach might make sense... but then again... I suspect it'd be horrendous in this domain: transparency is the goal.&lt;br /&gt;&lt;br /&gt;Now 2) If, instead of exporting say "window" to be shared, we exported a fresh "membrane(window)" for every iframe, we can, at any time, turn on/off or even modify access to shared objects and even be selective about for which principal. Again, for free. Sort of like &lt;a href="http://xkcd.com/353/"&gt;flying with Python&lt;/a&gt;, but safer. Complete mediation ftw! Also happens to be the first true aspect system for JavaScript and introduces a new notion of secure advice.&lt;br /&gt;&lt;br /&gt;Writing behavior for 2) from scratch and per-field/object/method/etc. is cool at first, but quickly, you hit repetitive abstractions. Enter 3): a binary yes/no policy language (the 'who' is whoever has the object reference; the action is 'invoke', so all that is left is the yes/no choice on the resource). That's not quite true: introducing exceptions on DOM access might break programs, so we might want to semantically hide elements. Generalizing, we see we just want to create a &lt;a href="http://www.cis.upenn.edu/%7Ejnfoster/papers/updatable-security-views.pdf"&gt;secure bidirectional view&lt;/a&gt; , which we do for a useful case. Would be fun to create more combinators :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;... and now... benchmarking and updating the writeup :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-6842230424831625572?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/6842230424831625572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=6842230424831625572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6842230424831625572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6842230424831625572'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/08/continuation-hackery.html' title='Securing the web with continuations!'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-6689828594649761415</id><published>2009-08-19T03:58:00.000-07:00</published><updated>2009-08-19T04:03:33.609-07:00</updated><title type='text'>JavaScript Continuation Support? 2: Strands</title><content type='html'>Strands did what I expected (though still need to write my actual app using it :)):&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;function sleep(millis) {&lt;br /&gt; var future = new Future();&lt;br /&gt; setTimeout(future.fulfill, millis);&lt;br /&gt; future.result();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function go () {&lt;br /&gt; document.getElementById("txtr").innerHTML += "1" ;&lt;br /&gt; sleep(2000);&lt;br /&gt; document.getElementById("txtr").innerHTML += "2" ;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function go2 () {&lt;br /&gt; go();&lt;br /&gt; document.getElementById("txtr").innerHTML += "3" ; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;new Future(go2);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Yields "123". Requiring "new Future(go2)" isn't that wonky to work with in terms of my transparency goals: just wrap the entire program in a thunk and call it as a future.&lt;br /&gt;&lt;br /&gt;Setting up the library took a bit of editing: line 344 of strand.js had a strange eval statement that wasn't parsing so I removed it (Firefox 3.5.2). Depending on how you invoke it, you might need to change some hardcoded default paths. I couldn't get the compiler mode working, unfortunately. We'll see if it can handle big APIs :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-6689828594649761415?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/6689828594649761415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=6689828594649761415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6689828594649761415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6689828594649761415'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/08/javascript-continuation-support-2.html' title='JavaScript Continuation Support? 2: Strands'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-1031678740412193993</id><published>2009-08-19T01:37:00.000-07:00</published><updated>2009-08-19T01:53:36.629-07:00</updated><title type='text'>JavaScript Continuation Support? 1: NarrativeJS</title><content type='html'>Narrative JS enables you to define a sleep function in JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;function sleep (ms) {&lt;br /&gt; var n = new EventReceiver();&lt;br /&gt; setTimeout(n, ms);&lt;br /&gt; n.wait-&gt;(); //block until n called&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now, we can sleep between printing without manual CPSing:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;function writer() {&lt;br /&gt;  document.write("1");&lt;br /&gt;  sleep-&gt;(1000);&lt;br /&gt;  document.write("2");&lt;br /&gt;}&lt;br /&gt;writer();&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is close to what I wanted.. but not enough. Consider the following:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;  writer();&lt;br /&gt;  document.write("3");&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I expected to see "1", and then, a second later, "123". Unfortunately, I saw "132"! The magic incantation would have been:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;writer-&gt;();&lt;br /&gt;document.write("3");&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Essentially, the extension broke function encapsulation with respect to control. I can see merit to it -- rewriting becomes a local process. I want to truly and transparently write my asynchronous code in a synchronous manner (for a reason to be disclosed later): NarrativeJS helps clean up callback code while maintaining basic callback-style code structure (so you don't worry differently about a UI event handling mucking with state between callbacks), but it doesn't restore the synchronous semantics. &lt;br /&gt;&lt;br /&gt;This is great... but I want the transformation to be global: sleep(), not sleep-&gt;(). Hopefully Strands fares better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-1031678740412193993?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/1031678740412193993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=1031678740412193993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/1031678740412193993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/1031678740412193993'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/08/javascript-continuation-support-1.html' title='JavaScript Continuation Support? 1: NarrativeJS'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-2316820439774794776</id><published>2009-08-19T00:17:00.000-07:00</published><updated>2009-08-19T00:23:56.652-07:00</updated><title type='text'>JavaScript Continuation Support?</title><content type='html'>Any recommendations for a JavaScript extension to support continuations?&lt;br /&gt;&lt;br /&gt;I want to straighten some callbacks for Google Maps (and, yeah, I know Flapjax is another way to do that!). The important part is that I'll be wrapping their API: user code should look like "x = map.getZip(...)" and my wrapper will add in the continuations behind the scenes.&lt;br /&gt;&lt;br /&gt;NarrativeJS was early on continuation support, but I don't think it supports dynamic code loading (and I have to trust it wraps gmaps correctly!). More recent approaches (jwacs, strands) seem to build upon it and somehow use JS 1.7 generators for more native support and dynamic code loading, but they seem to add wrapping obligations to callsites that I'm explicitly trying to avoid.&lt;br /&gt;&lt;br /&gt;The pay off will be insanely cool :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-2316820439774794776?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/2316820439774794776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=2316820439774794776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2316820439774794776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2316820439774794776'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/08/javascript-continuation-support.html' title='JavaScript Continuation Support?'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-5706293698587165933</id><published>2009-08-18T00:20:00.000-07:00</published><updated>2009-08-18T00:46:48.251-07:00</updated><title type='text'>Back on the mainland</title><content type='html'>Crazy vacation #2: Hawaii! AKA, Leo learns how to surf.&lt;br /&gt;&lt;br /&gt;Other news..&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;MSR work is going well.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cis.upenn.edu/%7Emgree/papers/oopsla2009_flapjax.pdf"&gt;Flapjax paper&lt;/a&gt; for OOPSLA won a best paper award -- and it actually left out a lot of the good stuff. E.g., talking about how to interface FRP code with imperative APIs without destroying performance, experiences at Berkeley getting undergrads to use and implement an FRP system, and, as Mike noted, his &lt;a href="http://www.cis.upenn.edu/%7Emgree/papers/ugrad_thesis.pdf"&gt;integration of a more relational (lense) layer&lt;/a&gt; was relegated to a couple of paragraphs that probably don't make any sense for newcomers.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I think I want to take our web application paper out of the dustbin, extend it a bit, and try for ICSE in a few weeks. I love that there was an FSE position paper suggesting someone should do work like ours yet the conference rejected ours that actually did it ;-) This paper has been a frustrating process, yet I think it's as exciting as our parallel browser work.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;For this week, I want to add a cool postmessage layer to our membrane work (our main usage was for Caja, but it helps even in MashupOS style isolation approaches). Reviewers for the paper would be appreciated -- not sure if we're going for NDSS or WWW.&lt;/li&gt;&lt;li&gt;Talk @ Adobe on the parallel web browser soon, finishing font benchmarks, and cleaning up prose for the parallel CSS paper  (IPDPS? PLDI? already several pages over..)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;August/September will be nuts with paper polishing. But, luckily, back to research after that.&lt;br /&gt;&lt;br /&gt;Finally... there's talk of a half-marathon in Napa for Halloween. I did ~5 miles on somewhat hilly terrain a few times last week in Hawaii (going around diamond head), but never have tried longer. Have started working on my 5k (~26min or 8.5min miles), which seems to have led to my bumping up normal pace mileage. Might need to be more methodical about this if I want to enjoy Napa after the marathon :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-5706293698587165933?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/5706293698587165933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=5706293698587165933' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/5706293698587165933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/5706293698587165933'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/08/back-on-mainland.html' title='Back on the mainland'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-2265648065547247022</id><published>2009-07-26T12:06:00.000-07:00</published><updated>2009-07-26T12:08:41.505-07:00</updated><title type='text'>Go Lester!</title><content type='html'>There's a reason our house is called the NerdFrat: Lester's team is &lt;a href="http://www.netflixprize.com//leaderboard"&gt;on top of the Netflix leader board&lt;/a&gt; again! This time, they passed the threshold for the $1,000,000 prize. Go Lester!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-2265648065547247022?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/2265648065547247022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=2265648065547247022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2265648065547247022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2265648065547247022'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/07/go-lester.html' title='Go Lester!'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-6724685303020855719</id><published>2009-07-16T22:28:00.001-07:00</published><updated>2009-07-16T22:30:54.582-07:00</updated><title type='text'>Progress</title><content type='html'>Finished my edits for the Flapjax paper... now to keep ploughing through the backlog of other papers from the past 2 years. Ben seems to have seen through me: he's making me start the new browser security one already. Yikes. Academia is weird.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-6724685303020855719?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/6724685303020855719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=6724685303020855719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6724685303020855719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/6724685303020855719'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/07/progress.html' title='Progress'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-4398257024743277257</id><published>2009-07-15T02:06:00.000-07:00</published><updated>2009-07-15T02:11:13.305-07:00</updated><title type='text'>Summer Research</title><content type='html'>The sausage factory sure is ugly. Dealing with ~15 years of backwards-compatible interpreter source code is making my summer hacking much slower than normal =/ Starting to get the hang of it..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-4398257024743277257?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/4398257024743277257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=4398257024743277257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/4398257024743277257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/4398257024743277257'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/07/summer-research.html' title='Summer Research'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-4222206961762465519</id><published>2009-06-29T00:17:00.000-07:00</published><updated>2009-06-29T01:13:47.947-07:00</updated><title type='text'>The point of semantics</title><content type='html'>There are essentially three purposes for language semantics. Overall, as a smell test to guide language design: if you can't define a feature, it's probably bad. Second, to help other implementers of our language and programmers for the language -- unfortunately, I'd claim we generally fail on this point. Third, to help structure proofs about our language.&lt;br /&gt;&lt;br /&gt;As part of the preparation for a paper submission, I'm finishing up my formalization of a subset of CSS 2.1 (blocks, inlines, inline-blocks, and floats) from last year. My first two, direct formalization approaches failed the smell test so Ras and I created a more orthogonal kernel language. It's small, and as the CSS spec is a scattered hodge-podge of prose and visual examples riddled with ambiguities, we phrase it as a total and deterministic attribute grammar that is easy to evaluate &lt;i&gt;in parallel&lt;/i&gt;. Finally, to prove that it can be implemented efficiently (e.g., linear in the number of elements on a page, meaning no reflows), the grammar without floats leads to a syntactic proof, and the version with floats then only has to explain away some edge cases (using a single-assignment invariant, which can probably also be made syntactic). &lt;br /&gt;&lt;br /&gt;All of this should have happened 10 years ago. However, the academic language design community, as per the norm, seems to have been late to the party. Instead, we have huge, slow interpreters that don't give the same answers and a generation of abused and confused artists and designers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-4222206961762465519?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/4222206961762465519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=4222206961762465519' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/4222206961762465519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/4222206961762465519'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/point-of-semantics.html' title='The point of semantics'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7802165524426512453</id><published>2009-06-26T23:23:00.000-07:00</published><updated>2009-06-26T23:38:39.215-07:00</updated><title type='text'>An evil test case</title><content type='html'>Opera, WebKit, and Firefox are supposed to conform to CSS 2.1 standards, at least, right?&lt;br /&gt;&lt;br /&gt;A fun test:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;div style="width: 30px; height: 30px; background-color: blue; padding: 1px"&amp;gt;&lt;br /&gt;  &amp;lt;div style="display: block; background-color: red; padding: 1px"&amp;gt;&lt;br /&gt;  &amp;lt;div style="opacity: .1; float: left; width: 100px; height: 40px; background-color: green"&amp;gt;a&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div style="opacity: .2; float: left; width: 100px; height: 40px; background-color: green"&amp;gt;b&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div style="opacity: .3; float: left; width: 100px; height: 40px; background-color: green"&amp;gt;c&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div style="width: 50px; height: 10px; background-color: green"&amp;gt;d&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Do three versions of it: set the red box to be display block, inline-block, and inline. A little subtle to why this breaks is that, while these browsers might conform to the CSS specification for these (I'm still not sure about this), it exercises ambiguously defined parts of the spec. &lt;br /&gt;&lt;br /&gt;For the few folks actually implementing this stuff, it exercises ambiguity in the definition of preferred widths, preferred minimum widths, and shrink-to-fit in the presence of floats. &lt;br /&gt;&lt;br /&gt;Formalizing one fully-defined interpretation of the spec is... interesting. Thought I was done, but realized I wasn't =/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7802165524426512453?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7802165524426512453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7802165524426512453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7802165524426512453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7802165524426512453'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/evil-test-case.html' title='An evil test case'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7387174734578055916</id><published>2009-06-12T22:25:00.001-07:00</published><updated>2009-06-15T23:16:20.970-07:00</updated><title type='text'>First weekend in Seattle</title><content type='html'>Still looking for a place, but Capitol Hill successfully captured my heart:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Lunch: jamon serrano crepe @ joe bar cafe&lt;/li&gt;&lt;li&gt;Snack: picked up a copy of Pride and Prejudice and Zombies and headed off to another cafe&lt;/li&gt;&lt;li&gt;Discovered Dilletante, a chocolate cafe and chocolate martini bar -- opens at 4pm, so on my TODO list&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I also somehow came across two free passes to the Seattle International Film Festival that is ending this weekend. Viable candidates (will see one each on both remaining days; haven't found anyone else who is interested yet):&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Saturday:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;&lt;s&gt;In Your Absence&lt;/s&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Breathless &lt;i&gt;(it was great!)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;Fifty Dead Men&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;Flame &amp;amp; Citron&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;Forever Enthralled&lt;/s&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Sunday:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;&lt;s&gt;Marcello Marcello&lt;/s&gt;&lt;/li&gt;&lt;li&gt;The Shaft &lt;i&gt;(done well)&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;Involuntary&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;OSS 117: Lost in Rio (+ closing gala)&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;The Overbrook Brothers&lt;/s&gt;&lt;/li&gt;&lt;li&gt;&lt;s&gt;A Pain in the Ass&lt;/s&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;300+ movies over one month... that's an intense festival. Despite the lack of an apartment and a slowdown on my research, summer is going well (and I apparently had a subletter for my place in Berkeley without realizing it!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7387174734578055916?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7387174734578055916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7387174734578055916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7387174734578055916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7387174734578055916'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/first-weekend-in-seattle.html' title='First weekend in Seattle'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-3969943634829701819</id><published>2009-06-11T08:35:00.000-07:00</published><updated>2009-06-11T08:36:28.349-07:00</updated><title type='text'>RazorFish</title><content type='html'>I think the most significant demonstration was &lt;a href="http://vimeo.com/3635423"&gt;somewhere between 5:00 and 5:30&lt;/a&gt;. Would have loved to have hacked on this in high school :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-3969943634829701819?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/3969943634829701819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=3969943634829701819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/3969943634829701819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/3969943634829701819'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/razorfish.html' title='RazorFish'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-1868066609003812711</id><published>2009-06-07T09:10:00.000-07:00</published><updated>2009-06-07T14:35:00.690-07:00</updated><title type='text'>Security as a Disease</title><content type='html'>Lovely &lt;a href="http://www.eros-os.org/pipermail/cap-talk/2009-June/012670.html"&gt;post by Rob Meijer&lt;/a&gt; on the capability list about how to write a useful Wikipedia article (in particular, for cleaning up the &lt;a href="http://en.wikipedia.org/wiki/Ambient_authority"&gt;entry on ambient authority&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;A good way for me personally to think about the audience for infosec related subjects, is to think about myself on medical related subjects.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;In this case, the main things you would want to know would be:&lt;br /&gt;&lt;br /&gt;* How do I know if I have ambientitus?&lt;br /&gt;&lt;br /&gt;If I know I don't have ambientitus, I'm out, off to find other possible sources of my symptom. If it is likely that I have ambientitus, I would want to know:&lt;br /&gt;&lt;br /&gt;* How bad is it? Is it fatal?&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/blockquote&gt;That totally made my morning. Worth &lt;a href="http://www.eros-os.org/pipermail/cap-talk/2009-June/012670.html"&gt;reading&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-1868066609003812711?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/1868066609003812711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=1868066609003812711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/1868066609003812711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/1868066609003812711'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/security-as-disease.html' title='Security as a Disease'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-2043164180016793610</id><published>2009-06-05T20:17:00.000-07:00</published><updated>2009-06-05T22:59:42.721-07:00</updated><title type='text'>updateable secure views</title><content type='html'>Was looking at what the bidirectional programming folks at UPenn were up to, and got excited: the paper we had rejected last year about secure browser programming through views was, in another form, accepted for these guys: &lt;a href="http://www.cis.upenn.edu/%7Ejnfoster/papers/updatable-security-views.pdf"&gt;Updateable Security Views&lt;/a&gt;. Our take on it (a tentative title was "membranes, views, and browsers") was of capabilities and flexibility; this clearly has different principles (static checking, information flow, etc.). The important thing is that the idea is gaining traction!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-2043164180016793610?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/2043164180016793610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=2043164180016793610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2043164180016793610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/2043164180016793610'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/updateable-secure-views.html' title='updateable secure views'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7888507393635395941</id><published>2009-06-04T20:48:00.000-07:00</published><updated>2009-06-04T20:56:46.432-07:00</updated><title type='text'>Assembly Language of the Web</title><content type='html'>What should be the assembly language of the web? JavaScript has risen as the pragmatic choice, with the Flash VM trailing far behind. Some elements of Google think &lt;a href="http://code.google.com/p/nativeclient/"&gt;x86 is the way to go&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;With Flapjax, JS was a fine choice: we were interested in rewiring existing AJAX-style apps and could do it. Sometimes, with both Flapjax and the membrane work, it wasn't enough (weak references, reflection / interpositioning woes, no good separability). Other notions, like parallelism and DB transactions, are just missing entirely (e.g., workers were not enough when I did some Firefox extension work).&lt;br /&gt;&lt;br /&gt;Given a void, what's the way forward? CLR? DLR? JS? x86? VMs? Folks like Erik Meijer and Gilad Bracha seem comfortable with JS is the new assembly, but I'm not. At best, it would then need an overhaul that it isn't getting, and, at worst, we're slowing the web down by maybe 5-10 years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7888507393635395941?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7888507393635395941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7888507393635395941' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7888507393635395941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7888507393635395941'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/06/assembly-language-of-web.html' title='Assembly Language of the Web'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-7914697227363919654</id><published>2009-05-27T00:36:00.001-07:00</published><updated>2009-05-27T00:53:18.229-07:00</updated><title type='text'>Exciting times!</title><content type='html'>Thought I'd post a quick status update. I will not actually be here this summer!&lt;br /&gt;&lt;br /&gt;1. Browser stuff. Over the next month, I'll be bouncing around and hopefully finishing the initial version of my parallel web page layout algorithms. In the fall, I want to make sure it's all stitched together and then might switch into thinking about adaptivity or, even more general, parallel scripting.&lt;br /&gt;&lt;br /&gt;2. Webpage model extraction / exploration stuff. After the browser work reaches a good state (PPoPP?), I'll be rewriting and scaling out our blackbox analyzer and will make it directed. If collaboration works out, there'll be some interesting twists (either a new type of analysis or integrating and expanding some earlier whitebox ideas)&lt;br /&gt;&lt;br /&gt;3. Summer! Something mysterious at Microsoft Research about browser security. I'm guessing/hoping a principled clean-slate approach or some program analysis.&lt;br /&gt;&lt;br /&gt;One of many flights start tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-7914697227363919654?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/7914697227363919654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=7914697227363919654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7914697227363919654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/7914697227363919654'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/05/exciting-times.html' title='Exciting times!'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-8220882466033392549</id><published>2009-05-25T00:46:00.000-07:00</published><updated>2009-05-25T01:08:00.657-07:00</updated><title type='text'>mixing thread-aware and thread-agnostic code</title><content type='html'>For almost all of the algorithms I've been playing with for the parallel browser, Cilk-style parallelism matches. My development pattern is to do a sequential version, do a Cilk++ sketch, and then, for final tweaking, convert to TBB. (... and a lot of iteration involving hawkish monitoring of KCacheGrind statistics). However, invariably, something always goes wrong.&lt;br /&gt;&lt;br /&gt;This week, it's using task-parallelism with a multi-threaded library. Task parallelism gets you away from the notion of a thread: whenever you have a unit of work, you just spawn it off, and thus may have many tasks for only a few processors. With threads, assuming you're CPU bound, you have as many threads as processors. FreeType2 is written for threaded use: each thread gets its own Library. However, task parallel usage (I'm rendering a bunch of glyphs: turning one character into a pixel can be thought of as a task) doesn't map nicely -- if I were to create a Library per task, I'd have to create thousands of Libraries instead of, say, 8.&lt;br /&gt;&lt;br /&gt;The naive solution is to set up a resource pool: a task asks the pool for a Library when it starts, and returns it when it finishes. If there is no Library available, it gets created. If tasks are really small (e.g., individual characters, as opposed to, say, words), there'll be a lot of chatter when trying to get these Libraries (and, even if not, locks waste cycles, which is still a penalty proportional to task size).&lt;br /&gt;&lt;br /&gt;TBB, because it is a library level solution, has actual task objects (Cilk should just puts some sort of continuation mark on the stack) and therefore faces the same problem all the time. It provides conveniences for reusing task objects (think of it like a manual TCO or trampoline). When reusing a task, a good habit can be to reuse data within it. In this case, when a task completes, it passes off its Library object to the next one that gets/becomes the reified task object.&lt;br /&gt;&lt;br /&gt;Unfortunately, I don't think the code will work out that well. In reality, there's a hierarchy of resources (Library -&gt; {Font}, Font -&gt; {Glyph}). It'll work, but the impedance mismatch will cause some slowdowns.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-8220882466033392549?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/8220882466033392549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=8220882466033392549' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8220882466033392549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8220882466033392549'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/05/mixing-thread-aware-and-thread-agnostic.html' title='mixing thread-aware and thread-agnostic code'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440405560330732771.post-8403527859376831677</id><published>2009-05-20T21:42:00.000-07:00</published><updated>2009-05-20T21:53:27.988-07:00</updated><title type='text'>collaborative security</title><content type='html'>Was watching a &lt;a href="http://www.azarask.in/blog/post/order-from-chaos-future-web-directions/"&gt;video of Aza Raskin&lt;/a&gt; and, around 18:00, I got excited. Can we treat security as a people problem?&lt;br /&gt;&lt;br /&gt;I've been mulling about this both in my work in overcoming data silos and in extracting models of applications. In the former, the user might want to add extra security to an app like google calendar, say by doing special permissions on for a particular event or even encrypting data before Google sees it, and, in the model extraction, I'd like users to pool their models together to collaboratively get bigger ones -- but I don't want  stuff like bank account info to leak over. This latter problem occurs slightly differently in some of my work in mashup security: can we trust an extension to translate a webpage, but not, say, leak a bank account number?&lt;br /&gt;&lt;br /&gt;Everyone, including Aza, bashed on the UAC: we can't just pepper users with dialog boxes. We really want things like blacklists That Just Work. Aza asks, just as we might trust a smart nephew to buy us a computer, might we trust one to figure out security for us? In the absence of a smart nephew, can we learn the security policy? What do cautious people normally say to a dialog box? Is there a bit of information on a page that users generally mark as privileged?&lt;br /&gt;&lt;br /&gt;In three of my projects so far, I've found cases where I didn't think the application writer could a priori determine the appropriate action, yet doubt that the casual web user can either. What would it mean to build a browser or application extension that outsources security?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1440405560330732771-8403527859376831677?l=lmeyerov.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lmeyerov.blogspot.com/feeds/8403527859376831677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1440405560330732771&amp;postID=8403527859376831677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8403527859376831677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440405560330732771/posts/default/8403527859376831677'/><link rel='alternate' type='text/html' href='http://lmeyerov.blogspot.com/2009/05/collaborative-security.html' title='collaborative security'/><author><name>Leo Meyerovich</name><uri>http://www.blogger.com/profile/05895714526572076172</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07532060338281626566'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>