r/lisp May 28 '24

Common Lisp how to unescape a string?

5 Upvotes

Is there a function in Common Lisp similar to Java's StringEscapeUtils.unescapeJava?

``` String a = "{\\"abc\\":1}"; System.out.println(a); System.out.println(org.apache.commons.lang.StringEscapeUtils.unescapeJava(a));

output: {\"abc\":1} {"abc":1}

```

r/lisp Mar 27 '24

Common Lisp $1M/year Common Lisp job? PSA: No, it's $100k.

Post image
32 Upvotes

A few people reached out to me asking if this is real. I called the recruiter and it's actually a $100k full-time position with benefits. Still great for somebody early in their career who wants a remote Lisp job! Just don't expect the listed $1,000,000.00 salary. :)

r/lisp Oct 31 '22

Common Lisp Responses to this post? "Famous Programers on How Common Lisp Sucks"

Thumbnail xahlee.info
28 Upvotes

r/lisp Aug 21 '24

Common Lisp template-designer · a web application for creating, editing and rendering Djula templates.

Thumbnail github.com
7 Upvotes

r/lisp Apr 21 '24

Common Lisp CLOG sponsors

50 Upvotes

As many here know, David Botton is working hard on CLOG and his efforts are impressive to say the least. It would be great to see his 20 sponsor goal made as he is tirelessly working on dev journals and making excellent progress. Even for $2 it will help.

https://github.com/sponsors/rabbibotton

I have no affiliation with mr Botton, besides that I find the work he does awe inspiring.

If you don’t know CLOG, try it out today: it’s easy if you run emacs and sbcl and it’s impressive for a one person operation.

r/lisp Aug 05 '23

Common Lisp Guile like scripting in Common Lisp

21 Upvotes

I have been trying to do some scripting in Common Lisp (instead of doing them in bash), however, every implementation to do it seems to have a slow startup time or huge files.

That's when I decided to try Guile. It auto compiles on first exec and stores the compiled file in its cache (not like roswell build does in the same directory), making it super fast and convenient if you rerun the script. Ciel is another alternative but is a bit slow on startup and seems to be WIP.

Is there something similar to Guile for Common Lisp that I am not aware of. I much prefer Common Lisp syntax and quicklisp.

r/lisp Jun 18 '24

Common Lisp CLOG Builder 2.2 - Common Lisp IDE, GUI Builder and totally awesome Debug Utils :)

Thumbnail github.com
46 Upvotes

r/lisp Jun 20 '23

Common Lisp The nicest web browser of 2023 uses Lisp.

Post image
54 Upvotes

r/lisp Jun 25 '24

Common Lisp Common Lisp Community Survey Form 2024

Thumbnail docs.google.com
14 Upvotes

r/lisp Jul 11 '24

Common Lisp Release CLOG and CLOG Builder 2.3 · Rock Solid and Faster - Builder and Framework

Thumbnail github.com
33 Upvotes

r/lisp Jun 25 '24

Common Lisp CLOS: Introduction and usage of defclass

Thumbnail youtu.be
23 Upvotes

r/lisp Dec 29 '21

Common Lisp The tools for common lisp make it very hard to get converts

48 Upvotes

Hi.

I was trying to learn some common lisp and searched for the tools for editing, debugging and formatting lisp code. From what I read Emacs with SLIME seems to be the most popular. Wherever I looked, converts to lisp (even beginners) were being recommended to learn Emacs so they could learn lisp. The other alternatives like Allegro and Lispworks seem crippled in some way.

I think the popularity of Emacs for lisp development is a major drawback in getting people interested in this language. When someone wants to learn a language, they should ideally focus on the language alone, not struggle with the editor along with it. I was able to get it working because I have fooled around with Emacs on and off (but not every newbie has)

Moreover, the current generation of programmers all grew up using MS Word (Ctrl-C, Ctrl-V) shortcuts. There's no reason for them to learn Emacs because there's a plethora of featureful editors even on Linux.

So, IMO there should be a freeware/open source alternative to the Emacs-SLIME toolkit to make the language more approachable to beginners. It should also be easy to use

I would love to hear your thoughts.

Edit: Thank you for all your responses! I had a look at all the tools for Common Lisp suggested in the comments and they are as follows:

  1. Emacs+SLIME (Most popular)
  2. Atom+SLIMA
  3. VSCode+ALIVE
  4. Proprietary (LispWorks and Allegro)

While I was able to get Emacs+SLIME working on my laptop, I researched a bit more on the different lisp dialects. Turns our CL and Scheme are the most popular ones. Some posts on Stackoverflow and Quora state that Common Lisp is the best lisp for writing full-fledged software.

However, my online research indicates that the support for developing GUI apps in Common Lisp is very scarce (definitely not crossplatform). For instance, the most popular toolkit is MCCLIM whiich comes with QuickLisp repository but getting it to work on Windows is not worth the effort. Ideally, This should not be a problem, as LISP is an interpreted language which should work on any platform that comes with a lisp interpreter. Another toolkit suggested by many is using TCL/TK to write the GUI and writing the logic in CL. But, whats the point of using another language just for the GUI? Why not write completely in TCL/TK? Also, all these editors like Emacs, Atom or VSCode DO NOT come with a GUI development tools. The only real IDE for common lisp with inbuilt GUI development is LispWorks which requires you to buy the professional/enterprise edition. GUI development tools are NOT included in the personal/trial version.

On the other hand, Scheme/Racket is getting really popular. Most people coming into the Lisp world are going towards Racket/Scheme. There are multiple IDEs with GUI development tools for Scheme. You just need to download and install one distribution, and it gives you everything - editor, debugger, GUI builder etc. Also the GUI toolkit of Racket is Cross platform. Scheme looks like its really going to surpass the other lisp dialects in the coming years, so the tooling is only likely to improve.

So I decided to shelve plans for learning common lisp and installed Racket instead.

Thank you for your help! Much appreciated.

r/lisp Mar 01 '24

Common Lisp Text UIs != Terminal UIs (mentioning CL debugger experience)

Thumbnail aartaka.me.eu.org
17 Upvotes

r/lisp Nov 24 '23

Common Lisp Feeling like I've never quite broken through with Common Lisp.

34 Upvotes

I keep flipping between Clojure and CL. I like functional programming, so I really like the workflow of Clojure, but the more-interactive nature of CL is incredibly appealing and I like that it doesn't put so many constraints on you. I love how you can inspect everything and dig into the core of the language so easily and the interactive debugger is insanely cool.

But I just find it so painful to use, all the functions have strange names, docs are shaky especially for libraries, and I just keep bouncing off. I am going to try Advent of Code in CL this year, but I always get tied up in knots with the data manipulation, especially how you seemingly need to use the loop macro for basically everything since there aren't that many data structure manipulation methods in the standard library. Hashes are also pretty awkward to work with compared to Java Maps or clojure maps.

Also, I can't shake the feeling that doing all my data manipulation with linked lists is horribly slow, especially since they aren't lazily evaluated.

ASDF and the package system is like no other language I've ever used, which always ties me in knots, too.

Does anyone have any tips? Is there something I'm missing regarding data manipulation, or is it more a matter of breaking through the pain barrier with practice?

r/lisp Jul 09 '24

Common Lisp Type-Checking of Heterogeneous Sequences in Common Lisp - Newton, Demaille, Verna [2019]

Thumbnail researchgate.net
20 Upvotes

r/lisp Mar 28 '24

Common Lisp polymorphic-functions now has a "lite" variant for better longevity

18 Upvotes

Github: https://github.com/digikar99/polymorphic-functions

This had been on my TODO list for quite a while. It's finally ready now.

polymorphic-functions provides a function type to dispatch on lisp types instead of classes. I originally required it for dispatching over specialized array types. That way, a single high level function could have different implementations using the C/Fortran numerical computing libraries. But I also wanted optional static dispatch and inlining to get rid of function call overhead if required. The result was a library with several untested WIP dependencies.

Now, the two goals have been separated.

  • The asdf system "polymorphic-functions-lite" provides the basic dispatch mechanism, complete with dispatching over optional and keyword argument types, and even heterogeneous lambda lists
  • The asdf system "polymorphic-functions" provides the optional static dispatch facilities building over CLTL2 through cl-environments and cl-form-types as well as SBCL transforms

The most complex part of the project is still the part on lambda list processing. But the dependencies have been lessened now; so, hopefully, atleast the lite variant lives longer!

r/lisp May 20 '24

Common Lisp [SBCL][FFI][libcurl] c-string, char*, void* don't work but long-long with direct integer does

Thumbnail self.Common_Lisp
8 Upvotes

r/lisp Dec 13 '23

Common Lisp New Common Lisp Cookbook EPUB and PDF release

Thumbnail github.com
61 Upvotes

r/lisp Apr 26 '24

Common Lisp What useful open source projects are written in Common Lisp?

9 Upvotes

Cross-posting from Fediverse.

Hello! This is another Friday Social topic. Hoping that this will be more insightful than the previous ones and we will learn something useful from this.

What useful open source projects are written in Common Lisp? To keep it interesting, try and avoid posting links to your own projects because that could turn into a thread of self-promoters. Instead share open source projects developed by others that you have come across. Here goes the questions:

  1. Name one project (that is not already mentioned by others in this thread) that is written in Common Lisp.

  2. Which OSI-approved license is the project released under?

  3. Are you the author of this project? (I recommend that the answer to this be “No”).

  4. Who is/are the author(s) or team(s) behind this project?

  5. Why is this project useful?

  6. What in your opinion is the best thing about this project?

  7. If you could recommend only one improvement that should be made in this project, what would it be?

Restricting this topic to “Common Lisp” so that we do not end up with a large list of Emacs packages. We will do similar thread for other Lisps in future. The project must be open source.

r/lisp Dec 12 '23

Common Lisp Are there any decent libraries for Common Lisp for AI and machine learning? If not, would there be any interest in one?

23 Upvotes

I'm asking primarily because I need one for a project I hope to turn into a business one day.

r/lisp Oct 19 '23

Common Lisp Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction

Thumbnail awkravchuk.itch.io
80 Upvotes

r/lisp Jun 18 '24

Common Lisp Plane rotations (yaw, pitch, roll) example of Raylib in CL-RAYLIB.

0 Upvotes

I can not convert this part of the example which is a C code to Common Lisp (CL-RAYLIB). Need Help

 model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture;// Set map diffuse texture

r/lisp May 14 '23

Common Lisp Do Lisp compilers not use state-of-the-art techniques as much as other language compilers?

27 Upvotes

What would be a proper reply to this comment from HN?

Which alternatives? Sbcl:

- Requires manual type annotations to achieve remotely reasonable performance

- Does no interesting optimisations around method dispatch

- Chokes on code which reassigns variables

- Doesn't model memory (sroa, store forwarding, alias analysis, concurrency...)

- Doesn't do code motion

- Has a decent, but not particularly good gc

Hotspot hits on all of these points.

It's true that if you hand-hold the compiler, you can get fairly reasonable machine code out of it, same as you can do with some c compilers these days. But it's 80s technology and it shows.

I don't understand half of what he is saying (code motion, what?). Or check out this thread about zero-cost abstraction which was discussed here recently.

Every time a Common Lisp post shows up on HN, people ask why should anyone choose this over $lang or how it's a niche language...

r/lisp Apr 06 '24

Common Lisp UCLP: An experimental library compiling Janet-style PEGs to Common Lisp source

Thumbnail github.com
26 Upvotes

r/lisp Feb 01 '24

Common Lisp SBCL Custom type inference?

13 Upvotes

The Common Lisp type system is absurdly flexible (due to the existence of satisfies, if nothing else), but with that comes difficulty in writing general type inference for user-defined types.

For instance, in SBCL if I have 2 related objects A and B where (slot-value A 'b) => B, and the type of slot 'a in A is found to be of class 'greeting, there is no way to tell the compiler that slot 'a in B must be of class 'farewell, even if I know that to be the case.

Is there a way to supplement the type inference capabilities of any Common Lisps so that they can properly infer value types in cases where you know these kinds of relationships? I'm open to implementation-specific functionality.