Live data from Hacker News

Ten predictions (2004)

sites.google.com

211–220 of 324 posts

Re: Ten predictions (2004)

#211

Earlier quoted context omitted.

To whom did 'functional' mean the same thing as 'lisp'? I'm always astonished when people conflate these two things. Lisp encourages you to put the forms that evaluate to a value in the position you would otherwise put a variable that has been set to that value, sortof code in place. That is kindof like functional programming. However, lisp does not avoid side effects or mutability, in fact virtually all operators in…

That's an interesting point about infix and postfix calculators but no prefix calculators. Though I wouldn't go so far to say there aren't any, I feel pretty sure I've seen one before--though don't care enough to go looking--they do seem pretty rare. I wonder what lisp/scheme/whatever-I-need-to-say-to-get-you-to-stop-being-pedantic would look like with post-fix evaluation.

I think it would be not that much better than prefix.

Infix is easier to read, because it is just more natural to parse. An expression like:

sin(1 + (5 + x + y) / (n + k)) is just really easy to understand

(sin (+ 1 (/ (+ 5 x y) (+ n k))) is inscrutable, at least to me.

The second thing is, intermediate variables makes code much more readable, but lisp strongly discourages this. The only way to create a lexical variable is with LET. But this causes indenting, which is pretty ugly. In fact, the use of indenting for both logical nesting and variable creation is a really nasty thing:

so this:

    def qualifies_for_free_shipping(item_price, weight, shipping_factor, category):
        if category is in FREE_SHIPPING_CATEGORIES:
            return True

        item_cost = item_price * TAX_RATE
        shipping_cost = weight * shipping_factor + 2.00
        total_price = item_cost + shipping_cost

        if item_cost >= 80:
            return True

        if total_price >= 100 and category in ELECTRONICS_CATEGORIES:
            return True

        return False

becomes, in some lisp dialect I am making up but is like common lisp

    (defun qualifies-for-free-shipping (item-price weight shipping_factor category)
      (if (in category FREE_SHIPPING_CATEGORIES)
        t
        (let* ((item-cost (* item-price TAX-RATE))
               (shipping-cost (+ (* weight shipping-factor) 2))
               (total-price (+ item-cost shipping-cost))
          (if (>= item-cost 80)
            t
            (if (and (>= total-price 100) (in category ELECTRONICS-CATEGORIES))
              t
              nil)))))

I could have cleaned up the code and used a better conditional than nested if's or something, but this is my point. I can't just glance at the code and see what is going on, I have to parse it and keep track of where I am as I move around the s expressions. In the python version I can just jump in the middle and move around without keeping a mental bookmark, because I always know from indentation how I can get to where I am now.

Re: Ten predictions (2004)

#212
post #79

Earlier quoted context omitted.

> 9. Apple's laptop sales will exceed those of HP/Compaq, IBM, Dell and Gateway combined by 2010. Hm... If you count tablets as laptops, then yes, way way way yes.

Why would you do that?

Curious, not to be rude, why wouldn't you do that?

The tablet, as we see it today, really wasn't even a thing back when this article was written. Certainly not in the way that it is today. It's been a while since I've been in a 2004 mindset; but, if we consider a tablet as a 'large (as in not phone), mobile computer', then tablets certainly fit the bill. If we're thinking of a laptop as mostly a consumption device, then it still fits the bill. Even now, with the Tablet PCs that are now coming out; as well as all the productivity software that exists on the various tablets (including ssh clients), tablets are continuing to fill the place that laptops used to.

Re: Ten predictions (2004)

#213

Earlier quoted context omitted.

That's an interesting point about infix and postfix calculators but no prefix calculators. Though I wouldn't go so far to say there aren't any, I feel pretty sure I've seen one before--though don't care enough to go looking--they do seem pretty rare. I wonder what lisp/scheme/whatever-I-need-to-say-to-get-you-to-stop-being-pedantic would look like with post-fix evaluation.

I think it would be not that much better than prefix. Infix is easier to read, because it is just more natural to parse. An expression like: sin(1 + (5 + x + y) / (n + k)) is just really easy to understand (sin (+ 1 (/ (+ 5 x y) (+ n k))) is inscrutable, at least to me. The second thing is, intermediate variables makes code much more readable, but lisp strongly discourages this. The only way to create a lexical varia…

Your argument amounts to "I know Python better than Lisp." And it may be true that because most languages and especially most popular languages are like Python that you have a head start. But it doesn't mean that Lisp is insensible or harder to read. It just means you have less experience reading it.

I say this as a decent Haskell programmer, and a very poor Lisper. There was a time I found Haskell code so unbelievably befuddling I thought it was a prank. Now I know it, so I know what to expect and I can read it as easily as Java. Lisp remains harder for me, like you, but it's a matter of practice.

Re: Ten predictions (2004)

#214

Earlier quoted context omitted.

>> 6. Oh come on, facebook, youporn, whatever. As I said, too vague. Yeah, so he didn't call out a specific "type" of socializing, or draw up the wireframe for facebook here. But he just recognized there is a huge trend of people wanting to share their lives and communicate in near real time. I think he nailed it. Facebook and twiiter are just that. Even look at his move example. These days, you watch you movie or TV…

Facebook already existed with over a million users when he wrote this.

Perhaps, but they were all in college, it was a very different FB. This article was written my sophomore year of college, and I hadn't even had a FB account yet.

Re: Ten predictions (2004)

#215
post #138

Earlier quoted context omitted.

Github is not an open source webapp. It's a closed source web app that hosts other people's open source apps (web and not).

Github hosts git repositories. Git is open source.

Github does a metric f%ckton more than hosting git repositories.

Re: Ten predictions (2004)

#216
post #199

Earlier quoted context omitted.

JSON is basically XML with 50% less bullshit. I don't get this. XML has the capacity of being as simple as you want it to be. You don't need schemas, namespaces, xpath, and so on, and can make your XML life every bit as easy as JSON. In many ways easier given that JSON doesn't even have a bloody date or time type. But if you do want strong-type validation, schemas and namespaces are there for you. If you want an easy…

1. JSON has an easy way to specify data types. In XML you have to have multiple nested tags. In JSON my document can be: {"mynumber" : 5, "mylist" : ["one", "two", "three"]} Simple, neat, and fits on one line. In XML this has to be 5 one two three Of course, I don't know what you're talking about "JSON doesn't even have a bloody date or time type" when XML doesn't have anything but strings. In order to parse this, I'…

You are a bit outdated, tooling is a bit better nowadays.

Java integrates everything you need to parse and generate XML. Most API are XSD driven (either through annotation in the code, or with the mapping code generated from the XSD), so you get plenty of types like data, int, ... You also get streaming parser (pull or push) and DOM.

Obviously, that is no longer plain XML, that is XML + XSD + Namespaces.

The J2SE (not JEE) also has built-in support to expose and consume webservices, without requiring to worrying about WSDL and the rest.

At the end of the day, that does not mean that dealing with XML is a great experience. Most real life XML is awful. And well although the basic tooling is there, that is in the usual java fashion with factories of factory of creator of generator and very little "high level" utility.

Re: Ten predictions (2004)

#217
post #199

Earlier quoted context omitted.

JSON is basically XML with 50% less bullshit. I don't get this. XML has the capacity of being as simple as you want it to be. You don't need schemas, namespaces, xpath, and so on, and can make your XML life every bit as easy as JSON. In many ways easier given that JSON doesn't even have a bloody date or time type. But if you do want strong-type validation, schemas and namespaces are there for you. If you want an easy…

1. JSON has an easy way to specify data types. In XML you have to have multiple nested tags. In JSON my document can be: {"mynumber" : 5, "mylist" : ["one", "two", "three"]} Simple, neat, and fits on one line. In XML this has to be 5 one two three Of course, I don't know what you're talking about "JSON doesn't even have a bloody date or time type" when XML doesn't have anything but strings. In order to parse this, I'…

Your ideas about Java and XML are very dated. JAXB makes it essentially transparent to convert an object to XML and back, and with JAX-RS I can give you a REST API that returns XML or JSON, your pick, for basically no effort on my part. These are part of the Java EE 6 web profile, so basically everybody gets them for free. Most of us don't "install libraries" anymore so much as add four lines to our Maven POMs.

Point #2 isn't very strong. Every language has good support for both technologies these days.

Point #3 is absurd. If you know JS and you know HTML, you're not far from the basics of XML. If you're contemplating JSON as a replacement, you're either assuming our poor web developer is really stupid or you're comparing apples to oranges.

In general, your argument here is that JSON is shorter and more popular. Sure. But unless your top concern is bandwidth (hey, maybe it is) there might exist other technical reasons to make the choice which are less childish.

Re: Ten predictions (2004)

#218
post #152

Earlier quoted context omitted.

> We got NoSQL (esp. JSON based ones) instead of XML. Close enough though. JSON is basically XML with 50% less bullshit. It does less but it does it so much more elegantly than XML - and has the further benefit of a syntax similar to that of structured data in such languages as Javascript (duh), Python and Ruby - that it was a shoo-in to squeeze XML out of most non-enterprise uses, at least on the data transfer forma…

Have you tried Django's ORM? From what I understand its not perfect, but for the most part it really rocks.

I've been working with Django for 5 years, and I would say Django's ORM is pretty pedestrian, when not downright painful. It fails at simple things like allowing you to GROUP BY without falling back to SQL.

Re: Ten predictions (2004)

#219

1. XML databases will surpass relational databases in popularity by 2011. We got NoSQL (esp. JSON based ones) instead of XML. Close enough though. 2. Someone will make a lot of money by hosting open-source web applications. Github is cool but with all the cheapskate web devs (no offense, I am one of them) I don't think it is _that_ profitable. 3. Multi-threaded programming will fall out of favor by 2012. Not really.…

Github is cool but with all the cheapskate web devs (no offense, I am one of them) I don't think it is _that_ profitable.

It must be. Github raised 100m from investors led by Andreesen Horowitz in 2012. You don't get that kind of funding from that level of quality investors without a seriously good financial trajectory.

Re: Ten predictions (2004)

#220
post #84
post #60

Earlier quoted context omitted.

Nah, mainstream social networks are new.

Yeah, if you're living a decade ago. By 2005, MySpace was such a big deal that if you were a student without one, you'd feel like you were missing out on something important socially, and by 2008, Facebook had pretty much everybody, including grandparents, as a user. Nowadays the center is shifting again, and most of the people I know have started using Tumblr as their social locus, but it probably won't overtake FB.…

> by 2008, Facebook had pretty much everybody, including grandparents, as a user.

Not in my circles... Facebook didn't even begin to pop up on my radar until 2009. Social media adoption is extremely dependent on where you live and what type of people you know. Generalizations based on personal observation are invariably going to be wrong.

To add some actual data to this: in February 2009, Facebook had recently surpassed 175 million users[1]. It's now got a billion. So 2008 is definitely too early to place your "pretty much everybody" statement.

[1] http://www.insidefacebook.com/2009/02/14/facebook-surpasses-...

Post reply on HN