jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
random-nick has quit [Ping timeout: 276 seconds]
wildlander has joined #commonlisp
Bike has joined #commonlisp
Oladon has joined #commonlisp
igemnace has quit [Quit: WeeChat 3.5]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Client Quit]
cosimone has quit [Remote host closed the connection]
zacts has joined #commonlisp
Bike has quit [Quit: Connection closed]
zacts has quit [Quit: Client closed]
zacts has joined #commonlisp
cr0myr has joined #commonlisp
matt` has joined #commonlisp
masinter has quit [Ping timeout: 240 seconds]
agrosant has quit [Quit: Leaving]
zacts has quit [Quit: Client closed]
morganw has quit [Remote host closed the connection]
orestarod has quit [Ping timeout: 240 seconds]
wildlander has quit [Quit: Saliendo]
masinter has joined #commonlisp
matt` has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 250 seconds]
patrix has quit []
patrix has joined #commonlisp
igemnace has joined #commonlisp
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 276 seconds]
X-Scale` is now known as X-Scale
Bike has joined #commonlisp
jeffrey has quit [Quit: Client quit]
aartaka has joined #commonlisp
<beach> Good morning everyone!
semz_ has joined #commonlisp
tyson2 has joined #commonlisp
karlosz has joined #commonlisp
semz has quit [Ping timeout: 248 seconds]
Everything has left #commonlisp [#commonlisp]
lisp123 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
_paul0 has quit [Quit: Leaving]
Bike has quit [Quit: Connection closed]
karlosz has quit [Ping timeout: 240 seconds]
luis has quit [Quit: Ping timeout (120 seconds)]
luis has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Guest74 has quit [Quit: Connection closed]
Oladon has quit [Quit: Leaving.]
semz_ is now known as semz
<patrix> Morning beach
zacts has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
karlosz has joined #commonlisp
akoana has quit [Quit: leaving]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
zacts has quit [Quit: Client closed]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
karlosz has quit [Ping timeout: 276 seconds]
lisp123 has joined #commonlisp
aeth has quit [Ping timeout: 276 seconds]
aeth has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
<Andrew> Anyone has experience with cl-async? I'm using as:tcp-server, which takes two functions as arguments; the first is called when data is received from a socket, and the second is called when an event is received. The event one does tell me about connection resets and disconnects, but not for when a connection is established. I'd like to know when a connection is established
wilfred has joined #commonlisp
cr0myr has quit [Remote host closed the connection]
<Andrew> oh, the third callback
lisp123 has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
_whitelogger has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
masinter has quit [Ping timeout: 272 seconds]
admich has joined #commonlisp
<contrapunctus> Is anyone aware of a Common Lisp function (built in, or part of a library) like Emacs Lisp's `format-seconds` ? Something that takes a format string and a duration in seconds, and returns the duration as a string?
admich has quit [Client Quit]
<jackdaniel> I think that you need to be more specific with this description
<jackdaniel> (format nil "~a" duration) is probably not what you are looking for
admich1 has joined #commonlisp
<contrapunctus> This is the docstring for `format-seconds` - https://paste.rs/Sbs It's a much more concise alternative to `local-time-duration:human-readable-duration` or the `humanize-duration`
lisp123 has joined #commonlisp
ttree has quit [Ping timeout: 250 seconds]
lisp123 has quit [Ping timeout: 240 seconds]
treflip has joined #commonlisp
jmdaemon has quit [Ping timeout: 246 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<Nilby> contrapunctus: i use something like this https://plaster.tymoon.eu/view/3063#3063, but it looks like local-time:format-timestring is similar
<contrapunctus> Nilby: both of those look like they're meant for dates/times/timestamps; I'm looking for durations.
<contrapunctus> ah, this looks close... https://github.com/nallen05/princ-ut-interval
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
edgar-rft has quit [Remote host closed the connection]
edgar-rft has joined #commonlisp
<Nilby> contrapunctus: hmmm, i'm not sure i understand the difference, the elisp format-seconds and local-time and mine all work with just some seconds, whether it's an number, a universal-time or a local-time:timestamp. a duration in local-time has the same structure as a timestamp.
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
<contrapunctus> Nilby: if it's a duration function, an input of 65 seconds would return something like "1 minute, 5 seconds" or "01:05" or "1m5s" (depending on the format string); if it's a timestamp, I'd expect it to return a timestamp (or part of one) representing 65 seconds after the CL (1900?) or UNIX epoch (1970).
<contrapunctus> the timestamp equivalent in Elisp is called `format-time-string`
lisp123 has quit [Remote host closed the connection]
<rotateq> You would put it through TRUNCATE until the first value is 0. Then the rests that came out to an appropriate control-string.
<Nilby> you can do both: e.g. (local-time:format-timestring nil (local-time:make-timestamp :sec 65) :format `(:min " minutes " :sec " seconds -- " ,@local-time:+rfc-1123-format+))
phadthai has quit [Remote host closed the connection]
phadthai has joined #commonlisp
shka has joined #commonlisp
<contrapunctus> Nilby: the other thing I'm looking for in such a function is automatic pluralization (e.g. "minute" if 1, and "minutes" if 0 or >1) when the user opts for full unit names
<contrapunctus> I guess I'll try to implement one myself...this should be fun 🙂️
<Nilby> mine can use format tricks :P (format-date "~d minute~:p ~d second~:p" (:minutes :seconds) :time 65)
<rotateq> format magic again :)
<Nilby> of course real pluralizatoin is harder, if you count time in oxen and geese ...
<rotateq> Or that it knows mouse -> mice or sheep -> sheep.
<contrapunctus> lmao
<contrapunctus> oh wtf - `(format nil "~D famil~:@P/~D famil~:@P" 7 1)` => `"7 families/1 family"`
<contrapunctus> what sorcery is that ._.
<rotateq> And there's much more into FORMAT of that kind.
<rotateq> Or when you want to reuse some argument passed to it.
<rotateq> Nilby: The passing with (:minutes :seconds) was new to me.
<Nilby> i've seen even more wild non-standard format versions : https://cl-su-ai.cddddr.org/msg00061.html
lisp123 has joined #commonlisp
<rotateq> ka-di-da-du-der
<rotateq> If Guy Steele is still reachable by this mail? :)
lisp123 has quit [Ping timeout: 240 seconds]
<Nilby> b.c. - before ".com"
<rotateq> And then Symbolics had the first ".com" addresses.
lisp123 has joined #commonlisp
<jackdaniel> uh oh, lisp: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && ...
<jackdaniel> it is a long time since I last saw something this ugly
<jackdaniel> in ldb :)
wilfred has quit [Quit: Connection closed for inactivity]
admich1 has quit [Ping timeout: 276 seconds]
azimut has quit [Ping timeout: 240 seconds]
admich1 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
azimut has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
lisp123 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
q3cpma has joined #commonlisp
<q3cpma> Hello, in a few weeks time, I plan to start on making a graphical file manager in CL and I have a few questions concerning the GUI toolkit choice. Would you choose McCLIM, cl-cffi-gtk or Ltk?
<q3cpma> My requirements are: able to run multiple windows concurrently (each in its thread, I suppose), able to have refresh/redisplay scheduled by another thread and (if possible) with a suitable table widget/gadget
<jackdaniel> McCLIM is closest to lisp from all three and as a heavy CLIM user (and developer) I encourage it ;)
<q3cpma> I see, that's what I was leaning toward too
<jackdaniel> there will be a few bumps around the road, but generally McCLIM fulfills all your requirements
<q3cpma> Can I run multiple application-frame instance, each with its own event loop?
<jackdaniel> yes
<q3cpma> Nice
<jackdaniel> (on platforms that support threads, basically where bordeaux-threads works fine)
<jackdaniel> note that accessing application frame asynchronously (outside of its own thread) is not safe
<q3cpma> And since another thread may modify the data structures currently displayed, can that thread say "hey, refresh your pane" to an application-frame
<jackdaniel> except for allocating events and a few operations that are deliberely safe
<q3cpma> Hmmmm
<jackdaniel> you may call frame-execute-command and that is thread safe
<q3cpma> Does that mean the data used for displaying too?
<jackdaniel> or queue an event (the queue is thread safe) and write your own handle-event
<jackdaniel> well, if you access data concurrently then it depends whether the data structure is thread-safe itself
<q3cpma> Ah, that's what I wanted, a way to insert myself into the event loop
Dynom has joined #commonlisp
<jackdaniel> yes, that's entirely possible (frame-execute-command is a recommended way as it is a tad higher level interface)
<q3cpma> Everything looks as it should, so far
<jackdaniel> if you are stuck or have other questions we have #clim channel for troubleshooting and dev talk
<q3cpma> Is there a place where I can look at the builtin gadgets?
<jackdaniel> if you have some shiny things to show, then past it here to help the propaganda front ,)
<q3cpma> Yeah, I'll migrate there
<jackdaniel> on the website there are pointers to the specification and to franz user guide (both may be used for a reference for gadgets)
<jackdaniel> also Examples/ directory has many informative content
<q3cpma> Thanks, and sorry for my noob questions, I'm new to CL and graphical applications (!) both
<jackdaniel> CLIM has many gadgets, but the most contemporary way to write CLIM applications is to use display function on the stream pane and commands
<rotateq> q3cpma: Oh both, I hope it's not too much at the same time. Things are a bit different. :)
lisp123 has joined #commonlisp
<q3cpma> rotateq: I do have experience with Tcl, so CL itself was pretty natural to me
pfd has quit [Quit: Client closed]
Josh_2 has quit [Ping timeout: 272 seconds]
<_death> clim can be quite useful during development.. you can get a nice UI in 100 lines to visualize, say, a discretization routine (just the other day) mpv https://adeht.org/dump/vid-2022-04-23T1254.mp4
zacts has joined #commonlisp
zacts has quit [Client Quit]
<q3cpma> _death: CLIM certainly is powerful, but looks quite complicated to learn
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
<rotateq> q3cpma: Okay good to hear.
<rotateq> Yes it has much to offer.
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
cage has joined #commonlisp
kpoeck has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
razetime has joined #commonlisp
zacts has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
Lord_of_Life_ has joined #commonlisp
pranavats has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
vats has joined #commonlisp
Lord_of_Life_ is now known as Lord_of_Life
taiju has quit [Ping timeout: 250 seconds]
zacts has quit [Quit: Client closed]
shka has quit [Quit: Konversation terminated!]
Inline has quit [Quit: Leaving]
zacts has joined #commonlisp
matt` has joined #commonlisp
<q3cpma> Thanks for useful help and goodbye
q3cpma has left #commonlisp [#commonlisp]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 276 seconds]
Oddity has quit [Ping timeout: 272 seconds]
kpoeck has quit [Quit: Client closed]
random-nick has joined #commonlisp
zacts has quit [Quit: Client closed]
lisp123 has joined #commonlisp
aartaka has quit [Ping timeout: 246 seconds]
aartaka has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
orestarod has joined #commonlisp
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
Bike has joined #commonlisp
lisp123 has joined #commonlisp
tyson2 has joined #commonlisp
lisp123 has quit [Ping timeout: 276 seconds]
razetime has quit [Ping timeout: 272 seconds]
razetime has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
NotThatRPG has joined #commonlisp
cage has quit [Remote host closed the connection]
livoreno has quit [Ping timeout: 260 seconds]
jeffrey has joined #commonlisp
cage has joined #commonlisp
cage has quit [Remote host closed the connection]
cage has joined #commonlisp
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cosimone has joined #commonlisp
ebrasca has joined #commonlisp
ebrasca` has joined #commonlisp
ebrasca has quit [Remote host closed the connection]
matt` has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
perrierjouet has joined #commonlisp
hhdave_ has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
hhdave has quit [Ping timeout: 276 seconds]
hhdave_ is now known as hhdave
masinter has joined #commonlisp
jgart has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bike has quit [Quit: Connection closed]
zacts has joined #commonlisp
waleee has joined #commonlisp
lisp123 has joined #commonlisp
zacts has quit [Ping timeout: 252 seconds]
lisp123 has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 260 seconds]
NotThatRPG has joined #commonlisp
leeb has joined #commonlisp
Bike has joined #commonlisp
zacts has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
cosimone has joined #commonlisp
jeffrey has quit [Ping timeout: 240 seconds]
zmv has joined #commonlisp
zmv has quit [Changing host]
zmv has joined #commonlisp
zmv is now known as notzmv
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has joined #commonlisp
karlosz has joined #commonlisp
tyson2 has joined #commonlisp
wildlander has joined #commonlisp
ttree has joined #commonlisp
livoreno has joined #commonlisp
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
notzmv has quit [Remote host closed the connection]
masinter_ has joined #commonlisp
zmv has joined #commonlisp
zmv has quit [Changing host]
zmv has joined #commonlisp
zmv is now known as notzmv
masinter has quit [Ping timeout: 256 seconds]
matt` has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
waleee has quit [Quit: WeeChat 3.5]
waleee has joined #commonlisp
karlosz_ has joined #commonlisp
karlosz has quit [Ping timeout: 240 seconds]
karlosz_ has quit [Ping timeout: 272 seconds]
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
didi has joined #commonlisp
<didi> TIL I can give another name for a key variable, as in (destructuring-bind (&key ((:b foo))) '(:b 42) foo) => 42
<didi> I wonder if there is a way of letting `:b' be a variable, as in (let ((b :b)) (destructuring-bind (&key ((b foo))) '(:b 42) foo))
Sankalp has joined #commonlisp
<rotateq> didi: It should work better with a symbol-macro.
<rotateq> But okay I don't know for sure with destructuring-bind in this case.
sjl has joined #commonlisp
<didi> rotateq: Me neither. I'm investigating now PROGV. Here be dragons for me.
<rotateq> Yeah okay no. :)
<pjb> didi: you can with a macro.
<rotateq> Dragons can become powerful friends and allies too.
<didi> pjb: I be, tho I wonder during run time.
<didi> rotateq: Tricky creatures.
<didi> s/be/bet
<pjb> didi: think about it!
<pjb> didi: for the keyword, it would be possible, but for the parameter variable it would be silly.
<didi> I'm trying! Tho it's exhausting and I end up watching silly youtube videos.
<pjb> didi: you can just use &key &allow-other-keys &rest arguments and (getf arguments parameter-key)
<didi> pjb: Interesting. Thank you.
* didi nods
thomaslewis has left #commonlisp [#commonlisp]
Oddity has joined #commonlisp
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Client Quit]
tyson2 has quit [Remote host closed the connection]
MichaelRaskin has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
treflip has quit [Quit: Quit]
Sankalp has quit []
<_death> hmm, strange that trivial-gray-streams doesn't export cl:close, cl:stream-element-type, and other symbols that are part of the Gray proposal but happen to also be CL names
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
<Nilby> _death: i know :use is scorned now, but it's so you can use-package it
<_death> that shouldn't matter.. you could also use-package it if it exported these symbols
<Nilby> with careful attention to shadowing, yes. but e.g. defining close as a method elicits warnings
<_death> there's no need to shadow anything.. they are the same symbols
NotThatRPG has joined #commonlisp
<_death> if cl:close is not a generic function, that means the implementation doesn't support Gray streams.. in theory there could be a library that gives you a nontrivial-gray-streams:close, and shadowing would then be needed.. but I doubt that's the intention
karlosz has joined #commonlisp
<_death> right now trivial-gray-streams doesn't even export it, so if an implementation doesn't support Gray streams the user is screwed anyway
tyson2 has quit [Remote host closed the connection]
<Nilby> maybe it was fixed in sbcl, but i used to have to muffle warnings on all my close method definitions. i forget why
<_death> sounds weird.. I used trivial-gray-streams before (say a decade ago) and I don't remember any warnings
karlosz_ has joined #commonlisp
<Nilby> hmmmm. when i have to muffle something normal, it's either sbcl or clisp, so let's just blame clisp and call it good.
karlosz has quit [Ping timeout: 276 seconds]
karlosz_ is now known as karlosz
<Nilby> it's seems like current sbcl doens't complain
<Nilby> i'm guessing there were some lisps that didn't have some things generics
<_death> maybe missing &key abort or something
<Nilby> that sounds familiar
cage has quit [Quit: rcirc on GNU Emacs 27.1]
karlosz has quit [Ping timeout: 272 seconds]
karlosz has joined #commonlisp
Dynom has quit [Quit: WeeChat 3.5]
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hashfunc1ebd has joined #commonlisp
attila_lendvai has joined #commonlisp
pfd has joined #commonlisp
NotThatRPG has joined #commonlisp
matt` has quit [Remote host closed the connection]
thomaslewis has joined #commonlisp
jmdaemon has joined #commonlisp
kpoeck has joined #commonlisp
hashfunc1ebd has quit [Ping timeout: 250 seconds]
thomaslewis has left #commonlisp [#commonlisp]
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
Jach has quit [Remote host closed the connection]
<Alfr> _death, I don't think CL:CLOSE can be a generic function.
<rotateq> Yeah not by the spec.
<yitzi> Alfr: the Gray stream spec makes it so.
<rotateq> Sure, if it is redefined as a generic function one can dispatch on the stream class.
<Alfr> What if someone depends on (typep #'close 'generic-function) yielding false?
<Alfr> yitzi, ^
<rotateq> It is indeed in SBCL. Methods defined for SSL-STREAM, FLEXI-STREAM and others.
<rotateq> Alfr: Then better no code to be compiled by SICL in the future. :)
hhdave_ has joined #commonlisp
hhdave has quit [Ping timeout: 256 seconds]
hhdave_ is now known as hhdave
<Alfr> rotateq, now I'm not sure that my above typep must fail. I can find the section about constraints on type relations, but that does not imply that functions can not be implemented as generic-functions. Hm ...
kpoeck has quit [Quit: Client closed]
lisp123 has joined #commonlisp
<rotateq> hmm :/
lisp123 has quit [Ping timeout: 276 seconds]
<_death> clhs does not forbid them to be GFs, and GFs are functions
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karlosz has quit [Remote host closed the connection]
hhdave_ has joined #commonlisp
hhdave has quit [Ping timeout: 272 seconds]
hhdave_ is now known as hhdave
<Alfr> _death, you're right. 1.4.4.14 says that a Function entry type means function, not ordinary function.
akoana has joined #commonlisp
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
Jach has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
tyson2 has joined #commonlisp
<didi> So... I wrote <https://paste.debian.net/hidden/69d7a82a>. It should destructure &key just like `destructuring-bind', but if keyword-name (of `((keyword-name var) ...)') is not a keyword, it's taken as a variable. Heh, I'm not sure I would use it myself, tho it was fun to write it.
pranavats has left #commonlisp [Error from remote client]
jcowan has left #commonlisp [#commonlisp]
karlosz has joined #commonlisp
zacts has quit [Ping timeout: 252 seconds]
pranavats has joined #commonlisp
karlosz has quit [Ping timeout: 272 seconds]
karlosz has joined #commonlisp
zacts has joined #commonlisp
kevingal has joined #commonlisp
attila_lendvai has quit [Ping timeout: 250 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Bike has quit [Quit: Connection closed]
karlosz has quit [Ping timeout: 276 seconds]
lisp123 has joined #commonlisp
hashfunc1ebd has joined #commonlisp
<hashfunc1ebd> how do i push a bit to a 'BIT-VECTOR?
lisp123 has quit [Ping timeout: 256 seconds]
<rtoy> (vector-push bit bit-vector)
<rotateq> hashfunc1ebd: You would need a bit-vector with fill-pointer or an adjustable bit-vector.
cr0myr has joined #commonlisp
<rotateq> So do you want to push to a fixed size bit-vector or one that grows in dimension?
<hashfunc1ebd> rotateq: i'm a little confused in that regard. isn't a vector, by nature, inherently allowed to grow? if it can't grow then it's just an array, right?
<rotateq> No, a vector is a special array with so called rank 1, as a matrix has rank 2.
<hashfunc1ebd> rotateq: oh ok. i understand. thanks
<rotateq> So vectors are subclasses of array.
<hashfunc1ebd> rtoy: thanks
<hashfunc1ebd> is there a way to push a multiple of the same value to a bit vector?
<rotateq> (make-array 3 :element-type 'bit :initial-element 0) gives for example a simple-bit-vector of size 3.
<hashfunc1ebd> for example in rtoy's: example: (vector-push '(element: 1 :number-of-elements: 32) bit-vector)
<rotateq> No not like that with VECTOR-PUSH.
<hashfunc1ebd> rotateq: oh ok. so it looks like i'll just have to loop a number of single VECTOR-PUSHes
zacts has quit [Quit: Client closed]
<rotateq> You can make use of the #* for reading in simple-bit-vectors like #5*1 to get #*11111.
<rotateq> Depends still on what you really would like to do. :)
<rotateq> And to use VECTOR-PUSH or VECTOR-POP it must be of type (and vector (not simple-array)).
<aeth> the only problem with that
<aeth> is that that's a literal, so you can't (well you can, but it will break things, which is even worse) modify it
<aeth> and that's where you'd likely want to have #5*1, to modify it
<aeth> although arguably (copy-seq #5*1) is shorter than the "right" way to do it, e.g. one of several would be (make-array 5 :element-type 'bit :initial-element 1)
<rotateq> yeah
<rotateq> And resetting bit via #'(setf sbit).
<aeth> of course, once you start doing idioms like (copy-seq #5*1) you're approaching perl
<aeth> where, yeah, it's concise, but even an expert might not know what it does right away
<rotateq> hashfunc1ebd: You might have also a nice and well educational read-up about CL array in the "Common Lisp Recipes" book, chapter 5.
<rotateq> Concise things can also help getting the idea from one look.
karlosz has joined #commonlisp