libera/#commonlisp - IRC Chatlog
Search
9:35:35
nij-
Those who have used accesses - while it is great to access a place given by a variable, it doesn't seem to be working for a general place form like this
9:36:51
nij-
If I want to extend the behavior, I need to hack the function accesses to expand the inner forms, right? Is it possible in principle?
9:43:59
nij-
Ok.. without stupid mistake (hopefully), here's a case that's expected to work but not:
9:56:52
phoe
first, (setf (access:accesses (nth 0 *X*) '(:a :type :plist)) nil) because it is 1 at the moment
9:57:10
phoe
then, (setf (access:accesses (nth 0 *X*) '(:a :type :plist) '(:b :type :plist)) 10) to push into the new plist
9:59:49
phoe
either that, or implement type errors in access itself - it should tell you that it cannot treat 1 as a plist
12:35:25
pjb
nij-: have a look at https://github.com/informatimago/lisp/blob/master/common-lisp/cesarum/file.lisp#L248 & following.
12:35:45
pjb
nij-: what's wrong with http://groups.google.com/group/comp.lang.lisp/msg/1bab4b5bae1fdca3 http://groups.google.com/group/comp.lang.lisp/msg/190d771c0e033a1c ?
12:37:06
pjb
nij-: also, access seems to be like & and defref: http://informatimago.com/articles/usenet.html#C-like-pointers-in-Lisp
13:15:27
VincentVega
How does SBCL decide when to call a compiler macro? I am trying some examples from CLHS define-compiler-macro and the original function is called.
13:17:23
phoe
all examples up to (funcall (compiler-macro-function 'square) '(funcall #'square x) nil) work as expected
13:20:10
beach
VincentVega: As I recall, the OPTIMIZE values may determine whether the compiler macro is called.
13:22:53
phoe
VincentVega: and check the SBCL manual for optimization qualities, maybe some high DEBUG or something can cause SBCL to not use compiler macros
13:24:48
phoe
#sbcl might provide more information, or the devs could write something in the manual about how CMs are treated
13:26:37
VincentVega
phoe: thanks! I will probably ask there. http://ix.io/3M4h optimization options didn't turn out to have an effect.
13:31:39
VincentVega
oh, nevermind, top-level compiling it was the reason. Putting it in a function definition works out just fine.
16:00:39
rotateq
Okay definitely one of the most funny lines I read in the last days. :) "Sometimes, when the full moon rises and foolish programmers declare (optimize (safety 0)), you can hear the howl of the Loopus, and screams of source code that is ripped to shreds."
17:27:01
ksp
Hello, does anyone know how to split a string by a specific character? I want each line of my data to be a seperate string
17:29:01
jackdaniel
you may find a manager to easily download libraries and quicklisp.org ; as for introduction
17:29:04
minion
ksp: please see pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
17:40:16
rotateq
jackdaniel: and I no more confuse the other PCL abbreviation (Potable Common Loops)
17:41:35
rotateq
since some longer time now ^^ first I thought "hmm, what shall this sb-pcl module name stand for?"
17:54:27
jackdaniel
btw there is an interesting history behind "mixins" and "flavors" (so I've read somewhere) - there was an icecream shop on the campus where they were invented
17:54:58
jackdaniel
and they had this service, that they had a basic flavor and allowed to have a mixin - so you had a "vanilla" icecream with a "strawberry" mixin
18:33:10
rotateq
baggers has another example with his CEPL videos. sad that the docu isn't up-to-date
18:37:46
rotateq
like how doing it "cleverly" when it gets "wall is you" and you become multiple objects at once
18:38:46
rotateq
and it gets me to think more and more, without CLOS capabilities, how do they even do it in Lua without it becoming too messy? ^^ not to talk about more complex games
18:58:02
rotateq
like when a popular python tool is replaced but the API and superficial look leaves to be the same :)
19:26:47
lisp123
With sly, everytime I exit sly-db, it asks me whether I want to throw to the toplevel (y / n), is there a way to set this to y always?
19:29:35
lisp123
there's a clash between EVIL mode & Sly, so will need to fix that, but otherwise all good
19:48:02
Bike
say we had the code (let ((a (foo))) (map nil #'print a) (aref a 0)), and at some particular time FOO returned a list rather than a vector. how would people feel about an implementation that signaled a type error as soon as the list was returned, i.e. before doing the map?
19:51:05
edgar-rft
I would expect AREF to signal an error (after the MAP), not at the time of the the LET binding
19:54:09
Bike
that's how it usually works now. i'm asking how people would feel if it worked as in the hypothetical.
19:58:49
White_Flame
Bike: would that be because the type inference from aref hoisted up for the whole body?
19:59:38
White_Flame
I think that would be the actual consequence of what "type inference" means. It's about A itself
20:01:14
Bike
it would be inferring backwards from the fact that (aref a 0) is undefined unless a is a vector, yes
20:02:31
Bike
as far as i'm aware, no actual implementation does what i'm describing. they might issue a type warning at compile time if foo is declared to never return a vector, and probably signal an error from aref if it receives a non vector
20:03:25
White_Flame
with high safety and debug, are there runtime warnings when type declared bodies are entered with the wrong value type?
20:12:09
Bike
sbcl will signal an error if there's an explicit type declaration, but not for my example
20:17:05
jeosol
When writing a paper about CL, what is the canonical reference for CLOS in terms of reference citation
20:19:59
jeosol
NotThatRPG: Thanks, I think you are right. I remembered I have a copy of "OOP: The CLOS Perspective" and that is what they cited too for CLOS
20:20:43
NotThatRPG
jeosol: I think it depends on whether you want to give credit to the people who developed CLOS, or just point someone at an explanation of what CLOS Is.
20:21:44
jeosol
good point. But it's more as a reference too for people to understand what I am refering too. Lispers probably does but it's making adding reference appropriately
20:22:29
jeosol
I use SBCL primarily, so not sure if there is doc for SBCL CLOS(?) but I imagine since implementations are mostly compliant, I don't have to cite any specific to SBCL just that higher-level should cover everything
20:23:13
NotThatRPG
So if your readers are not familiar with CLOS the Keene book might be a better citation (or compromise and give both)
20:29:31
jeosol
Keene's book was what I read front to back to understand CLOS so it is definitely useful, guess for non CL folks