WorldControl has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 246 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
troojg has quit [Ping timeout: 245 seconds]
bjorkintosh has quit [Ping timeout: 276 seconds]
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
kevingal has quit [Ping timeout: 245 seconds]
kstuart has quit [Ping timeout: 246 seconds]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 245 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
rkazak has quit [Ping timeout: 245 seconds]
amb007 has joined #commonlisp
rkazak has joined #commonlisp
ixelp has quit [Ping timeout: 252 seconds]
ixelp has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
edgar-rft` has joined #commonlisp
edgar-rft_ has quit [Ping timeout: 248 seconds]
mishoo has joined #commonlisp
rkazak has joined #commonlisp
vardhan has quit [Ping timeout: 265 seconds]
vardhan has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
alternateved has joined #commonlisp
rkazak has joined #commonlisp
vardhan_ has joined #commonlisp
vardhan has quit [Ping timeout: 276 seconds]
pve has joined #commonlisp
shka has joined #commonlisp
pranav has joined #commonlisp
pranav has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 248 seconds]
dnhester26 has joined #commonlisp
mountainman1312 has joined #commonlisp
<mountainman1312>
Howdy everyone. I just restarted my computer and tried to start sly again, and I'm getting this error log: https://0x0.st/8-UD.txt ... It seems to be related to quicklisp but I'm not understanding what exactly is causing it.
olivial has quit [Read error: Connection reset by peer]
olivial has joined #commonlisp
<beach>
It looks like your SBCL installation is strange.
<beach>
Your /usr/local/lib/sbcl contains multiple files with the same code in them.
<beach>
Maybe SBCL changed where it puts things from one release to the next, so that when you installed a new version of SBCL, the old files are still around. I am just guessing, though.
<beach>
And the error at the end is because ASDF by default signals an error when there were warnings during compilation.
<beach>
You can alter that by doing (setf asdf:*compile-file-failure-behaviour* :ignore) in your .sbclrc. Notice the UK spelling for behaviour.
mgl has joined #commonlisp
<beach>
mountainman1312: Check the dates of (say) /usr/local/lib/sbcl/sb-aclrepl/sb-aclrepl.asd and /usr/local/lib/sbcl/contrib/sb-aclrepl.asd to see which one is newer.
rkazak has joined #commonlisp
<beach>
mountainman1312: Are you still here?
jrx has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
supercode has joined #commonlisp
vardhan_ has quit [Ping timeout: 252 seconds]
vardhan_ has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
pranav has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
zxcvz has quit [Client Quit]
rkazak has quit [Ping timeout: 265 seconds]
mwnaylor has quit [Ping timeout: 248 seconds]
dra has joined #commonlisp
Guest48 has joined #commonlisp
Guest69 has joined #commonlisp
Guest69 has quit [Client Quit]
gooba has quit [Remote host closed the connection]
gooba has joined #commonlisp
gooba has quit [Remote host closed the connection]
rkazak has joined #commonlisp
gooba has joined #commonlisp
gooba has quit [Read error: Connection reset by peer]
dnhester26 has joined #commonlisp
gooba has joined #commonlisp
Guest16 has joined #commonlisp
rh has joined #commonlisp
gooba has quit [Remote host closed the connection]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
decweb has joined #commonlisp
overclucker has quit [Read error: Connection reset by peer]
overclucker has joined #commonlisp
Inline has quit [Read error: Connection reset by peer]
Inline has joined #commonlisp
Inline has quit [Max SendQ exceeded]
Inline has joined #commonlisp
rkazak has quit [Ping timeout: 264 seconds]
Inline has quit [Max SendQ exceeded]
Inline has joined #commonlisp
<mountainman1312>
beach: sorry, I fell asleep over here in my chair, let me go looking now
<beach>
I see.
<mountainman1312>
It seems "cl-asdf" is in packages to be removed by "pkg autoremove"
<mountainman1312>
That seems to have fixed it, sorry for the trouble haha
<mountainman1312>
Something must have force updated it because my update script includes autoremove (shrug emoji)
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
rkazak has joined #commonlisp
varjag has joined #commonlisp
Inline has quit [Client Quit]
<beach>
If the STRING argument is supplied to WITH-OUTPUT-TO-STRING, how does it turn the string into a stream that can be used for the output? I can't seem to find a standard operator to do that.
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
Inline has quit [Client Quit]
Guest77 has joined #commonlisp
Guest77 has quit [Client Quit]
rkazak has joined #commonlisp
<beach>
I guess there is no standard operator or combination of standard operators for doing that.
Inline has joined #commonlisp
<phoe>
you'd need a stream class that would vector-push-extend into the string; I don't think there's a standard stream class that does that
<beach>
Yeah, I think I arrived at the same conclusion.
dnhester26 has quit []
<Inline>
wth is going on here
<Inline>
some channel like #java tells me my connection is intermittent, but it's not
<Inline>
and i get banned from #c too
<decweb>
They know you've been in the commonlisp channel and are jealous.
supercode has quit [Quit: Client closed]
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
<edgar-rft`>
C is like Common Lisp, but only in the beginning
rkazak has quit [Ping timeout: 246 seconds]
Guest890 has joined #commonlisp
<rootnode>
the rest is "oh my mother on neptune, lisp is super powerful"
Guest890 has quit [Client Quit]
<Shinmera>
oh what I wouldn't give for being able to cast array contents to an object
troojg has quit [Remote host closed the connection]
troojg has joined #commonlisp
rkazak has joined #commonlisp
<mountainman1312>
Do we do code reviews in this channel? Like someone post some code and then talk about why it sucks? Or is that considered something like spam?
<pranav>
mountainman1312: Certainly wouldn't be considered spam if you post a link to a pastebin and express your intent.
<beach>
mountainman1312: Absolutely!
<mountainman1312>
Neato, code incoming then :)
<beach>
mountainman1312: Use plaster.tymoon.eu
<mountainman1312>
Okay followup question, would it be in bad taste to use links to my own git server?
<beach>
I don't see a problem with it. As long as it is accessible.
Guest16 has joined #commonlisp
Guest16 has quit [Client Quit]
<mountainman1312>
So, I'm just looking for general feedback about the lispyness of it, major mistakes, code smells. I'm like 2 weeks into learning CL and maybe spent 3 good long days on it. I'm doing Advent of Code challenges starting from the very first one. http://git.tgwil.net/Learn/aoc/tree/src/2015.02.01-first-attempt.lisp
kenran has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 248 seconds]
<beach>
mountainman1312: It is best to create an ASDF system definition and put dependencies there, rather than having QUICKLOAD forms in the source.
<beach>
mountainman1312: Top-level comments take 3 or 4 semicolons.
<mountainman1312>
beach: would the section headers (e.g. ";;; Package Definition") be considered top-level comments?
<beach>
mountainman1312: There is no need to use uppercase names for parameters.
<beach>
mountainman1312: Anything outside of a top-level form is a top-level comment.
<beach>
So, yes.
<beach>
Same thing for constants, surrounding the name with ++ is enough. No need to make them uppercase.
<mountainman1312>
Is it "bad" to do uppercase or just unneccessary? I just like doing it that way for no real reason, easier to spot them from a distance.
<tux0r>
mountainman1312: using git is a bad taste :p ymmv
<mountainman1312>
tux0r: is this humor or am I meeting my first svn user?
<tux0r>
svn is much less annoying.
<mountainman1312>
I've always had a tiny little urge to try it out but never did
<tux0r>
life's too short for git
<beach>
mountainman1312: If you study existing Common Lisp code, I think you will not find many uppercase names. And it is good to follow existing practice.
<tux0r>
try it
<mountainman1312>
beach: I will keep that in mind, thanks :)
<beach>
mountainman1312: You shouldn't mix FIRST/SECOND... with CDR. Use REST instead of CDR if you are manipulating lists.
<mountainman1312>
beach: ah okay why is that?
<mountainman1312>
Just confusing?
<dcb>
easier to read?
<beach>
mountainman1312: CAR/CDR are used when you manipulate CONS cells as pairs. FIRST/REST are for lists.
<beach>
mountainman1312: It has to do with giving hints to the person reading your code.
<mountainman1312>
ohhhhh that's good info
<beach>
mountainman1312: You want to make things as easy as possible for that person.
<beach>
mountainman1312: One blank line between top-level things is enough. You don't want to waste precious vertical space.
<beach>
mountainman1312: Plus, you are not even consistent, so the person reading the code is left to wonder whether there is any significance to the number of blank lines.
rkazak has joined #commonlisp
<mountainman1312>
I have a vague internal sense of what's related and belongs with 1 or 2 lines but you're right it's not a consistent system. Notice I also have 4 lines for "sections"
rh has left #commonlisp [#commonlisp]
Guest86 has joined #commonlisp
<beach>
mountainman1312: This might be for later, but I personally don't like to have the documentation strings inside the function, and instead I put them after the function, using (SETF DOCUMENTATION). Documentation strings are noise to the person reading the code, because they are meant for the user and not the maintainer. Additional information meant for the person reading the code should be in the form of comments.
<beach>
mountainman1312: Documentation strings inside functions are particularly noisy when they have several lines and all lines but the first start in the leftmost column.
<beach>
mountainman1312: You have a comment ";; Test correct answer" which is either superfluous, or else you should have similar comments for all of your top-level ASSERT forms.
<beach>
mountainman1312: But aside from those remarks, the code looks reasonable to me, especially considering your relatively short experience with Common Lisp.
<mountainman1312>
Thanks :) it's good to hear that it's mostly aesthetic problems. I'm going through and changing a bunch of it now
<mountainman1312>
I'm curious about the (setf DOCUMENTATION) part, how's that work?
<dcb>
I'm not a big fan of having docstrings separated from the function but I can see the appeal
<mountainman1312>
I'll be honest I don't like the look of it, but I agree that multi-line docstrings also look bad
<jackdaniel>
I think that docstrings should be one-liners anyway, as a short summary of what the function does. that way they don't clutter the source code and are useful for the person who reads the code and the person who uses the code
<jackdaniel>
as of longer deliberations of what's going on, they should be put in a comment (for implementation specificities) and in a manual (for users)
srji has quit [Ping timeout: 260 seconds]
<mountainman1312>
Fair point. Every docstring in the code I submitted above, the 2nd line is just saying "this function expects a list length of 3 as input", which I think should probably be done as an (assert (= x (list-length y))) instead of a docstring anyways.
<mountainman1312>
oh I know... what if you put the (setf (documentation ...)) above the (defun)?
<mountainman1312>
Then it reads almost like a docstring but still somewhat visually separate
<jackdaniel>
I think that you should use whatever works best for you. it is not that the style is a religion or anything; if there were a single right way to do things then the language would force that
troojg has quit [Ping timeout: 248 seconds]
<mountainman1312>
I tried every combination I could think of and this is my favorite: https://0x0.st/8-kL.lisp
<jackdaniel>
I personally don't see it as less cumbersome than putting the docstring in the function body
<mountainman1312>
Since docstrings should be 1 liners, you're probably right
rkazak has joined #commonlisp
<mountainman1312>
Next question, are the (assert) tests alright being top-level forms completely separate from the thing they're testing, or should they be somewhere else that makes it more clear what they're testing?
<jackdaniel>
asserts are not tests, they are encoding invariants; people often use testing frameworks and define unit tests in a separate system
<jackdaniel>
and there are as many testing frameworks as there are lispers, that's a running joke in the ecosystem that everyone needs to write their own
rkazak has quit [Ping timeout: 252 seconds]
varjag has quit [Remote host closed the connection]
varjag has joined #commonlisp
<mountainman1312>
I'm still noob enough that I have no clue about testing methods outside of "send input into each function and see if the result is wrong"
<aeth>
I've had unit test frameworks that are supposed to be better than fiveam change over time so that when I come back to a project I haven't touched in > 5 years, I have to fix the unit tests before doing anything else. This isn't ideal.
<aeth>
This is not obvious if you're just given a list of 30.
Guest89 has joined #commonlisp
Guest89 has quit [Client Quit]
Guest18 has quit [Quit: Client closed]
rogersm has joined #commonlisp
<dcb>
I like when the one-liner reads almost exactly as the function definition itself: (defun intersperse (sequence filler) "intersperse sequence with filler" ...)
Guest81 has joined #commonlisp
rogersm has quit [Quit: Leaving...]
shka has quit [Quit: Konversation terminated!]
Guest78 is now known as sturgeon
sturgeon has quit [Changing host]
sturgeon has joined #commonlisp
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
rkazak has joined #commonlisp
<aeth>
dcb: you can fix that by providing two usage examples in the docstring
mwnaylor has joined #commonlisp
JuanDaugherty has joined #commonlisp
Guest81 has quit [Ping timeout: 240 seconds]
rkazak has quit [Ping timeout: 245 seconds]
symdrome has joined #commonlisp
mgl has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
gorignak has joined #commonlisp
Guest43 has joined #commonlisp
Guest43 has quit [Client Quit]
yewscion_ has quit [Remote host closed the connection]
yewscion has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
mishoo has quit [Ping timeout: 244 seconds]
rkazak has joined #commonlisp
Guest68 has joined #commonlisp
Guest68 has quit [Client Quit]
JuanDaugherty has quit [Quit: JuanDaugherty]
rkazak has quit [Ping timeout: 248 seconds]
alcor has quit [Remote host closed the connection]
JuanDaugherty has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
Alfr has quit [Quit: Leaving]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
wacki has quit [Quit: Leaving.]
<sturgeon>
Hi there, IRC noob here. I've been teaching myself common-lisp on sbcl for a few months now. If I have a problem that needs a little code to explain it, what should I do?
<JuanDaugherty>
use a pastebin
<JuanDaugherty>
ppl will help
<sturgeon>
Ah, ok, I've seen a link at the top, I will do that. Thanks.
JuanDaugherty has quit [Quit: JuanDaugherty]
sturgeon has quit [Quit: Client closed]
rkazak has joined #commonlisp
Alfr has joined #commonlisp
mathrick has quit [Remote host closed the connection]
mathrick has joined #commonlisp
<reb>
sturgeon: Also, there's #clschool that's specifically for beginner questions about Common Lisp.
varjag has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
X-Scale has quit [Ping timeout: 276 seconds]
alternateved has quit [Remote host closed the connection]