Live data from Hacker News

Modern, functional Common Lisp: myths and best practices

ambrevar.xyz

141–150 of 161 posts

Re: Modern, functional Common Lisp: myths and best practices

#141

This doesn't scratch my itch at all. I love Lisp but boring old Python has the libraries I need. EDIT: Based on a comment and downvote I suppose I didn't make my point clear above. I am saying that myths are not the only thing holding Lisp back. (I may be wrong. I hope I'm wrong. Big thank-you to people who are linking ways to get libraries in Lisp, especially Python libraries.) I care 10x as much about libraries as…

> I love Lisp but boring old Python has the libraries I need.

¿Por qué no los dos?

https://github.com/metawilm/cl-python

https://github.com/snmsts/burgled-batteries3

https://docs.hylang.org/en/stable/

http://wiki.call-cc.org/eggref/5/pyffi

Re: Modern, functional Common Lisp: myths and best practices

#142
post #63

I hate the "lists of myths" (that aren't) genre. > Common Lisp does not have compile-time type checking. Nothing in the standard mentions compile time checking requirements and there is no useful de-facto standard that you (or tooling!) could seriously build upon either. I'd be suprised if python did not have better "compile-time type checking" for all practical purposes. Yes, SBCL gives much better type warnings at…

> Common Lisp has no eco-system to speak of for machine learning,

https://www.cliki.net/Machine%20Learning

> web development,

https://www.cliki.net/Web

https://en.wikipedia.org/wiki/Viaweb

https://en.wikipedia.org/wiki/Reddit#Technology_and_design (though it admittedly got rewritten into Python)

> command-line utilities,

https://github.com/TeMPOraL/hju, among, like, hundreds of other examples

> games programming,

https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

https://github.com/shirakumo/trial

http://xelf.me/

https://borodust.org/projects/trivial-gamekit/getting-starte...

> mobile development,

https://wukix.com/mocl

http://kriyative.github.io/2011/03/26/ecl-for-ios-updated/

https://common-lisp.net/project/ecl/posts/Lisp-ECL-and-QML-Q...

> GUI programming,

https://common-lisp.net/project/mcclim/

https://www.cliki.net/GUI

> embedded development

https://cliki.net/embedded

http://www.ulisp.com/ (not technically Common Lisp per se AFAICT, but seems to have very similar semantics)

> Building common lisp is a pain, because packaging/ASDF is terrible and you don't easily get a nice and small statically linked executable out either.

https://www.xach.com/lisp/buildapp/

http://www.sbcl.org/manual/#index-save_002dlisp_002dand_002d...

https://ccl.clozure.com/manual/chapter4.9.html

Re: Modern, functional Common Lisp: myths and best practices

#143
post #83
post #75

Earlier quoted context omitted.

Most Common Lisp is actually compiled, not interpreted. If one compiles code or loads compiled code to something like SBCL and dumps an image, you can both run it directly from that image AND have still have the development tools included. Some Common Lisp implementations also have delivery tools which create applications without development tools. Some applications though include the development tools, because they…

Of course many implementations do compile to machine code but there are also a few that don't (clisp, ecl, abcl). It is really complicated to talk about languages that have multiple implementations. That is why I went with "interpreter". That was pretty lazy of me :). But you didn't say anything about the original question. Have you seen Common Lisp code deployed as an executable or as source code?

To be clear, ABCL (if I understand correctly) compiles to JVM bytecode, which is analogous to "machine code" in the context of its target platform (and hell, is sometimes even literally machine code if you lack any semblance of sanity: https://en.wikipedia.org/wiki/Java_processor).

And ECL does ultimately compile down to machine code if you include "compile the resulting C output" in the compilation process, though this is optional.

Re: Modern, functional Common Lisp: myths and best practices

#145

Earlier quoted context omitted.

I haven’t used it myself, but EQL5 is attempting to make it possible to use ECL to iOS and Android apps

LispWorks also has offers an iOS/Android runtime, but no CAPI unfortunately.

The iOS runtime product allows you to write native libraries, but not do UI directly.

CAPI supports at least Mac, Windows, and Linux.

BTW, it just took me about 40 minutes using CAPI to reproduce what took a couple of hours this morning doing the same UI in Swift and SwiftUI.

Re: Modern, functional Common Lisp: myths and best practices

#146
> The myth: Common Lisp scripts and binaries are hard to distribute; binaries are too big.

As far as I can tell, it's more like you have to pick one or the other. Distribution is easy if you don't mind distributing a 50 MB image (which is, of course, trivial for some applications and catastrophic for others). Most of the suggestions on reducing application size are essentially accounting sleight-of-hand that doesn't actually reduce the overall footprint (I'm reminded of the compressor that can "compress" any file by one byte... by moving the byte to the file name).

Re: Modern, functional Common Lisp: myths and best practices

#147
post #63

I hate the "lists of myths" (that aren't) genre. > Common Lisp does not have compile-time type checking. Nothing in the standard mentions compile time checking requirements and there is no useful de-facto standard that you (or tooling!) could seriously build upon either. I'd be suprised if python did not have better "compile-time type checking" for all practical purposes. Yes, SBCL gives much better type warnings at…

web development: kind of agree, but that didn't prevent me and two other colleagues to build a commercial website last year, for 1,5 month. It receives tens of thousands of visits a month and has a small admin panel for a three persons team. Job done, rent paid CLI utils: it's simple to use cl-readline. There are a couple libraries for ncurses. The Lem editor is a good example. mobile: nope. For the adventurous, see…

CLI utils: you're missing the point. Of course you can write some simple terminal apps with common lisp, but can you name a single one that anyone who is not a lisp fanatic uses? If not, ever wonder why?

GUI: would you develop a commercial app (to pay your rent) in any of these apart from CAPI?

ML: You are joking, right?

Re: Modern, functional Common Lisp: myths and best practices

#148
post #147

Earlier quoted context omitted.

web development: kind of agree, but that didn't prevent me and two other colleagues to build a commercial website last year, for 1,5 month. It receives tens of thousands of visits a month and has a small admin panel for a three persons team. Job done, rent paid CLI utils: it's simple to use cl-readline. There are a couple libraries for ncurses. The Lem editor is a good example. mobile: nope. For the adventurous, see…

CLI utils: you're missing the point. Of course you can write some simple terminal apps with common lisp, but can you name a single one that anyone who is not a lisp fanatic uses? If not, ever wonder why? GUI: would you develop a commercial app (to pay your rent) in any of these apart from CAPI? ML: You are joking, right?

I can name one :) pgloader https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...

I'd use Electron with Ceramic, not the GUI bindings. Or maybe Nuklear. But I would build personal projects with them.

ML: yeah, yeah. Just to show there have been work on it, that (of course) the platform is capable.

Re: Modern, functional Common Lisp: myths and best practices

#149

Thanks for writing that up. Common Lisp as a language and ecosystem is so huge that we all have our own view of what CL is and how to use it to build applications. I have been actively using CL since around 1982 for prototyping and also building applications and tools but I feel like I use a small part of what is available, mostly because I prefer to use what I am used to. I should should probably spend a little less…

> Common Lisp as a language and ecosystem is so huge This is not true IMO, when compared with the languages of today. Even if you include the numerous little details of MOP, the CL spec is nowhere near as confusing as say something like C++ 17.

You are correct, of course. Java, Python, C++, etc. also have huge ecosystems.

Re: Modern, functional Common Lisp: myths and best practices

#150

Earlier quoted context omitted.

With k8s, you just create a service of type NodePort and it assigns a free external port for that service, which is mapped back to a specific port in the Lisp container.

What sort of encryption and authentication can I expect if I do that? Can anybody who guesses the port dump code into my running Lisp instance?

The encryption and authentication that the Lisp image exposes :)

Someone else mentioned that kubectl port-forward also adds these for you, so if you are not in a private cluster, it may be a better option.

Post reply on HN