<Oladon>
loke`: hehe, thanks -- I ended up getting _something_ working, so just in the "tweaking" phase now. If whatever you were doing with detach-socket is public, I'd love to take a look
Zotan has quit [Remote host closed the connection]
sammich has quit [Remote host closed the connection]
isoraqathedh has quit [Remote host closed the connection]
Posterdati has quit [Ping timeout: 272 seconds]
nydel has quit [Ping timeout: 272 seconds]
mathrick has quit [Ping timeout: 272 seconds]
ineiros has quit [Ping timeout: 272 seconds]
nydel has joined #lisp
samebchase has quit [Ping timeout: 272 seconds]
phadthai has quit [Ping timeout: 272 seconds]
cods has quit [Ping timeout: 272 seconds]
wxie1 is now known as wxie
jhei_ is now known as jhei
cods_ has joined #lisp
phadthai_ has joined #lisp
loke` has quit [Write error: Broken pipe]
rwcom1 is now known as rwcom
Posterdati has joined #lisp
aindilis` has joined #lisp
scymtym has quit [Ping timeout: 272 seconds]
aindilis has quit [Ping timeout: 272 seconds]
samebchase has joined #lisp
Khisanth has joined #lisp
Oddity has joined #lisp
prince1 has joined #lisp
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prince1 has quit [Ping timeout: 272 seconds]
thrashdin has joined #lisp
<thrashdin>
hi a quick question
<thrashdin>
quoting myself here
<thrashdin>
acsessing slots of a class within the class definitionI wanna know if thats possible or not ( I think not)
z147 has quit [Quit: z147]
edgar-xyz has quit [Quit: Leaving]
FennecCode has quit [Remote host closed the connection]
edgar-rft has joined #lisp
_jrjsmrtn has quit [Ping timeout: 265 seconds]
__jrjsmrtn__ has joined #lisp
karlosz has quit [Quit: karlosz]
stzsch has quit [Ping timeout: 246 seconds]
sjl has joined #lisp
slyrus__ has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
slyrus_ has quit [Ping timeout: 265 seconds]
<pjb>
thrashdin: not really.
<pjb>
thrashdin: what do you really want to do?
<pjb>
thrashdin: note that classes don't contain code. Only generic functions have methods that contain code. So accessing the slot of a class or of an instance in a defclass form doesn't make a lot of sense.
bitmapper has quit [Ping timeout: 260 seconds]
pierpal has joined #lisp
ebzzry has joined #lisp
georgiePorgie has joined #lisp
stzsch has joined #lisp
<Xach>
thrashdin: not
<Xach>
thrashdin: you usually access slots in methods of the (re)initialization protocol generic functions.
phadthai_ is now known as phadthai
theruran has quit [Quit: Connection closed for inactivity]
xkapastel has joined #lisp
<aeth>
I tend to treat CL as more of a Java sort of thing (don't access slots directly) than Python (access slots directly). It's not as annoying as Java because the getters/setters are automatic so there's not a lot of boilerplate. This is a case where I'd have a bit of boilerplate, though. You can do fancy things with slots using the meta-object protocol (MOP), but if you do that, then you're going to lose all weekend learning about it just to w
<aeth>
just to write 12 lines.
<aeth>
i.e. I don't know what you want to do, but I'd probably wrap slot access in methods and require the use of those methods, assuming that it can't just be done in the DEFMETHOD INITIALIZE-INSTANCE :AFTER constructor of the class
ebzzry has quit [Ping timeout: 240 seconds]
MinnowTaur has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
thrashdin has quit [Remote host closed the connection]
MinnowTaur has quit [Remote host closed the connection]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
georgiePorgie has joined #lisp
__vlgvrs has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
paul0 has quit [Read error: Connection reset by peer]
__vlgvrs is now known as paul0
elderK has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #lisp
orivej has joined #lisp
v88m has joined #lisp
Aruseus has joined #lisp
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach>
Good morning everyone!
v88m has quit [Ping timeout: 246 seconds]
RukiSama has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
elderK has quit [Quit: WeeChat 1.9]
elderK has joined #lisp
_whitelogger has joined #lisp
rjnw has quit [Ping timeout: 272 seconds]
notzmv has quit [Ping timeout: 260 seconds]
sz0 has joined #lisp
_whitelogger has joined #lisp
ebzzry has joined #lisp
RukiSama has quit [Quit: Leaving]
RukiSama has joined #lisp
Khisanth has quit [Ping timeout: 260 seconds]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 260 seconds]
Khisanth has joined #lisp
gravicappa has joined #lisp
shifty has joined #lisp
Aruseus has quit [Quit: Leaving]
narimiran has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
asarch has joined #lisp
isoraqathedh_ is now known as isoraqathedh
vlatkoB has joined #lisp
wxie has joined #lisp
pierpal has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 265 seconds]
ggole has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
wxie has quit [Ping timeout: 272 seconds]
v88m has joined #lisp
karlosz has joined #lisp
_whitelogger has joined #lisp
lemo1nem has joined #lisp
lemoinem is now known as Guest59965
Guest59965 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
lemo1nem is now known as lemoinem
sauvin has joined #lisp
_whitelogger has joined #lisp
<elderK>
Guys, is there a way to have nested loops with LOOP such that the variable def/stepping is after the say, body, (when, etc.)?
<elderK>
Or do I really have to have a nested (loop ...)?
<beach>
Not sure what you mean, but if you need nested loops, you need a LOOP inside LOOP.
<beach>
In other words, every clause is going to be executed at most once in each iteration of a LOOP.
<beach>
Is it problematic for you to have a LOOP inside a LOOP?
<elderK>
beach: No. I just thought there might be a way to do it without nesting.
<elderK>
I will have to used "named", as the subloop needs to escape from the entire thing
prince1 has joined #lisp
asarch has quit [Quit: Leaving]
prince1 has quit [Ping timeout: 260 seconds]
<elderK>
Is there like, a style guide for indenting LOOPs?
<no-defun-allowed>
SLIME should indent it correctly.
<no-defun-allowed>
An oversimplification would be that you start with everything indented just to the right of the LOOP symbol, then every conditional body form is indented in two spaces.
davr0s_ has quit [Read error: Connection reset by peer]
davr0s has quit [Read error: Connection reset by peer]
amerlyq has joined #lisp
tsrt^ has joined #lisp
<beach>
elderK: You need the slime-indentation contribution.
<beach>
It does a very good job.
<elderK>
beach: I'm afraid I still don't use Emacs. Still hacking away using SlimV.
<elderK>
Perhaps I should learn to read Emacs Lisp so that I can decipher the rules from the indentation contribution
<beach>
Oh dear.
Nilby has joined #lisp
RukiSama has quit [Quit: Leaving]
_whitelogger has joined #lisp
<elderK>
Indeed :)
<elderK>
It's good to be back here.
<elderK>
You have all been so kind to me over time, and have taught me so much.
iamFIREcracker has joined #lisp
srji has joined #lisp
srji has quit [Client Quit]
<beach>
elderK: Welcome back.
shifty has quit [Ping timeout: 272 seconds]
srji has joined #lisp
_whitelogger has joined #lisp
Inline has joined #lisp
gko_ has quit [Ping timeout: 265 seconds]
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
prince1 has joined #lisp
dddddd has quit [Ping timeout: 268 seconds]
georgiePorgie has joined #lisp
prince1 has quit [Ping timeout: 260 seconds]
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xkapastel has joined #lisp
francogrex has joined #lisp
<francogrex>
Hi all. I am using emacs inferior-lisp to run CL interatively in emacs. however I am creating a game and would like at a certain point to clear the emacs buffer where my lisp is running. I could execute the emacs command (erase-buffer) from emacs e.g. M-x erase-buffer... but can i do it from inside the CL program itself?
<francogrex>
you know like (run-program bla bla) or something similar? need to execute the elisp command from inside common lisp?
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
pjb has quit [Read error: No route to host]
varjag has joined #lisp
<Nilby>
francogrex: It's probably best not to do this. If you are making a game with terminal effects like clearing the screen, it's best to use a terminal library like cl-charms and run in the terminal. If it's just for you the developer, it's best to just do it on the emacs side with a elisp. BUT, if you run slime instead of inferior-lisp there is swank:eval-in-emacs, which could do something like that. Note that lisp programmers might be
<Nilby>
upset if your game erased their buffer without asking.
prince1 has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
heisig has joined #lisp
prince1 has joined #lisp
Lord_of_Life has quit [Read error: Connection reset by peer]
nika has joined #lisp
prince1 has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #lisp
darkstardevx has quit [Ping timeout: 272 seconds]
iamFIREcracker has quit [Ping timeout: 272 seconds]
darkstardevx has joined #lisp
prince1 has joined #lisp
shifty has joined #lisp
ebzzry has joined #lisp
hhdave has joined #lisp
prince1 has quit [Ping timeout: 260 seconds]
darkstardevx has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
darkstardevx has joined #lisp
fookara has joined #lisp
vhost- has quit [Ping timeout: 240 seconds]
prince1 has joined #lisp
v88m has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
<francogrex>
ok thanks for terminal advice. I will use (format t "~A[H~@*~A[J" #\escape)
prince1 has quit [Ping timeout: 265 seconds]
gxt has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
gxt has quit [Remote host closed the connection]
gko_ has joined #lisp
francogrex has quit [Remote host closed the connection]
|Pirx_off is now known as |Pirx|
elderK has quit [Quit: WeeChat 1.9]
gxt has joined #lisp
iamFIREcracker has joined #lisp
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
Necktwi has joined #lisp
jeosol has quit [Ping timeout: 260 seconds]
karlosz has quit [Quit: karlosz]
dale has quit [Quit: My computer has gone to sleep]
Bourne has joined #lisp
jmercouris has joined #lisp
mercourisj has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
wxie1 has joined #lisp
jmercouris has quit [Ping timeout: 260 seconds]
mercourisj has quit [Ping timeout: 265 seconds]
Josh_2 has joined #lisp
ljavorsk has joined #lisp
msk_ has quit [Remote host closed the connection]
msk has joined #lisp
FreeBirdLjj has joined #lisp
msk has quit [Remote host closed the connection]
wxie1 is now known as wxie
msk has joined #lisp
scymtym_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
FreeBirdLjj has quit [Ping timeout: 272 seconds]
georgiePorgie has joined #lisp
ebrasca has joined #lisp
FreeBirdLjj has joined #lisp
fookara has quit [Read error: Connection reset by peer]
prince1 has joined #lisp
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has joined #lisp
prince1 has quit [Ping timeout: 268 seconds]
papachan has joined #lisp
heisig has quit [Quit: Leaving]
scymtym has joined #lisp
ljavorsk has quit [Remote host closed the connection]
ljavorsk has joined #lisp
dddddd has joined #lisp
ljavorsk_ has joined #lisp
ljavorsk has quit [Ping timeout: 272 seconds]
pjb has quit [Read error: Connection reset by peer]
pjb has joined #lisp
EvW has joined #lisp
georgiePorgie has joined #lisp
ebzzry has quit [Ping timeout: 265 seconds]
pjb has quit [Remote host closed the connection]
ebzzry has joined #lisp
z147 has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.3)]
pjb has joined #lisp
Nilby has joined #lisp
Josh_2 has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #lisp
EvW has quit [Ping timeout: 245 seconds]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 268 seconds]
rjnw has joined #lisp
EvW has joined #lisp
shifty has joined #lisp
jcowan has left #lisp [#lisp]
frodef has joined #lisp
fookara has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
jmercouris has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
<jmercouris>
how to convert generalized boolean -> boolean?
<_death>
(if x t nil)
<jmercouris>
no function for it?
<jmercouris>
just to make intention more explicit?
<_death>
(defun bool (x) (if x t nil))
<jmercouris>
11
<jmercouris>
:-D
<Nilby>
also: (and x t)
<beach>
(not (not x))
Blukunfando has joined #lisp
<Nilby>
(not (not x)) seems like the conceptually lovely pure functional version
<Nilby>
Just in case T isn't declared constant.
v88m has joined #lisp
brettgilio_ has quit [Ping timeout: 268 seconds]
oni-on-ion has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
gko_ has quit [Ping timeout: 272 seconds]
hiroaki has joined #lisp
akoana has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
bitmapper has joined #lisp
Telior has joined #lisp
tsrt^ has quit []
rjnw has quit [Quit: leaving]
izh_ has joined #lisp
<beach>
I think I have a version of my paper on representing method combinations that is close to finished. If anyone feels like reading it, this is your opportunity to appear in the "Acknowledgments" section. Deadline for submission is in a week or so. http://metamodular.com/SICL/representing-method-combinations.pdf
shka_ has quit [Quit: WeeChat 1.9.1]
shka_ has joined #lisp
shka__ has joined #lisp
georgiePorgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has quit [Ping timeout: 260 seconds]
shka__ has quit [Client Quit]
shka_ has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
papachan has quit [Quit: Saliendo]
georgiePorgie has joined #lisp
nowhere_man has quit [Ping timeout: 272 seconds]
prince1 has joined #lisp
tempate has joined #lisp
slyrus has joined #lisp
<tempate>
I want to make a function that takes in a list, picks an element at random, removes it from the list and returns it.
<tempate>
I've got under control the get-element-from-list part. What I am not sure about is how to remove it from the list.
prince1 has quit [Ping timeout: 268 seconds]
slyrus__ has quit [Ping timeout: 240 seconds]
<tempate>
To be clear, I want to alter the inputted list, not to return a list without the chosen element.
<tempate>
Would it be a more lispy solution to just remove the item from a copy of the list and return both the new list and the chosen element?
<pjb>
Of course, you could write your own delete function that would mutate it. For example, it could put a NIL in the CDR of the first CONS cell.
<Nilby>
The simple way is to setf and delete: (setf list (delete item list))
<pjb>
tempate: don't think lisp. Think what should my program do so you can sell it for a billion and finance whatever you want (Venus exploration, development of a Lisp OS, a Pacific Island, whatever).
slyrus has quit [Ping timeout: 272 seconds]
<pjb>
Nilby: which is what deletef and modify-macro in general are for.
ebzzry has quit [Ping timeout: 265 seconds]
<tempate>
pjb: fair enough
<tempate>
pjb: Not sure how to proceed anyway
<Nilby>
I know, but in a dependency free fresh REPL.
<pjb>
tempate: well, for your goal function, you have to choices. Either you want to use lisp lists, which don't exist as an ADT, but are merely chains of cons cells, and then you will have to return indeed two values, the extracted element and the new list, or you introduce your own list ADT (eg. a class or a structure that wraps a lisp list), and then you can mutate the list and only return the extracted element.
<pjb>
tempate: in any case, since the list can be empty, you could have no element to return, so returning multiple values including an indicator that the list was empty should be envisaged.
<pjb>
Nilby: have you seen the define-modify-macro form above?
<pjb>
Nilby: oh, right, it needs an intermediary function for the order of arguments.
<pjb>
But in general, they are one-liners, so you can easily type them in at the REPL.
<tempate>
pjb: alright. I'll look into it. Thanks.
<Nilby>
pjb: Yes. That's the elegant way. But wouldn't tell someone who's unfamiliar with delete to do it that way at first.
<pjb>
tempate: an alternative, is to pass a "place" to your function. If you write a macro, you must mind using get-setf-expansion. But you can pass a place to a function by way of a closure.
<pjb>
(extract-one list (lambda (new-list) (setf list new-list)))
<tempate>
pjb: I think I'm going to write a class. It'll most likely come in handy in the future.
slyrus__ has joined #lisp
varjag has quit [Remote host closed the connection]
iovec has joined #lisp
slyrus_ has quit [Ping timeout: 272 seconds]
amerlyq has quit [Quit: amerlyq]
davr0s has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
Telior has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 245 seconds]
brettgilio has joined #lisp
SlashLife|prague is now known as SlashLife
shifty has quit [Ping timeout: 272 seconds]
shifty has joined #lisp
karlosz has joined #lisp
jibanes has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
vhost- has joined #lisp
vhost- has quit [Changing host]
vhost- has joined #lisp
gravicappa has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
hhdave has quit [Quit: hhdave]
pnp has joined #lisp
shangul has joined #lisp
Aruseus has joined #lisp
shangul has quit [Remote host closed the connection]
nowhere_man has joined #lisp
karlosz has quit [Quit: karlosz]
izh_ has quit [Quit: Leaving]
xuxuru has joined #lisp
gravicappa has quit [Ping timeout: 272 seconds]
varjag has joined #lisp
xuxuru has quit [Quit: xuxuru]
karlosz has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
pnp has quit [Remote host closed the connection]
aamukastemato has joined #lisp
fookara has quit [Remote host closed the connection]
prince1 has joined #lisp
nika has quit []
prince1 has quit [Ping timeout: 240 seconds]
Aruseus has quit [Quit: Leaving]
X-Scale` has joined #lisp
Nomenclatura has joined #lisp
buffergn0me has joined #lisp
nowhere_man has quit [Remote host closed the connection]