freenode/lisp - IRC Chatlog
Search
8:40:46
pjb
afidegnum: you cannot install quicklisp in emacs. emacs implements emacs lisp. quicklisp is written in Common Lisp.
8:41:42
pjb
afidegnum: there was a (partial) Common Lisp implemented in emacs lisp, but it bit rot since introduction of lexical bindings in emacs lisp. You might want to work on it, it's emacs-cl. Then a port of quicklisp to emacs-cl would be envisageable.
8:44:36
pjb
afidegnum: slime is a kind if IDE letting you develop CL programs using emacs as an editor and user interface for the CL debugger, the CL repl, the CL inspector, etc. So indeed, you could install quicklisp using the CL you access thru slime. But it would be simplier to start at the terminal with quicklisp, since quicklisp also has tools to install slime.
8:48:47
pjb
Ah,sorry, I don't know anything about portacle. Shouldn't everything be already installed and available with it?
8:52:51
pjb
Is quicklisp already installed in your home director? Is there a file ~/quicklisp/setup.lisp ?
8:53:54
pjb
(load #P"~/quicklisp/setup.lisp") is all that is required to load quicklisp if it's already installed. You could add this form to your rc file.
9:33:26
Nilby
Just set the pixels, e.g: (loop for i from 0 below (length (zpng:image-data image)) do (setf (aref (zpng:image-data image) i) #xff))
9:38:10
flip214
but array allocation is likely to write some "sane" value into all pixels anyway, so why write twice?
10:01:25
flip214
still, it looks like a very common use-case to me, so IMO the library should support that.
10:02:05
Nilby
I like the simplicity of the library. Also transparent black is my favorite "sane" value.
10:23:39
pjb
oni-on-ion: I'm sorry, but I always assume people mean what they say. Not my fault if they're not able to say what they mean.
10:24:31
pjb
(If they were able to say what they mean, they wouldn't have to say it in the first place anyways).
10:31:22
dim
pjb: being able to say what you mean is a very rare gift, or only happens to people who never ever try to say anything complex, or open themselves to talking about their emotions and perceptions, so maybe try to be more a human than an english compiler?
10:32:35
dim
anyway that's off-context, my backlog doesn't show me the relevant conversation, but I still though it's important to say that
10:35:06
paule32
dim: i you point to me, .. i have a disscusion, and with my poor slengsh, and i was banned in #clschool
10:37:32
jackdaniel
paule32: I saw quite a few discussions with you and what I've noticed is that you ignore given advices, so while I'm not on #clschool I can guess where the ban may come from
10:42:03
paule32
the problem is, you (all) give me advices, and i tried to transform in do it your (me) self, so i am a little bit lame, and waste some time in playing with lisp, in this time, an other lisper give me hints, and as i was not answer, the lispers are wait and wait on reply of me, but i have some times no part back informations (most of things i am in a newbie
10:43:35
jackdaniel
the thing is that you ask for advice, then you reject it and person who spend time trying to educate you, well, wasted their time
10:44:44
jackdaniel
(and you reject it based on nothing, so it doesn't make really sense) - I'm saying it in good faith that you will try to reconsider this attitude (and I have nothing more to say on this topic)
11:04:40
moldybits
(defun f (&rest keys) (apply #'g keys)) ; this works, but how could i specify the key parameters properly for f, and then only apply them to g if they were set? (defun f (&key a b c) ...)
11:07:42
no-defun-allowed
it was surprising to me when i learnt about it, but it is correct CL surprisingly
11:10:12
pjb
(defun g (&key (a 0) (b 0) (c 0)) (list a b c)) (defun f (&key (a 1) (b 1) (c 1)) (g :a a :b b :c c) #|different defaults|#) (list (g) (f)) #| --> ((0 0 0) (1 1 1)) |#
11:10:40
pjb
(defun f (&rest keys &key a b c) (declare (ignore a b c)) (apply #'g keys)) (list (g) (f)) #| --> ((0 0 0) (0 0 0)) |#
11:12:06
White_Flame
the nuclear option would be to use a macro instead, which forces the syntax onto g right at the call site
11:17:00
Nilby
jackdaniel: Maybe that's why I seem to need to start with something ugly to make any improvement.
11:18:03
jackdaniel
Nilby: that was a joke. the point was that macros often obfuscate the code making it hard to read
11:18:15
Nilby
Perfect lambda list re-passing of complicated defaulting, etc, aguments seems like a little bit of glitch in CL.
11:23:37
jackdaniel
sometimes something is and sometimes something isn't, what means that something may be something different than something ,-)
11:25:21
moldybits
i want to be able to access slots as groups, for example the slots `x' and `y' as `position'. i wrote a macro that works but i wonder if it could be done better. for one, i'm not sure how to think about :before methods ...
11:26:16
no-defun-allowed
The method dispatcher picks the next applicable method in the same generic function, calls it, and returns its value(s).
11:26:32
jackdaniel
it could have been implemented by means of local functions, but afair there is some code walking involved to eliminate unnecessary closures
11:27:04
jackdaniel
(portable common lisp - base for sbcl's and ecl's implementation of CLOS module)
11:28:39
Nilby
I think I wish for a funcall-like-me or something, that works semi-magically like call-next-method.
11:30:44
flip214
Nilby: If I understand you correctly, you want to pass the same argument to another function?
11:30:55
mfiano
Keep in mind you may experience different behavior across implementations by changing the arguments for the next applicable method. The safety level determines whether it will error or not, and different implementations have different default safety levels. CCL is more strict than SBCL in this regard for example.
11:31:03
moldybits
samlamamma: something like (defclass point () ((x :accessor x :initarg :x) (y :accessor y :initarg :y))) (make-slots-group point (x y) position vector elt) (position (make-instance 'point :x 1 :y 2)) => #(1 2)
11:31:58
Nilby
Yes, but getting every nuance of argument defaulting, supplied-p-parameters, etc, exactly correct.
11:33:14
Nilby
shka_: I'm not really trying to do it, just thinking about it. I usually use an "ugly" macro workaround if I have to.
11:34:11
flip214
Nilby: (APPLY #'fn rest-arguments) should do the trick, as fn has to parse keyword arguments out anyway
11:34:32
shka_
if function wants to invoke other function, it may introspect lambda list of the function it is about to invoke
11:36:38
Nilby
shka_: That's interesting, I suppose one could make a "defun" that does that, similar to the code walking of defmethod to get call-next-method right.
11:37:07
samlamamma
moldybits: So (defmethod position ((point point)) (with-slots (x y) point (apply #'vector x y))) ?
11:37:59
Nilby
flip214: That works most of the time, but if you have arguments that weren't suppiled and got defaulted, then the are passed to the next function with the default values, instead of being not supplied.
11:37:59
shka_
Nilby: i would not bother with advance macro-magic, instead i would build object oriented protocol around funcallable objects
11:39:37
shka_
next, i would add something like "invoke" that would actually attempt to introspect whatever it is about to funcall
11:40:20
shka_
but again, i think that it is very complicated and expensive solution to very hypothetical problem
11:40:22
Nilby
shka_: That sounds like a cool idea, and is indeed like the MOP. But so far I'm not bothered enought by it to do so.
11:42:03
shka_
anyway, my point is that you can literally embedd almost anything in the CL, and it may not need to be super extra macro heavy
11:43:52
jackdaniel
Nilby: there is work on that. Fast Generic Dispatch by Robert Strandth to improve runtime dispatch, inlined generic functions to resolve dispatch at compilation time, implementations may have optimizations for simple methods (which doesn't involve too much hacks)
11:45:26
mfiano
I would also like to mention specialization-store for compile-time generic dispatch, even allowing specialization on optional/keyword arguments
11:51:57
Nilby
mfiano: I hope someday I'll have my code working well enough that specialization-store would help. It looks cool.
12:28:19
flip214
Nilby: if some arguments weren't supplied, your &rest won't have them, and so they'll not passed on either
12:52:57
Nilby
flip214: Thank you. But I've decided to just do (defmacro nil (&rest x) `(lambda ,@x)) and write the rest of my code using only quasi-quote.
13:06:15
Xach
heisig: what is the license for https://github.com/marcoheisig/sealable-metaobjects/ ?
13:13:43
heisig
Xach: Do you have a script that checks whether a project is well formed (license, description etc.)?
13:17:24
heisig
Something that library authors can run before submitting their project to quicklisp-projects.
13:21:41
Xach
i need :license, :author, and :description. some form of README file is not checked but would be useful to highlight.
13:23:41
heisig
One could also include some other community guidelines, e.g., how the :author argument should be formatted to make Quickref happy.
13:27:23
heisig
Xach: Should I hack a prototype and make a PR on quicklisp-client? Or should such a style guide be moved to a separate library?
13:29:37
Xach
heisig: I think it is suitable for quicklisp-client. I think it best to keep it extremely simple: check an asdf system for those three fields
14:34:53
pjb
You NEED to qualify symbols with a package where they are accessible, when they're not accessible in the current package.
14:35:14
pjb
You can make them accessible in a package, by using a package that export them, or by importing them directly.
14:36:08
Lycurgus
a CL thing that dealt with implementations from more than an install perspective would be nice
14:39:22
beach
skidd0: I find the code much clearer when every symbol except the ones from the current package and from the COMMON-LISP package has an explicit package marker.
14:42:05
skidd0
ah, that's my problem then. i was wondering why use-package wasn't finding the symbols
14:43:07
Lycurgus
"few people have the imagination for reality" - a goethe quote just seen as an opening quote on a movie
14:52:25
jackdaniel
schweers: they are adopted in four implementations already (sbcl, ccl, ecl and abcl)
14:57:59
jdz
My guess is that SBCL's interface is good and small enough and is the one implemented in other implementations.
15:01:27
jackdaniel
I wouldn't compare it to mop, it should be portable and stable under #+package-local-nicknames feature
15:01:58
jackdaniel
mop specifies additional protocols while pln modify existing constructs (like adding a new options to defpackage)
15:04:48
skidd0
so then on line 444 there, the format string is supposed to turn into a comment and ruin the rest of the code block?
15:06:18
pjb
First, it should query the readtable to detect what character the comment reading reader macro function bound to…
15:07:14
pjb
https://github.com/informatimago/rc/blob/master/common.lisp#L302 selects all the packages I want to have direct access of the exported symbols to, in CL-USER.
15:08:35
pjb
skidd0: yes, because I actually define a com.inforamtimago.pjb package, export them from here, and use this package in cl-user.
15:10:45
ebzzry
Xach: you may already be aware that the certificate chain of quicklisp.org is incomplete. just a reminder.
15:32:51
flip214
Xach: how about giving zpng an easy way to initialize a new image to white/black/transparent, directly via the MAKE-INSTANCE call?
15:33:17
flip214
"easy" as in "it's not required to calculate dimensions of an array, allocate and/or set it"
15:52:20
Josh_2
I have this sammich maker which I made for exercise 2.3 from PAIP https://plaster.tymoon.eu/view/1393#1393 I was wondering how I would make selection of specific types of fillings based on some rulesfor example if I have cheese then I don't want meat etc
16:17:46
gaze___
hey I think I'm misunderstanding something very basic about quoting. When something is quoted, does the reader go "inside" the quote and convert anything inside the quote into a reference to something, or is a quoted list just... a list of words and nothing else?
16:18:33
beach
gaze___: when the reader sees the ' character, it recursively calls itself to read what follows.
16:19:30
gaze___
if I have a (defun x (...) ...) ... (quote x), is there now a reference to x hanging around, or is it just the name "x" hanging around?
16:21:51
beach
gaze___: Read is going to create the symbol y in the current package, or return the existing symbols if it does exist.
16:22:03
Bike
(quote (x y)) will evaluate to a list of symbols. whether those symbols name functions is immaterial.
16:23:23
gaze___
okay I think we're getting closer to what I want to know... what exactly is a symbol then? does a symbol have to point to something or is a symbol just a name?
16:25:26
fivo
https://github.com/robert-strandh/Concrete-Syntax-Tree/blob/8d8c5abf8f1690cb2b765241d81c2eb86d60d77e/reconstruct.lisp
16:25:40
beach
gaze___: Common Lisp uses what I call "uniform reference semantics", which means that it is as if every object is represented by a reference, or a pointer.
16:27:11
fivo
Wouldn't it be somehow possible annotate R with the source locations before the macroexpand
16:28:52
beach
fivo: No, because the macroexpander takes a raw Common Lisp list, without any annotations.
16:28:59
fivo
I am not sure I make sense, but essentially annotate every subexpression of R with source location and then somehow do the macroexpansion
16:29:50
Bike
gaze___: whether it's quoted doesn't matter. (list 'x) '(x) (list (find-symbol "X" "WHATEVER-PACKAGE")) are all forms that return lists that refer to the symbol (so the GC would follow through)
16:35:08
beach
The main difficulty is that anyone can define a macro, so the body of the macro can't be turned into normal code, because then it would operate on raw Common Lisp expressions.
16:36:11
beach
So you would have to interpret or compile that code in a way that, when it operates on CONSes, like with CAR, CDR, CONS, it would instead have to emit the corresponding operation for the CST.
16:52:12
jgkamat
if any of you guys use the next browser, please update to the latest version, older versions had an RCE exploit
17:00:32
grewal_
A simple way would be to have, e.g., (meat-filling (cheese) (meat)). And then change your rules to choose one of them.
17:02:45
grewal_
Doing something like that quickly blows up the number of rules you have, so you might want to create a shortcut like (filling (2 *) (spread veg sauces herbs meat-filling)) where (2 *) means choose any 2,3,..., or all of the following items
17:09:48
_death
there's no need to constrain the specification to a "grammar".. you can just describe what you want in the most direct way and have an "engine" interpret it to provide the required outputs.. if performance becomes an issue you can then tweak the specification, add a compilation stage, etc.
17:10:35
_death
it reminds me of this post: https://groups.google.com/forum/message/raw?msg=comp.lang.lisp/-uoDKZeKBr4/qGgFy-M3mvoJ