Blame


1 a3b0e47c 2020-11-19 op I had this piece of data
2 a3b0e47c 2020-11-19 op
3 a3b0e47c 2020-11-19 op ``` common-lisp
4 a3b0e47c 2020-11-19 op (("12345" (("Content-Disposition" "form-data" (("name" . "code"))))))
5 a3b0e47c 2020-11-19 op ```
6 a3b0e47c 2020-11-19 op
7 a3b0e47c 2020-11-19 op 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)
8 a3b0e47c 2020-11-19 op
9 a3b0e47c 2020-11-19 op ``` common-lisp
10 a3b0e47c 2020-11-19 op (caaddr (caadar thing))
11 a3b0e47c 2020-11-19 op ```
12 a3b0e47c 2020-11-19 op
13 a3b0e47c 2020-11-19 op then I though “two function call is too much”
14 a3b0e47c 2020-11-19 op
15 a3b0e47c 2020-11-19 op ``` common-lisp
16 a3b0e47c 2020-11-19 op (caaddaadar thing)
17 a3b0e47c 2020-11-19 op ```
18 a3b0e47c 2020-11-19 op
19 a3b0e47c 2020-11-19 op but ‘caaddaadar’ doesn’t exists.
20 a3b0e47c 2020-11-19 op
21 a3b0e47c 2020-11-19 op Life sucks even more now.
22 a3b0e47c 2020-11-19 op
23 a3b0e47c 2020-11-19 op ---
24 a3b0e47c 2020-11-19 op
25 a3b0e47c 2020-11-19 op P.S.: yeah, I was trying to extract data from the output of rfc2388:parse-mime.
26 a3b0e47c 2020-11-19 op
27 a3b0e47c 2020-11-19 op P.P.S.: yeah, I was trying to extract the wrong thing: “code” is the input name and “12345” is the value.
28 a3b0e47c 2020-11-19 op
29 a3b0e47c 2020-11-19 op P.P.P.S.: yup, eventually I replaced that with trivia (pattern matching.)