jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
ealfonso has quit [Ping timeout: 246 seconds]
<ebrasca> Is gray streams bad compared to simple-streams ?
omilu has quit [Read error: Connection reset by peer]
<no-defun-allowed> gray streams is the de-facto standard for user streams
<no-defun-allowed> i assume simple-streams is a layer on top of gray streams providing some simple use cases and setup for streams
<scymtym> no-defun-allowed: it is a competing proposal for user-extensible streams: https://franz.com/support/documentation/current/doc/streams.htm#simple-stream-intro-1
<no-defun-allowed> gray streams is more often implemented in a Lisp though
<Bike> your assumption was incorrect, is the point
<no-defun-allowed> that's true
<no-defun-allowed> but i still would suggest gray streams since that would be implemented in more implementations
<scymtym> SBCL offers both protocols, but i haven't seen the simple streams interface used
<ebrasca> Do someone like to read and comment mi ext implementation for mezzano? ( https://github.com/ebrasca/Mezzano/blob/ext-fs/file/ext.lisp )
bjorkintosh has joined #lisp
Cymew has joined #lisp
rumbler31 has quit [Remote host closed the connection]
elfmacs has joined #lisp
Kundry_Wag has joined #lisp
dacoda has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
emar has quit [Ping timeout: 250 seconds]
svillemot has quit [Ping timeout: 252 seconds]
dacoda has joined #lisp
dacoda has quit [Remote host closed the connection]
dacoda has joined #lisp
Mr-Potter has quit [Ping timeout: 250 seconds]
dacoda has quit [Remote host closed the connection]
svillemot has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
megalography has joined #lisp
dale has quit [Quit: dale]
dacoda has joined #lisp
dacoda has quit [Remote host closed the connection]
meepdeew has quit [Remote host closed the connection]
rumbler31 has joined #lisp
Demosthenex has joined #lisp
Demosthenex has quit [Ping timeout: 240 seconds]
Demosthenex has joined #lisp
pierpa has joined #lisp
<pierpa> The iterate package available from common-lisp.net has been broken. Anybody knows where to get the usual, working, version?
<no-defun-allowed> quicklisp-data would tell you where it gets cloned from i think
<no-defun-allowed> sorry, ql-projects
<pierpa> ty
<pierpa> btw, the version at common-lisp.net is not common lisp anymore. I wonder why people do this.
<buffergn0me> pierpa: Iterate?
<pierpa> yes?
<buffergn0me> What is not Common Lisp about https://gitlab.common-lisp.net/iterate/iterate ? Did something change?
arescorpio has joined #lisp
<pierpa> the first problem is that the third form in the file is (defconst version "1.4" "Current version of Iterate"), which is not CL, and hence does not get compiled by a CL compiler. I have not examined the rest of the source to see what else is broken.
dddddd has quit [Quit: Hasta otra..]
terpri has quit [Read error: Connection reset by peer]
<buffergn0me> Looks like DEFCONST is a macro defined in package.lisp
<pierpa> ah, yes. You are right. I had missed that.
<pierpa> still broken, anyway
<pierpa> loading packages.lisp and iterate.lisp in sequence should work, and it used to work for decades. Now it doesn't.
clintm has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<clintm> Is there a mechanism of any sort that will allow me to iterate over a list and also step backward through that same list? I'm trying to avoid binding a symbol to the previous item, or the like.
<pfdietz> Is that different from the ITERATE in QL? That also has a defconst macro in packages.lisp.
<pfdietz> "work around sbcl's obnoxious standard compliance"
<clintm> I haven't looked through the docs for iterate past a once-over glance. I'll look again though.
<pfdietz> Step backwards? Not that I know of. In general that could be expensive, as ordinary lists do not have back pointers.
<pierpa> pfdietz: I don't know if it's the same as the one in QL
meepdeew has joined #lisp
<clintm> Well, maybe step backwards isn't the best way to describe it, but it looks like iterate's previous keyword is what I'm looking for. Testing it out now.
<pierpa> clintm: (loop for x in list for y in (rest list) ...) could do what you want?
<clintm> pierpa: is (rest list) equivalent to (cdr list)?
<pierpa> yes
<pierpa> or (loop for x in list for y = nil then x ...)
<pfdietz> The iterate at the common-lisp.net gitlab is the same one as in QL
<pierpa> (but I'm rusty on LOOP so I may be misremembering
<pierpa> pfdietz: good to know. ty
<pfdietz> They migrated from darcs, right?
<clintm> I think this is one of those situations where I need to just stop, take my hands off of the keyboard for a minute, and think about what I'm trying to do.
<pierpa> oops, the second LOOP is not right
<pierpa> this one better: (loop for y = nil then x for x in '(a b c d) do (print (list x y))) ==> (A NIL) (B A) (C B) (D C)
rumbler31 has joined #lisp
meiji11 has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 268 seconds]
lerax has joined #lisp
gravicappa has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
Bike has quit [Quit: Lost terminal]
<beach> Good morning everyone!
pierpa has quit [Quit: Page closed]
<clintm> mornin' beach!
orivej has quit [Ping timeout: 244 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
jack_rabbit has quit [Ping timeout: 268 seconds]
elfmacs has quit [Ping timeout: 250 seconds]
CrazyEddy has joined #lisp
pierpal has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
CCDell has quit [Remote host closed the connection]
arescorpio has quit [Ping timeout: 246 seconds]
brandonz has quit [Quit: brb]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
brandonz has joined #lisp
SaganMan has joined #lisp
smokeink has joined #lisp
sindan has quit [Remote host closed the connection]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
SaganMan has quit [Ping timeout: 252 seconds]
mrcom has quit [Read error: Connection reset by peer]
dacoda has joined #lisp
emaczen has joined #lisp
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Ping timeout: 272 seconds]
beach has quit [Disconnected by services]
beach has joined #lisp
dale has quit [Quit: dale]
elfmacs has joined #lisp
Necktwi has quit [Read error: Connection reset by peer]
Necktwi has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
wigust has joined #lisp
wigust- has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
emaczen has quit [Ping timeout: 260 seconds]
slyrus1 has joined #lisp
vlatkoB has joined #lisp
robotoad has quit [Ping timeout: 245 seconds]
bendersteed has joined #lisp
schweers has joined #lisp
FreeBirdLjj has joined #lisp
robotoad has joined #lisp
esrse has joined #lisp
<splittist> good morning all
<no-defun-allowed> morning splittist
dacoda has quit [Ping timeout: 250 seconds]
robotoad has quit [Quit: robotoad]
<beach> Hello splittist.
angavrilov has quit [Ping timeout: 250 seconds]
varjag has joined #lisp
yvy has joined #lisp
gxt has quit [Ping timeout: 246 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
shka_ has quit [Ping timeout: 246 seconds]
<bendersteed> good morning european friend!
<beach> Hello bendersteed.
<beach> But why exclude the others?
<bendersteed> no exclusions, good morning to everyone
<bendersteed> I was just happy to share a morning
<no-defun-allowed> morning bendersteed
<beach> bendersteed: What brings you to #lisp today?
<bendersteed> beach: i'm a noob in common lisp, and solve the advent of code in it so i lurk if i have to ask anything
orivej has joined #lisp
<bendersteed> but practical common lisp and hyperspec seem to have me mostly coveres
heisig has joined #lisp
<bendersteed> covered*
<beach> OK, good.
<beach> bendersteed: For truly elementary questions, there is also #clschool.
<bendersteed> thanks
jochens has joined #lisp
hhdave has joined #lisp
xificurC has joined #lisp
quasi` has joined #lisp
<quasi`> hello minion
salva has joined #lisp
<beach> minion: Hello!
<minion> what's up?
dddddd has joined #lisp
<quasi`> back here after a decade (or seems like it) ... :-/
<beach> You? Welcome back then.
<quasi`> haha. thanks. always the lurker anyway.
meepdeew has quit [Remote host closed the connection]
mrcom has joined #lisp
yvy has quit [Read error: Connection reset by peer]
schjetne has joined #lisp
quasi` has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
xkapastel has joined #lisp
elfmacs has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 245 seconds]
Necktwi has quit [Remote host closed the connection]
Mr-Potter has joined #lisp
orivej has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
kbtr has joined #lisp
robdog has joined #lisp
m00natic has joined #lisp
orivej has joined #lisp
<gendl> Morning
neirac has joined #lisp
<flip214> for hunchentoot's EASY-SSL-ACCEPTOR, can I get the CN from a client certificate? Or any other data from x509?
smokeink has quit [Ping timeout: 240 seconds]
smokeink has joined #lisp
bendersteed has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 2.3]
elderK has quit [Quit: WeeChat 1.9]
neirac has quit [Remote host closed the connection]
esrse has quit [Ping timeout: 240 seconds]
elfmacs has joined #lisp
schjetne has quit [Ping timeout: 272 seconds]
Necktwi has joined #lisp
eminhi has joined #lisp
milivoj has joined #lisp
milivoj has left #lisp [#lisp]
robdog has quit [Remote host closed the connection]
neirac has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 268 seconds]
mathrick has quit [Read error: Connection reset by peer]
mrcom has quit [Read error: Connection reset by peer]
milivoj has joined #lisp
FreeBirdLjj has joined #lisp
milivoj has quit [Client Quit]
milivoj has joined #lisp
milivoj has quit [Client Quit]
milivoj has joined #lisp
milivoj has quit [Client Quit]
mrcom has joined #lisp
rnmhdn has joined #lisp
<rnmhdn> any thoughts for a 1:30 h interesting talk related to functional programming?
<neirac> how do debug this? https://pastebin.com/RtfnxAmM it only works if I use let* at the second let s-expr
<schweers> neirac: you could add a (break) expression to enter the debugger. But I don’t see any reason why the inner LET should be a LET* instead.
<shka__> hmmmm
<shka__> you can trace lquery functions i think
<shka__> IIRC those are functions
<shka__> not macros
<schweers> Your indentation is ... confusing.
<schweers>
<schweers> Does Common Lisp specify in which order the expressions of a let clause are evaluated?
<schweers> I just checked, it does.
<neirac> schweers my common lisp book just says let* evaluates each expression sequentially not as let. schweers is there any formatter for common lisp, I'm just using emacs
<schweers> Just mark the whole thing and press TAB. It should be enough
<schweers> But I haven’t used an emacs I didn’t configure myself in ages.
kajo has quit [Ping timeout: 252 seconds]
<ogamita> ;;;;;;;;;;;;;;;;;;
<neirac> schweers oh, ok it seems paste bin scramble identation a little
<beach> neirac: Don't use TABs.
<beach> (setq-default indent-tabs-mode nil) in your .emacs
<ogamita> Programmers who use Spaces are paid higher than programmers who use tabs!
<ogamita>
<beach> neirac: Also, never put whitespace after an opening parenthesis.
<xificurC> use tabs *and* spaces, to confuse even more people :) https://www.emacswiki.org/emacs/SmartTabs
rnmhdn has quit [Ping timeout: 264 seconds]
<neirac> ogamita and beach thanks :)
<neirac> xificurC thanks for the link
<beach> neirac: It ought to work with LET.
<xificurC> neirac: don't take that seriously, stick to spaces
neirac has quit [Read error: Connection reset by peer]
neirac has joined #lisp
<neirac> slime is just stuck evaluating, slime-interrupt does not work. it should work with let/let* . it seems is a network issue
drewes has joined #lisp
pierpal has joined #lisp
<neirac> neirac is working now
Guest14049 has joined #lisp
mindCrime has joined #lisp
rnmhdn has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
nicksmaddog has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
LiamH has joined #lisp
Bike has joined #lisp
Demosthenex has quit [Ping timeout: 244 seconds]
gravicappa has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
warweasle has joined #lisp
rnmhdn has quit [Ping timeout: 245 seconds]
Demosthenex has joined #lisp
<neirac> I'm trying to use mapcar on vectors but it requires a list. I thought mapcar used any sequence.
<beach> It does not.
<beach> clhs mapcar
<beach> Use MAP instead.
<beach> clhs map
Guest14049 has quit [Ping timeout: 252 seconds]
lerax has quit [Remote host closed the connection]
<beach> Or use LOOP.
smokeink has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 268 seconds]
<ebrasca> Hi
CrazyEddy has quit [Ping timeout: 246 seconds]
<White__Flame> neirac: btw, as per its name, mapcar uses car which is a list operation, not a vector operation
<neirac> White_Flame thanks
dale_ has joined #lisp
dale_ is now known as dale
<_death> neirac: LET evaluates the init forms from left to right, like LET*.. only the binding is parallel
schweers has quit [Remote host closed the connection]
v0|d has quit [Remote host closed the connection]
<neirac> beach thanks!, I'm trying this but fails. (map #'(lambda (x y) (cons x y )) names prices) ; names and prices are vectors
rippa has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<White__Flame> MAP takes an extra 1st parameter, which is the result type
<White__Flame> so (map 'list ...) or (map 'vector ..) or whatever
<White__Flame> you can have parameterized/specialized types in there, too
<neirac> White_Flame oh, I'm so sorry now it's working. I'll recheck my lisp book again I'm too rusty
heisig has quit [Ping timeout: 252 seconds]
nicksmaddog has quit [Ping timeout: 246 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
elfmacs has quit [Ping timeout: 240 seconds]
<ogamita> beach: loop cannot be used on sequences. Only either on list or on vectors. loop for in vs. loop for across
<ogamita> Only map is good.
<ogamita> and elt.
rnmhdn has joined #lisp
<White__Flame> in practice, what other subclasses of SEQUENCE are there?
<ogamita> No standard; In SBCL you can define your own.
<White__Flame> things like MAP say they'll error out if the result type is not a list or vector subtype
<ogamita> You can do: (defgeneric iterator (seq) (:method ((seq list)) (lambda () (when seq (values (pop seq) t)))) (:method ((seq vector)) (let ((i -1)) (lambda () (when (< (incf i) (length seq)) (values (aref seq i) t)))))) (loop :with it := (iterator seq) :for (val gotit) := (multiple-value-list (funcall it)) :while gotit :do (process val))
eminhi has quit [Ping timeout: 252 seconds]
drewes has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
White__Flame is now known as White_Flame
<ogamita> White__Flame: Good point! However, I guess language extensions will allow it, despite the covariant/contravariant problem.
<ogamita> but (map type (lambda (val) (process val)) seq) is just simplier, no need to reinvent the wheel.
Guest14049 has joined #lisp
notzmv has quit [Ping timeout: 240 seconds]
reg_32 has joined #lisp
FreeBirdLjj has quit []
<neirac> ogamita thanks a lot
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
jkordani has joined #lisp
notzmv has joined #lisp
kajo has joined #lisp
robotoad has joined #lisp
schweers has joined #lisp
emaczen has joined #lisp
FreeBirdLjj has joined #lisp
Inline has joined #lisp
josh5tone has joined #lisp
robotoad has quit [Quit: robotoad]
CrazyEddy has joined #lisp
reg_32 has quit [Quit: Page closed]
Essadon has joined #lisp
aindilis has quit [Ping timeout: 245 seconds]
mrcom has joined #lisp
Guest14049 has quit [Ping timeout: 240 seconds]
robotoad has joined #lisp
dtornabene has joined #lisp
yyyyyy has joined #lisp
razzy has quit [Ping timeout: 246 seconds]
Zaab1t has joined #lisp
emaczen has quit [Ping timeout: 250 seconds]
emaczen has joined #lisp
runejuhl has quit [Read error: Connection reset by peer]
slyrus1 has quit [Quit: slyrus1]
runejuhl has joined #lisp
schweers has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
gxt has joined #lisp
marvin2 has quit [Ping timeout: 268 seconds]
bjorkintosh has quit [Ping timeout: 260 seconds]
Guest14049 has joined #lisp
varjag has joined #lisp
beach has quit [Ping timeout: 252 seconds]
beach has joined #lisp
diegorq has joined #lisp
Guest14049 has quit [Ping timeout: 252 seconds]
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
sjl has joined #lisp
shka_ has joined #lisp
<shka_> good evening
<shka_> beach: sorry to disturb you, but some time ago you were referring to article with comparative analysis of different allocators
jochens has quit [Ping timeout: 272 seconds]
<shka_> i can't find it now
<shka_> could you please remind me the author?
<beach> Paul Wilson et al.
<beach> Let me find it for you...
<shka_> thank you!
<shka_> i can find
<shka_> it
<shka_> got it :-)
<beach> Great!
<shka_> yeah
<shka_> i will save it this time
<beach> It's a beautiful piece of work. My preferred kind. :)
<shka_> yes, i recall it being very valuable
<beach> He takes an entire domain and shows how decades of research by the theoreticians was all based on false premises, so all their results are wrong.
<shka_> IT has a little bit in common with medicine i guess
<beach> I wouldn't know.
<beach> Paul was (is?) a very smart man. I enjoyed several complete afternoons at the little pub right outside the Austin campus drinking beer from micro breweries and discussing language implementation strategies.
<shka_> beach: pathogen as a concept was largely rejected by mainstream medicine by most of the modern era
hhdave has quit [Ping timeout: 260 seconds]
<beach> Then his work is very different, because people still say "but what about fragmentation" when I show them what I suggest, despite the fact that Paul showed that only programs that do nothing useful would fragment the memory.
mathrick has joined #lisp
<beach> shka_: But you are right in some respects. Most medical doctors still prescribe cholesterol-lowering drugs despite the fact that it was shown decades ago that this is some very dangerous practice, and it is based on falsified research.
<shka_> most of the research in the pharmacy is opaque
<shka_> and crappy results are not getting published, period
<beach> The research I was referring to was downright fraudulent.
<shka_> that happens as well
<shka_> it is the norm, sadly
<shka_> now more then ever
<pfdietz> One of my inlaws had permanent muscle damage from statins. He has trouble climbing stairs now.
<shka_> and having said that, even Louis Pasteur did some shady stuff
<shka_> so it is century long tradition at this point
<shka_> pfdietz: i am sorry to hear that
<beach> pfdietz: Yes, very dangerous stuff.
<shka_> anyway, my point is that IT can as hard headed as medicine
<shka_> *can be
dtornabene has quit [Quit: Leaving]
<shka_> and that would be very, very, very hard headed
<shka_> thanks for the article though
m00natic has quit [Remote host closed the connection]
cage_ has joined #lisp
pchrist has quit [Quit: leaving]
pchrist has joined #lisp
sauvin has quit [Ping timeout: 246 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
shangul has joined #lisp
mason has left #lisp [#lisp]
<shangul> I guess I had to use dotimes not in this way
clintm has quit [Remote host closed the connection]
<jackdaniel> shangul: put first binding of let in the same line, remove incf in favor of (dotimes (i (1+ n)) …), put dotimes body in a new line, replace (setf (sum (+ i sum))) with (incf sum i)
<shangul> in the same line with (let ?
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<jackdaniel> also, many people considers using loop more lispy (and some consider it less lispy) - it is up to you. That would be (loop for i from 0 upto (parse-integer …) sum i)
<jackdaniel> yes, usually you write it like this:
<jackdaniel> (let ((a 3)<newline>(b 4))<newline>,@body)
mindCrime has quit [Ping timeout: 245 seconds]
<shangul> But I can't remove the first incf
<jackdaniel> why is that?
<shangul> It will print the wrong result then
<jackdaniel> first incf impacts n
<jackdaniel> if you write it (dotimes (i (1+ n)) …), then you have the same result, you iterate from 0 to n inclusive (thanks to 1+ function)
pfdietz has quit [Ping timeout: 268 seconds]
<jackdaniel> regarding loop above, you may of course start from 1, it doesn't make sense to start from 0 in this case (I've just translated your code)
troydm has joined #lisp
mangul has joined #lisp
shangul has quit [Disconnected by services]
mangul is now known as shangul
orivej has quit [Ping timeout: 244 seconds]
<shangul> https://apaste.info/d2yO jackdaniel
<jackdaniel> it's better. still you should keep ((n (parse-integer…))) in the same line as let, and have (sum 0)) be in the second line
<jackdaniel> also, did you try loop variant I've presented you?
<jackdaniel> nb: there is #clschool channel where you may also find help with your questions
<shangul> who is nb?
<jackdaniel> nota bene, in other words "worth mentioning", or "by the way"
<shangul> Is nota bene English?
<jackdaniel> according to my research which I have executed on your demand: yes, it is (https://en.wikipedia.org/wiki/Nota_bene)
<shangul> Thanks and Thanks jackdaniel
<jackdaniel> sure
Oladon has quit [Ping timeout: 268 seconds]
shangul has quit [Quit: sudo rm -rf /usr/*]
<pjb> "Nota bene" is Latin.
emaczen has quit [Ping timeout: 264 seconds]
<Bike> yeah but it's used in english.
<Bike> like many other latin phrases and words, such as "habeas corpus" or "irrumatio"
<White_Flame> you missed a perfect opportunity to end that sentence with et cetera
pfdietz has joined #lisp
findiggle has joined #lisp
Arcaelyx has joined #lisp
<diegorq> Help, please! I'm a newbie and I made the mistake of trying to use the loop macro. I can't figure out why this (https://apaste.info/lw1q) code repeats the first element of the string while this other (https://apaste.info/g9oC) works fine.
<diegorq> What am I missing?
<diegorq> Just in case, I'm testing this using sbcl
<White_Flame> I don't think you want "and" there
<White_Flame> I think that's a one-time initializer in that particular usage
<White_Flame> for c1
<White_Flame> that should be part of the DO
<White_Flame> put a LET inside the DO body to calculate c1
<diegorq> this is a simplification of what I was trying to do. At the same time I was setting another variable "c2" and using "when" "while" and "collecting"
<diegorq> to build something based on two input strings.
<White_Flame> c1 is not strictly an iteration variable in this usage. It's in the inner loop body, calculated using the actual iteration variable I
<White_Flame> so c1 should not be part of the FOR clause
<sjl> clhs 6.1.2.1
<sjl> > The and construct can be used to connect two or more iteration clauses when sequential binding and stepping[1] are not necessary.
<sjl> using `and` with `for` is fine, but not if you need sequential binding (which you do here, because c1 is calculated from i)
<diegorq> I see.
<sjl> You can replace the `and` with another `for` and it'll do what you expect
<diegorq> Eventhough I solved my exercise using 'across' I'll try these suggestions. Thanks a lot.
rnmhdn has quit [Ping timeout: 268 seconds]
<sjl> across is definitely the cleaner way to iterate over a vector, if that's all you need.
diegorq has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
marvin2 has joined #lisp
Guest14049 has joined #lisp
dyelar has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
bjorkintosh has joined #lisp
mindCrime has joined #lisp
Elephant454 has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Guest14049 has quit [Ping timeout: 252 seconds]
cage_ has quit [Remote host closed the connection]
kajo has quit [Ping timeout: 250 seconds]
Guest14049 has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Guest14049 has quit [Ping timeout: 252 seconds]
razzy has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
meepdeew has joined #lisp
desvox has joined #lisp
<desvox> cool, my other irc networks never talk about lisp so weeeeeee
yyyyyy has quit [Ping timeout: 268 seconds]
<desvox> so ive been fiddling lots with hunchentoot, one issue ive had with it is spitting out very long objects in its logs when serving large files
<desvox> like huggeeeeeeeeeee prints of [32 34 434 6 654 67 45 643 5432 5...] and so forth
<desvox> its like its dumping the whole file on stdout every time the connection breaks
<no-defun-allowed> Can you bind *print-length* when it prints?
<desvox> thats not how it works no? i mean if i were to do (let ((*print-length* whatever)) (handle-static-file *)) that wouldnt actually work would it?
<desvox> like, what i really need perhaps is just changing what goes to stdout
<no-defun-allowed> No, not likely...
<no-defun-allowed> I'll take a look in a bit at the docs, I'm still half asleep (:
<desvox> and im honestly not sure what the rest of the message is, because it is dumping literal hundreds of mb over my ssh connection
<desvox> and i have to mash ^\ just to get my terminal to work
<desvox> yeah i should probably keep looking myself no-defun-allowed
<pjb> desvox: redirect!
<desvox> but hunchentoot would still be serving that file?
<desvox> mmm let me look
yvy has joined #lisp
<desvox> really should spin up a test instance i can crash at will because having to start my irc bot up again every time is annoying
<no-defun-allowed> If you redirect it, you then fill up a file with problems.
<desvox> well in that case, id end up with yet another 1GB file
<desvox> do you hunchentoot is ill suited for files that huge?
<desvox> *you think
<desvox> because i could probably set it up to late nginx serve them instead
<desvox> ugh sorry im making so many typos, im really jittery right now
<no-defun-allowed> Well yeah, if you're in prod you'll make things a bit faster serving static content with nginx and forwarding hunchentoot.
<no-defun-allowed> But we should still find out how to make Hunchentoot less spammy.
<desvox> yeah back when i ran a video server, i had to send all the output to /dev/null because of this
graphene has quit [Remote host closed the connection]
<desvox> i could point it to a file so i could at least look at it i guess
kajo has joined #lisp
<ebrasca> How to check if some number contain all bits from other number?
graphene has joined #lisp
<no-defun-allowed> (logand a b) would be equal to b in that case I think.
<ebrasca> no-defun-allowed: Thank you.
Jesin has joined #lisp
Jesin has quit [Remote host closed the connection]
<no-defun-allowed> MAYBE-INVOKE-DEBUGGER looks like it could handle dumping to the log when something goes wrong.
<pjb> ebrasca: using one of the log* functions.
<desvox> so ive managed to get a sane reproduction here https://0x0.st/sDth.txt
<desvox> in this case i was streaming a video file from firefox
<desvox> so its not as bad as what happened when serving a 1.2gb archive
<pjb> (format nil "~4,'0b" (logandc2 #b1100 #b1010)) #| --> "0100" |# So I would say (defun contains-all-bits-of (container contained) (zerop (logandc2 container contained)))
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<no-defun-allowed> ok got it desvox
<pjb>
<jgkamat> uh
<pjb>
<pjb>
<pjb>
<pjb>
<pjb>
<jgkamat> someone send help
<desvox> no-defun-allowed: actually setting :message-log-destination and :access-log-destination did the trick
<pjb>
<pjb>
<pjb>
<desvox> however, it will blow out my storage
<pjb>
<pjb>
<pjb>
<pjb>
<desvox> i could point it to /dev/null within lisp, sure
<pjb>
<pjb>
<desvox> but like, i do want all my other errors
<pjb>
<pjb>
<pjb>
<pjb>
<desvox> ...............
<pjb>
<desvox>
<pjb>
<pjb> err, rather: (defun contains-all-bits-of (container contained) (zerop (logandc2 contained container))) (contains-all-bits-of #b1100 #b1010) #| --> nil |# (contains-all-bits-of #b1110 #b1010) #| --> t |#
<desvox> cool, ill give that a shot no-defun-allowed
<no-defun-allowed> this makes vectors and lists just print out ... after 80 elements
<desvox> thank GOD
<desvox> sounds perfect
<desvox> eek its still doing it
<no-defun-allowed> not any shorter?
<no-defun-allowed> the backtrace is spammy as hell but it's not the file
trafaret1 has joined #lisp
<trafaret1> hi once more time gentelments
<desvox> no-defun-allowed: nope, its not any shorter sadly
<desvox> i even tried lowering it from 80
<trafaret1> anybody can explain me how to organize such sytem [PC[lisp-environemnt]] ~~~~~[Tablets(Show evaluations)]?
<desvox> if its any help, what im doing to cause this is opening a video file thats stored in the path i gave to :document-root, in firefox, and when the video loads, i just skip around it until it breaks
Jesin has joined #lisp
scymtym has joined #lisp
aindilis has joined #lisp
<desvox> anyways aside from this, ive really liked working with hunchentoot
<no-defun-allowed> very odd
<desvox> a couple years ago i used to run a video server for me and my housemate, because we were only sattelite, we had a data limit during the daytime, and unlimited from 2AM-8AM
<desvox> so i scheduled transmission and youtube-dl stuff to download to the server in the free hours
<desvox> saving us out precious 15GB a month during the day while still letting us watch stuff
<desvox> it was sooooo useful and easy to set up but sadly i lost the source code
<desvox> but back then i had this issue too
<desvox> i didnt care about it enough and just dumped it all to /dev/null but now that im getting back into it, am thinking its kinda dumb and probably preventable
<ebrasca> pjb: Can I do the same but if only contain some bit?
varjag has quit [Ping timeout: 240 seconds]
<fortitude> ebrasca: sounds like logbitp might be what you're looking for
<ebrasca> maybe (zerop (logand a b)) ?
<pjb> ebrasca: Would you consider using bit vectors instead?
<ebrasca> pjb: I don't know why I need bit vector.
<pjb> Otherwise, (defun contains-all-bits-of/masked (container contained mask) (zerop (logandc2 (logand mask contained) container)))
ealfonso has joined #lisp
<pjb> ebrasca: yeah, perhaps not. Also, you can consider ldb and mask-field.
<pjb> But the solution above with log* has one fewer calls.
<pjb> bit-vectors don't have an advantage here, because the bit-* functions don't take a :start :end range :-(
<pjb> So you'd have to use subseq or a displaced bit-vector, and it won't be more efficient.
<pjb> (unless your ranges are small, and your integers are big).
<aeth> I think you'd need something to be *very* large for bit vectors to be worth it.
<aeth> I don't think the line is even 64 in SBCL. In SBCL you can have (unsigned-byte 64) arrays and if you do a type declaration for the array it will know the size of the elements... So it's possible that for many uses of bits you could just have multiple ub 64s in parallel. This could work for 128, 256, etc.
<pjb> aeth: more than one word.
<pjb> Let's say, more than 3 or 4 words, to leave some margin for ranges over two words.
<aeth> pjb: But it's *very* fast to do bit operations.
<aeth> Depending on what check you're doing, arrays of ub 64 might be better than bit arrays.
<pjb> And on 64-bit processors, you often have 128-bit data buses with the RAM too! So this is effectively 128-bit words.
<aeth> You'd just turn one bit operation into 4 "parallel" bit operations
<aeth> (well n parallel, not 4)
<aeth> I'd say stylistically ub64s in parallel could work fine until 4 or so, so 256 elements. Macros, of course, means that you could do it based on what's optimal (which could change based on the implementation and even the version of the implementation)
LiamH has quit [Quit: Leaving.]
<ebrasca> Here is my result (= 2 (logand #b11111011111011111 feature-incompat))
<aeth> This is, of course, assuming a 64-bit implementation that has specialized (unsigned-byte 64) arrays. It also requires you to do a type declaration if the creation of the object is done in a separate function (in which case type inference probably wouldn't work)
<ebrasca> Only give t if you only have feature +incompat-filetype+ ( 2 ) from ext.
shka_ has quit [Ping timeout: 240 seconds]
<aeth> ebrasca: why "= 2"?
<aeth> I personally wouldn't mix binary and base 10. I'd either use base 2 or base 16 when working with something that's supposed to be base 2 like integers-as-bits
<ebrasca> aeth: OK now it is #x2
<aeth> great :-)
CCDell has joined #lisp
<ebrasca> Yea I can read from my 2 partitions: one ext2 and one ext3 in mezzano. ( for ext4 someting is missing )
<no-defun-allowed> nice
charh has joined #lisp
<desvox> whoa whhaattt
<desvox> can mezzano boot on real hardware?
<no-defun-allowed> probably yea
<no-defun-allowed> although smt would be more interesting imo, ext support is gonna be good
<ebrasca> desvox: Mezzano can boot on my PC ( bare metal ) .
<desvox> no-defun-allowed: whats smt?
<desvox> ebrasca: wow thats real neat, i had no idea it had come this far
<no-defun-allowed> simultaneous multithreading iirc
<no-defun-allowed> wait no not that
<ebrasca> no-defun-allowed: I don't know how to fix multi core in mezzano.
<no-defun-allowed> SMP is that
<no-defun-allowed> yeah, it's probably more difficult
<no-defun-allowed> get the other x86 cores up, trampoline them into protected mode, then patch the scheduler and probably some more stuff
<no-defun-allowed> https://wiki.osdev.org/SMP
<ebrasca> no-defun-allowed: I don't think I can do SMP.
<no-defun-allowed> i don't expect you to, it's probably much harder
<no-defun-allowed> again, ext2 support is still great :)
<ebrasca> no-defun-allowed: I am making ext2 , ext3 and ext4.
<ebrasca> no-defun-allowed: For now I don't know what to do with features like Compression.
<ebrasca> And for now it have only read.
makomo has quit [Ping timeout: 268 seconds]
yvy has quit [Read error: Connection reset by peer]
nopolitica has joined #lisp
stardiviner has joined #lisp
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xificurC has joined #lisp
makomo has joined #lisp
themsay has joined #lisp
Bike has quit []
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Guest14049 has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Essadon has quit [Quit: Qutting]
Guest14049 has quit [Ping timeout: 252 seconds]
stardiviner has quit [Quit: WeeChat 2.3]
stardiviner has joined #lisp