p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
Hineios has quit [Remote host closed the connection]
LiamH has quit [Quit: Leaving.]
slyrus has joined #lisp
Nilby has joined #lisp
slyrus__ has quit [Ping timeout: 265 seconds]
prince1 has joined #lisp
random-nick has quit [Ping timeout: 268 seconds]
smazga has quit [Quit: leaving]
buffergn0me has quit [Ping timeout: 245 seconds]
ebrasca has quit [Remote host closed the connection]
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 245 seconds]
nowhere_man has joined #lisp
wxie has quit [Quit: wxie]
buffergn0me has joined #lisp
wusticality has quit [Ping timeout: 248 seconds]
sjl_ has quit [Ping timeout: 265 seconds]
EvW1 has quit [Ping timeout: 245 seconds]
dddddd has quit [Remote host closed the connection]
turona has quit [Ping timeout: 272 seconds]
turona has joined #lisp
buffergn0me has quit [Ping timeout: 260 seconds]
vms14 has quit [Remote host closed the connection]
zooey_ has quit [Remote host closed the connection]
wusticality has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
theBlackDragon has joined #lisp
vivit has joined #lisp
buffergn0me has joined #lisp
buffergn0me has quit [Ping timeout: 245 seconds]
Nilby has quit [Read error: Connection reset by peer]
rpg has joined #lisp
bitmapper has quit [Ping timeout: 272 seconds]
karlosz has joined #lisp
davsebamse has quit [Ping timeout: 268 seconds]
ebzzry has joined #lisp
buffergn0me has joined #lisp
ebzzry has quit [Ping timeout: 240 seconds]
davsebamse has joined #lisp
Codaraxis_ has joined #lisp
Codaraxis has quit [Ping timeout: 248 seconds]
Snow-Man has quit [Ping timeout: 246 seconds]
Snow-Man has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
v88m has quit [Ping timeout: 260 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nilby has joined #lisp
torbo has joined #lisp
Bourne has joined #lisp
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 272 seconds]
quazimodo has quit [Ping timeout: 272 seconds]
quazimodo has joined #lisp
terpri has quit [Ping timeout: 240 seconds]
mangul has quit [Read error: Connection reset by peer]
terpri has joined #lisp
wusticality has quit [Ping timeout: 245 seconds]
v_m_v has quit [Read error: Connection reset by peer]
Bike has quit [Quit: Lost terminal]
Lord_of_Life has quit [Ping timeout: 240 seconds]
gabiruh has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #lisp
Ukari has quit [Remote host closed the connection]
Bourne has quit [Ping timeout: 272 seconds]
v88m has joined #lisp
v_m_v has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
whiteline_ has quit [Ping timeout: 268 seconds]
whiteline_ has joined #lisp
nowhere_man has quit [Ping timeout: 260 seconds]
froggey has quit [Ping timeout: 268 seconds]
karlosz has quit [Quit: karlosz]
froggey has joined #lisp
Codaraxis_ has quit [Read error: Connection reset by peer]
gravicappa has joined #lisp
oxum has quit [Read error: Connection reset by peer]
X-Scale` has joined #lisp
gabiruh has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
xkapastel has joined #lisp
<beach> Good morning everyone!
orivej has joined #lisp
shifty has joined #lisp
<housel> Good morning
ym has quit [Quit: Leaving]
<housel> Today I discovered that one of the gabriel benchmarks in cl-bench has been wrong since forever https://gitlab.common-lisp.net/ansi-test/cl-bench/merge_requests/1/diffs?commit_id=5f4da018672624b28d761c1b35015a98b19653ad
zaquest has quit [Quit: Leaving]
zaquest has joined #lisp
gxt has joined #lisp
vlatkoB has joined #lisp
torbo has quit [Remote host closed the connection]
Bourne has joined #lisp
<Nilby> According to Gabriel "you cannot write production code as bad as this in C".
narimiran has joined #lisp
rwcom has quit [Quit: Ping timeout (120 seconds)]
Bourne has quit [Remote host closed the connection]
rwcom has joined #lisp
|Pirx| has quit [Remote host closed the connection]
Bourne has joined #lisp
|Pirx| has joined #lisp
ggole has joined #lisp
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
varjag has joined #lisp
Bourne has quit [Remote host closed the connection]
<madrik> When computing a result given some previous let-bindings, what style do you prefer?
<madrik> Do you prefer the result following on, as with let*?
<madrik> Or do you prefer a separate computation, as with a nested let?
sauvin has joined #lisp
sauvin has quit [Max SendQ exceeded]
<no-defun-allowed> Usually I use LET*, but the former nested LET makes perfect sense.
sauvin has joined #lisp
karlosz has joined #lisp
<buffergn0me> madrik: LET*, but I think it is best to avoid making variables if possible
varjag has quit [Ping timeout: 260 seconds]
<madrik> buffergn0me: Why?
<buffergn0me> madrik: because you have to name the variable something, and the name is more likely than not going to be misleading
<buffergn0me> madrik: also, it is not clear if the variable is used more than once, or is assigned to, until you read and understand the whole piece of code
vivit has quit [Ping timeout: 240 seconds]
<phoe> madrik: style 2 in order to avoid nesting LETs and therefore increasing indentation
<phoe> I know one person who does everything to minimize the number of variables altogether and would therefore write all of this without a single variable binding, but I consider this approach to be highly unreadable when opposed to actual usage of LET
* Nilby agrees with phoe.
<phoe> (defun foo (...) (go-further (combine (compute-1 foo bar) (compute-2 baz quux)))) gives you an additional debugging disadvantage - there are no variable bindings to inspect
terpri has quit [Remote host closed the connection]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
terpri has joined #lisp
JohnMS_WORK has joined #lisp
<buffergn0me> phoe: That is true. I sometimes introduce intermediate variables for debugging when using other programming languages. But with SLIME it is easy to evaluate forms, and get at the argument list of called functions. I can't think of a time I had to add a variable to ease debugging in CL
asarch has joined #lisp
<phoe> neither can I, but I think a part of that is because I already use variables generously
Cymew has joined #lisp
<Shinmera> "don't name things because the name is misleading" is the strangest thing I've read in a while. The name adds context to give meaning to how you're using it.
<asarch> One stupid question: I load the library: (ql:quickload :caveman2), I create the project skeleton: (caveman2:make-project #P"/home/asarch/school" :author "me"), load my project: (load #P"school/app.lisp"), make some work, quit and exit Slime. How can I reload the project again? (load #P"school/app.lisp") -> System "school" not found
<phoe> asarch: why are your projects not in ~/quicklisp/local-projects/
<asarch> D'oh!
<phoe> or is caveman2 doing something strange
<asarch> Thank you!
<asarch> Thank you very much phoe! :-)
Codaraxis_ has joined #lisp
<asarch> Have a nice day guys :-)
asarch has quit [Quit: Leaving]
varjag has joined #lisp
<beach> I agree with Shinmera. I often introduce variables using LET* just to add names that explain what the values are.
<madrik> I surmise that functional programming style tends to eschew variables.
<madrik> beach: Which of the two styles do you like -- let* as against (some) nested lets?
<buffergn0me> madrik: FP people call it point-free or tacit style. Also stack- (FORTH) and array- (APL) oriented programming is similar
<beach> madrik: I usually go with LET* so as to save horizontal space. But it depends. If I have several variables that do not depend on one another, and then a few that depend on most of those, nested LETs are preferable.
<beach> Not sure that was clear. :(
<madrik> For instance, I was reading the code to a log analyzer I wrote. I have a LET with two bindings, one for an ip and one for a domain.
<madrik> Right now, I combine them in a nested LET as a result named 'query'.
<beach> In that case, a nested LET might be preferable since the first two do not depend on each other.
<beach> Also, you are not short of horizontal space.
<madrik> I recall trying the other way with a LET*, but I'm ambivalent about it.
<beach> I think in your case, nested LETs are preferable.
<Nilby> If you want your code to read like Forth and APL by all means avoid naming things. For that matter use only &rest arguments.
<madrik> beach: That strikes me as a better fit, yes.
<beach> madrik: With LET, it is perfectly clear that the computation of component-2 does not involve component-1.
<madrik> Indeed. Unlike, say, the situation with SETQ and SETF, this seems like a style issue mostly.
<madrik> I cannot recall the last time I used SETQ.
libertyprime has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
theluke has quit [Read error: Connection reset by peer]
theluke has joined #lisp
oxum_ has joined #lisp
oxum_ has quit [Remote host closed the connection]
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
theluke has quit [Client Quit]
theluke has joined #lisp
<Cymew> Probably when you last wrote elisp. It's more common there.
gxt has quit [Ping timeout: 240 seconds]
gxt has joined #lisp
oxum_ has joined #lisp
oxum has quit [Ping timeout: 240 seconds]
oxum_ has quit [Read error: Connection reset by peer]
oxum has joined #lisp
oxum has quit [Read error: Connection reset by peer]
ebzzry has joined #lisp
xkapastel has joined #lisp
<phoe> even elisp has SETF nowadays
nowhere_man has joined #lisp
karlosz has quit [Read error: Connection reset by peer]
teej has quit [Ping timeout: 248 seconds]
banjiewen has quit [Ping timeout: 248 seconds]
travv0 has quit [Ping timeout: 248 seconds]
banjiewen has joined #lisp
travv0 has joined #lisp
stylewarning has quit [Ping timeout: 248 seconds]
l1x has quit [Ping timeout: 248 seconds]
selwyn has quit [Ping timeout: 248 seconds]
ggole- has joined #lisp
ggole has quit [Ping timeout: 248 seconds]
buffergn0me has quit [Ping timeout: 248 seconds]
hydan has quit [Ping timeout: 248 seconds]
jerme_ has quit [Ping timeout: 248 seconds]
housel has quit [Ping timeout: 248 seconds]
buffergn0me has joined #lisp
Snow-Man has quit [Ping timeout: 248 seconds]
l1x has joined #lisp
stylewarning has joined #lisp
hydan has joined #lisp
housel has joined #lisp
Snow-Man has joined #lisp
jerme_ has joined #lisp
teej has joined #lisp
selwyn has joined #lisp
jonatack has joined #lisp
oxum has joined #lisp
theluke has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
dale has quit [Quit: My computer has gone to sleep]
nowhere_man has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
theluke has joined #lisp
<Cymew> It has, but has historically been heavy on SETQ usage.
theluke has quit [Read error: Connection reset by peer]
heisig has joined #lisp
Bourne has joined #lisp
nowhere_man has joined #lisp
hhdave has joined #lisp
<madrik> I trawled the Lisp newsgroup archives for a bit on this point (SETQ v SETF). There was a trend of thought that advocated using SETQ for the express purpose of assigning to variables, and SETF for other cases.
orivej has joined #lisp
<shka_> madrik: nah, don't use setq
<shka_> you are not getting anything from using it
<Shinmera> I mean there's the argument that it's more explicit about its purpose, but that's already encoded in the fact that a variable is going to be a lone symbol, so
<heisig> And there is this funny case where SETQ can expands into SETF when symbol macros are involved :)
gxt has quit [Quit: WeeChat 2.7]
oxum_ has joined #lisp
<phoe> heisig: let's not open this can of worms
oxum_ has quit [Remote host closed the connection]
oxum has quit [Read error: Connection reset by peer]
oxum has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 272 seconds]
adam4567` has quit [Remote host closed the connection]
X-Scale` is now known as X-Scale
buffergn0me has quit [Ping timeout: 240 seconds]
Bourne has quit [Remote host closed the connection]
<madrik> So, it doesn't make sense to think of SETQ being 'lower-level' or 'more primitive' than SETF?
<phoe> madrik: it makes sense, as long as you do not use symbol macros
<phoe> SETQ assigns values to variables, and a symbol macro is not a variable
<Shinmera> it's more primitive in intention and applicability.
<Nilby> (when (> (get-universal-time) 3786854400) (alias-shiftf 'sets 'set 'setf) (without-package-locks (unreify-special-form 'setq)))
<phoe> wait, what
<no-defun-allowed> It's already past 2020.
<no-defun-allowed> Rather, it's already past that universal time that designates the start of 2020, give or take.
davepdotorg has joined #lisp
FreeBirdLjj has joined #lisp
Codaraxis__ has joined #lisp
<madrik> I did not know about symbol macros. Thanks.
Hineios has joined #lisp
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis_ has quit [Ping timeout: 260 seconds]
<Nilby> I'm saying, now that it's 2020 I wish we could just say, as long as we're not running some old ass code, SET should be SETF, SETS or better SET-SYMBOL should be SET, and SETQ should be gone.
FreeBirdLjj has quit [Remote host closed the connection]
<Nilby> Just think how many 'f's we'd save.
FreeBirdLjj has joined #lisp
Bourne has joined #lisp
<Nilby> And I know that "old" code using setq includes very dear things like CLOS and LOOP.
FreeBirdLjj has quit [Ping timeout: 268 seconds]
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #lisp
cosimone has joined #lisp
Hineios has quit [Ping timeout: 260 seconds]
<madrik> Nilby: Maybe SET, once its meaning is again open for change, can be used to create sets, like LIST right now creates lists.
montaropdf has joined #lisp
Bourne has quit [Remote host closed the connection]
<madrik> On the topic of change, is there any movement toward a revision of the ANSI standard?
<phoe> madrik: some people say there will never be one, some people actually hope for one
<phoe> but AFAIK no one actually works on it at the moment
Bourne has joined #lisp
<Shinmera> there will never be one.
<phoe> see?
<Shinmera> Especially not with people doing such a good job not needing one.
<Shinmera> I also postulate a revision that would break compatibility would never catch on.
<Shinmera> So all those funny names are here to stay.
m00natic has joined #lisp
Bourne has quit [Ping timeout: 260 seconds]
<beach> madrik: I have a project on the backburner to create a revised language definition that would just specify lots of behavior that is now undefined. It is called WSCL, which means Well Specified Common Lisp, and it pronounced like "whistle".
<beach> madrik: WSCL would only put in writing what most or all implementations already do.
<beach> So no incompatible changes.
Bourne has joined #lisp
m00natic has quit [Remote host closed the connection]
srandon111 has joined #lisp
<srandon111> hello all i am studying clojure from the book "clojure for the brave and true" i arrived at anonymous functions... and was wondering... how can i create a function which multiplles all elements within a vector? i tried this...( (fn [[x]] (* x) ) [4 3 4]) but doesn't work...only returns the first element i also tried this... ( (fn [& x] (* x) ) [4 3 4]) but again doesnt work... "Cannot cast clojure.lang.ArraySeq to java.lang.Number" so can somebody
<srandon111> help me understand... how i would do this simple task in clojure?
<beach> srandon111: This channel is dedicated to Common Lisp. Sorry.
<no-defun-allowed> (defun multiply-vector (vector constant) (map 'vector (lambda (x) (* x constant)) vector))
<p_l> srandon111: you'll have better luck in #clojure
<no-defun-allowed> And yes, you would have more luck discussing mocklisp 2^W^Wclojure in #clojure.
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #lisp
<madrik> Shinmera: I haven't used Python very much, but from the outside, the change from 2 to 3 seems to have proved very painful and disturbing. Is that the kind of break in backward compatibility you had in mind?
<Shinmera> One of many, yes. But also remember CL's history. The only way it could have happened in the first place is with all of those weird compatibilities from pre-existing dialects.
<Shinmera> I do not think most lispers would give up that compatibility just to have some different names.
libertyprime has quit [Quit: leaving]
<madrik> What would you like to see in a revised specification?
* beach feels /ignore-d.
<madrik> beach: Besides specifying undefined items.
<Shinmera> customisable INTERN. Most of everything else is either not important, or already covered with portability libraries.
surrounder has left #lisp ["WeeChat 2.6"]
<madrik> beach: BTW, which is/are the undefined thing(s) that really get to you?
<beach> madrik: The standard says that if some operator is defined to take an argument of a particular type, and there is no particular mention of what happens if that type is violated, then the behavior is undefined. So there are many operators that could fail in spectacular ways rather than signaling an error.
<beach> madrik: Take AREF for instance.
<beach> clhs aref
<beach> The first argument must be an array.
<beach> But if it is not, the behavior is undefined.
<beach> That's just one example.
<madrik> But why would AREF be given anything not an array?
<beach> Er, because programmers make mistakes?
gareppa has joined #lisp
<madrik> Don't implementations catch this?
<beach> madrik: *sigh* that is precisely what I said. Implementations catch it, so I would like for the revised standard to put that in writing.
<madrik> Sorry for being dense.
<p_l> madrik: it's the difference of having known error type with defined continuations for the case when that happens
<beach> Specifically, I would like to have a relation between the SAFETY debug quality and the behavior of AREF when something other than an array is given.
gxt has joined #lisp
<beach> Exactly. It would be reasonable to require an error of type TYPE-ERROR to be signaled when SAFETY is (say) 3.
<Nilby> Shinmera: I've been running with a customizable intern patch to sbcl and ccl for years now. But of course it doesn't help for writing software for others to use.
<Nilby> Having a *read-intern* function is very simple & powerful.
<Nilby> It obviates having to write your own whole reader for many things.
<flip214> Shinmera: ELS 2020 has a typo - "Paper sumbission deadline extended" => submission
cosimone_ has joined #lisp
cosimone has quit [Ping timeout: 245 seconds]
<Shinmera> Nilby: I'd prefer it to be attached to the readtable
<Nilby> Shinmera: Hmmm. That is probably better. Just a little more complicated to implement.
<Nilby> I'm pretty sure at least some versions of Zetalisp had a *read-intern*.
gareppa has quit [Quit: Leaving]
random-nick has joined #lisp
<no-defun-allowed> Speaking of which, anonymous packages (like anonymous classes) would be handy. That could be another component of a safe reader.
cosimone has joined #lisp
cosimone_ has quit [Read error: Connection reset by peer]
<no-defun-allowed> I guess (make-package (gensym)) is half of that, but it should also not be retrieved through FIND-PACKAGE and should be garbage collectable as such.
v_m_v has quit [Remote host closed the connection]
<Nilby> I've really just gensym'd and then delete-package for exactly that purpose.
<no-defun-allowed> Sure, but that is a bit messier than it could be.
<Nilby> True
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<no-defun-allowed> I hesitate to say that packages aren't exactly first class for that reason, because that isn't how the term isn't defined, but it feels a bit like that.
davepdot_ has joined #lisp
Necktwi has quit [Ping timeout: 240 seconds]
davepdotorg has quit [Ping timeout: 260 seconds]
sunwukong has joined #lisp
FreeBirdLjj has joined #lisp
prince1 has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
v_m_v has joined #lisp
v_m_v has quit [Ping timeout: 260 seconds]
cosimone has quit [Quit: Terminated!]
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
<flip214> Xach: a new quicklisp installation fetches http://beta.quicklisp.org/client/2015-09-24/setup.lisp, ain't there a newer version?!
<flip214> seems not...
<flip214> The most up-to-date client, version 2020-01-04, is already installed.
<flip214> still, the message this http url tells is "outdated"
shifty has quit [Ping timeout: 240 seconds]
<madrik> beach: has WSCL gained any traction?
ebzzry has quit [Ping timeout: 240 seconds]
prince1 has joined #lisp
shka_ has quit [Quit: WeeChat 1.9.1]
srandon111 has quit [Quit: leaving]
prince1 has quit [Ping timeout: 265 seconds]
orivej has quit [Remote host closed the connection]
orivej has joined #lisp
nonlinear[m] has quit [Ping timeout: 252 seconds]
lnostdal has joined #lisp
<beach> madrik: I think I have been encouraged to do it, but the major obstacle is still turning the dpANS source code into a maintainable document that can be modified.
<beach> Such a version of the dpANS document would be very useful for other things as well.
v_m_v has joined #lisp
ebzzry has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
<p_l> beach: does dpANS have the extra commentaries as in CLHS?
<beach> I don't know.
gko_ has joined #lisp
<phoe> commentaries? what do you mean?
<phoe> give me an example with a matching CLHS page
<p_l> phoe: CLHS has extra explanations taken from standardisation group mailing list for various decisions
<phoe> p_l: dpANS3 does not have this.
<edgar-rft> p_l: the example code and the "unclarified issues" pages were added by Kent Pitman and are not part of dpANS
<p_l> edgar-rft: that's what I was worried about
shka_ has joined #lisp
<p_l> I wonder if there's anything preventing LW from relicensing CLHS to open it up a bit - will also have to check if I can get unencumbered copies of the clarifications
<phoe> I guess ANSI is the preventing thing
<phoe> one would ask them really nicely to freely release a standard they own and still sell on their website even though they no longer seem to have its official TeX sources and only sell a poor-quality scan of it
<beach> phoe: No, I don't think ANSI is the problem. I think they own the Common Lisp HyperSpec and they just don't want it to be freely available.
<phoe> If that was the case, they'd update some of the most terrible errors in CLHS, such as the one on PROG2 page.
<phoe> I don't think they're even allowed to edit it themselves.
bitmapper has joined #lisp
<p_l> point is, we don't know the license they got from ANSI, and the legal page stronglyh implies it wasn't just a case of taking dpANS and making CLHS out of it
<beach> phoe: They own the copyright to the HTML markup. Not the text.
orivej has quit [Ping timeout: 268 seconds]
<madrik> phoe: ANSI doesn't have a proper standards document for Common Lisp?
<madrik> beach: Would not the Lisp vendors be interested in your effort?
<beach> madrik: Oh, they might very well be.
<beach> madrik: I think it would take the form that an implementation would mention something like "WSCL-conforming".
<madrik> phoe: Wow.
<madrik> phoe: I'm at a loss for words.
<madrik> beach: Would this be a Wiki document or something else? How far ahead is this project?
<phoe> madrik: well they're at a loss for a proper CL standard, I guess that's even
<beach> madrik: I haven't decided that yet. What I have done so far is to collect a certain number of cases where I would change the current definition.
<madrik> phoe: Is the HyperSpec a work derived from the Standard? Was ANSI OK with that?
<beach> madrik: Apparently, the dpANS is almost identical to the final standard, and the dpANS is freely available.
<p_l> madrik: notice: Parts of this work incorporate material taken from American National Standard X3.226, copyright 1994, and is used with permission of the X3 Secretariat, ITI, 1250 Eye St., NW., Suite 200, Washington, DC 20005 and of the copyright holder, American National Standards Institute. ANSI/X3.226 was developed by Technical Committee X3J13, Common Lisp.
EvW has joined #lisp
<p_l> essentially, LW has permission to reproduce the text of the standard while claiming they faithfully reproduce the content from official document
<p_l> it's a bit of legal quagmire that sometimes has more important meaning
<p_l> ultimately even they have to mention they are only *based* on the original text
<p_l> fortunately for us it's rare to get into dispute where you need to use formal text of the standard
rwcom1 has joined #lisp
<madrik> p_l: Can I point to the HyperSpec saying it specifies the language if I also say it is not the 'Real Thing'?
<madrik> I understand that the 'Real Thing' is now lost in the mists of time.
rwcom has quit [Ping timeout: 272 seconds]
rwcom1 is now known as rwcom
<phoe> madrik: depends on how deep you want to dive in the cesspool of legal issues
<p_l> ^
<madrik> Got it.
<p_l> I'll just point that you don't always get to disclaim warranty and the like
<madrik> beach: How do you see WSCL deployed or complied with in practice?
<beach> madrik: Like I said, most implementations already comply, so there is nothing to be done.
<madrik> p_l: Could you please elaborate?
<p_l> madrik: you can have a case where there's contract that specifies adherence to specific standards
<p_l> being able to bring an authorized, verified copy of the standard is useful in disputes then
<p_l> it doesn't even have to be an adversarial dispute
<madrik> p_l: So in a hypothetical case, were I to use Java or C or Haskell, I could point to their (proper, sanctioned) specifications.
<p_l> yes
<p_l> or specification documents agreed upon
ebzzry has quit [Ping timeout: 240 seconds]
<p_l> so for example it could be ANSI CL + errata/extension document that was agreed before
<madrik> None of the popular scripting languages -- Python, Perl, Ruby -- have specifications as far as I can tell.
<p_l> Ruby has
<p_l> Python doesn't, and it's something that rots it like cancer
<p_l> Ruby has a) an ISO standard for what is essentially Ruby 1.8.7 b) an agreed upon testsuite that is treated as living standard - implementations use it to verify that they are compliant and cross-portable
<p_l> Perl is like Python, but ossified in version 5
<madrik> But isn't the situation (a bit) simpler with Python, now that Python 2 is dead?
<beach> A specification is not enough. If it controlled by a vendor, it can change at a whim. Like Java, for instance. It is important that the standard be published by an independent orgainization.
<p_l> madrik: nope
<p_l> madrik: notice that there are no alternative implementations of neither Python 2 or 3, that are in any reasonable sync with mainline?
<p_l> I think PyPy is the closest and they essentially have to reverse engineer CPython all the time
lucasb has joined #lisp
<madrik> p_l: That sounds like a pain.
<p_l> because, you see, Python "spec" is a very hairy ball of C code deep in CPython's source code, + various Python-language bits, plus essentially all of the language is dependant on extensions that assume CPython
<madrik> beach: Like ISO/ANSI.
<madrik> p_l: Analogous to Emacs with Emacs Lisp?
<p_l> madrik: in comparison, Ruby's reaction to problem of foreign language modules and presence of alternative implementations was similar to Common Lisp - they introduced FFI
<beach> It could be any independent organization. IEEE for instance.
<p_l> madrik: a lot like that
ebzzry has joined #lisp
<madrik> What languages meet the criterion of independent standardization? I know that C, C++, Common Lisp, and Fortran do, to name a few.
<madrik> Also Scheme.
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 260 seconds]
dddddd has joined #lisp
hsaziz has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
<heisig> Heh, Scheme :D Actually, I would consider Scheme an example of how not to standardize a language.
hsaziz has quit [Quit: hsaziz]
_paul0 has quit [Remote host closed the connection]
_paul0 has joined #lisp
<pjb> minion: memo for buffergn0me: you are perfectly right. To clarify your code, use: https://termbin.com/6ueu
<minion> Remembered. I'll tell buffergn0me when he/she/it next speaks.
wxie has joined #lisp
<pjb> madrik: have a look at the fundamental paper of functional programming: https://www.thocp.net/biographies/papers/backus_turingaward_lecture.pdf
<pjb> phoe: you too ^ You defun foo has named parameter variables!
<pjb> s/You/Your/
<pjb> minion: memo for Nilby: read-intern is not enough, you also want to do something with non-symbol tokens. Also, intern comes a little late: we've already split a package name and a symbol name! You want to parse the symbol token earlier. See: readtable-parse-token in https://github.com/informatimago/lisp/blob/master/common-lisp/lisp-reader/reader.lisp
<minion> Remembered. I'll tell Nilby when he/she/it next speaks.
wxie has quit [Remote host closed the connection]
prince1 has joined #lisp
<madrik> pjb: Thanks for the link.
shifty has joined #lisp
prince1 has quit [Ping timeout: 258 seconds]
gareppa has joined #lisp
<madrik> As a kind of distraction, I played around building Maxima and SBCL from source on a 64-bit host using 4 Lisps -- ACL (32-bit, trial), CCL (64-bit), CMUCL (32-bit), and SBCL (64-bit).
<madrik> All four can build Maxima without problems.
<madrik> The ACL trial ran out of heap space in building SBCL.
<madrik> CMUCL's build complained of an undefined function.
<madrik> Both CCL and SBCL could build SBCL, even though CCL was slower to build it.
LiamH has joined #lisp
<beach> madrik: If you are a Maxima user, you might want to try Climaxima, which is Maxima with a GUI written in CLIM.
<beach> Then again, maybe your choice of system to build was determined by other criteria.
pfdietz has joined #lisp
<madrik> beach: Good to know about that. Thank you.
<madrik> I just did it as a mind-clearing exercise.
<beach> I see.
EvW has quit [Ping timeout: 260 seconds]
oxum has quit [Ping timeout: 265 seconds]
rpg has joined #lisp
oxum has joined #lisp
nonlinear[m]1111 has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
orivej has joined #lisp
FreeBirdLjj has joined #lisp
rpg has quit [Ping timeout: 240 seconds]
JohnMS_WORK has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
sjl_ has joined #lisp
Patzy has quit [Ping timeout: 252 seconds]
ebzzry has quit [Ping timeout: 268 seconds]
<Shinmera> Currently testing ELS registration with Didier
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
<phoe> which testing framework are you using?
<Shinmera> the one where we put things in manually and see if it works.
Fare has joined #lisp
<p_l> might be useful to have Selenium client in CL one day
gareppa_ has joined #lisp
gareppa_ has quit [Remote host closed the connection]
vivit has joined #lisp
vivit has quit [Changing host]
vivit has joined #lisp
rwcom6 has joined #lisp
<p_l> hah!
gareppa_ has joined #lisp
gareppa_ has quit [Remote host closed the connection]
Inline has joined #lisp
rwcom has quit [Ping timeout: 240 seconds]
rwcom6 is now known as rwcom
oxum has joined #lisp
gxt has quit [Ping timeout: 240 seconds]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
Fare has quit [Ping timeout: 240 seconds]
gareppa_ has joined #lisp
gareppa_ has quit [Remote host closed the connection]
oxum has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #lisp
ebzzry has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
gareppa_ has joined #lisp
jmercouris has joined #lisp
gareppa_ has quit [Remote host closed the connection]
<jmercouris> directives for code in asd files based on if darwin or unix etc also work in lisp files?
<jmercouris> I'm talking about is there something I can do like :if-feature within my source?
<jmercouris> not possible? must I use asdf to load separate files?
<jmercouris> interesting that works
<jmercouris> so if someone does (find :darwin *features*) on a Linux system, presumably it would return nil?
jonatack has quit [Quit: jonatack]
<jmercouris> thanks
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
akhetopnu has joined #lisp
EvW has joined #lisp
flazh has quit [Quit: flazh]
Fare has joined #lisp
Patzy has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
Patzy has quit [Client Quit]
flazh has joined #lisp
Patzy has joined #lisp
gareppa has quit [Quit: Leaving]
prince1 has joined #lisp
Lord_of_Life_ has joined #lisp
flazh has quit [Client Quit]
flazh has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
developernotes has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
montaropdf has quit [Quit: ERC (IRC client for Emacs 26.3)]
manualcrank has joined #lisp
prince1 has quit [Ping timeout: 260 seconds]
oxum has joined #lisp
jmercouris has quit [Remote host closed the connection]
Nistur has quit [Ping timeout: 240 seconds]
Tordek has quit [Ping timeout: 240 seconds]
v_m_v has quit [Remote host closed the connection]
oxum has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
v_m_v has joined #lisp
jonatack has joined #lisp
<Shinmera> ELS 2020 registration is now open! https://european-lisp-symposium.org/2020/#registration
gareppa has joined #lisp
flazh has quit [Quit: flazh]
flazh has joined #lisp
flazh has quit [Client Quit]
flazh has joined #lisp
Bike has quit [Remote host closed the connection]
gareppa has quit [Quit: Leaving]
* Shinmera is very excited, but also worried
rpg has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
v88m has quit [Ping timeout: 265 seconds]
pfdietz has quit [Remote host closed the connection]
* jackdaniel disables temporarily Murphy's law
<Shinmera> Can you hold that until after the conference is over? :)
EvW has quit [Ping timeout: 240 seconds]
ebzzry has quit [Ping timeout: 240 seconds]
<jackdaniel> I'd love to, I have my own selfish interest in doing that
sunwukong has quit [Quit: Leaving]
gko has left #lisp ["ERC (IRC client for Emacs 26.3)"]
oxum has joined #lisp
vivit has quit [Ping timeout: 260 seconds]
vivit has joined #lisp
ggole- has quit [Quit: Leaving]
Bike has joined #lisp
davepdotorg has quit [Remote host closed the connection]
v88m has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
madrik has quit [Quit: Sleep]
dale has quit [Quit: My computer has gone to sleep]
hsaziz has joined #lisp
<Odin-> There's an awkward typo on that page ... "sumbission deadline".
v_m_v has quit [Remote host closed the connection]
slyrus_ has joined #lisp
cosimone has joined #lisp
slyrus__ has quit [Ping timeout: 240 seconds]
hhdave has quit [Quit: hhdave]
oxum has quit [Ping timeout: 240 seconds]
MrETH has joined #lisp
MrETH has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Patzy has quit [Quit: WeeChat 2.7]
Patzy has joined #lisp
Patzy has quit [Client Quit]
gko_ has quit [Ping timeout: 260 seconds]
Patzy has joined #lisp
Patzy has quit [Client Quit]
Patzy has joined #lisp
Patzy has quit [Client Quit]
Patzy has joined #lisp
Patzy has quit [Client Quit]
Patzy has joined #lisp
buffergn0me has joined #lisp
buffergn0me has quit [Remote host closed the connection]
Patzy has quit [Client Quit]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
v_m_v has joined #lisp
Patzy has joined #lisp
<flip214> I already said that!
prince1 has joined #lisp
v_m_v has quit [Ping timeout: 255 seconds]
jayspeer has joined #lisp
oxum has joined #lisp
prince1 has quit [Ping timeout: 258 seconds]
rpg has joined #lisp
<Shinmera> Thank god I didn't make that one.
orivej has quit [Ping timeout: 255 seconds]
nowhere_man has joined #lisp
gareppa has joined #lisp
gareppa has quit [Quit: Leaving]
Tordek has joined #lisp
vert2 has joined #lisp
rippa has joined #lisp
buffergn0me has joined #lisp
DataLinkDroid has quit [*.net *.split]
DataLinkDroid has joined #lisp
hsaziz has quit [Ping timeout: 255 seconds]
akhetopnu has quit [Ping timeout: 240 seconds]
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
Fare has quit [Ping timeout: 258 seconds]
vivit has quit [Ping timeout: 260 seconds]
oxum has quit [Ping timeout: 258 seconds]
oxum has joined #lisp
ckonstanski has joined #lisp
nowhereman has joined #lisp
davepdotorg has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Ping timeout: 260 seconds]
davepdotorg has quit [Ping timeout: 240 seconds]
vivit has joined #lisp
srji has quit [Quit: leaving]
yoeljacobsen has joined #lisp
yoja has joined #lisp
srji has joined #lisp
<yoeljacobsen> With CFFI - how may I access the FILE* to stdin? It seems the naive (foreign-symbol-pointer "stdin") isn't the answer..
Bike29 has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
<pjb> Depends if you want to do it portably or not.
<pjb> Non portable, edit-time way: you macroexpand FILE, which is a C MACRO!!! and you convert the C _expression_ you get into CL FFI.
Bike has quit [Ping timeout: 260 seconds]
<pjb> Portable: you write C functions: void* get_stdin(){ return stdin; } etc. and call the with FFI.
<pjb> Err, stdin, stdout and stderr are C MACROS too !!!
hhdave has joined #lisp
Bike29 has quit [Remote host closed the connection]
Bike has joined #lisp
<White_Flame> of course, an alternative is to bore into *standard-output* via implementation specific reader functions, but that's a separate approach
<pjb> yoeljacobsen: for example, on macOS, stdin expands to __stdinp, etc. But on Linux it's different.
<White_Flame> s/output/input/
<yoeljacobsen> How can I use *standard-output* with cffi? It's a CL stream, not a FILE*?
<White_Flame> correct, you'd have to get into the underlying data via implementation specific structures
<yoeljacobsen> pjb - stdin a macro? The definition is "extern FILE* stdin" in stdio.h
<White_Flame> if you're using CFFI, I'd recommend pjb's method. I'm just positing alternatives, since the context is unknown
<Bike> yoeljacobsen: in the C standard, it is a macro.
<Bike> an implementation might make it a variable, but not all of them
<White_Flame> of course, FILE is a macro as well, so a FILE* type doesn't quite exist when the rubber hits the road
vivit has quit [Ping timeout: 255 seconds]
<pjb> yoeljacobsen: about all the standard C identifiers can be C macros. Read the standard!
<Odin-> Common Lisp implementation variance is nothing compared to C.
<yoeljacobsen> Thanks you all. I wasn't aware of that.
orivej has joined #lisp
cosimone has quit [Quit: Quit.]
krwq has joined #lisp
oxum has joined #lisp
buffergn0me has quit [Ping timeout: 248 seconds]
aamukastemato has joined #lisp
buffergn0me has joined #lisp
slyrus__ has joined #lisp
yoja has quit [Ping timeout: 260 seconds]
yoeljacobsen has quit [Ping timeout: 260 seconds]
slyrus_ has quit [Ping timeout: 255 seconds]
Bourne has quit [Ping timeout: 260 seconds]
oxum has quit [Ping timeout: 265 seconds]
oxum has joined #lisp
nowhereman has quit [Ping timeout: 255 seconds]
oxum has quit [Ping timeout: 260 seconds]
Blukunfando has joined #lisp
bitmapper has quit [Read error: Connection reset by peer]
bitmapper has joined #lisp
elderK has joined #lisp
<elderK> Moin all :
prince1 has joined #lisp
slyrus_ has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
oxum has joined #lisp
prince1 has quit [Ping timeout: 240 seconds]
oxum has quit [Ping timeout: 265 seconds]
gravicappa has quit [Ping timeout: 260 seconds]
mpontillo has joined #lisp
shifty has quit [Ping timeout: 258 seconds]
Khisanth has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
Khisanth has joined #lisp
<mpontillo> Hi everyone. I'm getting started working on a LISP-based project and am looking for debugging tips. I'm seeing `debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR` via a `COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cffi" "src" "cffi-sbcl">`.
<mpontillo> How can I get more details about why the `COMPILE-FILE-ERROR` happened?
<mpontillo> Weirdly, I only see the error when using the bundle that has been checked into our source control, not when I use `(ql:quickload)` to load the same system.
developernotes has quit [Ping timeout: 240 seconds]
developernotes has joined #lisp
<phoe> mpontillo: the actual error should be printed above
oxum has joined #lisp
hsaziz has joined #lisp
scymtym has joined #lisp
develope1notes has joined #lisp
v_m_v has joined #lisp
buffergn0me has quit [Ping timeout: 240 seconds]
oxum has quit [Ping timeout: 240 seconds]
<mpontillo> phoe: it doesn't print a specific error, hence my confusion. I was wondering if it was a more general issue with cffi-sbcl... but I can't explain why quickload works.
developernotes has quit [Ping timeout: 240 seconds]
v_m_v has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
izh_ has joined #lisp
Fare has joined #lisp
nowhereman has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
scymtym__ has joined #lisp
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
scymtym__ has quit [Ping timeout: 268 seconds]
<elderK> Hey all, is this the correct place to ask questions regarding the aesthetics of Lisp code? That, and questions about organization of Lisp projects. Say, one package for the entire project vs. package-per-file and the.
<phoe> elderK: sure, why not
jayspeer has left #lisp ["ERC (IRC client for Emacs 26.3)"]
davepdotorg has joined #lisp
oxum has joined #lisp
davepdotorg has quit [Ping timeout: 240 seconds]
develope1notes has quit [Quit: Lost terminal]
aamukastemato has quit [Ping timeout: 255 seconds]
narimiran has quit [Ping timeout: 272 seconds]
ebrasca has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
gareppa has joined #lisp
varjagg has joined #lisp
scymtym has joined #lisp
varjagg is now known as varjag
gareppa has quit [Quit: Leaving]
efm has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
oxum has quit [Ping timeout: 240 seconds]
dreamcompiler has joined #lisp
z147 has joined #lisp
clothespin has quit [Remote host closed the connection]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 258 seconds]
v_m_v has joined #lisp
<elderK> Thank you, Shinmera.
<elderK> Another question I have is regarding interfaces / protocols. Like, where should I best define the generics? How do I organize the files that contain a class, and the implementation of methods? What if a generic has a kind of useful meaning to more than one kind of family of objects?
<elderK> Say, "reference." It could be used to reference memory, or reference an environment.
<elderK> Another question, too, is whether it's possible to overload a generic in the sense of C++. Say, you have a generic that has one parameter, then the same named generic that has two.
<White_Flame> honestly, that's why I don't use DEFGENERIC, and let the system deal with DEFMETHOD directly. Then it works as a union of all methods regardless of who defined it first
<Bike> that's not possible, no. generic functions only dispatch on their required arguments and all methods have to have the same number of required arguments.
<White_Flame> SBCL is fine written that way, not sure if others demand the DEFGENERIC
lucasb has quit [Quit: Connection closed for inactivity]
<Bike> defmethod is defined to define a generic function implicitly if none exists, so that should work outside of sbcl, yes
<Xach> AMOP has a pretty good example of a collection of generics working together in a sensible and useful way.
<elderK> Another question is regarding dependencies in ASDF. I've started mentioning dependencies if and only if they are required at the time of build or load. But, it did make me wonder how you "forward declare" functions, generics, etc. As far as I have read, I have seen ftype.
<Xach> defgeneric isn't just something you sprinkle around and get a protocol as a result. it requires design and thought.
v_m_v has quit [Ping timeout: 258 seconds]
<Bike> "It could be used to reference memory, or reference an environment." as for this, personally i'd say that if you have two conceptually unrelated functions with the same name, that's more like a pun than an actual generic function
<elderK> Bike: Aye. I guess I could have reference and set!, and read and write for memory.
hiroaki has quit [Ping timeout: 272 seconds]
<elderK> Another issue is collisions with CL's names :P
<Odin-> Common Lisp tends to be on the verbose end.
<Bike> elderK: you don't need to forward declare functions. if a function isn't defined at compile time it's a style-warning at worst, but the compiler will just go "ok so you'll define it later, fine"
<elderK> As for the aesthetic issue - I was wondering what kind of conventions exist for deaing with long parameter lists, or short parameter lists but with longish parameter names. How do you flow so that they are over multiple lines?
<Bike> that said, defgeneric kind of is a forward declare, given that it has no actual code body
<elderK> My "margin" is quite small, around 80 columns, due to visual issues.
<elderK> Bike: I'd like to ensure my stuff builds/loads without warnings.
<White_Flame> elderK: sometimes it's useful to have things in dynamic bindings if they're to be passed around a lot and not necessarily used by everything
oxum has joined #lisp
<White_Flame> other than that, newlines & emacs indentation :-P
<elderK> White_Flame: I don't use Emacs :(
<Bike> if you have all your functions defined at top level in the same compilation unit there shouldn't be warnings. files are compilation units and i think asdf systems are also compilation units.
<Bike> could be wrong though
<elderK> I really wish the "SLIME indent rules" were codified in text somewhere.
<White_Flame> emacs & slime are the definitive source for common lisp indentatino
<White_Flame> however, the rules require runtime knowledge of macro definitions
<Bike> well you don't need that for indenting a lambda list.
<White_Flame> &rest vs &body, for instance, have differing indentations
<White_Flame> Bike: right
<elderK> :( I really wish SlimV did proper indentation.
<elderK> Or again, that the rules were comprehensively documented.
<White_Flame> although I don't know if &optional or &key stuff aligns in use by knowledge of the function spec
<elderK> Alternatively, if I could install Emacs, and SLIME, and use it like a script to indent a file.
<elderK> That way, I could learn over time the conventions and document them for others.
quazimodo has quit [Ping timeout: 260 seconds]
oxum has quit [Ping timeout: 258 seconds]
lindus has joined #lisp
rpg has quit [Ping timeout: 260 seconds]
lindus has left #lisp [#lisp]
karlosz has joined #lisp
z147_ has joined #lisp
<elderK> Another question: Is it possible to define a global variable that is *not* dynamic?
<elderK> I.e. Not special?
<Shinmera> some implementations offer that
<Bike> like sb-ext:defglobal. then you can't bind it even lexically, though.
<Shinmera> should probably add a thingy to highlight the anchored part.
gxt has joined #lisp
<Shinmera> One more ticket before sleep!
z147 has quit [Ping timeout: 240 seconds]
<Odin-> CCL, LispWorks and SBCL?
<Odin-> That's not exactly widespread.
<Shinmera> Might be more but the library hasn't been updated for it.
<Odin-> Gotcha.
<Odin-> Am I weird for thinking that dynamic binding is exactly what makes working with global variables sane?
<Shinmera> I never thought it was insane to begin with
<Shinmera> dynamic binding can help to encapsulate and it can help to obfuscate just the same.
hiroaki has joined #lisp
<Shinmera> (eg localising a behaviour vs injecting potentially unexpected values)
<White_Flame> elderK: older lisps had pure non-dynamically-bindable global variables as well as "global lexical" variables which is what we would call dynamic/special nowadays
LiamH has quit [Read error: Connection reset by peer]
<Bike> it's pretty common to use global special variables without binding them ever, so defglobal makes sense to me
<Shinmera> yeah, eg a table that's just used to provide a namespace is a common pattern for me.
<Bike> on a threaded implementation, local special bindings make special lookup a bit involved, so it's easy to imagine an actual performance hit from looking for special bindings when you know there aren't any
<White_Flame> Odin-: moving from a language with only "plain" global variables to common lisp, yes the CL view on dynamic binding makes globals actually useful as opposed to dangerous & avoided
<White_Flame> Bike: and I wish that there was a declaration for tls-only variables, to avoid the checking in the opposite scenario
<elderK> So, back to long parameter lists. How do you guys handle them, indent them? Given that I do not have SLIME, it'd be useful to see a few examplese of the conventional formatting.
<Odin-> Bike: Right. Those tend also to be cases where you are basically working with a constant, no?
<elderK> And are dynamically scoped variables worth using, if you only use them to make functions less parametery?
<White_Flame> Odin-: defconstant is cheap, and often a direct reference to the value of the constant is baked into usage locations
<Bike> Odin-: Well not necessarily. For example what shinmera said - the value is a hash table that you're mutating a lot
<Odin-> elderK: The language itself uses dynamically scoped variables quite extensively to customise behaviour; the printer, in particular, has a lot of tunables.
<White_Flame> and as such, (defconstant +my-table+ (make-hash-table ...)) will work faster than (defvar *my-table* (make-hash-table ...))
<White_Flame> (slightly faster)
<elderK> White_Flame: Wouldn't that trigger a warning?
<White_Flame> why would it?
<Bike> evaluating it twice would
<White_Flame> only if you run that DEFCONSTANT form multiple times
<Bike> long parameter lists... let me see if i can't find an example for you
<elderK> So, while developing.
<elderK> Reloading the system, etc.
<White_Flame> well, reloading the system is often done when you cycle the image anyway
<Odin-> Bike: Fair enough, but the hash table identity presumably would remain constant.
<White_Flame> and an extended defconstant that checks boundp first is often used to eliminate that warning, but leaves the original value in place like DEFVAR
LiamH has joined #lisp
<Bike> elderK: here's a definition of write-to-string https://pastebin.com/YAJcrqmP
<Bike> with slime indentation. honestly it's still pretty ugly though
<Shinmera> White_Flame: note that defconstant's value form may be evaluated at both compile and load time, and must provide a value EQL across both.
* Odin- is reading about WebAssembly, and the formatting of those s-expressions ... yikes.
<Bike> honestly having a lambda list on multiple lines never looks very good to me and i try to avoid it
<Shinmera> down with the 80 rule.
<Bike> starting the lambda list on a separate line below the "(defun whatever" line, even
<elderK> Shinmera: Horizontal space is extremely precious to me, mostly because I need to use quite large font sizes.
<elderK> Thanks Bike
efm has quit [Ping timeout: 268 seconds]
<elderK> Bike: Is there a reason why they aren't all aligned after &key?
<Bike> that's how slime does it
<Bike> i use slime indentation because it's easy to not think about it and hit tab a lot, not because i have strong (or indeed, much of any) opinion on how it ought to be done
<Shinmera> I'm honestly impressed there doesn't seem to be an editor around yet that does automated line breaking in a way that's smarter than just hard wrapping characters.
v_m_v has joined #lisp
<Shinmera> As in, break at opportune boundaries and reindent on the virtual line.
<Odin-> I presume you mean for code.
<Shinmera> Yes.
<Bike> lots of programming languages with meaningful newlines i guess? in C there's macro definitions
efm has joined #lisp
<Shinmera> Could always fall back to hard wrap for that
<Odin-> Putting aside weird things like Python, I think the major reason is that every so often people using a different editor open your code.
<Shinmera> but most languages have clear indentation and wrapping rules that should work for the vast majority of cases.
<Shinmera> Odin-: every editor should have this so people can stop fucking around with manually forcing certain widths on everyone looking at it.
<Odin-> This basically just boils down to "run a pretty printer on the buffer every now and then".
<elderK> Bike: How does formatting differ for &key, &rest, &optional?
izh_ has quit [Quit: Leaving]
<Odin-> Shinmera: There are people who would disagree, harshly.
<Odin-> Shinmera: And given that they exist, you're simply not going to get that.
v_m_v has quit [Ping timeout: 258 seconds]
Inline has quit [Ping timeout: 272 seconds]
<Shinmera> Like, there's no correct choice for width because everyone has different monitors, font sizes, preferences, etc.
<Shinmera> So the editor should do it for you according to your preference.
oxum has joined #lisp
<White_Flame> the problem is that source code is still a dumb stream of characters, instead of instantiated source code constructs
<Odin-> Shinmera: In the general case, it cannot.
<Bike> elderK: glancing at slime-cl-indent, looks like it should be the same except you can choose to align keywords differently
<Bike> elderK: this is not something i know a lot about
<Shinmera> Odin-: In general a lot of stuff cannot be solved. That's not interesting.
<Odin-> Shinmera: So you are not making a general requirement?
<Shinmera> I'm saying I'm surprised nobody seems to have tried this yet because I think a good enough solution could be written.
<White_Flame> Shinmera: what would the save format be? Would most lines in a file be modified by the editor anytime somebody uses a different screen width? That's the problem with raw text
<Odin-> I suspect there's a reason that code reformatting is still being done, mostly, as a batch task on already-written code.
<elderK> Bike: Could you show me an example of SLIME indenting, using all the various parameter types?
<White_Flame> the spacing is meaningful for the human, and saved in the file
<Bike> i actually am about to leave, so no
<White_Flame> elderK: a big difference is also at the call site, primarily with &body
<Shinmera> White_Flame: there's nothing to modify. line wraps are virtual already. all you need to add to the soup is an indentation that only exists in the editor and can't be actually edited.
<White_Flame> the IF construct indents differently between implementations that do (defmacro if (test then &optional else) ...) vs (defmacro if (test &body then-and-else) ...)
<White_Flame> Shinmera: but again, what's stored in the file?
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
<Shinmera> the same thing that already is stored
<White_Flame> if you edit a file, does it have to re-infer what the on-disk indentation is for your edits?
<Shinmera> ?
<White_Flame> given that the user has independent indenation?
<Shinmera> I'm not saying get rid of all line breaks or indentation
Bike has quit [Quit: Bike]
<Shinmera> I'm saying introduce indentation for the wrapped part of a virtual line only
<Shinmera> but whatever I'm not interested in debating this
<Shinmera> good night.
<White_Flame> that would mean that the on-disk has no hard wrapping, xor you'd have a combination of file-wrapped and virtually-wrapped lines
<Odin-> So you'd, what, tag each line you want to be soft-wrapped?
<White_Flame> and the file wrapping can easily not match your virtual wrapping indentation, and thus need backporting or something
hsaziz has quit [Ping timeout: 268 seconds]
* White_Flame actually is interesting in this, though, even if Shinmera isn't ;)
<White_Flame> *interested
<White_Flame> it's an ages-old problem
<elderK> I wonder how hard it would be to install a minimal Emacs, with Slime, such that I can format code.
* Odin- mainly notes that the "recent batch" of languages takes an approach that says there is a standard coding style which tooling imposes.
<White_Flame> elderK: if you're on windows, portacle is a bundling of those
<Odin-> And it's rather interesting that 80 characters is actually significantly longer than most sources suggest is an appropriate line length.
vaporatorius has quit [Ping timeout: 272 seconds]
<White_Flame> that's because most other languages have lots more syntax & punctuation, whereas lisp has hyphenated-words
<Odin-> Err.
<Odin-> No, no. For general text.
<White_Flame> you mean natural language writing? yeah, narrower columns are more readable there
<White_Flame> for longer paragraphs
orivej has quit [Ping timeout: 240 seconds]
<White_Flame> but that's not source code
<Odin-> The reason for it is scanning distance, so it's relevant.
<White_Flame> indentation is the main scanning assistant in source code
<Odin-> A "nothing goes beyond 80 columns" rule, however, is not.
<Odin-> That and not having any individual line too long.
<White_Flame> for me, the number of indivudual tokens in a line being too high is the issue, not a line that is syntactically too long because it has the same number of tokens of really long names
<Odin-> *shrug*
<Odin-> I think XP handles the whole issue surprisingly well.
prince1 has joined #lisp
davepdotorg has joined #lisp
sjl_ has quit [Ping timeout: 258 seconds]
davepdotorg has quit [Ping timeout: 255 seconds]
karlosz has quit [Quit: karlosz]
z147 has joined #lisp
z147_ has quit [Remote host closed the connection]
LiamH has quit [Quit: Leaving.]
hsaziz has joined #lisp
z147 has quit [Quit: z147]
MetaYan has quit [Ping timeout: 256 seconds]
oxum has quit [Ping timeout: 240 seconds]
housel has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
Bike has joined #lisp
ebzzry has joined #lisp
MetaYan has joined #lisp