Live data from Hacker News

Ask HN: Best Lisp for software development?

news.ycombinator.com

101–110 of 138 posts

Re: Ask HN: Best Lisp for software development?

#101
post #85

Earlier quoted context omitted.

I don't think they're planning to deprecate Racket's current syntax, since they say they'll still support it and that the existing syntax has already reached about a "local maximum."[0] Full excerpt from Matthew Flatt (as of about a month ago): > Racket's design and implementation is on solid ground, and from this point, it can continue to evolve and improve in many ways. No matter how Racket evolves, the community i…

I really don't think any one starting a project for production environment will be happy with being told that existing programs would run, but expect no fixes or enhancements from now on. See how Perl lost programmer mindshare in the 2000s because of Perl 5 development had stalled in the favor of Perl 6. Racket is(was) a language to do home work assignments. I guess even their very dedicated users would either switch…

> but expect no fixes or enhancements from now on.

This is a common misunderstanding around the Racket 2 proposal. Racket is completely different from Python and Perl when it comes to syntax. Racket already supports multiple syntaxes over the same semantics, and is designed for people to be able to build new syntaxes themselves.

IOW, Racket 1 (more precisely: `#lang racket`) and Racket 2 will not be different runtimes, only different ways of writing what is to run. You cannot run Python 2 and Python 3 in the same process, or import a Python 2 module in Python 3 file; similarly with Perl 5 and 6. But a `#lang racket` (less precisely: Racket 1) module can be imported and run in the same runtime and context as a `#lang racket2` (less precisely: Racket 2) module.

Re: Ask HN: Best Lisp for software development?

#102
I would suggest that you look into Common Lisp (no surprise to anyone who knows me …). Why?

Well, it’s solid. I spent some years as a professional Python programmer, and it was annoying how things which were easy to do in Lisp were difficult or impossible to do in Python (e.g. change a file, reload it and have existing objects updated with the new definitions). Common Lisp offers all the hooks you might want to be able to mutate a system at runtime, but if you don’t want to, then you can just ignore them. I find this very graceful: standardise the possibility, but don’t mandate that one think about stuff one doesn’t need to (yet).

Another aspect of its solidity is how well the standard (ca. 1994) has stood the test of time. There are numerous implementations out there, and they all support the same language (modulo some small bugs, no doubt). Common Lisp code tends to be very portable, and tends to be easy to customise for different implementations and platforms when necessary (the way that FEATURES interacts with conditional reading of source is great). Libraries from twenty years ago still just work. That’s almost unheard of in any other language I’ve used.

Yet another aspect of its solidity is its error-handling capabilities, unmatched in any other language I’ve used. Its condition system offers code the ability to signal exceptional and non-exceptional conditions (specifically, errors, warnings and signals), to catch such conditions, to offer recovery strategies for such conditions and finally to choose between recovery strategies for such conditions — to include prompting for human input if desired. It is an amazingly powerful faculty. But like the ability to handle runtime redefinitions, you don’t need to use it at all if you don’t want to.

It’s high-performance, too, getting within an order of magnitude of the performance of C.

This all means that Common Lisp can be used for quick hacks, simple scripts and all the way up to long-running production systems.

To get started with Common Lisp you’ll want to take a look at Quicklisp, which is the community-standard compilation of free software libraries. It hooks into all the common implementations and offers a plethora of packages.

If you’re willing to use emacs (which I also suggest), then SLIME is very good, but the commercial implementations also have their own excellent IDEs which you might find you prefer.

I’ll be the first to admit that Common Lisp has some flaws, too — I would love to see a modern standard which specifies case-preservation as the default, standardises threads (or something like Go’s channels and goroutines …) and updates the pathname portion of the spec; I’d love to see something which works out a few of the historical bits (like weird argument orders in a few cases). But that stuff is mostly just nitpicking, like complaining that the breaks on a Lamborghini are the wrong colour.

Re: Ask HN: Best Lisp for software development?

#103
post #21

Look into SBCL (Common Lisp), Racket (Scheme), or Guile (Scheme). All three of these have enough library support to be used for real-world software development and are designed to exist within a modern (usually Unix-based) ecosystem. But don't try to introduce Lisp into your company, unless you are a cofounder of that company. It's a career limiting move. Instead, work on something you're fond of in Lisp during your…

>But don't try to introduce Lisp into your company, unless you are a cofounder of that company. It's a career limiting move.

I think this is correct, unfortunately, due to the place in history lisp occupied in the AI winter. As a result, it's looked upon as a failure, and people tend to dissociate themselves from such things, even when there is a body of evidence to the contrary demonstrating its efficacy.

Is that what you were alluding to or am I being too simplistic? I'm just trying to expand on your remark. :-)

Re: Ask HN: Best Lisp for software development?

#104

[Chicken Scheme]( https://call-cc.org ) is fast, makes native binaries, and has a giant library of "eggs" covering most of the SRFIs. It's R5RS working its way towards R7RS. I've been using it for my "Python but fast" code for the last year or so, and it's one of the best production languages I've ever had. [Chez Scheme]( https://scheme.com ) is super fast, and has the best REPL I've ever seen, but can't easily make…

Great response, I really like chicken when working on Mac or Linux, but it's windows (where I do most of my development) that it struggles.

Some eggs just don't install and the error messages are really bad at that point. Trying to install awful to develop a web api I had to give up, couldn't find a way of getting it installed on windows (no problem on OSX or Ubuntu 18.04)

Installed Portacle and (ql:quickload "hunchentoot") and was up and running in a few minutes.

A lot of lisp-languages could do with an equivalent to Portacle, an opinionated dev environment that you can install and just start coding, an area that Racket is excellent in.

Re: Ask HN: Best Lisp for software development?

#105
Most “progress” since CL has been very “one step forwards, two steps back”. The interactive development, amazing debugging (don’t unwind the stack), powerful macros, nearly-C-speed (if optimized), great tooling, etc. are mostly kept by other Lisps, but at the same time most every new language in the Lisp family loses some aspect of what makes CL great.

http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ is highly recommended, as well.

Re: Ask HN: Best Lisp for software development?

#106
post #104

[Chicken Scheme]( https://call-cc.org ) is fast, makes native binaries, and has a giant library of "eggs" covering most of the SRFIs. It's R5RS working its way towards R7RS. I've been using it for my "Python but fast" code for the last year or so, and it's one of the best production languages I've ever had. [Chez Scheme]( https://scheme.com ) is super fast, and has the best REPL I've ever seen, but can't easily make…

Great response, I really like chicken when working on Mac or Linux, but it's windows (where I do most of my development) that it struggles. Some eggs just don't install and the error messages are really bad at that point. Trying to install awful to develop a web api I had to give up, couldn't find a way of getting it installed on windows (no problem on OSX or Ubuntu 18.04) Installed Portacle and (ql:quickload "hunche…

I've never had a Windows, I'm a Mac nerd, but I'm looking into it for cross-platform binaries.

Option 1: MS has a Linux subsystem now. Problem solved, but maybe not customer-friendly.

Option 2: Cygwin probably works, I've seen John Cowan mention it in IRC.

Option 3: This somewhat messy process: https://wiki.call-cc.org/compiling-chicken-on-windows-xp-wit...

Re: Ask HN: Best Lisp for software development?

#107
I suggest Clojure too. I have a few years of webservices production experience with Clojure and must say that everything was more than fine. You don't need to work too much with Java (even if you will have to work a little bit with JVM if you plan to support things in production). The toolchain is very good and the community is small, but nice. There are many outstanding production-ready projects; my first hand experience was with: MongoDB, MySQL, RabbitMQ and, of course, web servers, so if your stack includes those, it is definetly a go.

I have also tried to deploy Clojure on AWS Lambda and it is definitely possible, even if not sure if it production-grade yet.

Re: Ask HN: Best Lisp for software development?

#108
post #8

Given your background, consider trying out hylang, which transpiles to Python and can use Python libraries. I played around with it a few times a couple years ago, but never developed a serious project due to limited tooling. The situation might have since improved. I've considered putting together an LSP server for it because it'd fun to use for personal projects and scripting.

Hylang is definitely interesting. I experimented with it an TensorFlow and eventually everything worked OK.

As someone else here mentioned, Python is where most of the deep learning action is. In the end, I settled in using Python for deep learning and use a thin REST service to use my models from Common Lisp or Haskell.

Another approach I used was to convert saved Keras models to something I could import into Racket.

But back to the topic: Hylang is a very cool project and does let you mix Lisp and Python.

Re: Ask HN: Best Lisp for software development?

#109
I built

Knodium ( Demo video: https://www.youtube.com/watch?v=gOPuWi-dbQg ; Technical video: https://media.ccc.de/v/c116_lisp_-_2013-08-25_11:15_-_buildi... (sound comes in after the first couple of minutes))

and

Registers.app ( https://registers.app )

in Chicken ( http://call-cc.org/ )

...and would recommend it.

The community in #chicken on freenode is really quite something. They're happy to help with all sorts of problems, even basic ones and get stuck in over and above expectations when problems get tough and technical.

Re: Ask HN: Best Lisp for software development?

#110
post #104

Earlier quoted context omitted.

Great response, I really like chicken when working on Mac or Linux, but it's windows (where I do most of my development) that it struggles. Some eggs just don't install and the error messages are really bad at that point. Trying to install awful to develop a web api I had to give up, couldn't find a way of getting it installed on windows (no problem on OSX or Ubuntu 18.04) Installed Portacle and (ql:quickload "hunche…

I've never had a Windows, I'm a Mac nerd, but I'm looking into it for cross-platform binaries. Option 1: MS has a Linux subsystem now. Problem solved, but maybe not customer-friendly. Option 2: Cygwin probably works, I've seen John Cowan mention it in IRC. Option 3: This somewhat messy process: https://wiki.call-cc.org/compiling-chicken-on-windows-xp-wit...

Cygwin is the best option because you can easily access all of the installed binaries for use with GUI emacs running in windows.

But I don't consider that to be a real native option, it is some kind of weird halfway house that sort of installs linux binaries but they are also kind of windows ones polluting your windows path.

Currently SBCL 'just works' on native windows, which puts it ahead for me if you are happy with both Scheme and CL.

Post reply on HN