<White_Flame>
I would say that follows and is contained in the preceding "if"
<jackdaniel>
while #c(-10 0) indeed always collapses to -10, it is a different story for floats
<pjb>
Indeed.
libertyprime has quit [Ping timeout: 252 seconds]
<jackdaniel>
thanks for chipping in with your understanding/interpretations
nowhere_man has joined #lisp
varjag has joined #lisp
fivo has joined #lisp
SaganMan has joined #lisp
shifty has quit [Ping timeout: 244 seconds]
hjudt_ has quit [Ping timeout: 245 seconds]
shifty has joined #lisp
hjudt has joined #lisp
smasta has joined #lisp
Mon_Ouie has quit [Ping timeout: 245 seconds]
spal has quit [Ping timeout: 245 seconds]
xantoz has quit [Ping timeout: 245 seconds]
spal has joined #lisp
Mon_Ouie has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
angavrilov has joined #lisp
norserob has joined #lisp
scymtym has joined #lisp
luis has quit [Ping timeout: 245 seconds]
luis has joined #lisp
dale has quit [Quit: dale]
jxy_ has quit [Quit: leaving]
jxy has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
uint_ has joined #lisp
APic has quit [Ping timeout: 245 seconds]
uint has quit [Ping timeout: 245 seconds]
APic has joined #lisp
schweers has joined #lisp
smasta has joined #lisp
<schweers>
I have a question, which may be sbcl specific, or may have no meaningful answer. I have fasl files on disk. Is there a way to inspect which optimization qualities were used to build them?
smasta has quit [Ping timeout: 258 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
<pjb>
schweers: ask in #sbcl.
<pjb>
schweers: alternatively, recompile it with various optimization and compare the generated bianries.
<dim>
I guess you could also capture the optimization declaims/proclaims and have them available in the fasl, using defparameter or something?
schjetne has joined #lisp
<schjetne>
_death: had a good journey home from ELS?
<beach>
Hello schjetne.
<schjetne>
beach: hey, how are you?
<schjetne>
The same question to you, how was your journey home?
<beach>
Fine. We stopped one night in Rome to avoid connecting flights.
<beach>
Yours?
<schjetne>
I got an hour in Rome myself, as my flight out of Genoa was cancelled and had to reroute. But I did get home on the same day.
<beach>
Wow.
<beach>
Where was the flight supposed to go?
<beach>
The one that was canceled.
<schjetne>
Frankfurt
<beach>
I see.
esrse has joined #lisp
<schweers>
dim: I normally don’t need this information, it is just for debugging purposes after the fact. I want to know if I accidentally used the wrong settings.
<schweers>
by the way, how was ELS?
patrixl has quit [Quit: ERC (IRC client for Emacs 26.1)]
<beach>
Great as usual.
<splittist>
Having read (well, skimmed) the 'proceedings', I wonder if ELS could take a stand for abandoning double-column article format (especially with CL's appropriately-descriptive-identifier-style.
<beach>
splittist: That would make it more difficult to be associated with the ACM, I would think.
itruslove has joined #lisp
<splittist>
What a twisted web. And to think some academics give advice on how society should be ordered... (:
moei has joined #lisp
interruptinuse has left #lisp [#lisp]
<splittist>
They could pretend they were writing for the Journal of Computing and Cultural Heritage (not too far from the truth); the ACM allows a single column format for that...
<pjb>
schweers: note that this requires that you reset *gensym-counter* when you compiled the file! ccl seem to have reproducible builds, but I don't know if that's the case with sbcl (often compiler added a time-stamp…)
atgreen has joined #lisp
<schweers>
uhhh ... did you just write that for me? Or did you have this lying around anyway?
<pjb>
the former.
<schweers>
wow, thanks!
<pjb>
Does it work with sbcl?
<schweers>
not sure, I have not tried it yet. I’m still reading it.
m00natic has joined #lisp
<schweers>
If sbcl does not have reproducable builds, this will not work, correct?
heisig has joined #lisp
<jackdaniel>
reproducible builds are a nice quality but it is not incorrect to have them not being reproducible
<makomo>
another interview with a famous lisp name
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 245 seconds]
<schweers>
pjb: I’ve successfuly loaded your code into a fresh image. I’m not sure about your example usage. why do you do this? (load (compile-file "~/o"))
selwyn has joined #lisp
norserob has quit [Ping timeout: 268 seconds]
schweers has quit [Read error: Connection reset by peer]
vms14 has joined #lisp
selwyn has quit [Remote host closed the connection]
schweers has joined #lisp
libertyprime has joined #lisp
esrse has quit [Ping timeout: 268 seconds]
sr5h has quit [Remote host closed the connection]
nwoob has joined #lisp
schweers has quit [Read error: Connection reset by peer]
nwoob has quit [Ping timeout: 255 seconds]
norserob has joined #lisp
zooey has quit [Ping timeout: 256 seconds]
nwoob has joined #lisp
nowhereman has quit [Ping timeout: 246 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #lisp
schjetne has quit [Quit: No Ping reply in 180 seconds.]
norserob has quit [Remote host closed the connection]
refpga has joined #lisp
slyrus1 has joined #lisp
hhdave has joined #lisp
<refpga>
Hi, is cl-graph appropriate for creating an N-ary tree? Are there any better alternatives?
<pjb>
minion: memo for schweers: I put the code in ~/o.lisp; (load (compile-file "~/o")) is to load it; the following form is to try it on ~/o.dx64fsl or whatever fasl file it is.
<minion>
Remembered. I'll tell schweers when he/she/it next speaks.
mindthelion has quit [Ping timeout: 252 seconds]
wigust- has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
wigust has quit [Ping timeout: 268 seconds]
slyrus1 has quit [Remote host closed the connection]
smasta has joined #lisp
atgreen has quit [Ping timeout: 250 seconds]
<fivo>
Why does READ continue to return nil if I run (setf *read-suppress* T) (setf *read-suppress* nil)?
Josh_2 has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
atgreen has joined #lisp
<Xach>
fivo: how do you call READ?
<fivo>
Xach: (read-from-string program)
<Xach>
fivo: what does program look like?
smasta has quit [Ping timeout: 245 seconds]
Achylles has joined #lisp
<Xach>
oh, I get it.
<Xach>
fivo: setting *read-suppress* to t in the repl will wreck your session
<Xach>
(unless some other mechanism fixes it for you)
<fivo>
(defparameter program "(1 #|comment|# ;;test
<fivo>
\"string\")")
<fivo>
ok, doesn't say anything about this on clhs
<Xach>
> If the value of *read-suppress* is true, read, read-preserving-whitespace, read-delimited-list, and read-from-string all return a primary value of nil when they complete successfully
<Xach>
fivo: after that, the R in REPL returns NIL all the time, so the E can't do any more meaningful work.
<fivo>
ok I have to get used to that the stuff I modifying also concerns the REPL I am playing around with
<Xach>
yes
<Xach>
you are interacting with a living system
schjetne has joined #lisp
dddddd has joined #lisp
schweers has joined #lisp
<fivo>
Xach: so is it possible that EVAL and READ do their processing in a different image?
<fivo>
sort of sandboxing
<fivo>
so I don't clutter my own image and for security
<fivo>
hope that makes any sense
<Xach>
fivo: I think that risk is the price of interactive development
<Xach>
fivo: the bare SBCL repl (but not slime) will catch some things and prevent you from making it unusable
<Xach>
fivo: but not all things. and there may be ways to recover even if you get things somewhat wedged.
scymtym has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
<pjb>
fivo: hence the use of local bindings! (let ((*read-suppress* t)) (read-from-string text))
<pjb>
Or shall we say "temporary bindings" in the case of dynamic bindings…
<Xach>
for example, you can enter the debugger with C-c C-c and use : to eval (mapcar (lambda (thread) (setf (sb-thread:symbol-value-in-thread '*read-suppress* thread) nil)) (sb-thread:list-all-threads))
<Xach>
if you use sbcl, that is.
igemnace has joined #lisp
<pjb>
Or if you left *read-eval* t, you can use #.(setf *read-suppress* nil)
selwyn has joined #lisp
<selwyn>
hello all
nwoob has quit [Ping timeout: 264 seconds]
<selwyn>
is it practical or advisable to do image-based development using modern CL implementations? in particular I wonder whether anyone here does this
<selwyn>
my main fear is borking the image due to some incorrect CFFI call but perhaps there are other drawbacks to the approach
<jackdaniel>
since your program evolves as you go (i.e you may modify function and compile function which got inlined somewhere), it may be hard to reproduce problems
orivej has joined #lisp
<jackdaniel>
or you may use some macro to compile function you use later, then change this macro definition - then your function can't be recompiled, so your program state is not reproducible
<jackdaniel>
stuff like that
smasta has joined #lisp
<beach>
selwyn: I wouldn't risk it.
SaganMan has quit [Quit: WeeChat 1.6]
atgreen has joined #lisp
Achylles has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 244 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
amerlyq has joined #lisp
nowhereman has joined #lisp
pjb has quit [Read error: Connection reset by peer]
pjb has joined #lisp
schweers has quit [Remote host closed the connection]
scymtym has quit [Remote host closed the connection]
<pjb>
selwyn: the main problem is that we are using posix system that are file based, and we want to keep the sources in files. So all the modifications made in the image have to be saved to files. (and then, commited to git).
<pjb>
selwyn: however, there's a cl git library. Perhaps you could use to access to the git repositories directly from the lisp image, and pull and push without going thru the posix file system.
<pjb>
selwyn: some CL implementations let you save an image without killing lisp. In the others, you can usually fork(2) before saving the image, so you can keep working in the parent.
<pjb>
selwyn: saving the image often will let you fall back to the last snapshot in case of borking.
Zaab1t has joined #lisp
nwoob has joined #lisp
shifty has quit [Remote host closed the connection]
milanj has joined #lisp
atgreen has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
<pjb>
selwyn: using image based development usually has the drawback of non-reproductibility. Since we keep mutating the image, we can make it evolve in ways that are not available to batch compiling and loading of systems (eg. thru asdf). Nowadays, being able to reproduce identical build has become an important feature, to ensure the security and validation of binaries.
<pjb>
But if we worked on image based development tools, I'm sure these problem could be solved.
<pjb>
perhaps even elegantly.
<schweers>
I like that we can have both in lisp: build procedures suitable for batch runs, but also load them into an image to work on them interactively. I don’t see a reason to abandon any one of those qualities.
<minion>
schweers, memo from pjb: I put the code in ~/o.lisp; (load (compile-file "~/o")) is to load it; the following form is to try it on ~/o.dx64fsl or whatever fasl file it is.
<pjb>
selwyn: also, note that an implementation like ecl doesn't work with lisp images.
<schweers>
ah, right. pjb: when I tried your code, it just compiled for ages (seems that emacs didn’t like the excessive output), and didn’t print or return anything meaningful :(
<pjb>
selwyn: or more precisely, ecl doesn't save lisp images. A new lisp image is built each time you initialize ecl (cl_boot).
<pjb>
schweers: be careful not to put recursive load or compile calls in sources. They were in comments.
<schweers>
It finishes eventually. It just took a long time
<Josh_2>
Literal worse time for a game jam xD for me my deadlines are the end of this month and the start of next
<vms14>
I'm too noob to do something yet
<Josh_2>
me 3
<Josh_2>
I wll make pong
<vms14>
I'll make the snake XD
smasta has quit [Ping timeout: 240 seconds]
<Josh_2>
I will submit my game of life that is in sly repl xD
<pjb>
vms14: higher concentration of lisp gamers in #lispgames.
<vms14>
pjb: I'm in
<vms14>
this is where I saw it
<vms14>
but wanted to name it here so maybe some lispers want to join
gxt has joined #lisp
Bike has joined #lisp
refpga has quit [Read error: Connection reset by peer]
<selwyn>
thanks for the replies everyone. did image-based development used to be more popular than it is now?
quipa has joined #lisp
jmercouris has joined #lisp
<jmercouris>
let's say I have an initform bound to some *global-var* in a slot
<jmercouris>
when I change *global-var*, will that slot value also change?
gxt has quit [Ping timeout: 264 seconds]
<jmercouris>
or only for newly created objects?
<beach>
I don't know what you mean by "bound to" here.
<beach>
Do you mean that you have :initform *global-var* in the slot specification?
<jmercouris>
Yes, that's what I mean
<jackdaniel>
it wont
<beach>
The slot value will not change after the class has been instantiated.
<jmercouris>
Ok
<makomo>
jmercouris: the initform is just that, a form ("expression") used to initialize the slot
<jmercouris>
I see, so it is evaluated and the value set to the result of that expression
quipa has quit [Remote host closed the connection]
<jmercouris>
so I can't establish a binding in the way I am thinking
<jmercouris>
okay, no problem
<jackdaniel>
if you wanted otherwise it woudln't have virtually any sense to have a slot
<jmercouris>
that is the better behavior anyway, thank you
<makomo>
yeah, the word "binding" doesn't make much sense in this context
<jackdaniel>
putting *global-var* instead of (slot-value …) is enough
<jmercouris>
yes, my apologies binding did confuse things a bit
<jackdaniel>
or, if you really want to mimic a reader: what you really want is (defmethod name (object) *global-var*)
<jmercouris>
I'm doing a lot of objective-c lately and the two things are messing with my mind
<jackdaniel>
or, if you want to do something silly don't initialize the slot and define slot-unbound method which returns *global-var*
<jmercouris>
Nope, won't do that, already have a solution in mind that doesn't commit war crimes :D
orivej has joined #lisp
parjanya has joined #lisp
igemnace_ has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life has joined #lisp
wxie has joined #lisp
<pjb>
selwyn: definitely.
patlv has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<pjb>
For example, the Patchwork application was developped in mcl on Macintosh this way. I had a lot of work to unravel the dependencies to be able to write an asd file to compile it separately.
<pjb>
Interlisp was entirely image based.
<pjb>
Smalltalk systems are still heavily image based in general (gst is an exception). Smalltalk includes methods to save the code to files…
schweers has quit [Ping timeout: 268 seconds]
libertyprime has quit [Ping timeout: 246 seconds]
q9929t has joined #lisp
<pjb>
selwyn: so it was common to see in lisp applications both a repl and a command to save a new version of the application (a new image).
<fivo>
Xach + pjb: Is there also a way to locally load a project?
smasta has joined #lisp
<dlowe>
fivo: there's a directory in quicklisp/local-projects
<dlowe>
There's no sub-environment that you can load a project into
<fivo>
will only work if I have alexandria quickloaded
q9929t has quit [Client Quit]
<pjb>
fivo: you can use fork and exec. It's not standard, but you can get them by FFI (or thru a sb-posix or posix package). or you can just use uiop:run-program.
<fivo>
is it possible to somehow possible to wrap that in let binding
<pjb>
fivo: eventually, sicl will provide environments allowing us to implement this kind of feature.
<dlowe>
actually, I'm sorry, but I don't know what you're asking
<pjb>
dlowe: yes, you know.
<dlowe>
you want some kind of intermediate step between unread and read into the global environment?
<dlowe>
even that would only work if alexandria were also loaded into the sub-environment
<pjb>
But notice that to implement in-separate-environment, if we use a system with separate address spaces, then we will have to serialize the result and read it in the current image.
<dlowe>
and it sounds like he wants to skip that step?
<pjb>
So you're back to the beginning!
<pjb>
If you use fork/exec, you may also use mmap, and copy the data thru memory, but you still need a serialization (you may use com.informatimago.common-lisp.heap.heap).
smasta has quit [Ping timeout: 250 seconds]
<pjb>
Using external data always involves a validation step.
<pjb>
even internally, you would still keep internal API, and perform validation there.
<fivo>
I the end, I want to process lots of lisp files with READ and don't want to quickload all the libraries involved.
<pjb>
You cannot use CL:READ, but you may use com.informatimago.common-lisp.lisp-reader.reader which let you hook your own tokenizer.
<pjb>
The problem you have is that CL:READTABLE doesn't have a PARSE-TOKEN slot.
<pjb>
Mine is not under active development, it's finished.
<selwyn>
pjb: i see. it seems very difficult to me to create image-based tools that scale to larger numbers of users. imagine two users make independent changes to parts of a lisp image. how could one do 'git merge' on images? and worse, how to resolve conflicts?
<pjb>
selwyn: you wouldn't do it at the image level. You would keep a file system inside the image. You would edit the sources inside the image, and use git to commit and push the modifications.
<pjb>
selwyn: a lisp image is actually an operating system.
<fivo>
But you are saying I only have the options FFI and uiop:run-program if I don't want to keep all the libraries in my image?
<pjb>
selwyn: it's not finished; it could be completed rapidly, using gray streams (which I didn't want to use at the time).
lucasb has joined #lisp
<pjb>
sorry for the misdirection.
<Xach>
fivo: i use run-program when I want to do that.
<grewal>
fivo: I don't understand what you're trying to do. If you want to use the libraries, you'll have to have them loaded
<Xach>
fivo: mainly because it is difficult in some cases to process project source code without loading the project
<Xach>
fivo: and because projects can't all be loaded together due to conflicts
<pjb>
grewal: i think he wants to read sources without loading the dependencies. For this, you need to parse foo:bar without interning bar into a package foo.
<pjb>
So you need a hook in the reader to return an object of your own class when you read foo:bar.
<Xach>
i run sbcl as a child process and instruct it to load a project, then load my analysis code, which saves its results somewhere.
<pjb>
(or just bar, in foo package that doesn't exist).
<grewal>
That makes sense.
<fivo>
Xach: so there is no such mechanisnm as ql:unload :alexandria
<Xach>
fivo: no.
<pjb>
In any case, it's limited, because reading lisp sources requires evaluating arbitrary lisp expressions (reader macros, macros, etc).
<pjb>
So it's better to fork a separate environment.
<Xach>
fivo: it would be interesting to try to make one, but nobody has done so yet
<pjb>
Depending on what you want to do..
<dlowe>
it's theoretically not possible to robustly process source code without loading its dependencies because of evaluation during read-time
<dlowe>
even though it may be practical in limited instances
selwyn has quit [Remote host closed the connection]
warweasle has joined #lisp
selwyn has joined #lisp
lavaflow has quit [Ping timeout: 250 seconds]
<fivo>
I am actually wondering if READ is the right tool here.
<fivo>
I wanted to use Eclector because it gives me source file information.
<fivo>
but I am not actually interested in symbol information
<fivo>
I just want to know that we are using symbol flatten from package alexandria
<fivo>
at position 1 on line 1
<beach>
fivo: That is symbol information, isn't it?
<fivo>
ok I admit my knowledge of READ is too limited
<selwyn>
it is in any case not all of the information contained in a common lisp symbol, besides home package, symbol-function and so on
<fivo>
in case :alexandria is not loaded the above fails
<selwyn>
fivo: you mean to say you only care about the name of the symbol?
<fivo>
yes kind of
<fivo>
selwyn: yes
<selwyn>
i feel that this approach will run into problems, because common lisp symbols are more than just names. for a start, 'flatten' is not necessarily 'from' alexandria, what matters is that it is exported from alexandria
atgreen has joined #lisp
<fivo>
Ok let me just explain the whole thing, I think that makes everything easier.
<beach>
fivo: What will you do if someone imported the symbol FLATTEN from the package ALEXANDRIA and just wrote (flatten ...)?
<selwyn>
it's quite possible that a package selwyn will export a symbol selwyn:flatten which is actually the same symbol as alexandria:flatten
<Xach>
fivo: more context might be helpful
<fivo>
Let's say I want to process a common lisp project from github
<selwyn>
in which case, only taking the names of the symbols into account would not correctly tell whether the symbols were different or not
<fivo>
whenever somebody writes (flatten ...) and has uses :alexandria I want to get the information
<selwyn>
ok
<fivo>
codeline, column, package name, symbol name
<beach>
fivo: That's some pretty sophisticated information to derive without loading the systems.
<fivo>
I agree
<fivo>
that's why I ask if I could load them temporarily
<pjb>
This is something that has already been done with my reader. Unfortunately, I don't remember who did it.
<fivo>
so alexandria is in quicklisp so that is probably easier then the case where the package is no
<fivo>
*not
heisig has quit [Quit: Leaving]
<selwyn>
one would have to deal with unloading dependencies of a given quicklisp system in a sensible way that doesn't break the image
<Xach>
fivo: that is an interesting project, and my experience on similar (but not the same) things in the past has led me to the approach i described above: start a subprocess, do some work, dump the data, repeat.
<selwyn>
fivo: if i understand your problem correctly, i would do something along the lines of Xach's approach, to run sbcl as a child process, load the project and collect the results
<Xach>
fortunately in sbcl you can work with subprocesses as objects in a fairly nice way
aindilis has quit [Read error: Connection reset by peer]
<fivo>
ok thanks for the help
<selwyn>
this is roughly what i do to test if libraries work in clasp. i wouldn't want to worry about whether things are properly unloaded (even if i could unload libraries) i would rather have the peace of mind of knowing a library loads into a fresh lisp image
<pjb>
the parse-token function takes a token (cons string attributes), and produces (values t object) or (values :eof) or (values nil (list of objects)).
lvo has quit [Remote host closed the connection]
igemnace_ is now known as igemnace
sjl_ has joined #lisp
sjl_ has quit [Client Quit]
sjl_ has joined #lisp
wxie has quit [Ping timeout: 250 seconds]
refpga has joined #lisp
dale has quit [Quit: dale]
milanj has joined #lisp
aindilis has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
jprajzne has quit [Quit: Leaving.]
smasta has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
<Xach>
I think it would be *great* to have reliable clean unloading of projects! I just don't see how that destination could be reached.
smasta has joined #lisp
<jackdaniel>
Xach: in principle ECL could unload fasls which are .so objects underneath. that said devil would probably be in details
<jackdaniel>
I think lispworks have unload-module too, but I may be wrong about that
<Bike>
side effects from them would still remain though, right? you'd have to restrict what code you can have in libraries.
<jackdaniel>
yes. also there are gotchas like: module defines a class, you create an instance of this class
<jackdaniel>
after unloading module class must stay in runtime
smasta has quit [Ping timeout: 246 seconds]
<jackdaniel>
(even if detached from the package which no longer exists)
<jmercouris>
so what would we have then (ql:quickunload :asdf), and then what? :D
pfdietz has quit [Ping timeout: 256 seconds]
<jackdaniel>
(or signal errors that library is still referenced by reachable objects)
dvdmuckle has quit [Quit: Bouncer Surgery]
<dlowe>
if you had a dependency graph, you could require that all dependant modules be unloaded
<dlowe>
so the class couldn't stay in the runtime
dvdmuckle has joined #lisp
<Xach>
Transaction rollback
<Xach>
I am worried about the thinking traps of "that would be hard to do in Common Lisp so it must not be worthwhile" or "if it were worthwhile to do someone would have done it already"
<dlowe>
A true rollback could look like moving all objects into the permanent heap and then saving the top of the permanent heap.
<dlowe>
doesn't solve external side-effects, though
<Bike>
maybe you could just have unloading (assuming no major side effects not covered by def-whatever) mean everything becomes collectable normally, so basically just deleting the packages
<Bike>
and any part of the system that keeps classes and stuff around
<beach>
I think first-class global environments would be a solution, but we have not packaged them up in a way that they can be used by any implementation or any applications.
q3d has joined #lisp
<shka__>
is it possible to even package those in such way?
lumm has joined #lisp
<dlowe>
beach: I was thinking about that, but to get data out of them may involve pulling a lot of other things
<dlowe>
and then you're back trying to manage a dependency tree
<beach>
Sure.
<dlowe>
conceptually, how does one get data out of a first-class global environment?
<dlowe>
is there a share variable or just a funcall return value?
<dlowe>
I guess you could query the environment object too
<beach>
There is an entire protocol for managing an environment.
<Bike>
most of the basic stuff is like CL functions though. like fdefinition or find-class
rippa has joined #lisp
nowhereman has quit [Ping timeout: 245 seconds]
pfdietz has joined #lisp
anunnaki has joined #lisp
Achylles has joined #lisp
<pjb>
Unloading systems could be achieved if loading systems didn't mutate the global state other than creating new packages.
<pjb>
and otherwise, undoable mutations. (eg. adding a system object to a list of loaded systems).
anunnaki is now known as vertigo
<pjb>
it shall be idempotent and independent of other system loads.
shifty has quit [Ping timeout: 255 seconds]
<selwyn>
some common lisp implementations are designed with speed in mind, others with a view to extensions to FFIs in languages like java or c++
aindilis has quit [Read error: Connection reset by peer]
<selwyn>
my question is: has anyone attempted to produce a common lisp implementation which has the aim of being as ansi-compliant as possible as the primary aim above all others
<selwyn>
(this is not meant as a comment on ansi-compliance of CL implementations around today)
edgar-rft has quit [Quit: Leaving]
orivej has quit [Ping timeout: 255 seconds]
smasta has joined #lisp
xkapastel has joined #lisp
Arcaelyx has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
<beach>
selwyn: Why this question?
smasta has quit [Ping timeout: 255 seconds]
Inline has joined #lisp
anewuser has joined #lisp
<pjb>
selwyn: not really.
rumbler31 has joined #lisp
<pjb>
selwyn: however, all implementations strive to be as compliant as humanely feasible.
<selwyn>
beach: i ask because i thought that such an implementation would be of great utility to those who value correct program behaviour higher than execution speed
Guest21777 has joined #lisp
<jackdaniel>
I believe all implementations put correctness above execution speed
<jackdaniel>
otherwise expt would be defined (defun expt (x y) 42), incorrect but insanely fast
<jackdaniel>
even for big y
Guest21777 is now known as kayront
<selwyn>
yeah after i ask i realise that a speed improvement that breaks compliance would probably not be very wise, useful or popular
<pfdietz>
What you may be asking for is an implementation that strongly rejects programs that have behaviors that aren't specified or defined by the standard. But this would mean you couldn't use pathnames (for example), as they are poorly specified.
<sjl_>
It could be nice to have a CL implementation that took as many liberties as possible while still adhering to the standard, e.g. where (/= (char-code #\b) (1+ (char-code #\a))
<sjl_>
Such a HellCL could be useful to run your unit tests, to see if you're relying on anything not-standard-but-happens-to-work-in-most-implementations
aindilis has joined #lisp
<sjl_>
But it'd be a lot of work to make.
<Xach>
sjl_: I was thinking about the opposite, codifying common practices like that in a test suite or something.
Achylles has quit [Ping timeout: 258 seconds]
<sjl_>
I'm not sure what you mean...
<Xach>
sjl_: i mean stuff like unicode code points for char-code/code-char, (unsigned-byte 8) arrays reading and writing as you'd expect
* Xach
tries to think of more
anewuser has quit [Ping timeout: 246 seconds]
Zaab1t has joined #lisp
AdmiralBumbleBee has quit [Ping timeout: 250 seconds]
eddof13 has joined #lisp
anewuser has joined #lisp
eddof13 has quit [Client Quit]
<sjl_>
Oh, so you could run the suite in a new implementation and get advance warning of pitfalls to watch out for?
<sjl_>
Yeah, that would be useful too. And way less work than making a full implementation of CL.
smasta has joined #lisp
<sjl_>
predicates returning random stuff other than t for true cases would be another fun one.
<Bike>
how common is it to actually rely on a predicate returning T, though?
smasta has quit [Ping timeout: 245 seconds]
<p_l>
sjl_: your char-code example would be a valid issue on certain OSes
<p_l>
sjl_: actually, ECL compiled with certain options on one of them *should* fail (= (char-code #
<p_l>
(= (char-code #\b) (1+ (char-code #\a))
<sjl_>
Bike: hopefully not very
<Josh_2>
are predicates meant to return either nil or t?
<sjl_>
but I'm sure there something like (position t (mapcar #'stringp '(a b "c"))) out there in the wild somewhere
<Josh_2>
if it returns a non-nil value isn't that effectively the same
<sjl_>
Josh_2: they return a "generalized boolean", which is either NIL (false) or anything-thats-not-NIL (true)
<Josh_2>
okay, so doesn't have to be t
<sjl_>
right
<Josh_2>
had me worried for a second xD
<sjl_>
e.g. digit-char-p returns an integer or nil
AdmiralBumbleBee has joined #lisp
nowhereman has joined #lisp
<p_l>
at the very least all standard library functions that want predicates accept a generalized boolean
anewuser has quit [Quit: anewuser]
t58 has joined #lisp
<sjl_>
(when (eql (stringp a) (stringp b)) (print "a and b are both strings, or both not strings"))
<sjl_>
is wrong
<sjl_>
since (stringp a) might return :yes and (stringp b) might return :definitely
<Bike>
i don't think i've ever seen that... i mean, i can imagine it
<sjl_>
Yeah it's probably not common
akater has quit [Quit: WeeChat 2.3]
<sjl_>
or perhaps a slightly-less-arbitrary way to implement stringp with non-eql results: (defun stringp (o) (if (typep o 'string) o nil))
selwyn has quit [Remote host closed the connection]
rumbler31 has quit [Remote host closed the connection]
<Bike>
that one wouldn't surprise me
<sjl_>
maximum fun: (defun stringp (o) (if (typep o 'string) (copy-seq "NIL") NIL))
<sjl_>
good luck princ debugging that one
hhdave has quit [Ping timeout: 245 seconds]
xkapastel has quit [Quit: Updating details, brb]
xkapastel has joined #lisp
smasta has joined #lisp
m00natic has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 255 seconds]
lumm_ has joined #lisp
lumm has quit [Ping timeout: 258 seconds]
lumm_ is now known as lumm
gjvc has quit [Remote host closed the connection]
lavaflow has joined #lisp
karlosz has joined #lisp
nanoz has joined #lisp
vms14 has quit [Quit: WeeChat 2.3]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 250 seconds]
hiroaki has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
fivo has quit [Quit: WeeChat 1.9.1]
smasta has joined #lisp
edgar-rft has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
amerlyq has quit [Ping timeout: 250 seconds]
kajo has joined #lisp
amerlyq has joined #lisp
karlosz has quit [Quit: karlosz]
zotan has quit [Ping timeout: 264 seconds]
zotan has joined #lisp
Josh_2 has quit [Ping timeout: 246 seconds]
bmansurov has left #lisp ["Later"]
Jesin has quit [Quit: Leaving]
Achylles has joined #lisp
sauvin has quit [Ping timeout: 246 seconds]
klltkr has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
milanj has quit [Quit: This computer has gone to sleep]
Jesin has joined #lisp
<aeth>
I seem to rely on booleans (rather than generalized booleans) in two cases: (1) I'm storing something so the general boolean value would just be unwanted noise, e.g. something with :type boolean in e.g. a struct; or (2) I need to make a distinction past just having true/false, so e.g. keywords and t and nil all have some meaning in the API.
<aeth>
(for the second one, consider an API where t is default, nil disables it, and the keywords are niche alternate behaviors)
<aeth>
Neither are the return values, though. They're input values. And that's in the standard, too, e.g. with FORMAT. Generalized booleans are too useful in return values because you never know if the caller wants to use the extra information or not and that saves an extra return value.
smasta has joined #lisp
tharugrim has joined #lisp
trafaret1 has joined #lisp
<aeth>
Similarly, I also always return nil (or, more rarely, t) even if the function is only used for its side effects. Some do (values) but that might break code that uses certain multiple-value functions/macros (and everywhere else it just inserts a NIL return value)
<Bike>
i mean it will break them if they don't treat no values correctly
<aeth>
Bike: Well, I mean, you could be using multiple-value-call to call a function that has the mistaken assumption that every function returns at least one value, which isn't true for those extremely rare functions that end in (values)
smasta has quit [Ping timeout: 244 seconds]
<aeth>
so something like (lambda (first &rest rest) ...)
<aeth>
It sounds like it would never happen, but that's exactly the sort of thing that if it did happen someone will lose a day or two on it because no one thinks it would happen
<Bike>
if they don't treat no values correctly, yes
<pjb>
aeth: also, it's good to use T/NIL instead of generalized boolean to give the garbage collector an opportunity to do some work.
<aeth>
pjb: Which means that it's "perfectly safe" (in a reasonable implementation) to return a fixnum or single-float or other, similar things that (probably) aren't boxed.
<aeth>
pjb: If you're talking about storing, then, yes, definitely, t/nil helps with the GC always. You don't want to accidentally refer to some hash-table of 40,000 elements that could have been collected hours ago if you didn't store a reference to it instead of t
keep_learning has quit [Ping timeout: 268 seconds]
nanoz has quit [Ping timeout: 246 seconds]
vlatkoB has quit [Remote host closed the connection]
xantoz has joined #lisp
gravicappa has quit [Ping timeout: 246 seconds]
Essadon has joined #lisp
patlv has quit [Ping timeout: 250 seconds]
Essadon has quit [Max SendQ exceeded]
q3d has joined #lisp
trafaret1 has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
patlv has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
wilfredh has quit [Quit: Connection closed for inactivity]
lucasb has quit [Quit: Connection closed for inactivity]
<pjb>
This is a big extension…
smasta has quit [Ping timeout: 245 seconds]
<pjb>
Oops. Nope.
<Bike>
well, clhs says make-condition's first argument is a subtype of condition, so i guess it could be understood as standard
<pjb>
Bike: it looks like it's conforming! type---a type specifier (for a subtype of condition).
<Bike>
it is weird as hell, though
<pjb>
in make-condition.
terpri has quit [Remote host closed the connection]
<Bike>
technically ERROR and so on only accept symbols
<Bike>
anyway i was just wondering if anyone has ever actually used this
scymtym has quit [Ping timeout: 240 seconds]
<pjb>
it's a subtype of condition in all implementations!
<Bike>
no, i mean the function ERROR takes a condition designator, and a condition designator is either a symbol or a format control or a condition.
<pjb>
Bike: error takes a condition n. 1. an object which represents a situation---usually, but not necessarily, during signaling. 2. an object of type condition.
<Bike>
oh, my god.
<pjb>
I mean, a designator for a condition.
<Bike>
yes and the designators are clearly defined in 9.1.2.1 and specify a symbol, not any subtype. okay? okay. so does anyone actually use this thing.
patlv has joined #lisp
<pjb>
This is a great find! I've been definining conditions just to mix simple-condition with my errors!!!
<Bike>
well if you did (make-condition '(and my-error simple-condition) ...) that could still just be an empty type.
<aeth>
does this only work on ECL?
<Bike>
it's also in clasp, which is why i'm asking. dunno about others but i sorta doubt it. i'll check sbcl.
<Bike>
doesn't look like sbcl does it.
<pjb>
Bike: you're right about 9.1.2.1, but ERROR is specified to accept and OR type specifier, and MAKE-CONDITION is explicitely designed to accept it.
<pjb>
Therefore…
<pjb>
and yes, not not or.
<Bike>
error is not specified to accept a type specifier.
<aeth>
Tangentially related, but I'd say the weakest part of the standard is conditions. Didn't someone here write their own destructuring-bind just to get a consistent cross-implementation condition there?
<pjb>
abcl, ccl and sbcl fail on (make-condition (quote (or type-error simple-condition)))
<pjb>
but ecl and clisp return an instance.
rumbler31 has joined #lisp
<Bike>
am i not going to get an answer here
<pjb>
Bike: error is specified to take a designator to a condition (glossary) with a very large definition.
<aeth>
Bike: maybe beach knows
<aeth>
Bike: normally I'd also say maybe Bike knows, but...
eddof13 has joined #lisp
orivej has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
eddof13 has quit [Quit: eddof13]
eddof13 has joined #lisp
vhost- has quit [Remote host closed the connection]
vhost- has joined #lisp
atgreen has quit [Ping timeout: 244 seconds]
themsay has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
smasta has joined #lisp
lucasb has joined #lisp
tharugrim has quit [Quit: WeeChat 2.4]
milanj has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
mindthelion has joined #lisp
themsay has joined #lisp
q3d has quit [Quit: Page closed]
smasta has quit [Ping timeout: 250 seconds]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #lisp
cset has joined #lisp
libertyprime has joined #lisp
nirved has quit [Killed (adams.freenode.net (Nickname regained by services))]
bexx has joined #lisp
nirved has joined #lisp
smasta has joined #lisp
karlosz has joined #lisp
angavrilov has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 255 seconds]
smasta has joined #lisp
amerlyq has quit [Quit: amerlyq]
shifty has joined #lisp
karlosz has quit [Quit: karlosz]
<t58>
Hey I'm using slime with emacs is there a shortcut to close all the open parens? I'm sure there was one like C-c C-q or something like that but I can't find any reference to it online.
Bike has quit []
eddof13 has quit [Quit: eddof13]
mindthelion has quit [Ping timeout: 240 seconds]
<LiamH>
If you use insert-parentheses, you always get your close paren with your open paren.
slyrus_ has joined #lisp
patrixl has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
slyrus__ has quit [Ping timeout: 264 seconds]
<White_Flame>
and paredit is highly recommended, nearly always keeping things balanced (except for cut'n'paste)
Essadon has joined #lisp
<White_Flame>
including doublequotes, moving parens out of comments, etc
jgodbou has joined #lisp
eddof13 has joined #lisp
<patrixl>
no paredit no life
lumm has quit [Remote host closed the connection]
<t58>
hmm paredit seems interesting I'll take a look thanks
terpri has joined #lisp
trocado has joined #lisp
techquila has joined #lisp
moei has quit [Quit: Leaving...]
Bike has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
wxie has joined #lisp
MightyJoe has quit [Ping timeout: 246 seconds]
cyraxjoe has joined #lisp
scymtym has joined #lisp
Essadon has quit [Quit: Qutting]
libertyprime has quit [Ping timeout: 245 seconds]
ltriant has joined #lisp
libertyprime has joined #lisp
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 246 seconds]
themsay has quit [Remote host closed the connection]
LiamH has quit [Quit: Leaving.]
caltelt_ has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]