<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Aaron Lebo</title>
 <link href="http://lebo.io/atom.xml" rel="self"/>
 <link href="http://lebo.io/"/>
 <updated>2024-01-05T07:08:13+00:00</updated>
 <id>http://lebo.io/</id>
 <author>
   <name>Aaron Lebo</name>
   <email>aaron.matthew.lebo@gmail.com</email>
 </author>

 
 <entry>
   <title>comprop</title>
   <link href="http://lebo.io/2023/06/01/comprop.html"/>
   <updated>2023-06-01T00:00:00+00:00</updated>
   <id>http://lebo.io/2023/06/01/comprop</id>
   <content type="html">&lt;p&gt;It is 2023 and I have graduated from college.&lt;/p&gt;

&lt;p&gt;My dissertation is &lt;a href=&quot;https://propaganda.computer&quot;&gt;comprop: Computational Propaganda on reddit.com (2013-2022)&lt;/a&gt;. Check it out, feedback welcome.&lt;/p&gt;

&lt;p&gt;I am looking for a job, the kind that pays dollars. Please email me if you know of any.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>A WebGL renderer in 300 lines of Javascript</title>
   <link href="http://lebo.io/2018/04/03/a-webgl-renderer.html"/>
   <updated>2018-04-03T00:00:00+00:00</updated>
   <id>http://lebo.io/2018/04/03/a-webgl-renderer</id>
   <content type="html">&lt;p&gt;&lt;em&gt;Ali: There are guns at Aqaba.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lawrence: They face the sea, Sherif Ali, and cannot be turned round. From the landward side, there are no guns at Aqaba.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ali: With good reason. It cannot be approached from the landward side.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lawrence: Certainly the Turks don’t dream of it. Aqaba is over there. It’s only a matter of going.&lt;/em&gt; – Lawrence of Arabia (1962)&lt;/p&gt;

&lt;p&gt;Hey there.&lt;/p&gt;

&lt;p&gt;It’s been a long time since I’ve written anything on this blog. I’ve got to live with my opinionated self, which gets old, so I’d just as soon not subject others to that. Too many people in this age of social media feel like their every action and half-baked hot take are worth broadcasting, like their thoughts are god’s gift to humanity. I’m under no such delusion, and you know what people say about assumptions and opinions, anyway…&lt;/p&gt;

&lt;p&gt;I tell you this because I’ve been working hard over the last few years on several fronts, and have what I believe is some some hard won experience and knowledge that I’d like to share, as well as a decent amount of code that I think is pretty neat. Hopefully it will be useful to you. Sometimes when I get to writing I have difficulty stopping, so I apologize if this is overly long. Thanks for reading.&lt;/p&gt;

&lt;h1 id=&quot;comanche&quot;&gt;comanche&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://comanche3d.com/&quot;&gt;comanche&lt;/a&gt; (&lt;a href=&quot;https://github.com/aaron-lebo/comanche&quot;&gt;source&lt;/a&gt;) is a WebGL renderer (eventually, a proper game engine) written in Javascript that weighs in at just over 300 lines of code. It is named after those lords of the plains, the Comanche, who dominated an area centered on the Texas Panhandle from the arrival of Spanish horses until into the 1870s. As detailed by S.C. Gwynne in &lt;em&gt;&lt;a href=&quot;https://www.amazon.com/dp/B003KN3MDG/ref=dp-kindle-redirect?_encoding=UTF8&amp;amp;btkr=1&quot;&gt;Empire of the Summer Moon&lt;/a&gt;&lt;/em&gt;, the Comanche were the best light calvary in the world for a time and had an &lt;a href=&quot;https://en.wikipedia.org/wiki/Comancheria&quot;&gt;uncontested empire&lt;/a&gt; as far north as the Arkansas River. They were a skilled and ruthless warrior society; men and women alike fierce and hard. When Texas came into the Union in 1845, almost the entirety of territory it and the US claimed to the north and west of Austin was not actually under American control. Amazingly, less than 150 years later, not only is that empire gone but Comanche culture, like many native cultures the world over, is all but dead. This homage can’t undo history, but being from a town called Yellow on those plains, it’s my small nod to them.&lt;/p&gt;

&lt;p&gt;The end goal for comanche is something along the lines of a Minecraft voxel engine. That’s underselling it, as I’m not looking to build a Minecraft clone, but some of the techniques like procedural generation and infinite worlds really intrigue me. A voxel engine is also about the simplest 3d engine you can build, so it’s a decent starting point. Unfortunately, to get from no knowledge of 3d programming (where I started several years ago) to something like Minecraft, there’s a sizeable gap and plenty of things to learn and implement. My first step was to render a triangle (the basis for 3d programming), then a cube, then many cubes. Rendering many cubes is neat, but then I wanted to render interesting landcapes. I found a shortcut in the 25-year old game Comanche. Convenient, yeah? My little brother and I played this as well as lots of other state of the art games of the time - Subwar 2050, Wing Commander, Descent, Tie Fighter, Heretic, Dark Forces 2, Duke Nukem 3D. My dad would buy these games but we’d end up playing them. Presumably, if my mom knew about the strippers and pigs with shotguns in Duke 3D, there’s no way this would have happened.&lt;/p&gt;

&lt;p&gt;Games of the day were doing interesting things to render 3d or pseudo-3d on very limited hardware (incredibly limited compared to today - it still amazes me that they managed to pull this off). Comanche used a unique &lt;a href=&quot;https://github.com/s-macke/VoxelSpace&quot;&gt;raycasting system&lt;/a&gt; to combine two separate maps - one height, the other color, to render large outdoor scenes. This can best be represented as separate images, with each byte in a 1 MB image representing height or color in a 1024 by 1024 unit map (512 by 512 or any other size are of course possible). These pixels can also be thought of as voxels, so it is a rather natural extension to render these maps in 3d. After much work, I figured out how to do this, so that’s where we are: comanche 0.1 can render 29 maps reverse engineered by Sebastian Macke from the game Comanche, and can easily render any map composed of a set height/color images. I also included my own map, pampa, after the aptly-named town. It’s meant to depict a snowy day. I suppose to be more realistic, there should be a tree or two.&lt;/p&gt;

&lt;p&gt;But I’m getting ahead of myself. My motivation for doing this came from running across Michael Fogelman’s &lt;a href=&quot;https://github.com/fogleman/Craft&quot;&gt;Craft&lt;/a&gt;, a self-described Minecraft clone, written in C and modern OpenGL, which among other features includes multiplayer support, and perhaps most impressively, consists of just over 5,000 lines of code. Depending on what your experience is, that may sound like a lot, and at the time I’d never worked on a single project of that size myself, but in the grand scheme of projects, that’s rather minimal, especially for a low-level language like C. Other projects are easily in the hundreds of thousands of lines range, many in the millions or tens of millions. No matter how great the codebase, 100,000 lines of code is intimidating to say the least, especially for beginners. The thought that by understanding those 5,000 lines of code, I could understand how interactive multiplayer games worked was exciting.&lt;/p&gt;

&lt;p&gt;It’s never that easy. Though Craft is very well-written code, the thing about OpenGL and graphics programming is there’s no way to say “draw a cube”, “draw a horse”, “draw the sky”, or “add lighting”. The GPU has no knowledge of such complex objects. It is your job as the programmer to feed in the vertices in space (x, y, z coordinates) and textures that together form those objects. The GPU does not even natively understand 3d. The screen, like a photograph, is 2d, it is only through math and what are essentially camera tricks that we perceive scenes as 3d. OpenGL (like DirectX and Vulkan) is the interface through which you as the programmer interact with the GPU. The trick is to understand how and why it works, which isn’t necessarily intuitive until after you’ve actually drawn a cube and had your aha moment. This gives the illusion of it being more complex than it really is, like riding a bike, raising a dog, or learning how to be an adult.&lt;/p&gt;

&lt;p&gt;Fortunately for you and me, there are &lt;a href=&quot;https://learnopengl.com/&quot;&gt;lots&lt;/a&gt; &lt;a href=&quot;http://www.opengl-tutorial.org/&quot;&gt;of&lt;/a&gt; &lt;a href=&quot;https://webgl2fundamentals.org/&quot;&gt;resources&lt;/a&gt; which explain how it all works. I find this is true about many domains today: the sheer amount of free information is unbelievable. Because that work has already been done (thank you, thank you, thank you to the authors), I’ll link you to those resources and suggest you dive in if you’re interested in graphics programming. To pique that interest and give you an idea of the basics, I’ll provide a simplified explanation, as I understand it.&lt;/p&gt;

&lt;h1 id=&quot;how-graphics-programming-works&quot;&gt;How graphics programming works&lt;/h1&gt;

&lt;p&gt;As stated earlier, the basis of polygons and then more complex 3d shapes is the triangle. A triangle is composed of 3 vertices, a square of 2 triangles, and a cube of 6 squares, or 12 triangles, or 36 vertices. These shapes are assembled on the CPU and then passed to the GPU through the use of buffers. Shapes and models can be programmatically assembled or imported from 3d modeling programs such as Blender via .obj files or other formats. Buffers are the primary mechanism of uploading and manipulating data on the GPU. There is also the concept of attributes, which is basically how you say “this buffer contains 108 floating point numbers, with each set of three representing a vertex”; in other words, the attributes/charateristics of the buffer. You can similarly upload color data (RGBA) via buffers. Furthermore, if you’ll consider how triangles form a square, you’ll notice that you really don’t need 6 separate vertices, the triangles can share 4 of them. OpenGL has functionality that allows you to specify the indices of shared vertices to do this (confusingly called element arrays), which is but one example of a number of perhaps unexpected features which are seemingly minor but have specific uses. Another is the way that “winding” vertices clockwise or counter-clockwise to form a shape determines what direction it is culled from (or not rendered when unnecessary). You can Google for more information, but it’s worth being aware that concepts like this exist and they exist for a reason.&lt;/p&gt;

&lt;p&gt;The magic that makes modern 3d programming modern is the use of shader programs. Shaders are written in a small, restricted, C-like language called GLSL which runs on the GPU. Much like regular programs, they are self-contained pipelines which accept a number of inputs and return a number of outputs. Modern GPUs can run many of these shaders at once but crucially they do not share state and partially due to this are very efficient. Perhaps they are best thought of as functions which operate separately and in parallel on each vertex. Inputs consist of individual items taken from the buffers mentioned previously, as well as from so-called uniforms which are bound to the same value across every run of the shader. Textures are another usually global input, they allow you to import images used to, among other things, wrap objects. For example, this is how you might make the ground look like grass.&lt;/p&gt;

&lt;p&gt;Shader programs are actually composed of two kinds of shaders: vertex and fragment. There are other more specialized kinds which are used less often and I’ve not yet needed. Vertex shaders most importantly return position information for each vertex and they can also send data to the fragment shader which runs next in the pipeline. The fragment shader is primarily concerned with the coloring of each vertex, as well as the interpolated coloring of the entire shape represented by the vertices (this is also where textures come in). If this sounds confusing, in practice it is less so. You can do some really amazing stuff with shaders, but in many cases the positioning and coloring of vertices is very simple, feeding that information in and out as is. Where these really shine (sorry, had to) is in the use of applied effects such as modern lighting: if we’ve got one or more light sources, we can feed the location of those sources into the shader and then calculate the lighting/shadows on each individual vertex. This is also how games do effects like trees and grass which sway in the wind; it’s just a vertex shader which adjusts the position of each vertex based on a simple algorithm to give the illusion of movement.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Shader&quot;&gt;Wiki&lt;/a&gt; says that shaders were first introduced in Pixar’s RenderMan software in 1988. It was not until 2000 that Nvidia GeForce cards supported them in hardware available to consumers. John Carmack and id released Quake 3 in 1999 which required an OpenGL capable card due to the heavy use throughout the engine. I seem to recall (but can’t find via Google, so take it with a grain of salt), that Carmack’s work at id during this time heavily influenced the development of the programmable shaders we take for granted today. Even if that’s not accurate, he basically invented the first-person shooter as well as the engines which are the foundation for multiple gaming empires today. Pretty damn impressive - maybe good things can come from Dallas. The impact of shaders on the industry is easily seen in the jump from the PlayStation and N64 to the Xbox and its contemporaries. Halo used shaders for some neat effects and a game such as Splinter Cell was built around dynamic point lighting. Games of the previous era had both crazy low resolution textures and pre-baked lighting. The extensive dynamic lighting and material shaders (making surfaces appear to be of a certain material) are what give modern games much of their wow.&lt;/p&gt;

&lt;p&gt;The final key component of 3d programming is linear algebra. It at times can seem like magic, but it’s just math. Practically, linear algebra is the set of rules which dictate how matrices (arrays of arrays) of numbers interact (multiplication, division, addition, subtraction, etc) with each other and scalars (individual numbers). In the context of 3d programming this is useful because we’re often dealing with large groups of numbers. I’m not sure who figured this out, but conveniently certain formulas do all the hard legwork to convert what is 2d data into 3d data. One algorithm often seen in vertex shaders is of the form:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gl_Position = projection * view * vec4(position, 1.0);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Becuase linear algebra is “backwards”, this projection * view * model matrix is also known as the mvp matrix. Projection is a matrix which contains information such as the field of view and screen width/height ratio. The view is a matrix derived from the location and direction of the camera/player, and finally, the model is the actual data which represents the object. Most languages have linear algebra libraries which do almost all of this work for you, which means that with a few lines of code you can generate 3d scenes. Linear algebra also makes it easy to pull individual items into their own 3d spaces which you manipulate them relative to, only to later combine into “world space”. Without this ability, keeping track of massive scenes of objects would be difficult. When comanche renders a 1024 x 1024 map, it’s rendering 1,000,000 cubes, and many games have scenes with far more objects. Basically, it’s good, and linear algebra is also central to machine learning, so it’s more than a little useful to know and not complicated.&lt;/p&gt;

&lt;p&gt;Not to simplify things too much, but what I just described is the heart of graphics programming. State of the art games use more elaborate techniques, but at the end of the day you’re loading vertices and textures onto the GPU and manipulating them through shaders and linear algebra, this is as much the case for the humble cube as it is for the character model made of 1 million polygons. Complete games also include physics, AI, and sometimes networking. These can be as complex or simple as you like. Many of the systems which simulate real world phenomena are in fact simplified hacks. You may not have real world physics, but you can still simulate gravity or collision detection in a day. What’s more is there is some crossover in these different domains, and like graphics, there’s a &lt;a href=&quot;http://alumni.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf&quot;&gt;ton&lt;/a&gt; &lt;a href=&quot;http://gamedevs.org/uploads/tribes-networking-model.pdf&quot;&gt;of&lt;/a&gt; &lt;a href=&quot;https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking&quot;&gt;material&lt;/a&gt; out there describing how they work and are implemented. You can very easily have a working 3d game in 500 lines of code. Maybe not the Game of the Year, but something to build on and experiment with.&lt;/p&gt;

&lt;p&gt;I find this a little intoxicating. It’s a good feeling to be able to finally read through Craft’s main function and understand what’s going on. What’s just as fun is being able to play games, especially older ones, and to understand how it all works. You can play a game like Minecraft and realize just how little is going on and how anyone who takes the time to learn can build worlds like that, too. It’s funny becuase I remember being interested in the topic growing up but always running across people in game forums who acted like 3d programming was impossibly difficult and who discouraged beginners from trying, steering them down different avenues. I still see this today and all I can think is that it’s really not that hard, it’s not hard at all, you just gotta put in some work and learn. The effort is very rewarding, though, if for no other reason than to prove to yourself that you are capable. I often see similar discouragment and learned helplessness across the tech industry as a whole which frustrates me. Why tell people what they can’t do? You ever noticed how those who talk the most often don’t really know what they are talking about? It’s almost like their primary motivation is to be heard and figuring out the truth is only incidental. We can talk about this another time…&lt;/p&gt;

&lt;h1 id=&quot;learning-strategies&quot;&gt;Learning strategies&lt;/h1&gt;

&lt;p&gt;One of the goals of comanche, aside from making a working game and game engine, is to provide a tool for learning. Anyone should be able to read the source and understand how everything works. Things should be as simple as possible but no simpler, which stands in contrast to many projects which are overly complicated because they were never really made to be understood. It’s very powerful to understand something new, and I’d like to encourage that, besides the fact that I’m quite literally obsessive about code and can’t really help myself. No line should be wasted.&lt;/p&gt;

&lt;p&gt;While were’re on this topic of learning, my personal experience as a political scientist by training includes sitting through multiple stats classes and being fed linear algebra and often wondering what the hell was going on. If I don’t see why I should know something, I don’t find it interesting, and if I don’t find something interesting, I don’t learn. You may feel the same way. I had similar experiences in math classes throughout school; the only class I ever failed was freshman geometry in high school, which involved copying theorems and their proofs on index cards. How unbelievably boring! On the other hand, if you had told me then that by learning this stuff I could build worlds, well, I would’ve put a lot more effort into it. My belief is that the properly designed game engine can be an incredible learning tool both for kids and adults, but especially kids. Also, the crossover between linear algebra in games, machine learning, and stats is interesting. Besides the possibilty for learning, there are untold data visualizations that would be illuminating and possible for more people if only this stuff were more approachable, and at the risk of sounding ambitious, game worlds can be a boon for social science research. Some study happens after the fact, but if it was inherent in the design, what could you discover? Some of this is a ways off, but they’re avenues I’d like to explore.&lt;/p&gt;

&lt;p&gt;One more thing on the topic of learning. A strategy I find useful when approaching an unfamiliar topic is to 1) read articles and books to get a general overview of what’s possible 2) build a practically useful project based on that understanding and 3) repeat the first two steps using different material and languages/libraries. This is more generally applicable than tech, but by approaching the problem from different perspectives, I tend to eventually figure things out. comanche is but one of multiple attempts in other languages. Some are broken, wrong, or do a fraction of the work, but they exist. There’s a &lt;a href=&quot;https://github.com/aaron-lebo/com&quot;&gt;renderer in Go&lt;/a&gt; which includes font rendering using texture atlases, but the wrapping is wrong, there’s some lag on input that I can’t figure out, and I didn’t really understand vertex array objects at the time. There’s a “&lt;a href=&quot;https://github.com/aaron-lebo/lisp-engine&quot;&gt;lisp-engine&lt;/a&gt;” which only renders a triangle, but you can change that color at runtime, which is pretty cool if you ask me (thanks lisp). &lt;a href=&quot;https://github.com/aaron-lebo/cube&quot;&gt;cube&lt;/a&gt; is a C++ renderer which integrates &lt;a href=&quot;https://github.com/ocornut/imgui&quot;&gt;ImGui&lt;/a&gt; for menus (and it actually works). There are two Rust projects, &lt;a href=&quot;https://github.com/aaron-lebo/bears&quot;&gt;one&lt;/a&gt; uses the library &lt;a href=&quot;https://github.com/glium/glium&quot;&gt;Glium&lt;/a&gt;, &lt;a href=&quot;https://github.com/aaron-lebo/comanche-rust&quot;&gt;another&lt;/a&gt; uses raw OpenGL. Finally, &lt;a href=&quot;https://github.com/aaron-lebo/craft.cpp&quot;&gt;craft.cpp&lt;/a&gt; is Craft converted to compile using a C++ compiler, and &lt;a href=&quot;https://github.com/aaron-lebo/nimcraft&quot;&gt;nimcraft&lt;/a&gt; was an attempted port in Nim which simply doesn’t work, much like &lt;a href=&quot;https://github.com/aaron-lebo/nimgl&quot;&gt;nimgl&lt;/a&gt;. Knock yourself out.&lt;/p&gt;

&lt;h1 id=&quot;why-webgl&quot;&gt;Why WebGL&lt;/h1&gt;

&lt;p&gt;I’ve found that all you really need when doing graphics programming are bindings to OpenGL, a matrix library, a library which can read images for textures (preferrably PNGs), and a library which works with the OS to handle input and window creation. OpenGL does not handle the latter, but &lt;a href=&quot;http://www.glfw.org/&quot;&gt;GLFW&lt;/a&gt; and &lt;a href=&quot;https://www.libsdl.org/download-2.0.php&quot;&gt;SDL2&lt;/a&gt; both exist and any language worth its salt will have bindings to those and OpenGL, which are all written in C. Some languages have additional libraries such as Rust with &lt;a href=&quot;https://github.com/tomaka/glutin&quot;&gt;Glutin&lt;/a&gt;. Matrix libraries are common, some languages have multiple. It’s not even especially difficult to write your own matrix libary (Craft does this), and this may be worth doing if you want to see how they operate, but others have done the work and the optimizations. The old standby is C++’s &lt;a href=&quot;https://glm.g-truc.net/0.9.8/index.html&quot;&gt;GLM&lt;/a&gt;; many libraries are modeled after it. I believe SDL2 will read images, but most languages have a library that will do this, too.&lt;/p&gt;

&lt;p&gt;My instinct is to get as close to the metal as possible to make the smallest and most efficient engine. However, there are some real advantages to using &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API&quot;&gt;WebGL&lt;/a&gt;, which is built into every modern browser and mirrors the C OpenGL API very closely. The browser handles windowing, input, and images so the only library you need is for matrix math; comanche uses &lt;a href=&quot;http://glmatrix.net/&quot;&gt;glMatrix&lt;/a&gt;. It’s easy to get something on the screen and easier to distribute it to users via a link.&lt;/p&gt;

&lt;p&gt;The other major advantage to the browser is Javascript. I’m being intentionally provocative here because I know the pastime of choice in the usual tech haunts is to act like Javascript is the worst thing ever made and that anyone who uses it can’t possibly be a real programmer, but my continued experience with it is that it’s pretty damn good. It’s plenty fast, high-level, concise, unopinionated (functional and object-oriented code can easily coexist in the same codebase), and there are plenty of “ok, that’s pretty great” features (like unpacking/pattern matching on objects). It’s great at prototyping. As a comparison, Craft spands 150+ lines implementing hashmaps, which are just there in JS (and most modern langauges for that matter). It’s nice not having to do that. Is it the pinnacle of design? Hell no, but it’s good enough for me.&lt;/p&gt;

&lt;p&gt;Temporary detour, but the state of discussion around languages and tech in general where much of it is uninformed breathless hype makes me want to pull my hair out. Not specific to Javascript, but I can’t tell you how many times I’ve seen popular opinions/statements bandied around (and have for years), and then upon trying them, those statements don’t reflect reality. Over time I’ve realized that so much of what’s hot in tech is based on a small crowd hyping up what they’ve got to crowds who don’t have the experience to say otherwise or are scared to look stupid. And of course, when you are evangelizing, it’s usually difficult to say “by the way, we suck here, and here, and here”. I wonder how much misunderstanding this style of discussion is driving.&lt;/p&gt;

&lt;p&gt;Anyway, I’m saying Javascript isn’t a bad language and for the purposes of learning it’s even great. If you really can’t change your mind about it, &lt;a href=&quot;https://www.typescriptlang.org/index.html&quot;&gt;TypeScript&lt;/a&gt; fixes many of its remaining issues and &lt;a href=&quot;https://bucklescript.github.io/&quot;&gt;BuckleScript&lt;/a&gt; exists, too (and is excellent). Either one of them can use the same libraries. Finally, what these languages can all take advantage of is that there’s really not a better platform for custom UIs than the browser - overlaying an interface on top of your WebGL canvas is a few lines of CSS. It’s hard to beat that convenience.&lt;/p&gt;

&lt;h1 id=&quot;plans&quot;&gt;Plans&lt;/h1&gt;

&lt;p&gt;This being said, I’m not convinced that this is the best way to make a game, though I figure it’s always useful to be able to target the browser and to have have multiple codebases to work out your design/interfaces/specification. If you really had to, it should be straightforward to convert parts of the codebase (especially performance critical sections) to other languages which would compile down to &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/WebAssembly&quot;&gt;WebAssembly&lt;/a&gt; and native libraries. Your renderer would then be a very thin shim which is the only custom part of each port, and because WebGL mirrors OpenGL, conversion should be trivial. Another idea I had was to port to a subset of TypeScript and then transpile that to something high-level but fast like lisp. Maybe another day.&lt;/p&gt;

&lt;p&gt;Unfortunately, development is going to slow and and then come in starts and stops. I really wanted to get this to a point I was happy with, but more importantly, I needed to show something to the artists I’m working with. One of them is trained to do this (from the same school) and is already great, another is a classically trained artist who thinks of himself as a surrealist and favors Salvador Dali. He started learning Blender and similar tools around the same time I got to work on this, and in the last couple years he’s progressed to making some genuinely great stuff, even though I have to remind him that before he can make his second game he’s got to figure out how to animate a model. We’re all learning on the go and in our free time, and though we’re ambitious, I truly believe we’re going to make something special, maybe even something succesful, should we stick to it.&lt;/p&gt;

&lt;p&gt;Over the short-term I’d like to add frustrum culling, chunking, and some basic mechanics so it’s more of an actual game, then procedural generation. Not sure where we’ll go after that. Maybe a landscape generator. As far as the long-term goes, what kind of game we want to build, I’m not making any promises, but I can tell you what my friends and I are inspired by. Early 3d games from the 90s are very cool: great examples are Quake, Crash Bandicoot, Tomb Raider, Spyro, Metal Gear Solid. They had so little hardware to work with that they couldn’t beat you over the head with spectacle like many modern games do. They often had really great mechanics and graphically they have a charm, even today. I loved the living worlds of EverQuest, Asheron’s Call, Ultima Online. Those were special experiences games today still don’t understand how to capture. The raw functionality and easy modability of games like the original Half-Life and Starseige: Tribes have been lost in the modern age (Tribes had 64-player servers, vehicles, IRC (!), and mods like Tribes Football which I’ll never forget). There was the gameplay loop of Halo, the seamless multiplayer of Halo 2, the asymmetric multiplayer of Splinter Cell: Pandora Tomororw and Brothers in Arms, and the high skill ceiling and wide appeal of Super Smash Brothers and Bloodborne. Finally, there are the open gameworlds of today and the incredible combination of systems and mechanics in Breath of the Wild.&lt;/p&gt;

&lt;p&gt;Ok, so that’s just listing a bunch of games I like. The good thing is there are plenty of examples of what works, this stuff doesn’t have to be discovered, some of it is practically ancient, you just gotta put the pieces together. By pulling back the graphical spectacle (Tranformers isn’t a very good movie), smaller teams can compete, and given the advance of hardware, it’s hard to imagine what’s possible given a few years. Even now hardware is not the limitation. While VR may be immature, when it’s ready, the next Mario is going to be a billion dollar franchise. The goal for our team isn’t that, but rather to be in a position to have a chance of doing that. With hard work and time, that’s achievable.&lt;/p&gt;

&lt;h1 id=&quot;more-plans&quot;&gt;More plans&lt;/h1&gt;

&lt;p&gt;It will take time. Currently, I’m working a couple jobs while trying to finish a dissertation. That’s humblebraggy, but it keeps me level and forces me to pace myself. Job 1 I’ve had for 12 years. Fresh off reading &lt;em&gt;Programming Rails&lt;/em&gt;, I walked in and told my boss on day one that we could recreate their PHP app in a few days. Oh yeah no problem. Rails has scaffolding, right? Of course that was ambitious (try weeks if not months), but I’ve grown up there and learned not only how to build systems but my bosses have perhaps unintentionally taught me so very much about treating clients and employees right. Job 2 is newer, I’m on a small team that builds open source software that’s getting used by people at some of the best universities in the world (yes, in Javascript). I’m amazed and proud of what we’ve accomplished as a team. We too are learning as we go, but it’s nice working with people who are talented. The dissertation, well, I’ll be glad when it’s over. Gotta keep chipping away.&lt;/p&gt;

&lt;p&gt;comanche is but one of two side projects. Honestly I’m more excited about the other project I haven’t told you about. It’s been 13 years in the making, but I think its time has come. It is one of those things that I wanted to and probably could have done, but was too immature, too afraid that it wouldn’t be good enough or that it was a good idea but someone would steal it, or worse, nobody would care. I’m old enough to where that doesn’t really matter anymore, I just want to try.&lt;/p&gt;

&lt;p&gt;My first attempt at it was some time in 2012. I kept rewriting it, getting nowhere, but in the last year I’ve forced myself to stick with it, and I’m almost ready to show it off. I won’t spoil too much, but it’s a weird hybrid. It seems very obvious to me, but I am not really aware of anything quite like it, which makes me unsure if there’s something I’m missing. I know at the very least that it’s something I will find useful and maybe others will, too, which seems like a good basis for some kind of success, even if only personal.&lt;/p&gt;

&lt;p&gt;These projects are experiments in extreme openness and transparency. I believe firmly in the ethos behind open source software. The world is not zero sum, by giving away your work and encouraging others to do the same you can create vibrant communities and wealth where there is none. By being realistic about your strengths, weaknesses, and goals, and getting input about them, you are not weaker but stronger. I’ve got a few ideas for monetization, but I ultimately believe that if you make genuinely useful products, you won’t be able to stop people from throwing money at you. They already do for for so many projects which don’t deliver what they said they would. What if you went the opposite direction, and gave your customers more than they expected?&lt;/p&gt;

&lt;p&gt;I believe you can give away your best ideas and work to your competitors and it won’t matter. You can’t fake inspiration, desire, or hard work. You can say you value users and transparency, but if you don’t actually value those, they’ll be the first thing you abandon. Most importantly, you can’t fake a genuine concern about the quality of your work. Users know what’s good, and I think they’ll reward you for it. They’ll also reward you, in that human way, for seeing them not as statistics but rather as individuals. This cannot be faked, either. My bet is that you can do all of this with a fraction of the resources of the big guys because values drive priorities and priorities drive results. If this sounds naive and idealistic, I think so, too, but I want to find out.&lt;/p&gt;

&lt;p&gt;Finally, the end. This is the last post on this blog setup. The other project I told you about will be replacing it. My first step will be to convert my old content over, the second will be to write a post about it. If you’re interested, please subscribe to my newletter. Just kidding, I don’t believe in newsletters. I do have an &lt;a href=&quot;http://lebo.io/atom.xml&quot;&gt;RSS feed&lt;/a&gt; if you are into that. My goal is to get something live and running by the beginning of May. Hope to see you then.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>This Time is Different</title>
   <link href="http://lebo.io/2015/07/29/this-time-is-different.html"/>
   <updated>2015-07-29T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/07/29/this-time-is-different</id>
   <content type="html">&lt;p&gt;I’ve been kicking around the idea of writing an essay on why this year will be different for the Cowboys, unlike so many others. I truly believe that they could win a Super Bowl. Of course, you can never know that as a certainty, as any number of wrinkles can get in the way: an injury to a star player, a single bad playoff game, or a team that is simply better. Still, on today, the start of training camp, I think it is worth reflecting on the last 25 years of Cowboys football, what it means to really love a team, and why regardless of what happens this year, the Cowboys should be competitive for a long time.&lt;/p&gt;

&lt;p&gt;Where do I start? Some of you are much older fans than I, but my first real memory of the Cowboys was when they were playing the Bills in one of their Super Bowl match ups. We sat in the living room of our old house as a family and ate buffalo wings. Only being a child at the time, it seemed like this was exactly how life was supposed to work: the Cowboys were always the best team and of course it made perfect sense to eat buffalo wings. For a sports fan this was an idyllic childhood.&lt;/p&gt;

&lt;p&gt;The first event which taught me that fandom was sometimes painful was the 1994 NFC Championship Game between the 49ers and the Cowboys. Remember, had they won this one, it was quite possible that they would have won four Super Bowls in a row. Perhaps not, maybe if they had won three in a row, the team doesn’t come back as motivated for the next. Anyway, my dad had to make a trip to his office so we listened to the start of the game on the radio in the car and then another part on an old durable-as-hell radio that might be sitting in that same spot today. Of course in that game the Cowboys dug themselves a 21-0 hole in the first quarter. They fought back, and if not for a missed PI call on Deion covering Irvin, the Cowboys may very well have pulled off the comeback. But it wasn’t to be. I remember watching the end of the game at home on the TV and specifically remember my mom complaining about how rude Steve Young was because he knocked over a reporter while making a victory lap around muddy Candlestick. This loss wasn’t particularly heartbreaking, it was just confusing. The Cowboys could lose?&lt;/p&gt;

&lt;p&gt;The next year they won a Super Bowl and things were back to normal. It was only the year after that when it became obvious that the good times couldn’t last forever. Irvin got suspended for cocaine and didn’t make it back until late in the season. The Cowboys had to travel to Carolina to play an upstart Panthers team with a young Kerry Collins and a tight end that seemed like a god that day, Wesley Walls. As the time ran down on that defeat, I remember sitting there crying. It seems silly now, but my little mind just couldn’t get over it. This was a loss that really hurt, more so than others. The saddest thing might be that few at the time realized that it also signaled the end of a dynasty and that we wouldn’t see a great Cowboys team for another 20 years.&lt;/p&gt;

&lt;p&gt;The next two coaching eras are known more for their futility than anything else. There was Randy Moss destroying the Cowboys on multiple occasions and showing why Jerry should have drafted him. Ironic for a team which has since made dance partners with characters like TO, Pacman Jones, and the less troubled but still controversial Dez and Randy Gregory, but Moss was Jerry learning a hard lesson.&lt;/p&gt;

&lt;p&gt;These years also included an upset by Jake Plummer and the Cardinals in Texas Stadium (the Cardinals were never seen as anything more than a joke up until this point). There was the slow attrition of players who had been on those great teams; Irvin was done in 99, Aikman two years later. We had George Teague destroying TO after TO mocked the Star repeatedly (it’s easy in 2015 to forget just how much TO was hated around here at one point; he more than anyone else should be proof that winning forgives all sins). There were three 5-11 seasons, and the Year of Four Quarterbacks starring Quincy Carter, Clint Stoerner, Antony Wright, and Ryan Leaf. Things got so bad that I remember talking excitedly on the phone with a friend about a Chad Hutchinson overthrow. Sure, he overthrew his receiver by two yards, but boy did he have an arm!&lt;/p&gt;

&lt;p&gt;Then, Along Came Parcells. 2003, while only modestly successful, was a light in the darkness. It was a memory that winning was possible. The first sign that things were different came on a Monday night game in New York when Quincy Carter threw for over 300 yards and the team willed itself to a come-from-behind victory on a Billy Cundiff field goal against a Giants team only a year and a half removed from a Super Bowl appearance. That was electrifying. There was the game that Emmitt returned to Texas Stadium as a Cardinal and Roy Williams destroyed his shoulder. There was an early match up with the Eagles where the great Randal Williams returned an attempted onside kick for a touchdown three seconds into the game. The Cowboys managed to hold on despite a late Eagles rally. I was there. I remember how into the game that whole crowd was, especially on the final drive by Philly. I remember some Eagles fan talking shit in the parking lot and getting punched in the face. Pro tip: don’t ever go to someone else’s stadium, get liquored up, and talk trash. It can’t end well.&lt;/p&gt;

&lt;p&gt;That team ended up getting exposed as the season wore on: Miami scored at will on Thanksgiving and the Eagles were back on top of the division after a 36-10 drumming in at their place. Still, it is easy to forget how much talent was on that team. There was a healthy Darren Woodson, Dat Nyugen, Greg Ellis and others in their prime, as well as Roy Williams at his best and Terence Newman playing like a veteran even as a rookie. On offense Quincy Carter was getting compared to Donovan McNabb (it seems silly now, less so in his third season). Terry Glenn and Joey Galloway could still play at a high level, Witten was a rookie, and old greats like Flozell and Larry Adams were still around. Sean Peyton was the QB coach (for a laugh, check out &lt;a href=&quot;http://www.rantsports.com/nfl/2014/09/28/dallas-cowboys-made-a-huge-mistake-letting-sean-payton-go/&quot;&gt;this article&lt;/a&gt; just prior to the Cowboys breaking out last year), and Mike Zimmer was the DC. Ask Bengals and Vikings fans just how much they love him. Most importantly, 2003 was a return to some kind of competitiveness. Parcells said it best: “you can’t call us losers anymore” after a gritty win against the Panthers late in the year.&lt;/p&gt;

&lt;p&gt;Partially thanks to Quincy loving white powder even more than Irvin had, 2004 was lost before it even started. Still, our first glimpse of Romo happened in a preseason game against the Raiders in which this brash, maybe naive, maybe obnoxious backup came in and drove his team all the way down the field before running a QB sneak in for a touchdown. I’m a little proud that I saw that live. Romo wouldn’t see true action that year, but we did see old man Testaverde give it his all and we got to hear commentators talk about how strong his legs were just about every game. We also got to see a rookie Julius Jones look like the next great Cowboys running back. He flashed that a few times in the coming years, but he never looked as elusive and electrifying as he did as a rookie. Perhaps unfairly, I’ll always believe that Parcells coached his natural talent out of him. Oh, and speaking of talent, we got to see a couple games of Drew Henson, Jerry’s heir apparent for the QB job. The delusional homerism of I and thousands of other naive souls will miss you, Drew.&lt;/p&gt;

&lt;p&gt;The next year brought an new Drew, Drew Bledsoe. I don’t know that Cowboys fans ever really loved Drew. He was like that person you get into a relationship with because you just want a relationship. Nothing against that person (or Drew), but neither of you really like each other as much as someone else has or will. Bledsoe was always a Patriot first and foremost and he’s loved in New England in ways that he never was here. Still, Drew gave everything he had, and that’s all you can ask for. Along with Drew, 2005 brought a trend of maddeningly consistent inconsistency. There were some great moments, like a real demolition of the Eagles at home, as well as that impossible victory in Philly where Roy Williams intercepted a McNabb pass to no one in particular and took it to the “promised land” as he’d later say. On the other hand, there was a missed Jose Cortez field goal in Seattle and a missed Billy Cundiff field goal against the Broncos on Thanksgiving, both games that would wind up as losses. We really shouldn’t even talk about being up 13-0 and utterly dominating the Redskins in Dallas only to see Santana Moss catch two long bombs in the closing minutes. 2005 sucked because it could have been so much more, but as I said, it’s real lasting impact, aside from the drafting of Demarcus Ware, was the start of the Cowboys being a team that would win games they had no business winning and losing games everyone thought they were going to win.&lt;/p&gt;

&lt;p&gt;With 2006 came the birth of Romosexuality. Tomes have already been written on Romo, but we have a much different outlook on him 9 years later than we did at the time. In 2006 it seemed as if he emerged out of nowhere to replace Bledsoe and become the next Staubach or Aikman. Even in his first extended action against the Giants, a game in which his first pass was an interception for a touchdown, you could tell he had something special. That was made concrete the next week on Sunday Night Football where Michaels and Madden specifically raved about his savvy. There was that great moment of him standing on the sideline with tears in his eyes as Parcells came by and touched him like a proud father. Fans stood outside the stadium that night chanting “Romo! Romo! Romo!”. As a proud Boys fan, that brought chills. There was his breakout on Thanksgiving with five touchdowns against the Bucs, where we also saw his predilection for famous women (Carrie Underwood at the time, Jessica would come later). There was that magic in the Meadowlands where Romo rolled to his left and found Witten forty yards down the field just over the shoulder of Antonio Pierce to put the them into  field goal range for the win. Of course, that season ended on that muffed field goal in Seattle, and we’ll see that footage for the next 30 years. That play isn’t as haunting as the fact that Parcells has said that he thought they had something special that year. Had Greg Ellis not tore up his knee in garbage time in Arizona in December, maybe he’s right. Maybe the Cowboys win the Super Bowl that year and Romo’s legacy takes a drastic turn. It could have happened. Nobody else was especially scary that year. It’s too damn bad. No matter. We had found our Romo.&lt;/p&gt;

&lt;p&gt;Thus began the Romo era. Unfortunately, for as brilliant as the Romo era has been at times, it has always let us down. Too often that is placed at his feet, but it is more of a reflection of the franchise as a whole. 2007 was greatness. It felt like the return of the old Cowboys after a decade of futility. But we all know how that ended. Despite moments like Nick “Folk Hero”’s winning field goal in Buffalo (where I found myself holding hands with a stranger before the kick, like a player on the sideline), and  Joe Buck’s “and the legend of [Tony Romo] continues to grow”, we had other moments like a late season Eagles loss (with Jessica Simpson in attendance and the hoopla that ensued). We had Cabo and Bobby Carpenter. We had that miserable Giants game in the playoffs where the Cowboys just made stupid plays, like that scamper down the sideline by Amani Toomer for a touchdown. Finally, there was that last drive with a phantom intentional grounding call, the Patrick Crayton slow down on a sure touchdown (maybe a preview of Miles Austin’s similar slowdown against the Giants several years later), and the interception that ended it all. Close, but no cigar. The story of the Romo Cowboys.&lt;/p&gt;

&lt;p&gt;Before we continue further, something needs to be said. People always criticize Romo on the fact that his teams have constantly come up short. They act like he’ll just never get it together or you can never win with him. What they miss is the only reason that the Cowboys are close at all is due to him. Even within a single game, there are four to five plays he makes that that most QBs cannot. Within a given season there are one or two plays that Romo, and only Romo, can. Take Romo off this team and replace him with an average quarterback or even a very good one, like Drew Bledsoe, and you lose another three to four games a year. If you are one of those fans who believe that Romo is the problem, I’m sorry to tell you, but you are wrong. We have year after year of clutch moments by him to prove it.&lt;/p&gt;

&lt;p&gt;2008 was where the disillusionment started. Coming off that 2007 season, you had to figure that the Cowboys were going to the Super Bowl. Felix Jones and Mike Jenkins were added in the draft and Pacman Jones was added at a bargain price. This team had to be great. Through the first three games, this certainly seemed to be the case. Then, mostly due to a Romo injury, exacerbated by the decision to have Brad Johnson and Brooks Bollinger as backups, the season slipped away. A 44-6 stinker that presaged every 8-8 “playoff” game in the years to come sealed the deal on a disappointment of a season. 2008 started to write the story that Romo couldn’t win it all and the Cowboys would always be a giant tease.&lt;/p&gt;

&lt;p&gt;2009 surprised everyone, though that was really just the 2008 team without injury problems. The first playoff win in a decade was a nice get. But that success wasn’t sustained the next year and Wade was gone. Thus began the Jason Garrett era which everyone knows had been in the wings since his hiring (before Wade) in 2007. Garrett was exciting. He looked like a head coach. He came from the old 90s dynasty. He was fresh blood. But that initial excitement could only go so far as we entered those three years of 8-8.&lt;/p&gt;

&lt;p&gt;We started clamoring for Garrett’s head. What wasn’t obvious, unless you were really paying attention, is that Garrett was building something. Him, Jerry, Stephen, and Will McClay started shifting the roster from a bunch of overpaid veterans from the Parcell’s era to a young team built off of draft steals and forged first in the trenches. Jason was around for that dominant offensive line in the 90s and knew that it was key to continued success (and to the ability of Romo to stand up straight in his old age). His at times robotic persona and “three phases” of the game mantra, which seemed at first boring and then infuriating when the team wasn’t winning, slowly became instilled into the players. A team that had for years folded in big situations because it was so up and down slowly became steady and constant. When things would get good they wouldn’t eat the cheese (an old Parcellsism), but when things got bad, they wouldn’t panic.&lt;/p&gt;

&lt;p&gt;I don’t want to talk too much about 2011-2013 because there’s not a lot to stay. Those Cowboys were still learning. 2013 was amazing simply for the fact that the defense was historically bad but somehow the team still managed to end up at .500. Everyone saw the Lions and Packers collapses. I’ll admit it, for the first time in my life, I stopped paying attention to the Cowboys. I turned off the Saints game at half because I realized I had better things to do with my life.&lt;/p&gt;

&lt;p&gt;How could we have known 2014 was going to be different? Nobody but the biggest homer did. But this is where the shift in culture started to pay off. The first game seemed like a return to form. I turned off the TV in the first quarter out of disgust and tweeted that I had “standards”. Why waste your time on bad football? But I couldn’t help myself. Throughout the season I’d tune in until the old Cowboys apparently showed up and then I’d turn off the TV only to be goaded by a friend into turning it back on. Time after time, instead of folding like the Cowboys had in the past, the Cowboys showed something I’d never seen before. They showed poise and confidence. They showed heart and fire. Down 21-0 against the Rams they roared back. After blowing a lead against the Texans they showed some moxie and won in OT off a brilliant Romo to Dez connection (and that wasn’t even the best pass of the day). They went into Seattle and surprised everyone after going down 10-0. T. Will’s toe drag on the final drive still gives me chills. Down 11, the Cowboys came back in New York with a beautiful touchdown run by Beasley. Despite all these struggles, we had no idea that the real test was about to begin.&lt;/p&gt;

&lt;p&gt;The team was already on a downward slide after losses to Washington and Arizona when Philly came into town on Thanksgiving and absolutely destroyed them. Still to come was December (the historically bad month) with games against very good teams: Chicago, Philly, Indianapolis. What happened next was incredible. The demolition of the Bears in Chicago on Thursday Night Football. The ability to come back and beat the Eagles after giving up a 21-0 lead and losing all momentum in Philadelphia. Making the Colts (an AFC Championship Game team) look silly and clinching, and then, in a reversal of 2007, Garrett went all in and played his starters in the last week of the season for a dominating performance against the Redskins. If we didn’t know this was a different team before, we knew it then.&lt;/p&gt;

&lt;p&gt;In to town came Detroit. Would the Cowboys keep it up? I certainly didn’t look like it early. When they went down 14-0, I turned off the TV. Sorry, old habits die hard and it was hard to imagine the Cowboys coming back from this. But somehow they did. The magical long touchdown by T. Will before the half (something he’s becoming known for). Still, the Lions went up 20-7 in the third. Were the Cowboys really going to rally? Had they lost that way it would have been disappointing, but not surprising, and ultimately it still would have been a positive season. It was at this point that it was as if the team collectively shouted “No! No!” like Kurt Russell in &lt;em&gt;Tombstone&lt;/em&gt; and decided that they were not going to lose. You saw the desire in the late great Demarco Murray’s face as he scored on 4th and 1 to make it a six point game. You saw it in continued stands by the defense. And finally, you saw it in that last fateful drive.&lt;/p&gt;

&lt;p&gt;I didn’t know how that drive would end at the time, but that playoff game against the Giants during the 2007 season came to mind. Here was Romo at home with time running down and the ball in his hands driving for the winning score. Had he come up short I’m not sure that he’d ever overcome his now cementing legacy no matter how good his regular season had been. After the ball made it to midfield, Garrett put the game on the line on 4th down. Of course, they went to old faithful, Witten, who made the same move he’s made his whole career on a brilliant little juke over the middle. Finally, Romo threw that touchdown just before his pocket collapsed after what seemed like an interminable length of time. The crowed absolutely erupted, perhaps as loud as it has ever been at the new stadium. When Romo slapped the ground out of pure joy, you knew exactly how much it meant to him. His joy reflected our joy as fans. Here he was, here was Witten, here was Garrett, here was this team who, put in the same situation as the 2007 team, did something very different. The Dallas Cowboys and Tony Romo had exorcised their demons.&lt;/p&gt;

&lt;p&gt;Of course, that game wasn’t sealed until D. Law pulls a Leon Lett and then totally redeems himself on the final drive. Fun fact: I was at that icy Thanksgiving game in 1993 when the Big Cat made one of his now legendary blunders. Unfortunately, all I remember was getting home and my laces being frozen due to jumping in cold puddles of water. Anyways, better we recall that then the Packers game the next week. That game could have turned on a few plays and it’s very possible that Seattle and New England could have been beaten, as hard as it may have been. When it gets down to it, I can’t get too upset about the Dez catch, as the only reason that was possible at all was because of a very favorable call for the Cowboys just the week before. Regardless, they went down swinging. As much as I wish they would have just pounded the ball on 4th and short, I love the guts it took to throw a deep pass down the sideline to the team’s greatest weapon, who very nearly made one of the great miracle catches of all time. There is no shame in that loss. In fact, if it does anything, it has placed a chip on the team’s shoulder, which is invaluable.&lt;/p&gt;

&lt;p&gt;This brings us to the  start of training camp. Will this team progress even further or will we just see a repeat of 2008? Outside of injury, I don’t see how this team could regress. Except for running back, the entire offense returns pretty much intact. Hell, it may have even improved with the signing of Collins in one of the great draft hauls of all time (3 first-round talents with the 27th pick). All teams rave about their players during the off season, but Dez’s time off may have helped T. Will turn into a more complete receiver. Irvin and Harper are back, baby. Perhaps Cole Beasley becomes an even more important part of this offense. The biggest question is obviously RB, but McFadden may have a career year and Randle’s speed might be the perfect compliment to this line that produces gaping holes.&lt;/p&gt;

&lt;p&gt;Then there is the defense, which truthfully excites me more than any other part of this team. In Byron Jones, the Cowboys have added one of the &lt;a href=&quot;http://www.bloggingtheboys.com/2015/4/24/8484867/cowboys-2015-draft-targets-uconn-cb-byron-jones&quot;&gt;elite athletic talents&lt;/a&gt; of this draft, not to mention a very intelligent player. I believe that at worst he will become a Terence Newman, in other words, a savvy veteran who plays for a long time. His ceiling is even higher. Randy Gregory almost certainly won’t dominate this year, but he has the ability in coming years, and as D. Law showed last year, rookies can start to pick things up towards the end of the season. Speaking of which, D. Law will be in his second year, which has the possibility for a real leap forward. The same goes for Hitchens who was a gem of a draft pick at linebacker last year.&lt;/p&gt;

&lt;p&gt;There are also the veteran additions. Greg Hardy could be an elite pass rushing presence. Sean Lee, essentially an All-Pro player except for injury also returns. Everyone is low on Claiborne, but if we only performs as a second round pick instead of the top five pick he was, he’s a huge addition. With Marinelli driving, this could be a very, very good defense, something they were not last year in spite of that 12-4 record, great December, and playoff win.&lt;/p&gt;

&lt;p&gt;That’s why I’m incredibly excited about this year. It’s not just the talent on the roster, it is also the mindset of the franchise as a whole, and that’s why I’m excited about the team in the coming years. It took Jerry a long, long time to learn some hard lessons, and god knows at times we all wanted a different GM no matter how good of an owner he has been. However, it seems with Garrett, his son, and Will McClay, Jerry finally has people around him that he really trusts. He has a nucleus of partners and a foundation to build on, which he hasn’t had since Jimmy left. Even when Jerry is gone, Stephen seems like he’s learned a lot of those same lessons from his father. We don’t really think of it this way, but sports franchises are pretty much the last remaining little kingdoms. You might have a great king or queen for a time, only to have their child be a complete moron and destroy everything. The best sports franchises have consistent ownership. The Steelers are a great example of this. It isn’t unthinkable that Stephen could own the team for forty years. If he’s a good owner, then the team should be consistent, and when you are talking about success, that’s what you need: consistency. The Patriots, Packers, and Steelers don’t win every year but they are almost always in the chase because they have a stable foundation. When you are always in the case, sometimes things go your way and you win a Super Bowl. It’s simple odds.&lt;/p&gt;

&lt;p&gt;If the Cowboys don’t win it all this year, I truly believe that they’ll win one or two in the next decade. I don’t mean to eat the cheese, but I think that Garrett and company have built a foundation for success. I hope it is sooner rather than later, though. More than anything else Witten and Romo need one. They are two of the most deserving guys in the league. I would love to see Tony have one of those runs like Dirk’s 2011 playoff performance. If you don’t remember (and it can be hard to because opinion has shifted so dramatically), Dirk was labeled as soft and a choker, even though his stats said anything but. He shocked everyone and secured his legacy with that win. Dirk probably won’t win another championship, but it doesn’t matter. He will always be a legend for that short stretch of a sublime summer.&lt;/p&gt;

&lt;p&gt;Tony is one of the greatest undrafted free agents ever. He has put this team on his back year after year and made it much better than it would be without him. Despite this, and no matter how good last year was, for him to take that next step and be great, he’s gotta win it all. On that last touchdown against Detroit you saw just how badly he wanted it. You saw how much it meant to him. Tony is not a choker, he’s not a loser, and more than anything else, I’d like for him to be able to prove it to everyone else, especially those idiots who have said for years that he isn’t good enough.&lt;/p&gt;

&lt;p&gt;You see, sometimes you start to personally take on the story of your team or of a player. These loves which are completely irrational at their heart slowly start to seep into your life. You feel pain and joy based on how your team is doing. Hopefully sports aren’t the only driver off that in your life, but in the right amounts they can lend some kind of weight or perspective. A franchise or season becomes a kind of  soundtrack of your life. This isn’t a new idea. Go watch &lt;em&gt;Invincible&lt;/em&gt; or &lt;em&gt;Silver Linings Playbook&lt;/em&gt; or &lt;em&gt;Fever Pitch&lt;/em&gt; or a number of other movies which connect life, love, and sports. As silly as it is, a team can literally change the mindset of a single person or an entire region. It can give a little hope and pride that wasn’t there before.&lt;/p&gt;

&lt;p&gt;My profession is computer programming, so I talk to a bunch of very intelligent people who hate sports because they were at best ignored by by athletic douchebags for most of their life. When they ask how I can love sports, this is why: sports are some of the purest comedies, dramas, and tragedies around. When you see an old veteran get beat around year after year but still keep going to work, when you see a team that’s always a loser, you want nothing more than to see them overcome. You root for them. Those are the stories, the people that we love most. It isn’t those who had it all and succeeded because of that whom we adore. We might respect them but we can never really &lt;em&gt;love&lt;/em&gt; them. It’s those individuals, those groups whom despite failure after failure surprise the hell out of everyone and succeed. Those are the stories we care about. Those stories give us a little hope that it can happen in our own lives.&lt;/p&gt;

&lt;p&gt;So, recognizing just how irrational sports fandom is, I hope Tony, I hope Witten, I hope Jerry and I hope Jason pull this off. I hope this team can show us that even though it might take 20 years or more, if you keep going at it, sooner or later you can succeed. That’s the thing about sports fandom: you really have no control over it. Truthfully, you have much less control over life in general than you think you do. Sometimes all you need is a reminder that things can go your way. That you can be surprised by joy. With that said, go get em Boys.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The UNIX Philosophy and Elixir as an Alternative to Go</title>
   <link href="http://lebo.io/2015/06/22/the-unix-philosophy-and-elixir-as-an-alternative-to-go.html"/>
   <updated>2015-06-22T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/06/22/the-unix-philosophy-and-elixir-as-an-alternative-to-go</id>
   <content type="html">&lt;p&gt;If you’ve done web programming for any length of time, you might too feel like we are at the start of some new era. For years, we’ve been using frameworks like Django and Rails in languages like Python and Ruby and PHP which use the old request-response cycle (for lack of a better term). Basically, a request comes into the server from a client, the server renders up an HTML web page, and then sends that back to the client. This pattern is not as dominant as it was 10 years ago, due to AJAX, JSON, and numerous frameworks that embrace client-side rendering, like Ember, Angular, Knockout, Backbone, and more recently React, but in many cases we are still using frameworks and languages which are ill-suited to this. We’ve known for years that Ruby and Python are slow, but we were willing to put up with that. However, as we more and more turn servers into REST APIs that are supposed to deliver JSON to numerous clients, for many it is time to find an alternative.&lt;/p&gt;

&lt;p&gt;You see a lot of competitors trying to fill this void. Some people are crazy enough to use Rust or Nim or Haskell for this work, and you see some interest in JVM based languages like Scala or Clojure (because the JVM actually handles threading exceptionally well), but by and far the languages you both hear discussed and derided the most are JavaScript via node and Go. The thing about both languages is that neither of them are especially pretty. JavaScript prior to ES6 was complete shit in a lot of ways, but a lot of misguided judgments today are based on former experience and not modern realities about what the language has become. Personally, &lt;a href=&quot;http://lebo.io/2015/03/02/steve-yegges-next-big-language-revisited.html&quot;&gt;as I’ve stated before&lt;/a&gt;, I think JavaScript is a perfectly acceptable language, especially if you use a super set like Typescript. A few of its advantages are that it is fast (relatively), it is already used in the browser (though this may be changing in a few years with &lt;a href=&quot;https://brendaneich.com/2015/06/from-asm-js-to-webassembly/&quot;&gt;WebAssembly&lt;/a&gt;) and its asynchronous nature allows it to handle the modern web (apps not just pages) pretty well.&lt;/p&gt;

&lt;p&gt;Here’s the thing, though. JavaScript also has some flaws. Syntactically it is pretty noisy and ugly. Additionally, as much as I appreciate the fact that it is continually evolving in the standardization process, it keeps getting bigger and bigger. Some of those additions were necessary to just make the language usable, but with as many fingers are in the pie that is ES standardization, I’ve seen concern expressed by some that the language will become especially bloated if it hasn’t already. This is something that concerns me as well. The best things usually have a singular driving force behind them, and I’m not sure JS has that and if it does, whether it can maintain it. Having Microsoft, Google, Mozilla, and others all involved in the process is both a blessing and a curse.&lt;/p&gt;

&lt;p&gt;Finally, JavaScript handles the modern web well, but it isn’t perfect. If a request does something that is especially CPU-heavy, every single user of your application will be waiting. Thankfully, promises have eliminated callback hell, but we are still fundamentally covering up and working around JS’s core semantics. Will JS ever get proper threading to better handle some of these issues? Web Workers are a form of IPC, but as soon as you’ve delegated concurrency to that model, you aren’t any further along than Python (I am referencing the GIL and I am aware of aysncio).&lt;/p&gt;

&lt;p&gt;There are only a handful of languages which are truly doing concurrency these days. One of them is Go with its goroutines and channels, and this is a large part of its appeal. A few other aspects which have made it a popular alternative to existing languages and ecosystems include raw speed, simple yet dynamic feeling typing, the ability to compile down to a binary, and finally, simplicity. In discussions about Go this last part seems to be a dividing line which is often overlooked. Many people who have or are still using more modern languages like Haskell look at Go and are aghast at what the language is lacking feature-wise and can’t understand why you’d possibly limit yourself to that. On the other hand, if you actually listen to a lot of Go users, that is the primary selling point: the language is small, you can understand it in a day, and whatever facilities it lacks you can overcome with brute force and enough code. It is quite boring but it works. I’ve done some programming in more esoteric languages so I’m not the ignorant user of blub that so many Go-users are portrayed as in any of these silly partisan language wars, but after a decade of working in a number of languages, I do just want something very simple and something that fits in my head. It is a compromise I’m willing to make, and I’m sure many users of Go are the same way.&lt;/p&gt;

&lt;p&gt;That being said, have you tried writing a web app in Go? You can do it, but it isn’t exactly entertaining. All those nice form-handling libraries you are used to in Python and Ruby? Yeah, they aren’t nearly as good. You can try writing some validation functions for different form inputs, but you’ll probably run into limitations with the type system and find there are certain things you cannot express in the same way you could with the languages you came from. Database handling gets more verbose, models get very ugly with tags for JSON, databases, and whatever else. It isn’t an ideal situation. I’m ready to embrace simplicity, but writing web apps is already pretty menial work, Go only exacerbates that with so many simple tasks.&lt;/p&gt;

&lt;p&gt;In some of these language discussions, Go gets mocked a lot because it was initially marketed as a “systems language”. The idea that Go would be used in place of C or C++ was seen as absurd, and perhaps rightly so. The Go devs have since stated that they were surprised to see that a lot of Go converts were from dynamic languages like Python and not C or C++. When the term “systems language” is used in isolation, it doesn’t make much sense, but when seen within the context of the massive servers and processes at Google, it makes perfect sense. And truthfully, Go still makes sense for a lot of apps, foundational stuff like Docker or small command line apps are all within its wheelhouse and are appropriate. Somewhere, however, that has been extrapolated to the idea that Go is a good language for writing web apps. I don’t believe that’s the case. It is just as out of its element there as it is with true “systems” programming.&lt;/p&gt;

&lt;p&gt;There is a language, however, that might fit the bill. It’s a language that both snobs and those looking for something simpler can get excited about. Assuming you’ve read the title of this piece, you know I’m talking about &lt;a href=&quot;http://elixir-lang.org/&quot;&gt;Elixir&lt;/a&gt;. Elixir is a very light Ruby-ish layer of syntax that compiles down to run on BEAM, the Erlang VM. Erlang was created at Ericsson and has powered systems with incredible up time for decades. You can go elsewhere for a deeper explanation, but what makes this possible is that Erlang processes are very lightweight and hundreds of thousands of them can be spawned at once. This is true and elegant concurrency and it allows situations like WhatsApp to &lt;a href=&quot;https://www.google.com/search?q=whatsapp+erlang&amp;amp;gws_rd=ssl&quot;&gt;run on a minimum of servers with a minimum of engineers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Again, I don’t want to get too far into the concurrency thing mainly because others can do it much better. Erlang/Elixir can do it better than any other language is really all you need to know. What I do want to touch on are the qualities of Elixir itself. Do you want a modern language? Elixir is functional, immutable, and supports pattern matching, which is like a case or if statement on steroids, only that explanation doesn’t begin to touch how much it impacts your entire manner of coding. It also supports macros which means that the core language can remain small but users can extend the syntax to support patterns the designer never dreamed of. As I said before, it does this with a Ruby-ish syntax. Syntax shouldn’t matter but it really does. I’ve tried designing an “acceptable lisp” (or rather an acceptable syntax for myself) before with &lt;a href=&quot;https://github.com/aaron-lebo/prose&quot;&gt;prose&lt;/a&gt; (I think it is really cool!), but with its small core and functional nature Elixir strikes me as the unintentional true heir to Scheme’s throne.&lt;/p&gt;

&lt;p&gt;And this is what truly intrigues me about Elixir. Despite the fact that it is a very modern language, it is quite small. You can read through the language guide in a few hours and have a pretty good grasp on the core concepts. I love this. I’d much rather spend cognitive cycles on figuring out how to solve a problem instead of figuring out which construct in the language should be used. This also leads to much quicker mastery. Use 10 constructs 100 times each and you’ll get them intuitively much faster than if you use 100 constructs 10 times each.&lt;/p&gt;

&lt;p&gt;So what am I getting at? I think we are very much in a polyglot future. If you were able to get away with using a single language before, that is becoming less and less of a reality. Use Elixir for your REST API and you’ll probably still need to call out to a Python script (or some other language) for certain tasks. The key is, however, that Elixir with frameworks like &lt;a href=&quot;http://www.phoenixframework.org/&quot;&gt;Phoenix&lt;/a&gt; and libraries like &lt;a href=&quot;https://github.com/elixir-lang/ecto&quot;&gt;Ecto&lt;/a&gt; seems like a much better fit as a tool for web development than many other options. If the only thing Elixir does well (and it does) is connecting to a Postgres database and turning that into JSON, then that’s the UNIX philosophy at work. If we are at the stage where people are willing to leave behind thousands of libraries in their existing language in search of a better alternative, Elixir seems to be a stronger choice than Go. Both are simple languages, but Elixir brings so many features which will both make you grow as a programmer and will help your programs to grow elegantly in the future.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>500 Word Review of Ex Machina</title>
   <link href="http://lebo.io/2015/05/04/500-word-review-ex-machina.html"/>
   <updated>2015-05-04T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/05/04/500-word-review-ex-machina</id>
   <content type="html">&lt;p&gt;&lt;em&gt;I love movies. I think what movies you like says a lot about you as a person. One of my favorite things that I’ve done for years now is to go see movies by myself on a weeknight. Some people think seeing movies by yourself is weird, but it is really relaxing. The benefit of doing it on a weeknight is usually you are either the only person in the theater or one of the few. I’ve decided to write a 500 word review for each movie I see to help my writing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ex Machina&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;04/19/2015 10:05 pm&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cinemark West Plano&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;$10.40&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ex Machina&lt;/em&gt; is Alex Garland’s directorial debut. Who is Alex Garland? Well, he’s one of the best writers of the last decade. He is responsible for &lt;em&gt;The Beach&lt;/em&gt; starring a young Leonardo DiCaprio, the classic &lt;em&gt;28 Days Later&lt;/em&gt; , and the underrated &lt;em&gt;Sunshine&lt;/em&gt; (watch it; &lt;a href=&quot;https://www.youtube.com/watch?v=clG_1sqOsBs&quot;&gt;Capa’s Jump&lt;/a&gt; is one of the great scenes of cinema), among others. He often teams up with director Danny Boyle, but &lt;em&gt;Machina&lt;/em&gt; finally sees him on his own.&lt;/p&gt;

&lt;p&gt;What Garland is incredibly skilled at is making settings which are isolated from the world yet the characters within have experiences which reflect on humanity as a whole. Think of the hippie community in &lt;em&gt;Beach&lt;/em&gt;, the desolate cities of &lt;em&gt;Days&lt;/em&gt;, and the spaceship in &lt;em&gt;Sunshine&lt;/em&gt;. &lt;em&gt;Machina&lt;/em&gt; is no exception. In fact, &lt;em&gt;Machina&lt;/em&gt; may feel more isolated than the others.&lt;/p&gt;

&lt;p&gt;The gist of the story is that a young, brilliant programmer, Caleb, played by Domhnall Gleeson (of the very clever &lt;em&gt;About Time&lt;/em&gt; and son of Brendan Gleeson), wins a contest to travel to the home of and work with the founder of his company. This man, Nathan, is played by Oscar Isaac, whom we will soon see in Episode VIII, and based on this performance, many other movies. After a long ride, Caleb finally arrives at Nathan’s remote but modern cabin. The contrast between the two men is striking: Caleb is lanky, deferring, and unsure, while Nathan is muscle-bound, dominating and that byword of programmers everywhere, a brogrammer, albeit a brilliant one. After a short introduction (and many requirements), Nathan tells Caleb why he is here: to test the world’s first AI.&lt;/p&gt;

&lt;p&gt;The AI, is Ava, played by Alicia Vikander, who starred in &lt;em&gt;A Royal Affair&lt;/em&gt; opposite the great Mads Mikkelson. Her ability wasn’t fully apparent to me in that movie, but it is here. She plays the role of a somewhat human, but still alien robot incredibly convincingly. In fact, that is the strength of this movie. Nearly the entire film takes place inside Nathan’s bunker, with few exceptions the only characters are the three mentioned above, and dialogue between them drives much of the action. Without very strong performances, the movie simply would not work. Thankfully, they all are great.&lt;/p&gt;

&lt;p&gt;The movie also succeeds on its visuals and a minimalist but incredible &lt;a href=&quot;https://play.spotify.com/album/7jmxtx3nVVLynX0rzBbEhI?play=true&amp;amp;utm_source=open.spotify.com&amp;amp;utm_medium=open&quot;&gt;soundtrack&lt;/a&gt;. Combine these elements and you get to what &lt;em&gt;Machina&lt;/em&gt; is really about, and that is a fundamental question about humanity, our abilities and limits, and how carefully we should proceed in our constant quest for advacement. Honestly, I left the theater disliking the movie, not because it wasn’t great, but because it leaves you with such an uneasy feeling. Maybe that’s a good thing. &lt;em&gt;Ex Machina&lt;/em&gt; joins a line of moody science movies which challenge the way we think about the world and ourselves. In that light and in scope, it reminds me a lot of psychological space movies like &lt;em&gt;2001&lt;/em&gt;, &lt;em&gt;Solaris&lt;/em&gt;, &lt;em&gt;Moon&lt;/em&gt;, or the aforementioned &lt;em&gt;Sunshine&lt;/em&gt;. If you like sci-fi or movies that make you think, it should not be missed.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>500 Word Review of The Water Diviner</title>
   <link href="http://lebo.io/2015/04/28/500-word-review-the-water-diviner.html"/>
   <updated>2015-04-28T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/04/28/500-word-review-the-water-diviner</id>
   <content type="html">&lt;p&gt;&lt;em&gt;I love movies. I think what movies you like says a lot about you as a person. One of my favorite things that I’ve done for years now is to go see movies by myself on a weeknight. Some people think seeing movies by yourself is weird, but it is really relaxing. The benefit of doing it on a weeknight is usually you are either the only person in the theater or one of the few. I’ve decided to write a 500 word review for each movie I see to help my writing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Water Diviner&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;04/26/2015 10:15 pm&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AMC Firewheel&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;$10.82&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Water Diviner&lt;/em&gt; is apparently Russell Crowe’s directorial debut. I love period pieces and it was getting okay reviews on Rotten Tomatoes so I decided to check it out. The movie is set during and right after World War I. Without spoiling much, Crowe and his family live in the Australian Outback. His three sons enlist and end up fighting in the nightmare that was Gallipoli, from which they never return. Four years later, his wife still hasn’t gotten over or forgiven him for the loss.&lt;/p&gt;

&lt;p&gt;He makes a promise to her that he’ll find their bodies and bring them home. He spends the rest of the movie struggling with British military authorities, Turkish civilians, and Greek soldiers as he tries to make this a reality. There is some stuff here to like: you see both the British and Turks dealing with the aftermath of war as wary friends (? instead of enemies. Crowe’s love interest, played by Olga Kurylenko of &lt;em&gt;Oblivion&lt;/em&gt; and &lt;em&gt;Quantum of Solace&lt;/em&gt; tries to get over her own loss and attempts to establish herself as an independent woman instead of being bound by the traditions of her culture. There are beautiful shots of both The Outback and Turkey.&lt;/p&gt;

&lt;p&gt;However, the film is so heavily based around Crowe that it gets old. To paraphrase a &lt;em&gt;Time&lt;/em&gt; review, the movie tries to suggest that his character is the most interesting man in frame at all times, but Crowe’s performance doesn’t carry that suggestion. This is Crowe being very Russell Crowey. He’s very manly and does manly things. The title of the movie comes from his ability to find water, and he uses this same ability to somehow miraculously find dead bodies. Similar magic is seen in the last scene of the movie when he digs some black lump out of his coffee and he takes it as some kind of sign according to Turkish folklore. I don’t want to shoot all that down and sound cynical, but it simply isn’t explained, felt unfinished, and left me wondering what just happened.&lt;/p&gt;

&lt;p&gt;That basically describes the entire movie. There’s something there, but you aren’t sure what. At times the movie borders uncomfortably on a &lt;em&gt;The Last Samurai&lt;/em&gt; (still a great movie) complex of the white foreigner showing up and changing everyone’s life. That’s not the worst thing in the world, it just feels tone deaf, and probably stems from everything literally revolving around one person - the movie’s director and star. Crowe should get better with time, this is just a rough first effort. I’d like to point out that Yilmaz Erdogan, who playes a Turkish major, probably gives the best performance and I’d like to see him in more films. All in all, this isn’t a movie I’d rush out to see. It’s something you might want to watch on Netflix if you are bored and just love period pieces or have some weird crush on Russell Crowe.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bradley Cooper, Ernest Hemingway, and Realistic Optimism</title>
   <link href="http://lebo.io/2015/04/24/bradley-cooper-ernest-hemingway-and-realistic-optimism.html"/>
   <updated>2015-04-24T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/04/24/bradley-cooper-ernest-hemingway-and-realistic-optimism</id>
   <content type="html">&lt;p&gt;&lt;em&gt;Pat: Mom, I…for what, I can’t apologize. I’m not gonna apologize for this. You know what I will do? I will apologize on the behalf of Ernest Hemingway, because that’s who’s to blame here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pat, Sr.: Yeah, have Ernest Hemingway call us and apologize, too.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The above dialogue is from the great &lt;em&gt;Silver Linings Playbook&lt;/em&gt;. I found myself rewatching it recently because I found myself relating a bit too uncomfortably with Bradley Cooper’s character, Pat, and his inability to accept the obvious (though nowhere nearly as extreme). Movies help me to understand my own life experiences so &lt;em&gt;Silver Linings&lt;/em&gt; helps at this time. I also think which movies you like say a lot about you as a person, but that’s another topic entirely. If you’ve read another post I’ve written, I have OCD (which is almost an afterthought at this point), but I’m convinced it is the same inability to see the world as it actually is which both contibuted to my worst experiences with the disorder and is that which has allowed me to stay doggedly persistent and hopeful. Unfortunately, while persistence, drive, and a dislike of ever quitting can be incredibly powerful, they can also cause you to care about or try for something well after you should have stopped. Thankfully, unlike Pat, I know when to cut my losses.&lt;/p&gt;

&lt;p&gt;The quoted dialogue stems from Pat reading Ernest Hemingway’s &lt;em&gt;A Farewell to Arms&lt;/em&gt;. Long story short (you get this within the first 15 minutes of the movie), Pat is fresh out of a a mental institution because he was undiagnosed bipolar and almost beat his wife’s lover to death. Now that he’s out, he’s intent on remaking himself and winning her back (even though all signs, including a restraining order, suggest that will never happen). Nonetheless, Pat picks up the summer reading list that she (a teacher) assigns to her students, and starts working through it. &lt;em&gt;A Farewell to Arms&lt;/em&gt; is on the list.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: I found myself laughing because my first encounter with that book a year ago was the exact same printing/cover illustration from decades ago.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You see Pat working though the book (with his mom being supportive and bringing him refreshments), and then it all ends with a very literal crashing and a loud “What the fuck?!” as he sends the book out the window. He then storms into his parents room (at 4 AM) and goes into a rant:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I just can’t believe Nikki’s teaching that book to the kids. I mean the whole time, let me just break it down for you, the whole time you’re rooting for this Hemingway guy to survive the war and to be with the woman that he loves, Catherine Barkley…&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;…and he does. He does. He survives the war, after getting blown up he survives it, and he escapes to Switzerland with Catherine. But now Catherine’s pregnant. Isn’t that wonderful? She’s pregnant. And they escape up into the mountains and they’re gonna be happy, and they’re gonna be drinking wine and they dance, they both like to dance with each other. There’s scenes of them dancing, which was boring, but I liked it, because they were happy. You think he ends it there? No! He writes another ending. She dies, dad! I mean, the world’s hard enough as it is, guys. It’s fucking hard enough as it is. Can’t somebody say, “Hey, let’s be positive? Let’s have a good ending to the story?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I love this rant for a few reasons. First of all, I share Pat’s sentiment about staying positive. I really hate cynicism. It pisses me off. The world really is hard enough as it is, if you don’t face it with some hope then you’re gonna have a hard time. Second, I love Hemingway and his writing and am slowly trying to work through all of his major works. Finally, that glaring cynicism at the end of &lt;em&gt;Arms&lt;/em&gt; is a recurrent theme thoughout Hemingway’s work and is something worth discussing.&lt;/p&gt;

&lt;p&gt;To understand it, you have to understand Hemingway himself. I have a weird fascination with the guy. He was born in Chicago in 1899, grew up very middle-class and with Midwestern values. After a short stint with the &lt;em&gt;Kansas City Star&lt;/em&gt; (where he picked up the writing style he is famous for), he went to the Italian front during World War I and drove ambulances for the Italian army. During this time he was injured and spent several months in a hospital getting well. It was in this hospital that Hemingway, the Hemingway, Papa Hemingway, the larger than life author that everyone knows, was born.&lt;/p&gt;

&lt;p&gt;You see, in this Italian hospital he fell in love (for the first time apparently) with a nurse, Agnes Von Kurowsky, who was seven years older than him. It must have been fairly serious, as by the time he was released, they were planning on going back to the States and marrying within the next few months. Then it happened - she got engaged to an Italian officer and it was all over.&lt;/p&gt;

&lt;p&gt;This surely shaped both Hemingway’s writing and life. It must have been somewhat traumatic for him and despite his ability to move forward (and move forward he did), those wounds must have never truly healed. He had a facinating life. On top of his writing career, he was part of the Lost Generation of Americans who moved to Paris in the 20s. He knew Scott F. Fitzgerald, Picasso, and Gertrude Stein among others (all captured incredibly well in &lt;em&gt;Midnight in Paris&lt;/em&gt;). After Paris, he served as a war correspondent during the Spanish Civil War, patrolled for u-boats in Key West using his small boat, dynamite, and a machine gun, saw the landings on the beaches of Normandy on D-Day, was constantly exploring nature through trips like an African safari, and remained always quotable. He really knew how to live.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you weant to get and idea of who Hemingway really was and his vibrancy, check out &lt;a href=&quot;http://www.newyorker.com/magazine/1950/05/13/how-do-you-like-it-now-gentlemen&quot;&gt;this 1950 article&lt;/a&gt; in the New Yorker.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Where you really see Hemingway’s scars is in his relationships with women. Meeting women was something he never had a problem with. He was charming, outgoing, brilliant, and fit the idea of tall, dark, and handsome to a T. Aside from Miss Kurowsky, he never had a problem keeping them either. His problem was that (as pointed out by numerous scholars), he was so terrified of them leaving him, that he left them first. Over 40 years (1921 to 1961), he was married to four different women and never remained unmarried longer than a year or so. I’d list their names, but that feels weird, as if they were only footnotes to his life, which they obviously were not. He had three sons spread out over the marriages, which were for long stretches really happy times for him. He just couldn’t escape that nagging fear that he was going to be left behind by those who loved him. His last escape wasn’t with a woman, it was with a shotgun to the head in 1961 due to a depression exacerbated by injuries and electroshock therapy. When you look at the lives of people like Hemingway, it seems obvious that so much of the time our most creative people have to go through hell to get that power. They think differently, and it is this different way of thinking which both makes them miserable and allows them to create things which most “normal” folks can never even dream of - a real gift and curse if there ever was one.&lt;/p&gt;

&lt;p&gt;Speaking of which, we havent really touched on Hemingway’s writing yet. Some people know him mainly for his style, which is often copied or parodied. In words, it is very stripped down, uses plain language, and the word “and” in place of commas. The most outright expression of this is seen at the very beginning of &lt;em&gt;Arms&lt;/em&gt;, in one of the longest sentences in the of history of the English language. In content, he uses the “iceberg theory” or “theory of omission” which basically means that he rarely describes the explicit themes of his work, but rather describes actions and settings and lets the themes shine through. Finally, he had a penchant for making his work somewhat biographical. The names are always changed, but the influences are unmistakable. His experience in World War I is reflected in &lt;em&gt;Arms&lt;/em&gt;, which explains Pat’s explicit mention of Hemingway as the main character. His own trips throughout Europe and love for wine and bullfighting is seen in &lt;em&gt;The Sun Also Rises&lt;/em&gt;. &lt;em&gt;For Whom the Bell Tolls&lt;/em&gt; is heavily inspired by his time spent in Spain during the civil war there (where he apparently helped with a small military action). Finally, by the time he wrote &lt;em&gt;The Old Man and the Sea&lt;/em&gt;, which he won a Pulitzer for, he was very literally becoming an old man and his time spent in Key West and final years grabbing for life leave marks all over the story.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;SPOILERS: I’m about to spoil the ending to every one of these books. You should skip to the next section if you have any desire of reading them in the future. You’ve been warned.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Aside from being semi-biographical, all of these stories have something else in common: they have sad, even tragic endings. In &lt;em&gt;The Sun Also Rises&lt;/em&gt;, Hemingway is Jake Barnes. He is a veteran of World War I who has suffered a wound which has made sexual relationships an impossibility. Throughout the novel, one Lady Brett Ashley flashes in and out of his life. She has been divorced twice and is still in and out of relationships during the book. She clearly loves Jake very much (as he does her), but his wound rules out anything serious. The final chapter finds her broken, him comforting her, and her lamenting, “Oh, Jake…we could have had such a damned good time together”.&lt;/p&gt;

&lt;p&gt;Pat already told you the ending to &lt;em&gt;Arms&lt;/em&gt;, so no need to do that once again. In &lt;em&gt;As the Bell Tolls&lt;/em&gt;, Hemingway writes himself as Robert Jordan, an American professor fighting for the Republican side (the good guys, the ones Hitler and Mussolini helped Franco to crush). While following orders to blow a bridge with a small group of guerillas, he meets the very young and slowly recovering Maria, who has lost both parents, was raped, and as a result had been nearly crazy. They fall in love and start talking about a future together. Robert allows himself to dream of this future even though he knows that he must first live through the war. The group manages to blow the bridge and both Robert and Maria emerge unscathed. It is only during the final escape to safety that Robert’s horse is shot out form under him and he is left to die while the others escape with their lives. Personally, I think the final chapter of &lt;em&gt;Bells&lt;/em&gt; is as good if not better than any other book. I still don’t understand how a modern movie adaptation hasn’t been made.&lt;/p&gt;

&lt;p&gt;Finally, in &lt;em&gt;The Old Man and the Sea&lt;/em&gt;, Hemingway is (less conciously) the old man. The old man takes his boat out every single morning to fish for a living. He’s had a bad stretch of luck and finally decides to go far out from the coast in order to try for better odds. Throughout the book he keeps repeating to himself that he’s gone too far out. He knows it, but it is a risk he must take. He snags the biggest swordfish he has ever seen, something which both would turn his luck around and make him the talk of the community. He wrestles with the fish for several days and nights in order to keep it. Unfortunately, by the time he gets it back to the coast, sharks have devoured all but the bones despite his best efforts. As he returns to his shack, broken and dying, the massive skeleton on the beach both reminds everyone of just what he has managed to do as well has how much he has lost.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;END SPOILERS&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’m not sure if all of his writing ends like that, but those are some of his defining works. I think part of the allure of Hemingway and his writing is that he expected things to go wrong, but he couldn’t help but to try. Within him, we see someone that is inherently hopeful, but realistic about things. Personally, I appreciate those endings in a weird way. It would have been so easy to end &lt;em&gt;Arms&lt;/em&gt; with Frederic and Catherine happy, &lt;em&gt;Sun&lt;/em&gt; with Brett getting over Jake’s flaw, &lt;em&gt;Bell&lt;/em&gt; with Robert and Maria in a Madrid hotel room, or &lt;em&gt;Man&lt;/em&gt; with a community patting the old man on the back for bringing the biggest fish they had ever seen home. It would have been easy, but it wouldn’t have felt real. Those positive endings would have felt way too Hollywood, and the real world is not Hollywood, or at least Hemingway didn’t think it was.&lt;/p&gt;

&lt;p&gt;Was he right? In some sense it took some bravery to write sad endings like those. You know that he, just like Pat, wanted to put forward the idea that the world was good and everything works out in the end. You see nuggets of it sprinkled throughout his writing. But he couldn’t do it. Ultimately, I think Hemingway saw life as a struggle that you had to make the best of. Ironically, he may have sabotaged any chance he had of being happy in being so scared of the best things in his life going away that he left them. It was self-destructive behavior.&lt;/p&gt;

&lt;p&gt;Ok, so Hemingway may have had some issues, which in turn helped him to write some beautiful stuff (for the moment we’ll ignore his weird statement about Othello, some anti-Semitic ideas, and the fact that most of his female characters are overly simple). What is the proper mindset to take into the world? I think how you view the world runs along a spectrum, which like the Kinsey scale of sexuality, can change through your life. It can roughly be thought of as:&lt;/p&gt;

&lt;p&gt;cynicism — realism — realistic optimism — optimism — delusion&lt;/p&gt;

&lt;p&gt;Cynicism is simply the belief that the world is a cold place, we are here, there’s not much magic to any of it, and odds are that ultimately things will go wrong. I have no time for that kind of thinking, I don’t think anyone does. On the other hand, you can be spectacularly successful as a cynic simply because you don’t expect anything, you just live life, and things surprise you because you have kept your head down and you operate by a very limited set of rules. Realism does not stretch things this far, but there’s still not room for any kind of optimism. You don’t expect bad things to happen, but you don’t expect anything good, either. I will come back to realistic optimism because that is the point of this entire post. Optimism is a general belief that things are and are going to be okay. Pure optimists of this type often tend to be dreamers and might struggle to get anything done because they don’t see the hard reality of obstacles or necessary work. Finally, delusion isn’t just optimism that things will be okay, it is an overriding belief in things that there is no real evidence for. Delusional people, like cynics, can often be very successful. Their belief in things may cause them to work on causes that other people would have left behind way in the past, or expect things to work that others have long since ceded to impossibility. There’s a long line of delusional people who have pushed the world forward. Unfortunately, these same people have often made a mess of their lives.&lt;/p&gt;

&lt;p&gt;What about realistic optimism? What is that? There are similar phrases, one by an author that I cannot recall currently, so I’m just using this term. I think Pat sums it up really well:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is what I believe to be true. This is what I learned in the hospital. You have to do everything you can, you have to work your hardest, and if you do, if you stay positive, you have a shot at a silver lining.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Life isn’t going to handed to you. It is hard. If it is not hard, or at some point things within your life haven’t been hard, then I have to question whether you are really living. You are probably playing it too safe. On the other hand, for some people life is just hard in general. Nothing has been easy for them, and it is a constant struggle. Realistic optimism is an acceptance that life can be a struggle at times, and sometimes you will fail, but just because you failed doesn’t mean you are a failure or will always fail. You’ve got to keep moving forward, be realistic about where you are and what it will take to get where you want to go, and then do everything you can achieve it, all with the hope that it all really is achievable.&lt;/p&gt;

&lt;p&gt;That’s realistic optimism, and I think it is a healthy mindset for living. The great thing about &lt;em&gt;Silver Linings&lt;/em&gt; is that Pat goes from being delusional to a realistic optimist, while his love-interest, Tiffany, played by the great Jennifer Lawrence, goes from a kind of cynicism to the same realistic optimism. It’s a little magical, which is why so many people, regardless if they’ve experienced mental issues or not, can relate to it so well. Something used throughout the movie is a little saying that Pat learned in the hospital that helps keep him positive. The saying is never really explained, but at times is comical, others sad, and others poignant. Right now, it just seems appropriate and perhaps a little abrupt, but I’m all out of words:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Excelsior.&lt;/em&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Steve Yegge's Next Big Language Revisited</title>
   <link href="http://lebo.io/2015/03/02/steve-yegges-next-big-language-revisited.html"/>
   <updated>2015-03-02T00:00:00+00:00</updated>
   <id>http://lebo.io/2015/03/02/steve-yegges-next-big-language-revisited</id>
   <content type="html">&lt;p&gt;Good old Steve Yegge. For several years from time to time you’d get one of his rather opinionated, well-informed, and always entertaining blog posts on topics relevant to anyone doing computer programming. He’s been relatively quiet for several years now, but I’ve always thought one of his most memorable pieces was &lt;a href=&quot;http://steve-yegge.blogspot.com/2007/02/next-big-language.html&quot;&gt;The Next Big Language&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;He wrote that just over seven years ago (wow), and although things have not turned out quite as he expected, and it has never been clear whether he had an existing language in mind or was just spitballing, I think he was close enough on the mark to an existing and still growing dynamo to make this worth revisiting.&lt;/p&gt;

&lt;p&gt;I’ve done work in multiple languages, dabbled from time to time in creating my own as all young people do, and I consider myself a polygot and not much of a fundamentalist about the programming language I’ll use. While I’d prefer something semantically and syntactically clean and beautiful like &lt;a href=&quot;https://ioke.org/&quot;&gt;Ioke&lt;/a&gt;, my real concerns center around performance, libraries, expressivity, and community. If a language is too lacking in one of those, I’ll look somewhere else. And there are languages I refuse to touch because, quite simply, I have standards.&lt;/p&gt;

&lt;p&gt;I’ve used Python as a steady and reliable workhorse for years, and while there are numerous libraries I adore like &lt;a href=&quot;http://flask.pocoo.org&quot;&gt;Flask&lt;/a&gt;, &lt;a href=&quot;http://www.djangoproject.org&quot;&gt;Django&lt;/a&gt;, &lt;a href=&quot;http://www.crummy.com/software/BeautifulSoup&quot;&gt;BeautifulSoup&lt;/a&gt;, &lt;a href=&quot;http://docs.python-requests.org/en/latest&quot;&gt;Requests&lt;/a&gt;, Python is an inherently conservative language. Someone once explained that to me in terms of Guido Van Rossum and the Dutch drive for conservative practicalism, but as much as I like the sound of that, I have no idea if it is bullshit. What I do know is that with the exception of &lt;a href=&quot;http://pypy.org&quot;&gt;PyPy&lt;/a&gt; (which has been around for several years and never gained real traction), Python isn’t going to get super performant any time soon. It also doesn’t currently deal with the modern web (async, concurrency) as cleanly as I’d like. I know there is some work in the area, but it isn’t the out-of-the-box solution you’d want to see. There’s also the very slow evolution from Python 2 to 3, which isn’t really concerning, but does make you pause and wonder if the userbase is always going to be split between the two.&lt;/p&gt;

&lt;p&gt;So I’ve been looking for a language to replace Python. I tried Javascript and found callbacks to be a crime against humanity, found a better concurrency model in Go, but found rather simple things that it couldn’t express and Python could. I love Clojure as a Platonic idea, but find the JVM, Maven, and the associated ecosystem a bit heavy for my tastes. Oh, and I know if anyone actually reads this post, they are going to ask “Why not Haskell?”, and my response is that Haskell is a great language but it isn’t going to become a mainstream language any time soon (or ever). Sorry. That aside, within the last few months, I’ve seen enough movement within the Javascript (wait….let me explain) community, and used it enough myself to make me think that Javascript is the closest thing to Yegge’s NBL, and not only that, but if you are paying attention, there are signals all over the place that it will be &lt;em&gt;the&lt;/em&gt; dominant language within five years, and not a horrible one at that.&lt;/p&gt;

&lt;p&gt;Now let’s get back to Yegge’s original article, going through his points one by one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NBL does not replace C++&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m not going to delve into this really far, but Steve’s point here is that while some people don’t need garbage collection, most programmers aren’t operating under that constraint, and the next big language will have garbage collection, because in the vast majority of cases it makes your life easier. This has been known for decades, so nothing new. Now, if we want to replace C++, there’s always &lt;a href=&quot;http://www.rust-lang.org&quot;&gt;Rust&lt;/a&gt; and &lt;a href=&quot;http://nim-lang.org&quot;&gt;Nim&lt;/a&gt;…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NBL isn’t about winning beauty contests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If your goal as a language designer is to design a language that meets your own personal sense of aesthetics, then you’re an artist, and I salute you. For my part, I’m looking for the middle ground between hard-nosed I-don’t-care pragmatism (in which case you go ugly early, use Java or C++, and be done with it) and idealistic better-world optimism. And I think a lot of other people are too.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He gets into even more detail with this later, but he’s absolutely right: Io, Ioke, or whatever other beautiful and conceptually-pure language isn’t blowing up any time soon, so a trade-off will have to be made. I think Yegge just invoked Nixon’s “Great Silent Majority”. You could say Nixon had some issues, but ignoring the politics of that statement at that time, the Great Silent Majority of programmers aren’t snobs, idiots, or language partisans, they just want something that will get the job done, and they’ll use the best tool they are aware of and comfortable with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #1: C-like syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;C(++)-like syntax is the standard. Your language’s popularity will fall off as a direct function of how far you deviate from it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;There’s plenty of wiggle room in the way you define classes and other OOP constructs, but you’ll need to stick fairly closely to the basic control-flow constructs, arithmetic expressions and operators, and the use of curly-braces for delimiting blocks and function bodies.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is because programmers are lame, but hey, it’s your target audience. Give the people what they want.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yep, that sounds like Javascript. Javascript has a few ugly parts. I wish semicolons were completely unnecessary, ala Ruby. Functions prior to the fat-arrow syntax in ES6 (for those unaware, ECMAScript is the official name of Javascript, 6 is the version) were verbose. However, Javascript firmly falls within the C class of languages syntactically. Anyone who has used C, C++, Java (in other words, the vast majority of programmers), will feel at home. You also avoid the incessant debate over whitepace you find in Python or Coffeescript, and the immediate rejection that some otherwise beautiful languages like Clojure face.&lt;/p&gt;

&lt;p&gt;To make a deeper point about how much this can matter, while I had my own reservations about Clojure and lisp-style syntax (or lack of it), I got over it pretty quickly and appreciate it for its own benefits now. However, that same irregular syntax is part of what keeps me away from it, not because of my own feelings, but because as Yegge says, programmers are lame. A lot of people will reject a language immediately for something as superficial as that. We are human beings, superficial rejection is nothing new. And it is a damn shame, because Clojure is one of the most well-thought and well-designed languages in existence. Rich Hickey is brilliant.&lt;/p&gt;

&lt;p&gt;Syntax is one of Javascript’s blandest parts, but this semi-weakness is actually a great strength.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #2: Dynamic typing with optional static types.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Adding in optional static types is the ideal solution. It helps with performance, it helps with code reliability and (possibly) readability, it helps IDEs navigate your code, and most importantly, it helps combat the incredible FUD that dynamic languages inspire in people who come from static backgrounds.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It should be pretty obvious that dynamic + optional static types is a better approach than static + optional dynamic features. The latter is premature optimization, plain and simple: the root of all evil.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I think these statements will make users of some static languages go nuts (no pun intended), but the gist is correct. Dynamic languages are really simple and fun to start with because they are so free-flowing. There’s much less friction. Javascript takes this to a bit of an extreme with its weak typing, but the simple expressivity it has is very much appreciated. It is a great beginning language (especially with the immediate feedback you can get with the browser), and it is easy to adapt to. If you have some experience with any other modern (and not-so modern) language, you can adjust to it quickly.&lt;/p&gt;

&lt;p&gt;What about optional static types? While nothing has been standardized, Microsoft’s &lt;a href=&quot;http://www.typescriptlang.org&quot;&gt;Typescript&lt;/a&gt; is already very usable, and Facebook’s &lt;a href=&quot;http://flowtype.org&quot;&gt;Flow&lt;/a&gt; accomplishes a similar task as a layer above the language. These features are necessary for large codebases with many contributors (at least many people fervently believe this, right or wrong), and Javascript is being used at such a scale that even if static typing is never standardized, these tools and alternatives will continue to get better and more varied.&lt;/p&gt;

&lt;p&gt;Additionally, they are things you can incrementally work into as a young programmer, which makes them even more useful. They aren’t an all-or-nothing thing. Static type systems have to carefully balance expressive power, simplicity, and staying out of the way. Dynamic type systems naturally do that, their problem is settling down. Optional types enable stability after experimentation. Frankly, it is a bit surprising that this Holy Grail of programming is only really now seeing fruition in a dynamic language.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As a special sneak preview, its static type system will include a “standard” class system (i.e. the kind you’re used to if you do any conventional OOP using C++ or Java or Python or whatever, as opposed to Common Lisp’s object system or some other unconventional one.) Not that the standard system is any better, but it’s what people want.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Javascript’s prototype system has been used to emulate classes for some time now, but ES6 actually standardizes the syntax. Some people hate it (“Get your Java out of my Javascript!”), but it is what people are used to, and undoubtedly helps with standarization across codebases. Just as importantly, it makes the shift from Ruby, Python, Java, and numerous other OO languages very easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #3: Performance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NBL will perform about as well as Java. That means if it’s one of the big existing dynamic languages out there, something major is going to have to happen with performance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’m sure I could find some benchmarks online that would speak to this, but I’m hesitant to do so. There’s that great Mark Twain line (or at least attributed to him) about “lies, damned lies, and statistics”. I do know that just due to time and work on the JVM, as well as Java’s static nature, it is very unlikely that Javascript is as fast as or will be as fast as Java any time soon (Self, LuaJIT, and Javascript itself show you can get close). But even that is not necessary. You just need fast enough, and the fact that people have been using Python or Ruby (happily) speaks to that.&lt;/p&gt;

&lt;p&gt;However, why are so many people using Javascript on the serverside right now, anyway? Because they hear that Node and Javascript are fast. Compared to most other dynamic languages, this is objectively true. This stems from one of the great advantages Javascript has over pretty much every other language. Millions of people are depending on it through their browsers, and numerous companies are tyring to reach those same people. They all benefit from it being performant. So you’ve got Microsoft, Mozilla, Google, Facebook, and several other companies pouring thousands of hours and millions of dollars into making it as fast as possible. Nothing else is getting that kind of support. This isn’t relevant to just performance, it is relevant to new features, it is relevant to libraries, tooling, etc. This advantage cannot be overstated, and it is not going anywhere because browsers are so reliant upon the language. We have COBOL code running on mainframes right now. We’ll have Javascript running on websites 50 years from now, even if we have long since moved on to something else.&lt;/p&gt;

&lt;p&gt;Oh, and what happens if optional typing gets used more than a linter and safety and is actually utilized for performance? Google’s &lt;a href=&quot;https://developers.google.com/closure/library&quot;&gt;Closure&lt;/a&gt; library already can benefit from type annotations. &lt;a href=&quot;http://asmjs.org&quot;&gt;asm.js&lt;/a&gt;, while not intended as a user-level part of the language, takes this even further. With additional type information, Javascript will only get faster and faster. It might even truly challenge Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #4: Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So NBL will have great tools. They might not be Java-great on Day One of NBL’s reign, but they’ll be a lot better than the options available for Perl/Python/Ruby/Tcl and the rest of the popular dynamic languages out there today.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’ll be honest: I’m the kind of guy who opens vim and codes with minimal tooling (I’m not sure I’ve ever used a real debugger), so I can’t comment on this point with any real knowledge. However, go back to Rule #3, see what I said about the ongoing work by numerous companies, and apply it here, again. You’ve already got things like source maps which make compile-to-js languages much easier to debug. You’ve got great inspectors and debuggers for browsers. npm, while not a tool in Yegge’s use of the word, is also one of the better and more integrated package managers. Editors will continue to get better and better with Typescript/Flow integration. It is a simple rule: the more people that use your language, the more tools there will be, the better tools will be. Things which have taken years to build in other languages due to relatively small communities or lack of corporate backing are all over the place in JSland. You have some of the premier tooling companies working on it already.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule #5: Kitchen Sink&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Word on the street is that all languages are evolving towards each other. It’s another way of saying they all have feature envy. So NBL is going to have to play along.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yegge lists 18 features which he considers “ad-hoc standards”. Some features, like destructuring, standard OOP with classes, iterators and generators, list comprehensions, namespaces and packages, and keyword and rest parameters have all landed in ES6. In other words, Javascript has grown up. This should both tell you how lacking JS was in certain features prior to ES6, as well as how quickly the language is improving. He mentions function literals and “non-broken closures”, JS has always had fine closures (less limited than Python for example), but the fat-arrow syntax has really, truly made them usable and convenient (and fixed the binding of &lt;em&gt;this&lt;/em&gt;). He mentions cross-platform GUIs, which counting the browser is perhaps more true for JS than any other language. That is not even considering work on projects like &lt;a href=&quot;http://www.youtube.com/watch?v=KVZ-P-ZI6W4&quot;&gt;React Native&lt;/a&gt;. First-class parser and AST support certainly exist due to the use of JS as a type of web assembler, and object-literal syntax for arrays and hases is something we all use: JSON.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Additionally, NBL will have first-class continuations and call/cc. I hear it may even (eventually) have a hygienic macro system, although not in any near-term release.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;His mention of continuations and call/cc are what suggest he had an existing (but still in development) language in mind more than anything else. They seemed, even in 2007, as an odd inclusion considering that languages were moving away from them as a feature (“big” languages they were a part of only included Smalltalk, Scheme, and Ruby, and only Ruby was really in the spotlight at the time). JS has a macro system via &lt;a href=&quot;http://sweetjs.org&quot;&gt;sweet.js&lt;/a&gt;, and compile to languages could be seen as macro systems in and of themselves assuming they don’t choose to include their own.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Not sure about threads. I tend to think you need them, although of course they can be simulated with call/cc. I’ve also noticed that languages with poor threading support tend to use multiprocessing, which makes them more scalable across machines, since by the time you’ve set up IPC, distributing across machines isn’t much of an architectural change. But I think threads (or equivalent) are still useful. Hopefully NBL has a story here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;GvR and the Python community have been advocating IPC for a long time due to the Global Interpreter Lock. &lt;a href=&quot;http://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/basic_usage&quot;&gt;Web Workers&lt;/a&gt; are something similar for Javascript. I personally like Python’s &lt;a href=&quot;http://docs.python.org/2/library/multiprocessing.html&quot;&gt;multiprocessing&lt;/a&gt; library which gives IPC the same API as interacting with threads, but they obviously aren’t directly equivalent and true threading would be useful. JS’s asynchronous nature helps in some situations where threading would be used, but it seems inconceivable that a better solution won’t be found over the next few years. Again, the advantages of competition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule 6: Multi-Platform&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NBL will run, at a minimum, both standalone and on the JVM. I’m not sure about plans for .NET, but it seems like that will have to happen as well.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And there are two other platforms that NBL will run on which, more than anything else, are responsible for its upcoming dominance, but I’d be giving away too much if I told you what they were.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;JS certainly runs standalone on &lt;a href=&quot;http://nodejs.org&quot;&gt;Node.js&lt;/a&gt; or &lt;a href=&quot;https://iojs.org&quot;&gt;io.js&lt;/a&gt;. It also runs in numerous browsers and because it is designed to be embedded does and will run in numerous areas you wouldn’t expect it (and perhaps should not). There’s &lt;a href=&quot;http://www.mozilla.org/rhino&quot;&gt;Rhino&lt;/a&gt; on JVM, Bob Foster in the comments pointed out that &lt;a href=&quot;http://openjdk.java.net/projects/nashorn&quot;&gt;Nashorn&lt;/a&gt; is coming with JDK 8 (thanks, Bob), and having done a quick google, there are numerous projects to run JS on .NET, though how far along they are or which one is the dominant project is unclear to me.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The features I’ve outlined don’t make NBL a great language. I think a truly great language would support Erlang-style concurrency, would have a simpler syntax and a powerful macro system, and would probably have much better support for high-level declarative constructs, e.g. path expressions, structural dispatch (e.g. OCaml’s match … with statement) and query minilanguages. Among other things.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is creepily close to &lt;a href=&quot;http://elixir-lang.org&quot;&gt;Elixir&lt;/a&gt;, though it faces the same difficulties of becoming a major language that many others have.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The features I’ve outlined are basically the minimal set of requirements for not sucking. At least off the top of my head; I’ve probably overlooked a few.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Okay, so JS doesn’t completely suck. Does that fill you with joy as a programmer? I think we all dreamed of spending our next few decades coding in a language that doesn’t suck (read: extreme sarcasm). On the other hand, we all really dodged a bullet there. Brendan Eich threw together JS in a few weeks; things could have been much, much worse.&lt;/p&gt;

&lt;p&gt;But…I’ll go so far to say that Javascript, against all odds, is actually getting good. ES6 added numerous important features, and most importantly, you can use them &lt;em&gt;right now&lt;/em&gt; with &lt;a href=&quot;https://babeljs.io&quot;&gt;Babel&lt;/a&gt;, which is a transpiler that both implements the standards and produces relatively clean code with support for source maps so that debugging is simple. I was also very pleased to see that it has support for Flow (again: static type checking), JSX for easy React templating/integration, and even some ES7 features like &lt;a href=&quot;https://github.com/lukehoban/ecmascript-asyncawait&quot;&gt;await&lt;/a&gt;, which pretty much completely removes the language’s heritage of callback hell.&lt;/p&gt;

&lt;p&gt;Regarding await, look at this code (shamelessly taken from a post by &lt;a href=&quot;http://news.ycombinator.com/user?id=rzimmerman&quot;&gt;rzimmerman&lt;/a&gt; on Hacker News):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;app.get('/', (req, res) =&amp;gt; {
  try {
    await user = db.get({user: req.user});
    res.send({user: user});
  } catch {
    res.send(400);
  }
});
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I can work with that.&lt;/p&gt;

&lt;p&gt;When you put it all together, what does this (the dynamo that is Javascript) give you?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;one of the most performant dynamic languages&lt;/li&gt;
  &lt;li&gt;optional static typing/checking&lt;/li&gt;
  &lt;li&gt;a massive ecosystem of libraries, easily accessible through npm&lt;/li&gt;
  &lt;li&gt;a genuinely exciting way to create UIs with React&lt;/li&gt;
  &lt;li&gt;an expressive and relatively good syntax which is both easy to adapt to and won’t drive anyone away immediately&lt;/li&gt;
  &lt;li&gt;decent and improving tooling&lt;/li&gt;
  &lt;li&gt;and to repeat it one more time….a foundation that will exist for years and years and only grow due to its importance to the browser…meaining the best and biggest companies are constantly improving upon the language, the ecosystem, and the tooling around it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hell, even when people aren’t using JS itself, this combination of factors makes it &lt;em&gt;the&lt;/em&gt; compile target, only entrenching it further. Python and Ruby might have more of a future compiling to and running as Javascript than they would on their own VMs. This certainly is the case for any number of niche and/or hobbyist languages. See &lt;a href=&quot;http://roy.brianmckenna.org&quot;&gt;Roy&lt;/a&gt;, &lt;a href=&quot;https://github.com/Gozalla/wisp&quot;&gt;Wisp&lt;/a&gt;, or &lt;a href=&quot;https://giothub.com/jaskenas/coffeescript/wiki/List-of-languages-that-compile-to-JS&quot;&gt;dozens of others&lt;/a&gt; as examples (tools like &lt;a href=&quot;http://jison.org&quot;&gt;Jison&lt;/a&gt; and &lt;a href=&quot;https://github.com/estools/escodegen&quot;&gt;escodegen&lt;/a&gt; make JS a great way to learn parsers and compilers, for the record).&lt;/p&gt;

&lt;p&gt;Yegge specifically stated that Javascript 2 (a different and dead standard) was not the NBL. However, if he were writing this post today, he might say that Javascript is the NBL. I personally believe that even if it is not currently, reading the tea leaves, it absolutely will be. This excites me a little more than it should. Not only does Javascript not suck, but the idea of semi-standardization on a solid language is something I have wanted for a long time.&lt;/p&gt;

&lt;p&gt;We can drop the &lt;strong&gt;Next&lt;/strong&gt; and just call it &lt;strong&gt;The Big Language&lt;/strong&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bitcoin Can Only Win By Losing</title>
   <link href="http://lebo.io/2014/08/29/bitcoin-can-only-win-by-losing.html"/>
   <updated>2014-08-29T00:00:00+00:00</updated>
   <id>http://lebo.io/2014/08/29/bitcoin-can-only-win-by-losing</id>
   <content type="html">&lt;p&gt;I should start this post by listing my Bitcoin “credentials”, if you will. While I never drank the kool-aid to the extent some have, I got quite excited by the notion of cryptocurrency towards the end of last year. Since then I have built a couple of proof of concepts based on it, one being a &lt;a href=&quot;https://github.com/aaron-lebo/dissent&quot;&gt;consumer-friendly DRM system&lt;/a&gt;, the other, a &lt;a href=&quot;https://github.com/aaron-lebo/updn&quot;&gt;Reddit-clone which uses Bitcoin for voting&lt;/a&gt;. I also turned a few thousand dollars into over $35,000, and then subsequently lost all but $200 through speculating on cryptocurrencies. This last incident caused me to take a step back, and it has allowed me to see Bitcoin a bit differently.&lt;/p&gt;

&lt;p&gt;For many critics and proponents of Bitcoin, it is very hard to look at the matter with any objectivity. Critics can’t see the potential that Bitcoin has as a technology because all they see is something that looks like a pyramid scheme and a community that has seen numerous scams such as &lt;a href=&quot;http://online.wsj.com/articles/mt-gox-head-believes-no-more-bitcoin-will-be-found-1403850830&quot;&gt;Mt. Gox&lt;/a&gt;. For proponents of cryptocurrencies, many are very vested both ideologically and emotionally, and some have major financial attachments. The community already has an us-versus-them attitude due to some very strong opinions about the financial system, and this all culminates in a community which lives in a bit of a bubble (no pun intended, really).&lt;/p&gt;

&lt;p&gt;The ideology behind Bitcoin, and indeed the politics for many supporters, is very libertarian. There’s a rejection of the government and corporate controlled monetary system, and a desire to replace it worldwide with something that is decentralized and puts people in control of their privacy and money. This is all very much up for debate but the last part is laudable: it is a desire to empower individuals. None of this is new information for those who have paid any attention to the subject, however, one point that is often overlooked by proponents is that Bitcoin can only succeed as a technology if it loses the ideology and much of the advantages it has in the first place. If this is the case, one might ask, what is the point?&lt;/p&gt;

&lt;p&gt;Bitcoin currently sits in a grey area, both legally and in terms of adoption. Legally, people want to use it as a currency (and do) but &lt;a href=&quot;http://en.wikipedia.org/wiki/Legality_of_Bitcoin_by_country&quot;&gt;the IRS treats it as property&lt;/a&gt;. In terms of adoption, Bitcoin isn’t just a nascent movement, retailers like Newegg and TigerDirect accept it, and even some charities and political parties have jumped onboard for donations. Despite this, Bitcoin hasn’t seen widespread adoption at a consumer level: the people purchasing things with Bitcoin are a relatively small group of early adopters.&lt;/p&gt;

&lt;p&gt;There are perhaps two things which stand in the way of the average consumer using Bitcoin. The first is obtaining Bitcoin. While there are sites like &lt;a href=&quot;https://localbitcoins.com/&quot;&gt;LocalBitcoins.com&lt;/a&gt; which allow you to find people to exchange cash for it, this doesn’t work for much of the populace for the obvious reasons of convenience and security. The safer, simpler, though not necessarily more convenient route is to use a service like &lt;a href=&quot;https://coinbase.com/&quot;&gt;Coinbase&lt;/a&gt;. After providing a certain amount of personal information, a user can then purchase Bitcoin legally after a set period of time.&lt;/p&gt;

&lt;p&gt;Once someone has purchased Bitcoin, the second issue is figuring out where to store it. Anyone can download the Bitcoin software and host their own wallet on their computer. However, this wallet, just like any other file, is then vulnerable to loss or theft. If your wallet is not properly secured and backed-up, then you can literally lose a few thousand dollars worth of value just by deleting said file or a hacker gaining access to it. When many people have pretty low computer-literacy, this is problematic for adoption.&lt;/p&gt;

&lt;p&gt;However, Coinbase can host your wallet for you, which puts much of the responsibility on their shoulders, and at this point they become much like a Bank of America with a smaller set of services available to the consumer. Importantly, due to the level of regulations (perhaps necessary when you see incidents such as Mt. Gox), the only entities that can legally serve as exchanges and vaults are those that already have money and/or political clout. If this convenience and safety is necessary for mass adoption (and it almost certainly is), then Bitcoin will go from being a decentralized technology to one that sees most of its traffic through larger third-parties. (1) We could imagine Coinbase becoming a well-known insitution and existing banks adding Bitcoin banking to their list of services. It is worth noting that the free Bitcoin protocol would at least still exist and thus allow interoperatibility, but it also is quite likely that these third-parties would quickly build properietary services on top of the protocol.&lt;/p&gt;

&lt;p&gt;To me this suggests three possible futures for Bitcoin:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Mass adoption of the protocol, with large third-parties and existing financial institutions dominating the scene and adding their own features for lock-in.&lt;/li&gt;
  &lt;li&gt;Bitcoin continues to stay in a grey area of adoption, never really catches on, and slowly becomes somewhat of an afterthought.&lt;/li&gt;
  &lt;li&gt;Due to continued fears of terrorism or a lack of concern for privacy, Bitcoin actually is made illegal and is used solely for black markets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Future three is by almost any measure a complete failure. Future two is not as dire, but not nearly as far-reaching as proponents hope. And then there is the first future in which Bitcoin “wins” and ends up adopted as proponents are hoping, but it ends up having almost no impact socially and culturally, and certainly is not the ideological success and extreme decentralization that some dream of. (2) If this is the case, then really, what is the point? Is the world any better off with a cryptocurrency dominated by the existing financial system? Just as important, from a technical standpoint, is such a system any better than what already exists? Is it perhaps worse when you consider the wasted storage and energy used by the blockchain?&lt;/p&gt;

&lt;p&gt;It is for this reason that I believe that Bitcoin is likely doomed as a currency. It will either exist as part of the system with its basic goals stripped away, or it will exist outside of the system, kept alive or remembered only by a small group of fervent supporters. While the technology may not work well as a currency, similar ideas that harness decentralization, but aren’t focused on being a currency, such as &lt;a href=&quot;http://www.ethereum.org&quot;&gt;Ethereum&lt;/a&gt;, may have a more realistic chance. Currently, supporters are perhaps unrealistic about what can realistically be and even should be decentralized, but the core application is a powerful one, and goes back to perhaps the original ethos behind Bitcoin: put power in the hands of the people.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Much of the mining power on the Bitcoin network already is centralized and is becoming more so, which is a problem of its own kind.&lt;/li&gt;
  &lt;li&gt;The big winners in this future are the early financial adopters - perhaps explaining why they are the most excited.&lt;/li&gt;
&lt;/ol&gt;

</content>
 </entry>
 
 
</feed>
