Return to Video

Clojure Made Simple

  • Not Synced
    I want to thank everybody for coming.
    The title of this talk is Clojure, Made Simple.
  • Not Synced
    On the brochure, they left out the comma.
    So it's not "Clojure made simple"
  • Not Synced
    In other words, a tutorial on Clojure,
    or an easy explanation of Clojure.
  • Not Synced
    It's not actually a comprehensive explanation of Clojure at all.
    But I'll look at a slice of what Clojure's about.
  • Not Synced
    And a way of thinking about why you might want to use it.
  • Not Synced
    So, I am the person who made Clojure.
    I currently work on a database called Datomic,
  • Not Synced
    which is kind of a functional database. It was written in Clojure, it runs on JVM architecture.
  • Not Synced
    I'm a co-founder of Cognitect, which builds Datomic
    and sponsors the development
  • Not Synced
    and stewardship of Clojure.
    But the main point I wanted to make about myself
  • Not Synced
    to this audience was because in this talk I might
    seem somewhat skeptical of Java and
  • Not Synced
    object-oriented programming, is that I've done and absolute ton of that.
  • Not Synced
    That's what I did for two decades before I said, 'if I still
    want to be a programmer, I don't want to do it
  • Not Synced
    this way anymore.'
    So I know exactly how apps are built using Java
  • Not Synced
    and C++ and C# because that's what I used to do.
  • Not Synced
    That doesn't mean that what I think about them is correct,
    but that's my experience.
  • Not Synced
    But I'm wondering about you.
    How many people program in Java here?
  • Not Synced
    How many people are happy about that?
    How many people are actively unhappy about that?
  • Not Synced
    I'm looking for alternatives.
    [laughter]
  • Not Synced
    Okay, great. How many people have tried Clojure at all?
  • Not Synced
    Ok, great. How many people have never heard of Clojure and are in the wrong room?
  • Not Synced
    [laughter]
  • Not Synced
    How many people have tried Clojure and are trying to get to use it at work, but not yet? A few.
  • Not Synced
    Maybe this talk will give you some ways of talking about Clojure's value proposition that could help you.
  • Not Synced
    How many people actively use Clojure?
    and somehow are accidentally at JavaOne?
  • Not Synced
    [laughter]
    Okay, and the rest couldn't get into Brian Goetz's talk.
  • Not Synced
    I shouldn't even mention that Brian Goetz has a talk
    right now, because we're going to have people
  • Not Synced
    filing out. Or maybe you're just tired of
    Brian Goetz talking about immutability.
  • Not Synced
    In which case, you're definitely in the wrong room.
    [laughter]
  • Not Synced
    No, I like him. Brian's a good friend. And his talks are great.
    So I appreciate your being in this one.
  • Not Synced
    So, there were very few people who had never
    heard of Clojure. So I'm not going to
  • Not Synced
    spend a lot of time on it.
    Oh, I had one more question:
  • Not Synced
    How many people have talk, "Simple Made Easy?"
    How many people have not?
  • Not Synced
    Okay, a few. So, I may spend a minute describing what
    I mean when I say 'simple.'
  • Not Synced
    Clojure is a programming language
    that runs on the JVM and JavaScript.
  • Not Synced
    And a substantial subset of Clojure runs on JavaScript.
    So it's a programming language with which
  • Not Synced
    you can target both.
    But originally it only targeted the JVM and the CLR.
  • Not Synced
    There's still a port to the CLR that's maintained,
    but it does not see wide use.
  • Not Synced
    I released it first in 2007. It's had surprising adoption.
    Especially from my perspective since then,
  • Not Synced
    given its characteristics. Because it's a lisp,
    it's functional, it's data-oriented,
  • Not Synced
    and it has a lot of things that make it seem
    not like the kind of language that would succeed.
  • Not Synced
    And this talk will really be about the data-orientation of Clojure.
  • Not Synced
    So, a lot of the best programmers, and the most productive programmers I know are writing everything in blank
  • Not Synced
    and swearing by it, and then just producing ridiculously sophisticated things in a very short time.
  • Not Synced
    And that programmer productivity matters.
    So Adrian Cockcroft was Cloud Architect at Netflix.
  • Not Synced
    Now he's at Battery Ventures.
    How many people think Java goes in the blank?
  • Not Synced
    Okay. So we know, we know this.
    There's something about Java that makes it
  • Not Synced
    not suitable for this blank. Of course, he was saying closure.
  • Not Synced
    And this talk is about "how could this me true?"
  • Not Synced
    What makes closure different and possibly a better fit for that blank?
  • Not Synced
    So the first thing I want to talk about it that I think we have this tendency in programming
  • Not Synced
    to think about ourselves just a ton. And our languages, and our tools, and our techniques
  • Not Synced
    are all me, me, me. What we're doing, whatever. We lose track of the fact that we're
  • Not Synced
    all working for somebody else who's - or ourselves - but for a business or an organization
  • Not Synced
    that's trying to accomplish something in the world and the software is completely secondary
  • Not Synced
    to that task, right? It should be measured always in terms of the cost-benefit ratio, the
  • Not Synced
    return on investment, right, how quickly can we get a product to market, and "is what
  • Not Synced
    we're doing profitable?" If we're not doing that, we're not being good
  • Not Synced
    participants in our businesses and our organizations.
  • Not Synced
    So what do the stakeholders want?
  • Not Synced
    They really want two things:
  • Not Synced
    they want something good and they want it soon.
  • Not Synced
    So, something good - we think we know how to make things good
  • Not Synced
    We have these techniques and something is good when
  • Not Synced
    they techniques are successful with them, right?
  • Not Synced
    So when our types check and our tests pass,
  • Not Synced
    we have something good. But, of course, we all
  • Not Synced
    known that with out best efforts in those things, which
  • Not Synced
    I'm not saying are bad activities by the way, but
  • Not Synced
    no matter what we do there, we end up with programs that don't work.
  • Not Synced
    We all know we have programs that type check and test pass
  • Not Synced
    and they don't work. And they don't work from the
  • Not Synced
    perspective of the stakeholder. In other words they
  • Not Synced
    don't do what the program was supposed to do, and what is was
  • Not Synced
    supposed to do was conveyed between people or through
  • Not Synced
    documentation or papers or things that are not in programming languages.
  • Not Synced
    They have to meet operational requirements, and they have to be flexible.
  • Not Synced
    Now there are some times when people just want something soon
  • Not Synced
    and they don't want something good. Now there are
  • Not Synced
    actually better languages than Clojure for that.
  • Not Synced
    Right? Just give me something fast, that I'm absolutely
  • Not Synced
    definitely going to throw away; will not grow; will
  • Not Synced
    not expand; will not take me further.
  • Not Synced
    So these first two things are means, right, they're good but they're
  • Not Synced
    only good insofar as they help ensure the latter three things.
  • Not Synced
    So if we break it down, what
    is it supposed to do?
  • Not Synced
    Again, it's a perspective thing.
  • Not Synced
    If the stakeholder thinks it's doing
    what it's supposed to do, they're fine.
  • Not Synced
    And of course, they're gonna have
    expressed concerns about software,
  • Not Synced
    what it should do, 'it should do this
    when I push this button,'
  • Not Synced
    and they're gonna have unexpressed
    presumed things, like
  • Not Synced
    'It should be secure', 'it shouldn't cause
    the computers to go on fire'
  • Not Synced
    '...because it's so slow', 'it shouldn't
    require three new data centers,'
  • Not Synced
    'it should keep running and not
    stop for an hour every day'.
  • Not Synced
    Those are sort of the unstated
    presumptions of something being good.
  • Not Synced
    But it ends up that if you build large,
    elaborate, stateful programs,
  • Not Synced
    it's extremely difficult to ascertain
    whether or not they are going to do
  • Not Synced
    what they're supposed to do.
  • Not Synced
    And in fact, if you build any one
    of those things,
  • Not Synced
    if you just build a very large program,
    or a very elaborate program,
  • Not Synced
    or a very stateful program,
    it will be as hard to figure out
  • Not Synced
    if it's going to do what it's
    supposed to do.
  • Not Synced
    So one of the things Clojure is
    oriented at is making it easier
  • Not Synced
    to understand whether or not your program
    is going to do what it's supposed to do,
  • Not Synced
    mostly by making it substantially
    smaller,
  • Not Synced
    and also by making it more functional.
  • Not Synced
    In terms of operational requirements,
    there's a boatload of things,
  • Not Synced
    there's a boatload of unstated
    requirements of software.
  • Not Synced
    You know, [?], can I deploy it
    in a normal way with all my stuff
  • Not Synced
    with the people who know how to
    run my machines and everything else.
  • Not Synced
    And that's one of the targets of Clojure.
  • Not Synced
    Clojure was meant to be hosted,
    it's just a JAR,
  • Not Synced
    it runs in the environment, it's easy
    to sneak in, right?
  • Not Synced
    It's just one more JAR,
    and then we're running.
  • Not Synced
    But it's not a small thing.
  • Not Synced
    If you wanted to adopt common lisps, say,
    Pascal,
  • Not Synced
    you would be asking your ops team and
    your deployment team
  • Not Synced
    to start manipulating something completely
    alien
  • Not Synced
    whose characteristics they
    don't understand.
  • Not Synced
    In terms of security, everything that's
    available from the JVM for security
  • Not Synced
    is available via Clojure.
  • Not Synced
    And then of performance and other
    concerns --
  • Not Synced
    A very important thing though is that
    now we can also reach the browser,
  • Not Synced
    so having people write applications where
    some part of the overall system
  • Not Synced
    touches the browser.
  • Not Synced
    So right now, you use two
    different things,
  • Not Synced
    and I almost definitely
    use two different things.
  • Not Synced
    And I think it's the strength of Clojure
    that we're delivering, the same
  • Not Synced
    value of proposition in both places,
    both on the server and in the client.
  • Not Synced
    Even if there are separate devs,
    the value of proposition is necessary,
  • Not Synced
    and almost more so in the browser
  • Not Synced
    which is one of the most complex
    places ever.
  • Not Synced
    In terms of performance, a lot of times
    a lot of times, you might look at the
  • Not Synced
    dynamic language and say 'Oh, how can
    it be whatever?',
  • Not Synced
    but Clojure is right down there
    with the fast languages.
  • Not Synced
    Admittedly, the benchmark game,
    which is a benchmark in a game,
  • Not Synced
    but it says we can reach that.
  • Not Synced
    On JavaScript, we have a very
    interesting result here.
  • Not Synced
    So Om is a Clojure script library,
    so Clojure script is Clojure on JavaScript
Title:
Clojure Made Simple
Description:

more » « less
Video Language:
English
Team:
Captions Requested
Duration:
01:00:44

English subtitles

Incomplete

Revisions Compare revisions