HNHacker News
TopNewBestAskShowJobs

anc2020

354 karma · joined September 26, 2008

submissionscomments
anc2020··on What is a functional programming language?
And quite relevant to this topic, our compilers and computers have (since the invention of Lisp and Scheme) gotten hugely better to the point where we can make much closer approximations to the lambda calculus such as the inclusion of lazy evaluation and immutability.
anc2020··on What is a functional programming language?
Lisp was by all accounts an attempt to make a working lambda calculus[1]. However the machines weren't very quick then and speed was a real issue. Even later on when Scheme was designed, speed was an important consideration, and it probably did affect the resulting language.

What the author was saying about TCO was that, based on the fact that all our machines today use stacks, and not wanting to have programs that break(!), any implementations of lambda calculus on these machines must have TCO to allow as much of the lambda calculus as possible to be available in the programming language, lest you reject otherwise correct programs.

But make no mistake, Lisp[2] and functional programming languages ARE based on the lambda calculus. The article really did hit the nail on the head.

--

[1] "Lisp was originally created as a practical mathematical notation for computer programs, based on Alonzo Church's lambda calculus."

-- Wikipedia (http://en.wikipedia.org/wiki/Lisp_%28programming_language%29)

(and lots of other sources agree with this)

[2] Sorry to say it, but Lisp isn't the center of the Universe. It's a cool trick, but it isn't that great.

anc2020··on Why we say yes to drugs
I'd disagree that the meaning of life is to have kids. Instead it seems like its just the best approximate solution to not to dying - pass on your DNA. To me the meaning of life is just to accept that you are alive and enjoy it as much as you can (which may involve trying to live as long as possible). Oh lord I just looked back at the title of this article - that's not what I'm suggesting :)
anc2020··on Ask HN: How do you see the future of computing ?
I don't mind the downvoting if I'm vastly wrong, but please could you explain why this would be wrong? A few people have upvoted me, so they might be interested in knowing why its wrong too.
anc2020··on You can go to the bathroom whenever you want at Microsoft
Lots of people are self-taught programmers. But there is a difference between people who taught themselves out of interest and those who taught themselves as a career move.
anc2020··on Ask HN: How do you see the future of computing ?
At some point surely all computers will be quantum, so that would have an effect if that's the case.

Edit: maybe its further away, but still worth thinking about.

anc2020··on Poll: Do you smoke marijuana?
Have smoked infrequently and enjoyed it, but can't see it as being useful for programming personally, so I'll vote no. I'd view it simply as a social drug like alcohol.
anc2020··on Ask HN: Why should we upvote or downvote a comment?
Upvote if you want the comment to appear higher up in the page of comments; Downvote if you want the comment to appear lower down in the page of comments and be a lighter shade of grey.

With the added warning that your actions will have an effect on the voting and commenting behaviours of other hacker news readers in the long term, but this will mostly align well with the above affects.

Edit: I should add that most people upvote differently on Hacker News than they do on Reddit, because of the second effect whereby they might not necessarily think a comment is rude, but if it doesn't add anything to discussion they will downvote in the hope that the comments in the long run will be more helpful.

anc2020··on The TED Augmented Reality Hoax
Swombat, wtf is your agenda? Yes, the audio is changed because the new one no longer has him saying "I've written a bunch software".

If you're trying to back up a friend, you're being way to obvious. This is definitely not overblown, taking credit for other people's work should be career changing and in the downwards direction.

*Edit: the change was really subtle too, go to 0:20 on the original

http://www.youtube.com/watch?v=6CRI3X0pjaU

anc2020··on The TED Augmented Reality Hoax
Erm, no.

Here you go:

> I'd like to believe it's an accident, but it seems like if I demoed Google with the TED logo slapped on it and accidentally forgot to mention that someone else wrote the search engine.

anc2020··on Someday we will all program in Python
Please consider my comment. Firstly, it was in response to this comment:

> That's pretty unreadable for someone who doesn't know clojure.

The real reason for commenting was to show that it is readable and yes, providing the "readable" Python equivalent.

There are two points - firstly, Clojure is (or is becoming?) a lazy language and the list type is different, so no they are definitely not exactly the same.

This brings us to a broader point in that even if you were to have laziness in Python it still wouldn't matter because I'm not the only coder in the world and there are a lot of Pythonists like the author of the article who do it the Pythonic way, which as already hinted, I think is just braindead.

anc2020··on Someday we will all program in Python
Is this better?

map(partial(reduce, +), partition(7, 7, daily))

Personally I'd be much much more happy to be using this code than the snippet in the article. In fact, I don't program Python regularly and it did take quite a while to figure out what was going on in the code.

weekly = [sum(daily[j:j+7]) for j in range(0, len(daily), 7)]

Now if you look back at the top snippet, its just normal function calls, so you can be happy to know what's going on after reading documentation for the names "partition" and "daily".

If you don't know what "map", "partial", "reduce" and "+" mean, sure you have to look up their documentation too, but they occur frequently enough that you can remember what they do after that.

The Clojure version is much more high level and less likely to introduce bugs.

Edit:

Oh and it should be said that "sum" is equivalent to partial(reduce, +) so I can now say:

map(sum, partition(7, 7, daily))

See? The code is just melting away before your eyes. Also note how I have literally no idea what either of the snippets do but am already happily changing one of them.

anc2020··on Ask HN: Would you guys visit a purely hacker-oriented version of HN?
Unfortunately it looks like Academic Hacker News ran out of steam (no new entries) :(

http://www.cs.toronto.edu:40106/

anc2020··on Why Google Bothered to Appeal a $761 Small Claims Case (and Won)
If I was Google, I would have been really annoyed too:

http://www.flickr.com/photos/rustybrick/3607264237/

anc2020··on A brazen ripoff of Twitvid
Seems a lot of people commenting are concerned about why they didn't buy the .com and how easy the app was to copy.

That's fine, but don't leave it as analysis done. twitvid.com is blatantly copying twitvid.io and that's wrong, end of story.

anc2020··on The Flimsy Doorknob & The Forgettable Receipt
Only got through the first half before my the flickering in my status bar was so irritating I had to stop reading. Sorry Dustin but if you're talking about user experience, please do not have my browser ajax your site every couple of seconds.
anc2020··on [dead]
Title is misleading, the problem had already been solved. Its a good story but please don't linkbait.
anc2020··on Ask HN: In which modern language/environment/framework is programming a joy?
Scheeeeme!
anc2020··on Thank you pg and rtm
Thanks for the explanation. I hadn't thought of the my-macro problem because I tend to think of macros exactly as a clever copy paste mechanism, so would expect it to always use public variables, but I guess some people might have a problem with that in some cases.

In the first point I was asking to be convinced that you can't have hygiene solely through the use of a package / module system and without needing multiple namespaces.

Although your workaround argument (for allowing variables to be shadowed) is convincing, in that case the package system wouldn't really be providing any safety at all and only the convention would be helping. I guess we can sum it up as CLers really don't see a problem at all, and Schemers require macros to be completely abstract.

anc2020··on Thank you pg and rtm
> Reading about finding and learning a programming language is like reading about an artist choosing a brush.

Wands are a much better metaphor to make. Or perhaps, what if you had a magic brush that could at any time be extremely fine or large or anywhere in between depending on how you felt? That would be some brush, especially when you compare it to the many medium sized brushes which aren't so fine when you need them to be.

Okay, so maybe the metaphor is still stretching a bit, but these are no ordinary brushes; they are worth writing about.

anc2020··on Thank you pg and rtm
I'm sorry but this seems an aggressive comment to me. CatDancer did mention the preference of simple macros over MzScheme's more complicated hygienic macros. Beyond that, Arc is different from Scheme and everyone knows it. The differences are documented and they are the reason why Arc is not Scheme. You do not have to challenge the piece just because you don't particularly like the changes Arc made in comparison to Scheme.
anc2020··on Thank you pg and rtm
To make it clear, the example below would become:

  (mac awhen (expr . body)
    `(std.let it ,expr (std.if it (std.do ,@body))))
This assumes that awhen is being defined and exported from the std module too, so that it can also be used in expansions. Slightly more verbose, but that's optional hygiene if you want it.
anc2020··on Thank you pg and rtm
It is unfortunate for abstractbill to use this incorrect explanation, because hygienic macros are still a red herring - a decent module system and a bit of restraint gets you there.

    (define-macro (my-if a b c) `(std.if ,a ,b ,c))

    (define (boo)
      (let ((if list))      ; if is shadowed
        (my-if 'x 'y 'z)))  ; gives (std.if x y z)  

    (define (boo2)
      (let ((std.if list))  ; error! cannot shadow module vars.
        (my-if 'x 'y 'z)))
I've posted this around a few times asking why this isn't already used in Lisps and never seem to get a convincing argument back. The only conclusion I can draw from this is that CL-ers are ashamed of the fact that multiple namespaces aren't actually necessary and Schemers are rightly ashamed of hygienic macros. Please convincingly prove me wrong!

(ps. This ofcourse would not be limited to the languages std module but would also apply to any exported module symbols.)

anc2020··on HN Frontpage ranked using only votes from accounts over a year old
> On the plus side, the discussions that happen in Comments are definitely still good.

Maybe its me, but I've found a lot more comments within the past fortnight or so grating on me than previously. Remarkably, every time I checked the submitter, they'd been on Hacker News for about a year and a half at least. And by grating I basically mean rude and unhelpful.

anc2020··on Free Programming Books
I was pretty sure you needed to buy the book before you get that, I tried to follow links for a while to get the RWH pdf before and didn't succeed.

Edit: Seems that they are linking only to the site and not a pdf for RWH so it could well be legal :)

anc2020··on Virtual Neurons Acting Like the Real Thing - The Blue Brain Project
Agreed. The only reason we associate life with self-replicating is because living things don't last long without it, but it doesn't mean you need self-replication to be alive.
anc2020··on Clojure: It’s About the Libraries
As a genuine interest, please could you clear up what is meant by "Lisp All The Way Down."? I've implemented my own Lisp interpreter in Scheme before, and I looked at the interpreter from McCarthy's original paper, but in both of these, the interpreter still required some language (albeit one with list-processing procedures) to begin with. My experience would be that there's nothing special with Lisp in this regard, just that its _really_ easy to parse, but I still hear this claim often enough - am I missing something here?

And to answer your post, I'd say that Clojure does give you what you need - it gives you the axioms, it gives you defmacro - the rest is history. All those other library functions you can think of in a more abstract sense ("George's problem"), and in the end these should be machine code no matter which HLL they were originally written in.

The Lisp way has always been very dynamic - you can change things, even when they're orbiting Mars, but Clojure is functional, you generally don't change things. So in that sense, Clojure is not a true Lisp, but only because it chooses a different set of trade-offs, and if you don't like that then its fine, but it doesn't make Clojure evil, just different.

anc2020··on Ask HN: Do you have any code or projects of your own you would like to talk about instead?
Another programming language: http://www-student.cs.york.ac.uk/~anc505/code/hasp/hasp.html

I'm not doing any fancy compiler stuff - the target language is Haskell so that's all done for me.

*Edit: And I should probably say something about it :) Its an s-expression based language so it looks like a Lisp and you can use macros on it, it also reads by indentation if you want it to look like Python, and then the rest of it just comes from Haskell :)

anc2020··on Guido's final word on Tail Calls
> Why?

Obviously I can't know it for sure, but my argument hinges on parallelism. Imperative programming isn't so well suited to parallelism as you probably know, and Python is sticking firmly to the imperative pseudo-code area of programming (which it does very well). Even for the scripting tasks I think in 10 years time it'll just be unacceptable to have so many cores under-utilised and functional languages make parallelism so much easier that it'll be a fairly easy choice to start coding a new project in those languages instead of Python. And then on top of this main argument, I'll just say you never know - I don't think people would have predicted the decline Perl has had to such a big degree (sure its not dead but its going that way). Python won't be here in 100 years (or 200, or 300..), I'm 100% sure. So I'm just arguing that the actual number of years left of Python is likely to be within 30 years. No-one knows the exact length, but my prediction is that its within that range.

> What makes Scheme and Haskell "long-term" languages?

They're just very simple and pure, and that's important for longevity because they aren't likely to be replaced in a kind of "major revision change" by a similar but better language, because they don't really need a big revision change, they're very good (or should I say "good enough") already. Python just doesn't so obviously provide the best language of its kind (dynamic, OOP, imperative) and is prone to be replaced by a different kind of language or a slightly different language of the same kind.

Both my answers are long enough that no doubt there'll be holes to pick in them. Eg. Should I have said "Scheme"? Well I don't think Scheme will ever make it big, but I do still think it'll be around in the long term to much the same degree it is now.

* By long term I meant at least 100 years for both Scheme and Haskell.

*Edit: That was a bit big, I'd like to correct it to "at least 30 years, and quite likely 100 years"

anc2020··on Guido's final word on Tail Calls
FTA: > One other thing I learned is that some in the academic world scornfully refer to Python as "the Basic of the future".

I'm not from the academic community and have never heard anyone else say it before, but have thought of Python this way for quite a while now and am pleasantly surprised to see I'm not alone.

Thats not me being snarky, its a very serious observation - you'd get laughed at for learning Basic today. I'm young and expect Python to die well before the end of my professional career, so I do invest my time in longer term languages such as Scheme and Haskell.

← PreviousPage 3 of 5Next →