freenode/#lisp - IRC Chatlog
Search
10:24:54
hajovonta
it turns out that my automation framework written in CL is so useful that I have to deploy it to other colleagues
10:26:10
mfiano
Be prepared. Perfect software with no bugs suddenly becomes fragile and time consuming to maintain once you incf its users :)
10:26:16
phoe
though judging by the fact that you've already written a useful thing, it's more #lisp than #clnoobs
10:45:46
hajovonta
the setup of the test is usually the same every time, and I quickly got tired of repeating the same task
10:47:47
hajovonta
at the heart of the thing is a basic CLI wrapper for SBCL which I put on github, https://github.com/hajovonta/cl-expect
11:17:16
hajovonta
as for usefulness, I already started using it as soon as it became usable - first half of the last year
11:19:18
hajovonta
and it just feels good that I don't have to be in the office to do work because I have a loyal servant :)
11:40:47
hajovonta
how can I declare a function definition ignorable? I have some created with flet, that I don't use in a particular macroexpansion, and SBCL style-warns about deleting unused functions
15:28:11
mitc0185
I am starting a side project using GNU Common Lisp -- part of the fun is using something that's a bit dated. Any words of caution before I go too far down this road? Should I use a different distribution?
15:31:12
pjb
then you may use sbcl or ecl (or clisp or abcl etc) depending on the deployment platform.
15:31:17
mitc0185
I'm actually on OpenBSD, and part of the reason I found GCL first was my inferior pkg_info skills
15:32:09
tazjin
I've been trying (and failing) to use ironclad to verify RSA signatures generated using the openssl command line utility, does anyone have experience with that?
15:32:47
beach
mitc0185: It is probably best to install SBCL directly from SourceForge, if that is what you decide to do.
15:33:14
pjb
mitc0185: you may have more luck with sbcl, indeed: http://www.sbcl.org/platform-table.html
15:33:21
beach
mitc0185: Then, it is recommended that you use Quicklisp to install the rest, including SLIME.
15:34:30
Shinmera
mitc0185: If you have access to a Windows, Mac, or Linux system, the easiest way would be to use http://portacle.github.io
15:35:03
jdz
tazjin: My (successful) experience with ironclad has been decrypting DSA-encrypted content.
15:35:07
Shinmera
Could also try to compile a portacle distribution on your own, but I can't say I have high hopes of that working.
15:36:22
tazjin
@jdz unfortunately DSA doesn't help me much, the end-goal is verifying a JWT RS256 (RSA + SHA256) signature. Fukamachi's jose library implements code (using ironclad) that looks like it should do the right thing, but it doesn't seem to work
15:36:56
tazjin
and I can't get any kind of RSA-verification (or message decryption!) to work with ironclad, unless the encryption/signing was also performed using ironclad (in which case it doesn't verify/decrypt in other tools)
15:43:58
tazjin
Shinmera: no salting, so I'm currently investigating padding as jdz mentioned, but I'm not sure if the padding is relevant for signing?
15:44:29
tazjin
at least the ironclad API doesn't explicitly expose padding parameters for signing functions, but there are some OAEP functions that could be called manually, I'll try that
15:45:07
jdz
tazjin: Just in case, my code is here: https://gist.github.com/jdz/fcc8c33904001468d6ce8c23e90cfb76
16:13:17
tazjin
presumably the ironclad on quicklisp is froydnj's, and not the sharplisper's version
16:14:39
shrdlu68
Ironclad's RSA is fine, it just doesn't do the encryption-block formatting in PKCS#1, which other tools may do.
16:18:14
tazjin
shrdlu68: ah, your rsassa-pkcs1.5-verify looks like exactly the thing I need, thanks again
16:36:31
Xach
Shinmera: my build host was off the network last night, and there were a number of interesting failures due to the network being down...that one surprised me a little
16:37:02
Shinmera
I could expand it into the file directly but that would mean having to update the file whenever the docs change, and having a gigantic index file.
16:37:38
Shinmera
If it's a big deal I guess I can try to figure out a way around it being needed during build?
16:42:30
Colleen
Extending harmony's segments https://shirakumo.github.io/harmony#extending_harmony's_segments
17:09:11
tazjin
shrdlu68: your code actually works for my use-case! Considering your license, I suppose you're fine with me selectively copying some of it into an open-source project with proper attribution?
17:10:42
shrdlu68
tazjin: I am! I wrote that code a while back, and I believe you're the first to find it useful.
17:11:11
mfiano
If I'm using the raw bindings %gl package, how should I pass in an argument that shouls be NULL as far as C is concerned? Do I have to make a null pointer with cffi or can I give it a 0 or something instead?
17:11:52
tazjin
shrdlu68: I'm actually mildly surprised by that, do people not interface with APIs using JWTs for authentication, and if they do - don't they validate their tokens? ;-)
17:47:28
Xach
In sbcl, if you get STYLE-WARNING: Undefined alien: "blah", does that portend runtime failure? Or is it not predictive?
17:48:40
Shinmera
If it is already loaded then it is a safe bet that a call to that function is going to fail.
17:51:51
Shinmera
Well, in any case where you need a package object, you can simply call find-package on whatever the user supplies to you to be sure you get a package object in the end.
17:52:10
Shinmera
Instead of having to do (etypecase thing ((or string symbol) (find-package thing)) (package thing))
17:56:09
selwyn
in my code <https://pastebin.com/shYiVPhp> i have a function that takes various parameters as arguments and returns a lambda function that depends on them
17:57:19
selwyn
it is working fine, though sbcl tells me that this lambda function is in fact a closure, and i don't see how the lambda function 'closes over' any of the parameters
17:57:56
Xach
Shinmera: I feel like I understand the general ensure-foo paradigm, but I tend to think of it as "either find one by this name or create one with this name and return it". I am having a hard time picturing having an object that might be a string or a package, and not knowing/caring, in the first place.
17:58:47
Shinmera
Xach: Well, think of say EXPORT &co. They all perform an operation on a package object, but accept package designators.
17:59:55
Shinmera
For another example of the same thing, in a lot of my applications where I have identifiers for objects I often want to have a function that performs some operation on it, but want to also let the user have convenience by allowing them to pass the function either the object directly, avoiding duplicate lookup, or the identifier.
18:00:51
Xach
I think package designators in import/export/shadow/etc can lead to poor understanding of what the operations are doing.
18:02:52
shrdlu68
selwyn: Don't know what you mean by "close over", but it does capture part of the environment where it's created, so it's a closure.
18:06:00
Shinmera
selwyn: A sufficiently smart compiler could notice that the referenced variable is never changed and fold it in at closure creation time, but that's probably quite tricky to do.
18:08:40
shrdlu68
selwyn: See the "Lexical Variables and Closures" section here: http://www.gigamonkeys.com/book/variables.html
18:15:09
Metabox
Hello. Lispers. I would like to learn LISP. Therefore, I would like suggestions of books to learn from.
18:18:35
selwyn
metabox, i am learning right now, 'practical common lisp' and 'on lisp' are good to start with
18:20:31
selwyn
last i checked, it was out of print but you can order it <http://www.lulu.com/gb/en/shop/paul-graham/on-lisp/paperback/product-22430842.html>
18:20:41
Metabox
I think I will start with Land of Lisp and take into consideration the latter books you have suggested for further study.
18:21:27
shrdlu68
First few chapters of Norvig's PAIP, Paul Graham's ACL, Let Over Lambda, and about a dozen more. Have fun!
18:23:38
random-nick
let over lambda is more a book about common lisp macros than a book about common lisp
18:23:47
Shinmera
The code it presents is broken and the amount of self-flagellation in it is reprehensible
18:24:07
Shinmera
It is written by the exact kind of person that puts other people off of lisp because they look like a douchebag
18:54:24
loli
I also enjoyed the insight of pointer-* and pointer-& which I used to make a better graph structure
19:41:37
rumbler31
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwij8PqVl9PYAhXjT98KHbSnA3wQyCkIKjAA&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpaG1-lPtIXA&usg=AOvVaw0xexiSUig1wpI3puwW8dcZ