jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<asarch> Oh :-(
<asarch> So the correct way would be through its accessors?
<no-defun-allowed> Yeah, always use accessors (defined by :reader, :writer, :accessor).
<asarch> Thank you
<asarch> Thank you very much! :-)
<no-defun-allowed> It is possible that some class that has specialised methods doesn't actually read a slot. Maybe you have objects with colours, and you can have a colour blending mixin, then the COLOUR of that mixin-having object is computed and can't just be a slot.
<asarch> Ok
<Bike> with mop you can also use standard-instance-access sometimes.
<Bike> but pretty much stick with accessors.
umgeher3 has joined #lisp
<asarch> Ok
umgeher2 has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
<no-defun-allowed> D:
rumbler31 has quit [Ping timeout: 268 seconds]
bexx has left #lisp ["WeeChat 2.5"]
etwert has quit [Quit: Leaving]
dannyboy35 has joined #lisp
<dannyboy35> I am trying to get syntax highlighting working in emacs slime mode does anyone know how to do that?
<no-defun-allowed> `M-x common-lisp-mode` and you should be set
EvW1 has joined #lisp
<dannyboy35> no-defun-allowed: I’m using slime mode though
<dannyboy35> Does it not work there?
superkumasan has joined #lisp
<no-defun-allowed> SLIME mode is a minor mode to Common Lisp mode, iirc
<no-defun-allowed> so enable common-lisp-mode, and slime-mode should be enabled too
<moldybits> think he's asking about slime repl
<no-defun-allowed> ooooh, hm
<no-defun-allowed> Seems people on duckduckgo suggest some variant of <https://stackoverflow.com/a/26050762> but I don't understand what is happening so I can't say for sure if it'd work.
<dannyboy35> Yeah I’m in the repel
Oladon_work has quit [Ping timeout: 260 seconds]
dddddd has quit [Remote host closed the connection]
Guest35617 has quit [Ping timeout: 245 seconds]
dannyboy35 has quit [Remote host closed the connection]
dannyboy35 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]
dannyboy35 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]
dannyboy35 has joined #lisp
lemoinem is now known as Guest57905
Guest57905 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
Kundry_Wag has joined #lisp
EvW1 has quit [Ping timeout: 250 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
mb^ has quit []
<dannyboy35> Does anyone here use slime? I need some help with it I’m I have no idea how to use it lol
dannyboy35 has quit [Remote host closed the connection]
ym555_ has quit [Read error: Connection reset by peer]
ym555 has joined #lisp
Fare has joined #lisp
dannyboy35 has joined #lisp
pfdietz has joined #lisp
<pfdietz> About using slot-value instead of accessors: use of slot value enables one to bypass methods and method combinations on the accessor. This can sometimes be useful, although one can also define a "bare" accessor that doesn't have the extra methods.
<dannyboy35> Any slime experts?
<Bike> syntax highlighting is done in files, not so much the repl
<pfdietz> One real use is for mostly read-only slots, where you don't want to provide a writer or accessor method, but might still want to update the slot. For example, if the slot caches a value computed from other slots. I wrote a method for slot-unbound that fills in the cache slot the first time it's read. and which saves the computed value by assigni
<pfdietz> ng to slot-value.
<aeth> no-defun-allowed: huh? with-accessors takes the accessor function and doesn't have to do with the slot afaik. It's usually implemented as symbol-macrolet
<LdBeth> dannyboy35: elaborate your question
<no-defun-allowed> oh okie, aeth, good point
<aeth> pfdietz: another way to get "read-only" slots is to have ":accessor %foo :reader foo" and only
<aeth> export foo
<aeth> Someone who uses your-package::%foo anyway is probably someone who'd use slot-value anyway.
<dannyboy35> LdBeth: trying to learn slime is there a good resource for beginners.
igemnace has joined #lisp
varjag has joined #lisp
<LdBeth> dannyboy35: read the manual, also the start up https://lisp-lang.org/learn/getting-started/
<dannyboy35> I’m working through Common Lisp a gentle introduction
<dannyboy35> Not really a fun a lot of it is for new programming so it goes into way too much detail on things I know already
dannyboy35 has quit [Remote host closed the connection]
krwq has joined #lisp
spm_ has joined #lisp
ym555 has quit [Quit: leaving...]
libertyprime has joined #lisp
seok has joined #lisp
<seok> When (print ..) or (format *standard-output* ....) is placed in a function and such, why doesn't it print to my REPL?
<Bike> perhaps *standard-output* is not your repl output
<seok> if I do (format *standard-output) directly on repl it works
xkapastel has joined #lisp
<pjb> that's the point of variable: to vary!
<seok> *standard-output*
<seok> xD
<pjb> seok: (print 'foo *terminal-io*) (format *terminal-io* "~%~S" 'foo)
<seok> Well, actually I am trying to test if connection is made to websocket server
<seok> (ql:quickload :websocket-driver-client)
<seok> under Client-side
<seok> Can anyone explain why /echo can be accessed here?
<seok> I don't see any code on server side which creates this path
<Bike> what? what the heck is "/echo"?
<seok> ws://localhost:5000/echo
<pjb> or ws?
<seok> ws is websocket
<seok> ws is the protocol for websocket
<Bike> well the echo server has that
<seok> Which part of the server side code specifies /cho?
<seok> specifies /echo?
<LdBeth> dannyboy35: if you already know programming, I guess the best way to learn a new language is go throw the language specification
<seok> Ah, it's not properly ddocumented
<seok> Right o Thank you
libertyprime has quit [Remote host closed the connection]
<seok> Hm.. progn is implicit in lamba yes?
<Bike> sure.
rumbler31 has joined #lisp
<seok> (defvar *server*
<seok> (start-connection ws)))
<seok> Is that code visible? or still should use pastebin?
<Bike> you should use pastebin for anything longer than a line.
<seok> Sure, sorry
<Bike> it's ok. you only actually pasted two lines.
<seok> I can't get my server to print "someone connected" or "server started"
<Bike> might be in another thread or something.
<seok> Ah, probably
<seok> That sounds about right
<Bike> check *inferior-lisp*, if you're in slime
<seok> How can I get this to print in the current REPL?
<seok> print it to *inferior-lisp*?
<Bike> no, i mean
<Bike> if you're in slime, check the *inferior-lisp* buffer
<Bike> to see if the output ended up there
<seok> No, it's not there
<Bike> i dunno then.
rumbler31 has quit [Ping timeout: 268 seconds]
<seok> (format t "~&~:(~A~) server is started.~%Listening on ~A:~A.~%" server address port)
<seok> This line prints normally
<Bike> don't you just call the clackup function?
<Bike> so it's in the same thread and everything.
<seok> Yeah
<seok> I don't understand how clack is able to print stuff on my repl
<seok> But I cannot
<seok> Hm
<Bike> you're doing it in a weird handler thing and god knows how clack calls it.
<Bike> clackup is just a normal function.
dannyboy35 has joined #lisp
<seok> Ok, I fixed it using a logging library
<seok> log4slime
<seok> Seems to help with printing going to another thread
<dannyboy35> LdBeth: do I have to use the repl when using slime?
<pjb> seok: are you aware of the semantics of defvar?
<seok> Nope
<pjb> clhs defvar
kdas_ has joined #lisp
<pjb> seok: it's understandable that you may want to have access to the current server running. But you should probably do it from a function rather than a variable. Define functions such as (start-server) (stop-server) (current-server).
kdas_ has quit [Excess Flood]
kushal has quit [Quit: ZNC 1.7.3 - https://znc.in]
<seok> Oh yeah, just trying to figure out some in and outs
kdas_ has joined #lisp
<pjb> seok: in particular, what should happen if you do (progn (start-server) (start-server))? Should you not rather have a (current-serverS) returning a list?
dannyboy35 has quit [Remote host closed the connection]
stepnem has quit [Ping timeout: 258 seconds]
stepnem has joined #lisp
fortitude has joined #lisp
Jeanne-Kamikaze has joined #lisp
Oladon has joined #lisp
Bike has quit [Quit: Lost terminal]
karayan has joined #lisp
dale has quit [Quit: dale]
steiner has quit [Remote host closed the connection]
dale has joined #lisp
rdh has joined #lisp
notzmv has quit [Remote host closed the connection]
gravicappa has joined #lisp
Fare has quit [Quit: Leaving]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
steiner has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
notzmv has joined #lisp
<seok> Hello, anyone familiar with clack and websockets?
<seok> Wondering how I can get list of clients connected on my server
<mfiano> I just discovered that you can use a lambda form in the accessor-name position of WITH-ACCESSORS. Is this undefined behavior? (see Exceptional Situations)
fittestbits__ has left #lisp [#lisp]
Arcaelyx has quit [Quit: Arcaelyx]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
fittestbits__ has joined #lisp
<pjb> mfiano: function name n. 1. (in an environment) A symbol or a list (setf symbol) that is the name of a function in that environment. 2. A symbol or a list (setf symbol).
<pjb> mfiano: so, this is not strictly conforming.
<pjb> mfiano: however, I have argued that lambda-forms were function names for those anonymous functions.
<pjb> it's logical that it works.
<pjb> mfiano: there's however a problem with that: the lexical environment in which the expansion is produced, which may differ from one occurence to the other of the variable.
<pjb> mfiano: try: (let ((x 1)) (with-accessors ((xx (lambda (foo) (declare (ignore foo)) x))) (list xx (let ((x 42)) xx))))
<pjb> note it doesn't work in ccl.
<mfiano> Nor SBCL
<mfiano> Thanks
<pjb> then were does it work?
<mfiano> This works, for example on SBCL: (with-accessors ((parent-transform (lambda (x) (fl:actor-component-by-type x 'fl.comp:transform)))) instance ...)
<pjb> Sorry, try this: (let ((x 1)) (with-accessors ((xx (lambda (foo) (declare (ignore foo)) x))) (quote foo) (list xx (let ((x 42)) xx))))
<pjb> it works in abcl ecl and sbcl, producing (1 42).
<pjb> ccl and clisp signal a program-error.
frgo has quit [Read error: No route to host]
<mfiano> ; => (1 42)
<pjb> Since it doesn't produce (1 1), you can see that you definitely should not, and it's bad that those implementations allow it.
frgo has joined #lisp
<mfiano> Thanks pjb
<beach> Good morning everyone!
<mfiano> pjb: Curious how can you argue that lambda forms can by "function names" given that glossary definition?
<pjb> mfiano: I don't argue from the definition, but from the usage.
<mfiano> The fact that a function name be anything other than that is already non-conforming
<pjb> ( function-name args… ) === ( (lambda (parms…) …) args…) therefore function-name === (lambda (parms…) …) and args… === args…
v88m has joined #lisp
vlatkoB has joined #lisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
krwq has quit [Read error: Connection reset by peer]
JohnMS has joined #lisp
sauvin has joined #lisp
CloseToZero has joined #lisp
MCP_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
mrcom has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 245 seconds]
oni-on-ion has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 245 seconds]
SaganMan has joined #lisp
Oladon has quit [Quit: Leaving.]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
afidegnum has joined #lisp
shka__ has quit [Ping timeout: 272 seconds]
SaganMan has quit [Ping timeout: 244 seconds]
liberiga has joined #lisp
libertyprime has joined #lisp
<afidegnum> how do i use webkit or google chrome engine in CL ?
Jeanne-Kamikaze has quit [Ping timeout: 248 seconds]
<no-defun-allowed> (external-program:start "/usr/bin/firefox" '("http://lisp.org"))
zaquest has joined #lisp
<no-defun-allowed> or maybe jmercouris knows cause he works on next-browser which uses webkit
<afidegnum> ok, i m trying to build an interface which will have a drag and drop html builder, the html elements will be at the left side, droped into the web browser and render an html page
<afidegnum> Js can be rendered as well
<no-defun-allowed> might just want to do that in-browser then using Parenscript or JSCL
<no-defun-allowed> though JSCL doesn't really have good FFI, especially when DOM objects are involved for some reason
asarch has quit [Quit: Leaving]
<afidegnum> looking at parenscript, the documentation is kind of limited
alexande` has joined #lisp
alexande` has quit [Remote host closed the connection]
alexande` has joined #lisp
alexande` has quit [Remote host closed the connection]
alexande` has joined #lisp
MCP_ has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
kdas_ is now known as kushal
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
wigust has quit [Quit: ZNC 1.7.3 - https://znc.in]
wigust has joined #lisp
steiner has quit [Read error: Connection reset by peer]
MCP_ has quit [Ping timeout: 248 seconds]
dale has quit [Quit: My computer has gone to sleep]
themsay has quit [Ping timeout: 246 seconds]
SenasOzys has joined #lisp
cods has quit [Quit: Changing server]
cods has joined #lisp
shka__ has joined #lisp
themsay has joined #lisp
Lycurgus has joined #lisp
themsay has quit [Ping timeout: 245 seconds]
MCP_ has joined #lisp
shka__ has quit [Ping timeout: 272 seconds]
shka__ has joined #lisp
cods has quit [Changing host]
cods has joined #lisp
rumbler31 has joined #lisp
themsay has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
_whitelogger has joined #lisp
SenasOzys has quit [Ping timeout: 248 seconds]
Lycurgus has quit [Quit: Exeunt]
milanj has quit [Quit: This computer has gone to sleep]
lnostdal has joined #lisp
gxt_ has joined #lisp
ggole has joined #lisp
gxt has quit [Ping timeout: 260 seconds]
manualcrank has quit [Quit: WeeChat 1.9.1]
gxt_ has quit [Remote host closed the connection]
gxt_ has joined #lisp
orivej has joined #lisp
liberiga has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 258 seconds]
shka__ has quit [Ping timeout: 258 seconds]
zotan has quit [Ping timeout: 276 seconds]
zotan has joined #lisp
afidegnum has quit [Quit: leaving]
dmiles has quit [Read error: Connection reset by peer]
JohnMS has quit [Quit: Konversation terminated!]
gareppa has joined #lisp
random-nick has joined #lisp
wigust has quit [Read error: Connection reset by peer]
gareppa has quit [Client Quit]
wigust has joined #lisp
philosophy has joined #lisp
MCP_ has quit [Ping timeout: 245 seconds]
philosophy has quit [K-Lined]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
superkumasan has quit [Ping timeout: 245 seconds]
igemnace has quit [Quit: WeeChat 2.5]
_whitelogger has joined #lisp
hiroaki has quit [Read error: Connection reset by peer]
hiroaki has joined #lisp
v88m has quit [Ping timeout: 245 seconds]
<Xach> this aserve -> paserve thing is irritating.
<Xach> I think some of the affected projects are alive, but it's hard to say for sure.
<ck_> maybe you want to write a pullrequestbot to automate this
Bike has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
etwert has joined #lisp
superkumasan has joined #lisp
ebzzry has joined #lisp
gravicappa has joined #lisp
orivej has joined #lisp
rumbler31 has joined #lisp
werrwer has joined #lisp
etwert has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Ping timeout: 258 seconds]
libertyprime has quit [Ping timeout: 246 seconds]
fittestbits__ has left #lisp [#lisp]
shka__ has joined #lisp
EvW has joined #lisp
lnostdal has quit [Ping timeout: 245 seconds]
dddddd has joined #lisp
ebrasca has joined #lisp
Inline has quit [Ping timeout: 264 seconds]
<Xach> ck_: automate what?
Ricchi_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
fittestbits__ has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
<ck_> Xach: watching the repositories and contacting people with sparse attendance schedule when they are active. It wasn't really meant seriously.
<Xach> ah
lavaflow has joined #lisp
nullman has quit [Ping timeout: 268 seconds]
lavaflow has quit [Ping timeout: 246 seconds]
<seok> Anyone recognize this object?
<seok> #<SB-SYS:FD-STREAM for "socket 127.0.0.1:14966, peer: 127.0.0.1:5000" {1006BEF343}>
<Bike> sure, it's an sbcl stream for a file descriptor
<seok> TY :D
<seok> Where can I find the defclass for this?
<Bike> it's internal.
<beach> There might not be one.
<seok> Just want to find the slot accessors for those ips
<seok> It's not a clos?
<Bike> that interface probably isn't intended foor your use. sb-sys is an internal sbcl package.
<beach> seok: Every object in Common Lisp is a CLOS object.
<beach> And every class is a CLOS class.
<scymtym> seok: you should work with the socket from which the stream has been created using the socket interface: http://www.sbcl.org/manual/#General-Sockets
<scymtym> probably SB-BSD-SOCKETS:SOCKET-NAME and SB-BSD-SOCKETS:SOCKET-PEERNAME
Inline has joined #lisp
oni-on-ion has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
EvW has quit [Remote host closed the connection]
EvW has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
kajo has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
alexanderbarbosa has quit [Remote host closed the connection]
alexande` has quit [Remote host closed the connection]
mtreis86 has joined #lisp
alexanderbarbosa has joined #lisp
igemnace has joined #lisp
khisanth_ has quit [Ping timeout: 246 seconds]
nanoz has joined #lisp
khisanth_ has joined #lisp
shka_ has joined #lisp
Bike has quit [Quit: Lost terminal]
Oladon has joined #lisp
bendersteed has quit [Read error: Connection reset by peer]
bendersteed has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
umgeher4 has joined #lisp
umgeher3 has quit [Ping timeout: 258 seconds]
mtreis86 has quit [Ping timeout: 246 seconds]
bendersteed has quit [Ping timeout: 245 seconds]
rumbler31 has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
Oladon has quit [Quit: Leaving.]
libertyprime has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
Posterdati has quit [Ping timeout: 245 seconds]
Posterdati has joined #lisp
oni-on-ion has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
Lycurgus has joined #lisp
rumbler31 has joined #lisp
MCP_ has joined #lisp
lnostdal has joined #lisp
ioseph_42 has joined #lisp
liberiga has joined #lisp
ioseph_42 has left #lisp [#lisp]
ioseph has joined #lisp
littlelisper has joined #lisp
femi has quit [Ping timeout: 245 seconds]
EvW has joined #lisp
femi has joined #lisp
Lycurgus has quit [Quit: Exeunt]
asarch has joined #lisp
<littlelisper> Hello
<jackdaniel> hey
<littlelisper> omg, are you the jackdaniel who made those clim videos on youtube?
<jackdaniel> perhaps, answer depends on whenever you are going to kill me for bad quality?
manualcrank has joined #lisp
<littlelisper> oh no, those really helped me actually
<jackdaniel> but more seriously, I gather you've enjoyed them, I'm glad :)
<jackdaniel> we have #clim channel if you have questions
Tristam has quit [Ping timeout: 272 seconds]
<jackdaniel> it is very active (in IRC activity standards)
<littlelisper> Oh sure, I ll be sure to hang out there if I came across anything i need help with
<jackdaniel> I hope to make a new video soon showing how to write a simple toolkit based on dragonstone library (lower-level abstractions which make CLIM possible, something like silica)
<jackdaniel> namely I have a working immediate gui mode prototype, so making from it a tutorial seems like a nice idea
<littlelisper> sounds great
_Posterdati_ has joined #lisp
umgeher4 has quit [Read error: Connection reset by peer]
umgeher4 has joined #lisp
Posterdati has quit [Ping timeout: 245 seconds]
nanoz has quit [Ping timeout: 268 seconds]
alexanderbarbosa has joined #lisp
ioseph has left #lisp ["WeeChat 2.3"]
pjb has quit [Ping timeout: 252 seconds]
littlelisper has quit [Quit: East bound and down, loaded up and truckin']
asarch has quit [Quit: Leaving]
lnostdal has quit [Ping timeout: 272 seconds]
dale has joined #lisp
karayan has quit [Remote host closed the connection]
karayan has joined #lisp
pjb has joined #lisp
puchacz has joined #lisp
<puchacz> hi, for javascript-like array/vector slice functionality, what library shall I use please?
umgeher4 has quit [Read error: Connection reset by peer]
<puchacz> cl-slice?
umgeher4 has joined #lisp
ga has quit [Changing host]
ga has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
<puchacz> okay, if I want to destructively insert an element into existing array before index, can I do it without manually push-vector-extend first and then rewriting all elements to next index after my insertion?
<puchacz> (cl-slice seems read only access)
ft has quit [Remote host closed the connection]
mathrick has quit [Ping timeout: 276 seconds]
ft has joined #lisp
Josh_2 has joined #lisp
umgeher4 has quit [Read error: Connection reset by peer]
umgeher4 has joined #lisp
<Josh_2> Who is a good host for CL web projects?
Lord_of_Life_ has joined #lisp
<alexanderbarbosa> github
ggole has quit [Quit: Leaving]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<Josh_2> not gonna work
Oladon has joined #lisp
oni-on-ion has joined #lisp
liberiga has quit [Ping timeout: 260 seconds]
liberiga has joined #lisp
lavaflow has joined #lisp
varjag has joined #lisp
lnostdal has joined #lisp
lucasb has joined #lisp
ebrasca has quit [Remote host closed the connection]
<pfdietz> gitlab
<jackdaniel> gitlab.common-lisp.net
<puchacz> can I shrink a vector (opposite of push-extend)?
Jeanne-Kamikaze has joined #lisp
<puchacz> found it
umgeher has joined #lisp
umgeher4 has quit [Read error: Connection reset by peer]
moei has joined #lisp
mathrick has joined #lisp
ym555 has joined #lisp
ym555_ has joined #lisp
ym555_ has quit [Client Quit]
<puchacz> is Lisp allowed to deallocate end of array if I vector-pop it?
<puchacz> or will I cause memory leak?
<puchacz> by having a vector that can grow but not shrink?
ym555 has quit [Ping timeout: 245 seconds]
EvW1 has joined #lisp
<aeth> puchacz: I think vector-pop will just move the fill-pointer, sort of like how there's a vector-push and a vector-push-extend. If vector-pop could shrink, there would probably be a vector-pop-shrink or vector-pop-contract or something
<aeth> puchacz: If you need a vector to shrink, you can do that manually, e.g. with subseq.
<puchacz> aeth - but subseq returns a new pointer, so I would have to update all references to old vector....
<puchacz> not exactly like modifying vector in place
<aeth> puchacz: You can add a layer of abstraction, e.g. with defclass or defstruct. It's what you'd need to do with using a list (which might be more efficient if you need it to shrink), since the list would add/remove from the front.
<puchacz> aeth: yeah, so the bottom line is that vectors are not shrinkable, isn't it?
<aeth> puchacz: it looks like there's an adjust-array. http://www.lispworks.com/documentation/HyperSpec/Body/f_adjust.htm
<aeth> unfortunately, that can make a new array
<puchacz> aeth: yes - and I could not find what it really does when you shrink dimension by 1.
<puchacz> but it is not that relevant, it is meant to be used for return value, not modification in place
superkumasan has quit [Ping timeout: 245 seconds]
dannyboy35 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]
<puchacz> gigamonkey says "they abstract the actual storage, allowing the vector to grow and shrink as elements are added and removed"
<puchacz> "shrink"
<aeth> I think that's referring to the fill-pointer, though.
CloseToZero has quit [Quit: WeeChat 2.5]
<aeth> I think an adjustable vector is something like this #(0 1 _ _) and then you vector-push-extend 3 times and get something like #(0 1 2 3 4 _ _ _) where vector-pop could make it #(0 1 _ _ _ _ _ _) eventually, where the exact details of e.g. if it doubles or does something else is afaik unspecified
<puchacz> aeth: this is what I am afraid of
<puchacz> it is a "memory leak" if you rely on extending and vector-popping
slyrus1 has joined #lisp
slyrus__ has joined #lisp
shka_ has quit [Ping timeout: 248 seconds]
slyrus_ has quit [Ping timeout: 245 seconds]
slyrus2 has quit [Ping timeout: 272 seconds]
Nomenclatura has joined #lisp
<Josh_2> puchacz: you could wrap around vector-pop and just overwrite what is about to be removed before
<puchacz> Josh_2: what good will it do?
<aeth> You could also have a fixed-sized vector, but this will probably wind up on average taking more overall memory, just a predetermined amount of it
<puchacz> Josh_2: placeholders in vector beyond fill-pointer can be empty, but the placeholders themselves take up memory
<Josh_2> Well It's no longer a leak if you have overwritten the data that was previously is that slot
<puchacz> Josh_2: it is, the placeholders may stay
<Josh_2> rip
<aeth> puchacz: If you want guaranteed shrinking, you need to wrap with defclass or defstruct and occasionally subseq (or whatever equivalent will work) afaik.
<aeth> Most people won't want this because it'll be slower and create more garbage as vectors expand and contract
<puchacz> aeth: yes, this is what I figured out :( unless I find a website that says that Lisp can and X, Y and Z implementations do it.
MCP_ has quit [Ping timeout: 245 seconds]
<puchacz> wrap it then
<aeth> If you're willing to be implementation-specific, you could ask in channels like #sbcl
<puchacz> nah, that's fine
<puchacz> thanks :)
puchacz has quit [Quit: Konversation terminated!]
ertewe has joined #lisp
werrwer has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
Arcaelyx has joined #lisp
<scymtym> ADJUST-ARRAY can shrink
Aruseus has joined #lisp
ertewe has quit [Quit: Leaving]
umgeher has quit [Read error: Connection reset by peer]
ertewe has joined #lisp
umgeher has joined #lisp
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
pjb has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 245 seconds]
pjb has joined #lisp
aru_ has joined #lisp
Aruseus has quit [Quit: leaving]
aru_ is now known as Aruseus
umgeher1 has joined #lisp
miklos1 has joined #lisp
umgeher has quit [Ping timeout: 248 seconds]
libertyprime has quit [Ping timeout: 246 seconds]
umgeher1 has quit [Read error: Connection reset by peer]
iovec has joined #lisp
umgeher1 has joined #lisp
umgeher2 has joined #lisp
umgeher1 has quit [Ping timeout: 248 seconds]
Jeanne-Kamikaze has quit [Remote host closed the connection]
spm_ has quit [Read error: Connection reset by peer]
spm_ has joined #lisp
Aruseus has quit [Remote host closed the connection]
liberiga has quit [Ping timeout: 260 seconds]
vlatkoB has quit [Remote host closed the connection]
Aruseus has joined #lisp
umgeher3 has joined #lisp
umgeher2 has quit [Ping timeout: 246 seconds]
gdsg has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
Ricchi has joined #lisp
Tristam has joined #lisp
miklos1 has quit [Remote host closed the connection]
superkumasan has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
lucasb has quit [Quit: Connection closed for inactivity]
ertewe has quit [Quit: Leaving]
pjb has quit [Ping timeout: 252 seconds]
MCP_ has joined #lisp
Aruseus has quit [Remote host closed the connection]
clintm has joined #lisp
alexanderbarbosa has joined #lisp
asarch has joined #lisp
abhixec has joined #lisp
<asarch> Can you setf over a defmethod function?
<asarch> s/function/definition/
pjb has joined #lisp
_whitelogger has joined #lisp
Nomenclatura has quit [Quit: q]
<moldybits> fmakunbound?
<moldybits> or (setf (fdefinition 'foo) ...), i suppose?