Live data from Hacker News

Common Lisp homepage

lisp-lang.org

271–280 of 313 posts

Re: Common Lisp homepage

#271

Earlier quoted context omitted.

There isn't necessarily an actual type error! Remember, the declaration provided by the user can be an inaccurate estimate of what the real type constraint is at that program node. The program might in fact require a string there, but the programmer's declaration says integer. So the assertion goes off when a string value occurs, when that would in fact correct in the absence of the declaration. This alteration of be…

If you re-read everything in this subthread, you'll find a lot of argument from seasoned lispers that I can and should ignore the fact that type declarations are unsafe even at the highest safety settings because of "what implementations do." If this discussion had taken place before SBCL, the logical conclusion from what these seasoned lispers say would have been that I can and should use type declarations in safe c…

> If you re-read everything in this subthread, you'll find a lot of argument from seasoned lispers that I can and should ignore the fact that type declarations are unsafe even at the highest safety settings because of "what implementations do."

The word "safe" in Lisp is tied to run-time checks.

"Less safe" means fewer run-time checks.

If a declaration causes a check to be inserted which signals a condition in code that otherwise would not, that isn't "unsafe"; it is something else. "Unsafe" in Common Lisp specifically means that a check didn't take place which normally would take place.

A monotonic increase in the variety of checks performed at run-time cannot be called "unsafe"; that amounts to an incorrect use of the ANSI document's defined term.

You can say that adding declarations to a program is "risky": it creates the risk that conditions will be signaled.

Those extra behaviors are in fact allowed because the program has violated a declaration, which is undefined behavior. That is a very general statement in the standard which is not expected to have malicious interpretations. Declarations are part of the program and can change its behavior; it is not spelled out in detail how, but the optimization parameters like safety and speed have obvious interpretations.

If a declaration is processed for safe code, and a behavior is added other than a diagnostic behavior, that could be characterized as malicious. For instance, supposed the program abruptly stops, without any diagnostic, so that it is not known why. That would not be acceptable. It would not be acceptable for a variable to be mysteriously altered, and for computation to continue, so that a problem occurs later which is nigh impossible to trace back to the violated declaration.

If you think the implementors are malicious, use something else. Malice could be perpetrated in almost any area of an implementation.

Think about it. Suppose you're hoping to use declarations to speed up code. You add the declarations and keep the code safe at first. If declarations are completely ignored, you're not getting any help! The code is working exactly as before and then when you drop safety and add speed, it fails. It fails not in nice ways, but catastrophically, due to reasons that could have been caught had the declarations been processed in safe mode.

Re: Common Lisp homepage

#272
post #234

Earlier quoted context omitted.

> ABCL, FRANZ, ALLEGRO, SBCL, CLISP, GNU CL, Clozure might all be common lisp, but they are different implementations with different tools That's better than having different languages with different tools: Python, Ruby, Perl, ... share nothing - though they are in a similar coding domain.

Fair enough argument here, although you could probably still argue that it is easier to setup most of those languages than use emacs. That's a non-starter for a lot of devs who aren't open to the long-term benefits.

True. You probably mean GNU Emacs and (not so popular right now) XEmacs.

Even I usually prefer to use other Emacs variants for Lisp programming: Fred, Zmacs, LispWorks, CCL, ... I prefer embedded Emacs variants which are written in Common Lisp.

With Lisps without embedded Emacs variants, usually GNU Emacs / SLIME is the best option. I can understand that this is for people used to other editors (like Eclipse, Intellij, Atom, ...) not very tempting.

GNU Emacs is especially used because that's the most widespread programmable editor, which can be extended in Lisp itself. For a non-lisp programmer that's initially not very important.

Re: Common Lisp homepage

#273
post #146

Earlier quoted context omitted.

You can easily change that behavior if you really want to. (in-package :my-package) (shadow 'if) (defmacro if (condition then else) `(cl:if (true? ,condition) ,then ,else)) (defgeneric true? (thing) t) Defining appropriate defmethods to make things work the way you want is left as an exercise.

However, wanting to is rather a problem for the psychiatrist's couch.

Why? I actually agree with the OP that conflating the empty list and the boolean false value is a mistake. (I don't think it's enough of a big deal for me to want to change it, but in a perfect world I do think it is better to distinguish them.)

Re: Common Lisp homepage

#274

Earlier quoted context omitted.

"Fluff" "FLUFF"??? If that's fluff then most of the rest of the web is fluff... oh wait. Seriously, the web site is a very informative site about "Common Lisp" - a specific dialect of Lisp. It's right there when you click the link, big letters - "Common Lisp" - you can't miss it. You could argue about the URL "lisp-lang.org" - but why?

"We are in the process of decoding the original format used for the CLHS." This is a smell that highlights the above post it seems.

It's more of an issue at the interface of technology and licensing. The CLHS (Common Lisp Hyper Specification) is a very large, web based document written in the 80's and it looks like an old Geocities web site. I believe the CLHS license says that it's not allowed to be changed (to protect the standard - I believe - someone correct me please) and so the community is working from slightly older drafts and figuring out how to automate the conversion to something that looks more modern. It's not a problem with Common Lisp - it's a problem that HTML, the web and user expectations have been changing over the years. There's that permanence thing again.

Re: Common Lisp homepage

#275
post #103

Earlier quoted context omitted.

Yeah, when I wrote the comment, I kinda guessed that people would point out the zombie-like state of living for these languages. That's only barely being alive, though, and very much faded. (I did have C in there but edited it out. I don't think that's a dead language yet.)

But isn't Lisp almost as zombie-like as Perl or COBOL? (4GL I'll probably give you...)

There are several implementations of Common Lisp that are still being actively developed.

Because Common Lisp is so easily extended, the ossification of the standard is actually a good thing. The stability of the standard means that code written 30 years ago will still work today. Feature updates aren't required, because any desired feature can be implemented in macros and imported as a library.

Re: Common Lisp homepage

#276
post #9

Often those who are curious to try Lisp are faced with a number of choices: Which dialect to choose? Which implementation to choose? Which book or tutorial should one follow? Is it necessary use Emacs? SLIME? Here are my recommendations: - Choose Common Lisp because it has been the most popular dialect of Lisp in the overall history of Lisp. It is more convenient than Scheme if one decides to develop serious software…

Saying SLIME (or Slimv) are useful is an understatement. Having a quick interface to the REPL is not an optional part of Lisp programming for me.

Re: Common Lisp homepage

#277

Earlier quoted context omitted.

"We are in the process of decoding the original format used for the CLHS." This is a smell that highlights the above post it seems.

It's more of an issue at the interface of technology and licensing. The CLHS (Common Lisp Hyper Specification) is a very large, web based document written in the 80's and it looks like an old Geocities web site. I believe the CLHS license says that it's not allowed to be changed (to protect the standard - I believe - someone correct me please) and so the community is working from slightly older drafts and figuring ou…

> is working from slightly older drafts

Not really, the content is the same.

Re: Common Lisp homepage

#278
post #23

Earlier quoted context omitted.

Types are supported since the 80ies, with (the) and optional declarations. Almost nobody uses them. Well, CL says: types are always carried around in every value, so we do have types, and we are always type-safe. Which is a proper point. Then SBCL has superior internal type support in its python compiler, leading to many optimizations. It creates specialized copies of typed methods, and has a nice optimizer framework…

In my experience Typed Racket programs are never slower than their dynamically typed Racket equivalents. Sometimes they are faster (such as when the program does a lot of numeric computation). What _can_ be slower is a _mix_ of TR and R. Because TR protects the boundary between the two with runtime contracts. Because it wants safety/soundness. I'm not any kind of gradual typing expert, but, it seems like you could ca…

Well, I do have the same problems between unchecked and checked expressions. You get the speed only with series of checked expressions, but you have to cast to any/dynamic/cons boxed type on each boundary. This is the major slowdown. When the series of expressions is too short, no transformation to native should be done, because the casting and conversion back and forth is more expensive than the win by using the specialized ops.

Similarily SBCL/CMUCL has the similar problem with polymorphic explosion of generating too many methods, which are rarely used. Javascript V8 and friends solved that better.

My speed comes from avoiding consing, my native types are bitfields. Lisp types are usually a class pointer for every cons cell. For me certain casts are permitted, which are not permitted with Typed Racket. So yes, I have to permit traditional code which worked before, esp. with inferred types from literals. Racket has the advantage of defining stricter language subsets, which we only have with Perl 6 also. There you can override even language and type semantics.

Chez has a nice tagging scheme, which should speed up Racket a lot.

Several gradually typed languages don't infer from literals, but that's one of the best speed gains. E.g. the literal 1000 is a union of int32, int64, uint32 and uint64, all possible valid integer types for a certain value. A negative number cannot be unsigned, and a too large number cannot be 32bit. Problem is that people rarely add types, you need to infer 90% of them.

Re: Common Lisp homepage

#279
post #23

Earlier quoted context omitted.

Types are supported since the 80ies, with (the) and optional declarations. Almost nobody uses them. Well, CL says: types are always carried around in every value, so we do have types, and we are always type-safe. Which is a proper point. Then SBCL has superior internal type support in its python compiler, leading to many optimizations. It creates specialized copies of typed methods, and has a nice optimizer framework…

Typed Racket is more ambitious than other attempts at adding types to an underlying untyped language. Namely, Typed Racket guarantees that typed code is never to blame for certain contract violations, and, if any such contract violation happens, it will be properly traced back to an offending piece of untyped code. This is what makes gradual types gradual (as opposed to merely optional), alas, it is also what has bee…

I think this is the correct video link.

https://www.youtube.com/watch?v=5DlEj6daNEo

Re: Common Lisp homepage

#280

This is not good , the info density for the screen area is too low. This could have been one maybe two screens worth. Is this the credits to Friends? Am I consuming Lisp Content while chillin in my penthouse on my 20k couch using a gold plated IPad X Tablet? Millennials are Killing Common Lisp. one page, https://www.rust-lang.org/en-US/

Counterpoint: I think the Common Lisp page does a good job giving good examples of interesting features, leaving me curious for more. The web benchmark is intriguing [1], and i'm really happy they gave an example of a good IDE, which so many language presentations completely overlook. The tooling is what I, as a developer, will interact with daily ! I don't care if you language can do fizzwabble if I can't make heads…

I should have been clear, I am only critiquing the presentation, not the content. The content is stellar.
Post reply on HN