3 ms·
Surely most of the software running this site is simply HTML with some basic data movement and storage going on in the backend. I'm not sure this really even q
by thiefmaster 15y ago
Surely most of the software running this site is simply HTML with some basic data movement and storage going on in the backend.
I'm not sure this really even qualifies as 'software' ;)
It could have been written in php/asp/python/perl etc and would have functioned exactly the same, be about the same lines of code, as maintainable, as prone to bugs and so on.
In fact, I seem to remember Reddit rewrote from lisp to python in a weekend?...
- pg 15y agoIf you haven't looked the source, and therefore don't know what it does or how long it is, how can you know whether it would be the same length translated into other languages?
- o1iver 15y agoHe can't, so he is just making an assumption (whether from experience or not, who knows). But I would be interested in some information about the HN codebase... Is it shorter? Less error-prone? Simpler?
- noblethrasher 15y agohttps://github.com/nex3/arc/blob/master/news.arc https://github.com/nex3/arc/blob/master/news.arc
- thiefmaster 15y agoLines of code is probably the wrong term for me to use. Since it's bogus. (Depends on how much the language provides, libraries, etc and doesn't necessarily capture program complexity). A more accurate term would be "Required programming effort". Would you agree that it would take a similar amount of effort for a proficient PHP programmer to write HN, as a proficient Lisp programmer etc? FWIW, I have just looked at the source and IMHO I'd expect it to be extremely similar in PHP/other languages.
- baddox 15y agoIt certainly qualifies as "software." What possible definition of "software" would exclude a web application? Obviously, literally any software could be identically implemented in any language. Lines of code don't really matter, but I strongly expect that the Arc code of HN is much more concise than an implementation in php/asp/python/perl would be, even if you used a web framework. PG prides himself in the conciseness of the HN code, and Arc seems to lend itself to concise implementations of web apps. As for maintainability and bug proneness, both depend more on the programmer(s) than the language.
- thiefmaster 15y ago> It certainly qualifies as "software." What possible definition of "software" would exclude a web application? My point was that it doesn't do heavy algorithm lifting, processing etc. It's not a phong shading ray tracer or anything. It's moving data around, storing it and displaying it. It's mostly plumbing work - getting data from one place to another.
- dagw 15y agoI'm sure I could write a simple phong shading ray tracer faster than I could build a copy of this web site. Re-implementing a well known and well understood algorithm is easy, making a working and popular application that people enjoy using is hard
- zck 15y agoIn pg's ANSI Common Lisp, he defines a ray tracer in one page of code, creates all the necessary functions for spheres in another page, then inserts 28 spheres and prints out the world in a dozen lines of code. There's part of a page of utility functions, like creating a point structure. You can examine the code here: http://lib.store.yahoo.net/lib/paulgraham/acl2.lisp http://lib.store.yahoo.net/lib/paulgraham/acl2.lisp . Search for the first instance of "surface".
- baddox 15y agoI don't know anything about ray tracers, but if it's an algorithm, then it's "mostly plumbing work" in the same way you say a web application is. The beauty of the world we live in is that you can compute anything that can be computed with an absurdly small set of basic operations.
- chc 15y agoActually, there's very little HTML in the news.arc codebase. The front-end bits are mostly functions that generate HTML in a rather abstract way. Also, at a certain level of skill, you can rewrite just anything in a weekend — but that doesn't mean the code is as clean, as lean, as maintainable or as correct. It just means you've approximated the most obvious functionality in the software.
- thiefmaster 15y agoJust FWIW, This is still mostly HTML: (trtd ,@body) (trtd (vspace 10) (color-stripe (main-color ,gu)) (br) (center (hook 'longfoot)
- TeMPOraL 15y agoThis is HTML, and yet this is Lisp. That's an example of Lisp powers in use.