jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
<gabbiel> flet/labels allows for binding of functions in lexical scope, which happens in the runtime
<gabbiel> i dont see why methods couldn't be lexically bound too
hiroaki has joined #lisp
<dlowe> to what end?
shifty has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
libertyprime has quit [Remote host closed the connection]
<Bike> there used to be a generic-flet operator, but it was removed because iirc nobody understood it.
LdBeth has quit [Read error: Connection reset by peer]
malaclyps[m] has quit [Write error: Broken pipe]
no-defun-allowed has quit [Remote host closed the connection]
dtw has quit [Remote host closed the connection]
eriix[m] has quit [Remote host closed the connection]
djeis[m] has quit [Read error: Connection reset by peer]
Godel[m] has quit [Write error: Connection reset by peer]
keep-learning[m] has quit [Write error: Connection reset by peer]
akanouras has quit [Remote host closed the connection]
munksgaard[m] has quit [Remote host closed the connection]
nonlinear[m] has quit [Write error: Connection reset by peer]
hiq[m] has quit [Read error: Connection reset by peer]
Jachy has quit [Remote host closed the connection]
katco has quit [Write error: Connection reset by peer]
liambrown has quit [Write error: Connection reset by peer]
sciamano has quit [Write error: Connection reset by peer]
iarebatman has quit [Remote host closed the connection]
hiroaki has quit [Remote host closed the connection]
ravndal has quit [Ping timeout: 246 seconds]
hiroaki has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
poet has joined #lisp
alexanderbarbosa has joined #lisp
<gabbiel> Bike: it proposed in the design process?
<Bike> yeah, there was a committee issue and stuff
akanouras has joined #lisp
<Bike> also with-added-methods
<Bike> "We would either have to get the implementors to implement it or explainwhy we put this thing in the language that everyone refuses to implement."
orivej_ has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
<drmeister> I've got some code where I invoke MAKE-INSTANCE and it's returning NIL. I'm not sure how that could be.
<gabbiel> generic-flet and generic-labels are self describing, what did they mean that nobody understood them
<Bike> well, what they're for. also whether it was dynamic or lexical.
<Bike> drmeister: broken method, i guess.
<drmeister> There is an :after method on initialize-instance for this class and in there I put a print statement for the object.
ravndal has joined #lisp
<drmeister> I get:
Lycurgus has joined #lisp
<drmeister> Bike: Which method should I look for?
<Bike> any
<Bike> on initialize-instance or allocate-instance or make-instance
keep_learning has joined #lisp
learning_ has quit [Remote host closed the connection]
<drmeister> I can make the instance directly and it works.
<drmeister> It's a little harder to initialize :%view properly from the command line.
<White_Flame> gabbiel: my 2nd message was about compile-time optimization, as many languages like C++ do. Even though the declarations and usages would be in a single lexical scope, it would still leave resolution to runtime
<gabbiel> Bike: flet is lexical, yes, so generic-flet should be lexical as well
<Bike> and the methods?
<Bike> i mean fundamentally what's the point of defining a generic function all at once? might as well just have a typecase body
awolven has joined #lisp
jiny has joined #lisp
<gabbiel> White_Flame: but what exactly did you mean, regarding generic-flet/labels, that it would inhibit compile time optimization?
verisimilitude has left #lisp ["ERC (IRC client for Emacs 24.5.1)"]
<White_Flame> I don't know for what purpose you want this, so I brought up an assumptive scenario
<gabbiel> Bike: I'd wager generic-flet/labels was for defining methods, since methods already imply generic functions
<Bike> what?
<Bike> you said that generic-flet is self describing but i really have doubts about that
<White_Flame> if you build generic-flet on top of gensym-named standard defmethods, it woudl perform the same and not take advantage of any lexical stuff
<White_Flame> whereas labels & flet, being contained with their usage, can do certain deeper optimizations
<pjb> The problem is that method dispatching is not done lexically, but dynamically.
<pjb> There would be no point of defining a method lexically, thus masking another method defined on the same classes, since calling the generic function could occur outside of the lexical scope, and would still have to dispatch to the outside method!
<White_Flame> pjb: the intent would be not to leak the GF at all
<pjb> At most, what you can do, is to bind methods dynamically, ie. temporarily. You can do that with find-method, add-method and remove-method.
<pjb> White_Flame: still.
<Lycurgus> leak the GF
<pjb> White_Flame: the point is that there's no point. Just write a normal function.
<White_Flame> I believe the point would be to use the class-based dispatch mechanism in local functions
<Lycurgus> well the great thing is you get to make whatever point u want!
<gabbiel> White_Flame: I see, your point is that impleneting generic-flet through gensyms would not allow for the optimizations that flet/labels have.
<Lycurgus> which might be the reason the object system isn't more widely used
<White_Flame> gabbiel: however, if you're planning on using EQL discriminators in your functions, instead of class-based, you could also try using a matcher library
<White_Flame> for erlang-style matching branch clauses
<gabbiel> Bike: maybe call it mflet or mlabels
<Bike> i still don't understand what the point of this is.
<Bike> i can kind of understand dynamically adding and removing methods, which is i think what with-added-methods was, but then there's not much point doing it as a special operator
<Bike> and you're not actually binding any function names
lemoinem has quit [Killed (moon.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
djeis[m] has joined #lisp
sciamano has joined #lisp
iarebatman has joined #lisp
eriix[m] has joined #lisp
LdBeth has joined #lisp
dtw has joined #lisp
Jachy has joined #lisp
liambrown has joined #lisp
nonlinear[m] has joined #lisp
katco has joined #lisp
munksgaard[m] has joined #lisp
no-defun-allowed has joined #lisp
keep-learning[m] has joined #lisp
malaclyps[m] has joined #lisp
Godel[m] has joined #lisp
hiq[m] has joined #lisp
<gabbiel> bike: the point is to think about what it would mean to have lexically bound methods
<Bike> that wouldn't mesh at all with the entire rest of clos
<pjb> exactly.
<Bike> a generic function is an object with a state, such as what methods it has. to "lexically bind" one, you'd be making a new generic function and copying that state and also adding methods
<White_Flame> for this to meaningfully work, it would probably want its methods to be statically defined to only teh source code clauses that are present in that scope?
<White_Flame> like I said, imagine a set of LABELS functions that can use multimethod dispatch in their parameters
<White_Flame> s/in/using/ :-P
<gabbiel> so im really just restricted to typecasing and using flet?
<Bike> yes. i don't understand what more you want.
<Bike> you could give it a more method-like syntax but still make a normal function
<pjb> White_Flame: for this to work, you would have to justify having a different dispatch between calls to the generic function inside the lexial scope vs. outside of it.
<pjb> White_Flame: this is very hard to justify when you understand what an object is.
<White_Flame> right, this would remove the "objectness" of the GF
<White_Flame> but in exchange, expose parameter-based dispatch to local functions
<pjb> Ah! So this is what you want, parameter based dispatch!
<pjb> Or just pattern matching cases.
semz has quit [Ping timeout: 264 seconds]
<White_Flame> I don't know if that's what gabbiel wants, because they never actually stated any intention, but that was my assumption, which I did specifically list multilpe times as a supposed rationale
<Bike> yes, having an idea of what's actually wanted would help
<pjb> White_Flame: it's probably better to have a macro implementing it independently from function calls.
<White_Flame> pjb: which is what I said about constructing a gensym-named GF that's only locally known
<pjb> Something like (dispatch-case (a b c) (((a integer) (b integer) (c string)) …) (((a integer) (b string) (c string)) …) …)
hiroaki has quit [Ping timeout: 245 seconds]
<gabbiel> that macro seems nice, but are those flet like or labels like bindings?
semz has joined #lisp
Lycurgus has quit [Quit: Exeunt]
kajo has quit [Ping timeout: 252 seconds]
kajo has joined #lisp
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.2)]
learning has joined #lisp
orivej_ has quit [Ping timeout: 252 seconds]
aeth has joined #lisp
scottj has joined #lisp
igemnace has joined #lisp
Oladon has quit [Quit: Leaving.]
Kaisyu7 has joined #lisp
jiny has quit [Ping timeout: 250 seconds]
xkapastel has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
igemnace has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
kajo has joined #lisp
alexande` has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
seok has quit [Ping timeout: 260 seconds]
seok36 has quit [Ping timeout: 260 seconds]
ahungry has joined #lisp
<pjb> gabbiel: it doesn't matter, because the dispatching clause should be exclusive.
learning has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
torbo has quit [Remote host closed the connection]
EvW has joined #lisp
gabbiel has quit [Read error: No route to host]
ahungry has quit [Remote host closed the connection]
ahungry has joined #lisp
ahungry has quit [Ping timeout: 245 seconds]
ahungry`` has joined #lisp
Oladon has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
kajo has joined #lisp
dddddd has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 250 seconds]
ahungry`` has quit [Ping timeout: 246 seconds]
jonatack has quit [Ping timeout: 252 seconds]
<beach> Good morning everyone!
7GHABM53V has joined #lisp
karlosz has joined #lisp
poet has quit [Ping timeout: 264 seconds]
nanoz has joined #lisp
7GHABM53V has quit [Ping timeout: 245 seconds]
gravicappa has joined #lisp
jeosol has quit [Remote host closed the connection]
jeosol has joined #lisp
gabbiel has joined #lisp
gabbiel has quit [Ping timeout: 264 seconds]
alexande` has quit [Ping timeout: 245 seconds]
Oladon has quit [Ping timeout: 245 seconds]
Folkol has joined #lisp
<beach> As a person reading some code written by a different person, how do you react when you see (DEFVAR <var>) and when you see (DEFPARAMETER <var> NIL)?
<no-defun-allowed> Are you referring to those exact forms, or (def{var,parameter} <var>) against (def{var,parameter} <var> nil)?
<White_Flame> (defparameter <var> nil) is correct, as it should be defining a parameter value
gabbiel has joined #lisp
<White_Flame> defvar is optional, filled in either from config defaults, or established in thread-local bindings
<White_Flame> *defvar's value is optional...
<no-defun-allowed> Oh, as in both in the same codebase. I agree pretty much what White_Flame said.
<White_Flame> in fact, a defvar initial value is often problematic, as it makes it harder to restart the code without cycling the image
<White_Flame> if it's a stateful thing, which it often is
<no-defun-allowed> (defvar <var>) would be used if the variable changes some behaviour which has a default that isn't well expressed as a variable, such as if it was the same as another variable by default.
gabbiel has quit [Ping timeout: 245 seconds]
<beach> no-defun-allowed: Those exact forms.
gabbiel has joined #lisp
<beach> White_Flame: So, like me, you think that the initial value of the DEFPARAMETER form is going to be used.
<beach> ?
<White_Flame> that's what defparameter literally is for
<White_Flame> to provide a paramater value from the source code into the running program
<White_Flame> that can be changed at the source code level
<beach> Thank you.
<White_Flame> and reloaded to invoke
<beach> So for a variable that is always going to have a thread local binding for the code to work properly, DEFVAR with no initial value is the right thing.
<White_Flame> I would consider setf'ing a defparameter to be something wrong
<beach> sort of...
<beach> SETF-ing it before it is used would be wrong.
<White_Flame> beach: DEFVAR also should have no initial value if init code is going to set it up, and things shouldn't run until that init finishes
<beach> It all sounds very reasonable, and I agree.
<beach> For what it's worth, (LET (<var>) ... ) sends the same signal to me as (DEFVAR <var>) does, i.e. that the variable is going to be assigned to/bound before being used.
<beach> The semantics are different, of course.
<White_Flame> yeah, though I presume that's a rare case in idiomatic lisp
<beach> Sure. But I have seen it in macro expansions.
<White_Flame> ah, yeah that would make sense
<beach> More importantly, I don't want to see (LET (<var>) .. (push ... <var>))
<beach>
<White_Flame> right, assumption of teh implicit NIL, as opposed to (LET ((var NIL) ..) ..)
<beach> Two pieces of information clash here. (LET (<var>) says "will be assigned before it is used, and (PUSH ... <var>) uses it before it is assigned to.
<beach> Exactly.
* beach replaces some (DEFPARAMETER <var> NIL) by (DEFVAR <var>) in some Cleavir code.
<beach> Using `git blame', I can confirm my suspicion that I myself was the author of that DEFPARAMETER form half a decade or so ago.
<White_Flame> heh
Kevslinger has quit [Quit: Connection closed for inactivity]
gabbiel has quit [Ping timeout: 258 seconds]
<beach> Maybe it is time for me to write a separate style guide, as opposed to having a chapter in each document I write.
<beach> Such a style guide would contain, for each recommendation, a discussion of the reason for it, references to other documents like the Common Lisp HyperSpec, the LUV slides, etc., and also references to code bodies respecting or violating the recommendation.
<beach> ... and alternatives, as in the slot-naming convention.
anewuser has joined #lisp
<beach> Another reason for writing such a style guide is that I often repeat the same remarks whenever an inexperienced person comes here and exposes inexperienced-person code for #lisp participants to remark on. I could even teach one of our bots to show links to different sections as a result of some keyword, like <bot>: please tell <inexperienced-person> about slot-naming.
dale has quit [Quit: My computer has gone to sleep]
gabbiel has joined #lisp
vlatkoB has joined #lisp
flamebeard has joined #lisp
karayan has joined #lisp
AndrewYoung has joined #lisp
varjag has joined #lisp
karayan has quit [Ping timeout: 258 seconds]
<beach> Actually, I like the idea of a separate style guide. I haven't done it in the past, because some of my recommendations are not universally required, so they seemed to have no place in a separate style guide. But if each recommendation has alternatives, and a discussion related to the reason for its existence, references to people and code, etc., then such recommendations could very well fit into a separate style guide.
gabbiel has quit [Ping timeout: 245 seconds]
Inline has quit [Quit: Leaving]
mathrick has quit [Ping timeout: 250 seconds]
varjag has quit [Ping timeout: 245 seconds]
techquila has joined #lisp
<remexre> what's going on here?
<remexre> I don't get how the fourth box can be NULL KEEP-GOING
<remexre> or I guess, why the second case of the if isn't being taken
mathrick has joined #lisp
Necro^Byte has joined #lisp
<no-defun-allowed> Can we have a backtrace, and/or a paste of the relevant code? It's a bit hard to tell in the screenshot.
<remexre> er yeah, sorry, I'm doing all this in slimv
<remexre> the error that the 3rd arg to UNIFY can't be nil (which the (unless subst (return-from unify-impl)) should handle?)
<no-defun-allowed> There are calls to UNIFY before your checks.
<remexre> yeah, but the value doesn't become nil until after the first UNIFY in the second set of calls
<remexre> https://p.acm.umn.edu/Wz1sKngzsAM= <- paste of the code in the screenie
<remexre> it's more visible there, the !! NULL KEEP-GOING line comes right before (unless ... (return-from ...))
<remexre> which should guard against the second (unify ...) call's 3rd arg being nil
<remexre> but the @3 line being printed implies the (return-from ...) wasn't taken?
karlosz has quit [Quit: karlosz]
poet has joined #lisp
scymtym has quit [Ping timeout: 258 seconds]
JohnMS_WORK has joined #lisp
ggole has joined #lisp
manjaroi3 has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
nanozz has joined #lisp
Krystof has joined #lisp
nanoz has quit [Ping timeout: 246 seconds]
frgo has joined #lisp
gioyik has quit [Quit: WeeChat 2.5]
xkapastel has quit [Quit: Connection closed for inactivity]
mason- has joined #lisp
varjag has joined #lisp
gabbiel has joined #lisp
nanozz is now known as nanoz
ljavorsk has joined #lisp
gabbiel has quit [Ping timeout: 258 seconds]
Wojciech_K has joined #lisp
scymtym has joined #lisp
poet has quit [Read error: Connection reset by peer]
schweers has joined #lisp
makomo has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
ltriant has quit [Ping timeout: 245 seconds]
igemnace has joined #lisp
schjetne has joined #lisp
jprajzne has joined #lisp
gabbiel has joined #lisp
_jrjsmrtn has quit [Ping timeout: 244 seconds]
__jrjsmrtn__ has joined #lisp
jeosol has quit [Remote host closed the connection]
gabbiel has quit [Ping timeout: 258 seconds]
gabbiel has joined #lisp
gabbiel has quit [Client Quit]
vyorkin has joined #lisp
spoeplau has joined #lisp
schjetne has quit [Ping timeout: 246 seconds]
awolven_ has joined #lisp
schjetne has joined #lisp
awolven has quit [Ping timeout: 276 seconds]
hhdave has joined #lisp
SaganMan has joined #lisp
schjetne has quit [Ping timeout: 245 seconds]
schjetne has joined #lisp
igemnace has quit [Ping timeout: 258 seconds]
igemnace has joined #lisp
schjetne has quit [Ping timeout: 246 seconds]
Lord_of_Life has quit [Ping timeout: 246 seconds]
schjetne has joined #lisp
Lord_of_Life has joined #lisp
mindthelion has joined #lisp
techquila has quit [Remote host closed the connection]
jonatack has joined #lisp
anewuser has quit [Quit: anewuser]
schjetne has quit [Ping timeout: 245 seconds]
Necro^Byte has quit [Read error: Connection reset by peer]
schjetne has joined #lisp
Necro^Byte has joined #lisp
yoeljacobsen has joined #lisp
orivej has joined #lisp
frgo has quit [Remote host closed the connection]
schweers has quit [Remote host closed the connection]
samlamamma has joined #lisp
frgo has joined #lisp
zaquest has quit [Remote host closed the connection]
elimik31 has quit [Read error: Connection reset by peer]
schjetne has quit [Ping timeout: 246 seconds]
zaquest has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
Insanity_ has joined #lisp
schjetne has joined #lisp
bradfonseca has joined #lisp
igemnace has quit [Ping timeout: 245 seconds]
schjetne has quit [Ping timeout: 245 seconds]
amerlyq has joined #lisp
JohnMS has joined #lisp
JohnMS_WORK has quit [Ping timeout: 245 seconds]
chl has joined #lisp
chl has quit [Client Quit]
igemnace has joined #lisp
samlamamma has quit [Ping timeout: 264 seconds]
schjetne has joined #lisp
mindCrime_ has joined #lisp
cosimone has joined #lisp
dyelar has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
ljavorsk_ has joined #lisp
ljavorsk_ has quit [Client Quit]
ljavorsk_ has joined #lisp
ljavorsk has quit [Ping timeout: 244 seconds]
lucasb has joined #lisp
blandest has joined #lisp
Achylles has joined #lisp
flamebeard has quit []
Bike has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
dddddd has joined #lisp
Achylles has quit [Remote host closed the connection]
Ricchi has joined #lisp
JohnMS_WORK has joined #lisp
JohnMS has quit [Ping timeout: 245 seconds]
scymtym_ has joined #lisp
zigpaw has quit [Remote host closed the connection]
zigpaw has joined #lisp
ljavorsk__ has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
papachan has joined #lisp
ljavorsk_ has quit [Ping timeout: 244 seconds]
vaporatorius has quit [Read error: Connection reset by peer]
Ricchi has quit [Remote host closed the connection]
Ricchi has joined #lisp
Wojciech_K has quit [Remote host closed the connection]
warweasle has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ravenous_ has joined #lisp
mindCrime_ has quit [Ping timeout: 276 seconds]
Necro^Byte has quit [Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/]
scymtym_ has quit [Ping timeout: 250 seconds]
blandest has quit [Ping timeout: 245 seconds]
Inline has joined #lisp
learning has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
FreeBirdLjj has joined #lisp
<d4ryus> hi, when I try to run a dumped image (dumped via asdf:make) on another machine it does not work because it tries to load asdf. I also get a strange warning: https://pastebin.com/7pCBuUSg
<Xach> my first loop conformance bug with sicl loop!
EvW has joined #lisp
<d4ryus> The asdf version installed in ~/common-lisp/asdf/ is 3.3.3.3, sbcl version is 1.5.6.29-12fd1b3bc . Anyone a idea or any leads what i did wrong?
FreeBirdLjj has quit [Ping timeout: 244 seconds]
* Xach does not know, sorry
<Inline> d4ryus: look in your query window, i pm'ed you
<Xach> Inline: why private? I'm curious about it also.
<beach> Xach: YAY!
awolven_ has quit [Ping timeout: 244 seconds]
<beach> Xach: What was the conformance bug you detected?
dale_ has joined #lisp
dale_ is now known as dale
<Inline> lol Xach
<Inline> Xach: http://dpaste.com/3V9BKEZ, ok there you have it
ravenous_ has quit [Ping timeout: 252 seconds]
schjetne has quit [Ping timeout: 245 seconds]
<thijso> https://www.cliki.net/cffi-udp contains a link to a 'homepage', but that gives a server not found error. Google doesn't really provide anything either. Has cffi-udp just vanished? I've found a link to a git repo, but that's on the same server as the homepage, so no-go...
<PuercoPop> Is there a way to 'right align' the output of a format directive? Or something along the lines of insert as many spaces to move to column 70. The ~T directive seems to be almost what I want?
<pjb> PuercoPop: use ~D instead of ~A
<pjb> well, it's not conforming…
<pjb> (for non numbers).
<pjb> (let ((text "Hello") (width 20)) (format nil "~VA~A" (- width (length text)) "" text)) #| --> " Hello" |#
<pjb> (let ((text "Hello") (width 20)) (format nil "~V@{ ~}~A" (- width (length text)) text)) #| --> " Hello" |#
<PuercoPop> pjb: I was hoping to not have to compute the width myself. Although that would do
<PuercoPop> thanks
<pjb> PuercoPop: you can write a format
<pjb> slash function.
<pjb> (format nil "~20/right-align/" "foo")
antepod has joined #lisp
<antepod> Hey, people. I have a question about expressions in argument lists and macros.
<pjb> (defun right-align (stream object colon at &rest args) (let ((text (format nil "~A" object)) (width (or (first args) 8))) (format stream "~V@{ ~}~A" (- width (length text)) text)))
<pjb> (format nil "~20/right-align/" "foo")(format nil "~20/right-align/" "foo") #| --> " foo" |#
<pjb> well, defun cl-user::right-align
<pjb> or qualify it in ~/my-formatters:right-align/
<antepod> Is it possible- be it through macros, functions or otherwise- to have an expression you could put into a &key argument list so that it evaluates to , say, :color 'red for one condition, and a blank space for another?
<pjb> antepod: nope.
<pjb> antepod: lisp sources are not text. You cannot put "blank spaces" there.
<pjb> (apply (function foo) (when one-condition (list :color 'red)))
<antepod> pjb: 'blank spaces' was a bit informal, I admit.
<antepod> pjb: So the only way is to wrap the whole expression, function and all? Pity; it would be interesting if there was a way for a language to 'reach back' up the chain, but I'm not sure what it would look like.
<antepod> Thanks for the help, anyway.
<pjb> antepod: It depend on when the one-condition is known.
<pjb> antepod: this solution is when it's known at run-time.
<pjb> antepod: if you know it at compilation-time, then you can use a macro, or even a reader-macro.
whartung has joined #lisp
<Inline> is there a butlet macro ?
<Inline> lol
ljavorsk__ has quit [Quit: Leaving]
ljavorsk has joined #lisp
<pjb> (defmacro moo () `(foo ,@(when one-condition '(:color 'red)))) or (foo . #+#.(cl:if cl-user:one-condition '(:and) '(:or)) '(:color 'red) '())
<pjb> antepod: but the point is to understand that &key arguments are not syntax, but data.
cmatei has quit [Ping timeout: 258 seconds]
<pjb> (defun foo (&key (color 'red) (frequency 440)) (list color frequency)) (loop repeat 4 collect (foo (if (zerop (random 2)) :color :frequency) 'something)) #| --> ((something 440) (something 440) (red something) (red something)) |#
<antepod> Right. I understand the function examples, though some of the macro syntactic sugar's still beyond me. Guess I've got more reading to do
<pjb> (defmacro moo () (list* 'foo (when one-condition '(:color 'red)))) (moo)
<antepod> Yep. It's a pity you can't have something like
<antepod> (defmacro moo () `,@(:color 'red)) (foo (moo))
<antepod> though.
<antepod> But of course, `,@(:color 'red) isn't valid, because you can't 'return' two atoms.
<antepod> Unless you're using 'values', but that defeats the whole point of nicety.
mindCrime_ has joined #lisp
smazga has joined #lisp
<pjb> antepod: this is what prevents sexp-injections in lisp!
<pjb> antepod: of course, it's very sad, because since lisp has been correctly designed from the start, (macros since 1964!) you cannot write PhD dissertations anymore on how to avoid code injection in lisp. But don't worry, you can still get a PhD disserting about sql-injections…
<pjb> So, who wants to write a time travel debugger for lisp? Reactime: A time travel debugger for React <https://github.com/oslabs-beta/reactime>
<pjb> Java has one, React has one…
EvW has quit [Ping timeout: 250 seconds]
ljavorsk has quit [Ping timeout: 246 seconds]
Achylles has joined #lisp
<antepod> pjb: Huh. I guess I am asking to inject-attack my own code as a feature. Strange.
sjl_ has joined #lisp
cmatei has joined #lisp
ikki has joined #lisp
<antepod> pjb: though code injection's still perfectly possible in lisp... Just read and evaluate user input, expecting the user to supply a "string". I'm sure some newbie, somewhere, has done it. Hell, I think there's a chapter in practical common lisp whose code would allow for that sort of attack.
sauvin has quit [Ping timeout: 245 seconds]
<pjb> antepod: yes, but it's controlled. You need to do it explicitely.
<edgar-rft> what I find more frightenining is that according to pjb macros can expand into old cruft from 1964
<pjb> antepod: since there are no parentheses in lisp code, you cannot close a parenthesis, and re-open one to make a new expression like in sql…
eagleflo has quit [Remote host closed the connection]
<pjb> edgar-rft: you can run programs from 1960 on CL !
Achylles has quit [Remote host closed the connection]
<antepod> pjb: Yes, I suppose having two layers of logic (text I/O, AST internals) helps. But isn't the problem with SQL injection that the system's essentially eval'ing whatever you give it?
<pjb> antepod: no, it comes from the textual concatenation to build expressions.
eagleflo has joined #lisp
jprajzne has quit [Quit: Leaving.]
schweers has joined #lisp
seok has joined #lisp
<seok> Hello, anybody recognise this data format? ((36 52192 0 1 8 0 0 0 "system.namespaces") NIL)
<seok> I was expecting it to be a BSON but I cannot decode it
<schweers> I have a piece of software which /should/ use only a pretty small amount of memory, yet uses quite a lot. The process gets a huge heap, but shouldn’t use much of it at this stage. Is there a good way to find out where this memory is being used? I’m using sbcl, but it my code should also work on ccl.
vaporatorius has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
<mfiano> Xach: (hopefully) pushed a fix just guessing at the error message.
<pjb> seok: it looks like an oid followed by a string. This could come from decoding some ASN.1
<pjb> schweers: you can start with (room t). On some implementation it reports the memory used by type of object, which is a good hint.
<schweers> Yeah, I know about that, and I’m going to try it, but I don’t assume that it’s going to help much. Now that I’ve asked the question, I’m wondering if the profiler might help.
rippa has joined #lisp
schjetne has joined #lisp
edgar-rft has quit [Quit: Leaving]
<semz> Has there been work on using conditions/restarts to do proper OOM handling?
chipolux has joined #lisp
<pjb> semz: there was a blog, but it disappeared: https://groups.google.com/forum/#!search/group$3Acomp.lang.lisp$20out$20of$20memory$20condition/comp.lang.lisp/NL393lKKpBY/2eBe2LPNHq8J
<pjb> Perhaps it's time to realize that blogs are dumb, and published scientific paper are more perennial?
eagleflo has quit [Remote host closed the connection]
<pjb> Of course, 11 years later, implementations have changed… You'd have to try them all again.
EvW has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<semz> I unfortunately doubt that the situation on Linux has changed, Unix folks seem to like the (batshit insane) overcommitting situation.
<semz> But thanks pjb, even if it turns out to be a purely academic exercise this pointer is helpful.
Kevslinger has joined #lisp
q9929t has joined #lisp
nostoi has joined #lisp
eagleflo has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
LiamH has joined #lisp
q9929t has quit [Quit: q9929t]
akovalenko has joined #lisp
learning has quit [Remote host closed the connection]
orivej has joined #lisp
nostoi has quit [Quit: Verlassend]
protokaryote has joined #lisp
shifty has quit [Ping timeout: 245 seconds]
flip214 has quit [Read error: Connection reset by peer]
flip214 has joined #lisp
varjag has joined #lisp
<dim> well if you want to push the SBCL garbage collection you can play with pgloader; bonus point if you can fix the situation...
<dim> I continue receiving bug reports from users who are experiencing the heap exhausted, game over message and don't know what to do about it ; where CCL usually is just fine, just slower... well much slower
<Xach> mfiano: thanks
hhdave has quit [Quit: hhdave]
schjetne has quit [Ping timeout: 245 seconds]
vyorkin has quit [Ping timeout: 258 seconds]
sauvin has joined #lisp
gravicappa has quit [Ping timeout: 264 seconds]
drot has joined #lisp
protokaryote has quit [Quit: protokaryote]
awolven has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
learning has joined #lisp
xkapastel has joined #lisp
_whitelogger has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
Insanity_ has quit [Quit: Connection closed for inactivity]
Oladon_work has joined #lisp
ravenous_ has joined #lisp
cosimone has quit [Quit: Leaving]
ggole has quit [Quit: Leaving]
makomo has quit [Quit: WeeChat 2.4]
ravenous_ has quit [Ping timeout: 252 seconds]
antepod has quit [Quit: WeeChat 2.3]
whartung has quit [Remote host closed the connection]
whartung has joined #lisp
<aeth> The most surprising thing about that article is how small those (2008) numbers are in just 11 years. "out of a total of 500 MB of RAM" for instance. That's Rasperry Pi 1 (2012) levels, while I'd assume today most people are using 8-64 GB. Even back then, I think 1-4 GB would've been more normal? Iirc, I had 8 GB in 2010.
<aeth> As for Linux and memory, HN had "The Linux kernel's inability to gracefully handle low memory pressure" posted recently. https://news.ycombinator.com/item?id=20620545
vyorkin has joined #lisp
vyorkin has quit [Client Quit]
kamog has quit [Read error: Connection reset by peer]
schjetne has joined #lisp
spoeplau has quit [Ping timeout: 246 seconds]
schjetne has quit [Ping timeout: 246 seconds]
cosimone has joined #lisp
EvW has joined #lisp
awolven has quit [Ping timeout: 245 seconds]
<aeth> It's weird that SBCL's limit is only 1 GB by default. Is whatever it's set at preserved when doing s-l-a-d? Because if it was a desktop application (like a web browser), then sb-ext:dynamic-space-size should depend on the user's machine, not the build machine.
Kevslinger has quit [Quit: Connection closed for inactivity]
edgar-rft has joined #lisp
ravenous_ has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
vyorkin` has joined #lisp
<pjb> aeth: 32-bit vs. 64-bit.
sauvin has quit [Read error: Connection reset by peer]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
vlatkoB has quit [Remote host closed the connection]
cosimone has quit [Quit: Leaving]
EvW has joined #lisp
gravicappa has joined #lisp
kajo has quit [Ping timeout: 276 seconds]
gravicappa has quit [Ping timeout: 264 seconds]
awolven has joined #lisp
mindCrime__ has joined #lisp
kajo has joined #lisp
cosimone has joined #lisp
mindCrime_ has quit [Ping timeout: 245 seconds]
cartwright has joined #lisp
cantstanya has quit [Ping timeout: 260 seconds]
nanoz has quit [Ping timeout: 264 seconds]
Ven`` has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s_ has joined #lisp
davr0s has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
ikki_ has joined #lisp
ikki has quit [Ping timeout: 245 seconds]
learning has quit [Ping timeout: 246 seconds]
learning has joined #lisp
ikkitousen has joined #lisp
bradfonseca has quit [Quit: Konversation terminated!]
ikki_ has quit [Ping timeout: 245 seconds]
cosimone has quit [Quit: Leaving]
amerlyq has quit [Quit: amerlyq]
iovec has joined #lisp
elderK has quit [Read error: Connection reset by peer]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vhost- is now known as VHOST_
vyorkin`` has joined #lisp
vyorkin` has quit [Ping timeout: 246 seconds]
jackhill has quit [Quit: leaving]
jackhill has joined #lisp
niceplace has quit [Quit: ZNC 1.7.3 - https://znc.in]
ikkitousen is now known as ikki
niceplace has joined #lisp
ebrasca has quit [Remote host closed the connection]
sonologico has joined #lisp
t58 has joined #lisp
schjetne has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Ven`` has joined #lisp
t58 has quit [Client Quit]
t58 has joined #lisp
Lord_of_Life has joined #lisp
kanaee has joined #lisp
ebrasca has joined #lisp
mindCrime__ has quit [Ping timeout: 258 seconds]
mindCrime has joined #lisp
learning has quit [Remote host closed the connection]
mindthelion has quit [Remote host closed the connection]
whartung has quit [Remote host closed the connection]
learning has joined #lisp
kanaee has quit [Read error: Connection reset by peer]
EvW has quit [Ping timeout: 264 seconds]
learning has quit [Client Quit]
ikki has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cyraxjoe has quit [Quit: I'm out!]
femi has quit [Ping timeout: 268 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davr0s_ has quit [Ping timeout: 245 seconds]
davr0s_ has joined #lisp
papachan has quit [Quit: Leaving]
igemnace has quit [Quit: WeeChat 2.5]
schjetne has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
hhdave has joined #lisp
glamas has quit [Quit: ZNC 1.7.3 - https://znc.in]
sjl_ has quit [Ping timeout: 246 seconds]
glamas has joined #lisp
mindCrime has quit [Ping timeout: 258 seconds]
shwouchk has joined #lisp
ltriant has joined #lisp
karlosz has quit [Quit: karlosz]
varjag has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
Oladon_work has quit [Ping timeout: 260 seconds]
dale has quit [Quit: dale]
Bike_ has joined #lisp
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
hhdave has quit [Quit: hhdave]
hhdave has joined #lisp
akoana has joined #lisp
dddddd has quit [Remote host closed the connection]
makomo has joined #lisp
PuercoPop has quit [Ping timeout: 264 seconds]
vyorkin`` has quit [Ping timeout: 245 seconds]
alexanderbarbosa has joined #lisp
dale has joined #lisp
elderK has joined #lisp
karlosz has quit [Quit: karlosz]
PuercoPop has joined #lisp
hhdave has quit [Quit: hhdave]
EvW has joined #lisp
femi has joined #lisp
shifty has joined #lisp
LiamH has quit [Quit: Leaving.]
stepnem has joined #lisp
stepnem_ has quit [Ping timeout: 264 seconds]
karlosz has joined #lisp
smazga has quit [Quit: leaving]
lucasb has quit [Quit: Connection closed for inactivity]
cyraxjoe has joined #lisp