4 ms·
I mostly do client-side Web development - JavaScript and Flash - and prefer to write in the native languages of the platform to leave less space for bugs to hid
by cousin_it 17y ago
I mostly do client-side Web development - JavaScript and Flash - and prefer to write in the native languages of the platform to leave less space for bugs to hide. (Even MTASC, the very good indie Flash compiler, turned out to contain obscure bugs after I abused it for a couple years.) And my server-side stuff is simple enough that Lisp wouldn't be a big win space-wise over the handful of PHP one-pagers that I tend to write. Lisp also loses to PHP on maturity, documentation and support - whenever I stumble on some exotic webapp-specific problem, chances are it's already covered in detail on php.net. It looks like Perl and Python have ecosystems of similar quality, and some of my friends swear by the Microsoft tech stack, but unfortunately I can't trust Lisp to the same degree.
If I ever encounter a problem where cleverness of programming is the limiting factor, I'll probably use some advanced language (yep, I can handle Lisps, ML/Haskell or even APL/K passably well). But such problems just aren't very common. On most projects I spend most of the time figuring out how to solve this user problem on that programming platform as directly as possible, not solving mathy type puzzles.
- mahmud 17y agoLisp also loses to PHP on maturity, documentation and support Lisp is 50 years old and standardized for 15 years. Has both an ANSI and ISO standard, freely available books and manuals written by the best and the brightest of the Art. There are 4 commercial Lisp companies and a total of 8 standard-compliant implementations. There is absolutely no comparison, and it's both telling and sad you would utter them in the same sentence. Take it back.
- protomyth 17y agoA better way of stating it, is that while Lisp is older, there is a lack of real world experience, documentation, and support for using Lisp as a language for web development. The volume of material, understanding, and optimization strategy for PHP is far and away greater than Lisp. As an example, search for a simple question on how to do some developmental task on google for both PHP and Lisp. PHP will have more informative pages.
- frig 17y agoPHP.net landing page for string documentation: http://www.php.net/manual/en/book.strings.php http://www.php.net/manual/en/book.strings.php (also available in 7-8 other languages). Note all useful string concepts are one click away, and the documentation allows user commentary (much of which is quite helpful). Common Lisp Hyperspec landing page for Strings: http://www.lispworks.com/documentation/HyperSpec/Body/16_.htm http://www.lispworks.com/documentation/HyperSpec/Body/16_.ht... CMUCL string documentation: http://common-lisp.net/project/cmucl/doc/cmu-user/unicode.html#toc311 http://common-lisp.net/project/cmucl/doc/cmu-user/unicode.ht... SBCL's manual has no "table of contents" item that even mentions strings. Stuff like this matters if you care about accessibility. It should be trivial to google yourself a well-documented list of a given language's standard string functions without a lot of work.
- mahmud 17y agoIn Common Lisp, strings are a subtype of Sequences :-) The PHP String library you linked to is appalling. It includes a lot of stuff that shouldn't be squashed together in one "section"; strings, characters, locale management, i18n, cryptography, sequences, generic formatter, currency parsing and formatting, uu(en|de)coding, even fuzzy string matching! Who does this appeal to? no abstraction, no modularity, no visible type hierarchy or any sense of order.
- frig 17y agoI wasn't commenting pro-php; the php api design isn't going to win any awards other than popularity. You're not really responding to the point I was raising: poorly-designed or not, php's official site has easily-findable and easily-accessible documentation (which it needs given the quality of the api design); its official central documentation site is well within the range of modern best practices. There's not to my knowledge a comparable common lisp online reference (reference, not tutorial) that's anywhere near as accessible to the beginner or intermediate user (that nebulous phase between getting through a few tutorials and having deep knowledge). These are all excellent resources: http://java.sun.com/javase/6/docs/api/ http://java.sun.com/javase/6/docs/api/ http://docs.python.org/ http://docs.python.org/ http://www.ruby-lang.org/en/documentation/ http://www.ruby-lang.org/en/documentation/ http://www.php.net/manual/en/ http://www.php.net/manual/en/ http://clojure.org/Reference http://clojure.org/Reference ...etc., where is the common lisp equivalent that won't look out of place (in terms of contents + organization)? Stuff like this matters for accessibility and usability.
- cousin_it 17y agomahmud, it comes down to this: You're thrown a typical webdev task, like setting the filesize limit for user uploads. Quick, how much time will it take in CL? Connect to MySQL and store some data. How many minutes, how many lines of code, how many libraries downloaded? Now determine the dimensions of a jpeg image. And parse some JSON from a file. Faster! (In PHP we haven't even left the standard library yet. It's that perfectly tailored for what web people do.) A weird problem arises, what's the chance that some PHP user had it before and wrote it up, compared to CL user? Something more complex: HTTP request goes in, ping to payment system goes out, file starts downloading with correct mimetype, where do you go for working code examples? You need to move your app to another webhost, how much hassle will it take? Client needs a CMS, which one do you pick, and how often does it get security updates? You make your app open source and people want to install it, what instructions do you give them? Yes dammit, let's get practical. Let's get our hands dirty. I love this stuff.
- mahmud 17y agoYou're thrown a typical webdev task, like setting the filesize limit for user uploads. That's a web server configuration, not a programming issue. Connect to MySQL and store some data. (with-database (db '("host" "db" "user" "pass") :database-type :mysql) (insert ...)) With CLSQL. http://clsql.b9.com/documentation.html http://clsql.b9.com/documentation.html Now determine the dimensions of a jpeg image. CL-GD has image-width and image-height functions. http://weitz.de/cl-gd/ http://weitz.de/cl-gd/ And parse some JSON from a file. In my world, json is rarely read from disk files. It's passed around between client and server. At any rate. (with-open-file (file path) (let ((json-buffer (file-length file))) (read-sequence json-buffer file) (decode json-buffer))) http://common-lisp.net/project/cl-json/ http://common-lisp.net/project/cl-json/ You are showing a complete misunderstanding of software engineering. You don't go running around looking for examples and installing 3rd party packages willy nilly. Weird problems don't just "arise" out of the blue, and although there is some urgency to things there is never any chaos. Things are a bit more controlled, and you are assumed to know what you're doing, Lisp or otherwise.
- deleted 17y ago[deleted]