commit a3b0e47c94480fe261dcaa76ec5c3bd2a93a98fa from: Omar Polo date: Thu Nov 19 09:34:03 2020 UTC new post commit - 58b6d3d1b09fb2ef1a52cf7692c4795cb41fbd43 commit + a3b0e47c94480fe261dcaa76ec5c3bd2a93a98fa blob - /dev/null blob + 1f8439eaac43eb871e92c8ccd77e112e7fa53b90 (mode 644) --- /dev/null +++ resources/posts/love-for-cadr.gmi @@ -0,0 +1,29 @@ +I had this piece of data + +``` common-lisp +(("12345" (("Content-Disposition" "form-data" (("name" . "code")))))) +``` + +and I wanted to extract the cons with “name” and “code”. Armed with my ‘a’s and ‘d’s I wrote (interactively, one letter at a time) + +``` common-lisp +(caaddr (caadar thing)) +``` + +then I though “two function call is too much” + +``` common-lisp +(caaddaadar thing) +``` + +but ‘caaddaadar’ doesn’t exists. + +Life sucks even more now. + +--- + +P.S.: yeah, I was trying to extract data from the output of rfc2388:parse-mime. + +P.P.S.: yeah, I was trying to extract the wrong thing: “code” is the input name and “12345” is the value. + +P.P.P.S.: yup, eventually I replaced that with trivia (pattern matching.) blob - 527afa1c39f4e769dc89cda6e58f145bf263ab6a blob + 996644bf6b64cd884fd2bf2c5efb7f79eddbb04a --- resources/posts.edn +++ resources/posts.edn @@ -1,4 +1,10 @@ -[{:title "gmid update, cgi support and services" +[{:title "love for c(a|d)+r" + :slug "love-for-cadr" + :date "2020/11/15" + :tags #{:lisp :shitposting} + :short "caaddaaddaaddaddaa…" + :gemtext? true} + {:title "gmid update, cgi support and services" :slug "gmid-cgi-and-services" :date "2020/11/10" :tags #{:gemini}