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
<mfiano> Can the MOP allow me to have a class named by a cons rather than a symbol?
<Bike> i don't believe so.
<mfiano> Ok thanks.
<no-defun-allowed> As in, (find-class '(your . cons)) will give you that class, or that the class-name of that class is your cons?
smokeink has joined #lisp
<mfiano> The latter. Don't ask why. I think both of our heads would explode if I tried to explain it. It just seems like the best abstraction for a hard problem I've been trying to solve.
<no-defun-allowed> I think you can do (make-instance 'standard-class :name '(your . cons)) to make a class that has a cons for a name, but I don't know if it's portable.
monokrom has quit [Ping timeout: 246 seconds]
<Bike> mop doesn't really cover the interaction with the environment
karlosz has joined #lisp
<mfiano> I would like to (make-instance '(pkg1:foo pkg2:bar) ..) but if it's not possible I'll continue my search
<Bike> probably not possible
<Bike> of course you can define your own find-class etc
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
smokeink has quit [Client Quit]
<mfiano> Yeah I think that is a better idea
t58 has quit [Quit: Leaving]
<mfiano> Which may work for my purpose. Thanks
libertyprime has joined #lisp
monokrom has joined #lisp
<pjb> mfiano: make-instance is a generic function. If you can map your list onto a symbol, then you can do it.
<pjb> mfiano: but are you able to map lists onto symbols? Are you?
<mfiano> Depends what you mean by that
<pjb> (intern (format nil "~S" '(foo bar))) #| --> |(foo bar)| ; nil |#
<pjb> duh!
<mfiano> Well yeah, that's an option.
EvW1 has quit [Ping timeout: 245 seconds]
<Bike> oh, huh, according to beach's pages at least the class-name is only "usually" a symbol
<Bike> did not know
<Bike> that doesn't change find-class tho
rgherdt has quit [Quit: Leaving]
monokrom has quit [Remote host closed the connection]
puchacz has quit [Quit: Connection closed for inactivity]
Oladon has joined #lisp
dale has joined #lisp
makomo has quit [Ping timeout: 252 seconds]
pierpal has joined #lisp
longshi has quit [Ping timeout: 245 seconds]
wiselord has quit [Read error: Connection reset by peer]
wiselord has joined #lisp
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpal has quit [Ping timeout: 276 seconds]
wiselord has quit [Read error: Connection reset by peer]
wiselord has joined #lisp
quazimodo has joined #lisp
quazimodo has quit [Client Quit]
pierpal has joined #lisp
rople has joined #lisp
quazimodo has joined #lisp
notzmv has quit [Remote host closed the connection]
notzmv has joined #lisp
<LdBeth> Well maybe mfiano means construct anonymous class from two parent class on the class
<LdBeth> Which I think is feasible
bitmapper has quit [Ping timeout: 245 seconds]
shifty has joined #lisp
EuAndreh[m] has joined #lisp
wiselord has quit [Ping timeout: 240 seconds]
anewuser has joined #lisp
khisanth__ has quit [Ping timeout: 245 seconds]
khisanth__ has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
rople has quit [Ping timeout: 276 seconds]
rople has joined #lisp
lavaflow has quit [Quit: can't even]
rople has quit [Ping timeout: 240 seconds]
lavaflow has joined #lisp
rople has joined #lisp
clothespin has joined #lisp
Bike has quit [Quit: Lost terminal]
space_otter has quit [Remote host closed the connection]
Dibejzer has quit [Quit: Leaving]
Bourne has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
jcowan has joined #lisp
<jcowan> Question for anybody:
<jcowan> Question for anyone: When you think of an alist, do you think by default of one with atomic keys that can be tested with EQL, or of one with keys that aren't necessarily atomic and are testd with EQUAL?
<jcowan> oops, paste stutter
<no-defun-allowed> Probably atomic keys that are EQL, so probably symbols. FWIW, EQL is the default test for assoc among other alist managing things.
makomo has joined #lisp
<White_Flame> I have a lot of macros that set alist & plist functions' :test to #'eq, so I often use the former
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
atgreen has joined #lisp
vlatkoB has joined #lisp
<jcowan> Thanks both
<jcowan> As I've said before, EQ is basically a performance hack, and it's EQL that is Lisp's identity predicate.
<jcowan> (IMO, that is)
<White_Flame> yep, and it's a performance hack I end up using fairly often ;)
<White_Flame> but even with numbers, if you have array or list indexes/lengths, those numbers are always going to be fixnum, as they can only be as big as address space anyway
<White_Flame> (for any sane CL implementation)
libertyprime has quit [Ping timeout: 265 seconds]
<jcowan> Fair enough
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #lisp
<beach> Good morning everyone!
<equwal> Good morning beach!
gravicappa has joined #lisp
brettgilio has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
Dibejzer has joined #lisp
Dibejzer has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
EvW has joined #lisp
knegg has quit []
sindan has quit [Remote host closed the connection]
libertyprime has joined #lisp
sindan has joined #lisp
Inline has quit [Quit: Leaving]
anewuser has quit [Quit: anewuser]
stepnem has quit [Ping timeout: 265 seconds]
EvW has quit [Ping timeout: 245 seconds]
brettgilio has quit [Ping timeout: 250 seconds]
clothespin_ has joined #lisp
clothespin has quit [Ping timeout: 252 seconds]
kobain has quit [Ping timeout: 252 seconds]
FloThePo has quit [Quit: Quit]
dilated_dinosaur has quit [Ping timeout: 252 seconds]
brettgilio has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
kajo has quit [Ping timeout: 250 seconds]
libertyprime has quit [Ping timeout: 276 seconds]
<beach> mfiano: I think CLIM classes for presentation types have names that are conses.
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 246 seconds]
pierpal has quit [Ping timeout: 250 seconds]
<beach> "class-name of this class returns a list (presentation-type name)"
<beach> It is an interesting observation though. Is the integration with the type system based on CLASS-NAME of the class (I don't think so) or FIND-CLASS?
grabarz has joined #lisp
grabarz has quit [Client Quit]
anlsh has joined #lisp
earl-ducaine has quit [Read error: Connection reset by peer]
<beach> AHA! The secret is that the class name must be a "proper name" (see the glossary) for it to be a type.
<beach> That is, FIND-CLASS of SOME-SYMBOL must return a class with a CLASS-NAME of SOME-SYMBOL.
v0|d has quit [Ping timeout: 250 seconds]
clothespin__ has joined #lisp
stepnem has joined #lisp
clothespin_ has quit [Ping timeout: 252 seconds]
libertyprime has joined #lisp
libertyprime has quit [Read error: Connection reset by peer]
* beach heaves a sigh of relief since the SICL bootstrapping procedure uses classes with the same CLASS-NAME as the standard ones.
ebrasca has joined #lisp
<beach> So I think that what CLIM II did should not be necessary. They could have used symbols as names. But, as Scott McKay told me, when they wrote the CLIM II specification, CLOS implementations were not very good.
scymtym has quit [Ping timeout: 265 seconds]
shifty has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
varjag has joined #lisp
<beach> He also told me that the way moore33 implemented presentation types for McCLIM was the way they would have wanted to use for commercial CLIM, but (again) the CLOS implementations at the time just weren't good enough. I don't know what they did instead, though.
<beach> phoe: What makes you think that in ANSI Common Lisp, all classes must be named by symbols?
<phoe> Class-name---a non-nil symbol.
<phoe> symbol---a symbol.
<beach> phoe: I.e. where do you see that it is not allowed to do (make-instance 'standard-class :name '(a b c))?
<phoe> In the MOP, classes may be named with anything. In ANSI CL, the names must be symbols.
<beach> phoe: Where do you see that it is not allowed to do (make-instance 'standard-class :name '(a b c))?
<beach> phoe: DEFCLASS is not the fundamental way of making classes.
<jackdaniel> I don't understand the "In the MOP remark" -- that would mean that having MOP in ones implementation violates the spec
<jackdaniel> "In the MOP" remark*
<phoe> I remember us having a similar discussion some time ago
libertyprime has joined #lisp
<beach> phoe: I am waiting for your answer...
<jackdaniel> good for you, but I don't think it counts as an argument ,)
isBEKaml has joined #lisp
<phoe> this GF must return a symbol
<jackdaniel> could you link something what does not timeout?
<phoe> but the MOP says it may return an object
<phoe> so the MOP conflicts with the CLHS here
<beach> Hmm, right you are.
<beach> But DEFCLASS is not what you should use as an argument.
<phoe> beach: yes, sorry about that
* beach heaves another sigh of relief that all SICL classes have symbols as names.
<beach> So I guess if I ever want McCLIM to run on SICL, I need to allow this extension.
Duuqnd has joined #lisp
grabarz has joined #lisp
<phoe> McCLIM doesn't in any way depend on this code though
<phoe> it must have some internal mechanisms to deal with this issue
<beach> "this code"?
<phoe> s/this/my/
<beach> Still, it creates classes with lists as names.
<beach> And that is a violation of the standard.
kajo has joined #lisp
jonatack_ has joined #lisp
dddddd has quit [Remote host closed the connection]
<jackdaniel> does it though? I'm looking at the code now and it seems that class names are something like
<jackdaniel> climi::|(presentation-type climi::foo)|
<beach> Oh, good.
jonatack has quit [Ping timeout: 265 seconds]
<beach> That's a violation of the CLIM II spec, but that's less serious. :)
<jackdaniel> how is it a violation of clim ii spec?
kajo has quit [Ping timeout: 265 seconds]
<jackdaniel> if you refer to the first paragraph "defines a presentation type whose name is .." -- I don't read it that presentation name is the same as the class name this presentation is represented with
<jackdaniel> but of course I've never put much thought into that
<phoe> "class-name of this class returns a list (presentation-type name)"
<jackdaniel> ah, this part
<jackdaniel> thanks
asarch has joined #lisp
<phoe> so portable code can *expect* that the values coming from class-name are all symbols
<phoe> e.g. use DECLARE TYPE or (the symbol (class-name foo))
<jackdaniel> depends how you define a portable code. if you define it as a code which runs on an implementation which is strictly adhering to ansi standard then yes. if you take that portable code runs on existing implementations then most of them define mop
<jackdaniel> s/define/implement/
scymtym has joined #lisp
kajo has joined #lisp
Cymew has joined #lisp
<phoe> yes, you are correct
<phoe> that is if we try to force conses into SBCL's standard class name mechanism
<pjb> I think we don't use | enough in lisp program.
<pjb> (defclass |the damn class of all the objects that can talk violet| (|the funny class of talkers| |colored spoken objects|) ()) …
<pjb> That would make them more readable.
<phoe> (defclass || () ())
<pjb> and if you want lists you can always (read-from-string (format nil "(~A)" '|the damn class of all the objects that can talk violet|)) #| --> (the damn class of all the objects that can talk violet) ; 56 |#
<phoe> ~A won't give you luck when you print compound objects.
<pjb> or ~S.
<phoe> (list "a a a" |b b b|)
<phoe> ~S won't give you lists
Bourne has quit [Remote host closed the connection]
flamebeard has joined #lisp
karlosz has quit [Quit: karlosz]
kajo has quit [Ping timeout: 252 seconds]
Bourne has joined #lisp
asarch has quit [Quit: Leaving]
wiselord has joined #lisp
Codaraxis has quit [Read error: Connection reset by peer]
Codaraxis has joined #lisp
anlsh has quit [Ping timeout: 246 seconds]
mrcom has quit [Read error: Connection reset by peer]
heisig has joined #lisp
davepdotorg has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
hhdave has joined #lisp
_whitelogger has joined #lisp
Lycurgus has quit [Quit: https://meansofproduction.biz Exit Quassel.]
gxt has joined #lisp
libertyprime has quit [Quit: leaving]
ljavorsk_ has joined #lisp
whiteline has quit [Ping timeout: 240 seconds]
jeosol has quit [Remote host closed the connection]
whiteline has joined #lisp
random-nick has joined #lisp
rgherdt has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
eagleflo has quit [Ping timeout: 276 seconds]
oni-on-ion has joined #lisp
kajo has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
dilated_dinosaur has joined #lisp
gabiruh has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
arma_ has joined #lisp
nydel has quit [Read error: Connection reset by peer]
bacterio has quit [Read error: Connection reset by peer]
<phoe> it seems that the #A extension for printing arrays readably works the same across SBCL and ECL/Clasp with one difference in printing order - whether dimensions or element type comes first
<phoe> since I am looking to implement that extension for CCL, is it also worth to try and unify the way implementations work this way, or do I just pick one of the two sides?
<beach> I would pick the order that is determined by the type specifier for arrays.
<beach> Just for consistency.
<phoe> so element-type and then dimensions
<beach> Yeah, that's what I would do.
<phoe> that is consistent with the way ECL/Clasp do it
<beach> Clasp probably took it from ECL.
<jackdaniel> I'm sceptical that sbcl will change it
<phoe> yes, absolutely - that's why I list them together
<beach> OK.
<phoe> jackdaniel: so am I (,
<jackdaniel> that said uniformity here won't buy much
<jackdaniel> how often do you read forms printed readably on one implementation into another?
<phoe> yes, it's a big edge case - you'd need to print arrays readably in--
<phoe> exactly
<Shinmera> could happen for code generation I guess.
mrcom has joined #lisp
<phoe> that wouldn't be fully portable though - arrays are not guaranteed to be printable readably
<phoe> but then
<phoe> you'd generate code on one implementation and then load it with the other
<phoe> sounds like an even more narrow use case
<Shinmera> stuff like config files would not be weird to r/w from different implementations.
<phoe> hm, nice point
<phoe> but you'd need your config files to contain readable specialized arrays at that point
<phoe> this seems like overkill
<Shinmera> the user might accidentally or purposefully stick those values into a config structure or whatever.
<phoe> so your config files would have dumpable structures at that point
<phoe> that... actually sounds possible
<jackdaniel> I think that relying on lisp read / write functions to deserialize / serialize config is not a wise strategy
pfdietz has quit [Remote host closed the connection]
<jackdaniel> if you need to store lisp objects then you want a library like cl-store, dumping forms into a file is more a one-time hack for devs
<jackdaniel> generated code otoh is more likely (vide cl-unicode or magicl)
misterwhatever has joined #lisp
<phoe> how often do you generate code with one implementation and read it with another
<phoe> and how often may this generated code contain arrays printed readably
<jackdaniel> ditto, cl-unicode generates its files (only once), magicl has pregenerated ffi definitions to liblapack and such
<phoe> I'll just follow beach's advice while implementing this for CCL
<phoe> if it's a non-issue then it is unnecessary to fix it
<phoe> and if there are no users of it then it's a non-issue
misterwhatever has quit [Excess Flood]
longshi has joined #lisp
Duuqnd_ has joined #lisp
<jackdaniel> phoe: what you've put on github is a misquote given what I said above about cl-unicode and magicl which generate code
<phoe> 11:21 < jackdaniel> how often do you read forms printed readably on one implementation into another?
<phoe> but let me fix this
<jackdaniel> I have an impression that you read very selectively (i.e ignore what I've said later)
<phoe> yes, I have an issue with this - I often miss out on context
<phoe> OK - I've changed the comment and hope it reflects reality better now.
<phoe> Sorry about that
Duuqnd has quit [Ping timeout: 240 seconds]
misterwhatever has joined #lisp
Duuqnd_ has quit [Ping timeout: 276 seconds]
gabiruh_ has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
gabiruh has quit [Ping timeout: 250 seconds]
davepdot_ has joined #lisp
cosimone has joined #lisp
davepdotorg has quit [Ping timeout: 250 seconds]
misterwhatever has quit [Ping timeout: 265 seconds]
rople has quit [Ping timeout: 240 seconds]
m00natic has joined #lisp
pjb` has joined #lisp
vsync_ has joined #lisp
pjb` has quit [Quit: rename]
pjb` has joined #lisp
pjb` has quit [Remote host closed the connection]
pjb has quit [Read error: Connection reset by peer]
vsync has quit [Ping timeout: 240 seconds]
sindan has quit [Ping timeout: 240 seconds]
pjb` has joined #lisp
pjb` is now known as pjb
pjb has quit [Client Quit]
Codaraxis_ has joined #lisp
davepdo__ has joined #lisp
moldybits` has joined #lisp
frgo has joined #lisp
davepdo__ has quit [Client Quit]
davepdo__ has joined #lisp
Kaisyu72 has joined #lisp
davepdo__ has quit [Client Quit]
davepdo__ has joined #lisp
froggey_ has joined #lisp
justinmcp_ has joined #lisp
davepdo__ has quit [Client Quit]
White__Flame has joined #lisp
Tordek_ has joined #lisp
cwaydt6 has joined #lisp
mathrick_ has joined #lisp
ozzloy_ has joined #lisp
misterwhatever has joined #lisp
sindan has joined #lisp
pjb has joined #lisp
Kaisyu7 has quit [Remote host closed the connection]
cwaydt has quit [Quit: Ping timeout (120 seconds)]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
froggey has quit [Ping timeout: 240 seconds]
davepdot_ has quit [Ping timeout: 240 seconds]
White_Flame has quit [Remote host closed the connection]
moldybits has quit [Ping timeout: 240 seconds]
Codaraxis has quit [Ping timeout: 240 seconds]
mathrick has quit [Ping timeout: 240 seconds]
frgo_ has quit [Ping timeout: 240 seconds]
Tordek has quit [Remote host closed the connection]
cmatei has quit [Ping timeout: 240 seconds]
ozzloy has quit [Ping timeout: 240 seconds]
dilated_dinosaur has quit [Ping timeout: 240 seconds]
cmatei has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
cwaydt6 is now known as cwaydt
hiroaki has joined #lisp
drewc has quit [Ping timeout: 240 seconds]
dilated_dinosaur has joined #lisp
kajo has quit [Ping timeout: 245 seconds]
drewc has joined #lisp
kajo has joined #lisp
misterwhatever has quit [Ping timeout: 245 seconds]
jmercouris has joined #lisp
mingus has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
ggole has joined #lisp
Aritheanie has quit [Quit: So long, and thanks for all the fish]
atgreen has joined #lisp
Aritheanie has joined #lisp
misterwhatever has joined #lisp
Aritheanie has quit [Quit: So long, and thanks for all the fish]
isBEKaml has quit [Remote host closed the connection]
isBEKaml has joined #lisp
misterwhatever has left #lisp [#lisp]
ljavorsk__ has joined #lisp
ljavorsk_ has quit [Ping timeout: 276 seconds]
grewal has quit [Ping timeout: 245 seconds]
notzmv has quit [Remote host closed the connection]
grewal has joined #lisp
skeuomorf has joined #lisp
bacterio has joined #lisp
jmercouris has quit [Remote host closed the connection]
shifty has joined #lisp
ljavorsk__ has quit [Remote host closed the connection]
ljavorsk__ has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
<lukego> I'm defining data structures for AST nodes. I usually use DEFSTRUCT for each node type, but have the nagging feeling that I should use DEFCLASS, but can't bring myself to do that because DEFCLASS declarations always seem so wordy and redundant. Anybody relate to that feeling? Just live with it? Or is there a DEFCLASS* that I need to start using?
<lukego> (Haven't Lisped in a while and wondering if it's finally time to get over my aversion to CLOS.)
wxie has joined #lisp
<p_l> lukego: I'd recommend going vanilla, but there are some 3rd-party defclass-star
<Shinmera> I use multiple cursors or whatever to just write it quicker.
<p_l> you can also of course type your own macro with your preferences
<Shinmera> Though if you have a well-defined set of classes that are all similar, writing a specific macro for it is just fine.
<luis> I like defclass-star (but don't use it very often). Succinct like defstruct, flexible like defclass (obviously).
<lukego> p_l: Thanks :)
<lukego> Next question. Is there something wrong with me if I don't use paredit-mode?
<luis> Yes and no.
<luis> But mostly yes.
<lukego> Roger that :)
<Shinmera> It's worth getting into it I'd say.
longshi has quit [Ping timeout: 246 seconds]
<p_l> lukego: to be honest I often disable paredit and the like :D
<p_l> always managed to screw myself into place that was hard to leave
<p_l> (insert "DRRRR" :repeat 5)
<p_l> also nice to see you lisping again :)
<Shinmera> p_l: copy paste is not governed by paredit, which is useful for getting it back into a stable state without having to deactivate it.
<luis> Paredit eliminates that silly step at the end of writing a bit of code where you make sure parenthesis match up properly. If you use electric-indent-mode you can even get rid of the make-sure-your-code-is-properly-indented step. (Although that step is pretty quick with M-q paredit-reindent-defun.)
shifty has quit [Ping timeout: 246 seconds]
<p_l> Shinmera: it's also an excellent way to get it to state where it gives up counting parens. I know there's a chord to type parens disregarding paredit state, but I a) never remember it b) never got fluent enough with structural editing to gain much benefit
<p_l> *yet*
<p_l> I'm working now on my structural editing chops, then I will enable paredit :)
<Shinmera> I pretty much only use slurp/barf/convolute in paredit. Same for Slime, my fu is really weak in general.
shifty has joined #lisp
<Shinmera> But it's enough to be useful
<p_l> yeah, same here. Just found that electric indent and electric parens work better for me now
<p_l> I need to spend some "me" time (what's that?) to redo my computer setup in general
davepdotorg has joined #lisp
<luis> Shinmera: interesting. I think what I use the most is splice (M-s), raise, (M-r) and kill (C-k and C-M-k)
<lukego> Thanks p_l it's nice to be lisping again too :). Seems like every time I start working on a project I think "Hey I wonder if I could do this in Lisp" but usually not due to some constraint. Just now I want to make up a DSL and write a transpiler onto diverse targets and Lisp seems like a great fit.
<p_l> lukego: do I recall right that you spent some time in Smalltalk/Pharo land recently?
<Shinmera> luis: Oh yeah, splice, too. And kill I didn't even think about being a paredit thing but I use it too.
<lukego> p_l: Yeah. Spending some time doing Smalltalk really helped to remind that I'm a Lisper at heart :)
<p_l> :)
<lukego> and also to appreciate the value of a stable base. Pharo's GToolkit has more momentum than McCLIM but it is kind of "angular momentum" going around in circles rewriting all the code I am trying to build on :)
<lukego> (I'm not going to rewrite that Smalltalk code in Lisp though, it does work :))
Bike has joined #lisp
bitmapper has joined #lisp
<p_l> I'm kinda in market to find a good GUI library, unfortunately for reasons McCLIM is out :<
<lukego> I think that I'll probably focus more on text and Emacs for new UIs for a while.
X-Scale has quit [Ping timeout: 265 seconds]
* Shinmera has been working on a new toolkit and starts to sweat profusely
<p_l> lukego: my issues are that I don't even *imagine* a way to get a11y into CLIM
<p_l> like, how do I create the UI Graph to expose to external walker?
jcowan has left #lisp [#lisp]
<p_l> in a way that doesn't break any typical use of CLIM
X-Scale has joined #lisp
<p_l> (might involve interposer between interface side and backend side, but then I have no idea how to augment CLIM interfaces with usable metadata)
<p_l> using emacs as interface is positively simple in that :)
<beach> p_l: If you need information about CLIM and McCLIM, the best place is #clim. The nice people there would be happy to help you out with your question. You can still ask here of course.
atgreen has quit [Ping timeout: 265 seconds]
<p_l> beach: I tried in the past - I gave up when I figured out *I* could not describe it properly, so I was back to drawing board in terms of "how do I explain what I need" :)
<beach> I see.
<p_l> for immediate use cases, Qt and GTK+ have hooks for accessibility defined and implemented, though I'm wary of anything from GNOME.
shifty has quit [Ping timeout: 276 seconds]
<p_l> but just explaining it feels non-trivial, and if I can't explain right, I can't expect anyone to understand, right?
shifty has joined #lisp
<shka__> p_l: i have the same feeling with clim
<beach> lukego: As it turns out, it is unusual to want the same iniforms, initargs, readers, and writers for each slot, so the verbosity is usually needed. Unless, of course you are using your classes as simple containers with named slots.
<shka__> i grew so used to model-viewer-controler that anything other seems weird
<beach> shka__: CLIM is a prime example of that model.
<beach> shka__: Except this is Common Lisp, so you don't have to program it explicitly the way you do in most other languages.
<shka__> eh, ok
<shka__> this makes me even more confused ;-)
<lukego> beach: Thanks for the comment. Could be that I'm using the same pattern over and over again not because it's appropriate but due to intellectual laziness. I'll see if I can apply some more thought and creativity to my DEFCLASS declarations and that might solve my problem :)
<lukego> (This is some pretty nuclear grade procrastination I'm doing now. "Let's write some code. But should I re-evaluate my feelings about DEFCLASS first? Is it finally time to learn paredit?" But I'll just embrace that for now :-))
<splittist> lukego: there was (is?) redshank, an emacs extension built on paredit that provided, amongst other things, DEFCLASS support
<p_l> this reminds me of my confusion on pass-by-reference/pass-by-value which I need to distill somewhere into a cheatsheet
<lukego> hey splittist!
* lukego will try redshank once he gets comfortable with paredit
<splittist> Tjenamårs tjenamårs!
skeuomorf has quit [Read error: Connection reset by peer]
rgherdt has quit [Remote host closed the connection]
<beach> Heh.
<beach> p_l: I am sorry to hear that you have difficulties understanding CLIM. It would have been great to have you as a user.
isBEKaml has quit [Remote host closed the connection]
<p_l> beach: it's less about understanding CLIM itself for, let's say, my own use
<beach> I see.
<p_l> But I've been trying to consider users other than myself, including blind or otherwise vision impaired
<beach> OK.
whiteline has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 246 seconds]
<p_l> and unfortunately CLIM missed the development in that area, for understandable reasons, so anything that involves integrating with screenreaders for example will require fresh work, and that's where I get confused :)
shifty has joined #lisp
<p_l> pity I can't devote more resources for that, because I think it's pretty important area to cover in CLIM, and I would like to have more GUI options :)
<jackdaniel> there are so many gui options, how is that it is so hard to find something satisfying to work with? :)
whiteline has joined #lisp
<p_l> jackdaniel: because so many of them have so many caveats, and I would like to work with CL where possible
<p_l> so for example GTK+ is out due to multiplatform issues and instability
Zanitation has joined #lisp
<jackdaniel> all technology is flawed one way or another, so either you build in something and work around all quirks or you sit waiting for technology which will never come (or write your own solution which will be flawed as well)
<jackdaniel> it is like refusing to act because world is not perfect - stance admittedly taken by some people
<p_l> jackdaniel: yeah, that's what I am not doing, the closest thing to doing what I want *right now* is Qt, so I've been working on getting usable CommonQt setup to use on all three platforms I have at home (linux, windows, and unfortunately a mac)
<p_l> Also went down the rabbit hole to see what would be needed to update CommonQT for QT5
<Shinmera> p_l: Have you talked to Stas yet?
<p_l> unfortunately it feels like all code for C++ interaction in various bindings is very language specific, so I might end up writing a common lisp C++ binding generator first -_-
<p_l> Shinmera: no, unfortunately not
<jackdaniel> did I mention that EQL5 works on IOS now? apparently remaining issues got fixed
<p_l> jackdaniel: EQL is nice and dandy, but I need something that isn't bound to one implementation
<p_l> partially because I am trying to work on stuff to enable more people than myself ;)
<trittweiler> lukego, I prefer defstruct to defclass because the `:type`s end up in the ftype of the slot accessors which means that sbcl type-checks at compile time, and you get a sensible default print-object method by default. You can use generic functions with structures just fine (as you know). So unless I want mixins, defstruct is my preferred go-to.
shifty has quit [Ping timeout: 240 seconds]
amerlyq has joined #lisp
shifty has joined #lisp
<jackdaniel> I'm sure people doesn't give a rat ass whether their application runs on (given it is performant enough and looks the same)
manualcrank has quit [Quit: WeeChat 1.9.1]
<jackdaniel> be it C++ or CL
<p_l> jackdaniel: I'm trying to make it work for more people than myself *as a developer*
<p_l> and as much as I love ECL, EQL binds me too much
<p_l> GTK means macos sucks. Yes, for internal tool its fine, so is using CCL w/ Obj-C bridge
<jackdaniel> I've just mentioned IOS because it is a fresh thing, not to suggest it. good luck with finding your preferred technology
X-Scale has quit [Ping timeout: 250 seconds]
<p_l> jackdaniel: In case you missed it, I've already went down the path "closest to working as I want it" :)
X-Scale` has joined #lisp
<jackdaniel> you've mentioned that you are working on making it usable on a few platforms, so I inferred you are struggling with it right now
X-Scale` is now known as X-Scale
<jackdaniel> (and then you've suggested that you want to make another pivot to QT5 when possible)
<p_l> jackdaniel: I've had issues getting commonqt working on macOS, phoe had been a help there
<p_l> the pivot to QT5 is for later, because let's face the fact, Qt4 is not supported anymore
<luis> p_l: I've been thinking about how to interact with C++ too, for Qt5 too. libclang with something along the lines of dragonffi seems promising.
<p_l> luis: I've been thinking of using libclang for generating the bindings only
<luis> I think it might be useful for generating calls to all sorts of C++-specific stuff. Invoking the compiler would take care of all sorts of stuff like preprocessor macros, templates, etc. (I think.)
<p_l> yep
<p_l> I just want to avoid dependency on clang for runtime
brown121408 has joined #lisp
<p_l> something like a "clang-grovel" package
brown121407 has quit [Ping timeout: 240 seconds]
<p_l> reminds me I need to fix my scripts to build static ECL on Alpine
<luis> p_l: c2ffi does part of the grovelling job. Where do you plan to store the glue code?
<p_l> luis: Still working on it, but generally an extension to ASDF that could spin up separate instance to run the glue code generation and compilation, + code to handle bundling the libs
<luis> p_l: but would you store that glue in a .c file, as LLVM bitcode, as binary blob?
<p_l> luis: two options, as big C file (or maybe a dir of C files?) + makefile, and as ready-to-load shared object
<p_l> the former is for cases where you need some more mangling (like embedding into one binary)
<luis> p_l: in that case, doesn't SWIG already do what you want, maybe?
<p_l> luis: SWIG isn't good enough at parsing C++, not to mention QT extensions to C++
<p_l> but it's kinda inspiration, as I have used SWIG in the past with CFFI target
<luis> They're recently removed CFFI support from SWIG, sadly.
<p_l> :<
<p_l> then even more important to handle it
<luis> p_l: how does generating a big blob of C code help you, say, subclass a C++ class?
<p_l> luis: said C blob would have the necessary interface points to do subclassing, think pre-made abstract subclasses
<p_l> the C part is to get around the shittiness of C++ linking, and would essentially be a dump of what clang would construct packaged in a way that is consumable
<luis> Overriding every possible method, right. That's what SMOKE does, I think.
<p_l> yep
<luis> p_l: have you looked at Qt for Python's Shiboken?
jfb4 has quit [Ping timeout: 252 seconds]
gabiruh_ has quit [Quit: ZNC - 1.6.0 - http://znc.in]
gabiruh has joined #lisp
makomo has joined #lisp
jfb4 has joined #lisp
<p_l> luis: yep
<luis> p_l: what did you learn?
longshi has joined #lisp
<p_l> that I'll need to write from scratch it seems
<p_l> Shiboken is deeply intertwined with Python runtime
Bourne has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 276 seconds]
shifty has joined #lisp
pfdietz has joined #lisp
<luis> p_l: are you using rpav's c2ffi? I'm very curious, in case you can't tell. Also, have you seen <https://github.com/KDE/smokeqt/tree/Qt5v2>?
Bourne has joined #lisp
X-Scale` has joined #lisp
atgreen has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
wxie has quit [Ping timeout: 252 seconds]
X-Scale` is now known as X-Scale
<p_l> I haven't seen c2ffi, and somehow I missed that smokeqt repo - smoke had been badly documented across KDE pages
<luis> p_l: c2ffi uses libclang to extract definitions. cl-autowrap (and cffi/c2cffi) then use that to generate bindings.
<p_l> sounds like good starting point, I wouldn't mind improving existing code instead of tooting my own horn
LiamH has joined #lisp
ljavorsk__ has quit [Ping timeout: 240 seconds]
<luis> p_l: so, my idea was to try and emulate what dragonffi is able to do: compile C/C++ snippets at runtime and then invoke them, maybe using something like parenscript for C++. My thinking there is that this would eliminate the need for generating bindings, or exhaustive bindings, anyway. You can just call random C/C++ code and the compiler will type-
<luis> check it for you. You raise a good point about not depending on libclang upon delivery though. I don't have an answer for that yet.
<ebrasca> Do you have some recomendations on how to host multiple domains in common lisp?
<p_l> ebrasca: domains in what sense? Web domains? I think it's something that can be handled in handler in Hunchentoot or Clack (match on `Host` header)
<p_l> I usually handle matching services to domains at LB and don't handle Host header in services at all
<p_l> i.e. one backend TCP port = one service that doesn't have variation
Zanitation has quit [Ping timeout: 276 seconds]
<phoe> ebrasca: I use haproxy as my internal router that handles HTTPS. It then routes internal HTTP traffic over to Lisp services.
Zanitation has joined #lisp
EvW1 has joined #lisp
<ebrasca> I like Hunchentoot , is it hard to manage more than 1 web page with diferent domain names?
<ebrasca> p_l: yea Web domains
<p_l> ebrasca: I'd recommend setting separate handlers for each "application" or "website", then using an external service (for example nginx in proxy mode) to handle the frontend
clothespin__ has quit [Ping timeout: 240 seconds]
<ebrasca> p_l: Do you recomend lxc + hunchentoot + nginx ?
<p_l> I haven't used LXC for years, to be quite honest. For this case I'd use something closer to Docker (though podman might be better as runtime, but that's details you might not need right now) + external load balancer
<p_l> I have used HAproxy and nginx in that role
<p_l> bit hard for me to recommend because I don't know the rest of your environment and I have preferences that lean on the high-end side that I usually deal with
<p_l> (I host something like ~250 domain, with ~1000 mappings, on single IP address, for one of my clients)
vsync_ has left #lisp ["Leaving"]
orivej has joined #lisp
vsync_ has joined #lisp
vsync_ is now known as vsync
<vsync> auuuugggggghhhhhh... only just thought to check, and dolist has an implicit tagbody
<ebrasca> p_l: I am starting , If I manage this correctly I am going to have my first client.
<vsync> I wonder how much time this would have saved over the years, and how much of that was convolutions out of over-preciousness
karswell has quit [Ping timeout: 265 seconds]
warweasle has joined #lisp
<Xach> vsync: i don't mean to alarm you but so does DOTIMES!
<p_l> ebrasca: for starters, setup nginx with proxy configs (there's a lot of tutorials, and you can subcontract for a starting config ;) ) + running the sites on separate ports, maybe even as separate services (using runit or systemd to start them)
heisig has quit [Quit: Leaving]
<p_l> ebrasca: you should also consider creating a way to "poke" the application to verify it's in usable state and hook that into nginx so it can redirect to an error page if for any reason you need to take an app down
<lukego> I've enabled `slime-company' package but so far it's only offered me completions once...
<ebrasca> p_l: With "separate services" do you mean diferent sbcl instances?
<phoe> could be one instance but running several acceptors on different ports
<p_l> ebrasca: I recommend separate instances for things that are logically separate, in case you need to do something weird with them
<p_l> remove single points of failure kind of things
dilated_dinosaur has quit [Ping timeout: 246 seconds]
sjl_ has joined #lisp
Kevslinger has joined #lisp
<phoe> What should be printed when (print-unreadable-object (nil *standard-output* :type t :identity nil)) is evaluated?
<lukego> I'm trying to `C-)' in paredit but all Emacs is getting is plain old 0. Maybe because I'm running Emacs over ssh in a terminal? Any workaround?
<phoe> #<NULL >?
<phoe> The CLHS says this: If type is true, the output from forms is preceded by a brief description of the object's type and a space character.
<phoe> So #<NULL > seems consistent.
<Bike> yeah, sure.
<Bike> oh, ccl elides the space. i don't think it matters though.
<phoe> it does
<phoe> there is an ANSI-TEST for that®
<Bike> seems like a pointless ansi test
<phoe> well, it does test the specified behaviour
<phoe> even if this behaviour is silly in my opinion
<Xach> lukego: i don't know, sorry. i usually use C-right for that.
<Xach> lukego: i've had similar trouble when running through screen, but it produces a sequence of control characters that come out wrong. so i bind those codes in my .emacs to make things work.
<Xach> if it's just producing 0 that's not a good solution
<lukego> Yeah `M-x view-lossage' is only showing it as a plain 0. Maybe I will use this as an excuse to not learn paredit-mode today.
<Xach> noooo! paredit mode is mycket bra
<p_l> lukego: what terminal?
<lukego> I'm using iTerm2 on macOS and talking to Emacs via ssh and tmux. (ugh.) I'm planning to switch to Linux desktop in a few weeks so maybe I'll kick the can until then.
<p_l> lukego: check preferences on how the keys are passed through
<p_l> I'm forced to use mac for work so I can commisserate
<ebrasca> phoe: Why haproxy instead of nginx?
<phoe> ebrasca: either or
<ebrasca> phoe: I don't undestand what do you mean with "either or".
<phoe> ebrasca: either haproxy or nginx, no big difference
whiteline has quit [Ping timeout: 252 seconds]
<vsync> if I decrease the fill pointer of an array, then increase it again, is there any risk the elements hidden in that interval will disappear?
<Shinmera> no
<Shinmera> if anything decreasing the fill pointer and not clearing out the elements can be a memory leak.
pjb has quit [Read error: Connection reset by peer]
<Fade> lukego: I've found inconsistent results using emacs/slime over ssh to a session suspended in a terminal multiplexer. does it still happen if you take tmux out of the stack?
moldybits` is now known as moldybits
whiteline has joined #lisp
<Fade> I readily admit that OSX keybinds don't always behave as expected.
bitmapper has quit []
<lukego> Fade: seems the same
<Fade> well, that was my guess.
<lukego> Guess I'll revisit this when I'm "linux native." I might run Emacs locally instead of via ssh then.
<Fade> if you have ssh, you could just use tramp.
<davepdotorg> FWIW, macOS and iTerm2: if I emacs -nw locally and try C-0 I just get a self-insert command on 0, so that would seem to eliminate most things along that chain.
<Shinmera> lukego: You could give Portacle a shot. https://portacle.github.io/#get-mac
<lukego> Shinmera: Thanks but I'm over the whole Mac thing and looking forward to putting it behind me.
<Fade> I know that feeling well.
<Shinmera> Heh
longshi has quit [Ping timeout: 245 seconds]
smazga has joined #lisp
<p_l> getting emacsclient to work the way I'm used to is getting me insane on mac :/
cosimone has quit [Quit: Terminated!]
bitmapper has joined #lisp
pjb has joined #lisp
cosimone has joined #lisp
pjb has quit [Read error: Connection reset by peer]
froggey_ is now known as froggey
dddddd has joined #lisp
PuercoPope has joined #lisp
brettgilio has quit [Ping timeout: 246 seconds]
Cymew has quit [Ping timeout: 240 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
brown121408 has quit [Read error: Connection reset by peer]
brown121408 has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
cmatei has quit [Remote host closed the connection]
pjb has joined #lisp
cmatei has joined #lisp
<phoe> Is this line valid?
s3arch has joined #lisp
<phoe> This is supposed to read in the form #S(print-struct-1 :foo 1 :bar 2) with standard IO syntax
sjl_ has quit [Ping timeout: 252 seconds]
PuercoPope has left #lisp ["Killed buffer"]
<phoe> but standard IO syntax means that *package* is set to CL-USER
<phoe> and there might be some package silliness going on
<Bike> well, the string is written while *package* is set to cl-user too
<Bike> so both the write and read should include the package prefix, no?
<Bike> oh wait, escape nil
<Bike> hmmmmmmmmm i dunno
<Bike> i'd just rebind *package* within the with-standard-io-syntax body
<Bike> thinking is too hard
karlosz has joined #lisp
s3arch has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 246 seconds]
Dibejzer has joined #lisp
Dibejzer has quit [Remote host closed the connection]
shifty has joined #lisp
<phoe> blah
* phoe takes a break
<Bike> clhs #s
rgherdt has joined #lisp
karlosz has quit [Quit: karlosz]
pfdietz has quit [Remote host closed the connection]
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shifty has quit [Ping timeout: 265 seconds]
Arcaelyx has joined #lisp
shifty has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
karlosz has joined #lisp
vaporatorius has quit [Ping timeout: 265 seconds]
Bike has quit [Remote host closed the connection]
flamebeard has quit []
pjb has quit [Read error: Connection reset by peer]
q9929t has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
Oladon_work has joined #lisp
q9929t has quit [Client Quit]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
rippa has joined #lisp
shka_ has joined #lisp
davepdotorg has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
Bike has joined #lisp
random-nick has joined #lisp
karlosz has quit [Quit: karlosz]
kapitanfind-us has joined #lisp
hhdave has quit [Quit: hhdave]
scymtym has quit [Ping timeout: 245 seconds]
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
dilated_dinosaur has joined #lisp
m00natic has quit [Remote host closed the connection]
pjb has joined #lisp
``Erik has quit [Ping timeout: 240 seconds]
pjb has quit [Write error: Connection reset by peer]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
failproofshark has joined #lisp
EvW1 has quit [Ping timeout: 246 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #lisp
EvW has joined #lisp
kapitanfind-us has quit [Ping timeout: 246 seconds]
clothespin has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
dale has quit [Quit: My computer has gone to sleep]
failproofshark has quit [Read error: Connection reset by peer]
failproofshark has joined #lisp
pjb` has joined #lisp
clothespin has quit [Read error: Connection reset by peer]
pjb` has quit [Read error: Connection reset by peer]
clothespin has joined #lisp
ljavorsk__ has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
<phoe> Bike: yes, the symbol name should be printed with package prefix
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
kobain has joined #lisp
arma_ has quit [Quit: arma_]
Bike has quit [Remote host closed the connection]
Bike has joined #lisp
manualcrank has joined #lisp
Inline has joined #lisp
lucasb has joined #lisp
sjl_ has joined #lisp
sjl_ has quit [Client Quit]
sjl_ has joined #lisp
kpoeck has joined #lisp
<kpoeck> phoe I don't see a problem with the test
<kpoeck> (car vals) is cl-test::print-struct-1
<kpoeck> (eq (car vals) 'print-struct-1) is true, with (in-package :cl-test)
<Bike> why is it read as being in the cl-test package?
<kpoeck> The read-from-string is being executed in cl-user
Bike has quit [Remote host closed the connection]
<kpoeck> but the compiled test is compiled in file with (in-package :cl-test)
Bike has joined #lisp
<kpoeck> So 'print-struct-1 is 'cl-test::print-struct-1
<kpoeck> at least so my reasoning
<Bike> yes, the symbol in the code is in the cl-test package, that's not the issue
<Bike> the printing is done in the cl-user package, and without print-escape or print-readably so there should be no symbol prefix in the text
shifty has quit [Ping timeout: 245 seconds]
<Bike> package prefix in the printed text*
<kpoeck> I just tested in clasp, and there is a symbol-prefix
<Bike> (defpackage "CL-TEST" (:use)) (write 'cl-test::foo :escape nil :readably nil) => FOO here
pjb` has joined #lisp
<kpoeck> (in-package :core)
<kpoeck> (defstruct boo a b)
<kpoeck> (defparameter foo (make-boo :a 23 :b 24))
<kpoeck> (with-standard-io-syntax (write-to-string foo :readably nil :case :upcase :escape nil))
<kpoeck> "#S(CORE::BOO :A 23 :B 24)"
pierpal has joined #lisp
Lycurgus has joined #lisp
<kpoeck> I believe this is what the test that phoe quoted does
Arcaelyx has quit [Quit: Arcaelyx]
<phoe> kpoeck: my Travis test tells me that this test fails on CCL
<phoe> the struct name is printed without the package qualifier
rgherdt has quit [Ping timeout: 246 seconds]
<Bike> (with-standard-io-syntax (write (list 'cl-test::foo (cl-test::make-foo)) :escape nil :readably nil :case :upcase)) prints (FOO #S(CL-TEST::FOO)) in my clasp
<Bike> that seems wweird
<Bike> same behavior in sbcl though. hrm.
<phoe> maybe let us start from the beginning - is the test testing what is mentioned in the spec
pierpal has quit [Read error: Connection reset by peer]
<phoe> readably is NIL, escape is NIL
<phoe> and we are printing symbols, one of them raw, the other as a struct name
<phoe> should we print package qualifiers?
<kpoeck> Thats correct, just manually verified
<phoe> When the symbol is printed, if it is in the KEYWORD package, then it is printed with a preceding colon; otherwise, if it is accessible in the current package, it is printed without any package prefix; otherwise, it is printed with a package prefix.
<Bike> clasp uses prin1 to print the class name, so it overrides the escape setting from outside
<Bike> same for sbcl.
<phoe> similar for CCL
<phoe> (write-to-string (cl-test::make-blah) :readably nil :case :upcase :escape nil) ;=> "#S(BLAH)"
<kpoeck> but the current package is cl-user
<phoe> yes, I am in CL-USER
<kpoeck> so its nor accessible
<kpoeck> not accessible
<Bike> yes, but escape and readably are nil, so there is no prefix.
<Bike> this is up a section in 22.1.3.3
<phoe> so why is there a prefix on the symbol when it is printed alone
<Bike> there's not.
<phoe> oh wait a second
<Bike> like i said, what i see is (FOO #S(CL-TEST::FOO))
<phoe> yes
<phoe> so there should be no prefix printed in the struct name, correct?
<Bike> dunno.
<Bike> i don't see anything saying it's printed abnormally, and if printed the same as everything else there shouldn't be a prefix.
<Bike> clhs 22.1.3.12
<phoe> this is the line that fails on CCL for me
<Bike> well you said (write-to-string (cl-test::make-blah) :readably nil :case :upcase :escape nil) ;=> "#S(BLAH)"
<Bike> that's not what i'm seeing on clasp or sbcl. presumably ccl's method doesn't prin1 in the same way
<Bike> ccl doesn't seem to have a print-object method on structure-object, so i dunno where that would be defined
<phoe> Bike: defmethod print-object ((object t) stream)
<phoe> l1-io.lisp
<phoe> defun write-a-structure
<Bike> well that's weird
<phoe> I know, right
<Bike> ccl uses write-a-symbol to write the class name
<Bike> seems to be what it uses for symbols normally?
<Bike> so no special bindings like with prin1.
<kpoeck> write-a-symbol
<kpoeck> oops, as bike just said
<phoe> write-a-symbol has checks for *print-readably* and *print-escape* though
<phoe> so special bindings are in effect there
<Bike> no i mean it doesn't set bindings
clothespin has quit [Ping timeout: 276 seconds]
<Bike> like prin1 binds print-escape or whatever. ccl isn't doing that.
pierpal has joined #lisp
<Bike> it's just reacting to existing bindings normally.
<phoe> oh yes, that is correct
<kpoeck> yes
grabarz has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
<kpoeck> Bike: are you saying that the test is wrong and only ccl does it right?
<kpoeck> This (FOO #S(CL-TEST::FOO)) looks sort of strange
<Bike> i guess? i'm not sure why the structure class name would be treated ddifferently, is all
<phoe> the assertion fails because (CAR VALS) is CL-USER::PRINT-STRUCT-1
<phoe> so the read symbol is interned in the CL-USER packace
rgherdt has joined #lisp
<Bike> sbcl's done prin1 since its initial revision, so i \got nothin there
TwentySeven27 has joined #lisp
<phoe> but this is weird
<phoe> SBCL prints a package prefix in there even with :readably nil and :escape nil
<phoe> from the test body I can infer that this is the correct behaviour
<Bike> because it does prin1.
<phoe> because otherwise READ would read a symbol in the current package which is CL-USER which fails the test
<phoe> so with :readably nil and :escape nil we would still need to print the package prefix
<phoe> is this correct?
<Bike> listen. sbcl treats the structure class name specially. it uses prin1 to print it, so the outside readability and escape settings are discarded.
<Bike> this is part of its print-object method.
<Bike> i don't know if that's the correct behavior but that is its behavior.
<phoe> OK - I understand it this far.
pierpal has quit [Read error: Connection reset by peer]
<phoe> My original question is about the test and spec, not about SBCL.
ljavorsk__ has quit [Remote host closed the connection]
<Bike> ansi-test apparently expects this behavior.
TwentySeven27 has quit [Client Quit]
pierpal has joined #lisp
<Bike> i don't see anything in the spec mandating it though.
<phoe> so the question is why does the test expect this
ljavorsk__ has joined #lisp
<phoe> and I don't feel like forcing to let Paul dig up his memories from fifteen years ago again
<phoe> s/to let //
varjag has joined #lisp
<phoe> s/dig/to dig/
<phoe> 22.1.3.3.1 says, When the symbol is printed, if it is in the KEYWORD package, then it is printed with a preceding colon; otherwise, if it is accessible in the current package, it is printed without any package prefix; otherwise, it is printed with a package prefix.
<phoe> and this seems not to be overridden by anything else on the same page
<phoe> ...a confusing next sentence though
<phoe> A symbol that is apparently uninterned is printed preceded by ``#:'' if *print-gensym* is true and printer escaping is enabled; if *print-gensym* is false or printer escaping is disabled, then the symbol is printed without a prefix, as if it were in the current package.
<phoe> the part "if *print-gensym* is false or printer escaping is disabled, then the symbol is printed without a prefix, as if it were in the current package. "
<phoe> does "the symbol" mean the symbol being printed, or that gensym that was just mentioned
clothespin has joined #lisp
TwentySeven27 has joined #lisp
<phoe> since I think it means the gensym that was just mentioned, being on the same paragraph and all
TwentySeven27 has quit [Client Quit]
<Bike> none of that stuff should matter. the second sentence of 22.1.3.3 says the rest of the section doesn't apply unless printer escaping is enabled
<phoe> why the hell does the test require that a symbol read with standard IO syntax be in CL-TEST package and not in CL-USER
slyrus_ has joined #lisp
<phoe> printer escaping is disabled, so we only output the symbol name
<phoe> and we read in CL-USER and get a symbol from CL-USER
<phoe> please correct me if I'm wrong, but this seems like an invalid assertion
<Bike> like i said, i don't see anything saying the structure class name is necessarily printed with the prefix.
<phoe> and we'd need to also bind *package* to CL-TEST inside WITH-STANDARD-IO-SYNTAX
<phoe> Bike: neither do I
<phoe> it's just printed as a symbol, so the same way all symbols are printed
slyrus__ has quit [Ping timeout: 265 seconds]
<kpoeck> My last input: In 22.1.3.3 Printing Symbols it says ...The remainder of Section 22.1.3.3 applies only when printer escaping is enabled
<phoe> yes, that is correct
<phoe> and the test explicitly writes the string with printer escaping *disabled*
<kpoeck> so whatever is specified in 22.1.3.3.1 Package Prefixes for Symbols is irrelevant
orivej has joined #lisp
<kpoeck> So for me, the test is wrong, ccl is right and clasp and sbcl get it wrong
<Bike> well, i don't know, it might be ok to print the prefix for the structure class name, i just don't see anything saying it HAS to
brown121407 has joined #lisp
<kpoeck> so for me the solution is to change the test to: (assert (or (eq (car vals) 'print-struct-1) (eq (car vals) 'cl-user::'print-struct-1)))
brown121408 has quit [Ping timeout: 240 seconds]
<kpoeck> oops just 1 quote, but you know what I mean
<kpoeck> (assert (or (eq (car vals) 'print-struct-1) (eq (car vals) 'cl-user::print-struct-1)))
slyrus__ has joined #lisp
ljavorsk__ has quit [Ping timeout: 265 seconds]
White__Flame is now known as White_Flame
slyrus_ has quit [Ping timeout: 252 seconds]
slyrus has joined #lisp
slyrus__ has quit [Ping timeout: 245 seconds]
<phoe> kpoeck: a test that interns stuff into CL-USER seems somewhat dirty
ggole has quit [Quit: Leaving]
failproofshark has quit [Ping timeout: 276 seconds]
failproofshark has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chipolux has quit [Ping timeout: 276 seconds]
<kpoeck> (let ((symbol (car vals))) (assert (and (string-equal (symbol-name (car vals)) "print-struct-1") (or (eql (symbol-package symbol) (find-package :cl-user)) (eql (symbol-package symbol)(find-package :cl-test))))))
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jonatack_ has joined #lisp
<Bike> just bind *package* to cl-test in the standard io syntax form
jonatack has quit [Ping timeout: 276 seconds]
shifty has joined #lisp
<phoe> that is what I want to do
brown121407 has quit [Read error: Connection reset by peer]
brown121408 has joined #lisp
misterwhatever has joined #lisp
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
akoana has joined #lisp
ebrasca has quit [Remote host closed the connection]
rpg has joined #lisp
<phoe> done and MR'd
shka_ has quit [Ping timeout: 265 seconds]
frgo has quit []
scymtym has joined #lisp
frgo has joined #lisp
shka_ has joined #lisp
<kpoeck> You might want to update the description
<kpoeck> The test calls read-from-string, not read
<phoe> kpoeck: the behaviour doesn't matter in this case but you are correct
<phoe> as in, both READ and READ-FROM-STRING would intern in CL-USER
<phoe> updated the commit message
pierpal has quit [Remote host closed the connection]
dale has joined #lisp
shka_ has quit [Ping timeout: 245 seconds]
joast has quit [Quit: Leaving.]
scottj has joined #lisp
gravicappa has quit [Ping timeout: 240 seconds]
Codaraxis_ has quit [Ping timeout: 250 seconds]
remexre has quit [Ping timeout: 252 seconds]
joast has joined #lisp
Kevslinger has joined #lisp
Arcaelyx has joined #lisp
keep_learning has quit [Remote host closed the connection]
failproofshark has quit [Read error: Connection reset by peer]
failproofshark has joined #lisp
clothespin has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 240 seconds]
oni-on-ion has quit [Read error: Connection reset by peer]
TMA has quit [Ping timeout: 258 seconds]
TMA has joined #lisp
clothespin has joined #lisp
cosimone has quit [Quit: Quit.]
Josh_2 has joined #lisp
cosimone has joined #lisp
Lycurgus has quit [Quit: https://meansofproduction.biz Exit Quassel.]
cosimone has quit [Client Quit]
Bike has quit [Quit: Bike]
cosimone has joined #lisp
random-nick has quit [Ping timeout: 250 seconds]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
jfb4 has quit [Ping timeout: 245 seconds]
jfb4 has joined #lisp
amerlyq has quit [Quit: amerlyq]
hiroaki has quit [Ping timeout: 240 seconds]
chipolux has joined #lisp
karlosz has joined #lisp
hiroaki has joined #lisp
Arcaelyx has quit [Ping timeout: 276 seconds]
akoana has left #lisp ["Leaving"]
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
Oladon_work has quit [Remote host closed the connection]
Bike has joined #lisp
varjag has quit [Remote host closed the connection]
anlsh has joined #lisp
pjb` has quit [Quit: rename]
brettgilio has joined #lisp
ljavorsk__ has joined #lisp
varjag has joined #lisp
jdz has quit [Ping timeout: 250 seconds]
jdz has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
LiamH has quit [Quit: Leaving.]
brettgilio has quit [Quit: Quit]
brettgilio has joined #lisp
edgar-xxx has joined #lisp
edgar-rft has quit [Remote host closed the connection]
ralt has joined #lisp
brettgilio has quit [Ping timeout: 250 seconds]
kpoeck has quit [Remote host closed the connection]
ros_user_ has joined #lisp
rgherdt has quit [Ping timeout: 246 seconds]
sjl_ has quit [Ping timeout: 276 seconds]
pjb has joined #lisp
failproofshark has quit [Ping timeout: 246 seconds]
failproofshark has joined #lisp
wiselord has quit [Read error: Connection reset by peer]
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wiselord has joined #lisp
atgreen has quit [Ping timeout: 245 seconds]
ros_user_ has quit [Quit: Leaving]