jonatack has quit [Read error: Connection reset by peer]
hineios730393479 has joined #lisp
vaporatorius__ has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
vap1 has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
hineios73039347 has quit [Ping timeout: 246 seconds]
lavaflow has quit [Ping timeout: 260 seconds]
<pve>
Good morning! Is there a tutorial somewhere on how to define new asdf component types (specifically modules)? Something a bit more detailed than what's in the manual..
adip has quit [Ping timeout: 264 seconds]
<pve>
I'm going to have a directory containing some source files and a custom loader that knows how to compile and load them. So now I'd like to tell asdf about the custom loader.
nikkal has quit [Ping timeout: 260 seconds]
adip has joined #lisp
<easye>
pve: unfortunately there is no good tutorial to extending ASDF that I know of: I learned about ASDF from copying what others had done, and studying the ASDF source code.
<easye>
There is an extension for ASDF for dealing with Parenscript artifacts somewhere that might be a conceptually a little more in line what you want to do.
kopiyka has quit [Remote host closed the connection]
<easye>
A reasonable strategy to search for examples would be to examine Quicklisp systems that end in "-asdf" as these are usually ASDF extensions.
wxie has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
<pve>
easye: thanks, that looks great
libertyprime has quit [Remote host closed the connection]
<pve>
I'll try to find some systems with examples
lavaflow has joined #lisp
<nicktick>
how to define a function (compose f g) which could be used as (funcall (compose #'char-upcase #'code-char) 100) ?
<no-defun-allowed>
(defun compose (f g) (lambda (x) (funcall f (funcall g x))))?
shangul has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
or #'alexandria:compose
<Harag>
finally got sbcl and woo to work on "google cloud run" using buildapp to get around the HOME switching (/root to /home) that the "google cloud run" is doing on CMD command
<nicktick>
no-defun-allowed: thx
doomlist3 has joined #lisp
McParen has joined #lisp
<McParen>
hello
<beach>
Hello McParen.
<no-defun-allowed>
nicktick: ywlcm
lavaflow has quit [Ping timeout: 264 seconds]
<beach>
Heh.
<no-defun-allowed>
I should probably pick my own shortening.
<McParen>
if I define a function A, then define an alias B using (setf (fdefinition 'B) #'A), I get warnings when trying to use that new alias immediately when defining the next function.
<beach>
Probably because they are in the same file and you compile that file.
<McParen>
is the defun and the immediately following setf not defined at the same stage?
<no-defun-allowed>
I think so.
<phoe>
McParen: yes, that is the case
<McParen>
yes, they are in the same file. i figured out that i have to use an eval-when, but i dont really understand why
<nicktick>
why don't use (defun compose (f g x) (funcall f (funcall g x))) and (funcall #'compose #'char-upcase #'code-char 100) ? the result is the same as (defun compose (f g) (lambda (x) (funcall f (funcall g x)))) and (funcall (compose #'char-upcase #'code-char) 100).
<beach>
McParen: Top-level forms in a file are executed when the file is loaded, but you get the warning when the call is compiled.
<no-defun-allowed>
nicktick: Because the former doesn't really perform composition, but the latter does.
<McParen>
no-defun-allowed: i have already figured that out, but dont really understand why. are the defun and setf not evaluated at the same time?
<no-defun-allowed>
If o is your composition symbol, then (f o g)(x) = f(g(x))
<beach>
McParen: Did you see my suggestion?
<McParen>
yes
<no-defun-allowed>
I think the compiler gets function binding information at compile time, and the SETF isn't done at compile time; but I'm not very well versed on those.
<beach>
McParen: What no-defun-allowed said. You get the warning when the file is compiled, and then the DEFUN and the SETF have not been executed yet.
<McParen>
beach: oh, I understand now.
<McParen>
ok, i needed a second to understand what you said.
<beach>
If this is SBCL, at compile time, it checks whether the function being referred to exists, and if not, gives a warning. But the standard says that the definitions do not happen until the compiled code is loaded. And that includes other top-level forms like (SETF ...).
doomlist3 has quit [Ping timeout: 256 seconds]
<beach>
Now, for the first top-level DEFUN, the SBCL compiler makes a note that it WILL EXIST at load time and doesn't emit any warning. But the (SETF (FDEFINITION ....)) does not result in such a note being made.
<McParen>
thanks, that makes sense, the function using the alias had no runtime errors, it was a compile time warning by sbcl.
<beach>
No problem. Glad my explanation made sense.
<beach>
McParen: I suggest you read the Common Lisp HyperSpec page on DEFUN. It can be instructive.
<no-defun-allowed>
nicktick: Now, if I was to rearrange that, we get our definition of COMPOSE: f o g = λx . f(g(x))
<nicktick>
I can write function (compose f g x) == f(g(x)),but it's not (compose f g)(x) == f(g(x)) , so I should use a lambda function to define (compose f g)(x). is it right ?
rgherdt has quit [Remote host closed the connection]
<beach>
McParen: "In particular, DEFUN does not make the function definition available at compile time."
<no-defun-allowed>
Yes, you need to return a function of one argument that calls g with the argument, then f with the value of that.
<beach>
nicktick: You don't want the ultimate argument to be part of the composition. You want the composition to work for any argument.
<no-defun-allowed>
The Alexandria implementation allows for an arbitrary number of arguments, and an arbitrary number of functions to be composed, but in the case of one argument and two functions to compose, it is basically the definition I gave.
shka_ has joined #lisp
rgherdt has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
wxie has quit [Ping timeout: 246 seconds]
wxie has joined #lisp
jeosol has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
ldb has quit [Quit: leaving]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
pjb has joined #lisp
mrcom has joined #lisp
bhartrihari has joined #lisp
seok has quit [Remote host closed the connection]
john_ is now known as gaqwas
gaqwas has quit [Changing host]
gaqwas has joined #lisp
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
jeosol has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
nicktick has quit [Ping timeout: 258 seconds]
cosimone has joined #lisp
Va has quit [Quit: Vision[0.10.3]: i've been blurred!]
DGASAU has quit [Read error: Connection reset by peer]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
DGASAU has joined #lisp
toorevitimirp has joined #lisp
rgherdt has joined #lisp
kinope has joined #lisp
sdumi has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
sdumi has joined #lisp
akoana has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
doomlist3 has quit [Ping timeout: 264 seconds]
<|3b|>
Xach: thanks, will fix that soon
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
wxie has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
<flip214>
COMPILE returns multiple values, for warnings etc. Is there a way to get these as conditions?
wxie has quit [Remote host closed the connection]
EvW1 has joined #lisp
wxie has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
<|3b|>
hmm, steamvr added beta openxr support on windows, but supports d3d11 or vulkan :/
efm has joined #lisp
<|3b|>
guess i could try using just enough d3d or vk to talk to that and do the rendering in GL, assuming they haven't added it by the time i get back to VR coding
jeosol has joined #lisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
wsinatra has joined #lisp
heisig has quit [Quit: Leaving]
rogersm has joined #lisp
DGASAU has quit [Read error: Connection reset by peer]
shangul has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
even4voi1 has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
even4voi1 has quit [Client Quit]
dddddd has joined #lisp
even4voi1 has joined #lisp
even4voi1 has quit [Client Quit]
rgherdt has quit [Ping timeout: 272 seconds]
ahungry has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
wxie has quit [Remote host closed the connection]
even4voi1 has joined #lisp
DGASAU has joined #lisp
even4voi1 has quit [Client Quit]
<gendl>
overslept.
<gendl>
missed yoga this morning for the first time in like a month.
sdumi has quit [Ping timeout: 260 seconds]
fsalch has quit [Read error: Connection reset by peer]
shangul has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 246 seconds]
doomlist3 has joined #lisp
orivej has joined #lisp
<pjb>
Josh_2: what do you mean? Any book can be translated to (almost) any language.
<Josh_2>
pjb: it was a joke about how I didn't understand a word
<dlowe>
"it's French to me" = "c'est Chinois a moi"
<pjb>
C'est du chinois pour mois.
<pjb>
C'est du chinois pour moi.
<pjb>
But for an English speaking person, it's strange to say it's French, since English is the most latin german language, and French is the most german latin language. Basically English and French are the same, only English got the pronounciation all wrong.
<Josh_2>
But in England, if we don't understand something we claim it is French xD
<Josh_2>
A bit of historic banter
<shinohai>
It's clojure to me.
<Josh_2>
xD
<dlowe>
"it's Greek to me" is a more common idiom
<Josh_2>
not in England it isn't
<pjb>
or I guess in Germany, they're helenophiles.
<pjb>
"It's Hebrew to me" is classic…
rgherdt has joined #lisp
<dlowe>
topic is off the rails :)
toorevitimirp has quit [Remote host closed the connection]
sdumi has joined #lisp
Lycurgus has joined #lisp
<pjb>
rails is off topic here.
* Lycurgus
and off it's peak by some year fortunately
* Lycurgus
*years
Va has joined #lisp
Lycurgus has quit [Read error: Connection reset by peer]
nicktick has quit [Ping timeout: 256 seconds]
sdumi has quit [Ping timeout: 256 seconds]
Va has quit [Quit: Vision[0.10.3]: i've been blurred!]
orivej has quit [Ping timeout: 264 seconds]
sdumi has joined #lisp
flocks has quit [Ping timeout: 246 seconds]
<Josh_2>
With the MOP could I create a superclass that creates a lock for each slot within my class?
<Josh_2>
and then when you access one of these slots the lock is grabbed first?
<phoe>
I think so, yes
<Bike>
sure.
<Josh_2>
perhaps using the reader I could determine whether atomic operations could be used instead
<Josh_2>
I guess this is how Clojure has achieved "lockless" threading
<Josh_2>
you don't have to manually manage locks etc
<Josh_2>
I would have to learn more about the MOP first
<Bike>
i mean, some algorithms still require locks
<phoe>
you can create custom slot classes, create a custom metaclass to generate the locks, and modify the slot access protocol on the custom slots to perform (with-lock-held (...) (call-next-method))
<pjb>
Josh_2: AFAIK, this lock would only work around slot-value. This design would probably be very defective when you use other accessors.
<Bike>
oh, right, but clojure is jvm, so every object already has a lock
<Josh_2>
Bike: ah
<pjb>
Josh_2: check the notion of monitor provided in some other programming languages.
<Josh_2>
pjb: well couldn't I override the default accessors?
orivej has joined #lisp
<phoe>
don't the default reader/writer methods call SLOT-VALUE though?
<Josh_2>
hmm
<phoe>
if they do, then custom methods on SLOT-VALUE-USING-CLASS will have a chance to be invoked
<pjb>
Josh_2: probably, but specifically in the cases where it becomes difficult, it's the programmer who writes the accessor.
<phoe>
and the rest of the slot access protocol
<Bike>
yes, the slot accesosrs go through slot-value-using-class, or act like they do
<Josh_2>
I use locks quite a lot and It's a bit of a pita, so something like this is certainly a future project idea
<Bike>
7.5.2, "Reader and writer methods are implemented using slot-value. "
<phoe>
perfect
<phoe>
then the MOP approach will cover everything.
<Josh_2>
okay awesome :)
<Bike>
otherwise you couldn't practically define slot access behavior
<Josh_2>
This sounds like a good project for experimenting with the MOP
<pjb>
(defclass bank-accound () ((balance :initform 0)) (movements :initform '())) (defmethod deposit (b a) (incf (slot-value b 'balance) a) (push `(deposit ,a) (slot-value b 'movmements))) (defmethod movements (b) (decf +get-movements-fee+ (slot-value b 'balance)) (copy-list (slot-value b 'movements)))
<pjb>
Josh_2: Basically, your lock is useless ^
<Josh_2>
well if I can't change the default behaviour of (slot-value ..) with this class then I'll just say "don't use slot-value" xD
<aeth>
Your situation would require more, though, since all I'm trying to do with my MOP manipulation is ensure that the type remains unchanged so that I only have to typecheck once. (I came up with my system because I kept getting random NILs and they're particularly annoying in a game engine since they freeze the whole thing and they're never where the NIL was produced.)
<Josh_2>
hmm alright
<Josh_2>
you make use of (setf slot-value-using-class) so thats an example I could use
<aeth>
You are probably going to end up having to write custom sequences if you want to guarantee locking and you use sequences.
terpri_ has quit [Remote host closed the connection]
terpri has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
sdumi has quit [Ping timeout: 265 seconds]
EvW1 has quit [Ping timeout: 260 seconds]
sdumi has joined #lisp
EvW has joined #lisp
<pjb>
Bike: well, the classic bank account transfer operation involves two bank account objects. My example is worse: it's a single operation on a single object, but it involves two slots.
<pjb>
Monitors don't put locks around slot-value or accessors, but around all the methods of the object.
<pjb>
My example would be solved by monitors. The classic bank account transfer operation wouldn't be solved by monitors. This is probably why monitors are not in widespread use.
Harag has quit [Remote host closed the connection]
Harag has joined #lisp
flazh has joined #lisp
efm has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
iAmDecim has joined #lisp
doomlist3 has quit [Ping timeout: 256 seconds]
mangul has quit [Ping timeout: 265 seconds]
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
theBlackDragon has quit [Remote host closed the connection]
potta_coffee has joined #lisp
theBlackDragon has joined #lisp
iAmDecim has joined #lisp
liberliver has quit [Ping timeout: 246 seconds]
ozzloy has quit [Ping timeout: 260 seconds]
ozzloy has joined #lisp
ozzloy has joined #lisp
lavaflow has quit [Ping timeout: 265 seconds]
doomlist3 has joined #lisp
jeosol has quit [Remote host closed the connection]
lavaflow has joined #lisp
Inline has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: Quit.]
Inline has quit [Remote host closed the connection]
Inline has joined #lisp
iAmDecim has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
even4void has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
nydel has quit [Changing host]
nydel has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
MichaelRaskin has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
Inline has quit [Ping timeout: 246 seconds]
seok has joined #lisp
<seok>
I am finally moving from portacle to configuring emacs myself
<seok>
Is there a guide somewhere for a list of essential/useful packages for CL editing?
iAmDecim has joined #lisp
Inline has joined #lisp
jonatack has quit [Ping timeout: 260 seconds]
<Shinmera>
you could read the portacle emacs config
karayan has quit [Ping timeout: 260 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
Harag has quit [Ping timeout: 260 seconds]
iAmDecim has quit [Ping timeout: 265 seconds]
rogersm has quit [Quit: Leaving...]
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
jeosol has joined #lisp
iAmDecim has joined #lisp
gravicappa has quit [Ping timeout: 265 seconds]
<edgar-rft>
seok: I think the minimum is 1) lisp-mode (comes with Emacs), 2) Slime for the communication with the external Lisp process, and 3) Quicklisp on the CL side, everything else is optional.
<SAL9000>
seok: I'd also recommend smartparens or paredit (portacle comes with the latter)