jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
longshi has left #lisp ["WeeChat 2.3"]
meepdeew has joined #lisp
LiamH has quit [Quit: Leaving.]
xkapastel has quit [Quit: Connection closed for inactivity]
emerson has joined #lisp
<no-defun-allowed> what was that program that typeset mathematical equations using boxes and stuff in the terminal?
<no-defun-allowed> *library
slyrus has joined #lisp
fikka has joined #lisp
robotoad has quit [Quit: robotoad]
Kaisyu has joined #lisp
johnjay has quit [Ping timeout: 256 seconds]
Kaisyu7 has joined #lisp
anewuser has joined #lisp
dorketch has joined #lisp
Bicyclidine is now known as Bike
sjl has quit [Quit: WeeChat 2.2-dev]
jochens has joined #lisp
robotoad has joined #lisp
jochens has quit [Ping timeout: 272 seconds]
dorketch has quit [Ping timeout: 240 seconds]
wusticality has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
17SAAZZNI is now known as slyrus
anewuser has quit [Read error: Connection reset by peer]
jiby has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
slyrus1 has joined #lisp
dale has quit [Quit: dale]
warweasle has quit [Quit: later]
slyrus1 has quit [Ping timeout: 268 seconds]
Oladon has joined #lisp
wusticality has quit [Ping timeout: 246 seconds]
elderK has joined #lisp
sword has quit [Remote host closed the connection]
matzy_ has joined #lisp
dddddd has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 246 seconds]
<elderK> MOin all
esper0s has joined #lisp
khisanth_ has quit [Ping timeout: 244 seconds]
edgar-rft has joined #lisp
<elderK> Guys, when should I ask a question in #clshcool vs here?
khisanth_ has joined #lisp
<Bike> clschool is for learning the language, lisp is for when you've learned the language but not really
<Bike> probably just ask and we'll just go yeah that's more for the other channle
slyrus1 has joined #lisp
smokeink has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
smokeink has joined #lisp
DGASAU has joined #lisp
robotoad has quit [Quit: robotoad]
jochens has joined #lisp
permagreen has quit [Remote host closed the connection]
DGASAU has joined #lisp
igemnace has joined #lisp
charh has quit [Read error: Connection reset by peer]
<LdBeth> Good evening
_whitelogger has joined #lisp
dale has joined #lisp
swflint has quit [Ping timeout: 252 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<elderK> You know, the X3J13 issues are actually a kind of interesting read in and of themselves.
swflint has joined #lisp
Zaab1t has joined #lisp
lvmbdv has quit [Ping timeout: 264 seconds]
lvmbdv has joined #lisp
frgo has quit [Ping timeout: 250 seconds]
sjl_ has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
mercourisj has quit [Remote host closed the connection]
rippa has quit [Read error: Connection reset by peer]
DGASAU has quit [Ping timeout: 268 seconds]
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
nicksmaddog has quit [Remote host closed the connection]
rippa has joined #lisp
heisig has quit [Quit: Leaving]
frgo has joined #lisp
Inline has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
nly has joined #lisp
wilfredh has joined #lisp
anamorphic has joined #lisp
francogrex has joined #lisp
m00natic has quit [Ping timeout: 240 seconds]
<Xach> elderK: you know what else?
<francogrex> Hi, do you know if there is a way to mprotect a memory address to make it exec from lisp?
<Xach> francogrex: sure.
<Xach> francogrex: not a standard way
<francogrex> Xach yes ok i can live with the non-standard
mindCrime has quit [Read error: Connection reset by peer]
<francogrex> it's more experimenting, I am trying to
<elderK> Xach: nope? :D
<Xach> elderK: the comments in the TeX sources
v0|d has quit [Remote host closed the connection]
<Xach> elderK: also the gang of five email list, which was assumed private and has some gossipy snark
<elderK> That sounds fun :D
lvmbdv has quit [Ping timeout: 260 seconds]
<francogrex> cffi:foreign-funcall-pointer a pointer to execute an asm code, in my 32bit the address is executable, in 64 bit it isn't
<francogrex> so I though it might be worth trying to mprotect and see if that works
Roy_Fokker has joined #lisp
<elderK> francogrex: Yeah, if you've created some... "machine code", you're going to need to tell the system to treat that data as executable, the pages that it lives on
charh has quit [Read error: Connection reset by peer]
<elderK> Otherwise, you'll get a fault.
<elderK> So, you're going to want the memory you have that "code" in, page aligned, etc.
charh has joined #lisp
<elderK> So, I guess you'll need to use the FFI to acquire memory suitable for that "binary code", as well to make the relevant pages executable.
<francogrex> elderK: yes :) I understand the principle. but now the practical Q is how?
frgo has joined #lisp
robotoad has joined #lisp
<elderK> Use the FFI to give you access to functions to say, allocate foreign aligned memory.
<francogrex> do you have a pointer, a address (no pun intended) of a webpage that explains that?
<elderK> defcfun, etc.
<elderK> Just the CFFI manual I'm afraid.
<elderK> Or do you mean the actual calls you need to make memory like, executable?
<francogrex> elderK: yes the actual calls to make the mem address exec
<elderK> What you're probably going to want to do, is study the mmap and mprotect functions.
<francogrex> ok, i suppose that sbcl has already as a core function
<elderK> Studying the relevant manpages for those functions, and related ones, should do the trick.
<elderK> :)
<elderK> Yeah, mprotect will do it.
<elderK> If sbcl doesn't give you some call for that, you'll need to use CFFI.
<elderK> :) Hope that helps some.
v0|d has joined #lisp
<francogrex> elderK: yes i actually could use the cffi to do those indeed (in an impl independent way)
<francogrex> thx
<elderK> NP Glad to help :)
cage_ has joined #lisp
scymtym has quit [Ping timeout: 276 seconds]
kdas_ has joined #lisp
kushal has quit [Ping timeout: 256 seconds]
LiamH has joined #lisp
<luis> The CFFI manual includes an FFI tutorial, FWIW.
<pjb> francogrex: the how is easy: write it in C; the translate it to lisp using CFFI for the calls and data structures that cannot be translated.
azrazalea has joined #lisp
lvmbdv has joined #lisp
jgkamat has quit [Ping timeout: 276 seconds]
azrazalea has quit [Ping timeout: 250 seconds]
<jcowan> Better yet, write a C->CL compiler (or better, get Vacietis working). "Build a man a fire", etc.
<beach> froggey wrote a translator from LLVM IR to Common Lisp that is used in Mezzano.
<jcowan> Nice
<elderK> Goodnight all :)
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
schweers has quit [Quit: ERC (IRC client for Emacs 26.1)]
robotoad has quit [Quit: robotoad]
wusticality has joined #lisp
<wusticality> hey folks, i had a question about clojures in CL
<wusticality> how are the actually implemented? that is, if i have something like this:
<beach> Do you mean closures?
<wusticality> (let ((x 10)) (lambda () (incf x))) ; not sure if this is quite right
<beach> Looks right.
<wusticality> haha yeah beach, apologies, i've been working in clojure forever haha
<wusticality> that's funny
<Xach> wusticality: there is a lot of freedom of implementation, as long as the results are consistent
<Xach> wusticality: there's a great book that lays out many options, it's called Lisp in Small Pieces.
<wusticality> is only the -binding- for x captured in the closure, or is the entire lexical environment somehow
<wusticality> Xach: awesome i'll take alook
<beach> A function can be thought of as an environment and some code. When the function is called, the caller provides the environment to the callee. The callee can then create lexical variables extending the base one.
<wusticality> another question is if it's somehow done by the compiler / interpreter, or if it's somehow done with the respective function / macros let / lambda
<wusticality> beach: interesting - so is the callee's environment somehow passed as an invisible argument to the callee?
<beach> wusticality: The LAMBDA turns into some code that captures the current environment and packages it up to become the closure, i.e, the code/environment pair.
<beach> wusticality: Yes, typically in a register.
<wusticality> beach: is that an artifact of the lambda special form, or via a macro, or what? i'm mostly just curious if it's done in lisp somehow, or if it's an artifact of the compiler
<Xach> there's an older book called Anatomy of Lisp that may be available more cheaply, but I did not find time to read it and I don't know if it is useful on this topic.
<beach> Xach: I think it is useful.
<beach> wusticality: I don't know why you are talking about artifacts. And why you make a difference between "the compiler" and "lisp".
azrazalea has joined #lisp
<beach> wusticality: The compiler detects that X might be captured, so X is not allocated on the stack or in a register as it otherwise would.
<wusticality> I mean, I'm super familiar with closures, but reading Practical Common Lisp, I'm curious how it's actually implemented - that is, at the compiler / interpreter level or in lisp somehow using some macro magic
<wusticality> ah
<Xach> wusticality: Lisp in Small Pieces does a nice progression from a slow interpreter to a fast one by showing the tricks that can be brought to bear for efficiency.
<Xach> it is pretty neat
<beach> wusticality: Instead, it is allocated on the heap in some kind of structure. The compiler generates code for LAMBDA that captures that structure and the code for the function and creates a closure object.
<wusticality> i see, so lambda is definitely a special form i'm guessing
<shka_> it is
<wusticality> ahh
<beach> wusticality: When the closure object is called, the compiler has arranged for the caller to grab the environment out of the closure object, stick it in some pre-defined place, and call the code of the function.
kyby64 has joined #lisp
<wusticality> interesting
<wusticality> i definitely want to read more about how it's implemented, i'll check out those boks
<wusticality> *books
francogrex has quit [Remote host closed the connection]
<jcowan> alas, LiSP costs an arm and a leg and I know of no bootleg.
<jcowan> (in English)
<beach> jcowan: If you find a bootleg, I would like to know so that I can report it to the translator (who is my wife).
<Xach> I thought technical books were expensive until I got a tractor and priced useful attachments for it
<pjb> It doesn't cost that much. Just use Amazon and buy it!
<pjb> 72 euro.
<wusticality> pjb: which book
<pjb> LiSP.
<sjl_> Lisp in Small Pieces, which people confusingly abbreviate as "LiSP" to be punny.
<wusticality> oh dear
<beach> Isn't the French version of it or its successor available online?
<wusticality> copy paste, run through google translate :P
<wusticality> j/k
<jcowan> I think not.
<pjb> Nope.
<beach> OK.
<beach> I don't know where I got that from.
<pjb> And there's a 2nd edition in French that has not been translated yet AFAIK.
<jcowan> AFAIK there is no English version of the 2nd ed.
<beach> pjb: yes, that is true.
<beach> I don't think it will be.
<beach> At least, my wife has not been contacted about it. :)
<pjb> They can learn French.
<jcowan> I think more than twice before I buy any book costing more than USD 5 (approx EUR 4.5)
<pjb> jcowan: let that motivate you to read it!
<jcowan> People have learned languages to read just one book (notably Hebrew)
jgkamat has joined #lisp
<beach> Speaking of which, I should try to learn some Italian before I go to ELS2019.
<jcowan> My life expectancy does not permit me to think as many times as it would take to justify a purchase of that size. Not to mention the time it takes to learn French.
<wusticality> i'm surprised LiSP is not *ahem* available on google somewhere
<beach> wusticality: Like I said, if you find it, I will report it to the translator.
hiroaki has quit [Ping timeout: 252 seconds]
<beach> wusticality: She certainly would not sign your copy at ELS even if you begged her.
robotoad has joined #lisp
<shka_> hm
<shka_> first link that popped up in google shows 384,50 PLN for this book
ryan_vw has joined #lisp
<wusticality> i supposed another question is, is it any good
<wusticality> (i'm guessing so)
<shka_> that would be just over $100
<shka_> or about 90 euro
<beach> wusticality: It is quite good.
<wusticality> I'll throw it on the reading list
<wusticality> ttfn, gotta switch locations
hhdave_ has joined #lisp
<shka_> well, i gotta go
<shka_> see you all later
hhdave has quit [Ping timeout: 250 seconds]
hhdave_ is now known as hhdave
shka_ has quit [Quit: WeeChat 1.9.1]
wusticality has quit [Read error: Connection reset by peer]
ggole has quit [Quit: ggole]
<jcowan> $100 is the price I'm familiar with.
xificurC has joined #lisp
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 240 seconds]
hhdave_ is now known as hhdave
ryan_vw has quit [Ping timeout: 244 seconds]
jasmith has quit [Ping timeout: 268 seconds]
jochens has quit [Remote host closed the connection]
kyby64 has quit [Ping timeout: 240 seconds]
jochens has joined #lisp
varjag has joined #lisp
<cage_> minion: memo for Posterdati: probably you are interested in this: https://notabug.org/cage/cazzilli ;-)
<minion> Remembered. I'll tell Posterdati when he/she/it next speaks.
beach has quit [Ping timeout: 250 seconds]
ryan_vw has joined #lisp
jochens has quit [Ping timeout: 268 seconds]
kyby64 has joined #lisp
beach has joined #lisp
terpri has joined #lisp
slyrus1 has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
slyrus1 is now known as slyrus
astalla has quit [Ping timeout: 245 seconds]
lumm has joined #lisp
scymtym has joined #lisp
slyrus1 has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
slyrus1 is now known as slyrus
<luis> Xach: whoah, a tractor, nice. Be careful with those!
<Xach> I also have a chainsaw. I try to be very, very careful and use all available safety equipment.
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
wusticality has joined #lisp
xificurC has joined #lisp
SaganMan has joined #lisp
anamorphic has quit [Quit: anamorphic]
hhdave has quit [Quit: hhdave]
kyby64 has quit [Ping timeout: 245 seconds]
razzy has joined #lisp
wusticality has quit [Ping timeout: 268 seconds]
razzy has quit [Client Quit]
razzy has joined #lisp
frodef has quit [Ping timeout: 252 seconds]
anamorphic has joined #lisp
cage_ has quit [Quit: Leaving]
Kaisyu has quit [Quit: Connection closed for inactivity]
<luis> The LIDL supermarkets were selling chainsaws a while ago but I couldn't convince myself (or my SO) that I actually needed one. It was quite tempting, though.
orivej has quit [Ping timeout: 244 seconds]
shka_ has joined #lisp
<shka_> good evening
wusticality has joined #lisp
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
kdas_ is now known as kushal
Essadon has joined #lisp
<LdBeth> Good morning
vlatkoB has quit [Remote host closed the connection]
sobol has joined #lisp
ryan_vw has quit [Ping timeout: 252 seconds]
PuercoPop has quit [Ping timeout: 250 seconds]
eminhi_ has quit [Quit: leaving]
PuercoPop has joined #lisp
rozenglass has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
astalla has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 250 seconds]
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
meepdeew has joined #lisp
xificurC has joined #lisp
arbv has joined #lisp
cranes has joined #lisp
sauvin has quit [Remote host closed the connection]
xvx has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
xvx has quit [Quit: xvx]
xvx has joined #lisp
scottj has joined #lisp
orivej has joined #lisp
nicksmaddog has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
<dim> SSL verify error: 20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
<dim> that's from cl+ssl, is there a known quick-fix or approach to this problem? other tools on the same machine don't seem to have any problem...
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
anamorphic has quit [Quit: anamorphic]
anamorphic has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
milanj has joined #lisp
Kabriel has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
<anamorphic> Today I used cl:logandc2 for something.
<shka_> i use it all the time
<shka_> ^_^
<anamorphic> Seems like the bit twiddling features of Common Lisp are better than those of low level languages
<sjl_> that one seems like it almost *has* to be included for historical reasons... otherwise why not just use (logand x (lognot y))?
<shka_> sjl_: you are ending up writing such code so often that it makes sense to me to have it
<shka_> well, almost makes sense
<anamorphic> Right. There was probably a logand not on some ancient Lisp hardware
<housel> I think they just wanted to support all 16 possible boolean functios
<dim> using (CL+SSL:MAKE-CONTEXT :disabled-protocols nil :verify-mode CL+SSL:+SSL-VERIFY-NONE+) in (CL+SSL:WITH-GLOBAL-CONTEXT (ssl-context :auto-free-p t) (pomo:connect ...)) doesn't fix it :/
<shka_> anamorphic: CL is really cool for bit fiddling indeed, with ldb, dpb, logcount and other stuff in between
<housel> MACLISP BOOLE took a 4-bit integer that would implement all possible truth tables
<sjl_> I guess
<sjl_> the four missing log* ones are boole-1/2/clr/set which are all too trivial to deserve their own log* counterparts, I guess
wigust has quit [Ping timeout: 272 seconds]
wigust has joined #lisp
confusedwanderer has quit [Quit: confusedwanderer]
loli has quit [Quit: WeeChat 2.3]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
pierpal has quit [Ping timeout: 276 seconds]
terpri has quit [Read error: Connection reset by peer]
<dim> I'm not seeing anyway to fix that pesky SSL problem... I enjoy CL but sometimes I entertain thoughts of moving to a platform where I'm not alone with my difficulties, or just don't have them because someone else needed them fixed and it's been done already (not saying that racket or guile might be such platforms)
<dim> maybe I should just port pgloader to the JVM thanks to ABCL that said
<anamorphic> Xach: that's an awesome article
<anamorphic> I need to go poking around those Erik Naggum archives...
<jcowan> I did that a few weeks ago, and it was fun at first but eventually a monstrous weariness of spirit came over me
<jcowan> the dead attacking the deaa
<jcowan> dead
jmercouris has joined #lisp
<jmercouris> how does one make a lexical context?
<jmercouris> I've read "LET creates its own lexical context within the lexical context of the enclosing function"
<jmercouris> how does it do that?
<LdBeth> ((lambda (x) (lambda () x)) 1)
hiroaki has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jmercouris> macroexpanding let within sbcl yields nothing interesting
<LdBeth> because in CL lambda and let are not implemented like the same way is scheme
<LdBeth> ^ in
<jmercouris> right, I'm not interested in Scheme
<astalla> It is a special operator, the evaluator and the compiler treat it specially. But yes, at the core you can imagine it as a function application.
<LdBeth> but they are still equivenlent in the sense of formal definition
<jmercouris> I see, so it makes an anonymous function to create a lexical context?
<Bike> No.
<Bike> That's just something that would be equivalen.t
<jmercouris> I see
<Bike> Let makes a lexical context because it does. That is what it is defined to do.
<jmercouris> Bike: what does it actually do?
<jmercouris> okay, it has access to something special that we do not
<Bike> Sure you do. You can use LET.
<jmercouris> and if we are to reimplement let ourselves, we'd have to use anonymous functions as closures?
<jmercouris> am I getting it right?
<LdBeth> create a data sctructure called lexical context
<Bike> Depends on what kind of reimplementation you have in mind.
shka_ has quit [Ping timeout: 252 seconds]
<astalla> No, it does not. It is special-cased by the compiler/evaluator. But conceptually, it works as if it were a function application - without the overhead.
<Bike> You could define a LET macro expanding into calls to anonymous functions, sure.
<jmercouris> and what about let*, how might that look?
<Bike> let* is just a bunch of lets in a row, if you don't mind the declarations.
<Bike> (let* ((x ...) (y ...)) ...) = (let ((x ...)) (let ((y ...)) ...))
<jmercouris> so let* is just nested lets?
<Bike> Except for the declaration parsing, yeah.
<pjb> dim: the solution is to prepare a chain of certificate up to the CA, and to specify it to cl+ssl so it can do the verification. Disabling the verifications defeats the purpose of using SSL!
<jmercouris> Bike: a function that is enclosed by another, does it have access to the parent functions variables?
<LdBeth> of cause
<Bike> It can refer to outside bindings, yes. That's what a closure is.
<pjb> dim: use (CL+SSL:USE-CERTIFICATE-CHAIN-FILE certificate-chain-file)
<jmercouris> (lambda (x) (setf x 10) (lambda (y) (print x)))?
<Bike> Sure.
<pjb> dim: the chain file is the concatenation of the .pem of the certificates.
<Bike> (funcall that anything) => #<a function>. (funcall #<that function> anything) => 10
<pjb> dim: here is an example of a script building a chain with some specific certificates; adapt it to your needs: https://github.com/informatimago/test/blob/master/ias-ecc/build-chaine2
<jmercouris> okay, I'm asking these questions with a very specific goal in mind
<jmercouris> beyond just learning I have developed a macro called with-result
<pjb> dim: notice the Issuer/Subject links.
<jmercouris> it is a continuation passing style macro
<jmercouris> What it will do is if you type (with-result (xyz (some-func)) (print xyz))
<jmercouris> it will transform that (SOME-FUNC (LAMBDA (XYZ) (PRINT XYZ)))
<jmercouris> and now I am trying to make something like with-result* and I can't figure out how to do it
Mr-Potter has joined #lisp
<Bike> expand into nested with-results, i guess.
<jmercouris> Bike: can you provide me with an example please?
sbenitezb has joined #lisp
<Bike> (with-result* ((a (foo)) (b (bar a))) (baz b)) => (with-result (a (foo)) (with-result (b (bar a)) (baz b)))?
anamorphic has quit [Quit: anamorphic]
<jmercouris> I see, now to try to do that
anamorphic has joined #lisp
kajo has joined #lisp
<anamorphic> jmercouris: there is a book called Lisp in Small Pieces that will give you a better idea of implementation of lexical scope
<jmercouris> anamorphic: thanks for the reccommendation, I'll try to get to it when I can!
<Xach> the initial question is a little backwards
<anamorphic> cl:subst is my new friend when writing macros that work like templates :)
wusticality has quit [Ping timeout: 250 seconds]
sbenitezb has quit [Quit: Textual IRC Client: www.textualapp.com]
<no-defun-allowed> not quasiquote? ):
fikka has joined #lisp
<anamorphic> I could be doing it wrong.
jmercouris has quit [Remote host closed the connection]
nly has quit [Quit: Quit]
<dim> pjb: why the other SSL tools are okay with the OS defaults and not CL+SSL?
<pjb> dim: perhaps CL+SSL doesn't know how to access the system CA chain?
<pjb> the fact is they are installed all over the place.
<pjb> Each application (ie. browser) has its own…
<dim> in that case I'm doing PostgreSQL protocol with ssl and comparing to psql
<pjb> if you know where the OS default chain is, you can give that path to cl+ssl.
<pjb> For example, on my system /etc/ssl/certs/ is empty :-(
<pjb> I've got a /opt/local/libexec/qt4/certs/rootcerts.pem
<dim> on my laptop it seems to be /etc/ssl/cert.pem, on this pgloader user's debian system there are 456 files in /etc/ssl/certs, and I need to fix the problem for any pgloader's user, now and future
<dim> it need to just work, as works psql and many other apps just by default, without having me to do anything system specific each time
matzy_ has joined #lisp
<pjb> And there are a few more .pem files that seem to contain certs in /Applications/*.app
<dim> it seems to always come at a surprise here that someone would ship software written in CL to users who know nothing about CL, sometimes I'm thinking I'm doing it wrong :/
<pjb> No, you're a pioneer :-)
meepdeew has quit [Remote host closed the connection]
<dim> are we still talking about that programming language with a standard fixed in the 90s? it could be funny if it wasn't 2018 already
<dim> now there's https://github.com/thusoy/postgres-mitm/blob/master/postgres_get_server_cert.py that apparently knows how to retrieve the cert rigth from a live connection/socket, but I'm not sure what to do with that
Roy_Fokker has quit [Read error: Connection reset by peer]
Roy_Fokker has joined #lisp
ealfonso has joined #lisp
rumbler31 has joined #lisp
<Xach> dim: i wish i could help
<anamorphic> dim: so what are you coding anyway?
<dim> anamorphic: pgloader, it's on github, it does many things related to loading data in PostgreSQL, including full database migrations
<Xach> i wish the situation with secure connections was a lot better
<anamorphic> Oh yeah, pgloader is famous for switching from python to CL I think
<Xach> dim knows a bit about that story
rumbler31 has quit [Remote host closed the connection]
terpri has joined #lisp
<dim> it's less often that I tell it, and I still love the parts when I say that I searched for a modern programming language after having lost patience in the Python 2/3 situation ;-)
nicksmaddog has quit [Quit: Leaving]
<anamorphic> Funny how one needs to search the past to find a modern language
<dim> it stops being funny when you're the only one who can't establish a secure connection in between a given client and server both having openssl available in the OS, believe me
<Xach> dim: is it something you can reproduce locally?
<anamorphic> Yeah I totally understand that.
<dim> if I search for “postgresql X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY” 2 of the first page of answers on google are pgloader issues
<anamorphic> Yeah I have postgres running here - maybe if you can post a lisp paste (?) Can try it out
<dim> just open a connection using Postmodern and with a URL that requires SSL
<anamorphic> OK
<anamorphic> What impl do you happen to be using
<dim> you can first do the following in your shell: psql postgres://localhost:5432/dbname?sslmode=require to see it working
<dim> here it's with SBCL (because CCL is currently broken)
* Xach tries to do it with dockerr
<dim> thanks guys, I appreciate your help
<astalla> dim: have you tried asking to the CL+SSL maintainer(s)?
<anamorphic> Same (docker)
<anamorphic> dim: what version of postgres?
<dim> any would do I guess, this one happens to be PostgreSQL 10.5
<anamorphic> OK I have 11.1.. Will try with that anyway
<dim> thanks!
dueyfinster has joined #lisp
v0|d has quit [Ping timeout: 272 seconds]
Yaargh has joined #lisp
uint has quit [Remote host closed the connection]
<anamorphic> dim: OK psql postgres://localhost:5432/template1 -U postgres sslmode=require sees to work
<anamorphic> dim: do you happen to have a convienient postmodern code snippet handy? I've not used postmodern before
<dim> oh, if I set cl+ssl:*make-ssl-client-stream-verify-default* to nil then it connects on the laptop it seems
<dim> because otherwise it's like it still requires even if in the context you ask it not to... for reasons
<anamorphic> Hmmm I've never used that before
<anamorphic> Are you on the Windows?
<dim> yeah it seems to make the deal on the other server too
<dim> so as pjb said of course that breaks the whole idea of being secure, to a large extend, so it should not be the default
<anamorphic> That's about CA verification?
<dim> yeah, certs and things
<fiddlerwoaroof> minion: memo for schweers: this is probably entirely too late, but I wrote some code to allow defining anonymous generic functions that illustrates adding methods to a generic function https://github.com/fiddlerwoaroof/fwoar.lisputils/blob/master/glambda.lisp#L32
<minion> Remembered. I'll tell schweers when he/she/it next speaks.
<fiddlerwoaroof> I'm not sure if it's great code, and it's entirely undocumented since it was mostly a quick hack, but it did work.
<anamorphic> dim: Well today I learned that postmodern has a lovely API. Previously I used CL-SQL
Essadon has quit [Quit: Qutting]
<pjb> dim: I don't find any ssl stuff with my postgres installation; perhaps it uses openssl, and you'd have to look where openssl seeks the systemwide chain by default. Otherwise have a look at the documentation or sources; I'd guess you'll have to reproduce the code searching for that file in lisp…
astalla has quit [Ping timeout: 272 seconds]
anamorphic has quit [Quit: anamorphic]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
hiroaki has quit [Ping timeout: 250 seconds]
<dim> what PostgreSQL does is call SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, verify_cb), that's it, so the rest lies in OpenSSL itself
<dim> pgsql:postgresql/src/interfaces/libpq/fe-secure-openssl.c:1284
<housel> You could run postgresql under strace to see what files it's trying to open
anamorphic has joined #lisp
<dim> or I can expose the setting (cl+ssl:*make-ssl-client-stream-verify-default* nil) to the end user so that when then get CA failure they may choose to disable cert verification altogether
uint has joined #lisp
<anamorphic> dim: (member :windows *features*)?
Yaargh has quit [Quit: Going offline, see ya! (www.adiirc.com)]
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<fiddlerwoaroof> dim: you could add a restart like disable-cert-verification
<anamorphic> Was wondering if related to https://github.com/cl-plus-ssl/cl-plus-ssl/issues/54
<dim> anamorphic: NIL
<anamorphic> OK...
<dim> fiddlerwoaroof: my audience is people that know nothing about CL, restart isn't the right approach here, even though I love that they exist
<dim> but yeah I'm thinking of pgloader --no-ssl-cert-verification
<fiddlerwoaroof> Well, you could use handler-bind to say something like "SSL Certificate Verification failed, retry with verification disabled?"
<fiddlerwoaroof> And then supress that message if --no-ssl-cert-verification flag is passed
<dim> yes something like that is what I have in mind
<dim> it still feels wrong on many levels, but at least would render pgloader usable in some cases rather than none
<fiddlerwoaroof> I dunno, I think it's pretty standard to use this sort of pattern in common lisp
<fiddlerwoaroof> low level code signals a condition, libraries add recovery methods via restarts and your toplevel handles conditions and invokes the appropriate recovery method
LiamH has quit [Quit: Leaving.]
sjl_ has quit [Quit: WeeChat 2.3-dev]
<pjb> housel: strace is not enough, it may have an algorithm looking in some data structure before trying to syscall.
<fiddlerwoaroof> I wish we had a non-lisper friendly command line debugger.
<pjb> housel: like, searching in environment variables…
<pjb> fiddlerwoaroof: you can write it!
<pjb> clhs *debugger-hook*
<pjb> Don't disable ssl verification. Teach people on how to install certificates, and make it easy to do.
<fiddlerwoaroof> pjb: I know, my free-time project backlog is pretty full
<pjb> Win the lotto, hire lispers to implement it ;-)
<fiddlerwoaroof> I'm hoping someone uses that strategy to hire me
<dim> pjb: you're saying that as if you knew how to make it happen. any specific advice how to make it easy for CL on machines you're never supposed to log in?
<LdBeth> fiddlerwoaroof: me too
pierpal has joined #lisp
angavrilov_ has joined #lisp
angavrilov has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 245 seconds]
<dim> and now after like a dozen builds, I randomly get The alien function "CRYPTO_num_locks" is undefined.
<dim> who's wanting to fix CL handling of .so libs? please?
<dim> (oh ok I had removed a patch to src/hooks.lisp that fixes that problem on debian, but not sure if it's helpful on other OSes)
<anamorphic> Man it sucks that you're running into probs... Is this one a matter of email cl+ssl maintainer, hey updated the .so.N version?
<copec> What is the typical license for open projects that this community has gravitated towards?
<fe[nl]ix> dim: what is your TLS issue ?
Elephant454 has joined #lisp
<dim> fe[nl]ix: certs verification failing with CL+SSL and succeeding with psql
<dim> maybe the hook to (cl+ssl:reload) should always be there
<fe[nl]ix> what is the root cause ?
<fe[nl]ix> copec: there is no Lisp community
<fe[nl]ix> copec: but MIT is the most common
rumbler31 has joined #lisp
<copec> Thanks!
<pjb> dim: well, yes it may be difficult to know for random machines. That's why applications are bundled with their own certificate chains.
<fe[nl]ix> dim: I have a plan to fix the library issue for the common cases
<pjb> dim: did you link with libcrypto?
<dim> PostgreSQL doesn't have its own chain, so I don't know what's next there
<p_l> pjb: well, linux systems using openssl have somewhat standard location for "Web-friendly" list of CAs
<p_l> as well as ways to add certs there
<dim> fe[nl]ix: if you need guinea pigs I'll find some time!
<pjb> dim: if you linked with libcrypto, check that the symbol is present in it. Otherwise, you may need a different version of openssl.
<fe[nl]ix> dim: I'll try to write something down soon
<pjb> copec: I use AGPL3.
<p_l> dim: best would be if system default store (on typical linux system, it's in /etc/ssl, is used
<dim> pjb: this one is a classic of CL+SSL when used in an image that you restart, you need to (cl+ssl:reload) for reasons
<copec> Do you have a public repo profile (of projects) pjb?
SumoSud0 has quit [Ping timeout: 245 seconds]
<copec> ty
Elephant454 has quit [Remote host closed the connection]
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
anamorphic has quit [Quit: anamorphic]
Odin- has joined #lisp
SumoSud0 has joined #lisp
slyrus1 has joined #lisp
<p_l> I wonder if there's some kind of "trivial-initialization-lists" library
<p_l> where things like cl+ssl could add a hook for reloading
asdf_asdf_asdf has joined #lisp
<fiddlerwoaroof> There's an issue about this
fikka has quit [Ping timeout: 245 seconds]
Elephant454 has joined #lisp
SumoSud0 has quit [Ping timeout: 246 seconds]
angavrilov_ has quit [Remote host closed the connection]
lumm has quit [Quit: lumm]
Kundry_Wag has joined #lisp
SumoSud0 has joined #lisp
<dim> how to signal another thread/worker when using lparallel?
<dim> kill-tasks it is
<jasom> So I was looking at low-hanging fruit on the benchmark game, and noticed that OCaml was desetroying sbcl on the binary-trees test (this is essentially a GC/allocation test). I peeked at the code, and it was forking a new process for each parallel task, thus *greatly* reducing the peak heap size for any process. Applying the same change to sbcl got a 3x speedup
<no-defun-allowed> well that's slightly cheating but ok
SumoSud0 has quit [Ping timeout: 240 seconds]
<aeth> They all cheat
<Odin-> "Let's outsource GC to the operating system"?
<aeth> You see things like FFI, inline assembly, etc.
<jasom> no-defun-allowed: this is within the parameters of the benchmark; the liveness is defined for each item, and this does not change that
<no-defun-allowed> alright
<jasom> aeth: I thought inline assembly was no longer allowed (they changed the rules a bit in the past couple years)
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
matzy_ has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Remote host closed the connection]
<aeth> I guess you could argue that that's not inline assembly?
<jasom> interesting
<aeth> Are libraries allowed? Because if there are you can't really avoid define-vop because some libraries can use it to provide a fast path for SBCL
<jasom> indeed there appears to be no rule against inline assembly.
<Odin-> Why should there be?
<Odin-> I mean, if there was, shouldn't there also be a rule against using optimisation directives?
<aeth> Anyway, no matter what the rules are, what you wind up with is... basically... programs micro-optimized to the extent that you'll never, ever see in the wild, except maybe in a BLAS+LAPACK implementation or something (and *that* in itself might itself be gaming benchmarks in a sense because LAPACK is afaik often used to benchmark)
<Odin-> You don't need many operations to go from "benchmarks game" to "gamed benchmarks".
<White_Flame> "Metrics are a wonderful servant, but a terrible master."
fikka has joined #lisp
Bike has quit [Disconnected by services]
Bicyclidine is now known as Bike
nullniverse has joined #lisp
<asdf_asdf_asdf> Hi. Did in Common Lisp are events? I want use: (event-control-left 25), but in Lisp not have events. In JS is: addEventListener?
X-Scale has quit [Ping timeout: 246 seconds]
<Odin-> That's not actually a language feature of JavaScript.
<Odin-> I think it's considered a part of the DOM.
<Odin-> What's the context for this code?
<asdf_asdf_asdf> I want in console CMD in Windows move (shift) letter "a" about 10 position in right for example.
[X-Scale] has joined #lisp
wigust has quit [Ping timeout: 250 seconds]
[X-Scale] is now known as X-Scale
<asdf_asdf_asdf> Common Lisp in standard package not support events?