freenode/#lisp - IRC Chatlog
Search
13:23:50
shka_
i thought that if two slots in a single class have the same :initarg it would designate that instances will initialize both of slots with the same value if said initarg was passed
13:39:08
lotuseater
it doesn't even say anything if you give multiple same initargs in the same slot
13:39:09
Bike
having initargs initialize more than one slot is intentional. the standard explicitly mentions it in 7.1.1 and i can imagine it being useful.
13:40:01
specbot
Initialization Arguments: http://www.lispworks.com/reference/HyperSpec/Body/07_aa.htm
13:43:48
lotuseater
(defclass foo () ((slot1 :initarg :slot1 :initarg :both-slots) (slot2 :initarg :slot2 :initarg :both-slots)))
13:56:36
adlai
to be precise, why could it ever be problematic? the keywords, and their corresponding arguments, should get evaluated precisely once each before the call to shared-initialize
13:57:36
adlai
ACTION can see this being a warning that people would want, and that others would deliberately ignore.
14:04:16
Bike
it's called by initialize-instance, reinitialize-instance, and also for class redefinitions and change-class
14:04:58
Bike
e.g., the standard method on initialize-instance is essentially (defmethod initialize-instance (i &rest in) (apply #'shared-initialize i t in))
14:06:11
Bike
and (defmethod reinitialize-instance (i &rest in) (apply #'shared-initialize i nil in))
15:46:17
lotuseater
Does anybody of you still uses &AUX in function arguments? Isn't it outdated or when is it really useful?
15:48:51
lotuseater
okay I look it up :) also found interesting article of you "What is wrong with Lisp?" (but transformed it for my eyes to PDF with org and pandoc, hope that is OK)
16:07:58
aeth
lotuseater: &aux is super niche and every time I think I need it, I wind up not using it... but one place where &aux could be useful is rebinding dynamic variables.
16:11:30
aeth
(rebinding dynamic variables in an &aux would make it part of the API of the function, as opposed to doing it at a LET in the body)
16:35:00
jeosol
I wanted to asked if it's possible to have a running SBCL session launch another creating a swank port in the process and the parent session then using slime-eval performing some computations
16:35:34
jeosol
so far, I have done this using docker (problematic, but works) and starting the sessions by hand.
16:36:30
jeosol
lotuseater: Morning to you. I have been told (in the past) that the universal greeting here is "Good morning" . I initially defaulted to my local time
16:38:50
beach
jeosol: Some people use their own local time, and it is interesting to see roughly where people are.
16:39:00
beach
lotuseater: But if everyone then answers with their local time, we will very easily get swamped.
16:39:44
jeosol
For the above, my use case, I am trying to do remote or distributed evaluations. Assuming of having images corresponding to two systems that accept x as an argument, think e.g., y=2x, and another z = x3+2x (in the real case, the same x value results in total different result).
16:41:24
jeosol
Bike: That's what I am still investigating, I haven't gotten it to work yet, I am looking at uiop:launch-program
16:42:21
phoe
you could launch a lisp image and pass it commandline arguments that will have it load up swank and open a swank server, then connect using swank-client or swank-crew from the C&C server
16:43:01
lotuseater
jeosol: okay good to know. it's funny having people from all around the world, so morning is anytime
16:43:14
jeosol
phoe: I haven't used swank-crew but did look at it, I could not get a small case to work because I wasn't sure where the workers are supposed to be running. In my case, they are not simple operations
16:43:17
phoe
swank-crew does not automate launching other lisp images though; I assume this is up for your OS framework to do
16:44:19
jeosol
phoe: I am doing the first part of what you describe, and using some bt-thread and uiop:wait-process, but I don't think I am getting it to work yet, it's exiting. But if I take the command string, paste it into a shell it runs fine
16:45:12
jeosol
phoe: yes, I am using the swank-client for the evaluations for the cases where I started the repls myself
16:50:50
jeosol
Additionally, I can say, I want to start optimizations with one function case, e.g., F(x) = 2*x, then I will fire up the repl for that, do some computations, then when I am done, I can then send some message to close it
16:52:09
jeosol
or if there is some library that does something similar or with bits, I'd like to take a look
16:54:52
jeosol
phoe: about swank-crew, I meant I have looked at it for managing and distributing the work but not starting the repls
16:55:07
adlai
ACTION supposes that is sane if both are actually identical compilers, on the same machine; beyond that, "now you have two problems"
16:56:27
jeosol
adlai: pardon that I use the word optimization loosely where where many might get confused with "code optimization". I am referring to mathematical optimization F(x) given some x, which each F1(x) and F2(x) corresponding to different images
17:48:48
sjl
I have a relatively long question about the MOP, defclass, and the evaluation of custom slot arguments. Pasted here to not flood the channel: https://gist.github.com/sjl/bc5903c62677f0a0ea16a2936e5d3c12
17:49:04
sjl
(the actual thing I'm trying to do is not quite as simple as this example, but this illustrates the problem)
17:57:18
Bike
the reason it's not getting the initarg is, iirc, that slot definition machinery gathers initargs from the direct slotds and applies inheritance rules, and it doesn't know about :tick so it just ignores it? something like that
18:02:28
Bike
i don't think there's any way to customize the evaluation like you want. the defclass macro always quotes extended options. I believe.
18:05:42
Bike
it would be tricky to extend the protocol, since you'd presumably want to use the direct slotd class to customize the macro behavior, but the class isn't known yet
18:08:10
lxsameer
hey folks, CL has more rules when it comes to quasiquotation, what does ",." resolves ?
18:09:11
Bike
«Anywhere ``,@'' may be used, the syntax ``,.'' may be used instead to indicate that it is permissible to operate destructively on the list structure produced by the form following the ``,.'' (in effect, to use nconc instead of append). »
18:14:41
Bike
sjl: you could define your own defclass replacement macro of course. i know that's not convenient, but ensure-class is pretty easy to use
18:38:02
sjl
Bike: yeah, that's what I figured. just wanted to make sure I wasn't missing something. thanks.
19:38:49
mseddon
Stupid question- anyone know if I can license some of the fonts from Genera? or is symbolics just a giant dead holding company now?
19:41:13
mseddon
although it seems very much quite a dead situation now, looks more like a guy in his basement selling boards for people who have to maintain old machines.
19:43:12
mseddon
well. that depends on who has them. there are naturally no copyright notices in the bdfs
19:44:18
mseddon
I suppose a bunch of them I may be able to yoink from the CADR, since MIT actually respond to emails
19:48:34
mseddon
meh. it may be easier and better to do it right and commission them from a font designer to be honest. It'd stand up better anyway.
19:50:46
mseddon
it's kinda easier these days now that we have high dpi screens and you don't need decent 72dpi font hinting
19:51:40
mseddon
yeah the fonts themselves are useless. They look cute and evoke a particular style, but even Cyrillic is not well supported imo
19:54:08
Lycurgus
i found garnet worked fine but it's not usable for anything new because it looks so stone age
19:57:33
mseddon
hehe, yeah. but for example garnet (which I recall from the Amiga days) was a great retro font.
22:08:52
arichiardi[m]
Hi there! I was wondering if anybody know whether CL bindings for LUKS functions (libcryptsetup)? No problem if not, just making sure I am not missing any :D
23:51:34
lotuseater
hehe I tried and it word: #1=(loop :for i :in '#1# :when (keywordp i) :collect i)
23:54:06
thmprover
Is there some way to check if a CL project name has been taken, or is currently in use? I have a horrible pun I want to use, but I don't want to steal it if someone else already has it.
23:57:01
lotuseater
yes! and writing LOOP words as real keywords is not only good for syntax highlighting but also something like DESTRUCTURING-BIND
23:58:34
lotuseater
thmprover: but for catching bigger area in the Venn diagram of names github would also be useful
23:59:06
no-defun-allowed
There aren't any other software projects called Netfarm, but there is an Italian open source consultancy named Netfarm.
0:00:06
no-defun-allowed
Prior to that, there was also GNU Nettle (a C cryptography library). So it's not just Lisp projects, and it's not just software projects either.
0:02:01
lotuseater
i wonder how difficult it is to realize good and safe cryptostuff in CL. someone told me two years ago the best is in deterministic aka direct assembly
0:05:08
no-defun-allowed
Ironclad makes an attempt to be constant-time IIRC, for example there is an equality operator that computes error |= x[n] ^ y[n], but it's really up to how the implementation handles things.
0:06:17
thmprover
My experiment with declarative theorem provers will henceforth occupy the CL-AIM project.
0:06:47
thmprover
CL-AIM will test my claim about the irrelevance of the choice for the foundations of mathematics.
0:08:16
lotuseater
thmprover: oh sounds interesting. i want to understand more how to work with ACL2, Coq and recently i read L∃∀N should also be good
0:09:26
thmprover
ACL2 looks fascinating. I have a love/hate relation with Coq, but my interest is in doing mathematics with theorem provers, not verifying software.
0:10:41
no-defun-allowed
ACL2 is very different. It does the theorem proving process automatically, but you usually need to steer it with lemmas, and it only does first order logic (no higher order functions).
0:11:20
lotuseater
yeah and my knowledge of category theory, dependent types is not deep enough yet. but Haskell drills me to widen it. but that's another story. and I know ACL2 is another approach than Coq
0:12:15
thmprover
Automath is a good way to learn dependent types, but it's quirky...it's not even in the lambda cube.
0:13:43
thmprover
no-defun-allowed: I thought that "wandering" aspect to ACL2 was particularly unique and intriguing.
0:14:29
thmprover
Wait, hypothetical question: CL is a lisp-2, so there are separate namespaces for functions and values, right?
0:15:36
no-defun-allowed
Yes, usually you would use a hash-table, and some accessor functions like FIND-THEOREM, (SETF FIND-THEOREM), ... to use the namespace.
0:19:10
thmprover
no-defun-allowed: that was my first instinct, too, but it is a "poor man's namespace" rather than a first-class namespace.
0:19:45
no-defun-allowed
I don't think there are first-class namespaces in Common Lisp. And if you implicitly FIND-THEOREM on some things, you wouldn't be able to tell the difference.
0:20:01
no-defun-allowed
eg (make-instance 'some-class ...) == (make-instance (find-class 'some-class) ...)
0:21:12
thmprover
Yeah, I was just curious if first-class namespaces were allowed. It seems like quite a niche thing, so completely understandable CL would not have it.
0:22:11
no-defun-allowed
And all the CL namespaces are just sets of accessors (occasionally with an environment object).
0:30:04
Bike
having an actual namespace would be most useful for when you want lexical bindings. not sure that's the case for theorems, though.
0:32:52
thmprover
I will have to study symbol-macrolet, I have a peripheral awareness of it, but haven't looked at it.
0:33:29
Bike
well, basically you can have your binding macro expand into (symbol-macrolet ((some-magic-symbol bindings)) ...), and then use (macroexpand-1 'some-magic-symbol env) to get the bindings.
0:36:23
thmprover
But you couldn't re-bind, say, 'let' (or some other builtin function) temporarily using symbol-macrolet?
0:37:09
Bike
let is a special operator, not a function. and symbol-macrolet deals with variables rather than operators. you can use macrolet to shadow operators.
0:44:30
Bike
oh, and you said CL was a lisp-2, but there are actually some more namespaces too, like the one for types and classes. doesn't come up immediately in the evaluation semantics though.