<Gleefre>
(mapcan #'f '(1 2)) must be equivalent to (apply #'nconc (mapcar #'f '(1 2))) but it is not
<flip214>
Gleefre: http://clhs.lisp.se/Body/03_f.htm 3.6 says " For list traversal operations, the cdr chain of the list is not allowed to be destructively modified. " but that's happening here, via nconc
<Gleefre>
Hm, but I'd say it is talking about list we are traversing
<Gleefre>
'(1 2) in this case, and it is not modified..
<beach>
Gleefre: I think you are right.
<beach>
I suspect MAPCAN is not implemented using a call to NCONC, and the case where there is sharing between the lists returned by the function is not taken into account.
Gleefre has quit [Remote host closed the connection]
jon_atack has quit [Ping timeout: 240 seconds]
Gleefre has joined #commonlisp
jon_atack has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
<john_titor>
knusbaum: welcome back! :)
john_titor is now known as jackdaniel
jackdaniel has quit [Changing host]
jackdaniel has joined #commonlisp
xaltsc has joined #commonlisp
<yitzi>
Gleefre: The only reason that your first example doesn't loop forever is that there is only one concatenation happening. If you mapped over '(1 2 3) it will also loop forever.
azimut has quit [Remote host closed the connection]
<beach>
Still, the way it is defined, it should work for (1 2).
azimut has joined #commonlisp
<yitzi>
Sure.
<beach>
yitzi: Hmm, I can't reproduce your example.
<yitzi>
Let me check it again
<beach>
I can reproduce it.
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
<beach>
But I think it depends on how LAST behaves.
Brucio-61 has quit [Ping timeout: 260 seconds]
<yitzi>
It this that is also why the mapcan loops forever.
Brucio-61 has joined #commonlisp
<yitzi>
That was a bit garbled: I think this is also why the mapcan example loop forever.
<beach>
But again, NCONC is defined using LAST, and it is unspecified how LAST behaves for a circular list.
<Gleefre>
Yeah, it is broken only for a list of length 2.
<beach>
Right.
micro has quit [Remote host closed the connection]
<beach>
And in all other cases, anything could have happened, since it is undefined behavior.
tyson2 has joined #commonlisp
waleee has joined #commonlisp
micro has joined #commonlisp
<Gleefre>
Also, it seems that there is another problem with mapcan and mapcon
<Gleefre>
(mapcon #'cdr '(1 2 3)) ; => 3
<Gleefre>
*car
<Gleefre>
But it should error, since (nconc 1 2 3) errors
<beach>
Indeed.
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
lucasta has joined #commonlisp
foretspaisibles has quit [Quit: Ping timeout (120 seconds)]
scymtym__ has quit [Remote host closed the connection]
scymtym__ has joined #commonlisp
<pjb>
Gleefre: but (mapcon #'cdr '(1 2 3)) is not conforming so anything can occur. It could return 42 or launch a missile over your house. Instead, try: (mapcon (lambda (list) (copy-list (cdr list))) '(1 2 3)) #| --> (2 3 3) |#
<pjb>
Gleefre: but (mapcon #'cdr '(1 2 3)) is not conforming so anything can occur. It could return 42 or launch a missile over your house. Instead, try: (mapcon (lambda (list) (copy-list (cdr list))) '(1 2 3)) #| --> (2 3 3) |#
<ixelp>
GitHub - robert-strandh/Constrictor: A library that implements the functionality of the Conses dictionary of the Common [...]
<beach>
pjb: Gleefre correct it so that it is #'car instead of #'cdr.
<beach>
pjb: Gleefre corrected it so that it is #'car instead of #'cdr.
<beach>
pjb: <Gleefre> *car
<beach>
Gleefre: Feel free to contribute to Constrictor.
<beach>
The LAST function of Constrictor detects circularity so an error is signaled.
<pjb>
Can it do it without being slower on non-circular lists?
<beach>
I don't care.
<pjb>
ok.
NotThatRPG has joined #commonlisp
<Gleefre>
beach: Glad it was of help!
<beach>
pjb: I am betting that LAST is not used terribly often, and that I will more than compensate for the slightly worse performance by other (more general) implementation tricks such as call-site optimization.
<beach>
Gleefre: By the way, are you new here? I don't recognize your nick.
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
<Gleefre>
Somewhat new, yeah
pvac has joined #commonlisp
<beach>
Welcome! What brings you to Common Lisp? It seems you already know quite a bit.
<beach>
*to #commonlisp I mean
<Gleefre>
Well, I learned that lisp exists about 3 years ago. At that time python was my favorite language, and I knew a little bit of c++. I really liked lisp and started learning it, and now I'm trying to join the community.
<beach>
Gleefre: Do you have any specific plans for using Common Lisp?
<Gleefre>
Hm, no? I'm just a student now, and its not even computer science.
<beach>
I see.
<Gleefre>
Though I do have some "hobby" projects. I participated in lisp gamejam once, and looking forward for the next one
<beach>
OK.
<Gleefre>
And I'd like to be able to make an android app with CL :)
<Gleefre>
(I posted a few posts on reddit already concerning it)
puchacz has joined #commonlisp
<beach>
contrapunctus: Maybe add a README to https://codeberg.org/closos/projects/issues I think if we tell people about this link, they need to know what it is about and why it exists, no?
<ixelp>
Issues - projects - Codeberg.org
<beach>
Or maybe I just don't know how to view it on Codeberg?
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<phoe>
golly
<phoe>
I never expected to take a Lisp job interview in my hometown
<phoe>
but here I am
<beach>
Great! Did you get the job?
<phoe>
I'll see in a week+
<JonBoone[m]>
Congratulations, in any case!
<beach>
There can't be that many candidates.
theos has quit [Ping timeout: 264 seconds]
cage has joined #commonlisp
Cymew has quit [Ping timeout: 240 seconds]
scymtym has joined #commonlisp
GnarledHorn has joined #commonlisp
chrcav has quit [Quit: leaving]
theos has joined #commonlisp
chrcav has joined #commonlisp
<yitzi>
Jon Boone: I don't think that people that are on the IRC side can see those emoji reactions.
<ixelp>
GitHub - melusina-org/cl-webmachine: HTTP Semantic Awareness on top of Hunchentoot
<foretspaisibles>
I'm happy to share my progress on porting Erlang's Webmachine to CL
piethesailor has joined #commonlisp
<foretspaisibles>
> Webmachine maps the various aspects of the HTTP protocol to generic
<foretspaisibles>
methods which are customisable. For instance, content negotiation,
<foretspaisibles>
authorization and caching are orthogonally separated and an
<foretspaisibles>
application using Webmachine can easily describe desired beahviours in
<foretspaisibles>
testable and reusable application TRAITS, then blend them together in
<foretspaisibles>
actual web resources.
foretspaisibles was kicked from #commonlisp by phoe [please use a pasting service]
surabax has joined #commonlisp
kevingal has quit [Ping timeout: 256 seconds]
foretspaisibles has joined #commonlisp
GnarledHorn has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
foretspaisibles has quit [Ping timeout: 245 seconds]
surabax has quit [Quit: Client closed]
<piethesailor>
Anyone use library for parsing/working with .xsd files? cl-soap is all I can find, curious if there are other solutions.
surabax has joined #commonlisp
NotThatRPG has quit [Ping timeout: 248 seconds]
<jackdaniel>
xml schemas for validation? I think that one of xml parsers supported supplying the schema, but I don't remember from the top of my head which one was it
ym has quit [Remote host closed the connection]
dcb has joined #commonlisp
<piethesailor>
well.. xmls works, not sure how I missed that
<piethesailor>
I'll continue to play around and see if it gets me where I want to go
<piethesailor>
Thanks, jackdaniel
<jackdaniel>
sure
GnarledHorn has joined #commonlisp
tyson2 has joined #commonlisp
jeosol has quit [Quit: Client closed]
czy has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyson2 has quit [Remote host closed the connection]
Algernon69 has quit [Ping timeout: 256 seconds]
Brucio-61 has joined #commonlisp
NotThatRPG has joined #commonlisp
czy has joined #commonlisp
_cymew_ has quit [Ping timeout: 248 seconds]
* NotThatRPG
is Mr. Grumpy
* NotThatRPG
just realized that setting a test as *expected-failures* does NOT cause RT:DO-TESTS to succeed when only expected failures happen....
msavoritias has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
czy has quit [Remote host closed the connection]
<NotThatRPG>
huh. CMUCL multiple value return does not seem to be working when I try to debug the ALEXANDRIA tests.
<NotThatRPG>
or... quicklisp could be finding the wrong version of RT...
<phoe>
(ql:where-is-system :rt)
<NotThatRPG>
phoe: Yes. I fixed my RT loading and still I see a problem. On SBCL, as expected, RT:DO-ENTRIES returns 3 values. On CMUCL only one.
<NotThatRPG>
Huh. How is it that this cannot return at least two values: (values (null new-failures) (null pending) pending)
<NotThatRPG>
(from the bottom of RT::DO-ENTRIES)
<phoe>
is this visible in RT master?
<phoe>
RT::DO-ENTRIES on quicklisp calls DO-ENTRIES*, there are no multiple values being returned
<phoe>
are you sure that the right RT is loaded both on CMUCL and SBCL?
<NotThatRPG>
ah.... OK that was on SBCL, but SBCL has its own built in RT....
attila_lendvai has joined #commonlisp
<NotThatRPG>
phoe: I may have a QL install that needs an update
theos has quit [Ping timeout: 240 seconds]
<NotThatRPG>
Yeah, my RT was ancient.
<NotThatRPG>
OK, still the same problem: RT finds no UNEXPECTED Failures, but still reports tests as failed.
theos has joined #commonlisp
<NotThatRPG>
Not sure why alexandria uses sb-rt instead of RT on SBCL. This does not make debugging easier.
* NotThatRPG
was trying to debug RT but looking at the source for SB-RT...
attila_lendvai_ has joined #commonlisp
<phoe>
yes, that might be troublesome
<NotThatRPG>
Indeed! :-)
attila_lendvai has quit [Ping timeout: 240 seconds]
alendvai__ has joined #commonlisp
attila_lendvai_ has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
alendvai__ has quit [Read error: Connection reset by peer]
czy has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
<NotThatRPG>
It looks like the expected failures code was butchered into Dick Waters' original code at some point and I'm not convinced it works properly, but maybe I'm wrong
<NotThatRPG>
Yeah, no use of that facility in RT's test suite.
<NotThatRPG>
And, indeed, DO-ENTRIES* ignores the distinction between expected and unexpected failures when deciding if a test suite passes or fails.
<NotThatRPG>
ヽ(`⌒´メ)ノ
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
czy has quit [Remote host closed the connection]
karlosz has quit [Ping timeout: 265 seconds]
karlosz has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<yitzi>
NotThatRPG: Clasp's fork pays attention to the expected failures, but not in the best way. I started on a PR a while ago, but got side tracked.
czy has joined #commonlisp
<NotThatRPG>
yitzi: I'm torn. I wish that RT would just go somewhere and drop dead, TBH. Sinking time into fixing it seems like a waste. I certainly didn't want to waste so much time on it just to address old Alexandria bugs.
cage has quit [Quit: rcirc on GNU Emacs 28.2]
<NotThatRPG>
It's a real pain in my butt that in order to fix something in some OSS CL library odds are good you will have to learn a new test framework.
<NotThatRPG>
(or in this case a very old one)
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
<yitzi>
I feel ya
puchacz has quit [Quit: Client closed]
<NotThatRPG>
This month alone I have grappled with STEFIL and RT, neither of which I use.
<NotThatRPG>
I use FiveAM, but I would give it up in a microsecond if the community could pick a consensus library
<yitzi>
Have you read Sabra's review?
puchacz has joined #commonlisp
<NotThatRPG>
I read a couple of reviews a long time ago. The problem for me isn't which testing framework I choose, it's that there's no consistency in the test framework other libraries choose
attila_lendvai has quit [Ping timeout: 240 seconds]
<yitzi>
Well, to fix that you'd a time machine, a magnetic bulk eraser and possibly a hammer for the SSDs. :P
tyson2 has joined #commonlisp
<NotThatRPG>
And a hammer for the CL hackers! ;-P
<NotThatRPG>
But I have just pushed an MR that makes Alexandria build cleanly; hoping this makes the GitLab Actions more useful going forward.
<edwlan[m]>
One thing that seems like a good idea to me is what parachute does
<edwlan[m]>
Where it not only provides its own API
<edwlan[m]>
But it provides an adapter to make it easier to abandon your old library
<ixelp>
GitHub - joaotavora/fiasco: A test framework for Common Lisp
surabax has quit [Quit: Client closed]
GY1415_ has joined #commonlisp
surabax has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai_ has quit [Ping timeout: 265 seconds]
LW has joined #commonlisp
LW has quit [Read error: No route to host]
attila_lendvai has joined #commonlisp
attila_lendvai has joined #commonlisp
mariari has quit [Ping timeout: 265 seconds]
puchacz has quit [Quit: Client closed]
attila_lendvai has quit [Ping timeout: 240 seconds]
dcb has quit [Remote host closed the connection]
dcb has joined #commonlisp
Oladon has joined #commonlisp
mariari has joined #commonlisp
<NotThatRPG>
edwlan[m]: I agree: an adapter is a great idea.
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
shka has quit [Ping timeout: 256 seconds]
surabax has quit [Quit: Client closed]
GY1415_ has quit [Ping timeout: 264 seconds]
attila_lendvai has quit [Ping timeout: 240 seconds]
surabax has joined #commonlisp
080AACJV5 has joined #commonlisp
_dcb_ has joined #commonlisp
_dcb_ has quit [Remote host closed the connection]
dcb has quit [Remote host closed the connection]
dcb has joined #commonlisp
piethesailor has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #commonlisp
pve has quit [Quit: leaving]
<NotThatRPG>
IMO every testing system should provide the infrastructure needed to use it to provide an ASDF TEST-OP.
<NotThatRPG>
Once you can support ASDF:TEST-SYSTEM properly, it's easy to provide an implementation of regression testing for GitLab Actions, GitHub Actions, Jenkins, etc.
<NotThatRPG>
yitzi: That's right -- the only way to make test-system work is to wrap your test invocation in code that will raise an error if the test suite fails.
<NotThatRPG>
Then you wrap that in a testing script that exits with a non-zero exit status when it gets the test-failure condition.
<NotThatRPG>
That's what fiveam-asdf does.
<mfiano>
except we cannot raise an error in Common Lisp.
<mfiano>
That is something that is done with an inferior exception system.
<NotThatRPG>
Probably we should add an ASDF:Test-Failure condition to ASDF....
<yitzi>
NotThatRPG: I understand how to use ASDF:TEST-SYSTEM. My point was that since it doesn't return anything useful it doesn't standardize anything but the entry symbol.
<NotThatRPG>
yitzi: Yeah, that's a problem with ASDF in general....
<yitzi>
You still need to know how each llbrary signals an error....so meh.
<NotThatRPG>
yitzi: That's why I was suggesting that we have an asdf:test-failure condition so that the contract is more standardized.
<mfiano>
or when it should be _handled_
<mfiano>
signals don't stop execution.
<NotThatRPG>
mfiano: Well, for a testing script for use in CI, it should be handled by exiting with a non-zero exit status
080AACJV5 is now known as GY1415
<NotThatRPG>
For any other use, it's left as an exercise for the reader....
<mfiano>
But you need to tell that to every library writer, and be overly-optimistic with the adoption rate, to make this worthwhile
<phoe>
mfiano: an error being signaled means a test failure
<phoe>
that's the de-facto contract with asdf:test-op
<phoe>
not everyone follows it though
<mfiano>
Yes, I get that. There's a lot of weird stuff out there, and some of them modify how asdf:test-op works, like prove
<mfiano>
it makes asdf maintainers very unhappy
<NotThatRPG>
ASDF didn't need to return values when all it did was load code. In that case any failure is really an error. But once one starts to use it for other purposes, one really wants return values (and ancillary parameters, but that's another story) and ASDF wasn't built to provide them. It would be hard to change that, too, because then ASDF would have to provide a (configurable) way to combine return values from dependencies
<NotThatRPG>
Since it's proven almost impossible to just get uptake for ASDF bug fixes, there's no strong incentive to add new features.
<NotThatRPG>
And on that unhappy note, I will leave you to bike home, since a Spring bike ride is a more happy-making thing...
<edwlan[m]>
One thing I wish is that some of the return values had more information
NotThatRPG is now known as NotThatRPG_away
<NotThatRPG_away>
edwlan[m]: there aren't any return values...
NotThatRPG_away has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<edwlan[m]>
E.g. ASDF:LOAD-ASD returns a define-op
<edwlan[m]>
But that doesn’t say anything about what was defined
<mfiano>
I am left very confused by their parting hostmask of *.sift.net. That is the Lisp-using company of Robert Goldman, aka rpg or current ASDF maintainer, and a couple other Lispers I know...
lucasta has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<fiddlerwoaroof>
I thought "that RPG" was Richard P. Gabriel
<fiddlerwoaroof>
But I don't think I've ever directly inquired
<mfiano>
Yes, the nick "NotTHatRPG" could mean 3 things.
NicknameJohn has quit [Ping timeout: 256 seconds]
<mfiano>
Robert Goldman, who is not Richard P. Grabriel.
<mfiano>
Richard P. Gabriel, who is not Robert Goldman, lol.
<mfiano>
or some other person who is not Robert or Richard, but works at the same company as Robert
<mfiano>
But Robert had always gone by `rpg` in the past.
<mfiano>
I think too much. Back to code.
<contrapunctus>
mfiano: I always thought of 'rocket propelled grenade' and 'role playing game'. Those other two possibilities hadn't even occurred to me.
makomo has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 248 seconds]
waleee has joined #commonlisp
azimut has quit [Remote host closed the connection]
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #commonlisp
azimut has joined #commonlisp
NotThatRPG has joined #commonlisp
surabax has joined #commonlisp
specbot has quit [Remote host closed the connection]
minion has quit [Read error: Connection reset by peer]
<NotThatRPG>
Enough people asked if I was Richard P Gabriel that I took my current nick
<jasom>
contrapunctus: fwiw RPG as "rocket propelled grenade" is a backronym; it's a latinization of the russian Ручной противотанковый гранатомёт
akoana has joined #commonlisp
rgherdt has quit [Remote host closed the connection]