<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?
<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!
<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>
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)
<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
<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>
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>
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