jducoeur: (Default)

Okay -- it isn't by any means perfect, but so far it's the best solution I've come up with.

The only thing I miss, in moving from LiveJournal to Dreamwidth, is the native support for cross-posting from here to FB. So for the past couple of months I've been exploring alternatives. The one I've been using was dlvr.it, as described here -- that's adequate, and makes it fairly easy to post links on FB that point to your posts here.

But the thing is, I don't love that, because not many people actually click through those links. And while I may not love FB, I do have a lot more friends there than on Dreamwidth, so I'd like to be able to actually cross-post, not just link.

For a while, I had thought that the answer was Zapier, and I put in a lot of work getting a true cross-post solution working there. But Zapier has one critical flaw: the approach I'm using for cross-posting requires a feature that only exists in their paid version, and Zapier is insanely expensive. (Like, $20/month.) It's just not worth that kind of money. (Yes, I talked to them about it; they brushed me off and refused to even contemplate a more reasonably-priced tier.) So I gave up and went back to dlvr.it.

But -- as of today IFTTT, the grand old man of the "plug-and-play applications" space, officially opened up their Applet program to all comers: you can build your own tools in it, and yes -- like Zapier, it allows you to insert some JavaScript in the middle.

(Why JavaScript? Because your DW feed is in HTML, and if you just post it directly the results look kind of crappy. I want something better.)

So I've spent a little time in the workday cracks today taking the solution I'd built for Zapier and adjusting it for IFTTT. The experience with IFTTT is a bit different from that of Zapier -- a bit less powerful (in particular, their RSS reader doesn't pick up your DW tags, which Zapier did), but with a much better built-in IDE.

I think that's now working adequately -- it's not The One True Solution, but it mostly works. I've published it as a public Applet on IFTTT; feel free to pick it up and use it. You give it the URL of your Dreamwidth RSS feed, and you need to connect Facebook to IFTTT; once you have that, it should, in theory, quietly check your RSS feed every 15 minutes or so, and cross-post new entries to your Facebook wall. It takes each DW post, translates it into something that looks okay on Facebook (basically, it back-translates the HTML to something vaguely like Markdown), and includes the link to the original DW post at the bottom.

Please pass word on to anybody who might care, and tell me about problems. (Hopefully, I can fix any problems -- once I published, IFTTT gave me dire warnings that I could no longer alter my triggers or actions; hopefully I can still edit the critical filter in the middle.)

jducoeur: (Default)

Making progress here, but the last test still wasn't quite right.

It turns out that the combination of IFTTT and Facebook is legendarily persickety when it comes to newlines -- you have to use a magic incantation involving:

  • br tags
  • nbsp tags

All this, despite Facebook not actually accepting HTML. Sigh, but I think it can be overcome.

jducoeur: (Default)

The Science Fictional Singularity is when Artificial Intelligence begins to create new ideas, and Science begins to advance faster than conventional biological humans can conceive.

The Political Singularity is when a Great Orange Artificial (lack of) Intelligence begins to create new scandals, faster than conventional media can conceive.

This commentary brought to you by both Amy Siskind and Jon Oliver remarking on a week incomprehensibly chock-full of scandals, any one of which would have undone a conventional President...

jducoeur: (Default)

Just got the announcement of a new TOS from Twitter today. Nothing dramatically surprising, although I'm mildly annoyed that they are apparently dropping support for Do Not Track.

On the bright side, they are exposing their profile of your "interests", based on whatever data mining and tracking they are doing, including your "interests from partners", "based on your profile and activity".

I'm looking at that now, and it's one of those comforting moments of realizing that at least some of these companies haven't yet gotten so good at the psych profiling. It's almost comically inaccurate, seemingly far worse than random chance -- not only are most of them uninteresting, many of them are active dislikes. (I mean, seriously: can you see me driving a RAM 1500?) Even some of the ones that seem like they should be easy to discern from conventional data are wrong -- I think "Proximity: Giant Eagle" being checked means that they literally have no idea where I am. (Which is a bit weird, because that is not hard to figure out.)

Nor are the "Interests from Twitter" much better. Okay, yes, "Open Source" is accurate, but how they get "NBA Basketball" as an interest of mine is a pure mystery.

There's a sneaking part of me that suspects that this page is not at all what it claims to be; that it's actually starting from "this is every category we can possibly imagine", and it's trying to get me to trim it down to the non-ridiculous stuff. I think I'll take a pass on that, and let myself continue to be apparently confusing to them...

Staffing

May. 19th, 2017 08:12 am
jducoeur: (Default)

I am impressed by Rod Rosenstein, who is clearly managing to just do his freaking job, as honestly and transparently as possible, while the rest of Washington is collapsing in chaos. He has gone from Unknown to Important in a bit over a week.

And there's an amusing lesson here. While we have a long ways to go before this saga plays out, history may well decide that Trump's biggest mistake was his failure to deal with staffing. Everyone remarks on it -- the way that so few of the important seats in the federal government have been filled yet. It isn't at all clear whether this is due to a knee-jerk Bannon-esque dislike of the bureaucracy, or (more likely) simple incompetence, but the result is that Trump still has relatively few allies in the administration he notionally heads. As many have remarked, he could have fired Comey on Day 1 and only gotten a little grumbling -- this crisis is specifically because Trump waited to fire him only after it become publicly clear that Comey wasn't going to be a loyal yes-man.

That may (God willing) prove a fatal mistake. Because the thing is, if you want to set yourself up as a strongman dictator (and I no longer think it's controversial to say Trump does want that, given his outspoken admiration for people like Putin, Erdogan and Duterte), you need to fill the government with your own placemen. Fascism depends on everyone at the center following your orders. It's not easy to make that happen in the US, but Trump has barely even tried. And hopefully he's already spent so much political capital that it's just going to get harder from here.

We'll see where it goes. But it may well turn out that, in a year where it is hard to respect any of the elected politicians in Washington, it might yet be the civil servants who save the day...

jducoeur: (Default)

Saying that a show at the ART is a standout is no small thing. Last year's standout was The Great Comet, which is up for a big pile of Tonys this year, now that it's on Broadway. The previous year was Waitress, which likely would have won more Tonys if it weren't for, y'know, Hamilton.

So keep that in mind when I say that this year's standout for me is Arrabal, an innovative, affecting ballet of tango.

I had few expectations going into the show -- while Kate tells me that the article some months ago mentioned that there was little spoken word, I apparently had forgotten that, and certainly hadn't ever realized it was a true ballet. There is only a little bit of speech in it, and what little there is isn't English. (There is some video-over, providing translations of the important bits, and a couple of video clips in English that help provide historical context. But basically, it's a ballet.)

While there is a definite story here, a good deal of it is pretty impressionistic -- this is ballet in the American in Paris sense. It's more narrative than pure classical ballet, but you still need to be prepared to interpret the dance. That said, it proves beyond a doubt that tango is every bit as valid a narrative form as either classical or contemporary ballet -- it isn't hard to understand the story being told.

That story is set on a backdrop of the Argentine dictatorship. The first act is set in 1976, as young Rodolfo leaves his baby daughter with his mother so he can go out for a night of dancing and protest, and is then captured by the forces of the rising police state. Most of the rest takes place in 1994, as his now 18-year-old daughter Arrabal goes to the big city and learns about her father. It's very much a coming-of-age story for her, but also a tale of memory, loss and grief for Rodolfo's mother and friends.

And the dancing -- the dancing is breath-taking. This is ballet for the So You Think You Can Dance age: powerful, vibrant, and enormously creative dance. The performances are delightful, and choreography and direction brilliant.

(I was particularly struck by the way that Arrabal's movement idiom is subtly different from everyone else's: more legato and flowing, almost weightlessly emphasizing the youth of our ingenue protagonist. It was especially striking that, as soon as the show ended and the stage turned into an open dance party, she instantly gained about five years as she started dancing like herself rather than her character. That is great dance direction and performance.)

It is mostly tango, but freely mixes in other forms: Arrabal herself starts off with a little bit of classical ballet (which looks terribly innocent in the tango-centric environment), and there's a lot of contemporary and jazz flavor in here to help the storytelling. And one of the major characters, El Duende, has his own unique style that is a sort of fun, fluid hip-hoppy thing.

I'll caveat here that Kate wasn't as enthralled as I: she thought the music was too loud (it is pretty loud, although not rock-concert loud), and she found the constant tango rhythm repetitive. I didn't especially notice either point -- this may reflect the fact that she is more into musical theater, and I'm more into rock. The music is roughly latin rock: a mix of violin, accordion and electric guitar that comes out sounding like nothing quite so much in my experience as Cirque du Soleil.

Kate is still of the opinion that Fingersmith was this year's best show, and I agree that it was brilliant and fun (and would likely translate better to Broadway, so keep an eye open). But Arrabal is brilliant and well worth seeing, especially if you like dance. It runs through June 18th -- check it out...

jducoeur: (querki)
There's been a lot of discussion recently about the asymmetry implicit in "free speech" online. Many services naively subscribe to the principle that More Speech is Better, and that the way to defend yourself against harassment is through more speech. In practice, that's largely bullshit. (See this article from Yonaton Zunger for one good exploration of the topic; it's what got me thinking about the problem more concretely today, on top of [personal profile] siderea's related article a little while ago.)

At the moment, none of this is really a concern for Querki: I initially started with the hyper-safe approach that *only* members of a Space can comment in that Space. This is precisely the opposite of most websites: it means that you at least aren't going to get harassment from outside the community, and you can always boot somebody out of the Space if they turn into a problem.

But in the medium term, that's too limiting: many Querki Spaces are public, and their use cases are going to *want* to allow public commentary. (Part of the inspiration here is that Querki is about to become a viable blogging platform, and public comments are, I believe, necessary for many blogging use cases.) The plan has always been to put moderation front-and-center in such cases, but as I get closer to actually implementing this (it's only a couple of steps down the Roadmap now), I'm starting to chew on this asymmetry, and its implications.

Oh, and keep in mind: while I'm framing everything below in terms of comments, the same policies are likely going to apply to *contributing* to this Space. That is, we're eventually going to provide ways for non-members to suggest new Things in this Space. I *think* the considerations are the same as for comments, since "Things" tend to be text-heavy, so the potential for abuse is the same.

Here are some thoughts and plans, but I welcome your ideas and comments -- this is *not* easy stuff, and I want to get it right, at least in the long run. The following is a combination of long-planned features and thinking out loud about how to make them better.

(NB: Yes, I'm probably overthinking this, and not all of the below will be implemented immediately. But I think it's best to take the problem seriously from the outset.)
Assumptions and Theories )Designs and Features )
What Else? Ideas? Comments? This is a challenging and important topic, and one I care particularly passionately about doing well. I'm open to any brainstorming folks might be interested in here...
jducoeur: (Default)

The Guardian is continuing to impress the heck out of me with their investigative journalism. Here is their followup story, this one considerably shorter and more comprehensible. It continues to point to evidence that Brexit happened because of a literal conspiracy -- and that it may well have been a deliberate dry run for the election of Trump.

I'm immensely curious about how this plays out. I hope that this starts a real drumbeat for proper investigations into the Brexit vote, and the apparently illegal financing behind it. And the really interesting question is, if it turns out that the Leave campaign did break the law, allowing an American billionaire to illegally spend a lot of money to subvert British democracy -- what then? Everyone's been assuming that the referendum happened, and that the results must be adhered to, but if illegal means were used, that reasoning becomes a tad shaky.


As an entertaining counterpoint to all that, I'll add this delicious article-cum-memoir about Brexit from Dominic Cummings, one of the leaders of the Leave campaign. (Thanks to [personal profile] mindways for pointing me at it.) It's immensely long (I'm only halfway through), but a fun read if you enjoy politics. It's a (presumably enormously biased) account of what things were like inside the Leave campaign, redolent of the richest sour grapes -- this is the winner of the campaign describing in gory detail just what a fuckup the whole thing was, and how close they came to losing, not least because of just what a jackass Nigel Farage is.

But beyond that, it's a very readable treatise on practical politics, with a general thesis that anybody who says that anything in politics is certain is either lying or deluded. He repeatedly talks about "branching histories", to show just how essential both luck and a few key mistakes by David Cameron were to the victory of the Leave campaign.

Well worth reading, even if you just take it as a sort of primer in how on-the-ground campaigning really works. Regardless of the Guardian's reportage, and whether Cummings was in on this apparent conspiracy, he gives a good sense of what it takes to win in politics. It's not pretty, but it's kind of fascinating, and rather educational...

jducoeur: (Default)

Signal boost: the Republicans are once again trying to destroy Net Neutrality, with the new FCC Chair making the usual disingenuous BS arguments about it. And this time, they've made it ridiculously difficult to actually comment on it.

Fortunately, Jon Oliver and Last Week Tonight have jumped in to make life easier. If you go to GoFCCYourself.com, it cuts through most of the hoops -- just look for the "+ Express" link on the right-hand side, click on that, and you can enter your commentary.

This is important stuff: the big ISPs have shown themselves to be pretty untrustworthy, and willing to take undue advantage of their position. We need to stand up for Net Neutrality in force, immediately, if we're to have any hope of keeping it...

jducoeur: (Default)

Thanks to [personal profile] cvirtue for pointing me at this impressive piece of reportage from The Guardian, published a few days ago.

I won't kid you: this is long, dense, and hard to quite absorb. But it's one of the most important articles I've seen this year. In it, they dug into the details of why Britain voted to leave the EU, when all the polling had indicated a narrow win for the Remain side.

Slightly to my surprise, this story is not primarily about Russia, although there are hints of their involvement. Rather, this is the story of a couple of rather shadowy military-tied companies named Cambridge Analytica and Aggregate IQ, and an American billionaire named Robert Mercer, doing what appear to be some pragmatic experiments in just how far you can sway a populace simply by crunching the data and manipulating them directly. And yes, Steve Bannon is right at the heart of the whole thing, as the sometime VP of Cambridge Analytica.

This is a story about Brexit rather than Trump, but they don't shy away from drawing the connections there: indeed, this is one of the first times I've seen direct connections between those stories, rather than claims that they reflected some sort of zeitgeist.

I can't say I've digested all of it yet, but the general takeaway seems to be that this is an example of weaponized propaganda, being driven by the American corporate world as much as anywhere. And the evidence of last year is that, yes, it can tilt the playing field at least a few critical percent.

Of course, last week also had the comforting news of the French election, where these tactics (deployed late in the game) seem to have entirely failed. That suggests that this stuff can't entirely swing the game -- Le Pen was losing badly, and she still lost badly. But in a close election (which describes damned near everything at the national level in the US nowadays), it can be solidly effective.

Bookmark it, read it, and stick it in the back of your mind. We can't let it distract too much from the Russiagate scandal, but this is a strong indication that the Kremlin are by no means the only bad guys here. If we're going to be effective in fixing things, we need to understand the full scope of the battlefield...

jducoeur: (Default)

A quick question for the web developers out there. I'm currently doing some consulting work (dayjob to bring in a proper income while Querki keep improving in the background), building a new website from scratch. As always, it needs to be modern and responsive. I'm used to using Bootstrap for this -- it's what I used for Querki -- but it's been a few years since I last took a serious look at the landscape.

So: any opinions between the available frameworks? I know Bootstrap pretty well, but I also hear about Foundation fairly often, and I'm finding another one called Skeleton that I know nothing about. Anybody have any pros/cons to express between these? Do you know any others that are particularly excellent? I'm looking less for just-the-facts (there are comparisons available online), and more for war stories, subjective opinions, and stuff that doesn't show up in the bullet lists...

jducoeur: (Default)

Just came across this sobering article from a few weeks ago. Summary: LiveJournal has been sued, possibly successfully, over their ONTD group -- apparently somebody posted copyright-infringing material there, and because ONTD is vaguely official and (volunteer-)moderated, there's a strong suggestion that the traditional "safe harbor" provisions may not apply.

Suffice it to say, this is not good news. The precise details of how this falls out will determine how much (if at all) it damages the assumptions of zillions of websites, but a broad interpretation of it could be hugely damaging. One to keep an eye on...

ETA: Okay, it's worth reading the actual appellate decision, at least the summary at the top. (Much of this decision is nicely readable.) This clarifies several things:

  • First and most important, this wasn't a decision against LJ per se. Rather, it was the reversal of a summary judgement in favor of LJ. That is, the district court had simply dismissed the case on the grounds that LJ was clearly protected by the DMCA. The appellate court is essentially saying, "No, this one is kind of complicated -- let it go to trial".

  • Second, the key reason why this is muddy is that the moderation team of ONTD is apparently led by an LJ employee. ("Although users submitted Mavrix’s photographs to LiveJournal, LiveJournal posted the photographs after a team of volunteer moderators led by a LiveJournal employee reviewed and approved them.") So it's not just "the users" involved: LJ has a quasi-official presence in the group, so they might be legally liable. That's not actually surprising -- I could have told LJ that that's a legally dumb policy.

    (This is why Querki is designed to be strictly self-policing by the users, and why it's intentionally difficult (at the technical level) for company employees to mess with user Spaces: the line between "official" and "user-directed" needs to be crisp and sharp in order to enjoy solid DMCA protections.)

  • Third, ONTD isn't a normal LJ group. "In 2010, LiveJournal sought to exercise more control over ONTD so that it could generate advertising revenue from the popular community. LiveJournal hired a then active moderator, Brendan Delzer, to serve as the community’s full time “primary leader.” By hiring Delzer, LiveJournal intended to “take over” ONTD, grow the site, and run ads on it." So claiming that this group is run by "users", and therefore is protected by DMCA, is a bit disingenuous.

Overall, I'm somewhat less worried about it, having skimmed the decision. My read of this is that LJ got way too casual about DMCA, and did something strikingly stupid; Mavrix' claim that ONTD is not sufficiently independent to enjoy DMCA protection seems at least somewhat plausible on its face. The court is simply saying that, in this case, it is not obvious that LJ is covered by the DMCA.

While I do think Mavrix are kinda being assholes about it, by the spirit of the DMCA they may well have reasonable grounds for the suit. I'm not sure they're right, and I don't know how this will play out in court, but IMO the appeals court was probably correct in rejecting the summary judgement -- this one is messy, and does need to be properly litigated...

jducoeur: (Default)

Today's the 25th anniversary of my Laureling. That's kind of scary, a tad melancholy, and occasions a few random thoughts and a lot of feelings.

(Some very random, like the fact that so much of my life is dominated by the SCA and Scala. Fate has doomed me to ambiguous tag prompts.)

The most obvious thought is, of course, "Holy crap". I haven't quite been a Laurel for half my life, but it's getting close.

On the melacholy side, I have to say that I think the SCA has continued to steer somewhat off-course, albeit mostly in predictable directions. We've become much more regularized and consistent, at the cost of a lot of the distinctiveness that individual branches used to have. That's cut a bit of the wonder of the club for me: I used to enjoy travelling more, not least because the Society was so very different from place to place. It made things more interesting.

The award system continues its gradual slide into being an unmanageable and counter-productive mess, with ever-more awards proliferating and the Peerage getting pushed ever-further out of reach. I don't recall the exact statistics, but IIRC it now takes something like twice as long to get a Peerage as it used to. I find that both terribly sad, and deeply stupid.

It's sobering to realize that I probably wouldn't get a Laurel today. And I don't mean "me then wouldn't get a Laurel by today's standards" -- I mean that, the way the Laurelate talks, I'm a little skeptical that I would get voted in as I am now, even with 2.5 decades more experience.

More optimistically, the SCA has improved in some respects -- not least, we've largely found our feet as a "family" organization, which was emphatically not the case around here when I was starting out. I mourn the loss of nearly all of our college students (locally, at least), but at least it's no longer a Herculean challenge to have kids and stay active in the SCA. That gives me hope that the club still has a future.

Mostly, though, I am left with a bad case of, "what next?". I've stayed active in the Society for my entire adult life largely through finding new worlds to conquer every 5-10 years; for the first time, I'm having serious difficulty finding something that really grabs my attention and passion, and fires me up anew. Not sure why -- it's entirely possible that all those brain cells are so focused on Querki that they aren't available for other things -- but we'll see where I go from here...

Stance

Apr. 30th, 2017 10:57 am
jducoeur: (Default)

Signal boost from Jen Hofmann's Action Checklist (another of those useful weekly reminder lists to help stay aware of useful little things you can do) -- there's an interesting little app out now called Stance, which is specifically there to make it a little easier to call your congressional rep. It's nothing more than a smart message-forwarder, but that's still useful: you use the app to record a message for your rep, and Stance will, once a day, transfer those messages to the rep's voicemail system.

Pros:

  • If you're shy (as many of us are), you don't risk talking directly to a person on the phone.
  • No risk of busy signals, and Stance itself does retrying if the voicemail box is full.
  • You don't have to remember phone numbers.

Cons:

  • No chance of talking directly to a person, if you do like that. (I have mixed feelings, personally.)
  • Your phone calls are explicitly public: not personally identified as you, but they do put a selection of calls on their website.
  • The app is essentially advertising the phone-mail services of a little startup. (But seems to be a tasteful way for them to do so.)

Overall, not a world-shaker, but seems like a potentially useful tool, especially for the phone-shy. As Jen points out, calling your reps is one of the more useful things you can do, even if it is just an occasional "keep up the good fight, rah-rah-rah" so they don't feel drowned under all the negative calls...

jducoeur: (Default)

Another day, another use case: I finally got around to taking Kate's and my old "Restaurants we should try" spreadsheet and turning it into a nice rich Querki Space. I've only just started to flesh out the list of places we have already been, and give them ratings, but if you're interested (or simply want a look at a typical Querki use case), you can find it here on Querki. Being Querki, it's all cross-referenced by restaurant type, neighborhood, and so on. (And I've put the Location in for most of them, so there are automatic Google Map links to show where they are.)

And if anybody would like a site like this themselves, just speak up: I haven't gotten around to turning it into an App yet, but it will only take me a minute or two to do so. Once I do so, it will be quick and easy for you to sign up and set up your own Restaurants Space. (I suspect that this is only interesting to the foodies, but we certainly have friends who like this sort of thing...)

jducoeur: (Default)

For those who care about the ongoing horse races: as largely expected, Jon Ossoff didn't win the special election in the Georgia 6th congressional district outright. But he did come first by a pretty wide margin in a crowded field, and they're heading to a runoff. This is turning crazy-expensive, as you'd expect, and the odds I've seen have it pretty close.

As a result, they're on a big fundraising push, and today they're doing a triple match. So if you're inclined to toss a few bucks into these races (which, remember, this is Georgia -- a Democratic win would be quite embarrassing for the Republicans), this is probably a good day to do so.

(Usual caveats apply -- be prepared for followup emails, and use a burner email address if you have one convenient. I wish I didn't have to make this caveat, but both parties are currently convinced that More Emails Are Better...)

jducoeur: (Default)

Fascinating article in a recent issue of the Economist: Sacred Spaces explores the implications of how parking works in cities around the world, and calls into question some common assumptions.

It's not just interesting, I find it awfully timely and relevant for life in Somerville these days. I've wound up getting involved with the community over the past year or so, due to the massive building boom happening on our block. The warehouse across the street is being torn down and replaced by a 25-unit condo complex, and that's only one of three projects happening on the block right now. And the universal topic of argument -- the subject of probably half of all the discussion in the community meetings -- is parking.

It's a nasty bit of zero-sum. The builders want as much footprint as possible for their buildings, since that is where the money is; the result is that every one of them is begging for exemptions from the off-street parking requirements, which eat into the land where they could put More Building. And the city is encouraging this: their claim is that, if a unit only has one deeded parking space, it will only be bought by people with one car. After all, once the Green Line extension is completed (inshallah), we'll be within a few blocks of two subway stops, so people won't need cars.

Problem is, there is a lot of magical thinking in this, mostly because it omits the tragedy of the commons that is the on-street parking. This is already nightmarish (our street is narrow and chaotic), and parking permits are effectively free here. I think they're $40/year -- not enough to make anybody really consider whether they need a second car. So if the buyers of that new $600k condo have two cars, and it only comes with one parking space, it's easy to just decide to park on-street. And so the chaos grows.

Anyway -- the article is well worth a read. Among other things, it makes the point that this is a problem that can be solved with economics; the problem is that doing that without getting murdered politically is nearly impossible...

jducoeur: (Default)

Fact: I slept poorly last night. (No particular reason, just restless.) Hence, I am very tired today.

Fact: I am being considerably more productive today than usual.

Theory: this seems to be mostly because I just plain don't have the energy to overthink and doubt my previous decisions, so I'm just building the system as designed.

There is a lesson in here, somewhere...

jducoeur: (Default)

A few days ago, I posted about Rust, having just watched a wonderful talk about it at Scaladays. That presentation is now online. It's highly recommended for all programmers who are interested in language design -- it's a lucid talk about the language, focused on the rationale behind it and how they achieved those goals. Exciting stuff: Rust is probably the first language since Scala that I've found really compelling, the C++ replacement to Scala's Java.

And from the same series of videos comes this talk from the creator of Jepsen -- again, nothing to do with Scala, but a great technical talk. I tweeted that this one was "Funny, educational and terrifying". (The laughter isn't much picked up by the microphone, but was pretty loud at times.) Jepsen is a toolkit for testing distributed databases, and this talk (illustrated entirely with hand-drawn slides) goes into fairly deep detail about why it's so hard to build them. The upshot is that nearly every new-fangled DB turns out to be seriously broken in at least one or two respects. A great talk for anybody who is interested in distributed systems architecture. (And anybody who is using any of these databases.)

(And yes, there was one keynote that was actually about Scala -- Martin Odersky talking about "What to Leave Implicit". Also a good talk, but mainly interesting if you already know Scala; the other two don't require as much background...)

Rust

Apr. 20th, 2017 11:30 am
jducoeur: (Default)

This week's adventure in conferencing is my first trip to ScalaDays, which is in Chicago this year. This morning's keynote was a bit surprising, because it was about the language Rust, rather than Scala. But it was a great talk, and very educational -- I've known vaguely of Rust for a while, but really hadn't known the details. Here's a summary of what I learned, but I recommend checking out the video of the talk once it comes out.

I've been a serious evangelist for Scala for a number of years -- my usual take is that it is currently the best language for general, high-level application programming. You can argue the point, but I'm confident about this one: it's a lovely mix of pragmatism, power and principle, and makes programming more efficient and safe.

But -- not all programming is high-level. Some code needs to be closer to the bare metal, for efficiency, access to the hardware, or other reasons -- it needs to be specifically low level. Scala is only now beginning to be able to do this (with the relatively new Scala-Native compiler), and it's yet to be proven in that environment. Rust, on the other hand, is designed for that world from the get-go.

Or to put it another way, Rust is to C++ as Scala is to Java: a much newer, rethought, more powerful and safe language for playing in that domain.

The core problem with low-level systems programming is that it is scary -- it is very easy to commit any of several major mistakes, each of which leads to crashes or, worse, security leaks. This is true even if you're good at this stuff: programs are complex, and the interactions between the parts are where the bugs tend to arise. Rust is all about reducing that fear, and letting you code with confidence.

The beauty of Rust is that they've taken a very principled look at where those problems tend to come from, and found a few key areas to improve. In particular, the observation is that many bugs arise from uncontrolled access to memory. Plain and simply, pointers are a problem.

So Rust's biggest innovation is removing that word "uncontrolled". It introduces a compiler-time notion of "ownership", and distinct notions of mutable references (which give a code block the right to alter that memory block) vs "shared" references (which allow you to inspect the memory). While they don't use the same terminology, the concepts appear to be quite similar to write vs read locks in database programming.

They've built a lot of infrastructure on top of that, with some really remarkable results. Perhaps most impressive, they've built a concurrency framework that manages to be both flexible and safe. Most of the standard patterns for concurrent programming exist, but they're all adjusted to this ownership-centric world, such that many of the common race-condition problems just can't arise unless you explicitly say "yes, this code is cheating -- I know what I'm doing".

It doesn't solve every problem -- I checked after the talk, and confirmed that it's totally easy to cause deadlocks (unsurprising, given how much this looks like database programming) -- but it's still beautiful and powerful. In the area of concurrent programming, Rust is arguably better than most high-level languages.

Overall, I'm impressed, and I'm pleased to see Rust being presented at a Scala conference -- it looks to me like the languages are nicely complementary. Rust isn't really in competition with Scala: it is optimized for different kinds of problems. But it is principled, and well-designed, in a way that is very reminiscent of Scala. The combination of Scala for application-level programming with Rust for systems and components provides a solid replacement for the older Java/C++ stack.

Not that I've done much systems programming in the past 15 years, so I don't know if I'm likely to use Rust any time soon. But it's good to see the rise of a language that doesn't suck for that domain. God knows, my life 20 years ago would have been much happier with it...

Profile

jducoeur: (Default)
jducoeur

May 2017

S M T W T F S
 1 23456
78 910 111213
14 151617 18 1920
21 22 23 24252627
28293031   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags