HN user

amadiver

413 karma
Posts5
Comments89
View on HN

don't stay there, go somewhere else, and tell everyone you know

You might be very comfortable sharing the story about the situation, but I hope you can appreciate that not everyone else would be.

Pretty neat. Mirah is to Java as CoffeeScript is to JavaScript?

Looks very similar to ActionScript 2, with shades of Scala. Really neat looking language.

Anyone know where the `param: Type` (i.e., parameter name colon type) convention came from? I've seen it more frequently lately, and I wonder if it's easier to parse than Java's `Type param` (or my favorite: `param Type`)?

I think you approached this article with a different set of expectations than I had. It felt like a personal essay early on for me. I don't think it's meant to be an empirical distillation of the ways in which a few cultures are different from one another. I found it to be elucidating in the way that a standup comic might be (I recognize the pattern, but never thought of it concretely; e.g., 'Guys always leave the seat up.') Maybe you have a more broad exposure to different cultures than I have.

A wiki on cultural differences is a really good idea, though.

I expect to burn some karma for this, but there's another extant pocket of optimization driven development: banner ads. If there is such a thing as a "good" banner ad, I'm referring to those (unobtrusive, non-autoexpanding, subtle animations resulting from interaction [no seizure-inducing manic blinking]). Good banner ads use almost no bandwidth (15k-40k) and go easy on the user's processor. They are built for big companies who care about their reputation and trafficked by platforms that respect the user.

I don't get to build as many of them as I once did, but they're incredibly fun little puzzles to solve. Cramming largish photographs, animation, copy (including fonts, which usually result in the bulk of filesize), and animation into such a tiny package is no small feat, and requires a lot of time (the productivity tradeoff Jacques referred to) and tons of little optimization tricks you need to spend a few years collecting and perfecting, like:

* becoming a vector artist. Sometimes its necessary to have a partially transparent image, which means 32 bit PNGs, which are super expensive. Flash allows you to create vector masks (vector illustrations are incredibly size efficient), which means you can use a PNG-8 or JPG and mask out the areas that need to be transparent. Which means getting really good, and fast, at tracing outlines. The next level being

* learning how to do photo-realistic illustrations. In the old days of 12k for a banner, I did a lot of car banners, which meant a lot of car illustrations that needed to look exactly like the photos. Even then, you'd have to reuse your assets a lot, in creative ways, in order to make the filesize. (Like using a tire illustration for the windshield [by scaling and masking]).

* writing really tight code. In the early days, our basic animation engines were a few KB, but you could rewrite your own using only the chunks of code you needed, and save a few K. My newest library is about 800 bytes and is powerful enough to use on most of my banners.

* learning that people really aren't as detail oriented as you might think, and blurs, rotations, tints, and speed are usually all the tools you need to make a convincing animation

Is your only basis for feeling that people that like CoffeeScript don't "get" JavaScript the `class` syntax? If that's the case, it's a minor feature of CoffeeScript. I'd say the rest of the features it offers fall on the dynamic/functional side of things more than the strong+static typed/classical OOP side ( list comprehensions, splats, treating everything as an exression, etc.).

JavaScript and URLs 15 years ago

I'm saying kind of the opposite -- JS/HTML/CSS and Flash are now more similar than they are different. It's not the platform that's the problem. It's what you can do with (and how you can abuse) the platform.

JavaScript and URLs 15 years ago

> It doesn't but JavaScript and Skilled js devs can!

You might be overestimating the differences between Flash and JS here -- especially when you add HTML5 into the mix. What's to stop a skilled JS dev from playing <audio> when the user hits a page, burning processors with a few autoplaying <videos>, after forcing the user to sit through an interminable, animated <js/css3/svg> 'loading' screen? At that point, it's up to our own good tastes to decide how to wield that kind of power.

In case anyone's scared away by the format, it's an accessible, three-page, quick read. And it's really interesting. The author's approach of blending language survey with language construction is a strategy I've recently employed, and I've grown more as a programmer, more rapidly, because of it.

> From where should a justice system derive its just powers?

One possibility is where a plurality of constituents agree either on a course of action, or believe an individual is qualified to act in their best interest. Obviously, this system has flaws (what happens when an elected person behaves selfishly?), but I'd argue it's more fair, in general, than a self-selected group executing their own agenda. We can't vote Anon out of power if we happen to stop believing their actions are just.

> Why is mob justice any worse than a justice system that allows people to be held indefinitely with out charge?

It's not, but are you insinuating that it's okay to subvert an unjust justice system using any means necessary? Or any means that work? Or am I reading into this? I don't think the US justice system is so broken that it needs to be fixed by extralegal means, but maybe I'm naive.

> Would altering or abolishing a system that allows people to be held indefinitely with out charge be a good thing?

Altering that system would be a great thing! Abolishing it, I believe, would not. If you're suggesting anarchy as a viable replacement, I'm honestly curious if you can point to any examples of large-scale anarchy that worked well? Again, I might be reading too much into your question, and you might have meant simply replacing it with another system that is not anarchy.

Thanks for your reply.

I used to work for the internet arm of Condé in NYC in the mid aughts. The cafeteria was amazing; they'd have some big-deal chef in each week to work a lunch shift (though people would usually smoke instead of eating). The women there were also incredibly attractive -- it helped having Vogue in the same building. I have no idea what their San Francisco offices are like, but if they're anything like New York, it makes working there almost worth it. ...

almost...

Thank you -- it does. If it's not too much trouble, do you have any examples or anecdotes for when HTML made layout really easy, or scripting made layout really hard?

In my experience, there's a sweet spot for HTML/CSS. If I keep things really simple, it makes layouts a breeze. The moment I introduce complexity into the design, I usually wish I had the control of a scripted layout.

Could you expand on why you feel like building a UI in JS is a regression? Is this a popular sentiment? I really prefer working on layouts without manipulating markup, so I'm curious to why others feel different. Thanks!

`Bind` with named methods goes a long way to cleaning up nested callbacks. Here's a (quick+dirty; I know I'm missing some `do`'s in there) version of the same code in CoffeeScript:

  _ =
    fileMenu: ->
      mainWindow.menu "File", (e,f) => this.onFile(e,f)

    onFile: (err,file) -> 
      if err then throw err
      file.openMenu (e,m) => this.onOpenMenu(e,m)

    onOpenMenu: (err,menu) ->
      if err then throw err
      menu.item "Open", (e,i) => this.onOpen(e,i)
  
    onOpen: (err,item) ->
      if err then throw err
      mainWindow.getChild type('Window'), (e,d) => this.onDialog(e,d)

    onDialog: (err,dialog) ->
      if err then throw err
      #...

  _.fileMenu()
( `=>` is CoffeeScript for a function bound to the current scope )

Let's elevate this conversation beyond the usual conventional wisdom and rhetoric: Flash is not "demonstrably, prima facie" closed. Really, `tptacek`, it takes almost no independent search to come to a murkier conclusion.

Interestingly, while the Flash IDE is most definitely closed, the SWF file format and the tools to create SWFs... it's not so cut and dry. Here's the (Flash 10 SWF Spec)[http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf...]

There's probably a bunch of stuff left out that'd make implementation difficult, but that hasn't stopped:

(GORDON)[https://github.com/tobeytailor/gordon] -- an open source Flash runtime written in pure JavaScript . It only supports up to Flash v. 2; almost useless, but interesting.

Here's the (Flex SDK)[http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK] which includes the Flex framework, and a partially open source SWF compiler.

Apparently, Flex compiler isn't totally open source because of patents concerning audio and video codecs (I'm recalling this off the top of my head; please verify).

Here's (Tamarin)[http://www.mozilla.org/projects/tamarin/]. It's a VM for EcmaScript. It's been rolled into SpiderMonkey, the JS engine for FireFox, I think. It includes support for packages, namespaces, classes, and optional strict typing of variables. Really useful stuff for interactive devs that, unfortunately, hasn't been widely adopted.

Adobe contributes to WebKit on behalf of Flash & Air; I don't know what their contributions have been/how useful they are, though.

I'm a professional interactive dev, and I specialize in Flash, so you might conclude that I'd be biased, and I wouldn't blame you at all. However, as a Flash dev, I'm familiar with the non-marketed vectors of the Flash environment. Take that as you will.

We're geeks: let's all invest a little time to investigate the rhetoric. If you really don't like Flash, pick another reason: there are many ;)

I'm trying to parse all of this, but my understanding of Scala is shaky. Could anyone explain this statement -- I think it'd help a lot:

  sealed trait Option[+A] {
    def bind[B](f: A => Option[B]): Option[B]

(My best guess: define a trait named `Option` ... something about an object of type A ... really not sure of the +. Then define a function `bind` that ... something about type `B` ... which takes an argument of type `f`? and returns the argument wrapped in an Option?)

I'm a professional Flash dev, but I spend my after work time on CoffeeScript/JavaScript/HTML5/Node/MongoDB (♥ ECMAScript). There's definitely still a use-case for Flash. It's still faster for some stuff I do (in Webkit{Safari,Chrome}). ActionScript has some nice additions to ES that were unfortunately left out of JS going forward (classes/packages/implicit getters+setters, type enhancement). Adobe's doing some really interesting stuff with 3d+gpu http://labs.adobe.com/technologies/flash/molehill/

I don't blame people for statements like "Once such a WYSIWYG app exists, there'd be no excuses left to use Flash online". They're authoritative and are tapped into the zeitgeist. As an Interactive Dev, though, I hope my opinion can count as some kind of counterweight to what I sometimes view as polemic.

While no one ever claimed it, tptacek was correct in assuming people were thinking it. Or, at least, a person was thinking it.

I'm really glad to see a possible explanation for why Homeland Security would be cracking down on music blogs. While I don't agree with the DoHSs actions, I now have a foothold in understanding the situation. It may or may not be correct, but as a fairly logical interpretation of the scenario, it'll suffice.

I'm disappointed to see your fairly dramatic response (though I like the elipses and poetic linebreaks :) ) and 'yummyfajitas's pat response earn collectively more upvotes for delivering far less information (no offense).

The common use of "nonplussed" means exactly the opposite of the intended meaning. It may be wrong, but it's generally understandable in context. I'd argue "could care less" works the same way.