freenode/#lisp - IRC Chatlog
Search
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
19:47:34
jasom
I consider LoL as a "not bad" source for learning macrology, but not a good source of macros to actually use
20:22:27
phoe
There was this trick in X Windows that switched parentheses and brackets. Some obscure config option.
20:29:03
phoe
But there was some really weird config option in X server AFAIK that achieved the same effect.
20:33:22
random-nick
phoe: is this the post you're looking for? https://www.reddit.com/r/lisp/comments/78tx8f/typing_parentheses_the_lisp_machine_way/
1:15:07
babylisp
Something even funnier is asking a lisp programmer who stutters to read: (car (cdr (cddddr (cddddr list))))
1:15:10
rme
I'm always glad to see someone learning CL. I could do without that sort of attitude, though.
1:16:24
jmercouris
I don't think you'll offend somebody in this channel, as likely nobody here has a stutter, but just food for thought
1:17:12
babylisp
jmercouris: How is that offensive? I am sure anyone who stutters would find reading (car (cdr (cddddr (cddddr list)))) almost impossible.
1:17:33
jmercouris
I'm sure they might, what they may not like is you finding it funny that they have a problem
1:19:20
babylisp
I think what is most patronizing is people "affording" more courtesy for people with disabilities. It is borderline contempt.
1:19:31
jmercouris
I'm sorry if I came across the wrong way, not trying to be a moral warrior, I'm just offering an opinion
1:19:56
babylisp
jmercouris: fair enough, just having a conversation. Maybe I should tune down a lil though.
1:21:58
jmercouris
There is no moral truth, so let's just please drop this topic, as I'm sure we won't come to resolution
1:21:59
babylisp
In fact, excluding people from anything is contemptuous. It is what makes people feel disenfranchised.
1:25:33
Bike
So like, if you see a jock mocking a nerd for reading fantasy novels, say, you're like "ah, this is a healthy community interaction, these people are friends"
1:29:58
Bike
You said that if you DON'T mock people for stuttering, they'll feel left out and pitied.
1:30:38
babylisp
No, if we never have a joke about people who stutter while joking about just anyone else, it is patronizing.
1:34:18
Bike
You aren't, because you're doing the same thing. Some stranger makes a joke at the expense of nerds and fucks with me. You make a joke at the expense of stuttering strangers.
1:35:50
babylisp
And I am not discounting your feelings about the topic, I understand you have a strong stand against anything that could constitute bullying, and that is fair.
1:36:04
Bike
Of course you're not being _abusive_. You're not the guy taking the backpack. You're the guy in the background making jokes at the expense of the guy being bullied.
1:37:15
babylisp
You need to see my point of view, I am not even for making people excluded or less than others, let alone leave them abused or worst yet make fun of that.
1:37:47
Bike
I know you aren't making a conscious effort to exclude people. You just do it anyway and conceptualize it as hilarious.
1:38:47
babylisp
Bike: Look, I won't make jokes at the expense of bully, someone being physically harassed is not funny. I have actually got myself in big trouble many times in school over that.
1:41:35
babylisp
So, are we getting to the whole idea of Bullying Culture? Cause I think that is total bullshit.