jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
nij- has quit [Ping timeout: 260 seconds]
mathrick has joined #commonlisp
euouae has quit [Ping timeout: 252 seconds]
Inline_ has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
Inline__ has quit [Ping timeout: 248 seconds]
tevo has quit [Read error: Connection reset by peer]
waleee has joined #commonlisp
tevo has joined #commonlisp
notzmv has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #commonlisp
Inline__ has joined #commonlisp
Oladon has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Quit: Leaving]
morganw has quit [Remote host closed the connection]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
jeosol has joined #commonlisp
cyberbanjo has quit [Remote host closed the connection]
Josh_2 has quit [Ping timeout: 268 seconds]
nij- has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
cyberbanjo has joined #commonlisp
tasty_ has quit [Quit: rebooting for kernel updates]
waleee has quit [Ping timeout: 252 seconds]
causal has joined #commonlisp
causal has quit [Ping timeout: 252 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
causal has joined #commonlisp
waleee has joined #commonlisp
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
euouae has joined #commonlisp
tasty has joined #commonlisp
tasty has joined #commonlisp
waleee has quit [Ping timeout: 246 seconds]
notzmv has joined #commonlisp
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 248 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
pjb has quit [Remote host closed the connection]
euouae has quit [Ping timeout: 246 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
Inline_ has joined #commonlisp
jello_pudding has quit [Ping timeout: 246 seconds]
Inline__ has quit [Ping timeout: 248 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
Inline_ has joined #commonlisp
jello_pudding has joined #commonlisp
euouae has joined #commonlisp
<euouae> Hello, if I have a (defvar x 1), can I then do (import 'x :keyword)?
Inline__ has quit [Ping timeout: 248 seconds]
<euouae> Because then :x evaluates to 1, not itself
<White_Flame> that would be a conflict
<White_Flame> because the current package already has an X, and you're importing another one
Inline__ has joined #commonlisp
<euouae> I don't get a conflict when doing it
<White_Flame> oh wiat, you're tryin gto add X _into_ the keyword package?
<euouae> yeah
Inline_ has quit [Ping timeout: 252 seconds]
<White_Flame> cclhs 11.1.2.3.1
<White_Flame> clhs 11.1.2.3.1
<specbot> Interning a Symbol in the KEYWORD Package: http://www.lispworks.com/reference/HyperSpec/Body/11_abca.htm
<euouae> That's interning, what about importing?
<Nilby> it works, but seems like it can cause trouble and subverts many assumptions about keywords
<White_Flame> I don't think anything is specified about it
<White_Flame> in terms of special case
<White_Flame> but yeah, what Nilby said
<euouae> alright, thank you
<euouae> 11.11.2.3 mentions "Any individual symbol can be added to a package by use of import."
<Nilby> like (eq :foo :bar) => T , would really break your assumptions reading code
<euouae> right
Inline_ has joined #commonlisp
Oladon has quit [Quit: Leaving.]
Inline__ has quit [Ping timeout: 252 seconds]
EsoAlgo8 has joined #commonlisp
EsoAlgo has quit [Read error: Connection reset by peer]
EsoAlgo8 is now known as EsoAlgo
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 255 seconds]
cyberbanjo has quit [Remote host closed the connection]
<euouae> Is this macro correctly written? <https://plaster.tymoon.eu/view/3512> I just wrote it for fun, but I'm not sure if it's right. Aside from the _ symbol leaking
cyberbanjo has joined #commonlisp
<nij-> seems correct to me.
<nij-> (let ((x 4) (y 3) (z 2) (w 1)) (funcall (partial-application f x y _ z _ w _ _) 1 2 3 4)) ;; => 20
<euouae> nice
<beach> Since the IF special form returns a value, you can write COLLECT (IF (EQ X '_) (POP VARIABLES) X)
<nij-> euouae I also find macroexpansion handy.
<nij-> It expands to: #'(lambda (#:g397 #:g398 #:g399 #:g400) (f x y #:g397 z #:g398 w #:g399 #:g400))
<beach> euouae: Oh, and you should skip the #' in front of (LAMBDA ...)
<euouae> Why do you say so? I read some info on a google CL style page that it's a stylistic thing for a project
<beach> I am saying it because there is pretty much a consensus now that it should be dropped.
<beach> The macro LAMBDA exists so that you can drop the #'.
<euouae> sounds right
Inline_ has joined #commonlisp
nij- has quit [Ping timeout: 260 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
aartaka has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
euouae- has joined #commonlisp
Inline_ has quit [Ping timeout: 246 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 246 seconds]
aartaka has quit [Ping timeout: 252 seconds]
Inline__ has joined #commonlisp
aartaka has joined #commonlisp
Inline_ has quit [Ping timeout: 248 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
<euouae> on 11.1.2.3.2 it is said "it is generally not wise for a program to use a keyword[1] as a property indicator, since if there were ever another program that did the same thing, each would clobber the other's data."
<euouae> What is meant by that? Isn't a plist such as (:foo 1 :bar 2) pretty common?
Inline_ has quit [Ping timeout: 260 seconds]
euouae- has left #commonlisp [#commonlisp]
<beach> I think they are referring to the property lists of symbols.
<euouae> Hmm, I see
<euouae> okay, thank you
igemnace has joined #commonlisp
Inline_ has joined #commonlisp
<beach> But even those property lists do not represent a problem, provided the package system is used correctly.
<beach> I am accumulating evidence that the package system was underused when the standard was written.
Inline__ has quit [Ping timeout: 260 seconds]
<beach> The use of class names to prefix accessors is one practice that suggests this idea.
<euouae> I see
Inline_ has quit [Ping timeout: 260 seconds]
<beach> The paragraph in 11.1.2.3.2 seems to suggest that two different programs would use the property list of a symbol that is shared between those programs, and that's definitely not recommended.
<euouae> programs in what sense?
<euouae> running concurrently under the lisp image?
<beach> Two different applications or libraries.
<beach> Yes.
<White_Flame> and interactive programs might not be "running" full time, as the user calls functions from multiple things to execute behavior
<White_Flame> but their state would still trample if they shared symbol-plist storage etc
<White_Flame> lisp has a history as an OS or operating environment where the user did many things within the single running image
<euouae> Right, I've at least heard about that, symbolics
<White_Flame> even before then
<beach> It's the superior way of doing it. Unfortunately, current systems, and even previous ones like Genera, do not take into account the security problems that now exist.
<euouae> security wise there's been quite an evolution certainly
<euouae> are there any cool applications of types of CL? or can the subject be mostly ignored?
<beach> Er, what?
<beach> Types are omnipresent in Common Lisp.
<beach> Security has sort of evolved. But the solution most operating systems use is that of processes, which is like killing a fly with a sledgehammer.
<phoe> the condition system is a good example
<phoe> the class system is something good too, since classes kinda grew from types
rgherdt has joined #commonlisp
<phoe> the whole concept of array specialization is also fun to notice
<beach> Same for streams.
<euouae> suppose I have a made a type (square-matrix type size)
<euouae> How can it be used? (it's a 2D array of square size)
<beach> That's kind of asking the question the wrong way. It is better to state what problem you are trying to solve, and then perhaps see how defining a type might provide a solution.
<euouae> how can I give an object this type?
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
<beach> Objects are not "given" types in Common Lisp. An object "is" of one or more types.
<euouae> I see. So in a function, I could look up its type and match it to square-matrix with subtypep
<White_Flame> each object is an instance of a class. a type is a descriptor/predicate/range/etc which can overlap and a single type may match disparate classes
<White_Flame> the simplest type of type is just a class, though
<White_Flame> *class name
<euouae> to make use of a type, you'd use typep and subtypep right?
<White_Flame> yep
<aeth> and typecase and check-type
<euouae> ah I see
<aeth> I think that the closest thing to "giving" a type in the CL world would be COERCE, which converts from one type to another. But it won't work on many things. Mostly numbers and sequences.
<aeth> But everything already has a type (actually, at least one) to begin with
<White_Flame> everything already matches an infinite number of types ;)
<euouae> I've heard before that the CL type system isn't as powerful as ML etc. I'm trying to imagine why. I think part of it is because there's no function types apart from a single function type?
<White_Flame> since (or fixnum null) matches every fixnum, and keep adding as many irrelevant OR clauses ad infinitum
<aeth> Ignore T, (OR ...), (AND ...), (SATISFIES ...)
<aeth> the trivial stuff
<aeth> you'll still have, e.g. subtypes
<White_Flame> euouae: function types can specify types of parameters & return values
<White_Flame> but since lisp doesn't have a notion of 'list', just cons cells, there isn't a type representing a list of a particular type of element
<aeth> function types are still a weakness, though... I don't think you can CHECK-TYPE (or TYPECASE, or TYPEP, etc.) with them, for instance.
<White_Flame> and there aren't really parametric/templated types of the power that some other languages have
<aeth> even though you can declare function types for the compiler to take advantage of
Cymew has joined #commonlisp
<euouae> what is a function type declared like?
<phoe> (function types-for-lambda-list types-for-return-values)
<beach> euouae: Last time I looked, ML could not express the type "any integer except 0" that you might want to use in a division function.
<aeth> it's normally at the top level so it's normally DECLAIM and not DECLARE like in the example iirc
<aeth> but it's uncommon
<phoe> aeth: better link, http://clhs.lisp.se/Body/t_fn.htm
<euouae> beach, I think you mean that CL can. But can CL express positive only integers?
<beach> Of course.
<phoe> euouae: (integer 1)
<euouae> What about the type of primes? :P
<phoe> (satisfies primep)
<White_Flame> there's always SATISFIES types
<beach> phoe: You beat me to it.
<phoe> the fastest typewriter in the west
<phoe> (that's a nice accidental pun, I enjoy it)
<beach> Heh!
<aeth> any integer except 0 is (or (integer * -1) (integer 1 *)) or alternatively (not (integer 0 0))
<aeth> SATISFIES types aren't really something the compiler can take advantage of afaik
<White_Flame> (and integer (not (integer 0 0)))
<aeth> oh, sorry
<beach> (and integer (not (eql 0)))
<aeth> so it's (or (integer * -1) (integer 1 *)) OR (not (integer 0 0)) OR (and integer (not (eql 0)))
<aeth> as well as some other ways, but again, prefer not to use satisfies types, e.g. (and integer (not (satisfies zerop)))
<aeth> ugh I did it again, I copied mine, not White_Flame's
<aeth> it's (and integer (not ...)) if you're building it from NOTs
tibfulv has quit [Remote host closed the connection]
<beach> euouae: Common Lisp has the most powerful type system of all the ones I have learned about. It is not decidable, of course, which is what the static-typing crowd wants. But Common Lisp is a dynamically typed language, so decidability is not a requirement.
<euouae> beach, for example in Rust the type system is very nicely utilized in terms of parallelism to avoid MOVEing stuff when you shouldn't. I can't remember the specifics but I can look it up if you want
tibfulv has joined #commonlisp
<euouae> Does CL have something similar?
<aeth> sounds like something you'd do with a macro in CL instead of with types
<beach> I seem to recall that Rust is a statically typed language, so the detection of problems is done at compile time. In general, in Common Lisp, such situations would be detected at run-time.
<phoe> euouae: Rust avoids being GCed whereas CL is garbage collected, so that's two completely different strategies of memory management
<beach> euouae: If you try to do in Common Lisp what you would typically do in a statically typed programming language, in terms of compile-time checks, you are out of luck.
<phoe> (though some strategies for having that sort of facilities exist, so you're not *completely* out of luck)
<aeth> CL is technically gradually typed in that it's a dynamically typed language that supports some static typing, but in general, implementations cannot portably assume that most things *can't* be recompiled outside of the current file (or other compilation-unit) being compiled. So any kind of errors caught with declared types or inferred types will be restricted to being in the same file file and mostly
<aeth> to the internals of one function.
<aeth> It can be done, though.
<phoe> (e.g. SBCL can detect some type mismatches at compilation time if you declare types evewyehere, and there are DSLs like Coalton that take this idea even further)
<aeth> If you want things to be detected at compile time outside of this, you'd want some kind of macro with metadata
<beach> euouae: There is this unspoken but "obvious truth" (to the static-typing crowd) that more compile-time checks is better. But those represent a development cost that that crowd keeps quiet about. They choice of a language should be dictated by a careful compromise between run-time "safety" and cost. I might not use SBCL to fly an airplane, but there is no need to use a statically typed programming language in a spreadsheet or a wor
<beach> processor.
<White_Flame> I can't stand the traditional edit/compile/run cycle
<beach> Yes, that's a large part of the cost.
<White_Flame> and the inability of REPL-less languages to simply test calling functions
<beach> Plus, most of the time, your program is incomplete, so it can't be statically typed.
<White_Flame> instead of having to compile in static code to do that for you on the next run :-P
<euouae> I see
shka has joined #commonlisp
<aeth> I think you can mostly do it (or almost totally do it if you go the elaborate DSL or macro route), but nobody does because it's not the CL culture.
<aeth> CL could probably give you much deeper integration to the base language than something like TypeScript on top of JavaScript. But TypeScript is not JavaScript. And the cultures are different. So you'd probably wind up with a new language anyway.
<euouae> yeah I'm not trying to go against the grain but I wanted to understand how types can be leveraged for good things
<euouae> It seems that they're useful for the exception system of CL
<White_Flame> type declarations are used for correctness (the compiler statically and/or dynamically verifying that things match the expected types), and for optimization
<White_Flame> and of course testing & branching on types
<aeth> oh, it's called a condition system not an exception system because they're continuable, most trivially (defun foo (x) (check-type x integer) (* x 2)) (foo "hi") ; you can provide a valid value since "hi" isn't an integer and then continue on
epony has quit [*.net *.split]
dtman34 has quit [*.net *.split]
flip214 has quit [*.net *.split]
keinbock has quit [*.net *.split]
phadthai has quit [*.net *.split]
rdrg109_ has quit [*.net *.split]
OlCe has quit [*.net *.split]
susam has quit [*.net *.split]
aeth has quit [*.net *.split]
mzan has quit [*.net *.split]
bldr has quit [*.net *.split]
gjvc has quit [*.net *.split]
Shinmera has quit [*.net *.split]
empwilli has quit [*.net *.split]
zachel has quit [*.net *.split]
mht-wtf has quit [*.net *.split]
bldr_ has joined #commonlisp
flip214 has joined #commonlisp
keinbock has joined #commonlisp
phadthai has joined #commonlisp
susam has joined #commonlisp
flip214 has joined #commonlisp
flip214 has quit [Changing host]
empwilli has joined #commonlisp
phadthai has quit [Changing host]
phadthai has joined #commonlisp
susam has quit [Changing host]
susam has joined #commonlisp
OlCe has joined #commonlisp
Shinmera has joined #commonlisp
zachel has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
dtman34 has joined #commonlisp
mht-wtf has joined #commonlisp
mzan has joined #commonlisp
rdrg109_ has joined #commonlisp
aeth_ has joined #commonlisp
enzuru has joined #commonlisp
<phoe> an exception system is most often "unwind the stack first, think second"
<phoe> the CL condition system reverses these two and also makes unwinding optional
amb007 has joined #commonlisp
gjvc has joined #commonlisp
<phoe> FYI there's a whole book on the condition system that explains the design rationale and its implementation and how it differs from the "traditional" exception handling popularized by c++ and java and python and what not
aeth has joined #commonlisp
<phoe> (and I know the author, he's kinda fun)
<euouae> ah nice
aeth_ has quit [Client Quit]
<jackdaniel> I see that there are more humble and nice people on this # besides me
<jackdaniel> that's nice
<phoe> yes, obviously
amb007 has quit [Ping timeout: 255 seconds]
<beach> I believe I have met the author a few times, too.
<euouae> I think I should probably learn how to use the debugger
<euouae> That is implementation-specific, right?
<phoe> if you use something like slime then not really
<euouae> Ah got it. Yeah I use slime
<phoe> the slime debugger interface is very much the same for all implementations, even if the internals are different
<jackdaniel> slime is not an acceptable debugger in 3 2 1 ;)
<phoe> while we're at it, cl is not an acceptable lisp
<beach> euouae: Unfortunately, FLOSS Common Lisp implementations have sub-optimal debugging support at this time. So depending on how much you have used debuggers in the past, you may or may not be disappointed.
MajorBiscuit has joined #commonlisp
<euouae> Ah, I suppose that is one of the features of a proprietary implementation
<beach> See the "Previous work" section in this paper, for instance: http://metamodular.com/SICL/sicl-debugging.pdf
<beach> Both LispWorks and Allegro seem to have decent debugging support, but using completely different mechanisms.
<beach> euouae: The "SLIME debugger" should rather be called the "SLIME backtrace inspector and restart invoker"
<jackdaniel> and frame evaluator
<beach> ... and that, yes.
<euouae> is the sbcl debugger quite better, e.g.?
<euouae> Is it that SLIME is behind on features or that the floss impls are?
dipper has joined #commonlisp
<beach> SLIME just uses what the implementations provide, in most cases.
<jackdaniel> ecl may be used with plain gdb fwiw
<beach> So if you read the section I suggested in that paper, you can see what SBCL is capable of.
MajorBiscuit has quit [Quit: WeeChat 3.6]
<jackdaniel> (hard to assert that gdb is not a debugger :)
<phoe> ;; of course it isn't, it's in the name: GDB == GNU DataBase
<euouae> beach, I'll check soon, I was looking at lispworks pricing
* phoe hides
<jackdaniel> not gnome database?
_cymew_ has joined #commonlisp
<jackdaniel> gnome/systemd/linux/ms -so called wsl stack :p
random-nick has joined #commonlisp
MajorBiscuit has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
amb007 has joined #commonlisp
sloanr has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
cyberbanjo has quit [Ping timeout: 260 seconds]
rainthree has joined #commonlisp
sloanr has quit [Remote host closed the connection]
mfiano has quit [Quit: WeeChat 3.7.1]
mfiano has joined #commonlisp
dipper has quit [Remote host closed the connection]
Inline has joined #commonlisp
mfiano has quit [Quit: WeeChat 3.7.1]
mfiano has joined #commonlisp
mfiano has quit [Client Quit]
mfiano has joined #commonlisp
zacque has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
Inline_ has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
mfiano has quit [Quit: WeeChat 3.7.1]
mfiano has joined #commonlisp
Inline__ has joined #commonlisp
amb007 has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
mfiano has quit [Client Quit]
mfiano has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
<euouae> What do you make of clasp's debugger? <https://clasp-developers.github.io/manual.html#orgc1695a4> can it be programmed to set breakpoints?
<euouae> I'm trying to compare the stataement of the paper that clasp doesn't have breakpoints with the clasp manual contents
Inline_ has joined #commonlisp
jmdaemon has quit [Ping timeout: 252 seconds]
amb007 has quit [Ping timeout: 252 seconds]
mfiano has quit [Quit: WeeChat 3.7.1]
cosimone has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
mfiano has joined #commonlisp
pjb has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
amb007 has joined #commonlisp
glaucon has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
ttree has quit [Ping timeout: 260 seconds]
Lycurgus has joined #commonlisp
rainthree has joined #commonlisp
<jackdaniel> the paper is not very new abd clasp rapidly changes
<jackdaniel> so some information may be outdated
<jackdaniel> not saying that ig is, only that it might
<euouae> yeah I'll have to test clasp to see for myself
amb007 has joined #commonlisp
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
amb007 has quit [Ping timeout: 246 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<beach> Or you can ask Bike when he wakes up.
<beach> It looks like it is the same functionality as most other "debuggers", i.e., it's mainly a backtrace inspector.
<beach> The "debugger" is invoked when an unhandled error is signaled, and you are given the possibility to inspect the current active stack frames, and you can invoke a restart.
amb007 has joined #commonlisp
frgo has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<AadVersteden[m]> I don't think debugging tools are that bad in Common Lisp to be honest. There is a wide set of tools that in total help you to debug code and there are a few vastly superior systems in Common Lisp. I greatly miss a stepper but that might just be a broken Sly configuration.
<beach> If you are happy with what there is, then that's fine.
<AadVersteden[m]> SBCL's type system catches about the same amount of silly errors as TypeScript does, but with much less typing, tracing functions helps a lot for functions that are called a lot, and SLY's stickers can be rather informative of some cases. That's functionality I don't seem to find in other languages.
<beach> I would like to be able to set a breakpoint in some code, without recompiling, perhaps code that is going to be executed after a restart has been invoked. And then I would like to be able to step after that breakpoint is hit.
<AadVersteden[m]> beach: Yes, I want that too. That's what I miss here. But I miss the other features in other languages so at least it's a mixed bag.
<AadVersteden[m]> I wouldn't mind recompiling the code if it can happen in the background.
<beach> But if the code is already on the stack, then recompiling it will not do the trick. It would then be a different function from the one on the stack.
<AadVersteden[m]> beach: if compiled with with the right debug settings, can't SLY/SLIME do the stepping?
<beach> The stepper exists, but it has to be done from the REPL. I want to be able to step from a breakpoint of my choice.
<beach> But since we can't set breakpoints without recompiling, then that's not possible.
<AadVersteden[m]> beach: I doubt you can have the optimization cake and eat the debugging cherry too. It would at least be complex.
<beach> GDB does it easily.
<AadVersteden[m]> Yeah, but "a sufficienly smart compiler can handle it" is not something that GDB had to take into account.
<AadVersteden[m]> But I guess you don't intend to have this for `(optimize (debug 0))` ?
<beach> I think what I have to say is already in that paper, including what Allegro does, for instance.
<beach> I don't quite understand the reference to the sufficiently smart compiler either. Oh, well.
<AadVersteden[m]> beach: That's an argument that was used during the Common Lisp standardization I thought?
* AadVersteden[m] missed the link to the paper, hope to read at some point :-)
<beach> An argument in favor of what?
<AadVersteden[m]> I suppose that was used when adding features to the language. If that statement was effectively used, then I would assume the compiler to be more complex. Inspecting the resulting code and mapping it back to the sources may be harder then. But either case, I should read the paper first, this will be a repetition of what you already wrote down otherwise.
<euouae> the paper says the issue boils down to breakpoints affecting the entire lisp image
<beach> AadVersteden[m]: I don't think it is that hard to create a debugger for Common Lisp. What I think is that the typical users of a Common Lisp system don't seem to be used to using advanced debugging tools, so they firmly believe we have the best development environment that exists, all languages considered. Unfortunately, they are wrong.
<AadVersteden[m]> beach: Then my statement holds again. We have great tools that are totally different than what other systems offer, but we also lack the systems I've grown used to out of the lisp ecosystem. It's not all bad.
<beach> OK.
euouae has quit []
<AadVersteden[m]> beach: To make a case though: it's been vastly simpler for me to optimize some lisp code with respect to parsing than what I could do in Elixir. Part of that is going to be due to me lacking knowledge, but part of it is compiler hints. Not exactly debugging but somewhere close. I would love a "normal" debugger to be added to the mix akin to what you find in your browser when executing readable javascript code.
aartaka has quit [Ping timeout: 260 seconds]
<beach> I too prefer Common Lisp to other languages for a variety of reasons. But I am a researcher, and I am not about to be content with the current situation when I think I know how to improve it.
aartaka has joined #commonlisp
szkl has joined #commonlisp
glaucon has quit [Quit: WeeChat 3.5]
amb007 has joined #commonlisp
nij- has joined #commonlisp
Bung has joined #commonlisp
Inline has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
Inline_ has joined #commonlisp
Madsy has quit [Ping timeout: 260 seconds]
Inline has quit [Ping timeout: 255 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
Inline_ has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
amb007 has joined #commonlisp
Madsy has joined #commonlisp
Madsy has quit [Client Quit]
Inline_ has quit [Ping timeout: 260 seconds]
<ecraven> does anyone know here know how swank/sly use threads internally? is there one thread for communication with slime, and the "repl" that is used to evaluate things is in *another* thread (so that if this blocks, emacs can still communicate with swank)?
amb007 has quit [Ping timeout: 246 seconds]
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
epony has joined #commonlisp
<nij-> (sb-thread:list-all-threads) from a sly mrepl shows that there is at least
<nij-> and
<nij-> #<SB-THREAD:THREAD "Slynk Sentinel" waiting on:
<nij-> #<SB-THREAD:THREAD "sly-channel-1-mrepl-remote-1" RUNNING {701F3C0773}>)
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
Bung has quit [Ping timeout: 255 seconds]
<jcowan> beach: fwiw, the Self papers talk about how debugging is done in Self on the same stack: there is a full decompiler that allows deoptimizing code so that it can be debugged as if in an interpreter
Bung has joined #commonlisp
amb007 has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
amb007 has quit [Ping timeout: 260 seconds]
jeosol has quit [Quit: Client closed]
<Bike> huh, didn't know javascript also got its JIT stuff from self
nij- has quit [Ping timeout: 255 seconds]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
azimut_ has quit [Remote host closed the connection]
pve has joined #commonlisp
Dynom_ has joined #commonlisp
azimut has joined #commonlisp
Dynom_ is now known as Guest7474
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
aartaka has quit [Ping timeout: 268 seconds]
aartaka has joined #commonlisp
<jcowan> also, errors in spreadsheet programs can be quite as lethal as errors in avionics software, if less obviously so
<jcowan> (though the typical error is in the spreadsheet itself, considered as a functional program, as opposed to the spreadsheet software)
<jcowan> Ray Panko at UHawaii has been studying spreadsheet errors (of the second type) for a long time, and estimates that almost 90% of spreadsheets have one or more undetected errors
<jcowan> (where "error" means that 1% or more of cells defined by formulas have incorrect formulas)
<Bike> ::notify euouae no, clasp does not have breakpoints. i don't see where in the manual it says otherwise.
<Colleen> Bike: Got it. I'll let euouae know as soon as possible.
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
seok has quit [Read error: Connection reset by peer]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 260 seconds]
frgo has quit [Remote host closed the connection]
amb007 has joined #commonlisp
<beach> jcowan: Thanks.
amb007 has quit [Ping timeout: 255 seconds]
jeosol has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
pranavats has left #commonlisp [Error from remote client]
zacque has quit [Quit: Goodbye :D]
nij- has joined #commonlisp
nij_ has joined #commonlisp
nij- has quit [Killed (NickServ (GHOST command used by nij_))]
nij_ is now known as nij-
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
<nij-> How to import (only) the symbol 'with from the package :rutils into :cl-user?
<beach> Why would you import a keyword? They are always accessible.
<beach> And the name of the package is probably "CL-USER" and not ":cl-user"
<nij-> Oh, the package is called "rutils", I want to import the symbol rutils:with.
<pjb> (in-package :cl-user) (import 'rutils:with)
<White_Flame> (import 'rutils:with)
<nij-> As easy as it sounds. Nice :D
<pjb> also: (import 'rutils:with :cl-user)
amb007 has joined #commonlisp
copec_ has joined #commonlisp
copec has quit [Quit: checkity check out.]
copec_ is now known as copec
jeosol has quit [Quit: Client closed]
amb007 has quit [Ping timeout: 260 seconds]
pranavats has joined #commonlisp
tyson2 has joined #commonlisp
ec_ has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 260 seconds]
ec_ has joined #commonlisp
frgo has joined #commonlisp
aartaka has joined #commonlisp
nij- has quit [Ping timeout: 252 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 252 seconds]
nij- has joined #commonlisp
seletz_ has joined #commonlisp
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
seletz has quit [Ping timeout: 260 seconds]
Inline__ has joined #commonlisp
amb007 has joined #commonlisp
Inline_ has quit [Ping timeout: 268 seconds]
cosimone has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
Cymew has quit [Ping timeout: 260 seconds]
morganw has joined #commonlisp
<nij-> I wrote a function to wait for a FIFO to be opened. It will then read the content in the FIFO. However, sometimes right after the FIFO is opened, it seems to start reading too quickly. In that case, it seems that it actually block the FIFO writer to write.. A kludge I did is to add a (sleep 0.1) after noticing the FIFO is opened (https://bpa.st/VYPQ). I wonder what's a better way to solve this.
Inline_ has joined #commonlisp
vn36 has joined #commonlisp
Inline__ has quit [Ping timeout: 268 seconds]
prokhor_ has joined #commonlisp
Bung has quit [Quit: Leaving]
<beach> I have no solution for you, but I am wondering about the purpose of the PROGN.
jmdaemon has joined #commonlisp
<jackdaniel> if you are into busy loops already, just do (loop until (listen fifo))
causal has quit [Quit: WeeChat 3.7.1]
Inline__ has joined #commonlisp
amb007 has joined #commonlisp
thuna` has joined #commonlisp
azimut_ has quit [Ping timeout: 255 seconds]
Inline_ has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 252 seconds]
<nij-> jackdaniel hmmm this is what I try.. however, after your loop form, lisp still hangs there https://bpa.st/IF4A
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
joast has joined #commonlisp
Inline__ has joined #commonlisp
seletz_ has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 255 seconds]
Inline_ has quit [Ping timeout: 260 seconds]
lisper29 has joined #commonlisp
aartaka has joined #commonlisp
amb007 has joined #commonlisp
<beach> Oh well.
aartaka has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 252 seconds]
CptKirk has joined #commonlisp
aartaka has joined #commonlisp
<nij-> beach I see what you mean. I don't need a progn there. Thanks :)
<beach> Sure.
pranavats has left #commonlisp [Disconnected: Hibernating too long]
pranavats has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
Inline_ has joined #commonlisp
ec_ has quit [Remote host closed the connection]
vn36 has quit [Ping timeout: 260 seconds]
Inline__ has quit [Ping timeout: 260 seconds]
ec_ has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
Oladon has joined #commonlisp
seletz has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
aartaka has joined #commonlisp
nij- has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 255 seconds]
seletz has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 268 seconds]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 268 seconds]
pjb has quit [Read error: Connection reset by peer]
seletz has joined #commonlisp
cosimone has quit [Ping timeout: 268 seconds]
MajorBiscuit has quit [Ping timeout: 252 seconds]
seletz has quit [Ping timeout: 252 seconds]
morganw has quit [Remote host closed the connection]
mathrick has quit [Ping timeout: 252 seconds]
lisper29 has quit [Quit: Leaving]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
mathrick has joined #commonlisp
ttree has joined #commonlisp
seletz has joined #commonlisp
pdietz has joined #commonlisp
Volt_ has quit [Quit: ]
jeosol has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
morganw has joined #commonlisp
amb007 has joined #commonlisp
pranavats has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
Inline_ has joined #commonlisp
cage has joined #commonlisp
boigahs has joined #commonlisp
Inline__ has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
waleee has joined #commonlisp
mathrick has quit [Ping timeout: 268 seconds]
cosimone has joined #commonlisp
mathrick has joined #commonlisp
nij- has joined #commonlisp
amb007 has joined #commonlisp
cosimone has quit [Remote host closed the connection]
jeosol has quit [Quit: Client closed]
amb007 has quit [Ping timeout: 252 seconds]
Inline__ has joined #commonlisp
jackdaniel has quit [Changing host]
jackdaniel has joined #commonlisp
haoms has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
karlosz has joined #commonlisp
mathrick has quit [Read error: Connection reset by peer]
mathrick has joined #commonlisp
Oladon has joined #commonlisp
pdietz has quit [Quit: Client closed]
mathrick has quit [Ping timeout: 260 seconds]
haoms has left #commonlisp [#commonlisp]
mathrick has joined #commonlisp
Bung has joined #commonlisp
vn36 has joined #commonlisp
Guest268987 has joined #commonlisp
Bung has quit [Remote host closed the connection]
Bung has joined #commonlisp
son0p has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
amb007 has joined #commonlisp
Bung has quit [Quit: Leaving]
amb007 has quit [Ping timeout: 252 seconds]
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #commonlisp
pjb has joined #commonlisp
<nij-> Can I have a lisp send a very large matrix to another lisp (different process) using shared memory?
<pjb> nij-: yes. See for example:
<pjb> nij-: or using FFI (cffi).
<pjb> nij-: different lisp have different memory layouts, so you cannot assume anything.
<pjb> nij-: even the same implementation can be compiled with different options giving different memory layouts.
<pjb> nij-: but even if it's the same lisp executable, few implementations let you store lisp objects in a given memory area.
jeosol has joined #commonlisp
<nij-> pjb, so maybe a better way is to encode that object into a bitmap, say, and then share it via shm?
<pjb> said otherwise, lisp implementations are generally designed so that all the lisp processes run in the same lisp image.
<pjb> nij-: this is what com.informatimago.common-lisp.heap does.
<nij-> yeah ;) I asked that as the first question, and my real question is can I send a large matrix between a lisp and a python via shm..
<pjb> nij-: then have a look at claude.
<nij-> does it use shm?!
<pjb> I don't know.
<pjb> Abstraction!
<pjb> otherwise, using cffi you will be able to store data in a common format between lisp and python processes.
<nij-> ok I guess I will look at the cffi way.. or some shm bindings for CL
<phoe> nij-: https://sr.ht/~shunter/posix-shm/ I assume it'll work
<shunter> <3
<phoe> shunter: :D
<phoe> this looks like it uses CFFI under the hood so you'll be able to use all of CFFI goodness there
<shunter> And if it doesn't work, pls yell at me
<shunter> ^
<nij-> shunter does it use mmap under the hood?
<shunter> yeah
<nij-> shunter in this page it seems to share the memory via the file "/foobar-shm"; is it? https://sr.ht/~shunter/posix-shm/
<nij-> And if I want the external process to read that shm, I just ask it to read the file "/foobar-shm"?
CptKirk has quit [Remote host closed the connection]
<shunter> Right. Just make sure both using open-shm and not just #'cl:open
<nij-> How does the external process use open-shm?
<nij-> say if that process is a python
CptKirk has joined #commonlisp
<shunter> So there's two ways
<shunter> One is to coordinate opening a shm with the same name
<shunter> The other is to coordinate a local-address socket, to share the shm's file descriptor from one to the other
<shunter> There might be other ways, but those are the two main patterns I've seen
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<nij-> Why wouldn't usual file opening method work (e.g. cl:open in CL, or `with open..` in python)?
<shunter> Because they're not normal files. They are shm files
<shunter> or wather, shm objects
<shunter> rather*
<nij-> I see. This is cool :D I will look into it.
<nij-> I may just skip ZeroMQ and use shm instead.
grawlinson has quit [Quit: SIGTERM]
_cymew_ has quit [Ping timeout: 260 seconds]
Oladon has quit [Quit: Leaving.]
Guest7474 has quit [Quit: WeeChat 3.7.1]
amb007 has joined #commonlisp
cosimone has joined #commonlisp
<pjb> nij-: in conclusion, learn some unix/linux stuff. and cffi to be able to access C API from Common Lisp.
<pjb> shared memory is not a lisp concept, it's a unix concept.
<nij-> yep! I hope I can learn much from shunter's library
<pjb> Those libraries are interface libraries, so if you don't understand the concepts they interface to, you will have a hard time.
ec_ has quit [Ping timeout: 255 seconds]
<nij-> Yeah, I am actually hoping to use this chance to peek into the underlying C libs.
amb007 has quit [Ping timeout: 252 seconds]
<shunter> If you want to peek at the underlying C lib, take a peek at shm_overview(7). That manpage describes the API that posix-shm builds on
ec_ has joined #commonlisp
<nij-> Will be a nice read while I drive later :D
mathrick has quit [Ping timeout: 268 seconds]
grawlinson has joined #commonlisp
Inline_ has joined #commonlisp
pve has quit [Quit: leaving]
amb007 has joined #commonlisp
eddof13 has joined #commonlisp
Inline__ has quit [Ping timeout: 268 seconds]
shka has quit [Ping timeout: 248 seconds]
amb007 has quit [Ping timeout: 260 seconds]
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
mathrick has joined #commonlisp
amb007 has joined #commonlisp
Oladon has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
beach` has joined #commonlisp
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
zacque has joined #commonlisp
jeosol has quit [Quit: Client closed]
beach has quit [Ping timeout: 268 seconds]
Guest268987 has left #commonlisp [#commonlisp]
Inline__ has joined #commonlisp
Inline_ has quit [Ping timeout: 252 seconds]
cosimone has quit [Remote host closed the connection]
rgherdt has quit [Remote host closed the connection]
jmd_ has joined #commonlisp
jmdaemon has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]
amb007 has joined #commonlisp
azimut has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
amb007 has quit [Ping timeout: 255 seconds]
dre has joined #commonlisp
Inline_ has joined #commonlisp
Inline__ has quit [Ping timeout: 268 seconds]
dipper has joined #commonlisp
vn36 has quit [Ping timeout: 260 seconds]
danieli has quit [Quit: Ping timeout (120 seconds)]
danieli has joined #commonlisp
triffid has joined #commonlisp
sp has quit [Read error: Software caused connection abort]
sp has joined #commonlisp
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
azimut has quit [Remote host closed the connection]
dipper has quit [Remote host closed the connection]
azimut has joined #commonlisp
dipper has joined #commonlisp
amb007 has joined #commonlisp
morganw has quit [Remote host closed the connection]