Please add support for Common Lisp language

Revision en1, by Gleefre, 2022-12-12 21:58:03

Hello,

I have posted this as a comment to big old post About the programming languages, but this was probably not the best place to post to. So I am repeating it here with hope to get some kind of answer to it.

Common Lisp is a very powerful language that can run at speed of c++ and is even more expressive than python (IMHO). I think that it is really worth adding as supported language because it is a very mature language, which has a very reach set of features.

It was asked to add it as supported language for quite a few times now, starting from 13 years ago every 1-2 years.


In hope that it will be able to help (judging by comment to Julia request):

Here is an implementation of binary heap sort benchmark in common lisp: https://github.com/Gleefre/binary-heap-benchmark/blob/master/common-lisp/heap.lisp (and I'll be glad to create a PR if wanted).

One of the best open source common lisp implementations is probably SBCL which can be installed here.

A common lisp script can be run with sbcl like this: sbcl --script <filename>.

Or, if (probably) needed, with an increased/decreased dynamic stack size:

sbcl --dynamic-space-size <megabytes> --script <filename>. It's default value is platform dependent.

On my computer, heap.lisp benchmark results in a range of [693..846] ms with an average time of 701.69 ms.


The problem 1A — Theatre Square can be solved like this:

(defun theatre-square (n m a)
  (* (1+ (floor (1- n) a))
     (1+ (floor (1- m) a))))

(format t "~a~%" (theatre-square (read) (read) (read)))
Tags common lisp, programming languages, request

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Gleefre 2022-12-12 21:58:03 1769 Initial revision (published)