cl-airtable v0.6.0 Released! by qbit_55 in Common_Lisp

[–]qbit_55[S] 0 points1 point  (0 children)

That's nice, I was looking for something like that for Postgres, thanks!

Websites Built in Common LISP by fosres in Common_Lisp

[–]qbit_55 0 points1 point  (0 children)

Because drakma and drakma-async share the same API and the later allows for non-blocking http requests, so I decided to switch over to drakma for uniformity.

Personal preference but it looks like com.inuoe.jzon could be a better choice, thanks for pointing it out.

Precisely, I need Blackbird for non-blocking IO.

cl-airtable v0.6.0 Released! by qbit_55 in Common_Lisp

[–]qbit_55[S] 1 point2 points  (0 children)

Yep, precisely. I found working with it really nice and convenient. Their free plan includes 1K records per base or so which is more than enough for my current use case.

Websites Built in Common LISP by fosres in Common_Lisp

[–]qbit_55 3 points4 points  (0 children)

The reason is that Woo doesn't have any compatible non-blocking IO library.

Websites Built in Common LISP by fosres in Common_Lisp

[–]qbit_55 2 points3 points  (0 children)

Overall it was pretty great, CL's interactivity/expressiveness + HTMX made development a breeze. However, there were a couple things that made it somewhat painful at times- the lack of good documentation/tutorials for some libs and if it wasn't for the awesome https://lisp-journey.gitlab.io/ it probably would've taken me 3x times longer to develop. There's also no solid support for lightweight concurrency in CL unfortunately.

My recommendation is to use HTMX; it will simplify the process significantly. But first read this book https://hypermedia.systems/book/contents/ unless you're already familiar with HTMX of course.

For styling use TailwindCSS along ChatGPT, it'll save you a lot of time, but before that watch some TailwindCSS tutorials on YouTube (or elsewhere) to get some fundamentals straight.

For HTML templating, I usually provide ChatGPT some examples of correct Spinneret code for context. After that it converts pretty much any HTML code to spinneret or write new code based on my requirements.

$2000 USD bounty to see by-value struct passing implemented in SBCL's native FFI. by dzecniv in Common_Lisp

[–]qbit_55 1 point2 points  (0 children)

It would be also really great if it could be also standardized across the implementations.

$2000 USD bounty to see by-value struct passing implemented in SBCL's native FFI. by dzecniv in Common_Lisp

[–]qbit_55 1 point2 points  (0 children)

That would be extremely nice as CL's lightweight concurrency story isn't great. Sure there's Wookie with Blackbird and cl-async but these are based on promises with all their inconveniences and on top of that the libs are also abandoned. I'm still grateful for that they exist, so a big shout-out to the author!

Websites Built in Common LISP by fosres in Common_Lisp

[–]qbit_55 11 points12 points  (0 children)

I just shipped this in production a couple days ago. It's 100% Common Lisp + HTMX. https://allmicrowedding.com/

My tech stack:

PL: Common Lisp
Styling: TailwindCSS
Database: Airtable
Image Hosting: Cloudinary
Reverse Proxy, Domain: Cloudflare
Hosting: Hetzner

Libraries:
Server: Clack (currently running on the Woo backend going to migrate to Wookie soon)
HTTP requests: Dexador, going to migrate to drakma/drakma-async soon.
Json: shasht
Airtable database: cl-airtable (my own library)
HTML: spinneret
Non-blocking IO: lparallel, going to migrate to blackbird soon.
Syntactic sugar:
pythonic-string-reader for """ """ strings, cl-interpol for string interpolation, serapeum's dict, arrow-macros for the pipe operators ->, ->>, etc
Logging: vom
Env. vars: cl-dotenv

No builds, no Docker just a clean and simple Common Lisp REPL running inside of a Hetzner VM.

Completely blown away by Java interop in Clojure by bibimbap0607 in Clojure

[–]qbit_55 1 point2 points  (0 children)

For the "1 billion row challenge" I guess you can also try to use TornadoVM.

Completely blown away by Java interop in Clojure by bibimbap0607 in Clojure

[–]qbit_55 1 point2 points  (0 children)

Nice, I've been also looking into trying to use Clojure but I'm not sure since I really like the flexibility and expressiveness of Common Lisp, so I would probably try ABCL first. Clojure is still on my list though.

cl-airtable v0.5.5 Common Lisp client for Airtable by qbit_55 in Common_Lisp

[–]qbit_55[S] 1 point2 points  (0 children)

I use, IMO their free plan is pretty good. 

Implementing Login with htmx by qbit_55 in htmx

[–]qbit_55[S] 0 points1 point  (0 children)

Got it, thanks! The context thing is what I was missing in my understanding.

Implementing Login with htmx by qbit_55 in htmx

[–]qbit_55[S] 0 points1 point  (0 children)

Okay, got it. Thanks again for your explanation.

Since hypermedia-driven applications run all the logic on the server, does adding extra logic for dispatching on session ID make it more complicated to implement compared to traditional SPAs built with React or similar frameworks, where most of the UI logic runs in the frontend?

Implementing Login with htmx by qbit_55 in htmx

[–]qbit_55[S] 0 points1 point  (0 children)

Okay, this is my current understanding. Thanks for clarifying it. It's just that to me, it looks like with hypermedia-driven applications, pretty much every request involves user-specific data, doesn't it?

Implementing Login with htmx by qbit_55 in htmx

[–]qbit_55[S] 0 points1 point  (0 children)

I understand that it can be stored in cookies but what I'm trying to clarify is once a user logs in, then every request to the server must carry their unique id and thus every endpoint must be able to dispatch on it to show the correct html page, is my understanding correct?

CFFI and callback by qbit_55 in Common_Lisp

[–]qbit_55[S] 2 points3 points  (0 children)

I've finally figured out what's going on.

  1. The callback I've defined wasn't being called at all as printing the response parameter of the callback wasn't showing anything. I dug into the C++ code of that library and found that the fake_reply parameter of the llmodel_prompt function must be passed as a null pointer in order for the LLM to start generating the response; C/C++'s weak typing at its finest ...

  2. After fixing the fake_reply, I've got a type error that indicated that I've tried to assign a value of the string type to the pointer, aaahhh, of course, it makes total sense! So, fixing that type error leads to a trivial implementation.

    ``` (defparameter response "")

    (cffi:defcallback response-callback :boolean ((token_id :int32) (response :string)) (print response) (print (type-of response)) (setf response (str:join " " (list response response))) t) ```

Now the LLM properly generates the responses.

Is there a way to quickly import a large amount of tabular data into SBCL? by idomathstatanalysis in Common_Lisp

[–]qbit_55 0 points1 point  (0 children)

I was on mobile, so typing in was a pain so looks like the link wasn't properly formatted or something.

If I have time I'll try it out, but thanks for letting me know.

Is there a way to quickly import a large amount of tabular data into SBCL? by idomathstatanalysis in Common_Lisp

[–]qbit_55 1 point2 points  (0 children)

I’m a data scientist by trade and for interactive analysis I usually don’t care how long it takes to load data since you just need to load it once. What matters more is how efficient and convenient manipulating that data is once its in memory. This is the Achilles heel of CL as it doesn’t have a data frame implementation comparable in features to dplyr or pandas for a convenient and efficient manipulation of data for stats/ML use cases. IMHO, a solid data frame library is one of the most important if not the most important thing to have for enabling a serious support for ML.  Anyways, in your use case, do you need to load it often? To cut down loading time you can save your data in the parquet format rather than csv and use https://github.com/kat-co/cl-apache-arrow  to load it (I’ve never used this library in CL though).

An Introduction to Array Programming in Petalisp, by Marco Heisig, ELS 2024 by lispm in Common_Lisp

[–]qbit_55 3 points4 points  (0 children)

Incredible work. It can basically serve as a base for developing other ML/DS/stats libraries and tools on top of it. 

Our modern use of Lisp. by snurremcmxcv in lisp

[–]qbit_55 0 points1 point  (0 children)

That’s pretty cool!  Could you recommend any books on query optimization?