Live data from Hacker News

Common Lisp homepage

lisp-lang.org

201–210 of 313 posts

Re: Common Lisp homepage

#201
post #108

Earlier quoted context omitted.

Sure, but the point is that that exact same code will throw a type error in SBCL. It at least complicates what you need to do before you can say "what implementation doesn't behave like that?".

But what is the point, really? SBCL will disable type checks with safety=0, LW will enable with safety=3, debug=3. Is the point "read your documentation before relying on things"? Or is the OP's point that SBCL shouldn't exist because it's "poisoning" and "a bad thing"? That's the problem with such FUD, can't ignore it or somebody might actually believe it, can't just say "nonsense" since that's not convincing.

[deleted]

Re: Common Lisp homepage

#202
post #97

Earlier quoted context omitted.

1: I really don't see how CL or Clojure are any more complicated than, say, Rust or C++. If anything, CL and Clojure are simpler, just different. 3: Most useful libraries are portable between different CL implementations. The choice is really "CL or Clojure or which Scheme implementation?" Not to discredit Picolisp or Shen, but those languages feel very much (esp. Shen) like a research language. Picolisp has more of…

>Lisp related books are among the best in CS. SICP, LoL, etc. are timeless. Lisp books also tend to have the characteristic where you have to find the "right" compiler for the examples to work. I've yet to pick up a book where all the examples "just work".

"Lisp books also tend to have the characteristic where you have to find the "right" compiler for the examples to work."

Probably true of every programming book more than a couple of years old.

Re: Common Lisp homepage

#203
post #38
post #7

Lisp is quite popular at my current workplace. A few popular open source projects published by our organization have been written in Clojure (a dialect of Lisp that runs on JVM and CLR). A few domain specific languages used internally in our organization are also inspired by Lisp. On a more personal front, I find Lisp to be simple, elegant, and expressive. I use Common Lisp (SBCL) for personal use. Working with Lisp…

> I sometimes wonder why Lisp has not been more popular in the technology industry. One major reason was hardware. Lisp might have started in IBM mainframes, but the development environment from Xerox and the Lisp Machines that followed up where quite expensive for single developers, back when the industry was heavily focused on bringing down the costs of time-sharing services, which where owned mostly by mainframes,…

>Also quite important, 8 and 16 bit home computers were not yet able to deal with the hardware requirements of Lisp enviroments.

There was a Lisp called XLisp for PCs early on, but it was buggy, IIRC. Had tried it out a bit. Just googled, here is a link about it from later on: http://www.xlisp.org/

Re: Common Lisp homepage

#204
post #76

Earlier quoted context omitted.

> building an mp3 database would be one line of code or two in python You mean because of the availability of libraries, so that the code would be something like import some_database_library print("Look, I have a database:", some_database_library.connect()) ? Otherwise, how do you build a database (or anything involving MP3 files) in a few lines of Python, and how is it so much worse in Lisp?

I mean the 1/2 page code was basically a built in dictionary in Python...I felt it was a step backwards. And this is someone who was very open to Lisp...I still think it has value...just a steep learning curve.

You mean this exercise:

http://www.gigamonkeys.com/book/practical-an-mp3-database.ht...

This is building a rudimentary in-memory database supporting SQL like queries. I didn't realize Python dictionaries support schema definitions and "select" queries?

Re: Common Lisp homepage

#205
post #7

Lisp is quite popular at my current workplace. A few popular open source projects published by our organization have been written in Clojure (a dialect of Lisp that runs on JVM and CLR). A few domain specific languages used internally in our organization are also inspired by Lisp. On a more personal front, I find Lisp to be simple, elegant, and expressive. I use Common Lisp (SBCL) for personal use. Working with Lisp…

> I sometimes wonder why Lisp has not been more popular in the technology industry. Larry Wall said that a language should make the easy things easy, and the hard things possible. I think the problem is that Lisp doesn't make the easy things easy. Before you tar and feather me, hear me out. There are two different ways in which Lisp doesn't make the easy things easy. First, syntax. "But it's easy! In fact, it's the e…

>First, syntax. "But it's easy! In fact, it's the easiest!" you reply. But for the vast majority of programmers, Lisp syntax is not easy. You could argue that they just need to be trained. But the syntax is different enough that they are reluctant to try.

Could be more of NIH syndrome, since most of them would have learned another language first, which had an Algol-family or other-than-Lisp syntax (IMO). And regarding "You could argue that they just need to be trained", practice is also needed in order to feel comfortable with it.

Re: Common Lisp homepage

#206

Earlier quoted context omitted.

Type declarations in Common Lisp support (safety ) and (speed ) syntax for configuring, you guessed it, safety and speed. The undefined behavior kicks in when you explicitly defeat safety. (safety 0) (speed 3) means "throw out the life jackets and assume that these declarations are true, making the code as fast as possible". If you don't have the confidence for this over some piece of code, then just ... don't do tha…

> Type declarations in Common Lisp support (safety ) and (speed ) syntax To be pedantic, those aren't type declarations. More importantly, the (un)safety of a type declaration isn't predicated on any specific safety/speed settings. The mere use of a type declaration implies that the programmer certifies their accuracy inside its scope; an additional optimize declaration is not required. It bears repeating: While Comm…

> To be pedantic, those aren't type declarations.

They are values of optimization qualities and guide the compiler strategy.

> More importantly, the (un)safety of type declaration isn't predicated on any specific safety/speed settings. The mere use of a type declaration implies that the programmer certifies their accuracy inside its scope;

With an optimize quality 3 for SAFETY a compiler will not reduce safety, even though there are type declarations.

The Common Lisp standard REQUIRES that safety at 3 causes 'safe code':

http://www.lispworks.com/documentation/HyperSpec/Body/03_eaa...

Which usually means full runtime checks in interpreted and compiled code, calls, system calls, ...

> an additional optimize declaration is not required.

Sure you need to have the right compiler qualities set to see those effects of your type declarations.

LispWorks:

    CL-USER 4 > (proclaim '(optimize (safety 3)))
    NIL

    CL-USER 5 > (defun foo (x)
                  (declare (string x))
                  (+ x 2))
    FOO

    CL-USER 6 > (compile 'foo)
    FOO
    NIL
    NIL

    CL-USER 7 > (foo 'bar)

    Error: In + of (BAR 2) arguments should be of type NUMBER.
      1 (continue) Return a value to use.
      2 Supply a new first argument.
      3 (abort) Return to top loop level 0.

    Type :b for backtrace or :c  to proceed.
    Type :bug-form "" for a bug report template or :? for other options.

    CL-USER 8 : 1 > 
Oh, the LispWorks compiler has ignored the type declaration at safety 3. The runtime checks are still there. The code has the same safety as without a type declaration.

Re: Common Lisp homepage

#207
post #205

Earlier quoted context omitted.

> I sometimes wonder why Lisp has not been more popular in the technology industry. Larry Wall said that a language should make the easy things easy, and the hard things possible. I think the problem is that Lisp doesn't make the easy things easy. Before you tar and feather me, hear me out. There are two different ways in which Lisp doesn't make the easy things easy. First, syntax. "But it's easy! In fact, it's the e…

>First, syntax. "But it's easy! In fact, it's the easiest!" you reply. But for the vast majority of programmers, Lisp syntax is not easy. You could argue that they just need to be trained. But the syntax is different enough that they are reluctant to try. Could be more of NIH syndrome, since most of them would have learned another language first, which had an Algol-family or other-than-Lisp syntax (IMO). And regardin…

Don't have the link handy, but I think I read somewhere that someone calculated the number of characters or punctation (things like parens vs. braces, etc.) for some code using Lisp vs. C-style languages, and showed that (at least for some examples), Lisp code actually took less characters (or punctuation) in total.

Re: Common Lisp homepage

#208

This is a very nice web site describing a programming language with unparalleled expressiveness, power and permanence. I am heavily invested in Common Lisp. We are developing a programming environment for designing new materials and molecules called Cando ( https://github.com/drmeister/cando ) using Common Lisp as a scripting language. Cando is running on Clasp ( https://github.com/clasp-developers/clasp ), a new Com…

>I am heavily invested in Common Lisp. And you're my hero. For having the big courage to write a completely new CL implementation, and attempting what wasn't attempted before: LLVM output, great C++ interoperability. Even more, leveraging the latest state-of-the-art compiler modules (Cleavir, etc.) Keep on with the good work, dr. Schafmeister!!

I'm waiting to pounce on that. Oh, the testing I will do.

Re: Common Lisp homepage

#209
post #206

Earlier quoted context omitted.

> Type declarations in Common Lisp support (safety ) and (speed ) syntax To be pedantic, those aren't type declarations. More importantly, the (un)safety of a type declaration isn't predicated on any specific safety/speed settings. The mere use of a type declaration implies that the programmer certifies their accuracy inside its scope; an additional optimize declaration is not required. It bears repeating: While Comm…

> To be pedantic, those aren't type declarations. They are values of optimization qualities and guide the compiler strategy. > More importantly, the (un)safety of type declaration isn't predicated on any specific safety/speed settings. The mere use of a type declaration implies that the programmer certifies their accuracy inside its scope; With an optimize quality 3 for SAFETY a compiler will not reduce safety, even…

Violation of a type declaration is UB in safe code. SBCL obviously makes use of that fact when inserting assertions.

Re: Common Lisp homepage

#210

Earlier quoted context omitted.

> If it doesn't have nil that is also false and the empty list, it is not a Lisp. Scheme is generally considered a Lisp.

{by whom} Not by me. I'm a skilled Lisp programmer, yet Scheme isn't usable to me a the rudimentary coding level using the core language. There are stumbling blocks at every turn against straightforward Lisp coding. How can it be a Lisp? I can't even rely on Scheme to evaluate the function arguments left to right. Many forms have an "undefined" return value; in Lisp, everything returns a defined value, as a fundament…

Me (GP): Scheme is generally considered a Lisp.

Me (now, after reading P and other responses): I was wrong (or at least half-wrong) about this being generally accepted. I was not aware that I've been in a "Scheme is a Lisp" bubble.

EDIT: When I was working in Lisp (early to mid nineties), ANSI Common Lisp was relatively recent, and many of my co-workers[1] — a couple of whom in fact were members of the X3J13 committee — had come from working in and implementing a variety of earlier dialects. Maybe that has something to do with it.

[2] looks like a good summary of the current divide. [3] and [4] represent only one side of it.

[1] http://amigos.rdsathene.org/other/prefix-dylan/book.annotate...

[2] http://wiki.c2.com/?IsSchemeLisp

[3] https://en.wikipedia.org/wiki/Lisp_(programming_language)?wp...

[4] https://en.wikipedia.org/wiki/Scheme_(programming_language)?...

Post reply on HN