Live data from Hacker News

Reddit 1.0 was written in Lisp

github.com

51–60 of 143 posts

Re: Reddit 1.0 was written in Lisp

#51
post #29

Earlier quoted context omitted.

I have a theory (which nobody I ever met shares) that the visually most beautiful language is the one that long-term results in the fastest development of a project: Visual noise is like inflation. A constant tax on what you do. But you barely notice it. But it accumulates because it is constantly leading to slightly worse and more complex code. Since it is harder to focus on a noisy something in front of you, you ma…

This depends on your editor color settings though. C++ can look very handsome

C++ looks very handsome.

Usually someone will pop up showing crazy meta programming template code and use it a straw man to declare cpp=bad.

Re: Reddit 1.0 was written in Lisp

#52
post #45

Earlier quoted context omitted.

__visuallyelegant__

That should trigger the good sense of any “Zen of Python” die-hard. Not saying I haven’t used/got access to double-underscore thingies in Python in my 15+ years of writing Python code, but I always felt dirty in doing that.

But isn’t that the point? The naming convention is for protocols that have syntax support

Re: Reddit 1.0 was written in Lisp

#53
post #41

Earlier quoted context omitted.

Python was released in 1991.

And Ruby in 1995, but it wasn't before 2005 (and Rails) that it reached traction. In 2007, albeit 16 years old, Python was still far from mainstream, especially out of its scripting niche.

That doesn’t match my recollection. I’m not sure how to prove anything, but I’ll note that Python 3.0 was released in 2008. If Python 2 wasn’t already extremely popular and well-established at that point, I doubt we’d have seen the brutal 10+ish year migration from it.

Re: Reddit 1.0 was written in Lisp

#54
post #49

Time flies. I still remember when there were quite some discussions in the communities when the initial reddit team made it public that they were switching from Lisp to Python for development. It created a lot of controversy, especially the specific reasons they named. I think quite some of them happened here on hacker news. Back then of course reddit was just a tiny startup as many. So it is funny to see this now po…

[flagged]

Re: Reddit 1.0 was written in Lisp

#55

The current reddit seems to be written in js/python. I can see the logic behind js since its a lot easier to find devs and thanks to all the hard work of the engineers behind v8 its not a slow language. I do not understand why python was chosen though. If you need more speed you would go with c++ and not python which is the slowest popular language. Anyone got any insight into why python was chosen?.

Do you actually think CPU usage is a concern here? Database performance and optimization, horizontal scaling, cache optimization (and cache invalidation) are the big problems. Security is also a big problem.

The performance critical part is the database, and that at least used to be written in Java (cassandra db).

Writing the bit of glue code between your high performance database and your fronted in cpp would introduce all kinds of really bad potential bugs, scary remote code execution bugs.

CPU usage of that glue code might take up 10% of your hardware budget worst case, even with a "slow" language. It's just not a concern.

Re: Reddit 1.0 was written in Lisp

#56

The current reddit seems to be written in js/python. I can see the logic behind js since its a lot easier to find devs and thanks to all the hard work of the engineers behind v8 its not a slow language. I do not understand why python was chosen though. If you need more speed you would go with c++ and not python which is the slowest popular language. Anyone got any insight into why python was chosen?.

I'm not sure why python was chosen.

But I contributed a tiny bit of code to reddit back when it was open source and chatted with reddit engineers on IRC, so I do know the official justification (as of 2010ish) for reddit sticking with python:

Websites are mostly IO bound anyway. The hot parts like markdown formatting and templating are already c modules. So the performances gain for rewriting in a compiled language aren't large enough to justify it.

Re: Reddit 1.0 was written in Lisp

#57
post #47
post #29

Earlier quoted context omitted.

I have a theory (which nobody I ever met shares) that the visually most beautiful language is the one that long-term results in the fastest development of a project: Visual noise is like inflation. A constant tax on what you do. But you barely notice it. But it accumulates because it is constantly leading to slightly worse and more complex code. Since it is harder to focus on a noisy something in front of you, you ma…

What you’re saying is only partially correct - Yes, for more exploratory programming for a new product with full US/EU/CANZUK based dev workforce it makes sense to prioritize maintainability. For a company complaining about infrastructure costs for a product that has been cloned many times over, and which is large enough to hire offshore devs, the cost equation favours rewriting in something like Go, Rust or even Jav…

Using a language with a faster runtime makes the system run faster. But it does not compound. So you are limited to a ceiling at about an order of magnitude faster execution.

Making better decisions on a daily basis compounds. You evolve towards a better architecture. Which can make the code multiple orders of magnitude faster.

One of many examples: In a complex system, developers often have a blurry vision of what can be cached, in which situations it can be cached, and how cache invalidation should be done. While in a more elegant system, the borders between different approaches to caching are clearer. Leading to the more elegant system being multiple orders of magnitude faster as it can leverage the different caching layers (in memory cache, on disk cache, the CDN ...) more effectively.

Re: Reddit 1.0 was written in Lisp

#58

Earlier quoted context omitted.

This depends on your editor color settings though. C++ can look very handsome

C++ looks very handsome. Usually someone will pop up showing crazy meta programming template code and use it a straw man to declare cpp=bad.

I've bee using C++ since the late 90s, and namespaces are still annoying.

Re: Reddit 1.0 was written in Lisp

#59
post #16

MathB.in, a simple pastebin for mathematical snippets, went in the opposite direction. It was first written in PHP and then later rewritten in Common Lisp. See https://susam.net/blog/mathbin-turns-ten.html for the full story.

I would argue that for such a small website (in the sense of both codebase size and traffic), which language is used does not matter, and is almost purely a personal preference.

Re: Reddit 1.0 was written in Lisp

#60
post #59
post #16

MathB.in, a simple pastebin for mathematical snippets, went in the opposite direction. It was first written in PHP and then later rewritten in Common Lisp. See https://susam.net/blog/mathbin-turns-ten.html for the full story.

I would argue that for such a small website (in the sense of both codebase size and traffic), which language is used does not matter, and is almost purely a personal preference.

Yes, it was personal preference indeed. I have written a little more about that here: https://news.ycombinator.com/item?id=32980708
Post reply on HN