Live data from Hacker News

How Lisp is Going to Save the World

landoflisp.com

211–220 of 239 posts

Re: How Lisp is Going to Save the World

#211

I love lisp. I use/used it to build my web service product[1] and anything else I can. =how do I do X?= java: something similar to X is already done in Y. add abstract class and redo X and write Y. +200 LOC lisp: something similar to X is already done in Y. realize you can generalize X and Y into a new pattern and use it for ABC too. -70 LOC =there is a bug in function X= java: open X.java. edit line. restart program…

look I like lisp as much as the next guy, but you can "spend two hours" reading java code, write a unit test; eval said test and then woohoo! You can do that in basically any modern language. And your first example is something that most modern languages are sold on. The truthiness of those statements can be debated, but your examples are flawed to say the least. Point is: you can generalize and write unit tests in a…

That is true to a degree but you really can not generalize very well at all in java. You will also be hard pressed to find java code written functionally enough that you can just run a unit test and know it is working correctly. Usually you have to instantiate many other classes and stub in test data via something like guice. There are many places for those bugs to hide in that type of setup.

Re: How Lisp is Going to Save the World

#212

Earlier quoted context omitted.

> I found the syntax very obtuse and it was not obvious why Lisp would be more powerful than Haskell. The easiest answer to that is, there's no syntax, which makes reimplementing your own Lisp parser trivial (one single function call, in fact). This in turn makes reimplementing your own Lisp, inline in Lisp, similarly trivial. That sounds like something out of an SICP exercise - and it is - but the same properties ma…

If pg then perhaps it was (or stems from) this: Programming Bottom-Up - http://www.paulgraham.com/progbot.html

> In Lisp, you don't just write your program down toward the language, you also build the language up toward your program. As you're writing a program you may think "I wish Lisp had such-and-such an operator." So you go and write it. Afterward you realize that using the new operator would simplify the design of another part of the program, and so on.

That's close, but not quite the wording I remember, so I must have seen it somewhere else as well. That's a pretty good description of what I was referring to, though.

Re: How Lisp is Going to Save the World

#213
post #68

Great story. Unfortunately, the API documentation and tutorial writing guilds went extinct decades ago and has never been able to return to Lispland. :)

This is how false misperceptions are spread. I'd ask you to mention a lisp library which you use but find under-documented (as another reply already has), but I don't think anyone with actual first-hand knowledge of the CL ecosystem would make this comment (even though I'm sure it recieved many enthusiastic if uninformed upvotes). Lets look at some popular libraries with documentation. - Alexandria http://common-lisp…

Lisp is very under documented compared to other languages. This makes learning LISP extremely difficult.

Let's take a look at HyperSpec, I follow your link and I'm greeted with a mostly blank (and very ugly) page. Ok there is something called starting points, I guess I'll start there. That page just lists all the indexes. Ok let's try chapters, that sounds like a place to start. Oh yay, another page with nothing but links. Ok, let's try introduction. Again, just a mostly empty page with links. Most people would have given up by now. But lets keep going. Let's try 1.1, which takes us to ANOTHER page of links. I'm feel like I'm getting the run around here. Lets click 1.1.1 and see what happens. Finally I get a page that isn't all links, and it's a single paragraph. What a waste of time.

Let's try another language, how about JavaScript? Google gives me this link: https://developer.mozilla.org/en-US/docs/JavaScript Some helpful information on the first page! Do I want a reference? Do I want a guide? Do I want a re-introduction? Maybe some sites with courses on JavaScript! Wow, that's really useful. Lets just start with the guide because it's "Our primary guide about how to program with JavaScript" and that sounds about right. It takes me to a list of links, Yuck, let's try the fist one called "JavaScript Guide" (Isn't that what I clicked on to get here?). Yup, that link just refreshes the page. That sucks, let's try the second link "About this Guide". A page that describes what I should already know, how to find my way around the guide, and tips for diving into JavaScript.

This is the problem with LISP documentation. At best, if I know exactly what I am looking for I find a giant index. At worst I have no idea what I'm looking for and I get snooty comments from LISPers.

The point is you shouldn't make people look really hard to find information. Good documentation should be easy to find and navigate.

Re: How Lisp is Going to Save the World

#214
post #106

Earlier quoted context omitted.

Try googling around for "cqrs". There are many ideas on how to do exactly this effectively. All it takes is to swap "write" operation with "event" entity (all is state). Combine that with intention revealing commands (customer_died instead of delete from customers where id=1) and you hit jackpot. End result is nice stream of events which is ultimate source of truth and enables crazy queries you never thought you woul…

This is quite interesting. In practice though, the lags between command/query models when the datastores are different(almost always, for large data) becomes a real concern

Pardon my pedantry, but CQRS doesn't necessitate eventual consistency. Denormalization of domain events into can happen synchronously. It all depends on the needs of the project. If the project information architecture and processes can support a degree of latency (which is implicit in almost any technology providing static screens anyway), then the performance gains of eventual consistency can be realized.

A good, nuanced explanation of CQRS is here: http://codeofrob.com/entries/cqrs-is-too-complicated.html

Re: How Lisp is Going to Save the World

#215

Earlier quoted context omitted.

I would love to see cffi, opengl and one of the gtk binding libs have better documentation.

The opengl bindings don't really need documentation, as they're automatically generated to mirror the C API. Really, if you want to know how to use `cl-opengl`, you memorize a simple naming convention and the rest is a matter of "how do I use OpenGL," not "how do I use cl-opengl?"

And where do I find this "simple naming convention"? I tried google and found repos to the project, but nothing that told me how to read the C documentation and translate it into LISP.

Re: How Lisp is Going to Save the World

#216
post #189
post #68

Great story. Unfortunately, the API documentation and tutorial writing guilds went extinct decades ago and has never been able to return to Lispland. :)

They're alive and well for Racket and Clojure. Here's a racket guide, which provides detailed documentation for every facet of the language: http://docs.racket-lang.org/

This is why after trying to learn LISP I ended up with Racket.

Re: How Lisp is Going to Save the World

#217
post #113

Earlier quoted context omitted.

Software does not move tanks. It's one part of an overall system that moves tanks. You over-reached on that point; it happens.

Software moves fleets. Coordinates ten of thousands flights. Make sure that hundred thousands soldiers have supplies. It's called logistics. It's a new world. It happened. It's been said that this single piece of software paid back for all DoD AI research.

May I propose the alternative explanation that you are overstating the case for Lisp and this software, because you just happen to like Lisp? I mean, look at your HN alias.

That particular software could have been written in any bloody language. Logistics is one of the more boring areas of software engineering anyway -- and the majority of it in the world runs in Cobol, Java and similar boring languages, just like most of the banking world runs.

Plus, it's not like the US army haven't made a mess with war logistics. How much did the Iraq war cost to the country again?

Re: How Lisp is Going to Save the World

#218
post #143

Earlier quoted context omitted.

without that application, nobody would have been there.

Well, if you go as far as to say that without Lisp nobody would have been there... Is it fair to say that Lisp started the war?

"Thisp aggression will not stand."

Re: How Lisp is Going to Save the World

#219
post #213

Earlier quoted context omitted.

This is how false misperceptions are spread. I'd ask you to mention a lisp library which you use but find under-documented (as another reply already has), but I don't think anyone with actual first-hand knowledge of the CL ecosystem would make this comment (even though I'm sure it recieved many enthusiastic if uninformed upvotes). Lets look at some popular libraries with documentation. - Alexandria http://common-lisp…

Lisp is very under documented compared to other languages. This makes learning LISP extremely difficult. Let's take a look at HyperSpec, I follow your link and I'm greeted with a mostly blank (and very ugly) page. Ok there is something called starting points, I guess I'll start there. That page just lists all the indexes. Ok let's try chapters, that sounds like a place to start. Oh yay, another page with nothing but…

The hyperspec is standard document, not an introduction. It's an invaluable reference you use after you get familiar with the language. I also have emacs set up so that I can look up symbols from within my source, and have the relevant page open up in a w3m window in emacs. I use it constantly and miss the same level of quality and clarity in other language documentation, but you need to get used to it's style and format. If you want to get started with lisp, you go to http://www.gigamonkeys.com/book/ and http://www.cliki.net/

Learning lisp wasn't any more difficult for me than learning any other language. "Practical common lisp" is well written. "Object oriented programming in common lisp" is a well written book as well, "Land of lisp" was fun, and not too bad either.

The core language is extremely well documented and understood. As for the libraries, some of them are well documented, some of them aren't. After the docs for RESTAS started going slightly out of date, I just opened the source and read it all in an afternoon(~600loc), and mostly understood it. I prefer not to have to do that, but claiming it makes it extremely difficult to learn, I don't know, to me it's just an inconvenience, and I have a much better understanding of the framework now, which I couldn't get from just reading docs. And some libraries are so small, I can just figure them all by inspecting the package in slime, and reading the docstrings. Usually there is at least example code. The situation isn't perfect, but it is more than possible to use lisp libraries with great success. Most authors are also pretty approachable on irc or the mailing lists. In other words, I'm a young amateur programmer, who picked common lisp less than two years ago, I'm barely competent as a programmer, and I could figure this all out, why can't expert programmers with years of hacking behind them do the same, I can't understand.

PS as for the ugliness of the hyperspec, I'm happy if it scares away people who get impressed by "modern" design, more than substance and content. I usually read it in text only browsers, and curse docs I can't read well from within emacs. Alt-tabbing to a browser and having to use the mouse while hacking ruins my day :)

Re: How Lisp is Going to Save the World

#220

Earlier quoted context omitted.

The opengl bindings don't really need documentation, as they're automatically generated to mirror the C API. Really, if you want to know how to use `cl-opengl`, you memorize a simple naming convention and the rest is a matter of "how do I use OpenGL," not "how do I use cl-opengl?"

That's great, but I haven't learned C. Besides that, leveraging documentation from another language is a hack. As it stands, there isn't documentation around for learning to create 3d graphics without needing to know other languages first.

It's NOT a hack because the bindings are calling directly into C. CFFI is a way for lisp to directly run C functions, and a CFFI wrapper does just that: for every function that exists in the OpenGL API, the same function (with the same arguments) exists in the CFFI OpenGL bindings.

Duplicating documentation needlessly is a hack. If your library that you program uses another library, are you required to document that other library as well as your own? No, that library already has documentation.

If you want to learn OpenGL, learn a tiny bit of C. You know what? Learn a tiny bit of C either way. It's the foundation at the core of every program written, no matter what language. Plus, OpenGL is a lot more complicated than C, so you've got your work cut out for you if you can't handle C.

Post reply on HN