<anlsh>
Thanks! Seems like the discussion hasn't been extensive, so I'll have to try to catch beach sometime
dddddd has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
<ebrasca>
aeth: I have installed sbcl on my talos II, but I can't make it work with multithreading.
holycow has joined #lisp
<holycow>
.
<ebrasca>
holycow: I remember he likes to test someting in talos II.
rople has quit [Ping timeout: 268 seconds]
<holycow>
hi ebrasca, i am pretty sure you meant someone else :)
atgreen_ has joined #lisp
rople has joined #lisp
atgreen has quit [Ping timeout: 265 seconds]
<holycow>
thanks again.
holycow has quit [Quit: leaving]
oni-on-ion has quit [Ping timeout: 252 seconds]
gioyik has joined #lisp
<ebrasca>
aeth: I have now multithreading , what do you like me to test?
<aeth>
I'm not sure. The discussion was a while ago.
<aeth>
I think no-defun-allowed was also involved in the discussion iirc and no-defun-allowed knows the threading libraries.
<no-defun-allowed>
What discussion?
<aeth>
no-defun-allowed: benchmarking the SMT on POWER? or something.
<no-defun-allowed>
Hm, I don't remember that too well.
<edgar-rft>
is this the new alzheimer channel?
<aeth>
me niether, but the benchmark would be simple. 1 thread, n threads (where n is number of cores), n*2 threads, n*4 threads (because power has 4-way SMT)
atgreen_ has quit [Ping timeout: 268 seconds]
<beach>
Good morning everyone!
<beach>
anlsh: I can't recommend it.
gioyik has quit [Quit: WeeChat 2.6]
<ebrasca>
Morning beach!
<anlsh>
Unfortunate, any particular reason?
<beach>
anlsh: A lot of the book contains C code, and the strategy for implementing memory allocation is very different from what most implementations would do.
<beach>
I had hoped that it would discuss pros and cons with different implementation strategies, but it is basically just the code of one particular implementation.
gioyik has joined #lisp
shka_ has joined #lisp
<anlsh>
I see. As to the "too much C" complaint, were you hoping the author would bootstrap earlier?
<beach>
Well, I was hoping for an insight into different strategies. Among them, a strategy where everything is written in Common Lisp, and the pros and cons of that one.
gxt has quit [Remote host closed the connection]
<beach>
The title of the book suggested that. But, like I said, it is basically just the commented code of one particular implementation.
gxt has joined #lisp
jonatack_ has joined #lisp
jonatack_ has quit [Client Quit]
jonatack has joined #lisp
<beach>
anlsh: But you might like it, depending on what you are looking for.
keep_learning has joined #lisp
freedom has joined #lisp
<beach>
anlsh: If the goal is to create a general-purpose Common Lisp implementation, today there is no particular reason to write it in a language other than Common Lisp.
Inline has quit [Quit: Leaving]
<anlsh>
Thanks, I think you're right in that we're trying to get different things from the book. Follow-up, how much experience did you have with the topics in the book beforehand? I don't have any experience with compilers, and am wondering how approachable it would be
<beach>
I think it is fairly easy to understand. But it doesn't give any insight into different ways of creating a Common Lisp system.
gioyik has quit [Ping timeout: 240 seconds]
<beach>
I am writing SICL at the moment, so I already have experience with different implementation strategies.
<beach>
anlsh: You would learn more about the pros and cons of different strategies by asking in #sicl than by reading that book.
<anlsh>
Yeah, my interest it is definitely from a different perspective. I was hoping to use it as an introduction to language implementation in general
<beach>
Then it is not the right book for you.
<beach>
But if you don't have too many budget restrictions, go ahead and buy it just to check it out.
gioyik has joined #lisp
<anlsh>
Well, if it's not usable as an intro text to implementation stuff then I'll hold off for now
<anlsh>
Thanks for the advice though!
zmt00 has quit [Read error: Connection reset by peer]
<beach>
Sure. Again, if you want to discuss different strategies, go ahead and do it here or in #sicl.
<beach>
We have people here who maintain SBCL, ECL, Clasp, CCL, and SICL.
<beach>
So you can get different perspectives.
<beach>
Besides, such a discussion would be very much on topic.
jfb4 has quit [Ping timeout: 276 seconds]
jfb4 has joined #lisp
<beach>
anlsh: For example, most existing implementations were started before CLOS was part of the standard, so they all incorporate CLOS very late in the build process. I think that with a new implementation, that strategy is not a good one.
<beach>
Even SBCL suffers from that problem. The compiler is written without the use of generic functions.
zmt00 has joined #lisp
quazimodo has quit [Ping timeout: 252 seconds]
quazimodo has joined #lisp
<beach>
For instance, SICL can use DEFCLASS to define the class SYMBOL, but if you don't have CLOS, you have to define it differently.
shka_ has quit [Ping timeout: 240 seconds]
gioyik has quit [Quit: WeeChat 2.6]
zooey has quit [Quit: quit]
FreeBirdLjj has quit [Remote host closed the connection]
zooey has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jjkola has quit [Ping timeout: 240 seconds]
flamebeard has joined #lisp
longshi has joined #lisp
ebzzry_ has joined #lisp
scymtym has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #lisp
jjkola has joined #lisp
hiroaki has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<lukego>
ok time to spend a few cycles working out how to use Lisp with org-babel
grabarz has joined #lisp
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 276 seconds]
<jdz>
In my experience it "just works".
<jdz>
For simple cases, at least (single session).
longshi has quit [Ping timeout: 245 seconds]
cods has quit [Changing host]
cods has joined #lisp
scymtym has joined #lisp
<lukego>
Indeed. What fun is that?
dilated_dinosaur has joined #lisp
ggole has joined #lisp
Cymew has joined #lisp
jfb4_ has joined #lisp
jfb4 has quit [Ping timeout: 265 seconds]
anewuser has joined #lisp
varjag has joined #lisp
stepnem has quit [Ping timeout: 240 seconds]
stepnem has joined #lisp
<lukego>
I'm reading the ASDF docs but I'm still not sure what it is I'm supposed to do nowadays instead of pushing a directory onto ASDF:*CENTRAL-REGISTRY* to programmatically add a a directory to be searched for .asd systems?
<jackdaniel>
asdf looks for some magic config files where you may specify what is put where, afair it is described in a manual (but poorly written)
Davd33 has quit [Remote host closed the connection]
<splittist>
lukego: pushing still works. And don't forget about quicklisp/local-projects/
Smokitch has joined #lisp
<lukego>
Situation is that I've used Quicklisp to create a "bundle" of all my dependencies, and setup the Lisp startup env to find all of those, but now I want to add the *.asd that live in my source tree somehow. These systems aren't really "installed" and so I don't have the linked from standard paths and configuration files. Maybe what I need is a custom lisp.sh that makes them findable at startup and use that as inferior-lisp-p
<lukego>
... So at runtime I don't have Quicklisp and I also don't want to hack well-known files in ~/ etc.
<lukego>
but actually the custom startup script will be fine, I'm already doing that anyway and just hadn't thought to plug in my systems there.
madand has quit [Ping timeout: 245 seconds]
ggole has quit [Quit: Leaving]
<lukego>
I've gone "full nix" and made a little distro of all the Lisp and Emacs packages that I need, and their configurations, using the nix tooling that grovels Quicklisp and MELPA. Seems to work surprisingly well now.
Smokitch has quit []
jeosol has quit [Remote host closed the connection]
<scymtym>
lukego: i didn't catch whether you still it, but something like (asdf:initialize-source-registry '(:source-registry (:tree "/path/to/tree") (:tree "/path/to/directory/") :ignore-inherited-configuration)) configures the source registry programmatically
<lukego>
I really just want to add a path without disturbing what's already there, since that was painstakingly setup by some cl-wrapper.sh script that I didn't write and am only starting to understand now
<lukego>
but probably shell before startup is the right place for me anyway, thanks
rople has quit [Ping timeout: 268 seconds]
rople has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
<jdz>
lukego: There is also CL_SOURCE_REGISTRY environment variable (if you have not already seen it).
<lukego>
Thanks. I'm trying now with NIX_LISP_ASDF_PATHS that the nix common lisp wrapper seems to turn into :TREE paths for asdf. However they don't seem to be getting picked up and I'm not clear on how to ask ASDF exactly what its complete set of search paths is at runtime?
<jdz>
I remember struggling with this as well, and ended up using CL_SOURCE_REGISTRY, but exact details of my struggles evade me...
shifty has quit [Ping timeout: 240 seconds]
<jdz>
This should encourage me to keep a work journal.
shifty has joined #lisp
<lukego>
I'm concerned that this variable might be clobbered by the wrapper, but here goes nothing...
<lukego>
jdz: that actually worked fine, thanks for the nudge :)
<jdz>
Nice, glad I could be of help!
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
oni-on-ion has joined #lisp
rople has quit [Quit: rople]
Bourne has joined #lisp
Tordek_ is now known as Tordek
atgreen_ has joined #lisp
<lukego>
I'm looking for but not finding information about how to make org-babel start SLIME session(s) by itself. I feel like I've seen this on the interwebs before though?
ljavorsk has joined #lisp
<splittist>
What does 'by itself' mean?
<lukego>
I mean that if I open Emacs, and open a .org file with Lisp source, and press `C-c C-c' to try and build it, then it complains that no SLIME session is available to evaluate the Lisp code. So I need to do `M-x slime' first. But I have the impression that org is able to manage one or more sessions on it own? (Or maybe it only does that with other languages, I don't quite recall.)
<lukego>
(This is not something important, I can easily live without, just had a memory fragment of having seen a HOWTO once upon a time and not finding it again now. Could have been for e.g. R rather than Lisp or something though.)
<oni-on-ion>
there must be a way to "start sliime automatically"
<_death>
you can change org-babel-lisp-eval-fn to your own function that starts slime if necessary
lnostdal has quit [Quit: "Fascism, Nazism, Communism and Socialism are only superficial variations of the same monstrous theme—collectivism." -- Ayn Rand]
ljavorsk has quit [Ping timeout: 240 seconds]
theruran has quit [Quit: Connection closed for inactivity]
<Josh_2>
oni-on-ion: very useful haha I'd never even considered doing that until that link
<easye>
Having everything on the filesystem allows me to quickly M-x ag introspect what is currently available by invoking ASDF:INITIALIZE-SOURCE-REGISTRY
atgreen_ has quit [Remote host closed the connection]
<phoe>
if #'STRING for characters works like #'COERCE, then the result must be fresh
<jackdaniel>
assuming that the same string may be returned, what about (%f) (setf (svref str 0) #\d) (%f) ;?
<_death>
if the result EQ is expected to be true then it assumes the string is not fresh.. I don't think you can assume either way, so you treat it as if it wasn't.. same for COERCE
<phoe>
jackdaniel: I don't understand - where should the SETF go?
<phoe>
_death: ideally I'd want the passage from the spec that says that the produced objects must be fresh
<_death>
phoe: but there is no passage
<phoe>
because in theory #'COERCE could cache its results and return them if the objects need not be fresh
<_death>
phoe: this is why you can't assume it's fresh
<easye>
Aren't strings implicitly static objects for implementations? It's true for abcl as they thunk down to java.lang.String references.
<phoe>
_death: in this case ansi-test STRING.FOLD.1 is not valid
<phoe>
easye: Java strings are immutable but Lisp strings are mutable.
<flip214>
I'm trying to use named-readtables. In my code I have (let ((*readtable* (copy-readtable))) (named-readtable:in-readtable :mine) (ignore-errors ...))) but still that readtable is used in the next commands sent via slime - which breaks parsing, of course.
<phoe>
I've annotated this paste with one more. If you use (string #\a) that is not wrapped in a function call, then a fresh string is produced.
<trittweiler>
flip214, in-readtable modifies a slime variable associating a package with a readtable. It has a global side-effect that way
<phoe>
flip214: in-readtable should be a toplevel form
<phoe>
same deal as with in-package
<trittweiler>
flip214, sly (https://github.com/joaotavora/sly) I believe has proper support for named-readtables. Which means it looks for a contextual in-readtable form (like Slime does for in-package) and makes sure to send that to swank when evaluating.
<jackdaniel>
literal objects are described as either quoted or self-evaluating, so it would not be conforming for stadard function to return a literal object, no?
<phoe>
#'symbol-name
Bike has joined #lisp
<phoe>
this is a standard function that returns a literal object
<jackdaniel>
no, it is only said that consequences are undefined if name is modified
<jackdaniel>
so you must not change the name
<jackdaniel>
but you've got a point, there are functions which may return literal objects. but I'd expect their specification to have such warning
<jackdaniel>
(like symbol-name has)
<trittweiler>
Yeah, otherwise a compiler could constant fold (cons 1 nil) etc :)
mingus has quit [Remote host closed the connection]
<phoe>
so the question is, is #'STRING allowed to return a literal object?
<_death>
phoe: (ok, I figured out deftest syntax..) note that in the other cases STRING can return such objects.. the string itself as shinmera noted, or the symbol's name, which as you note should not be modified.. so it makes sense to expect that the string (string #\X) should also be treated as such, given that there's no special wording to contradict
<jackdaniel>
also what symbol name returns is not literal objects but rather internal state of the symbol object
<_death>
I didn't say it was a literal, but that it should be treated as a literal..
wxie has joined #lisp
<Bike>
"literal" means it literally appears in the code, using it to mean "can't be modified" is confusing
<phoe>
s/literal/immutable/
<phoe>
or rather
<phoe>
s/literal/immutable/g
<phoe>
so the question is, is #'STRING allowed to return an immutable object?
<Bike>
yeah, sure.
<Bike>
first bullet point says if the argument is a string it's returned.
<_death>
Bike: maybe there's a better term
<Bike>
seems straightforward
<phoe>
Bike: (string #\a)
<phoe>
that is the case in question
<Bike>
oh. i dunno.
<phoe>
ANSI-TEST claims that it must be fresh, but I need some spec to back up that claim.
<Shinmera>
Does any implementation actually cache these?
<jackdaniel>
the thing is that spec doesn't say, that returned object from character is immutable, but when you mutate it function starts to return incorrect results
<jackdaniel>
Shinmera: according to phoe ccl does
<Shinmera>
that's... surprising to me.
<phoe>
Shinmera: or rather, it doesn't cache it
<jackdaniel>
phoe: see above ^ #'string may start to return incorrect results in code which is not non-conforming
<_death>
could imagine a compiler macro
<jackdaniel>
so that would settle it
<Shinmera>
phoe: ok, good
<phoe>
but a FLET function with optimize speed 3 everything-else 0 that calls (string #\a) is constant-folded into "a"
<jackdaniel>
I think that with safety 0 everything goes, even segfaults ,-)
<phoe>
jackdaniel: I doubt that non-conforming code should make it into ANSI-TEST though
<jackdaniel>
safety 0 speed 3 --> I must make it constant fold random ;)
<phoe>
does the test conform? I think so
<phoe>
jackdaniel: xD
<Bike>
ansi-test sure seems to include some weird corner cases
<phoe>
Bike: that is definitely Yet Another One of Them™
<jackdaniel>
phoe: there is nothing in spec, that you can't modify result of (string #\a), so you are not forbidden to modify it
<phoe>
jackdaniel: that sounds correct, yes
<jackdaniel>
when you mutate resulting string and subsequent call (string #\a) returns something else than "a", then it is incorrect result
<jackdaniel>
hence a new object should be created
<phoe>
this implies that the test is correct and CCL needs a patch
<_death>
disagree.. since it doesn't claim the string to be fresh, you could have a compiler macro that expands to "X" on form (string #\X)
<Bike>
if ccl doesn't cache why does it need a patch
<jackdaniel>
seems so. I would be more unsure in case of symbol passed to string - should it copy the symbol's name?
<jackdaniel>
because it is not said it calls (symbol-name ...) hence there is no restriction on immutability
<Bike>
i dunno, if this doesn't actually break anything it seems fine
<phoe>
someone could depend on #'STRING returning fresh values
<phoe>
so in theory it could break someone's code
<_death>
that someone would be wrong to do that
<phoe>
well
<phoe>
_death claims that the spec doesn't say anything about the string being fresh
* jackdaniel
thinks that the test is correct
<phoe>
jackdaniel claims that the spec doesn't say anything about the string not being fresh
<Bike>
these kinds of issues are precisely annoying to deal with because without real cases of it coming up it's just abstract
<phoe>
or did I get the order wrong, whatever
<jackdaniel>
I've given an example earlier
<jackdaniel>
and reasoning
<phoe>
yep, I'm re-reading it now
<phoe>
(flet ((%f () (string #\a))) (let ((x (%f))) (setf (char x 0) #\d) (list x (%f))))
<phoe>
;=> ("d" "d") on CCL
<phoe>
even on standard compiler policy, so without (declare (optimize (speed only)))
amerlyq has joined #lisp
<phoe>
but CCL states that (constantp '(string #\a)) ;=> NIL
<phoe>
so it shouldn't be constant-folded
<Bike>
constantp doesn't have to be part of the implementation's folding process.
<phoe>
one second though - is an implementation allowed to constant-fold something that is not constantp?
<Bike>
yes, that's what i said.
<phoe>
so I cannot depend on constantp in this case, all right
<Bike>
constantp isn't even sufficient to describe all the constant folding a compiler can do since it can't know about lexical variables that happen to be constants, etc.
<_death>
constant folding may not even be involved
ym has joined #lisp
<_death>
there is a single form that may expand to a literal.. no constant folding needed
atgreen_ has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.2)]
Josh_2 has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
gabiruh_ has quit [Remote host closed the connection]
<phoe>
for symbols, symbol-name is returned which is immutable
<phoe>
for characters... this is the troublesome part
<_death>
phoe: it's strange to me that it doesn't have a deftransform returning a string literal
<phoe>
_death: mayhaps sbcl assumes that for characters the result must be fresh
<phoe>
running a brief test on sbcl confirms this
jmercouris has joined #lisp
<_death>
phoe: the ccl commit is from 2016.. sbcl should keep up :)
<pjb>
It doesn't formally say that a fresh string is returned.
brown121408 has quit [Ping timeout: 246 seconds]
<phoe>
pjb: it doesn't also formally say that the consequences are undefined if that string is modified
<jmercouris>
why do I sometimes get the same restart twice in the debugger?
<phoe>
or tl;dr that an immutable string is returned
<pjb>
phoe: this would be equivalent.
<phoe>
jmercouris: because two different restarts have been established in various places of the stack
<pjb>
phoe: note that in the case of (string #1="x") it's #1# that is returned, not a fresh string (not a copy).
brown121407 has joined #lisp
<jmercouris>
phoe: Hm which one should you choose? the lower one?
<phoe>
pjb: yes, that is correct, I am talking about the case with characters.
<phoe>
jmercouris: can't say in the general case
<pjb>
phoe: consistency.
<jmercouris>
fair enough, I guess it would depend
<phoe>
pjb: if we want consistency, then #'STRING may return non-fresh values and the ansi-test is wrong
<trittweiler>
It's not even clear if it isn't the same restart that actually gets invoked
<_death>
phoe: I believe ansi-test is wrong, if it's not clear by now :)
<trittweiler>
which would be the upper one, assuming they are displayed by sorting top-to-bottom
bitmapper has joined #lisp
<phoe>
my question by now is - since this tests succeeds only if #'STRING returns *fresh* values, where in the spec is it specified that #'STRING must return *fresh* values
<phoe>
(or whether they should or shouldn't be)
<pjb>
phoe: that's the point; it's not formally specified. "fresh" doesn't occur on this clhs page.
<flip214>
I do (:syntax-from :common-lisp #\( #'<) so that the string "(1,2,3<") is correctly parsed as a list -- but the reader says "unmatched close parenthesis" there. How can I fake the end of a list then?
<shka__>
does sbcl use sxhash for hash-tables created with :test 'eq parameter?
<shka__>
hi, btw
<shka__>
flip214: well, try "(1,2,3<)"
<pjb>
flip214: try to parse "(1,2,3<)"
<shka__>
damn, you pjb
<jmercouris>
trittweiler: well, the strings are exactly the same, I can't exactly know without actually looking with the inspector
<pjb>
flip214: also, use the fucking emacs !
<phoe>
flip214: you can't do that
<phoe>
the reader macro for #\( calls read-delimited-list with #\)
<pjb>
flip214: emacs will colorize the string so you can see what's inside and what's outside!!!
<flip214>
shka__: pjb: same
<phoe>
you must write your own reader macro that calls read-delimited-list with #\>
<shka__>
hmm, ok
<flip214>
pjb: not for a self-defined readtable
<flip214>
and the string actually is "(1,2,3<" the ")" after was a typo
<flip214>
or, rather, the end of my test-expression
<trittweiler>
flip214, what phoe says. Define your own reader macro function for #\< which uses read-delimited listwith #\>
<pjb>
ok, in that case, I guess you assume that (:syntax-from :common-lisp #\( #'<) means define a reader macro on #\( to read-delimited-list with comma and #\<…
<flip214>
phoe: thanks; I could also have #\) as the list terminator, so I can't call read-delimited-list myself
<pjb>
if not, do your programming job.
<trittweiler>
yeah then you really need to write a function that does the parsing yourself :)
<jmercouris>
Save time, write a parser that writes parsers so you never have to write a parser again
<phoe>
flip214: wait a second though, your lists can be <1 2 3) or <1 2 3>?
<flip214>
pjb: I hoped that I can just "copy" the behaviour from #\) to #\<, but that's not so easy.
<flip214>
phoe: no, the beginning is always a #\(
<phoe>
flip214: okay, what can the ending be?
<flip214>
I guess the easiest way is to cut the < and everything after off
<flip214>
either < or )
<pjb>
The trick of lisp is the Polish notation: the first character determines the syntax, the first symbol determins the semantics.
<pjb>
This is what makes things easy in lisp.
<flip214>
this is "parsing" the strace argument list; and so I have to handle "<... unfinished>"
<phoe>
flip214: you can't use READ-DELIMITED-LIST then since it expects a single closing char.
<flip214>
I was able to redefine , to be the delimiter character, and to ignore spaces after it
<flip214>
but I guess writing a loop becomes easier than fudging the lisp reader to do that
<flip214>
thanks, everyone!
zulu-inuoe has joined #lisp
pfdietz has joined #lisp
<jmercouris>
:-)
Bike has quit [Quit: Lost terminal]
Smokitch has joined #lisp
<phoe>
jackdaniel: the spec doesn't say that the return value is mutable and it doesn't say that the return value is immutable
grewal has quit [Ping timeout: 240 seconds]
<phoe>
so it might be one or the other
jmercouris has quit [Ping timeout: 265 seconds]
<phoe>
that is what I understand so far
grewal has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
niklascarlsson has joined #lisp
<Xach>
lukego: fyi the bundle loader script also includes a local-projects mechanism
<Xach>
it is a small function, not like including the whole of quicklisp.
<jackdaniel>
phoe: taking that line of thought renders string produced with with make-string foldable
<jackdaniel>
while I agree that it is not said whether it is a fresh object or not, there is no indication that modifying the result is an undefined behavior releasing nasal deamons
<jackdaniel>
and (string #\a) returning "d" is a clear example of a nasal deamon
<phoe>
jackdaniel: you are correct, make-string is supposed to be the function for consing up new strings
<phoe>
so it seems that the only possible choice that doesn't conflict with (string #\a) returning "d" is to make #'STRING always return fresh strings for characters
<phoe>
even though it is inconsistent with #'STRING returning non-fresh objects otherwise
shifty has quit [Ping timeout: 252 seconds]
<jackdaniel>
in case of a symbol name I would argue that it is necessary to return a fresh string
makomo has quit [Quit: WeeChat 2.4]
<phoe>
no, why?
<phoe>
it returns its name, so exactly what SYMBOL-NAME does
<phoe>
and clhs symbol-name says, The consequences are undefined if name is ever modified.
<jackdaniel>
it is not said, that it returns the same thing as symbol-name does (or that it calls symbol-name)
<phoe>
clhs symbol-name: symbol-name returns the name of symbol.
<jackdaniel>
yes, and (string symbols) returns the name of symbol.
<phoe>
clhs string: If x is a symbol, its name is returned.
<phoe>
so both return the same string
<jackdaniel>
(defun xxx () 42)
<jackdaniel>
(defun yyy () (xxx))
<jackdaniel>
(defun zzz () 42)
<jackdaniel>
is zzz the same thing as yyy?
atgreen_ has quit [Quit: Leaving]
<phoe>
they return the same value
<phoe>
so both return the same string
<jackdaniel>
number is a wrong example, let's imagine, that 42 is "42" above
<phoe>
s/string/thing/
<jackdaniel>
specification: yyy returns "42". modifying string has undefined consequences. vs. zzz returns "42".
<phoe>
hah, so this is what you mean
grabarz has quit [Ping timeout: 246 seconds]
<phoe>
if we read it that way, it becomes obligatory that (symbol-name :foo) is NOT eq to (string :foo)
<jackdaniel>
that's why I would argue, that (string symbol) should return a fresh string
<jackdaniel>
well, not really
jmercouris has joined #lisp
<phoe>
...
<pfdietz>
On the issue of strings in the standard: an implementation is allowed to turn string constants into strings with restricted element types. "foo" can be turned into a simple-base-string, for example.
<jackdaniel>
undefined consequences in symbol-name doesn't prohibit it from returing fresh string
<phoe>
well, SYMBOL-NAME could return fresh strings as well
FreeBirdLjj has joined #lisp
<jackdaniel>
they only say, that it may return internal state of the symbol
<jmercouris>
let's say I am at a parenthesis and I want to jump to the corresponding parenthesis, how can I do that?
<phoe>
pfdietz: that's a different issue though, subtyping strings into more specialized strings
<phoe>
jmercouris: in emacs?
<phoe>
C-M-f for me on spacemacs while in lisp-mode
<pfdietz>
Yes, but it's an issue that breaks at least one project in quicklisp. :)
<jackdaniel>
one way is to hit right arrow until you are there, or what phoe says
<jmercouris>
phoe: in emacs, yes
<Xach>
it is the same in mundane emacs
<phoe>
pfdietz: welp, which one
<Xach>
C-M-f to go forward, C-M-b to go back
<jmercouris>
Ah yes, thank you
<jmercouris>
it works, I've been wanting this keyword for a long time
<jmercouris>
key chord*
<pfdietz>
I forget, alas. It was in a test case where a string constant is copied, then a non-base-char is assigned into the copy.
grabarz has joined #lisp
<jmercouris>
there is so much to paredit to learn and to master...
<_death>
wait til you learn about C-M-t
<jmercouris>
what is that? transpose sexp?
<_death>
yes
<jmercouris>
mind blown
<phoe>
_death: this launches a terminal window on my linux box
<jmercouris>
I usually use simple things like C-arrow and kill and M-f, etc
<phoe>
I guess I will never get to know this keychord :(
<jmercouris>
phoe: tell your WM to stop intercepting the keywords meant for your OS
<phoe>
jmercouris: touche
<jmercouris>
phoe: you can do m-x transpose-sexps
<pfdietz>
(looks it up) The failure was in babel
<phoe>
oh yes, I think I remember it now
<_death>
phoe: when I started using stumpwm I found it strange that it used C-t for prefix.. immediately switched it to C-z
<pfdietz>
Is there a library for exploding a set of functions into versions specialized on particular subtypes of the arguments? This comes up in some string handling code, where I want it to take advantge of some large string being simple and of a particular element type.
snits_ has quit [Client Quit]
<pfdietz>
I recall someone wrote this.
snits_ has joined #lisp
snits_ has quit [Client Quit]
<pjb>
pfdietz: beach did something like that to implement sequence processing functions.
grabarz has quit [Ping timeout: 240 seconds]
snits has quit [Quit: leaving]
<pjb>
pfdietz: there's a paper about it in some els proceedings.
<pfdietz>
Thunks for assignment would take a single argument, the value to be assigned.
<_death>
never heard of an unary thunk..
<jmercouris>
That sounds terrible, not sure why you wouldn't just use a defparameter or something if you need a compile time evaluation on the toplevel
<pfdietz>
I have actually had need for thunks in CL recently. The issue was redefining a function that was defined in a nontrivial lexical environment. To capture that environment, one creates thunks.
<Xach>
thunkmaker, thunkmaker, flet me a thunk
madage has joined #lisp
<jackdaniel>
find me a match, label as such
bitmapper has quit [Ping timeout: 265 seconds]
<phoe>
:thonk:
jmercouris has quit [Ping timeout: 268 seconds]
<pfdietz>
That sounds like something from PDQ Bach.
<_death>
well, I'm not convinced that is the right interpretation..
smazga has joined #lisp
<phoe>
_death: interpretation of what?
<_death>
of implications about the return value of STRING.. then again I'm just a CL-USER
FreeBirdLjj has quit [Remote host closed the connection]
<phoe>
neither am I, but the spec is clearly not clear enough in this case
<phoe>
and returning fresh data whenever fresh data *might* be required is the safer choice
FreeBirdLjj has joined #lisp
<_death>
you can find many omissions once you're looking for them.. I already gave my argument wrt STRING
<phoe>
yes
<phoe>
and one naturally looks for omissions when one implements the language
<phoe>
except they are called "edge cases"
<_death>
it's not the safer choice, it's "false sense of security" choice.. the safe choice would be to not assume it's a fresh string
<phoe>
the users who read this page do not need to assume that the consequences are undefined if the resulting value is modified
<sjl_>
As a random bystander, reading clhs STRING, I would not expect the returned strings to necessarily be fresh
<phoe>
since the page doesn't say that
bitmapper has joined #lisp
<sjl_>
(string "foo") is in fact defined to NOT be fresh.
<_death>
phoe: if a user modifies this string, whether it "works" or not on a particular implementation, it's not guaranteed to work by the standard, so it just gives a false sense of security.. and the cost is that you can't have a more efficient STRING
<phoe>
sjl_: pjb has already said that above, correct
<sjl_>
Some day I'll set up an IRC bouncer.
<sjl_>
But not today.
<phoe>
make-string also doesn't say that its result value is fresh
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<phoe>
even though it would take a madman to think that it may share structure with anything
<_death>
phoe: like I said, you can find many omissions.. CL's spec is informal
<phoe>
yes, as much as we'd like it to be formal
<phoe>
the question is how do we interpret these omissions once we want to solidify them
<phoe>
and ANSI-TEST is such a solidification
<sjl_>
I'd argue that "a string is constructed" seems to imply fresh strings pretty heavily.
epaulson has joined #lisp
<_death>
phoe: Common Sense
<phoe>
_death: we don't have any standard implementation of that though
<phoe>
even though I'd enjoy running my own SBCS
<_death>
with MAKE-STRING, there's not much doubt.. with STRING, there is..
<phoe>
ayup
<_death>
so as a user, you'd go for the conservative choice: not modify the string.. as an implementer you can decide to return a fresh string, but it won't matter if the user makes the conservative choice
<phoe>
yep
<phoe>
this is literally a workaround due to a bug in the spec
<_death>
but if the user goes wild and modifies the string, it will only work by chance - because the implementer chose to return a fresh string
<sjl_>
I'll reiterate: STRING is explicitly defined to NOT return a fresh string in some cases. So as a user, I wouldn't expect to be able to rely on it returning fresh strings in the rest.
epaulson is now known as LeifErikson
<phoe>
sjl_: yes, that's correct as well. And that's what makes me even more confused.
<phoe>
(I've also made that argument up above.)
edgar-rft has quit [Quit: Leaving]
igemnace has joined #lisp
varjag has joined #lisp
<sjl_>
Now I'm confused. You say "asits return values for symbols and characters are required to be fresh." in the issue, which is the OPPOSITE of what I'm saying.
FreeBirdLjj has joined #lisp
<phoe>
sjl_: yes, and this argument is consistent with what jackdaniel said earlier
<_death>
required how?
<phoe>
for characters, the spec doesn't say "the consequences bla bla bla"
<phoe>
for symbols, same thing
<_death>
so with this argument, whenever the spec doesn't say the structure is shared, you are required to return a fresh one?
shka_ has joined #lisp
Inline has joined #lisp
Davd33 has joined #lisp
<phoe>
sigh
<phoe>
yes, you are correct
<jackdaniel>
_death: in some cases you need to take into account the core system integrity
<phoe>
it would be nice to have the spec say for every return value if it might share structure with anything else or if it is fully mutable
<jackdaniel>
in other you do not have to, because it is data supplied by user. i.e (string #\a) should always return "a"
<phoe>
so it seems I have four distinct choices now
<_death>
jackdaniel: earlier I mentioned the possibility of having a compiler macro for STRING that expands to a literal if the character is known
<phoe>
2) STRING doesn't have to return fresh data, ANSI-TEST STRING.FOLD.1 is buggy
<phoe>
3) the spec is buggy, annotate the test with :ANSI-SPEC-PROBLEM :STRING-RESULT-FRESH
<phoe>
4) reconsider my life choices and start making music again instead of digging into lisp spec issues
Davd33 has quit [Remote host closed the connection]
<sjl_>
To me it's pretty clearly 2.
<_death>
I wouldn't expect to be able to modify the string returned by MACHINE-TYPE (if any), though the spec also doesn't say whether it's fresh or not
<jackdaniel>
it is not said that modifying string returned by (string foo) has undefined consequences; but I'm reiterating myself
<jackdaniel>
so I'll just quack that I've rested my case earlier today
<phoe>
_death: but that is the easiest way for your lisp image to go from 64 bits to 32 bits! just mutate "x86_64" into "x86_32" and you can load 32bit foreign libs just fine, trust me
<_death>
better subseq 0 3 and then you can do both
<_death>
why is there no (setf machine-type)
<phoe>
jackdaniel: ditto about machine-type or lisp-implementation-type though
LeifErikson has quit [Quit: rcirc on GNU Emacs 26.3]
LeifErikson has joined #lisp
Inline has quit [Remote host closed the connection]
<_death>
I'd expect z->j and then post on the Cloture thread :)
Lord_of_Life_ has joined #lisp
<phoe>
_death: I'll leave that to ruricolist
Lord_of_Life has quit [Ping timeout: 268 seconds]
pfdietz has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
EvW has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
Davd33 has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.6]
<phoe>
I'd say that it is an implementation detail whether STRING returns fresh strings or non-fresh strings
<phoe>
so much of a detail that the spec doesn't even mention it
brettgilio has quit [Ping timeout: 250 seconds]
<phoe>
so the test tests something that isn't a part of the spec or inferable from its wording
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ggole has quit [Quit: Leaving]
davepdotorg has quit [Remote host closed the connection]
failproofshark has joined #lisp
clothespin has quit [Ping timeout: 252 seconds]
trufas has joined #lisp
Dibejzer has joined #lisp
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 265 seconds]
EvW has quit [Ping timeout: 245 seconds]
hhdave has joined #lisp
hhdave has quit [Client Quit]
dmiles has quit [Ping timeout: 240 seconds]
clothespin has joined #lisp
cosimone has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
m00natic has quit [Remote host closed the connection]
slyrus has joined #lisp
slyrus__ has quit [Ping timeout: 265 seconds]
hortiel has joined #lisp
slyrus_ has joined #lisp
cosimone_ has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
cosimone has quit [Ping timeout: 245 seconds]
hortiel has left #lisp ["WeeChat 2.6"]
q9929t has quit [Quit: q9929t]
madand has joined #lisp
LiamH has joined #lisp
brown121408 has quit [Ping timeout: 268 seconds]
brown121408 has joined #lisp
cosimone_ is now known as cosimone
clothespin has quit [Ping timeout: 245 seconds]
ljavorsk has joined #lisp
Oddity has quit []
rippa has joined #lisp
Oddity has joined #lisp
McParen has joined #lisp
ljavorsk has quit [Ping timeout: 252 seconds]
brown121408 has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
zaquest has quit [Quit: Leaving]
<pfdietz>
Hmm. The criticism seems legitimate.
<pfdietz>
On the other hand, MAKE-STRING isn't specified to return a fresh string either.
nowhereman has joined #lisp
<phoe>
though it would be pretty insane to tell Lisp to make me a string and get a second-hand one that is already used in three other places
<phoe>
you can sue people who do exactly that
zaquest has joined #lisp
sauvin has quit [Ping timeout: 276 seconds]
pfdietz has quit [Remote host closed the connection]
Josh_2 has joined #lisp
<phoe>
after digesting all of the arguments I am absolutely tempted to make a PR saying that this is controversial enough for :ANSI-SPEC-PROBLEM
<phoe>
since I think that we can all agree on one thing - the spec has a problem here and should have been much clearer on that part
bitmapper has quit [Read error: Connection reset by peer]
bitmapper has joined #lisp
slyrus__ has joined #lisp
vlatkoB has quit [Remote host closed the connection]
slyrus_ has quit [Ping timeout: 240 seconds]
edgar-rft has joined #lisp
EvW has joined #lisp
kmeow has joined #lisp
cosimone has quit [Quit: Terminated!]
bitmapper has quit [Ping timeout: 268 seconds]
Oladon has joined #lisp
jonatack_ has joined #lisp
brettgilio has joined #lisp
jonatack has quit [Ping timeout: 265 seconds]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
clothespin has joined #lisp
makomo has joined #lisp
gravicappa has quit [Ping timeout: 268 seconds]
paul0 has joined #lisp
kmeow has quit [Remote host closed the connection]
Ven`` has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
karlosz has quit [Client Quit]
karlosz has joined #lisp
rpg has joined #lisp
dmiles has joined #lisp
<rpg>
Is there a library with streams for files opened through SSH?
vaporatorius has quit [Quit: Leaving]
<pjb>
phoe: agreed.
cosimone has joined #lisp
karlosz has quit [Quit: karlosz]
ebzzry_ has quit [Read error: Connection reset by peer]
ebzzry_ has joined #lisp
brettgilio has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
shka_ has quit [Ping timeout: 276 seconds]
karlosz has quit [Client Quit]
pfdietz has joined #lisp
<Xach>
rpg: i don't think there's anything out there like that for free lisps
<rpg>
Xach: Thanks. Seems like this will hamper use of CL for tasks that involve data analysis...
<pfdietz>
Every time I see those initials I think Gabriel.
<rpg>
pfdietz: That's why my slogan is "Not THAT rpg"
<Xach>
rpg: sure. if someone needs that to do data analysis and they want to use lisp, they will have to make it.
<Xach>
that is the way of most tasks with lisp. much must be made.
<Xach>
rpg: sometimes when i want something like that i fake it with run-program, e.g. (with-open-ssh-file (stream "user@host:path/blah") ...) it would just run scp and copy it to a local file, rather than try to do much fully in lisp.
<Xach>
then if i feel bad about that i can always change the implementation.
<phoe>
you could hack around it on linux using sshfs
<Xach>
phoe: there you go
grabarz has joined #lisp
<phoe>
since sshfs uses fuse you do not need superuser privileges to run it
<phoe>
so just call the proper sshfs commands in some sorta directory and then use logical pathname translations to refer to that temporary directory
<phoe>
if you are faint of heart you may disregard the latter part of my sentence
<phoe>
I am not brave enough to use logical pathnames myself
<Xach>
i don't think this is a situation that calls for logical pathnames.
<phoe>
well, if you did it in a temporary directory it would
<phoe>
since you wouldn't need to care for the tmpdir pathname
<Xach>
I disagree.
<Xach>
I think logical pathnames are for when you have an enumerable set of literal pathnames embedded in the code, not for arbitrary translations with runtime variations
<phoe>
I wonder why you can't use the other though
<Xach>
The other what?
<phoe>
is *default-pathname-defaults* enough?
<phoe>
the other case
<phoe>
for arbitrary translations with runtime variations
<Xach>
one reason is that the incoming syntax pretty limited
<Xach>
It doesn't survive the trip through translations for arbitrary runtime values
<White_Flame>
IMO, this is something the OS really should handle. The fact that all networking is bound to just a plain host:port is a massive weakness
<Xach>
I think it's a bummer that people start with the idea of arbitrary, configurable runtime pathname transformation and get Very Upset when logical pathnames don't do that, but I don't think that's fully the fault of logical pathnames
<Xach>
Like we say here in texas, you can't get mad at a tree for leaving
<rpg>
phoe: sshfs sounds neat. I'm with Xach though about logical pathnames -- I think there's too much danger that the filenames would break the LP rules, turning that into a mess.
<White_Flame>
I use sshfs all the time. It's quite simple
<jasom>
okay. Will do. I'm going to go back through the mailing list and some reddit posts because things that have been obvious to me for years w.r.t. asdf seem to still be hangups for others.
<jasom>
The number of times I've seen some variation of "I wish I could just load an ASD file and then have my system be loadable" come up is rather stunning since the manual is pretty clear on not just "yes that will work but "We even hook into slime's C-c C-k so that you don't need to do anything special if you're using slime"
<jasom>
life is finally slowing down enough for me that I can possibly contribute to projects in places I've noticed I might be of assistence
Davd33 has quit [Remote host closed the connection]
longshi has quit [Ping timeout: 250 seconds]
madage has quit [Remote host closed the connection]
madage has joined #lisp
scymtym has joined #lisp
amerigo has joined #lisp
akoana has joined #lisp
amerlyq has quit [Quit: amerlyq]
<rpg>
jasom: I have to take off momentarily, but feel free to contact me if you need assistance -- TeXinfo isn't the easiest thing to edit! (but FWIW, it's a lot better than Python's Sphinx...)
<jasom>
If it weren't OT, I could spend so much time complaining about sphinx.
quazimodo has quit [Ping timeout: 240 seconds]
<rpg>
+1
quazimodo has joined #lisp
Jesin has quit [Quit: Leaving]
oni-on-ion has quit [Quit: Quit]
wiselord has quit [Read error: Connection reset by peer]