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
turona has quit [Ping timeout: 244 seconds]
khisanth_ has joined #lisp
mindCrime has joined #lisp
ivlioioilvi has joined #lisp
ivlioioilvi has quit [Max SendQ exceeded]
remexre has quit [Ping timeout: 245 seconds]
remexre has joined #lisp
martylake_ has joined #lisp
mindCrime has quit [Ping timeout: 276 seconds]
martylake has quit [Ping timeout: 276 seconds]
makomo has quit [Ping timeout: 248 seconds]
martylake_ has quit [Read error: Connection reset by peer]
fittestbits__ has joined #lisp
pankajgodbole has joined #lisp
Arcaelyx has quit [Quit: Arcaelyx]
jack_rabbit has joined #lisp
Arcaelyx has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
etwert has quit [Quit: Leaving]
karlosz_ has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
q9929t has joined #lisp
anewuser has joined #lisp
q9929t has quit [Remote host closed the connection]
q9929t has joined #lisp
dialectic has joined #lisp
techquila has joined #lisp
orivej has joined #lisp
q9929t has quit [Read error: Connection reset by peer]
dddddd has quit [Remote host closed the connection]
dialectic has quit [Remote host closed the connection]
dialectic has joined #lisp
q9929t has joined #lisp
karlosz_ has quit [Quit: karlosz_]
q9929t has quit [Client Quit]
orivej has quit [Ping timeout: 268 seconds]
Bike has quit [Quit: Lost terminal]
ebrasca has quit [Remote host closed the connection]
<beach> Good morning everyone!
jack_rabbit has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
akoana has joined #lisp
dialectic has quit [Quit: Ping timeout (120 seconds)]
orivej has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
gravicappa has joined #lisp
beirc has joined #lisp
beirc has left #lisp [#lisp]
torbo has quit [Remote host closed the connection]
umgeher has joined #lisp
slyrus_ has quit [Quit: Leaving]
Arcaelyx has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 258 seconds]
lavaflow_ has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
froggey has quit [Ping timeout: 272 seconds]
froggey has joined #lisp
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
ltriant has quit [Ping timeout: 248 seconds]
anewuser has quit [Quit: anewuser]
shka_ has joined #lisp
ltriant has joined #lisp
Jeanne-Kamikaze has joined #lisp
karlosz_ has joined #lisp
sauvin has joined #lisp
sauvin has quit [Max SendQ exceeded]
mepian has quit [Quit: Leaving]
<beach> I just finished watching the archived YouTube video of the presentation by jackdaniel of McCLIM. I think it was great in that it shows many of the features of McCLIM, and also the ease with which applications can be written using it.
<beach> I hope that people who did not participate in the hangout (like me) will watch the YouTube video so as to get an idea of what can be done.
sauvin has joined #lisp
<beach> I have said this before, but I'll say it again: I think McCLIM is an essential component of a better development environment for Common Lisp. Some components of such an environment already exist and are near complete like scymtym's rewrite of Clouseau. The CLIM listener is another such component. Others are planned or being worked on.
vlatkoB has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
shka_ has quit [Ping timeout: 244 seconds]
flamebeard has joined #lisp
FennecCode has quit [Quit: ERC (IRC client for Emacs 26.2)]
slyrus has joined #lisp
hiroaki has quit [Ping timeout: 245 seconds]
JohnMS_WORK has joined #lisp
Ricchi has quit [Remote host closed the connection]
<akoana> hmm, is there a library/function for a version of the ~R format directive other than english, respecting long/shortscale ?
karlosz_ has quit [Quit: karlosz_]
<akoana> to have numbers spelled out properly, e.g 10^9 in english "billion" , in french "milliard"
<jackdaniel> I'm not aware of such library
<beach> As i recall, UK English recently changed "billion" from meaning 10^12 to meaning 10^9, following US usage.
<akoana> jackdaniel: oh, thank you, so I guess that will be on the to-do list of my exercises :)
<beach> It would be a perfect addition to Acclimation.
<jackdaniel> they made some surprising actions lately, I'm waiting for them to switch from metric system back to inches ,)
<akoana> beach: the history of changes when and where from long to short is confusing, if you work in history you'll have much fun :)
<beach> I see.
<akoana> I remember Eric Naggum's words about "time" and "date"...
<jackdaniel> I think that essay was called "a short history of time"
<akoana> right, that one
jprajzne has joined #lisp
<jackdaniel> however I've found "The Long, Painful History of Time", http://naggum.no/lugm-time.html
<jackdaniel> so maybe I've mistaken the title with "a brief history of time" by Hawking
<shka__> beach: this is funny to me
<p_l> jackdaniel: there is a voiced group of people who insist on moving back to imperial units, yes...
<shka__> for maximum irony UK should officially become the USA colony
<shka__> puerto rico style
<p_l> shka__: well, that's a bit what the expected "trade deal" with USA will feel like ;)
<jackdaniel> not that I live in a sane country, who am I to talk. that said, sorry for the offtopic
<shka__> oh, this is not lispacfe
<shka__> sorry!
milanj has quit [Quit: This computer has gone to sleep]
<akoana> jackdaniel: I'v watched some of your videos on youtube (McCLIM) - I had to install McCLIM and play with it for hours after that - excellent!
SaganMan has joined #lisp
<akoana> jackdaniel: thanks for working on McCLIM! and thanks to beach for recommending it earlier :)
<jackdaniel> I'm glad you've liked them
<akoana> waiting for the next one ;)
<jackdaniel> since we are at it, I've mentioned in a video that lower abstraction levels of mcclim can be used to implement any toolkit (and we plan to refactor them as a standalone library)
<akoana> just joking, I need weeks to grasp this
<jackdaniel> I have a working proof of concept of immediate mode gui toolkit working
<jackdaniel> (made it yesterday)
<p_l> tbqh, McCLIM could do with some model/semantic upgrades tooo...
<jackdaniel> p_l: what do you mean?
<p_l> jackdaniel: a way to query "semantic" or let's call it "logic" view of the UI, to implement external access to it
<p_l> important for accessibility as well as automation and testing
<jackdaniel> I'm still lost, sorry
<jackdaniel> you may access output-record-history programmatically
<jackdaniel> if that's what you ask
<jackdaniel> and you may queue events also this way
orivej has joined #lisp
<p_l> that's "implementation detail" which doesn't match semantics of the application, though it's a start on where to implement it given CLIM differences
<jackdaniel> in clim-exmaples there is a "Hierarchy viewer" which also shows how to access individual panes properties and draw them
<jackdaniel> I think that I'll have better chance to understand if you illustrate that with exmaples
<p_l> but essentially, things like accessibility need a "hierarchy viewer" that skips details that aren't relevant for content but keeps (or even adds) logic of the UI
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
schweers has joined #lisp
frgo has joined #lisp
<p_l> for example, I don't care about how toolkit containers (let's say embedded panes) are arrayed to build a custom panel, I'm interested in logical groupings of buttons and what the buttons do, so I can punt it to screenreader and let it select them
<jackdaniel> what you want are commands (which are part of CLIM abstraction)
<jackdaniel> each command may have a documentation
ltriant has quit [Quit: leaving]
<p_l> jackdaniel: that makes for a bit easier job, but I would also need a way to map presentations and other screen content
<jackdaniel> buttons are "graphical gadget" while commands are "semantic actions" as you've put it
<p_l> yes
<jackdaniel> map presentations over what?
<p_l> jackdaniel: turn presentations into something that can be programmatically desscribed to, for example, blind user
<jackdaniel> that's what view's are defined for
<p_l> (or a test tool, those use accessibility APIs as well)
<jackdaniel> you may specialize present on "blind-view", and when you present it on such screen then it will, i.e, vocalize it to them
<p_l> jackdaniel: that would involve implementing manually such support as special view, which is ... well, pretty behind the times and problematic in other ways
<jackdaniel> view is one of specializable arguments to "present", and each stream has a view associated with it
<jackdaniel> I don't know how you want to provide automatic "description" of anything, it is a gui toolkit, not ai - it won't implement semantics for you - only provide you tools to do so
<p_l> jackdaniel: I'd say that Inspect.exe and AccScope.exe from Windows SDK are something to play with there. It's not about making an AI, it's about attaching information to a "normal" GUI that gets relayed to common "introspection" API used by screenreaders et al
<jackdaniel> you've mentioned blind users and "mapping presentations for them". I don't understand what you mean by that (also I don't have Windows, so there is a slim chance I'll play with said applications)
<jackdaniel> if anything at all CLIM suffers from abstraction bloat (which is vastly unknown to people using it so many things get reimplemented in application logic), so adding new "semantic layers" is something I'm sceptical about
akoana has left #lisp ["Leaving"]
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
<dmiles> i suppose semantics are what is kept in VoiceXML
<dmiles> I been tinking aobut a VoiceXML to GUI app sometime
<dmiles> (VoiceXML is nomrally used for navigating call trees)
<dmiles> (as in making airline reservations etc)
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
<dmiles> anyhow i just bring it up because its a paradymn of what semantics at minimum would be
<p_l> dmiles: Windows automation/accessibility framework has something like "export VoiceXML from GUI" system
<dmiles> *nod* yep
Lord_of_Life has joined #lisp
* dmiles wrote an app for blind peopel to play in SL
<dmiles> secondlife*
<dmiles> but i wrote it not for them but for my AI creature
<dmiles> well tried to keep in mind both minds
manualcrank has quit [Quit: WeeChat 1.9.1]
<dmiles> that API is not very perfect or pretty but with some touchup it is at least not too offensive
<dmiles> by that i mean that most programs dont add the meta-information and when you try to make it out of hwta is there.. you sort of have to bandaid that hte programmer named the first 20 butten "Test1"
oni-on-ion has quit [Ping timeout: 264 seconds]
ggole has joined #lisp
<dmiles> such as by checking the label name on the button is some cases.. or the varname etc.. until you find where the programmer added their salience
<dmiles> generally though all the things that are needed is there
SaganMan has quit [Ping timeout: 245 seconds]
oni-on-ion has joined #lisp
<dmiles> i suppose this tech is not much differnt thant scraping the semantics off of html forms
<dmiles> if course i wish all the time the programmers could have actualyl started the gui from semantics :)
<dmiles> of*
makomo has joined #lisp
DGASAU has quit [Ping timeout: 245 seconds]
<sindan> I'm embarrassed to ask, but down to a very simple case, (defun func (place) (setf place 1)), calling (func *var*) returns 1 but the value of *var* is not changed. I don't see why.
cosimone has joined #lisp
<jackdaniel> because variables and their bindings are not the same thing
<jackdaniel> when you enter the function, a binding of name place to value of *var* is made
<jackdaniel> when you call (setf place 1), then you change the binding
<makomo> you have to be careful with terminology here, because according to the definition in the standard, a variable *is* a binding
<sindan> that's what confuses me
<makomo> variable n. a binding in the ``variable'' namespace.
<beach> sindan: Another way of putting it is that Common Lisp uses call-by-value, so the parameter PLACE contains the VALUE of *VAR*, without any relation to *VAR*.
<makomo> this is the core of the issue ^^
<sindan> is it possible to call by reference?
<beach> No.
<beach> sindan: You would need a macro to get that effect.
<sindan> yes but I can't compile a macro inside a program and hope that it works with different variables, I think
<beach> I don't know what that means.
<sindan> well how can I get that effect you were referring a line above?
<beach> (defmacro mac (variable) `(setf ,variable 1)) then (mac *var) [untested, so modulo stupid mistakes].
<beach> er, *var*, not *var.
<sindan> I make the same mistake all the time :)
<sindan> that's how incf/decf do, for example?
<sindan> s/do/work
<beach> Yes, pretty much.
<beach> They are more complicated because you can do (incf (aref array index)) too.
<LdBeth> Because setf doesn’t work by take a place like a pointer in C and update the value referred by the pointer
<beach> sindan: This particular macro I wrote will work for other places like AREF etc.
<LdBeth> For example (setf (car a) b) expands to something like (rplacar a b)
<beach> sindan: But INCF, DECF, etc, must be careful not to evaluate sub-forms multiple times.
<sindan> because of setf's magic I guess
<makomo> hm, does that solve the problem he has though? supposing he doesn't use (mac *var*) but just uses (mac place), he still has the same problem
<makomo> i.e. the real solution is replacing PLACE with *VAR*
<beach> makomo: You must know more than I do about sindan's problem.
<LdBeth> makomo: you can bing (cons 1 nil) to var
<LdBeth> bing -> bind
<makomo> LdBeth: i'm not seeing the connection, why is that important?
<dmiles> if you study how setf expansion works you will see that they usualyl speificy both a getter and a setter
<beach> sindan: Like, (incf (aref (f x) (g y))) can not expand to (setf (aref (f x) (g y)) (1+ (aref (f x) (g y))))
pankajgo` has joined #lisp
<makomo> beach: i mean, he can "just" use the original SETF he had and replace PLACE with *VAR*
pankajgodbole has quit [Ping timeout: 245 seconds]
<makomo> ah, i see what you meant now
<makomo> your solution was to use MAC instead of FUNC, right
<beach> Right.
<dmiles> even most expanders in fact epand to produce a synthetic var that held the getted value
<beach> sindan: Because (f x) and (g y) will then be called twice, so if they have side effects, the result will be incorrect.
<sindan> I just didn't expect this as I have many times used (for example) (setf (third ...) value) without problems. Then I use a variable and it doesn't work because what was explained, but then clhs 5.1.2.1 variable names as places, so I still don't understand it very well
<beach> sindan: You can still use a variable with SETF.
<makomo> sindan: (third x) will "work" (i.e. you will see its effects outside of your function) because you're modifying a cons cell somewhere, not a local variable
<beach> sindan: Which you did, but the variable was the parameter of the function, so it was modified and then the function returned, and the effect was lost.
stepnem has quit [Ping timeout: 268 seconds]
<dmiles> (they use the "synthetic var that held the getted value") so for instnace that a INCF doesnt get called more than once)
<jackdaniel> you may also pass a symbol and use set/get on it, however this is discouraged by many people
<sindan> but not if it has gone through a binding like in my case
<makomo> sindan: the issue boils down to call-by-value and places being implemented in terms of macros (i.e. as "syntactic things", rather than "first-class features" of the language)
stepnem has joined #lisp
<sindan> yes I understand that places are implemented like convenient tricks. I have written some setf expanders
<beach> sindan: A place can not "go through a binding", because places are not first-class objects in Common Lisp.
<makomo> sindan: what does "gone through a binding" mean?
<beach> sindan: Whenever you bind a variable to a place, it is the value of that place that you get.
<beach> sindan: And, as it happens, a function call will bind the parameters of the function to the values of the arguments.
<LdBeth> This is what you could have if you really needs a function updates external variable by passing to it as an arg
<beach> LdBeth: Your function parameter has a misleading name.
<beach> LdBeth: It should be either CONS or LIST or CELL or something like that.
<LdBeth> Ok, or maybe “box”
<beach> Sure.
<sindan> LdBeth, I see, to be able to use setf expansions
<sindan> but if (in the function) (setf place 1) would not "work" (modify the value of the original binding), then why does say the hs 5.1.2.1 that variables are places?
<beach> sindan: It works.
<beach> sindan: It correctly modifies the value of the parameter PLACE.
<beach> That parameter is a variable so it is a place, and the place gets modified.
<beach> sindan: If you put (PRINT PLACE) after (SETF PLACE 1), you will see that PLACE has been modified.
stepnem has quit [Ping timeout: 246 seconds]
Jesin has quit [Ping timeout: 272 seconds]
hhdave has joined #lisp
<beach> sindan: You see?
<sindan> yes but then "place" means different things with regard to what the expansion is going to be. The expansion of places like nth or caar cna reach outside of the current binding, while variable as a place cannot "go up" the ladder of bindings that have happened. If you know what I mean. The terminology is wonky I think.
<beach> No, it is you having the wrong model of how things work.
stepnem has joined #lisp
<beach> sindan: There is no going up any ladder.
<sindan> it could very well be
<beach> sindan: In LdBeth's example, the argument to the function is a CONS cell, and since nothing is ever copied in Common Lisp, then the parameter value is the same CONS cell as the argument.
<beach> sindan: So when you do (SETF (CAR CELL) 1), the place is the CAR of the CONS cell.
<LdBeth> Besides, cl-locatives provides C style pointer/ SML style reference
<beach> sindan: It just so happens that the structure (in this case the CONS cell) is shared between the caller and the callee.
<beach> LdBeth: I think you are confusing sindan here.
SaganMan has joined #lisp
<sindan> beach so this confuses me also: the structure is shared, but there is a current binding, and changes create new structure in the current binding right?
<beach> I don't know what it means to create structure in a binding.
<sindan> create new cells
<beach> sindan: No.
<beach> sindan: When you do (SETF (CAR CELL) 1) then no new structure is created.
wigust has joined #lisp
<beach> sindan: There is one cell, and it has a CAR and a CDR slot. That form alters the CAR slot, so that it now contains 1 rather than what it used to contain.
wigust- has quit [Ping timeout: 246 seconds]
<LdBeth> the form is equivalent to function call (rplaca cell 1)
<beach> sindan: Try this: (defparameter *cell* (cons 234 345)) then (setf (car *cell*) 1) then *cell*.
<beach> sindan: Or even this: (defparameter *cell1* (cons 234 345)) then (defparameter *cell2* *cell1*) then (setf (car *cell1*) 1) then *cell2*
<beach> sindan: It is important that you understand the result.
<sindan> bot get changed as there is only one structure
<beach> Yes, and it's the same in LdBeth's example. The function parameter and the function argument contain the same pointer to a single CELL.
<sindan> but (setq *cell1* 'a) will change the pointer to a new value, while *cell2* remains the same
<beach> Correct.
<beach> Because then the place is the variable *cell1*. So it will change.
<beach> Similarly, in your original example, (SETF PLACE 1) the place is the parameter PLACE, so it is modified.
DGASAU has joined #lisp
<beach> sindan: I recommend you start drawing some box diagrams where each variable is a box containing a pointer, and each CONS cell is a box containing two cells, each containing a pointer.
<beach> sindan: You will then see that *cell1* and *cell2* each has a box. The two boxes contain the same pointer, pointing to a CONS cell.
<beach> The CONS cell initially contains (pointers to, if you like) 234 and 345.
<beach> When you do (SETF (CAR *CELL1*) 1), you alter the CAR slot of the CONS cell, so that it now contains a (pointer to) 1.
fivo has joined #lisp
<beach> When you do (SETF *CELL1* 'A), you alter the box of *CELL1* so that it now contains (a pointer to) the symbol A.
<beach> It really is that simple.
xantoz has quit [Remote host closed the connection]
<beach> Other programming languages have much more complicated models.
<sindan> the arrow can be called binding?
<beach> The box is the binding, and the arrow is what it is bound to.
<beach> Arrows (pointers) are values, and boxes are places.
<sindan> and a binding is a box+pointer?
<beach> Yes, you can say that.
<sindan> hm important to get that right
<beach> Yes.
<beach> Look in the Common Lisp HyperSpec glossary under "binding".
<sindan> Hm if the terminology holds everywhere I should be a bit closer to nirvana
<beach> The Common Lisp HyperSpec is very good with consistent terminology.
<sindan> yes but I've tried to navigate it before, it's the eponymous reference work: some examples would make it less dry.
<sindan> Anyway I'll stick to that image
<beach> I recommend a book for that.
<beach> Like PCL.
<beach> I can help you understand, but I can't rewrite the Common Lisp HyperSpec for you.
<sindan> I really like the community around Lisp; and I have several books. The problem is I get excited and goof off and write lisp and abandon the book in the middle
<sindan> so the components of a binding are exactly two: a name and a pointer, right?
<beach> Yes.
<shka__> sindan: pointer is probabbly a misnomer here
steiner has quit [Remote host closed the connection]
<beach> shka__: It is sometimes the best model.
<sindan> shka__, suggestions?
<shka__> very well
<beach> sindan: You can use "reference" if you prefer.
<sindan> when is it not a good model then?
<beach> But it's really the same thing.
<shka__> sindan: if beach thinks it is suitable name, i won't argue
<beach> sindan: you don't have to worry about that right now.
<sindan> hm not happy with that beach
<beach> sindan: But the implementation is allowed to optimize so that if the object that is referred to is immutable...
<beach> it can use the object itself instead of a pointer to it.
<sindan> ah
<shka__> or, for instance, if there is eq assertion above
<LdBeth> sindan: if you know what is three star programmer. That’s the wrong model ;D
steiner has joined #lisp
<beach> sindan: But for the purpose of understanding, you can think of every object as being manipulated indirectly through a pointer.
<shka__> pass by pointer
<shka__> basicly
<beach> sindan: So Common Lisp uses call-by-value semantics, but the values are pointers, or references.
<beach> sindan: I call that "uniform reference semantics".
<beach> sindan: The "semantics" part is there to mean ", or it is as if"
amerlyq has joined #lisp
<sindan> I see.
<sindan> Thanks for the help!
<beach> Sure.
faheem_ has joined #lisp
faheem has quit [Ping timeout: 272 seconds]
pankajgo` has quit [Ping timeout: 272 seconds]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
fivo has quit [Quit: WeeChat 1.9.1]
random-nick has joined #lisp
libertyprime has joined #lisp
<sindan> I have some trouble with nil - if (car nil) is nil and (cdr nil) is nil, why is (cons nil nil) (nil) and not nil
<sindan> ?
<shka__> sindan: because car is nil and cdr is nil
<shka__> cons is: new list, car is the first argument, cdr is the second argument
<no-defun-allowed> Likely historical purposes, I haven't a clue really. In Scheme you can't take the car nor cdr of an empty list.
<beach> sindan: (car nil) and (cdr nil) are just defined that way. There is nothing special with NIL. The special case is with CAR and CDR.
<sindan> ouch ok,
<beach> sindan: So NIL is a symbol, not a CONS cell, and (CONS NIL NIL) creates a CONS cell, so it can not be the same as NIL.
<beach> sindan: In fact, in SICL, CAR is defined as: (defun car (x) (cond ((consp x) (primitive-car x)) ((null x) nil) (t (error ...))))
<sindan> so a variable bound to nil is not bound to any kind of list, but the symbol
<beach> Correct.
<beach> And no-defun-allowed is right, it has to do with historical baggage.
<sindan> and it should not be possible to transform a list like (1 2 3) into nil by way of rplaca and rplacd
<beach> Correct, it is not possible.
<sindan> hm *abstractions* hehe
<sindan> that was interesting
<no-defun-allowed> I think there's a few reasons for (cdr nil) = (car nil) = nil here and there that are outright disgusting, but save you some code when you get bored.
<moldybits> i think it's nice?
orivej has quit [Ping timeout: 248 seconds]
<beach> moldybits: You are asking us?
<LdBeth> Taking everything except nil as true is close to “propositionally true”
alca has joined #lisp
steiner has quit [Read error: Connection reset by peer]
vaporatorius has joined #lisp
theemacsshibe has joined #lisp
frgo has quit [Remote host closed the connection]
orivej has joined #lisp
m00natic has joined #lisp
frgo has joined #lisp
frgo has quit [Ping timeout: 268 seconds]
pfdietz has quit [Remote host closed the connection]
frgo has joined #lisp
JohnMS has joined #lisp
theemacsshibe has quit [Quit: /me goes poof]
m00natic has quit [Remote host closed the connection]
JohnMS_WORK has quit [Ping timeout: 245 seconds]
m00natic has joined #lisp
karswell has joined #lisp
m00natic has quit [Remote host closed the connection]
m00natic has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
libertyprime has quit [Quit: leaving]
ebrasca has joined #lisp
techquila has quit [Remote host closed the connection]
t58 has joined #lisp
snai1 has joined #lisp
dddddd has joined #lisp
<snai1> Hi, is it possible in lisp to do something like that:(defun hee-mappoint (r)
<snai1> "Returns the function that maps the standard coordinates into the given rectangle R"
<snai1> (lambda (p)
<snai1> (hee-sum-points (hee-point (* (hee-p-x p) (hee-rec-b r))
<snai1> (* (hee-p-y p) (hee-rec-h r)))
<snai1> (hee-rec-o r))))
<snai1>
<snai1> the basic idea is instead of create a function that takes 2 arguments and returns the answer, i'd like to define a function that given one argument returns an other function that takes one argument and solves the problem
<ebrasca> snai1: Can you use some pastebin?
<no-defun-allowed> Yes, with definitions of hee-sum-points, hee-point, hee-p-x, etc, and preferably using a paste service like pastebin, github gist, plaster.tymoon.eu, etc.
<snai1> yes, but my question should be generic. you can assume that those function work
<snai1> my question is "is it allowed in lisp to do that?"
<no-defun-allowed> Yes, you can make closures like that, as Lisp is lexically scoped unless told otherwise.
<no-defun-allowed> An example of a closure maker is CONSTANTLY, which could be defined as (defun constantly (value) (lambda (&rest rest) value))
<snai1> because the interpreter (Emacs Lisp, so that could be the problem) says that t is unbound
<no-defun-allowed> Common Lisp /= Emacs Lisp, the latter uses dynamic binding unless told otherwise.
<snai1> but basically t should be bound after the evaluation of hee-mappoint
<shka__> snai1: use other variable name
<shka__> not T
<shka__> because cl:t is reserved
<shka__> you can shadow it
<shka__> you shouldn't
<no-defun-allowed> Your code doesn't use the name T, but I'll guess you changed it somewhat, and you probably should change it back because T is a constant.
<snai1> no-defun-allowed: ok, i suppose that. thanks
<snai1> sorry i mean 'r' not 't'
<no-defun-allowed> If you install a CL implementation like SBCL, then you can (with absolute minimal effort) use `M-x run-lisp` to get a Common Lisp system to test with.
<snai1> ok thanks to everyone
CrazyEddy has quit [Ping timeout: 272 seconds]
cosimone has quit [Quit: WeeChat 2.4]
CrazyEddy has joined #lisp
pmden has joined #lisp
etwert has joined #lisp
t58 has quit [Quit: Leaving]
Lycurgus has joined #lisp
etwert has quit [Ping timeout: 245 seconds]
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
snai1 has quit [Remote host closed the connection]
pjb has quit [Remote host closed the connection]
rippa has joined #lisp
pjb has joined #lisp
rumbler31 has joined #lisp
kajo has quit [Ping timeout: 276 seconds]
rumbler31 has quit [Ping timeout: 244 seconds]
finalpatch has joined #lisp
finalpatch has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
Lycurgus has quit [Quit: Exeunt]
pfdietz has joined #lisp
bendersteed has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
cosimone has joined #lisp
cosimone has quit [Client Quit]
bendersteed has quit [Remote host closed the connection]
Bike has joined #lisp
Bike has quit [Remote host closed the connection]
Bike has joined #lisp
fivo has joined #lisp
q9929t has joined #lisp
uint has joined #lisp
q9929t has quit [Quit: q9929t]
milanj has joined #lisp
steiner has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fivo has quit [Quit: WeeChat 1.9.1]
manualcrank has joined #lisp
xkapastel has joined #lisp
jmercouris has joined #lisp
pkkm has joined #lisp
umgeher has quit [Quit: WeeChat 2.5]
mindCrime has joined #lisp
ebrasca has quit [Remote host closed the connection]
vlatkoB_ has joined #lisp
umgeher has joined #lisp
EvW has joined #lisp
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
vlatkoB has quit [Ping timeout: 268 seconds]
ebrasca has joined #lisp
fraya has joined #lisp
sjl_ has joined #lisp
cosimone has joined #lisp
rumbler31 has joined #lisp
steiner has quit [Ping timeout: 248 seconds]
jmercouris has quit [Ping timeout: 245 seconds]
lucasb has joined #lisp
smazga has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Ping timeout: 258 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
mindCrime has quit [Ping timeout: 276 seconds]
jprajzne has quit [Remote host closed the connection]
sjl_ has quit [Quit: WeeChat 2.3-dev]
EvW2 has joined #lisp
sjl has joined #lisp
jmercouris has joined #lisp
EvW2 is now known as EvW1
q9929t has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
EvW1 is now known as EvW
q9929t1 has joined #lisp
shka__ has quit [Remote host closed the connection]
q9929t1 has quit [Read error: Connection reset by peer]
q9929t has quit [Quit: q9929t]
shka__ has joined #lisp
EvW has quit [Ping timeout: 248 seconds]
pkkm has quit [Ping timeout: 276 seconds]
pkkm has joined #lisp
q9929t has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
bendersteed has joined #lisp
CloseToZero has joined #lisp
CloseToZero has quit [Quit: WeeChat 2.5]
CloseToZero has joined #lisp
FreeBirdLjj has joined #lisp
vtomole has joined #lisp
jmercouris has quit [Ping timeout: 244 seconds]
mindCrime has joined #lisp
v88m has quit [Remote host closed the connection]
schweers has quit [Ping timeout: 250 seconds]
v88m has joined #lisp
igemnace has joined #lisp
pkkm has quit [Ping timeout: 250 seconds]
v88m has quit [Remote host closed the connection]
benderst` has joined #lisp
v88m has joined #lisp
pkkm has joined #lisp
bendersteed has quit [Ping timeout: 248 seconds]
benderst` has quit [Remote host closed the connection]
Oladon_work has joined #lisp
frgo_ has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
frgo_ has quit [Ping timeout: 244 seconds]
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
Denommus has joined #lisp
flamebeard has quit []
dale_ has joined #lisp
dale_ is now known as dale
q9929t has quit [Quit: q9929t]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
sjl has quit [Quit: WeeChat 2.3-dev]
etwert has joined #lisp
sjl has joined #lisp
sjl has quit [Client Quit]
fraya has quit [Ping timeout: 248 seconds]
zooey has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
werrwer has joined #lisp
sjl has joined #lisp
etwert has quit [Ping timeout: 245 seconds]
whartung has quit [Ping timeout: 268 seconds]
asdf_asdf_asdf has joined #lisp
<asdf_asdf_asdf> Hi. How supports "eof-error-p" from (read-line...) [Common Lisp] [SBCL]?
<asdf_asdf_asdf> (read-line...) probably throws errors to "eof-error-p"? And How it support?
<beach> Do you want to error on end of file, or do you want to return something?
<beach> Yes, by default, an error is signaled (not "thrown") at end of file.
<asdf_asdf_asdf> I want get (support) error from read-line.
<beach> What do you mean by "(support)"?
<asdf_asdf_asdf> I get error maybe, because (read-line...) thrown error (non-exit status code).
sjl has quit [Quit: WeeChat 2.3-dev]
<beach> Now, it doesn't "throw" an error. It "signals" one.
<asdf_asdf_asdf> try (read-line) catch (...? How it do?
<beach> I am afraid I do not understand what you want.
<beach> Do you want to handle the error that it signals?
<beach> And if so, how do you want to handle it?
<asdf_asdf_asdf> Yes.
sjl has joined #lisp
<beach> The easiest is to call it like this (read-line stream nil nil), then you can test for NIL being returned.
<beach> NIL can not be returned otherwise, because a string is returned when it is not end of file.
<beach> asdf_asdf_asdf: Try something like (loop for line = (read-line stream nil nil)
<beach> Er, sorry.
<beach> asdf_asdf_asdf: Try something like (loop for line = (read-line stream nil nil) until (null line) collect line)
sjl has quit [Client Quit]
<beach> That should give you a list of all the lines read from the stream.
<beach> asdf_asdf_asdf: If you really need to handle an error, you need to read up on HANDLER-CASE, but that's probably overkill in this situation, especially since you don't seem to know much about error signaling at all.
sjl has joined #lisp
rumbler31 has joined #lisp
sjl has quit [Client Quit]
sjl has joined #lisp
sjl has quit [Client Quit]
<asdf_asdf_asdf> @beach; thank You very much. It works, https://cpy.pt/cPEcWdCu .
<beach> Anytime.
Denommus has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 258 seconds]
karlosz_ has joined #lisp
pmden has quit [Quit: Goodbyeee]
<Xach> Argh. My quicklisp cron job script runs fine from the command line but fails without output from cron.
shka_ has joined #lisp
EvW has joined #lisp
<beach> Ouch!
m00natic has quit [Remote host closed the connection]
hhdave has quit [Quit: hhdave]
<Xach> The log indicates that the cron system does run it at the desired time.
<Xach> time to add more debugging somewhere!
ggole has quit [Quit: Leaving]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
<ck_> I heard good things about printf
<beach> clhs printf
<specbot> Couldn't find anything for printf.
orivej has joined #lisp
<ck_> clhs cron
<specbot> Couldn't find anything for cron.
<ck_> your move again
<beach> I give up. Dinner is imminent anyway.
Necktwi has joined #lisp
werrwer has quit [Ping timeout: 246 seconds]
Lycurgus has joined #lisp
Lycurgus has quit [Quit: Exeunt]
turona1 has quit [Ping timeout: 268 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
igemnace has quit [Ping timeout: 246 seconds]
slyrus_ has joined #lisp
slyrus1 has joined #lisp
slyrus has quit [Ping timeout: 244 seconds]
slyrus2 has quit [Ping timeout: 248 seconds]
igemnace has joined #lisp
themsay has joined #lisp
etwert has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
sjl has joined #lisp
<Xach> I don't think it's reaching lisp before it stops
lnostdal has quit [Remote host closed the connection]
<ck_> did something get jumbled permissions-wise?
lnostdal has joined #lisp
<p_l> Xach: if by tomorrow it's not unstuck, want an extra pair of eyes? (currently too busy to look)
<Xach> p_l: possibly!
<Xach> ck_: I'm sure it's something to do with the minimal cron environment vs the maximal shell environment, but i don't know what specifically makes the critical difference. lack of a controlling terminal? missing environment variable? the mind reels.
<ck_> the system V laughs in the distance
<ck_> have you tried having the shellscript run with verbosity already?
<ck_> maybe your crond has flags for more logging as well
werrwer has joined #lisp
etwert has quit [Ping timeout: 245 seconds]
xrash has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
karlosz_ has quit [Quit: karlosz_]
themsay has quit [Ping timeout: 248 seconds]
t58 has joined #lisp
turona1 has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
random-nick has quit [Read error: Connection reset by peer]
<Xach> I will try running with more verbose options.
fraya has joined #lisp
<jackdaniel> Xach: I can't see my recent changes to magicl being pulled into the newest distribution (changes from around May)
<jackdaniel> quick check in releases.txt seem to indicate, that quicklisp has a tarball from 2019-01-07
milanj has quit [Quit: This computer has gone to sleep]
milanj has joined #lisp
<Xach> jackdaniel: quicklisp uses the latest release, which is from that date
<jackdaniel> is it because https://github.com/rigetti/magicl is not considered canonical repository, or that it didn't get pulled
<Xach> who is that dope who released last
<jackdaniel> alright, thank you for clarification :)
ertewe has joined #lisp
fraya has left #lisp [#lisp]
<jackdaniel> any chance for a release soon? I can work with magicl in common-lisp directory, but ecl supported by more software upstream gets us closer to world dominance
werrwer has quit [Read error: Connection reset by peer]
<jackdaniel> and deadlines are tight, world is dying after all
milanj has quit [Client Quit]
gareppa has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
gravicappa has quit [Ping timeout: 272 seconds]
amerlyq has quit [Quit: amerlyq]
<Xach> jackdaniel: I will inquire with the people
<jackdaniel> great, thank you
themsay has joined #lisp
random-nick has joined #lisp
themsay has quit [Ping timeout: 272 seconds]
oni-on-ion has quit [Remote host closed the connection]
Lord_of_Life_ has joined #lisp
oni-on-ion has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life_ is now known as Lord_of_Life
EvW has joined #lisp
shka__ has quit [Ping timeout: 245 seconds]
shka__ has joined #lisp
milanj has joined #lisp
themsay has joined #lisp
turona1 has quit [Read error: Connection reset by peer]
vlatkoB_ has quit [Remote host closed the connection]
flanx has joined #lisp
<flanx> Is there an idiomatic way to write
<flanx> (mapcar (lambda (x) (cons (f (car x)) (cdr x))) ls)
<Bike> that seems fine to me
<ck_> flanx: maybe alexandria has something (probably called map-convolute-double-reverse-curry or something); otherwise, why not keep it like it is? doesn't look too bad
<Bike> you could abstract it out a little, i guess
<flanx> I mean, all I really want is mapcaar...
<flanx> Alexandria doesn't seem to have it.
<Bike> (defun mapcaar (f x) (mapcar (lambda (x) (cons (funcall f (car x)) (cdr x))) x)), (mapcaar #'f ls), i guess
<flanx> Sure. I'd prefer not to do it just for a single use is all. Oh well. :)
<aeth> you could always do something like (defun foo (f) (lambda (x) (cons (funcall f (car x)) (cdr x)))) (mapcar (foo f) l)
<aeth> (not sure if the parens are balanced, I did that in IRC)
asdf_asdf_asdf has quit [Ping timeout: 260 seconds]
<aeth> If you wanted it to work in general, you could write a macro that uses destructuring-bind and have a syntax where there are two symbols, one where the function is called and when where it isn't. e.g. the destructuring (* . _) would tell it to expand to (destructuring-bind (#:G527 . #:G528) list `(,(f #:G527) . ,#:G528))
<aeth> s/list/sublist/
kajo has joined #lisp
<dlowe> maybe (mapcar (alexandria:compose f 'car) list)
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
<sjl> that doesn't leave the cdrs in place
CloseToZero has quit [Quit: WeeChat 2.5]
rumbler31 has joined #lisp
xrash has quit [Ping timeout: 245 seconds]
cosimone has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
<dlowe> ah, I see.
<aeth> oh, actually the destructuring macro could provide the function to be called directly in the destructuring itself, using identity as the function if it's unchanged... Of course, it would optimize identity away at the macro since the implementation might not be that smart. So the pattern in the problem then reduces to (f . identity)
<dlowe> this seems like a lot of effort to avoid a lambda
<flanx> I agree.
asdf_asdf_asdf has joined #lisp
<aeth> it would absolutely be a lot of effort...
makomo has quit [Quit: WeeChat 2.4]
pkkm has quit [Read error: Connection reset by peer]
umgeher has quit [Read error: Connection reset by peer]
umgeher1 has joined #lisp
Lycurgus has joined #lisp
moldybits has quit [Quit: WeeChat 2.4]
moldybits has joined #lisp
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
cosimone has joined #lisp
cosimone has quit [Client Quit]
gareppa has quit [Quit: Leaving]
xrash has joined #lisp
themsay has quit [Ping timeout: 248 seconds]
bendersteed has joined #lisp
Arcaelyx has joined #lisp
ertewe has quit [Ping timeout: 272 seconds]
xrash has quit [Read error: Connection reset by peer]
themsay has joined #lisp
<sjl> just write the lambda, or possibly (loop :for (x . y) :in ls :collect (cons (f x) y))
flanx has quit [Remote host closed the connection]
techquila has joined #lisp
<aeth> sjl: too bad LOOP doesn't support full destructuring-bind destructuring, because if it did that would basically be the perfect template for the too-hard-to-write macro I just described
Lycurgus has quit [Quit: Exeunt]
asdf_asdf_asdf has quit [Ping timeout: 260 seconds]
asdf_asdf_asdf24 has joined #lisp
mindCrime has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
milanj has joined #lisp
stylewarning has quit [Ping timeout: 245 seconds]
etwert has joined #lisp
stylewarning has joined #lisp
nicdev has quit [Ping timeout: 244 seconds]
Bike has quit [Quit: Bike]
themsay has quit [Ping timeout: 245 seconds]
dpl has joined #lisp
Ricchi has joined #lisp
slyrus2 has joined #lisp
slyrus__ has joined #lisp
Marlin1113 has joined #lisp
slyrus1 has quit [Ping timeout: 244 seconds]
slyrus_ has quit [Ping timeout: 248 seconds]
aeth has quit [Disconnected by services]
aeth has joined #lisp
shka_ has quit [Ping timeout: 248 seconds]
vtomole has quit [Ping timeout: 260 seconds]
themsay has joined #lisp
aeth has quit [Ping timeout: 245 seconds]
aeth has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
etwert has quit [Ping timeout: 258 seconds]
umgeher2 has joined #lisp
quazimodo has quit [Ping timeout: 246 seconds]
umgeher1 has quit [Ping timeout: 245 seconds]
Bike has joined #lisp
random-nick has quit [Ping timeout: 244 seconds]
dpl has quit [Ping timeout: 245 seconds]
asdf_asdf_asdf24 has left #lisp [#lisp]
sjl has quit [Ping timeout: 258 seconds]
alexanderbarbosa has joined #lisp
Oladon_work has quit [Remote host closed the connection]
faheem has joined #lisp
Oladon_work has joined #lisp
faheem_ has quit [Ping timeout: 244 seconds]
dddddd has quit [Remote host closed the connection]
smazga has quit [Quit: leaving]
stepnem_ has joined #lisp
stepnem has quit [Ping timeout: 258 seconds]
ltriant has joined #lisp
Oladon has joined #lisp
thijso has quit [Ping timeout: 245 seconds]