igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
pierpa has joined #lisp
Bike has joined #lisp
dented42_ has joined #lisp
dented42 has quit [Ping timeout: 256 seconds]
mathi_aihtam has joined #lisp
hexfour has quit [Remote host closed the connection]
hexfour has joined #lisp
mathi_aihtam has quit [Ping timeout: 264 seconds]
Kaisyu has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
damke has quit [Ping timeout: 265 seconds]
damke has joined #lisp
makomo has quit [Quit: WeeChat 1.9.1]
xrash has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
QualityAddict has quit [Quit: Leaving]
dented42_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Walex has quit [Quit: leaving]
karswell has quit [Remote host closed the connection]
karswell has joined #lisp
Devon has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
loli has quit [Ping timeout: 256 seconds]
shka has quit [Ping timeout: 248 seconds]
loli has joined #lisp
smurfrobot has joined #lisp
cgay has joined #lisp
Cymew has joined #lisp
rumbler31 has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
<pfdietz> So, how DO quicklisp's systems get curated? Is there a way to tell if they're good or not?
<jasom> pfdietz: the default distribution merely checks that they have some open-source license *and* that they build on sbcl
Cymew has joined #lisp
<pfdietz> The problem is they can interfere with each other. Just building in isolation isn't enough.
<pfdietz> I'm wondering because of readtable shenanigans.
<pfdietz> Package collisions would be another concern; I haven't delved into that.
Cymew has quit [Ping timeout: 268 seconds]
QualityAddict has joined #lisp
<jasom> pfdietz: I think asdf has made some changes to how readtables are modified; it was made less aggressive to to breaking some systems that assumed loading system X would modify the readtable as a side-effect, so I don't know what the final outcome of that was.
<jasom> pfdietz: in general the curation is very minimal, so there is no guarantee of quality or completeness
<jasom> pfdietz: it *does* mean that someone asked for it to be included, so there is that...
Cymew has joined #lisp
<Xach> Well, it does lately. I added a lot of stuff without asking at the start, to bootstrap...
smurfrobot has quit [Remote host closed the connection]
Devon has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
pagnol has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
markong has quit [Ping timeout: 255 seconds]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
igemnace has quit [Read error: Connection reset by peer]
skeuomorf has joined #lisp
igemnace has joined #lisp
<aeth> Package name collisions are a near-certainty, especially with nicknames.
<aeth> Fortunately, most of the probable nickname collisions are libraries that do the exact same thing, probably wrapping the exact same C library.
<pfdietz> At this point, I mostly care "does loading this system ruin my lisp session". Purely internal quality is less of a concern.
<pjb> Libraries must not have any short nickname or package name!
<pjb> Leave short nicknames to the end user.
<White_Flame> (must not have any (short nickname) or (package name)) ...
<pfdietz> I very much like the local nicknames extension.
<White_Flame> had to parse that for a sec
<aeth> pfdietz: The thing I care the most about is how many dependencies something brings in
<pfdietz> I also care if the system uses :: anywhere. That's a code smell.
<aeth> Without care, a modest sized application could be using dozens, which also probably means duplicated functionality (e.g. 3 JSON libraries or something)
skeuomorf has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Quit: Leaving.]
<aeth> pfdietz: It looks like I use "::" twice, to declare a type that's not exported and to fix a performance bug in ECL, i.e. (setf cffi::*cffi-ecl-method* :c/c++)
<White_Flame> I tend to grab :: often for testing
<aeth> It looks like the latter is exported from cffi-ecl, though
<White_Flame> instad of chopping up the packages to make that bit cleaner
<aeth> oh, sorry, it's in cffi-sys, defined in cffi-ecl.lisp
<aeth> Either it didn't used to be exported, or I tried to import it without #+ecl
<aeth> I think I can fix that one now
FreeBirdLjj has quit [Remote host closed the connection]
ebzzry has joined #lisp
mgsk has quit [Quit: WeeChat 1.9.1]
hexfour has quit [Quit: WeeChat 1.9.1]
pchrist has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.0.1]
Oladon has joined #lisp
smurfrobot has joined #lisp
dieggsy has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
smurfrobot has joined #lisp
d4ryus2 has joined #lisp
d4ryus1 has quit [Ping timeout: 240 seconds]
nika has joined #lisp
damke has joined #lisp
<beach> Good morning everyone!
damke_ has quit [Ping timeout: 264 seconds]
<asarch> Bojour mon ami! o/
smurfrobot has quit [Remote host closed the connection]
ecraven has quit [Quit: bye]
Cymew has joined #lisp
JonSmith has joined #lisp
z3t0 has joined #lisp
Cymew has quit [Ping timeout: 255 seconds]
JonSmith has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
JonSmith has joined #lisp
z3t0 has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 268 seconds]
mathrick has quit [Ping timeout: 256 seconds]
xrash has quit [Remote host closed the connection]
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
chenbin has joined #lisp
smurfrobot has joined #lisp
asarch has quit [Remote host closed the connection]
fittestbits has left #lisp [#lisp]
trn has quit [Ping timeout: 248 seconds]
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 260 seconds]
dieggsy has joined #lisp
dieggsy has quit [Client Quit]
milanj has quit [Quit: This computer has gone to sleep]
z3t0 has joined #lisp
Bike has quit [Quit: Lost terminal]
smurfrobot has quit [Remote host closed the connection]
z3t0 has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
orivej has joined #lisp
rumbler31 has quit [Remote host closed the connection]
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 264 seconds]
schoppenhauer has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #lisp
smurfrobot has joined #lisp
<jmercouris> Any data exists about the salary of lisp developers?
<jmercouris> Yes, location, sector etc, I'm speaking generally
jdz has quit [Ping timeout: 255 seconds]
jdz has joined #lisp
z3t0 has joined #lisp
fortitude has quit [Ping timeout: 256 seconds]
oleo has quit [Ping timeout: 276 seconds]
sjl__ has joined #lisp
trn has joined #lisp
z3t0 has quit [Ping timeout: 240 seconds]
sjl__ has quit [Ping timeout: 268 seconds]
oleo has joined #lisp
JonSmith has quit [Remote host closed the connection]
JonSmith has joined #lisp
chens has joined #lisp
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 255 seconds]
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 276 seconds]
fortitude has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
thijso has quit [Ping timeout: 248 seconds]
JonSmith has quit [Remote host closed the connection]
damke_ has joined #lisp
wigust has joined #lisp
<phoe> Good morning
damke has quit [Ping timeout: 265 seconds]
<beach> Hello phoe.
oleo has quit [Quit: Leaving]
dddddd has quit [Remote host closed the connection]
LocaMocha has joined #lisp
red-dot has joined #lisp
<phoe> I don't really know.
<phoe> I want to write a paper extending CLIM2's idea of protocols and extending your extensions of this idea.
<phoe> But with >9000 other papers on software development, engineering, software modularity and software interfaces, I don't think it would be any kind of significant contribution.
<beach> I am not sure I share your pessimism.
<phoe> Don't you?
<beach> Most work in software engineering etc. assumes an object-oriented model of type Java, with single dispatch and methods in classes.
<phoe> Hm. This is right.
<beach> Therefore, some work that is related to generic functions etc could very well be unique.
<phoe> Sigh.
<phoe> Well, there goes my pessimism.
<phoe> Thanks!
ecraven has joined #lisp
<beach> Sure. :)
marusich has joined #lisp
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 268 seconds]
Karl_Dscc has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
z3t0 has joined #lisp
zymurgy has quit [Quit: WeeChat 1.4]
mathrick has joined #lisp
mishoo has joined #lisp
z3t0 has quit [Ping timeout: 260 seconds]
<jmercouris> phoe: something something ulhs :P
vlatkoB has joined #lisp
dec0n has joined #lisp
zymurgy has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
flamebeard has joined #lisp
marusich has quit [Ping timeout: 265 seconds]
hiroaki has joined #lisp
jmercouris has quit [Ping timeout: 268 seconds]
marusich has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
whoman has quit [Quit: Leaving]
z3t0 has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 256 seconds]
z3t0 has quit [Ping timeout: 255 seconds]
shka has joined #lisp
z3t0 has joined #lisp
heurist`_ has joined #lisp
heurist` has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
z3t0 has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
Tobbi has joined #lisp
rumbler31 has joined #lisp
heurist`_ has quit [Ping timeout: 256 seconds]
<red-dot> Has anyone seen a good book or reference for format directives? I've read CLHS, PCL and CLtL but still do not really have a good grasp on it. I need to do some character based formatting.
<red-dot> Amazing that so much functionality can be packed into all that line noise....
<Shinmera> I've never needed anything beyond PCL and CLHS22.3 on that, so
<red-dot> Neither did I until now. I need to format tables of data on a terminal; no GUI
<red-dot> Weitz has a few examples too, but I think the real answer is going to be: 'go experiment'.
rumbler31 has quit [Ping timeout: 268 seconds]
<Shinmera> Okey, well for that you first have to figure out the widths of each column. Format won't be able to do that for you. Once you got that you just print each row using the width limitations of the format directives for each column.
fikka has joined #lisp
heurist`_ has joined #lisp
<red-dot> That's what I thought, thanks. Am hoping there are some good examples of this somewhere, or a Guide to Format Directives somewhere. At some point this must have been more commonly used, but I suspect such information did not make it over to the Internet, as it probably pre-dates it.
<red-dot> Perhaps usenet archives
<Shinmera> This might not be the best way to do things, but here's an example: https://github.com/Shinmera/trivial-benchmark/blob/master/toolkit.lisp#L9
z3t0 has joined #lisp
<red-dot> It is a start :-)
<red-dot> Weitz has a pretty-printer example that might also do the trick. Good thing it is weekend.
<Shinmera> Wish it was. Friday for me.
z3t0 has quit [Ping timeout: 264 seconds]
<jackdaniel> I have a mixed feelings about format which partially overlap with points brought here http://www.cs.yale.edu/homes/dvm/format-stinks.html
<jackdaniel> I'm not using `out' construct though (yet?)
z3t0 has joined #lisp
dented42 has joined #lisp
<red-dot> Well, I will not argue that there should not be a better way. Just like LOOP vs. iterate. 'out' might be worth looking at.
<jackdaniel> disclaimer: I'm not sure if `out' is maintained/finished/published whatsoever
<jack_rabbit> looking at hunchentoot here. Can't figure out how to set the backlog length.
<jackdaniel> I've brought it as something relevant to format which was discussed
z3t0 has quit [Ping timeout: 256 seconds]
<jack_rabbit> When load-testing, I'm getting "Can't handle a new request, too many request threads already"
_whitelogger_ has joined #lisp
z3t0 has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
_whitelogger has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 276 seconds]
<jack_rabbit> hmm. appears the acceptor has a listen-backlog initarg. But it doesn't appear to eliminate the error message.
scymtym has joined #lisp
chenbin has quit [Read error: Connection reset by peer]
z3t0 has joined #lisp
brandonz has joined #lisp
Jach[m] has joined #lisp
z3t0 has quit [Ping timeout: 248 seconds]
<Shinmera> Typically when you run out of threads your system is so badly congested that keeping them idle is not going to help and is instead just going to load out your system even worse by taking up FDs
<Shinmera> So I do not recommend trying to keep a queue.
scymtym_ has joined #lisp
heurist_ has joined #lisp
<jack_rabbit> I disagree.
<jack_rabbit> Keeping a large queue may be unwise, but a queue is totally reasonable under many circumstances.
<jack_rabbit> anyway, it appears that if I want to increase the queue, I need to alter the taskmaster.
heurist`_ has quit [Ping timeout: 255 seconds]
<jackdaniel> what you want (keeping aside how its implemented in hunchentoot - you may subclass the taskmaster) is lparallel channel with n workers
<jackdaniel> (+ one thread to consume the results if you don't really need them around)
scymtym has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
fouric has quit [Ping timeout: 248 seconds]
<jack_rabbit> jackdaniel, not sure I follow.
knobo1 has joined #lisp
heurist_ has quit [Read error: Connection reset by peer]
heurist_ has joined #lisp
fouric has joined #lisp
marusich has quit [Ping timeout: 265 seconds]
varjag has joined #lisp
<jack_rabbit> anyway, I manually instantiated a taskmaster with a higher max-accept-count, and everything works as expected now.
fikka has quit [Ping timeout: 240 seconds]
marusich has joined #lisp
<jack_rabbit> I wonder, though, if it might be a good patch for the acceptor thread to check (if it can) with the taskmaster to see if the accepted queue is full before accepting, and waiting if it is full.
<jack_rabbit> Because I increased the listener queue, but the listener was able to happily keep up with the request rate.
sjl__ has joined #lisp
<jack_rabbit> It was the accepted queue that was rejecting the connections, and even though it was full, the listener was happy to accept connections, causing them to return 503.
z3t0 has joined #lisp
damke has joined #lisp
cyberlard has quit [Quit: Leaving]
marusich has quit [Ping timeout: 276 seconds]
damke_ has quit [Ping timeout: 264 seconds]
heurist_ has quit [Ping timeout: 240 seconds]
sjl__ has quit [Ping timeout: 276 seconds]
z3t0 has quit [Ping timeout: 240 seconds]
marusich has joined #lisp
damke_ has joined #lisp
z3t0 has joined #lisp
damke has quit [Ping timeout: 264 seconds]
hiroaki has quit [Ping timeout: 255 seconds]
manualcrank has quit [Quit: WeeChat 2.0.1]
heurist_ has joined #lisp
jfb4 has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
z3t0 has quit [Ping timeout: 260 seconds]
<hjudt> is there a standard function that does (cdr (assoc ...)) or does one have to write a macro?
jfb4 has joined #lisp
<Shinmera> You don't have to write a macro for that.
<Shinmera> In fact you shouldn't. You should write a function for it.
<jackdaniel> alexandria:assoc-value
<jackdaniel> not standard, but alexandria has it
<hjudt> jackdaniel: thanks
heurist_ has quit [Ping timeout: 248 seconds]
<Shinmera> The joke of assoc-value is that it isn't even shorter than (cdr assoc ..))
<hjudt> Shinmera: yes, a function would of course do too
JuanDaugherty has quit [Quit: Ex Chat]
JuanDaugherty has joined #lisp
<jackdaniel> it's not about being shorter in writing, it's "shorter" cognitively
<hjudt> it is easier to read imho
<jackdaniel> exactly my point
<hjudt> but only if you import-from not use alexandria:assoc-value directly because that length sucks a bit
<hjudt> of course for this simple function i could also ignore alexandria and write it on my own...
<jackdaniel> abbreviation macros come handy at times
<jackdaniel> I personally find multiple-value-bind and destructuring-bind not very pleasent to write
<Shinmera> Calling it rassoc (like in elisp) would be fine in my opinion.
<Shinmera> Or wait no I'm confusing stuff
<hjudt> isn't there a rassoc? it does reverse lookup?
<Shinmera> In elisp it's alist-get. rassoc compares the cdr rather than the car.
<scymtym_> isn't the point of ALEXANDRIA:ASSOC-VALUE that it is a place?
hiroaki has joined #lisp
<jackdaniel> it is
<jackdaniel> assoc operations in alexandria are defun + setf-expander
murii has joined #lisp
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 264 seconds]
JuanDaugherty has quit [Quit: Ex Chat]
murii has quit [Remote host closed the connection]
murii has joined #lisp
orivej has joined #lisp
z3t0 has joined #lisp
_cosmonaut_ has joined #lisp
z3t0 has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 276 seconds]
heurist_ has joined #lisp
milanj has joined #lisp
flip214_ has joined #lisp
flip214_ has joined #lisp
flip214_ has quit [Changing host]
flip214 has quit [Read error: Connection reset by peer]
nirved has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
heurist_ has quit [Ping timeout: 256 seconds]
raynold has quit [Quit: Connection closed for inactivity]
z3t0 has joined #lisp
<phoe> Is it okay for #'(SETF FOO) to have keyword arguments where #'FOO does not have them?
<beach> I don't see why not.
heurist_ has joined #lisp
z3t0 has quit [Ping timeout: 265 seconds]
<jackdaniel> (setf (foo :forcibly t) 8) ; something like that?
<phoe> yes
<phoe> (setf (foo :invalidate-some-other-stuff t) bar)
<Shinmera> I really wish SETF didn't have the restriction that the value being set has to be returned. It's not unusual that I want to coerce the value being set to something else, which would be more useful to return instead.
heurist_ has quit [Ping timeout: 240 seconds]
marusich has quit [Quit: Leaving]
<scymtym_> phoe: it can make sense to have FOO and (SETF FOO) accept the same set of keyword arguments even if some are ignored in one of the functions: consider (incf (value "counter" :default 5))
<phoe> scymtym_: that's my worry. But let me explain.
<phoe> I have an object which holds a compressed and decompressed version of some data.
<phoe> When I setf the decompressed version, this means that the compressed version no longer refers to the decompressed version - they might be different.
<phoe> This is why I want to do something like (setf (decompressed-data foo :invalidate-compressed-data-p t) new-data)
<Shinmera> Is there ever a case where you do not want to keep the two in sync?
<Shinmera> That sounds like an invitation for trouble to me
<phoe> Yes, during the initial decompressing of the file.
<phoe> I first setf the compressed-data, then I uncompress it and setf the compressed-data.
<Shinmera> Automatically decompress and update the decompressed slot when the compressed slot is set.
<scymtym_> can you explain why you need this kind of object
<phoe> I am working with an object representing a binary file.
<phoe> This binary file consists of multiple (up to thousands) of smaller archives concatenated together.
<phoe> For efficiency, if I edit one of them, I want only this single one to be recompressed - the other ones can use their original compressed form, the one I originally read from the source file.
<Shinmera> Yeah but do you ever need both at the same time?
<phoe> And I don't want to set the compressed slot - I operate only on decompressed data.
<phoe> Shinmera: not really. Either one or the other.
<Shinmera> Sounds to me more like you should have a data slot and a flag that says whether it's compressed. Or two subclasses, one being compressed and one being not. Then use change-class (and update-instance-for-changed-class) to handle the compression.
<phoe> Or rather, yes, I need both of them.
<phoe> Decompressed form, for reading; compressed form, for saving.
<Shinmera> Yeah but you synthesise one from the other. When you read or when you save respectively.
<scymtym_> i'm not sure computing the compressed form eagerly after a change makes sense
<phoe> Hmm. I see.
<phoe> It's not about computing the compressed form eagerly.
<phoe> It's about invalidating previously computed data.
<phoe> I don't want to instantly compress, I want to slot-makunbound 'compressed-data.
<scymtym_> maybe i misunderstood
<phoe> I have an object that holds both compressed and uncompressed variants of the same data.
z3t0 has joined #lisp
<phoe> The moment I set new decompressed data, I want to purge the old compressed data.
<phoe> So, when I actually decide to save and compress, my code can compress this thing, set the compressed-data slot, and save it to disk.
<Shinmera> From my understanding I would do the following: when reading the file read to a list of compressed-data instances. Then when you want to read/write the value, you change-class to decompressed-data first. Finally when you want to save to disk, you change-class them all to compressed-data and write out.
<phoe> This means that I *re*compress everything.
heurist_ has joined #lisp
<phoe> If I have 300 files and only change one of them, this means I compress 300 files and not 1.
<Shinmera> Ah, right.
<phoe> That's why I need to hold both compressed and decompressed data.
<scymtym_> sounds like a state chart, maybe via sublcasses is in order: loaded --decompress--> clean --(setf data)--> dirty
<phoe> Yep, sounds right.
pjb has quit [Remote host closed the connection]
<scymtym_> so why the keyword parameter? wouldn't it always invalidate?
<phoe> The initial loading.
z3t0 has quit [Ping timeout: 240 seconds]
<Shinmera> use slot-value
<phoe> When I load the file, I first set compressed-data. Then I decompress, and set uncompressed-data.
<Shinmera> That's like, what it's for
<phoe> Hm. Sounds sane, right.
pjb has joined #lisp
<scymtym_> or, if you really don't like SLOT-VALUE for this, make an internal :accessor %decompressed-data
<phoe> I can dig SLOT-VALUE in this single case.
heurist`_` has joined #lisp
heurist_ has quit [Ping timeout: 248 seconds]
<phoe> And so my custom writer can be reduced to (defmethod (setf data) :after (...) (invalidate-something))
heurist`_` has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
malice has joined #lisp
m00natic has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
sjl__ has joined #lisp
z3t0 has joined #lisp
pagnol has joined #lisp
sjl__ has quit [Ping timeout: 276 seconds]
z3t0 has quit [Ping timeout: 265 seconds]
damke has quit [Ping timeout: 264 seconds]
JonSmith has joined #lisp
nika has quit [Read error: Connection reset by peer]
damke has joined #lisp
nika has joined #lisp
JonSmith has quit [Remote host closed the connection]
nika has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 248 seconds]
z3t0 has joined #lisp
waaron1 has joined #lisp
waaron has quit [Ping timeout: 248 seconds]
Cymew has quit [Remote host closed the connection]
mishoo has quit [Ping timeout: 268 seconds]
pagnol has quit [Ping timeout: 240 seconds]
z3t0 has quit [Ping timeout: 264 seconds]
pagnol has joined #lisp
hhdave has joined #lisp
malice has quit [Remote host closed the connection]
vlatkoB_ has joined #lisp
<jack_rabbit> can someone describe the mechanism by which setf is allowed to be a function with a list name?
<jack_rabbit> I can't seem to define a function with list name except for setf.
<Shinmera> clhs glossary/function name
fikka has joined #lisp
<jack_rabbit> I see.
<jack_rabbit> It's a special case, and implementations are free to define other setf-like functions.
vlatkoB has quit [Ping timeout: 260 seconds]
schweers has joined #lisp
<jack_rabbit> Or I guess, given that description, implementations can even define weirder name structures.
nullniverse has joined #lisp
Achylles has joined #lisp
z3t0 has joined #lisp
z3t0 has quit [Ping timeout: 256 seconds]
pagnol has quit [Ping timeout: 240 seconds]
markong has joined #lisp
damke__ has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
damke has quit [Ping timeout: 264 seconds]
z3t0 has joined #lisp
plertrood has joined #lisp
z3t0 has quit [Ping timeout: 265 seconds]
damke__ has quit [Ping timeout: 264 seconds]
schweers has quit [Ping timeout: 265 seconds]
attila_lendvai has joined #lisp
Cymew has joined #lisp
dcluna has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Client Quit]
z3t0 has joined #lisp
dcluna has joined #lisp
schweers has joined #lisp
pagnol has joined #lisp
red-dot has joined #lisp
z3t0 has quit [Ping timeout: 268 seconds]
Norvic_ has joined #lisp
fluxit has quit [Ping timeout: 248 seconds]
fluxit has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
DGASAU` has joined #lisp
sword` has joined #lisp
brandonz has quit [Ping timeout: 240 seconds]
DGASAU has quit [Read error: Connection reset by peer]
randomstrangerb has quit [Ping timeout: 248 seconds]
misv has quit [Ping timeout: 248 seconds]
froggey has quit [Ping timeout: 248 seconds]
sigjuice has quit [Ping timeout: 248 seconds]
hjudt has quit [Ping timeout: 248 seconds]
greaser|q has quit [Remote host closed the connection]
isoraqathedh has quit [Remote host closed the connection]
misv has joined #lisp
CrazyEddy has quit [Remote host closed the connection]
brandonz has joined #lisp
sword has quit [Read error: Connection reset by peer]
shifty has quit [Ping timeout: 248 seconds]
norvic has quit [Ping timeout: 248 seconds]
Xal has quit [Ping timeout: 248 seconds]
jself has quit [Ping timeout: 248 seconds]
shifty has joined #lisp
damke__ has joined #lisp
brendyn has quit [Ping timeout: 240 seconds]
koisoke has quit [Ping timeout: 240 seconds]
isoraqathedh has joined #lisp
sigjuice has joined #lisp
sukaeto has quit [Ping timeout: 255 seconds]
Ven`` has joined #lisp
hjudt has joined #lisp
Xal has joined #lisp
koisoke has joined #lisp
froggey has joined #lisp
greaser|q has joined #lisp
jself has joined #lisp
python476 has joined #lisp
CrazyEddy has joined #lisp
fikka has joined #lisp
milanj_ has joined #lisp
milanj has quit [Ping timeout: 256 seconds]
z3t0 has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heurist`_` has joined #lisp
z3t0 has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
brendyn has joined #lisp
sukaeto has joined #lisp
pagnol has quit [Quit: Ex-Chat]
jfb4 has quit [Ping timeout: 265 seconds]
EvW has joined #lisp
rumbler31 has joined #lisp
z3t0 has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
jfb4 has joined #lisp
knicklux has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
z3t0 has quit [Ping timeout: 264 seconds]
papachan has joined #lisp
mishoo has joined #lisp
random-nick has joined #lisp
lnostdal has quit [Ping timeout: 240 seconds]
dddddd has joined #lisp
shifty has quit [Ping timeout: 255 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
z3t0 has joined #lisp
lnostdal has joined #lisp
lnostdal has quit [Ping timeout: 265 seconds]
z3t0 has quit [Ping timeout: 276 seconds]
schweers has quit [Ping timeout: 255 seconds]
Bike has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shrdlu68 has joined #lisp
Tobbi has joined #lisp
schweers has joined #lisp
wxie has quit [Quit: Bye.]
oleo has joined #lisp
lnostdal has joined #lisp
dyelar has joined #lisp
z3t0 has joined #lisp
ikki has joined #lisp
z3t0 has quit [Ping timeout: 260 seconds]
z3t0 has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
z3t0 has quit [Ping timeout: 240 seconds]
nullman has quit [Remote host closed the connection]
nullman has joined #lisp
Jesin has quit [Quit: Leaving]
brendyn has quit [Ping timeout: 255 seconds]
ikki has quit [Ping timeout: 260 seconds]
asarch has joined #lisp
<phoe> jack_rabbit: no, why?
<phoe> the standard is clear, it's either FOO or (SETF FOO), and the implementations are not allowed to extend it in a portable way
<phoe> they can do whatever they want to, but it won't be standard Common Lisp.
hiroaki has quit [Ping timeout: 265 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
Cymew has quit [Read error: Connection reset by peer]
orivej has joined #lisp
Cymew_ has joined #lisp
dented42 has joined #lisp
hvxgr has joined #lisp
lnostdal has quit [Ping timeout: 246 seconds]
z3t0 has joined #lisp
LiamH has joined #lisp
LiamH has left #lisp [#lisp]
JuanDaugherty has joined #lisp
LiamH has joined #lisp
chens` has joined #lisp
troydm has joined #lisp
python476 has quit [Ping timeout: 240 seconds]
chens has quit [Remote host closed the connection]
z3t0 has quit [Ping timeout: 260 seconds]
lnostdal has joined #lisp
makomo has joined #lisp
z3t0 has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
hiroaki has joined #lisp
red-dot has joined #lisp
mitc0185_ has joined #lisp
z3t0 has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
shrdlu68 has quit [Read error: Connection reset by peer]
giraffe has quit [Remote host closed the connection]
itruslove has quit [Remote host closed the connection]
nika has joined #lisp
raynold has joined #lisp
jfb4 has quit [Ping timeout: 256 seconds]
<phoe> Is there any kind of GETHASH-OR-DIE in any commonly used utility library?
jfb4 has joined #lisp
z3t0 has joined #lisp
<Shinmera> "die" meaning what?
<Shinmera> Your implementation crashes?
<phoe> Signal an error.
<beach> phoe: It is too easy for a library.
<phoe> SBCL has a lot of -OR-DIE internal functions and I don't see it crash. (:
<beach> (multiple-value-bind (value present-p) (gethash ...) (assert present-p) ..)
<dlowe> (or (gethash foo bar) (die))
<Shinmera> dlowe: What if it returns NIL as the value?
<dlowe> DEATH
<phoe> beach: ASSOC-VALUE is too easy for a library.
<Shinmera> heh
<beach> phoe: It is.
<phoe> Yet alexandria has it.
<dlowe> 99% of the time, you don't want to store NIL
<Shinmera> The setf part of assoc-value is not trivial
<phoe> dlowe: sometimes yes, I do.
<dlowe> the other 1%, you can do what beach describes
<dlowe> phoe: probabilities. do you understand them
<jackdaniel> ensure-list is easy too, yet it's not a bad idea to have it handy in alexandria
* Shinmera prefers (defun enlist (a &rest parts) (if (listp a) a (list* a parts)))
z3t0 has quit [Ping timeout: 248 seconds]
nullman has quit [Ping timeout: 256 seconds]
nullman has joined #lisp
nika has quit [Ping timeout: 268 seconds]
Achylles has quit [Ping timeout: 255 seconds]
<jdz> That's a weird function.
fikka has quit [Ping timeout: 260 seconds]
<phoe> A bit more useful, it seems.
<phoe> (enlist 'foo) is equivalent to (ensure-list 'foo).
<Shinmera> It's not very often that being able to specify the other parts in the resulting list is useful, but it has come in handy at times.
<|3b|> (enlist '(1) 2 3)) being (1) seems odd though
<Shinmera> Well it's odd if you specify the argument directly there no matter what.
<|3b|> right, was more talking about the case where it was in a variable
<jackdaniel> I still like ensure-list better
<|3b|> (enlist a 2 3) may or may not return a list ending with 2 3
<Bike> yeah i'm curious what you use that for.
* |3b| probably should have used something with identity, since a could have 2,3 already too
* |3b| gives up :p
<Shinmera> A specific instance is: for textures you can specify a wrapping, both in x and y. (enlist wrapping wrapping) means that if it's a single keyword, it goes for both x and y.
FreeBirdLjj has joined #lisp
<Shinmera> Another example: when binding the matrix stack locally you can specify which matrices to bind, and how (copy, zero, identity). So (enlist matrix :copy) means the default behaviour is to copy, but if you want to specify further you can do that too.
<Shinmera> Obviously you can put this kind of logic into the destructuring part as well
<Shinmera> With things like LOOP where the destructuring that is available is rather poor, this sort of thing is handy though.
<|3b|> yeah, can be both "odd" and "useful" at the same time :)
<|3b|> and most of the things i can think of that would fix my perception of oddness would probably make it verbose enough to no longer be as useful
<jackdaniel> I'm not sure if putting so much meaning into lists stored in variables is a good idea either, but it's only an opinion
<Xach> late to the party, but
<Xach> sbcl's convention is "foo-or-lose"
fikka has joined #lisp
<AeroNotix> is there a way to tell sbcl to print symbols by default in lowercase?
<phoe> AeroNotix: yes
<Shinmera> clhs *print-case*
<phoe> oh, he beat me to it
<AeroNotix> Thanks both!
kami has joined #lisp
<kami> Hello #lisp
z3t0 has joined #lisp
Cymew_ has quit [Remote host closed the connection]
<jackdaniel> hello kami
sjl__ has joined #lisp
<AeroNotix> oh man, I've been writing lisp on and off for years but never thought to see if that :upcase/:downcase behaviour could be changed. QOL improvement for sure
murii has quit [Ping timeout: 240 seconds]
<Shinmera> Note that you might also break libraries if you do this
giraffe has joined #lisp
<AeroNotix> in what way?
z3t0 has quit [Ping timeout: 264 seconds]
<Shinmera> Libraries that depend on the print behaviour of symbols.
<AeroNotix> Hmm, not sure exactly but that would seem to make them already broken
<AeroNotix> why would they depend on that behaviour?
<Shinmera> Serialising a symbol to string can make that happen.
sjl has quit [Ping timeout: 256 seconds]
josemanuel has quit [Quit: leaving]
<jackdaniel> serialising symbol name*
<pjb> Only in buggy libraries.
<Shinmera> No, I meant what I said.
itruslove has joined #lisp
Tobbi has quit [Ping timeout: 248 seconds]
<Shinmera> pjb: Sure, it's a bug. I'm just saying.
groovy2shoes has quit [Quit: moritura te saluto]
Devon has joined #lisp
Cymew has joined #lisp
msb has quit [Ping timeout: 260 seconds]
z3t0 has joined #lisp
msb has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
groovy2shoes has joined #lisp
z3t0 has quit [Ping timeout: 265 seconds]
Cymew has quit [Remote host closed the connection]
<phoe> Can I print arrays in a readable form while preserving their element-type? How?
<phoe> Printing a specialized vector of (unsigned-byte 8) gives me #(0 1 2 3) which, when read, is a simple-vector.
<|3b|> #. or maybe implementation specific syntax
<jackdaniel> #.
<jackdaniel> that
<phoe> #. - okay.
<pjb> (format t "#.(make-array '~S :element-type '~S :initial-contents '~S)" (array-dimensions a) (array-element-type a) (convert-to-sequence a))
rippa has joined #lisp
<phoe> Thanks.
<pjb> alternatively: (format t "#.(coerce '~S '~S)" a (type-of a))
<pjb> May not work depending on how the implementation prints the types and how it takes it for coerce.
<Bike> phoe: if you use *print-readably* the implementation might figure something out. ECL uses a special form of #a and sbcl adopted that, iirc.
Cymew has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has quit [Ping timeout: 240 seconds]
red-dot has joined #lisp
Cymew has quit [Ping timeout: 276 seconds]
theBlackDragon has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
eudoxia has joined #lisp
<phoe> Bike: I see.
<Bike> if it can't figure something out it'll signal an error.
<phoe> Yes, I know that one.
fikka has joined #lisp
<phoe> Though I admit, I'll prefer the #. route because it's standard.
<phoe> CCL signals an error there, yes.
z3t0 has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
<phoe> clhs *print-pprint-dispatch*
<phoe> " In general, however, you can put a value in *print-pprint-dispatch* that makes pretty-printed output look exactly like non-pretty-printed output."
<phoe> How do I do this?
<phoe> Has anyone done this before?
Cymew has joined #lisp
z3t0 has quit [Ping timeout: 256 seconds]
dec0n has quit [Read error: Connection reset by peer]
<phoe> Inside some dynamic environment, I want to print all non-string vectors as #.(MAKE-ARRAY ... :ELEMENT-TYPE ... :INITIAL-CONTENTS ...) - I guessed that I can do this by hacking the pretty-printer dispatch table and feeding it a function that prints them like this.
<phoe> But this means that everything else will be pretty-printed, which is not readable. So I want to tell the pretty-printer dispatch table to print everything in a not-pretty way.
<phoe> How do I do this?
<pjb> I would just write my own printing function.
Cymew has quit [Ping timeout: 240 seconds]
<phoe> I wish I could just define a PRINT-OBJECT method on VECTOR, but that ain't portable.
Cymew has joined #lisp
<pjb> I consider print and print-object only for debugging purposes. Not for enterprisy serialization.
schweers has quit [Ping timeout: 246 seconds]
<Bike> they're kind of overcomplicated for just debugging
<pjb> Otherwise, you can wrap your arrays in an object, and use print-object on that class.
sjl__ is now known as sjl
<|3b|> could put a function in pprint-dispatch that just rebind print-pretty to nil and prints again, but don't see any way to get an empty dispatch table or enumerate the contents to be sure you replaced everything in it
Cymew has quit [Ping timeout: 256 seconds]
<|3b|> (possibly with something to detect loops, in case some print-object tries to pprint things)
z3t0 has joined #lisp
eivarv has joined #lisp
<phoe> I wish I could get an empty pprint dispatch table.
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<phoe> NAMED-READTABLES have figured out a way to do this, but it does it via portable code.
z3t0 has quit [Ping timeout: 240 seconds]
<phoe> ...and ALEXANDRIA could use a COERCEF.
Karl_Dscc has joined #lisp
flamebeard has quit [Quit: Leaving]
kami has quit [Ping timeout: 276 seconds]
nullniverse has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 256 seconds]
<_death> already has it
fikka has joined #lisp
<phoe> ...oh
<phoe> good
<phoe> I hadn't use-package'd it.
sjl has quit [Ping timeout: 265 seconds]
turkja has quit [Ping timeout: 260 seconds]
sjl has joined #lisp
asarch has quit [Ping timeout: 248 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
whoman has joined #lisp
sjl has quit [Quit: WeeChat 1.9]
nullman has quit [Ping timeout: 256 seconds]
knobo1 has quit [Ping timeout: 260 seconds]
Jesin has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
red-dot has joined #lisp
rumbler3_ has joined #lisp
drewc has quit [Ping timeout: 256 seconds]
krasnal has joined #lisp
rumbler3_ has quit [Ping timeout: 256 seconds]
sjl has joined #lisp
DGASAU` is now known as DGASAU
<beach> clhs read
<beach> Can someone help me interpret the paragraph "Exceptional Situations:", please?
theBlackDragon has joined #lisp
<beach> First it says "regardless of eof-error-p".
vaporatorius has quit [Ping timeout: 255 seconds]
EvW has quit [Ping timeout: 255 seconds]
<beach> Then it says "This is detected when ... AND eof-error-p non-nil"
<whoman> well
<whoman> it also says regardless ?
<whoman> ohh
moei has joined #lisp
<tfb> it signals en eof error *regardless of eof-error-p* if you hit the end of file while (say) reading a string or list
<whoman> so if it is called when recursive-p AND eof-error-p ..
<whoman> tfb but it says , the eof is detected when eof-error-p and recursive-p are non-nil
<beach> tfb: That part I understand. But then it seems to require eof-error-p to be non-nil for this situation to be detected.
<whoman> i really think it would be better if the hyperspec was more CODE. (same with legal documents)
<whoman> only if recursive-p i think, beach
<beach> That is what I am thinking too.
<tfb> no that's before the *beginning* of an object
<beach> Oh, OK.
<beach> er, no I don't see it.
<beach> In "This is detected..." what is "This"?
<beach> It must be "if the file ends in the middle of an object representation", no?
<tfb> if you are recursive-p is true then you are in the middle of an object by assumption.
<tfb> But I'm not actually sure if the wording is right now
<beach> I think I know how to implement it, but I can't figure out why they say that eof-error-p is non-nil.
warweasle has joined #lisp
<whoman> beach, the condition of eof = This
<tfb> My guess is that if recursive-p is true then you need to signal regardless of eof-error-p since you are in the middle of reading something
<random-nick> maybe that means the recursive calls to read when encountering something like ( have recursive-p and eof-error-p non-nil so that the toplevel call to read gets the error
<tfb> and that there's a bug in the spec about that
<tfb> alternatively, recursive calls must also set eof-error-p true
<whoman> hmmm yeah
<tfb> but nothing says that
<whoman> english is not so great at conveying logic
<tfb> whoman: but specifications written in some logical formalism are insanely hard to understand (for me)
fikka has joined #lisp
<whoman> well it could be. but i think the CLHS could benefit from some more mathematical/logical descriptions. beyond the useless syntax graphics.
drewc has joined #lisp
<random-nick> I think "This" refers to "if a file does not contain enough right parentheses to balance the left parentheses in it"
<whoman> tfb, i mean like in lisp code =) CL pseudo code
<tfb> whoman: yes
<whoman> eg. translating that section ("Excep...") into 'generic' CL
<beach> random-nick: Yes, when READ is called recursively, it should be called with that flag being true.
<beach> tfb: Ah, that's an idea.
<whoman> there is a project (forgetting the name, again) which implements CL in an implementation-independant way. like a reference, i guess
<pjb> sicl
<jasom> sicl is very much not implementation-independant
<jasom> e.g. it's loop implementation will not work unless you have first-class global environments
<pjb> It is very implementation independent. It's written in conforming CL.
<beach> jasom: That just isn't true. Where did you get that from?
<jasom> beach: I thought I got it from you... *checks logs*
<beach> SICL LOOP requires CLOS but not first-class global environments.
<beach> whoman: Is SICL the project you are thinking of? There is an older project (abandoned I think) that did something simpler than what SICL is attempting.
plertrood has quit [Ping timeout: 260 seconds]
<jasom> "2016-05-30 22:09:47 beach jasom: Currently, in order to use SICL LOOP, you need first-class global environments to avoid the package lock."
<jasom> maybe that's no longer true
fikka has quit [Ping timeout: 268 seconds]
<beach> Sure, but that would be true for any implementation of LOOP.
<beach> If you try to load your own LOOP macro into SBCL, then you trip the package lock.
<jasom> ah, it defines it as cl:loop, not some other package?
<beach> Of course.
<beach> It is a native implementation of LOOP.
<beach> I think I did it so that you can create a sicl-loop package and not define the macro itself. That way, you can define package:loop to call the support functions.
<jasom> If I wanted to use sicl in a lisp bootstrapped by sbcl, how would I go about doing so?
<beach> That would depend on the Lisp in question, I would think.
<beach> It would depend on how that Lisp is bootstrapped.
<jasom> got it; I misunderstood your answer then
ebrasca has quit [Ping timeout: 240 seconds]
<beach> So if you just omit it and define your own replacement in the package of your choice, you can use the full SICL LOOP.
orivej has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
<jasom> that makes sense. The implementation I was planning on using it from (jscl) has since gotten loop via a port from Symbolics's implementation
<beach> But I fully admit that I still have to come up with a configuration of one or more ASDF system definitions that will work both natively, and when someone wants to try the system in some other implementation without tripping the package lock.
<|3b|> clhs 23.1.3.2
<jasom> beach: hmm, SICL looks way more complete than the last time I looked at it
<beach> |3b|: Oh, thanks!
<|3b|> beach: looks like "this" is the specific condition of eof in the middle of an object rather than eof in general
<beach> jasom: Most of the code is there, but I am making slow progress on the bootstrapping part.
<|3b|> though READ specifies the same error type in both cases
hhdave has quit [Ping timeout: 260 seconds]
<beach> Yeah.
<jasom> beach: so it's not quite at the point where I can make an hir-to-target translator and push a button to bootstrap?
<beach> |3b|: Still that's more information. Thanks.
<beach> jasom: Nope, sorry.
Jesin has quit [Quit: Leaving]
<beach> jasom: Well, not quite true. If all you want is a file compiler, then everything is in place.
<beach> jasom: The hard part is bootstrapping a native system.
<jasom> beach: that *might* be sufficient for what I'm looking for; but isn't a runtime needed?
ikki has joined #lisp
<beach> My (admittedly small) family is calling me to dinner. I'll be back later.
<jasom> beach: enjoy!
<beach> Yes, you would need your own Common Lisp implementation (the runtime).
varjag has joined #lisp
<dmiles> jasom: are you improving jscl ?
d4ryus2 is now known as d4ryus
fikka has joined #lisp
<jasom> dmiles: this was like 2 years ago that I looked into it
_cosmonaut_ has quit [Remote host closed the connection]
<dmiles> mostly i was asking to see if jscl is getting more love and improvement
<whoman> would be nice eh
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
m00natic has quit [Remote host closed the connection]
JuanitoJons has joined #lisp
hexfive has joined #lisp
python476 has joined #lisp
chens`` has joined #lisp
joga_ has joined #lisp
foom has joined #lisp
chens` has quit [Ping timeout: 248 seconds]
foom2 has quit [Ping timeout: 276 seconds]
joga_ has quit [Changing host]
joga_ has joined #lisp
joga_ is now known as joga
jmercouris has joined #lisp
<jmercouris> We have #\return, but we don't have #\escape
smasta has quit [Quit: WeeChat 2.0.1]
<jmercouris> so how do we represent escape?
<phoe> jmercouris: where?
<phoe> where do you want to put this escape?
<jmercouris> I would like to put it inline in code
__main__ has quit [Ping timeout: 240 seconds]
red-dot has joined #lisp
<Bike> i don't think you even have #\Return, standardly
<jmercouris> I have this for example: (setf (gethash "RETURN" *character-conversion-table*) (char-code #\Return))
<Bike> so, #\Escape works for me
<jmercouris> Escape works for you?
<jmercouris> interesting, it works for me too
<jmercouris> it wasn't coming up as a completion so I didn't try it
<Bike> also, are you aware of name-char
<jmercouris> I am not aware of name-char
<Bike> (name-char "Escape") => #\Esc
<jmercouris> aha, that is very useful
<Bike> (name-char "Return") => #\Return
<Bike> etc
<jmercouris> okay, so will name-char "Escape" return different values on different implementations?
<|3b|> probably not any you care about
<jmercouris> since you said that #\Return was not standard
<jmercouris> okay
<jmercouris> Good, I will just leave it at #\Esc then
<Bike> clhs 13.1.7
<Bike> is the standard names
* |3b| probably wouldn't use a non-unicode lisp without a good reason these days
<Bike> however, everyone uses ascii and most use unicode
<jmercouris> I see
<jmercouris> okay, thank you
<|3b|> and even less so if it also wasn't ascii (or some simple superset)
<jmercouris> as you can see in that clhs link, doesn't appear that escape is there
<|3b|> clhs 2.1.3
<jmercouris> so, will (char-code #\Return) return a different value in a unicode vs ascii based implementation?
<dlowe> the bottom values of unicode are ascii, so no
<|3b|> unicode and ascii overlap, so should be the same
__main__ has joined #lisp
<jmercouris> Ok, good
<jmercouris> so unicode is just an extension of ascii
<jmercouris> so as long as some value values within the ascii set, it willbe okay
<jmercouris> well, that's a simplification I am sure, but for my purposes it is enough
<dlowe> yeah, for all encodings I'm aware of
<jmercouris> thanks guys
<shrdlu68> On SBCL at least, other characters also have names, like #\Trade_Mark_Sign
<sjl> UTF-8, not "unicode", is an extension of ASCII
fikka has quit [Ping timeout: 264 seconds]
<sjl> e.g. UTF-32 a != ASCII a
<|3b|> unicode a = ascii a
<dlowe> sjl: being preceded by three zero bytes
* jasom uses UTF-24
<dlowe> so you know, basically the same number
<|3b|> most encodings of unicode a aren't (only) ascii a
<sjl> "unicode" isn't an encoding
<dlowe> neither is "ascii" necessarily.
<jasom> it started out as an encoding, but they abandoned that once it was clear that the 2**16 wasn't nearly enough
<Bike> is this important
<Bike> in this context
<dlowe> Bike: no, but I knew someone was going to bring it up
<|3b|> in the context of code-char, "encoding" doesn't matter :)
<Bike> because there was already a long argument about characters or something yesterday
quazimodo has quit [Ping timeout: 248 seconds]
<dlowe> Truth can only be reached by arguing over the same details over and over again.
<jasom> jmercouris: (char-code #\Return) can return any number whatsoever and still be conforming. In practice all modern implementations will return the unicode code-point
<jmercouris> jasom: Good enough for me :)
<jasom> and the first unicode code-points are identical to iso-8859-1 which is a superset of ascii
<jmercouris> when the day comes that a random implementation changes that I'll put a +sbcl :D
* |3b| wants a lisp with complex code-chars now
<jasom> s/first/first 256
* shrdlu68 just tried "man unicode"
<|3b|> (char-code is limited to positive integers < char-code-limit)
<jasom> |3b|: it must be a non-negative integer
<|3b|> yeah, non-negative
* |3b| is mostly just being amused by the implications of "any number" :)
orivej has joined #lisp
<jasom> also two different characters may have the same code in a conforming implementation
<_death> we need ebcdiclisp
kami has joined #lisp
Ellusionist has joined #lisp
<shrdlu68> Given all this, how would one collect a range of characters. For example if I wanted #\a to #\z, would
<shrdlu68> (loop with start = (char-code #\a)
<shrdlu68> for n from start to (+ start 25)
<shrdlu68> collecting (code-char n))
<shrdlu68> be a portable solution?
<jasom> shrdlu68: only if the characters have the same implementation-defined attributes
<jasom> shrdlu68: actually not; the spec only defines that #\z > #\a , not that there are exactly 26 characters in the range #\a - #\z
<|3b|> "it is permissible for uppercase and lowercase characters to be interleaved"
<jasom> and indeed in EBCDIC there are more than 26 codes between a and z
<shrdlu68> I see. So what would be a portable way to collect a range of characters?
<sjl> e.g. a Lisp made by an Icelandic person might have (= (char-code #\ð) (char-code #\d))
<_death> enumerate the characters you want
<Bike> (map 'list #'char-code "abcdefghijklmnopqrstuvwxyz")
<|3b|> assume ascii/unicode, and let whoever uses the odd lisp send you a patch? :)
<sjl> er
<sjl> (1+ (char-code #\d)) rather
<Bike> a lisp made by an icelandic person who hates their language and just collapses all the funny characters to english ones
<_death> you could also define the tables for the standards you care about or use a library
<sjl> Bike: yeah should have added the 1+ in there
<jmercouris> jasom: just curious, are you using next at all or no?
<Bike> i think old english used that character, so maybe it can be included anyway, tho
fikka has joined #lisp
<jasom> jmercouris: not currently
<jmercouris> jasom: Have you tried it since the release?
<jmercouris> what are the barriers for your full time adoption?
<tfb> sjl: well, they could differ on implementation-defined attributes.
<jasom> jmercouris: honestly, I'm happy with firefox
<jmercouris> I see, so you are just not the target audience
<jmercouris> ok, fair enough
jmercouris has quit [Ping timeout: 276 seconds]
Ellusionist has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 240 seconds]
kushal has quit [Ping timeout: 248 seconds]
random-nick has quit [Ping timeout: 268 seconds]
__main__ has quit [Remote host closed the connection]
smasta has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
hexfive has quit [Read error: Connection reset by peer]
shrdlu68 has joined #lisp
hexfive has joined #lisp
fikka has joined #lisp
__main__ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
hexfive has quit [Remote host closed the connection]
hexfive has joined #lisp
fikka has joined #lisp
pagnol has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
LocaMocha has quit [Ping timeout: 268 seconds]
bigos has joined #lisp
red-dot has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Achylles has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
ebzzry has quit [Ping timeout: 264 seconds]
random-nick has joined #lisp
nullman has joined #lisp
<AeroNotix> jasom: next is kind of like applying the emacs philosphy to your browser
<AeroNotix> I tried to do it with lispkit but life got in the way
<jasom> AeroNotix: right, and I use emacs soley as a platform for running slime
<jasom> so I'm not the target audience
<AeroNotix> yeah, that's cool
mishoo has quit [Ping timeout: 248 seconds]
<AeroNotix> I personally am not happy with how browsers currently work and lispki/next scratch that itch
fikka has joined #lisp
smasta has quit [Read error: Connection reset by peer]
knicklux has quit [Quit: Leaving]
smasta has joined #lisp
alexmlw has joined #lisp
borei has quit [Remote host closed the connection]
alexmlw has quit [Client Quit]
skali has joined #lisp
skali has quit [Client Quit]
smasta has quit [Ping timeout: 268 seconds]
damke has joined #lisp
mishoo has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
damke__ has quit [Ping timeout: 263 seconds]
ckonstanski has joined #lisp
shrdlu68 has quit [Ping timeout: 260 seconds]
_main_ has joined #lisp
_main_ has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 260 seconds]
__main__ has quit [Ping timeout: 268 seconds]
asarch has joined #lisp
cgay has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
foom has quit [Ping timeout: 276 seconds]
__main__ has joined #lisp
foom has joined #lisp
zacts has quit [Quit: WeeChat 1.9.1]
__main__ has quit [Read error: Connection reset by peer]
vap1 has joined #lisp
eudoxia has quit [Remote host closed the connection]
vaporatorius has joined #lisp
fikka has joined #lisp
zacts has joined #lisp
smasta has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
__main__ has joined #lisp
froggey has quit [Remote host closed the connection]
__main__ has quit [Read error: Connection reset by peer]
razzy` has joined #lisp
froggey has joined #lisp
__main__ has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
python476 has quit [Read error: Connection reset by peer]
jmercouris has joined #lisp
__main__ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
scymtym_ has quit [Ping timeout: 265 seconds]
smurfrobot has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rixard has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
Devon has quit [Ping timeout: 265 seconds]
ericmathison has quit [Remote host closed the connection]
ryanbw has quit [Ping timeout: 248 seconds]
__main__ has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
ericmathison has joined #lisp
rixard has quit [Client Quit]
__main__ has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
eschatologist has quit [Read error: Connection reset by peer]
hexfive has quit [Read error: Connection reset by peer]
heurist`_` has quit [Ping timeout: 265 seconds]
hexfive has joined #lisp
eschatologist has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
cyberlard has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
smurfrobot has quit [Remote host closed the connection]
mitc0185_ has quit [Remote host closed the connection]
smurfrobot has joined #lisp
mitc0185 has joined #lisp
__main__ has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 248 seconds]
__main__ has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
emaczen has joined #lisp
<emaczen> How much of a speedup can I expect with SBCL if I declaim and declare my functions/methods
<emaczen> Most of this code uses CLOS
__main__ has quit [Read error: Connection reset by peer]
<jasom> emaczen: generic function calls are not significantly affected by declarations in sbcl, since you are free to add methods at any time
__main__ has joined #lisp
rumbler3_ has joined #lisp
fdund has joined #lisp
<emaczen> I understand that, but I'm pretty content with the relationships amongst my classes -- I would have to rewrite it all without CLOS to get it to be fast??
<Bike> there's more than one way to make it fast
<emaczen> Bike: suggestions?
__main__ has quit [Read error: Connection reset by peer]
<emaczen> Bike: generically though?
<emaczen> I've already swapped out some data structures etc...
<Bike> you want general advice for optimizing unknown programs? profile and see if you can think of a smarter algorithm for the slow parts
<jasom> a non-generic inlined function with an etypecase that calls the actual implementations is *significantly* faster on sbcl than GF dispatch, so if you have small functions, you will be held back by GF dispatch (but as Bike says, profile first, then optimize)
warweasle has quit [Quit: later]
rumbler3_ has quit [Ping timeout: 268 seconds]
vlatkoB_ has quit [Remote host closed the connection]
__main__ has joined #lisp
<emaczen> do you recommend slime-sprof?
<jasom> yes
<jasom> er I use sb-sprof, not sure what slime-sprof is
fikka has joined #lisp
<jasom> (I assume it's a slime frontend for it)
__main__ has quit [Read error: Connection reset by peer]
heurist`_` has joined #lisp
quazimodo has joined #lisp
shka has quit [Ping timeout: 240 seconds]
asarch has quit [Remote host closed the connection]
<Shinmera> It is
smasta has quit [Ping timeout: 268 seconds]
<Shinmera> it makes the output actually readable
<Shinmera> Quit nice, in fact
__main__ has joined #lisp
<emaczen> Shinmera: I'm lookinat at slime-sprof-report
<pjb> Convert your classes to fixnum, work only with fixnums.
<emaczen> What do self% cumul% and total% mean exactly?
<emaczen> Is the ranking reliable?
<emaczen> pjb: are you serious?
<jasom> self% what fraction of samples were in this one; cumul% what fraction of samples were in this one, or ones above it; total% what fraction of samples were either in this one, or this one was on the call-stack
smurfrobot has joined #lisp
heurist`_` has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
<pjb> emaczen: It's just to show you how silly the quest for speed is.
<pjb> You can do it faster, do it in assembly (fixnums).
<pjb> Then what?
<pjb> full of bugs, unmaintainable,
<pjb> not better than C.
smurfrobot has quit [Ping timeout: 248 seconds]
rjmacready has joined #lisp
<emaczen> Is there an easy replace of remove-if-not? it is highly ranked
heurist`_` has joined #lisp
<Bike> remove-if-not is kind of inherently expensive.
<Bike> this is why i said, find better algorithms, rather than doing stuff like declaring types
<pjb> Sure: (remove-if (complement f) …) = (remove-if-not f …)
natsu has joined #lisp
Tobbi has joined #lisp
<pjb> Fastest way to remove elements from a list, is not to add them there in the first place.
<Bike> pjb, could you please just say what you mean outright rather than waiting for a confused "are you serious" so you can pontificate
``Erik has joined #lisp
flip214_ has quit [Quit: leaving]
<pjb> Use cache.
knobo1 has joined #lisp
flip214 has joined #lisp
flip214 has joined #lisp
flip214 has quit [Changing host]
vap1 has quit [Quit: Leaving]
wigust has quit [Ping timeout: 240 seconds]
heurist`_` has quit [Ping timeout: 248 seconds]
varjag has quit [Ping timeout: 248 seconds]
<pjb> Don't you know that you can trade space for time and vice versa?
<flip214> I'd like to trade a few m³ of empty air against 3 years, please.
<rjmacready> :D
omilu has quit [Ping timeout: 265 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<emaczen> pjb: I've already done some preliminary hashing
scymtym has joined #lisp
<aeth> emaczen: At least ime, it's rarely worth doing type declarations if it's not a sequence or a number.
<aeth> Sequences can make a huge difference, especially if the type information you give is a known length rather than * length
<pjb> flip214: I'm afraid that given light speed is so high, you will need much more space.
hexfive has quit [Remote host closed the connection]
<aeth> And numbers remove the generic arithmetic if you define the right number subtypes
rumbler31 has quit [Ping timeout: 248 seconds]
<aeth> (This is SBCL, other implementations might be further behind, but they'll probably catch up eventually.)
hexfive has joined #lisp
<aeth> But that's because sequences and arithmetic functions are a special kind of non-CLOS generic function, where type information is very useful.
<pjb> flip214: basically, you would have to duplicate the solar system, move the duplicate 3 years behind (about 25,000 light years behind). Then when you want to go back in time, you would have to travel those 25,000 light years very fast…
<flip214> pjb: as light has nearly no width, I can fold it up into a hilbert-curve, so I can easily store 3 light years in a container of, say, 2x2x2 m³.
<jasom> light has significant width
<pjb> Sorry, I meant 75,000 light years above. It's incredible, but we're travelling at a speed of 24,194.16 light years each year!
random-nick has quit [Remote host closed the connection]
<flip214> jasom: http://www.wolframalpha.com/input/?i=width+of+light says 17.51 pico meters
<flip214> pjb: we are?
<flip214> in which direction?
<pjb> Coarsely, toward north.
<jasom> diffraction effects happen at multiples of the wavelength, and the wavelength of even visible light is on the order of a micron
<pjb> Now, it's possible that the orbit of the planets doesn't change plane when we circle around the galaxy center, so the direction depends on the time of the galactic year. I would assume.
<jasom> flip214: did you read what that calculation does? It calculates the width of a fluid flowing at a hight of 1 inch, a flow-rate of 8L/min and linear velocity of c
<pjb> It's about 1/1300 c.
<flip214> jasom: yes, I did. but with all the details it's not that much fun any more.
<jasom> change it to 8e100 L/min and you get a width of 1.751e86 km
<jasom> so your light can't even fit in a 2x2x2 meter box
kami has quit [Ping timeout: 265 seconds]
<flip214> pjb: 1/1300 c I can believe, but what about your 24e3 c above?
<pjb> but light can be superposed.
<aeth> emaczen: I think the main thing you get from type declarations for most types is type checking at the beginning of the function (in SBCL, actually before the beginning), instead of when you call a function that expects a different type at some point in the middle of the function, e.g. this will prevent "Hello, world!" from showing up: (defun foobar (x) (declare (list x)) (format t "Hello, world!~%") (car x)) (foobar 1)
<pjb> flip214: light.year is not a speed, it's a distance!
<pjb> light.year/year is a speed. It's 230e3 m/s
<flip214> pjb: I know that. but you wrote "per year", so that's a velocity again.
quazimodo has quit [Ping timeout: 248 seconds]
<aeth> (In SBCL the difference with a check-type at the top of a function is that check-type is slightly less efficient, but lets you recover by providing a valid value at runtime)
<flip214> c * 1y / 1y = c, in my book.
<pjb> yes, and c = 299792458 m/s
<flip214> and _my_ c is 299792458 m/s, not your lousy 230e3
dyelar has quit [Quit: Leaving.]
<pjb> 24,194.16 light.year/year = 230e3 m/s
<flip214> pjb: http://www.wolframalpha.com/input/?i=light+*+year+%2F+year
<flip214> 2.998×10^8 m/s (meters per second)
<flip214> not sure how you get to 230e3 m/s
fikka has quit [Ping timeout: 268 seconds]
<jasom> pjb: TIL we are all tachyons
<flip214> is that in a neutronium star or something?
<pjb> 230e3 m/s is the speed of the Sun around the galaxy. Don't you know where you live?
<flip214> but what's that got to do with "light"?
<aeth> emaczen: If you inline things all of the way, with an eventual etypecase or typecase, you will probably see SBCL remove the branches that won't happen (i.e. the other types) automatically. An alternative would be https://github.com/markcox80/specialization-store/ for inline type-based dispatch or https://github.com/guicho271828/inlined-generic-function/ for inline CLOS dispatch
pilfink has joined #lisp
<pjb> flip214: there's no sense in giving astronomical distances in other units than light.year. Expressing speeds in light.year/s is also way more meaningful than keeping m/s.
<pjb> Actually, even short distances are better expressed relative to light. Eg. your leg is about 3 ns.light long. Way more informative than saying that it's about one yard long.
<flip214> pjb: but using the galaxy as zero point is very galacti-centric again. same mistake as, eg., Kopernikus.
<pjb> 6 ns.light from your feet to your brains means that you cannot feel anything fromr your feet but 6 ns too late.
<pjb> flip214: as long as we don't have the mean to travel faster, it'll do.
<flip214> pjb: well, within the solar system AE is a nice measure, too. in my youth the parsec was en vogue, but that's changed to light years, yeah.
<pjb> Nope. AE is nice when you can't move. light.year is what you need when you travel.
<flip214> pjb: don't believe in precognition, or tachyons, or hyperspace?
<pjb> And we do, eg. Voyager.
<flip214> V'ger
natsu has quit [Quit: ZNC 1.6.5 - http://znc.in]
wigust has joined #lisp
smasta has joined #lisp
<flip214> pjb: well, you keep your initial system, and I'll use mine. currently I'm at rest, it's nearly 11pm ;)
<flip214> *inertial
<pjb> Notice also that when parsecs are used, they mostly don't know the radial distances and speed in general. It's a nice unit, but so limited…
<pjb> If you want to take it into account, the speed of the Milky Way relative to the Local Group is about 600 km/s.
<flip214> what? 1 parsec is defined via the AE, no need for other radial distances or speeds. 1 parsec = 3.262 ly
<pjb> about 63,000 light.year/year
<Shinmera> >>#physics or #lispcafe, thanks
<flip214> Shinmera: sorry.
<flip214> good night, everyone!
<pjb> flip214: the parsec comes from the visual angle!
fikka has joined #lisp
* jasom just realized this is #lisp and not #lispcafe
<flip214> pjb: yeah, exactly. but the triangle is defined via the angle 1" and the opposite length of 1 AE.
<flip214> no speeds involved.
<aeth> hopefully emaczen's client has name highlighting
<flip214> well, I'll stop now anyway.
<flip214> but I'll read the scrollback, perhaps there's more to read....
<pjb> Anyways, you can use space to store cached values.
<pjb> For example, sending a modulated laser beam thru space to a reflector. So when you need an old value, you can read it back frmo the beam.
smasta has quit [Ping timeout: 265 seconds]
<pjb> Or if you have RAM, use RAM.
hexfive has quit [Read error: Connection reset by peer]
<pjb> Basic optimization techniques…
<aeth> The #1 performance improvement I can normally get is by preallocating before loops rather than heavily consing during the loops.
<rjmacready> is there any common lisp implemented in a common lisp based on the special forms alone? http://www.lispworks.com/documentation/HyperSpec/Body/03_ababa.htm
<aeth> e.g. allocating 4 vectors that are constantly overwritten each iteration rather than allocating 4 new vectors each iteration
<jasom> rjmacready: that's not possible; how do you implement "print" only in terms of special forms?
<pjb> rjmacready: not really. First special operators are not all the primitives of a CL system. Some functions are primitive too!
<jasom> rjmacready: or "open" for that matter
hexfive has joined #lisp
<pjb> rjmacready: sicl uses the whole CL to implement CL.
<jasom> sbcl implements everything but the runtime in CL
Achylles has quit [Ping timeout: 248 seconds]
<pjb> rjmacready: otherwise you may have a look at cl-stepper, which redefines special operators as macros to implement a stepper.
<rjmacready> ah i see, fair enough :)
<rjmacready> thanks for the answers
<jasom> "Sanely-Bootstrappable Common Lisp"
<pjb> Sanely Initialized Common Lisp = SICL ;-)
<pjb> or Sanely Implemented Common Lisp = SICL.
heurist`_` has joined #lisp
<rjmacready> jasom: yeah i was looking at that and wondered there was some special form only based implementation
hexfive has quit [Remote host closed the connection]
<rjmacready> SICL = SICL isnt common lisp :v (sorry)
<pjb> not yet.
<rjmacready> SICLY then? :v
<aeth> rjmacready: You can probably implement CL without CLOS and without most of loop. Some of loop really is just too convenient for macros, especially collect but sometimes also append. (Most of loop has alternatives, those don't really.)
<aeth> But if you avoid CLOS, you'll find a lot of things pretty hard to do, too.
<aeth> Structs don't get you all of the way there.
hexfive has joined #lisp
<jasom> implementing collect and append is fairly easy, you just need to keep track of your tail pointer
<aeth> So I just picked two of the easiest complicated parts of the language to remove, and then said you can't remove them. :-p
<rjmacready> i see
<jasom> Real Programmers(tm) use tagbody
<rjmacready> :)
<emaczen> I just shaved 10 seconds by replacing remove-if-not with a loop...
<aeth> jasom: I guess my point is that most of the common useful parts of loop have direct equivalents in dofoo or higher order functions, but not collect and append, you'd essentially have to write something lower-level in do
<rjmacready> had this silly idea of plugging an empty executable as inferior lisp to slime and checking what would arrive there
<emaczen> I really do need to go back and look through my code, usually I am not too concerned about speed
<pjb> Also, the usefulness of most of special operators to implement a language is rather dubious. eg. THE is useless.
<aeth> the is the most useful!
heurist`_` has quit [Ping timeout: 240 seconds]
<Bike> there's also a question of how you're like, implementing this. sbcl and sicl and stuff work on a principle of having an existing lisp just dump compiled files, so it's not like you're bootstrapping up from some limited set of operators
<Bike> the runtime just needs some stuff like being able to call compiled functions
nullman has quit [Ping timeout: 240 seconds]
<pjb> It can be implemented conformingly as (defmacro the (type expression) (declare (ignore type)) expression)
<aeth> pjb: Determine the return type of a function in a compilation unit, and be as specific as possible. Wrap calls to it within that compilation unit with a the (assuming sbcl semantics, which type-checks and uses truly-the for real assumptions)
<aeth> Very useful in compilation
<aeth> I'm not sure if SBCL does this or does something that's logically equivalent to this
heurist`_` has joined #lisp
nullman has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
hexfive has quit [Read error: Connection reset by peer]
<aeth> (I actually suspect SBCL binaries could be made much more efficient if everything's moved into one compilation unit as the final compilation process, to keep literally all of the program's type information and really put all that inference to work)
<aeth> (You'd probably be able to remove most manual type declarations, too.)
hexfive has joined #lisp
<aeth> (I mean, Lisp app binaries using SBCL, not binaries of SBCL)
knobo2 has joined #lisp
heurist`_` has quit [Ping timeout: 268 seconds]
<aeth> Bike: I suspect the main use for a very restricted Lisp to implement Lisp would be to build something that's useful for building a richer, probably better written Lisp.
knobo1 has quit [Ping timeout: 240 seconds]
<Bike> but that's a weird way to write things
<Bike> you can have your better lisp, and use it to write a lisp, and then bam
<aeth> Can you use SBCL to cross-compile SBCL to other architectures? e.g. new architectures?
<Bike> pretty sure, yeah
<Bike> the runtime you might have to translate
<aeth> If that's the case, then there's not much of a point to think about bootstrapping.
<pjb> The only usefulness in a restricted lisp, would be either you time travel to 1958, or you get lost light years from Earth without a CL implementation.
<aeth> I *guess* a restricted Lisp might be more secure, but then you'd probably just want to write a VM and use bytecode, not a subset of Lisp.
<pjb> In all other cases, you can get access to a CL implementation faster, and use it to implement faster and easier your new CL.
<pjb> This is what beach does with SICL.
<pjb> Be smart, don't write programs with your hands tied in the back.
damke_ has joined #lisp
mishoo has quit [Ping timeout: 256 seconds]
pierpa has joined #lisp
damke__ has joined #lisp
heurist`_` has joined #lisp
damke has quit [Ping timeout: 263 seconds]
<aeth> Was CL ever implemented from scratch or were the early CLs built from pre-CL Lisps?
<aeth> I've skimmed through the Lisp Machine Manuals and they're very similar to the HyperSpec
damke_ has quit [Ping timeout: 264 seconds]
<Shinmera> I think ECL's history (stemming from KCL) started from scratch.
<aeth> Here are the manuals, btw: http://bitsavers.trailing-edge.com/pdf/mit/cadr/
fikka has quit [Ping timeout: 240 seconds]
<Bike> cmucl was built from, what, spice? which was either pre-CL or derived from a pre-CL
<Shinmera> https://en.wikipedia.org/wiki/Kyoto_Common_Lisp "KCL is notable in that it was implemented from scratch, outside of the standard committee, solely on the basis of the specification. It was one of the first Common Lisp implementations ever, and exposed a number of holes and mistakes in the specification that had gone unnoticed."
<Bike> clisp might have been from scratch
<aeth> Two things I wouldn't want to implement from scratch are loop and CLOS.
hexfive has quit [Read error: Connection reset by peer]
<Bike> clos isn't honestly that bad
<aeth> The performance is what I'd worry about.
<Bike> oh, you want it to be _fast_? now that's just picky
hexfive has joined #lisp
fikka has joined #lisp
<Shinmera> I wouldn't want to implement anything to be truly fast :^)
<Bike> well, beach's method has proven to be pretty performant and is conceptually pretty simple, so you could do that.
<Bike> i've looked at PCL a lot and still have no idea what's going on there, though
<aeth> Bike: Can beach's method be ported to other implementations, e.g. SBCL?
<aeth> PCL is apparently garbage
<Shinmera> aeth: scymtym already did some work to do that
<Bike> PCL is what SBCL has, i don't think it's garbage
<aeth> Well, in performance.
<Bike> i don't think it's garbage in performance, sbcl does dispatch pretty quick
hexfive has quit [Remote host closed the connection]
<aeth> SBCL's CLOS is apparently slower than other CLOSes, though
<aeth> I haven't personally benchmarked it, though
<Bike> is it?
<White_Flame> the entire "CLOS" or just multimethod dispatch in particular?
<aeth> Also, SBCL's CLOS is missing some useful features
hexfive has joined #lisp
<aeth> CCL's CLOS handles :type
<Bike> generic function dispatch is what we mean, yes
Xal has quit [Ping timeout: 240 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
varjag has joined #lisp
heurist`_` has quit [Ping timeout: 248 seconds]
<aeth> White_Flame: I'd assume that the main thing that would matter for the runtime performance of CLOS is dispatch
hexfive has quit [Read error: Connection reset by peer]
red-dot has joined #lisp
<Bike> the rest of clos is basically just data structures, and some functions you ahve to call sometimes
EvW has quit [Ping timeout: 265 seconds]
hexfive has joined #lisp
<White_Flame> well, there's also instantiation & registration, updating classes, etc, that can have their own performance impact
<aeth> If CLOS generics were as performant when the class is known as the generic functions for arithmetics and sequences are when the types are known, that would completely change how people write fast CL. Although type-dispatch would still be necessary for numbers and sequences a lot of the time.
<aeth> I'm not sure if that's possible, though.
Xal has joined #lisp
<White_Flame> the real big beneficial change would be true JIT
<White_Flame> fast pathing the common outcomes
<aeth> Would it be possible to just JIT the dispatch in an otherwise AOT implementation? JIT has big drawbacks, too.
<White_Flame> that's what some implementations do, but not inline
sjl has quit [Quit: WeeChat 1.9]
<White_Flame> they call a dispatch function, but the dispatch function can be re-compiled
<White_Flame> using normal means
heurist`_` has joined #lisp
<White_Flame> and so because it's a single centralized dispatch function, it can't take advantage of call-site knowledge
sjl has joined #lisp
<aeth> I wonder how hard it would be to unify type dispatch (e.g. specialization-store) and class dispatch. If that's even possible.
<aeth> What I like about what specialization-store does with types is... it produces the exact same thing that I'd produce by hand. Except automatically.
<Bike> they're the same concept, it's just that clos allows things to be redefined, inhibiting static analysis
LiamH has quit [Quit: Leaving.]
<aeth> The best high-performance abstractions produce the same things you'd do manually.
<White_Flame> yeah, it'd be nice if you could say "bake these things in" at some point, and "unbake back to dynamic, I want to change things"
<Shinmera> Even just being able to bake irreversibly would be a win for deployments
<Bike> it would, but unbaking would require recompiling all call sites in general, which is kind of annoying
<White_Flame> Shinmera: yep
<Bike> baking itself shouldn't be that hard
<aeth> White_Flame: There are, I think, essentially three levels of control. Inline, inline function call (remove the generic dispatch, keep the function), and runtime dispatch. Specialization-store handles all three of these for type-based dispatch.
<Bike> i should probably do that, actually, i k now all the bullshit in clos well enough by now
<Shinmera> Bike: I smell another paper :)
<aeth> Although I'm not sure if specialization-store keeps the return type information when there's an inline function call, which would be useful. That information is lost in SBCL if it's outside of the compilation unit (normally the file)
<Bike> there might be combinatorial problems, hm
hexfive has quit [Remote host closed the connection]
<Bike> i will consider this later, i think
hexfive has joined #lisp
smasta has joined #lisp
<aeth> It looks like speicalization-store does keep the return type information when doing a named specialization. (defspecialization (foo :name %foo/single-float) ((x single-float) (y single-float)) single-float (+ x y)) (defun foobar () (+ 1f0 (foo 2f0 3f0))) ; does not have a generic + in SBCL
<aeth> *specialization-store
<aeth> pillton really thought of everything.
<aeth> I'd love to see something just as mature for optimizing CLOS, especially if it was compatible.
smasta has quit [Ping timeout: 256 seconds]
<aeth> One thing that I'm considering doing soon is using structs and CLOS to define custom data structures. In particular, I think typed lists expressed as structs would be very useful, especially for what I'm doing. At the moment, if something's best expressed as a linked list, I have to type check multiple times where a typed data structure would just type check the elements once, when making the list, and then I'd just type check the list itse
<aeth> the list itself and assume the types of the elements.
<aeth> So what I'm considering writing is: a cons cell represented as a struct with a car and a cdr, where the car is some type and the cdr is either null or another of the new type of cons cell
<aeth> This is not entirely portable, but where it isn't portable I can add manual type-checking with #+foo for the implementations that don't check on e.g. creation or access
Bike has quit [Ping timeout: 260 seconds]
damke has joined #lisp
damke__ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<scymtym> pkhuong made (in 2007 no less) a prototype for "sealed" generic functions which would inline dispatch and/or methods and derive call site-specific return types depending on availability of argument type information and declarations
rumbler31 has joined #lisp
<aeth> 2007? nice
damke_ has joined #lisp
<aeth> I'm only aware of https://github.com/markcox80/specialization-store/ for writing +-style and map-style type-generic functions and https://github.com/guicho271828/inlined-generic-function/ for inlining CLOS dispatch, although I haven't tried the latter, and wouldn't be able to use it in my MIT-licensed projects because it's LLGPL, which would complicate using my projects.
<aeth> I'm sure there are other projects, but they never get mentioned here.
heurist`_` has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Ping timeout: 264 seconds]
damke has quit [Ping timeout: 264 seconds]
knobo2 has quit [Ping timeout: 256 seconds]
hexfive has quit [Read error: Connection reset by peer]
<jasom> hmm, mop should give me enough information to automate what I currently do when GF is too high
hexfive has joined #lisp
<jasom> (just make a non-GF that is an etypecase)
bigos has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
<aeth> Hmm... How does CLOS handle a generic with two methods: parent-class child-class and child-class parent-class when called with child-class child-class?
smurfrobot has quit [Ping timeout: 248 seconds]
<aeth> Looks like it calls the child parent one, which makes sense. The most specific for the first argument.
heurist`_` has joined #lisp
<jasom> yup
<jasom> clhs 7.6.6.2
hexfive has quit [Remote host closed the connection]
<aeth> Where do people tend to use methods in their code? I generally only use them when using someone's CLOS-based API that expects inheritance and methods. For my own code, things are usually very specific and functions make the most sense.
<_death> you can also specify a different argument-precedence-order
Bike has joined #lisp
hexfive has joined #lisp
<jasom> aeth: they are often used any time dispatching based on classes or symbols is wanted; also :around can be useful in some cases even when there is only a single class involved.
heurist`_` has quit [Ping timeout: 260 seconds]
<jasom> aeth: consider if you wanted something similar to print-object; generic functions are the most obvious solution
<aeth> I normally use objects (CLOS and struct objects) just to store data to prevent things like e.g. a function call with 14 arguments (this has happened to me before)
<jasom> LIL is an experiment in making containers where eql specializers are very important
<aeth> I normally decide between CLOS and structs by using structs (or arrays!) for things that are simple, efficient, and typed and CLOS for the rest.
<Bike> to "bake" a gf you might have to account for the possibility of new classes that inherit from multiple specializers. kind of a combinatorial explosion. however, the set of possible effective methods is probably quite limited in most cases
<jasom> aeth: 1 is an object of class number...
<jasom> "foo" is an object of class string
<aeth> jasom: I mean, custom objects
heurist`_` has joined #lisp
<aeth> as in defclass or defstruct or some wrapper over make-array
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Bike> the call history suddenly seems like the most genius part of fastgf
<jasom> I use CLOS and structs all the time; I often don't want the fancy stuff that objects give me, and I can still specialize on the class of the struct
red-dot has joined #lisp
<jasom> should have read "CLOS and structs *together*"
<aeth> yeah
<aeth> A struct is great for something like a queue (which in turn is just a specialized array with a handful of extra things, thrown in a struct).
<aeth> A CLOS object is great for something more complicated that holds that queue
EvW has joined #lisp
<Bike> you could say: "a standard-class"
<jasom> a queue is a specilized list with a handful of extra things :P
<aeth> Bike: yeah, that's the correct term, I'm just not sure if it would confuse people or not
<jasom> non-system-class?
<aeth> jasom: Well, you can implement a queue as a list or an array. Arrays seem to win for what I tend to do.
<aeth> Since CL doesn't have typed lists built in, arrays often win for things where lists *should* win inutitively!
<Bike> multiple inheritance, redefinition semantics, and slot-value/boundp/etc are the only differences between standard-class and structure-class, i think
<jasom> Bike: also CLOS defines less, so if you didn't want some accessors predefined...
<aeth> Bike: One thing I'd love to see is structures without any inheritance at all. I'm not sure if this can be added as an extension to the language. This would, afaik, be all that's necessary to support arrays-of-structs.
<Bike> eh, that's nearly syntax
<Bike> that is not all that would be necessary lol
<aeth> What else is needed?
smasta has joined #lisp
<jasom> does :include enforce that the newly created class is a subtype of the included class?
<Bike> a change to equality semantics and a lot of implementation upgrades
<Bike> jasom: pretty sure
krasnal has quit [Ping timeout: 265 seconds]
<Bike> additionally, inheritance doesn't really kill arrays of structs, exactly
<aeth> Bike: one thing I've found out about the Internet is that the best way to get the correct answer is to state the wrong answer and be corrected. :-p
<Bike> in the same way ub8 is a subtype of ub16, but they can have distinct upgraded array types
<jasom> "it becomes a subtype of the included structure." <-- good to know; the spec doesn't always do what I want, but does here.
<aeth> Bike: what's wrong with the equality semantics?
<jasom> so structs do have full-featured single inheritance
fdund has quit [Ping timeout: 260 seconds]
<jasom> equalp descends into structures but not classes
wxie has joined #lisp
<Bike> not that
<Bike> aeth: you expect (progn (setf (aref array ...) x) (eq (aref array ...) x)) to be T
<_death> equalp is just arbitrary and shouldn't affect decisions ;)
<Bike> if you want to actually pack the structure into the array, you lose that
smasta has quit [Ping timeout: 260 seconds]
<jasom> An actually useful equal would be like equalp, but one uses eql to compare characters. Perhaps uses a GF for comparing other objects as well.
<aeth> And now Lisp will get its === that so many languages wind up having :-p
fdund has joined #lisp
<aeth> bonus points if the improved equalp is called equal?
manualcrank has joined #lisp
<jasom> we can call it == it's not taken yet :)
<_death> you can steal Baker's name and call it "egal"
openthesky has joined #lisp
<jasom> simila?
<aeth> Someone should make a list of all of the extensions (current and not yet implemented) that modern CL needs to be maximally efficient. It would probably be most useful if they're listed as the portability libraries, like https://github.com/Bike/introspect-environment
<aeth> just a simple table "portability library over extension" and "implementation" with "Yes"/"No"/"Partial"/"Unknown" as values in the cells
<aeth> The #1 library on the list would probably be bordeaux-threads, actually
<Bike> billing threads as an efficiency thing seems a little, inspired
<aeth> well, it makes certain algorithms more efficient
<Bike> introspect environment isn't either, it's just a bit helpful for some efficiency things
<aeth> Bike: introspect-environment is the thing needed by some libraries that make things efficient, so it would go on the list rather than (or in addition to?) those libraries
<Bike> i'm just saying i've seen more coherent theming at proms is all
<aeth> (I suppose those libraries could go on the list too, with "Partial" if they have to work around the lack of introspect-environment)
nullniverse has joined #lisp
<aeth> Bike: well, it could just be language extensions in general
<aeth> although thanks to macros and turing completeness, just about anything can be implemented in just about any CL, just not necessarily efficiently, afaik.
<Bike> that's what CDRs are, it's just that nobody cares
<aeth> Bike: I think listing portability libraries over language extensions that are actually in use is considerably more useful than proposing language extensions to implementations.