<Guest74>
anddam: I would think any tk tutorial would suit for the interactive part. ltk stuff to see how it's done in lisp.
<Guest74>
s/tk/tcl/tk/
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
asarch has joined #commonlisp
varjag has quit [Ping timeout: 256 seconds]
varjag has joined #commonlisp
tyson2 has joined #commonlisp
varjag has quit [Ping timeout: 264 seconds]
s-liao has joined #commonlisp
<Guest74>
actually the ltk documentation linked to in the above link seems better than most documentation. I wonder why more people don't use ltk?
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
taiju has quit [Ping timeout: 264 seconds]
gaqwas has quit [Ping timeout: 260 seconds]
notaprime has joined #commonlisp
<notaprime>
am I correct in my interpretation that #'COMMON-LISP:ED is permitted to exec() the editor?
<notaprime>
specifically, I got this impression from the fact that the return value is undefined, and that the implementation is allowed to reuse an existing session when such exists.
<hayley>
I'm not sure if it's allowed to diverge, but not having an editor is already UB.
<notaprime>
well, for example, SBCL's default was [and might still be] to run through SB-EXT:*ED-FUNCTIONS*, and I can see a sane swank backend simply putting some hook there for opening the desired file in a separate buffer
<notaprime>
my overarching concern in this little digression is to prevent excessive stack blowups
notaprime has quit [Remote host closed the connection]
CrashTestDummy2 has joined #commonlisp
paul0 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 268 seconds]
gruffcomposite has joined #commonlisp
<gruffcomposite>
Is tymoon.eu the only logbot that migrated? [I can't find the IRC log link in Clozure's sitemap.xml ...]
<johnjay>
if i want to load into quicklisp manually
<johnjay>
do I put the folder in quicklisp/local-projects?
<notaprime>
johnjay, correct; e.g. /home/johnjay/quicklisp/local-projects/your-local-fork
<johnjay>
ok
<johnjay>
the world of cl packaging is still quite mysterious to me
<notaprime>
this would be a reasonable location if #p"/home/johnjay/quicklisp/" is your installation root, and then the ASDF file would be at #p"/home/johnjay/quicklisp/local-projects/your-local-fork/your-local-fork.asd"
<notaprime>
well, keep asking questions, and read documentation; not necessarily in that order.
<johnjay>
right
<notaprime>
I used to recommend reading the fine sources, although not everyone thinks that life is short enough to become proficient at Common Lisp.
<johnjay>
i heard from a haskeller recently it helps to have a goal state to work toward
<johnjay>
so maybe i should always just have a certain project in mind. that i'm working to understand.
<johnjay>
so i download cl-tetris3d
<johnjay>
since it is pretty
<notaprime>
pause one moment
<notaprime>
if you are using quicklisp to download projects, then it's entirely possible to just edit the downloaded source code directly
<notaprime>
using the local-projects directory is a better idea when you have multiple versions of a project, or if you want to use version control and send patches to the upstream project
taiju has joined #commonlisp
<notaprime>
if you are simply downloading a snapshot using QL:QUICKLOAD, and then making a few throwaway edits to experiment, then you don't need to have a duplicate directory
<johnjay>
well wait a second. so quicklisp isn't download binaries, but the actual code itself, then compiling it
<notaprime>
correct
<johnjay>
ok
<johnjay>
i'm using local-projects to install something not in quicklisp
<notaprime>
the only situation where quicklisp would download binaries is if one of the projects included them as static objects in their ASDF system, and this is not the typical situation.
<notaprime>
that is also a valid usecase for that directory
<johnjay>
what's the diff between asd and quicklisp?
<johnjay>
er asdf, uiop, and quicklisp
<notaprime>
quicklisp mainly handles obtaining code from other locations, and organizing where to place it within your local filesystem; ASDF and its components handle the compilation process for projects that contain multiple files
<notaprime>
theoretically you don't need to use ASDF if your entire project fits within one file, although such a statement is similar to ... "theoretically, you don't need multiprocessing if only one person uses your computer"
<johnjay>
right so quicklisp = apt and asdf = make or maybe autotools
<notaprime>
sure, that's a reasonable comparison.
<johnjay>
i find people in computing aren't very good at explaining things. or making reasonable comparisons
<johnjay>
so thanks
<notaprime>
they are too busy reimplementing word2vec instead of running idea2vec
<johnjay>
speaking of multiprocessing, installing this quicklisp package is only using 1 core. so that's unfortunate
<johnjay>
heh
<johnjay>
i have four whole cores on this device!
<notaprime>
much of common lisp is single-threaded, although various efforts have been made to parallelize things.
<johnjay>
ah.
<johnjay>
yeah multi-threading is kind of a thing. bordeaux-threads i think is the main one on cl?
<johnjay>
it seems to be fine on this arm device
asarch has quit [Quit: Leaving]
<notaprime>
there is no "global interpreter lock", similar to what Python has [or at least, used to, a few years ago]; however, specific implementations, and many libraries, have large parts of their interfaces effectively single-threaded.
<hayley>
Handling multiple threads is slower if you only find yourself using one thread.
<notaprime>
consider that loading a system via quicklisp will almost always cause [re]definitions of object and method hierarchies, and these could have effects on the compilation of other systems.
<johnjay>
> Unfortunately, since the GIL exists, other features have grown to depend on the guarantees that it enforces. This makes it hard to remove the GIL without breaking many official and unofficial Python packages and modules.
<hayley>
Though, given that most improvements in CPU speed are either from 1. moar cache, 2. moar cores or 3. larger vector units (though only useful for numerics, or unless you're really clever about it), running just one thread looks slower over time.
<notaprime>
thus, the sane thing to do in the absence of explicit information about interdependencies, is to impose some sequence to the compilation.
s-liao has joined #commonlisp
<notaprime>
if you optimistically assume that the absence of information is information of independence, then you can get lots of nondeterministic bugs, instead of deterministic ones. dunno what kind of hell you prefer, but one kind is more exciting, and that is not always a good thing.
<johnjay>
well that sdl game was pretty slow. i thought i had opengl on this thing....
<johnjay>
notaprime: in the context of quicklisp compilation?
<johnjay>
actually i think any x11 thing i run in sbcl on this arm sys is slow
<johnjay>
idk if that's due to ssh x11 forwarding or a lack of 3d drivers or what
<notaprime>
if you want to design algorithms with parallelism in mind, you are probably better off using one of the higher-level abstractions, which will either have separate interfaces for various implementations, or just use BT itself.
<hayley>
I'm not sure how you make fork/join, locks and condition variables more expressive. But bordeaux-threads is quite bare of concurrent structures, yes.
<notaprime>
however, unless you are interested in how each implementation handles parallelism, you are probably better off thinking of BT as similar to UIOP, i.e., some internal component of libraries you use, instead of a library that you should be using directly yourself.
minion has quit [Remote host closed the connection]
specbot has quit [Remote host closed the connection]
minion has joined #commonlisp
specbot has joined #commonlisp
<johnjay>
i had the impression that commonlisp was full of multithreaded stuff
<notaprime>
hayley, what about atomic operations?
<johnjay>
at least from people talking
<hayley>
notaprime: Yes, those are also not present in bordeaux-threads. But you have my apologies if you need to get down to atomics for something.
<notaprime>
johnjay, there are several frameworks for parallel programming, although if you are unfamiliar with the field, you will probably need to choose a specific one, or at least look through the examples that the different libraries include.
<notaprime>
once you find which examples seem most intuitive to you, study that library.
<hayley>
Then, if you do use something finer grained, the logic, state machine, or any other thing you use to reason with, should fit on a page, else you should be writing up a model to be mechanically verified first.
pve has joined #commonlisp
<johnjay>
ah ok thanks
<hayley>
Behold, slower sb-concurrency
<Guest74>
You want slow, I'll show you slow!
<johnjay>
by the way, does common lisp ecosystem have much in the way of packages and namespaces?
<johnjay>
like e.g. python has nice module names for regex,threads, math, etc
<notaprime>
the rule-of-thumb that will have you only erring on the side of excess verbosity is to use reverse-TLD naming
<hayley>
What I've used of Python's math module is just in the CL package.
<hayley>
Most things you use are just in the CL package, rather than having additional packages. Admittedly I like it that way, though I could have just internalised it from liking Common Lisp for other reasons.
<notaprime>
so if you have some johnjay.domain.biz, you dump your packages under (defpackage "biz.domain.johnjay.first-package" ...) etc
<notaprime>
and as you can read in the specbot link, you can define nicknames to abbreviate this.
<johnjay>
i've seen that weird naming before in java.
<johnjay>
like com.sun.string.thing.java....
<johnjay>
but i don't really know why they do that
<notaprime>
it is not unique to java, although I believe was popularized through java packages, or at least, during the same years that java became popular.
s-liao has joined #commonlisp
<Guest74>
not so fun ways people like to torture themselves
<hayley>
My investment in using a .ge suffix for applied-langua.ge would be ruined with reverse TLD naming.
<notaprime>
the standard CL package system only has one global namespace for packages, thus the need for hierarchical nomenclature
<hayley>
Though, I didn't really pay for the domain...at all.
<notaprime>
if you have time to learn about yet another recent innovation, then there is one for alleviating this.
<Guest74>
not even a hypothetical cent?
<hayley>
Following the discussion in #lispcafe, I guess I need to update my wish list of things: thread local GC, hardware transactional memory, first class global environments, and a pony.
<notaprime>
pffft, can't you just use hash-consing with pools in a declared dynamic variable?
<notaprime>
and wtf would you do with a pony anyway... ride it to a stable where you can get a real horse?
<hayley>
Very funny.
<notaprime>
tbh ponies are probably intelligent enough to learn common lisp
<hayley>
Can confirm, my favourite coauthor is a pony.
<notaprime>
I wonder what the lower bar for intelligence to being a CL programmer is.
<johnjay>
ah ok. well thanks for the tips.
<johnjay>
i like the cookbook linked in the topic as well, i find a lot of guides are outdated and don't talk about common sense things like regex or json
<notaprime>
e.g., Richard Feynman claimed that the bar for being a physicist was quite low, and gave himself as an example; he supposedly tested an IQ somewhere in the 120s due to having a really low "verbal intelligence", so maybe he'd prefer a Lisp-1 instead of CL.
<notaprime>
maybe my hypothesis is backwards; you'd need a higher "verbal intelligence" to use a Lisp-1, because you can't overload names and thus need to coin new words for each part of speech.
<Guest74>
many measurements of IQ have nothing to do with programming.
<notaprime>
johnjay, you're welcome
<johnjay>
isn't 120IQ equivalent to the average tv news anchor?
<johnjay>
yup
<notaprime>
I have no idea what their distributions are; all I remember about interpreting IQ scores is that each ten points are supposed to represent one standard deviation away from the mean score on the test... or was it the median?
<Guest74>
see, you can get a high score on 'facts' and zero critical thinking skills
<Guest74>
15
<notaprime>
the whole original IQ score collapses like a house of cards once you sweep away the gaussian rug underneath it.
<hayley>
IIRC 15 per standard deviation. And as a normal distribution is symmetric, mean = median
<notaprime>
there is no reason to expect that human scores on an intelligence test would fall along a Gaussian distribution, unless your model human flips a coin before choosing whether to flip a coin for answering each question, instead of using their own brain.
<notaprime>
if that is your model human, then there are probably more fundamental issues that need to be addressed first.
<notaprime>
my guess is that the importance of "verbal intelligence" for programming in general [and specifically CL, just so things stay on-topic!] is vastly underestimated.
<notaprime>
its importance is made more intuitive by thinking of programming as a way of coping with the inferiority of a human mind's numerical intelligence when compared with the infinite superiority of mathematics itself; there will always be complicated problems, although at least a computer can help us feeble humans to extend our numerical grasp.
<Guest74>
meh, they're just symbols. the fact they are usually words might mislead you.
<notaprime>
Guest74, what is the referent of "they're"?
<Guest74>
all those 'words' in lisp. Not much verbal intelligence needed.
<notaprime>
Common Lisp allows overloading; symbols can be variables, and functions, and often have roles in additional namespaces. the situation is qualitatively different from languages where each token is either undefined, or has exactly one definition.
<notaprime>
'overloading' is probably not the best word to use for describing Lisp-N vs Lisp-1, although I hope it gets my point across.
<Guest74>
can, doesn't have to be. And then it's more about recognizing where they occur.
<notaprime>
are you familiar with word2vec ?
<Guest74>
there are pretty straightforward rules, not so in spoken languages where verbal intelligence is a totally different thing.
<notaprime>
if so - Lisp-N essentially consumes an additional basis element.
<Guest74>
lisp is a simple grammar, not a natural language.
lagash has joined #commonlisp
<notaprime>
if not - word2vec is a project that eats a large body of text, and builds a representation of the words in that text as points within a vector space, ideally one with far fewer dimensions than the number of word roots, let alone the number of distinct words.
<Guest74>
natural language text
<notaprime>
then linguists have lots of fun searching for parallelograms in the vector space, and comparing them to "answers are to questions, as mistakes are to ______" prompts.
<johnjay>
as to IQ of programmers. I heard a quite black-pilled take the other day
<johnjay>
something like the real mathematicians do quant or PhD research
<johnjay>
the real writers become lawyers or writers
<johnjay>
and the real scientists become... scientists. so basically only people who are sub-par in all of these categories go into programming
<notaprime>
and imaginary mathematicians do ... quantum chemistry?
<notaprime>
well, "become writers" is incredibly general
<johnjay>
sure. the basic idea being programming is a collection of skills. but anybody excelling in one of those skills could make more money doing something else
<johnjay>
leading to a brain drain
<Guest74>
money?
<notaprime>
you, or the author of that quote, probably wasn't referring to journalists who are so forced to produce volumes of copy that they can't allow themselves to waste time editing.
<notaprime>
although arguably most writing is just that, high-volume journalism, blogging, etc; of course, it's important to remember Hunter S. Thompson's "that's not writing, that's typing" dismissal of those :->
<notaprime>
:-)
<johnjay>
yes i assume writing for high salary would be more like lawyers writing briefs than journalists
* johnjay
wonders if one day machine learning software will replace most reporters
<lagash>
nobody'd notice? :P
<Guest74>
um, news outlets don't want to lose their bias.
<johnjay>
well i've heard rumors of it happening for lawyers.
<notaprime>
Guest74, money is just speech; the fact that it's also symbolic beyond speech is often misleading.
<beach>
Good morning everyone!
<Guest74>
I want to write a lisp documentation system that would be good for reviewing laws and their constant referencing.
<beach>
Guest74: You may want to talk to splittist about that.
<Guest74>
aren't they working on some mcclim based thing?
<beach>
I don't remember.
Guest74 has quit [Quit: Connection closed]
<beach>
I am not suggesting a collaboration. Just that I am pretty sure that splittist is using Common Lisp to simplify legal work.
Guest74 has joined #commonlisp
<notaprime>
common lisp makes legal work simple, illegal work complicated, and impossible work conceivable.
<Guest74>
I guess document display system is more accurate than documentation system.
<notaprime>
now here's a stupid question: this computer almost certainly has only two CPU cores, although it pretends to have four; is there any reason to ever use more than three threads in the lisp image?
<notaprime>
any fundamental reason, that is; obviously I don't include in this questions threads that my environment [e.g. swank] would already be starting.
<beach>
notaprime: Sure, you may want to use threads because of the independent control, and not just to boost performance.
<notaprime>
as far as the lisp implementation is concerned, such a computer would be indistinguishable from a four-core one?
* notaprime
is slightly peeved that (machine-version) simply returns NIL
<notaprime>
this is on ECL; I have not tried others, on this machine, yet.
<notaprime>
as much as it peeves me, I suppose that printing the null return value does still give information.
<notaprime>
I haven't yet settled on a precise format string, although I like to include the return values from all five of the f_mach and f_impl functions in the startup message.
<notaprime>
that being the correct link; strangely these are grouped, whereas f_mach_i and f_mach_t get their own entries?
<beach>
notaprime: It sounds like you are working on some Common Lisp implementation. Is that so?
<notaprime>
no, just an initfile for a new setup.
<beach>
Ah, OK.
<notaprime>
it does greatly slow down work to do this all from scratch, instead of copying over a previous configuration; although I hope that this way I avoid accumulating cruft.
<notaprime>
I recall once writing code that tried all six combinations of instance,type,version and machine,lisp-implementation ... and am glad to report that this cruft has gotten forgotten by the proverbial bitrot.
<Guest74>
out of curiosity what do you put in your init file?
<notaprime>
lisp-implementation-instance should not exist outside of anything as pathological as a git-bisect hunting some bug across five years of SBCL development.
<notaprime>
er, not "as pathological as", but "less pathological then".
<notaprime>
Guest74, usually only this format statement, and either the quicklisp quickload snippet, or a direct ASDF setup
<Guest74>
ah, you made it sound like it was a lot of work.
<notaprime>
I think that on one computer where I was using several different compilers, I had that common stuff in one init file, and then a few init files for the different implementations, along with things for each one; e.g., at some point in the past, getting #P"~" to work right needed an additional form.
<notaprime>
I don't recall whether that was on SBCL or CCL.
<notaprime>
the bulk of the setup work is the OS cruft.
<notaprime>
I'll probably be setting up another workstation soon, and am strongly tempted to leave out all the extra work for a graphical environment, although to allocate space for installing it in the future in the mental accounting.
amb007 has quit [Remote host closed the connection]
<notaprime>
there is also the question of whether to nuke a windows partition, or setup a development environment there instead.
<notaprime>
this is actually the first time in about a decade that I actually have a computer with windows installed on it!
<notaprime>
the reflex is to nuke the partition, although I don't urgently need the extra space.
amb007 has joined #commonlisp
<notaprime>
is there a specific recommendation for CL on windows?
<notaprime>
search engine results suggest "Portacle", although I've not tried this myself in the past.
amb007 has quit [Remote host closed the connection]
<johnjay>
i just use sbcl directly
Oladon has quit [Quit: Leaving.]
<johnjay>
portacle is some kind of emacs/sbcl customization package. I think i installed it one time but didn't use it
<beach>
Portacle is SBCL+Emacs+SLIME, and I don't think Shinmera has had the time to keep up with its maintenance.
<hayley>
notaprime: Also consider that some threads might be busy doing IO work, rather than processing. So having more threads with more work to do can help there.
<notaprime>
sounds that it's going the way of Lispbox
<beach>
notaprime: Or, you can avoid Windows.
<hayley>
...and it also shouldn't be too terrible to have more threads than cores (though your OS usually craps out on the order of thousands of threads).
<notaprime>
if it weren't for videogames, I'd have nuked the windows partition the same day that I bought the computer.
<notaprime>
fortunately I have found enough entertainment elsewhere to stay away from that partition recently.
<notaprime>
hayley, the rule of thumb that I learned is to limit the number of work threads between the number of cores, and a small constant multiple of the number of cores
<hayley>
Yes, but having more isn't disastrous, up to a point.
<notaprime>
e.g., at an extreme, have one more work thread than the number of cores, so that there is always a work thread available for scheduling, until work runs out.
<beach>
That rule of thumb seems to apply only for threads meant to boost performance.
<hayley>
Right, you want to follow that rule if you are completely compute-bound.
<notaprime>
the lisp implementations add their own overhead above the OS; even if there are no additional instructions at process switches, there are still additional data.
<hayley>
How do you know that?
<notaprime>
bits of poking at internals
<hayley>
A Lisp implementation has some execution overhead in some context, but it is completely uninvolved in process switching*.
<hayley>
*assuming that it solely uses OS threads and not some green threading, which all do today.
<notaprime>
even without reading sources, you can convince yourself that the implementation must duplicate certain structures with fresh copies per thread.
<hayley>
So? That's a cost associated with creating a thread, and not switching threads.
<Guest74>
I'd like a way to tell a thread to work on a certain core.
<hayley>
Does Windows let you do that? I know FreeBSD and Linux have setaffinity(), but I am not familiar with thread management in Windows.
<notaprime>
don't context switches involve making the thread-local memory accessible more readily than merely knowing how to compute its address? e.g., loading the relevant pages into one of the cache levels.
<notaprime>
(my question is at the level of what the OS does, not something that the lisp implementation would have to handle explicitly)
<hayley>
That occurs when a Lisp program has to read thread-local data, but sure.
<hayley>
But, to a zeroth approximation, you probably blow out all your cache when switching between processes.
<notaprime>
I like where this is going!
<notaprime>
... to a first approximation, you blow out the L1-and-upwards caches when switching between processes.
<notaprime>
to a second, ...
notaprime is now known as adlai
<hayley>
Don't forget translation lookaside buffers and branch prediction tables. Though I think the former is reduced as the TLB is "tagged" with each process, and you don't tend to have TLB pressure.
<hayley>
So the cache can sometimes cache lookups for multiple processes.
amb007 has joined #commonlisp
<adlai>
I can't quite forget things that I never properly understood to begin with, can I?
<adlai>
blech, the _whitelogger appears to elide renames from the published log.
<adlai>
however, I find its web viewer better for a large screen than the one linked in the channel topic.
<adlai>
"Expiration times can be extended by staff for other reasons including account age to as much as 15 weeks past the last use." ... this is surprising; I'll have to take care to keep this registration alive.
<adlai>
for some reason I expected the tolerated default inactivity time to be on the order of half a year, not ten weeks.
Guest74 has quit [Ping timeout: 256 seconds]
amb007 has quit [Remote host closed the connection]
<adlai>
it appears that Clozure's logs haven't been updated in a while; this is unfortunate, as they published the actual IRC protocol messages.
amb007 has joined #commonlisp
amb007 has quit [Remote host closed the connection]
<adlai>
is there a published overview of the CL channels in this network?
amb007 has joined #commonlisp
<adlai>
I ask humans, because I recall once running /list on freenode and then needing to kill my IRC client
amb007 has quit [Remote host closed the connection]
<adlai>
... and the /list syntax for this network doesn't appear to support a search query
<Nilby>
adlai: /msg alis HELP LIST
<adlai>
thank you, Nilby
<Nilby>
adlai: You're welcome. I always forget about it too.
<adlai>
meanwhile I have enjoyed living dangerously, and discovered that their webchat has builtin idiotproofing
<adlai>
running /list with no arguments gets special-cased by the webchat :-)
amb007 has joined #commonlisp
lisp123w has left #commonlisp [ERC (IRC client for Emacs 26.3)]
holycow has joined #commonlisp
waleee has quit [Quit: WeeChat 3.3]
tyson2 has quit [Remote host closed the connection]
akoana has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
Devon has joined #commonlisp
Devon has quit [Ping timeout: 264 seconds]
taiju has quit [Ping timeout: 260 seconds]
<fe[nl]ix>
hayley: I welcome suggestions for concurrency primitives to add to B-T
<hayley>
I could think of a few, but I don't know how portable they are going to be.
<hayley>
Fence instructions would be nice, but I also don't know if those belong in bordeaux-threads or atomics.
<fe[nl]ix>
I can only add features which the implementations already expose to some extent
<fe[nl]ix>
so BT2 will have atomics, but fences are kind of useless because there's no memory model
<hayley>
Yes, we'd need a memory model. BT3 then? :)
<hayley>
And do atomics make sense without a memory model?
<fe[nl]ix>
they still do, they're just full barriers
<hayley>
Sure.
taiju has joined #commonlisp
holycow has quit [Quit: Lost terminal]
lisp123w has joined #commonlisp
akoana has left #commonlisp [#commonlisp]
asarch has joined #commonlisp
vats has joined #commonlisp
adlai has quit [Quit: the inability to read does not make you a random oracle]
MichaelRaskin has quit [Remote host closed the connection]
Skyfire has quit [Quit: brb]
contrapunctus has left #commonlisp [#commonlisp]
igemnace has joined #commonlisp
contrapunctus has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
Skyfire has joined #commonlisp
amb007 has joined #commonlisp
MichaelRaskin has joined #commonlisp
Skyfire has quit [Client Quit]
asarch has quit [Quit: Leaving]
Skyfire has joined #commonlisp
dre has quit [Ping timeout: 265 seconds]
amb007 has quit [Remote host closed the connection]
ym has joined #commonlisp
amb007 has joined #commonlisp
paul0 has quit [Read error: Connection reset by peer]
paul0 has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
amb007 has quit [Remote host closed the connection]
Devon has joined #commonlisp
pjb has joined #commonlisp
Devon has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
amb007 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
pjb has quit [Ping timeout: 265 seconds]
vats has quit [Read error: Connection reset by peer]
gaqwas has joined #commonlisp
pjb has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
s-liao has joined #commonlisp
cage has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 268 seconds]
theothornhill has joined #commonlisp
<lisp123w>
I was thinking Common Lisp is quite unique in being heavily based on images. Takes a while to get one's head around, but very powerful in that regard. Which other languages apart from Smalltalk and other lisps are reknown for image-based development?
<lisp123w>
(Or CL the mainstay of dynamic, image based systems - seems like it)
<jackdaniel>
incremental compilation is common, image based development is slightly different
<jackdaniel>
i.e common lisp standard doesn't define image or save image operations (some implementations have it though)
<jackdaniel>
as of incremental compilation, you may "habe it" even in C if you arr stubborn - just use dlopen.
<jackdaniel>
have it*
<lisp123w>
jackdaniel: Thanks
<beach>
The main difference between Common Lisp compilation and compilation in most other languages is that, for most languages, the compiler starts with an empty environment. That's why you have all those #include things in C.
<beach>
In Common Lisp, the current run-time environment becomes the initial environment for the compiler, and that run-time environment is of course part of the current image.
<lisp123w>
beach: Yes, its a very useful feature to have that. Not sure if it falls under 'image based development'
<beach>
I think I explained this aspect in my first presentation on how to create a Common Lisp implementation.
<beach>
I don't think there is a widely agreed-upon definition of that term, so it seems futile to argue about it.
<lisp123w>
I was reading "Bootstrap Common Lisp using Common Lisp" which was quite useful, even for non-implementors
<beach>
Thanks.
<hayley>
Smalltalk implementations also write out a "transaction log" of all forms evaluated in the system, and can also "file out" entire classes.
<beach>
Right then, I was referring to my series of presentations for phoe's online Lisp meeting.
<lisp123w>
hayley: I started doing that too
<lisp123w>
beach: Thanks, I will google and have a read of those too
<beach>
They are videos.
<hayley>
Of the Smalltalk "derivatives": Self has a transporter, which is more like MAKE-LOAD-FORM, but is relevant as more things are plain objects and message passing in Self than Smalltalk. But I recall that Newspeak is much more shy with image-based development.
<hayley>
Reminds me that Squeak has a version control system called Monticello too.
<pjb>
and git connections.
<lisp123w>
A by product of an image-based approach, is that any application one writes automatically has a fully fledged 'scripting' language for users built in
<lisp123w>
As long as you give them the opportunity to evaluate lisp forms
<lisp123w>
I think that element is underappreciated by the broader developer community
<hayley>
Yes, most developers are over-confident and think that they can "just" provide a perfect program with nothing to poke at. Another funny mental model is that they think the user can't program, so don't bother providing any facilities for it. Looks like a catch-22 to me.
<lisp123w>
Definitely. In fact I was just thinking the success of Emacs was less to do with the original program itself but more that it was written in a lisp so that users had full access to modify / extend it (which they did)
<pjb>
lisp123w: more or less: you still need to provide a scripting API to the application. ie. entry points simple to use.
<pjb>
lisp123w: for example, to make a new X11 frame and populate it with some view, and have it displayed, you need about 50 LOC (whatever the language, it's the X11 API that's like that). vs. (make-frame-on-display ":0.0") you'd want to use in a script!
johnjay has quit [Ping timeout: 250 seconds]
s-liao has joined #commonlisp
johnjay has joined #commonlisp
<lisp123w>
pjb: Exactly!
pjb has quit [Ping timeout: 250 seconds]
waleee has joined #commonlisp
theothornhill has quit [Read error: Connection reset by peer]
theothornhill has joined #commonlisp
pjb has joined #commonlisp
jacek_ has joined #commonlisp
<jacek_>
Can I ask you opinion about pros and cons of having a separate package for fiveam tests?
<beach>
Separate from what?
<jacek_>
i eneded uf having 2 systems in asd file
<jacek_>
one is for normal code and the other for tests
<beach>
That's unrelated to the packages used, though, right?
<jacek_>
the tests system has a separate package-test and normal system has package
<jacek_>
both systems use different pathname
<jacek_>
i am asking because I have started from a very minimal setup where both systems and its files were in the same folder
<jacek_>
and I had some surprise with the packages for both source and tests being defined in the same package file
<jacek_>
which mean adding fiveam as dependency of the source system as well
notzmv has joined #commonlisp
<beach>
I try to structure my code around "modules", where a module is implemented as an ASDF system definition and its own package. The symbols exported from that package are then the protocol or interface to the module. Typically, then, the tests should use only protocol functionality, so it would then be best for the tests to have a separate package.
<beach>
It is less important I guess whether the system for the module and the system for tests are in separate ASDF files or in the same one.
<jacek_>
i do not know who to pus defsystems in separate folders unless you mean to reuse the system in separate projexts
<beach>
What's the problem with systems in separate "folders"?
<beach>
You just have to make sure ASDF can find them.
<jacek_>
i never thought of using then that way, you gave me a surprise, despite years of trying i am still a lisp noob
<beach>
I tend to put each such module in a separate directory (or "folder" I guess). Perhaps the test system is best put in a sub-directory then.
<jacek_>
I use quicklisp, i only started dipping my toes in asdf
<jacek_>
notmally i have my projects in Programming/Lisp folder and then do
<beach>
That's fine. You can pretend it's all quicklisp.
theothornhill has quit [Ping timeout: 265 seconds]
<beach>
Put a link to your project in ~/quicklisp/local_projects
<jacek_>
pushing does the same, am I right?
<beach>
I don't remember, but I think so.
theothornhill has joined #commonlisp
<beach>
I know in ~/quicklisp/local_projects, you need a link only to the root directory of your project. The project can then contain as many ASDF system definition files as you like.
<jacek_>
I guess for me with my experiments this i better solution so I do not pollute my system with experimental projects unless I want it
<beach>
I don't remember whether that's also true for the central registry.
<jacek_>
pushing several systems in one go to *central-registry* is not a problem. and I suspect you have given me idea how to organise my next project :-)
<beach>
Great! I hope it works out.
<jacek_>
I was wondering about the ways of organising the project into mudules and do my first attempt at doing architecture with Lisp. You have clarified my idea and with the same stroke you have given me idea how to reuse the code for several small projects that can share some of the functionality.
<jacek_>
thank you very much. Now I will dissappear for a cup of coffe and some rumination about the ideas
<jacek_>
:-D
<beach>
Take care!
scymtym has quit [Read error: Connection reset by peer]
jacek_ has quit [Quit: Leaving]
Brucio-18 has quit [Remote host closed the connection]
random-nick has joined #commonlisp
yewscion has joined #commonlisp
lisp123w has left #commonlisp [ERC (IRC client for Emacs 26.3)]
yewscion has quit [Quit: Connection closed]
yewscion has joined #commonlisp
varjag has joined #commonlisp
<Xach>
beach: the path is "local-projects"
pjb has quit [Ping timeout: 268 seconds]
<beach>
Oops! Thanks!
<beach>
I keep making that mistake.
Brucio-66 has joined #commonlisp
karlosz has joined #commonlisp
theothornhill has quit [Read error: Connection reset by peer]
theothornhill has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
tyson2 has joined #commonlisp
s-liao has joined #commonlisp
<Jing>
I am relatively new to Emacs, so I was thinking does Emacs (or Sly for that matter) offer this feature: Suppose A.lisp and B.lisp are in the same project. I am reading A.lisp, in which the macro `define-class` is used. Now I want to jump to its definition (in B.lisp), is there a function/key-map or package for this feature?
<beach>
M-.
<beach>
Jing: Hello?
<Jing>
You are right, beach :)
<Jing>
Didn't know it's that simple...
s-liao has quit [Ping timeout: 256 seconds]
Devon has joined #commonlisp
Devon has quit [Read error: Connection reset by peer]
Devon has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
frgo has quit []
s-liao has joined #commonlisp
s-liao has quit [Client Quit]
karlosz has quit [Quit: karlosz]
tyson2 has quit [Remote host closed the connection]
frgo has joined #commonlisp
shka has joined #commonlisp
<phantomics>
Question about ASDF: is there any way to require a system if and only if certain requirements are met? Particularly, there's a package I don't want to require if the system is being compiled with ABCL and Maven isn't present because it uses CFFI which requires Maven to load, else an error occurs
<beach>
Do you mean a "system" you don't want to require? As in the :DEPENDS-ON list?
<beach>
I guess I don't know what it meant to "require a package".
<phantomics>
Yes, as in :depends-on
<beach>
Those are "systems". Can this be determined at read time? If so, then you can always do arbitrary computations in the form of #.(if ... :that-system ...)
<beach>
There is also a way in ASDF to use the *FEATURES* I think, but I don't remember how.
<phantomics>
Ok, I suppose it can be determined at read time, I need to run a command via (uiop:run-program) but no reason it can't be done then
<phantomics>
Thanks
<beach>
Sure.
Colt has quit [Quit: Leaving]
ahorse has joined #commonlisp
<random-nick>
the ASDF manual recommends against writing .asd files which produce different system definitions under different implementations via reader conditionals
<random-nick>
for testing features it has the :feature specifier, but I don't remember reading about any that let you execute code to test
<beach>
Hmm. I suppose that restriction includes the use of #. to determine a system to depend on.
<random-nick>
from the ASDF manual: This causes problems if, for example, one wished to design an archive-op that would create an archive file containing all the sources, since for example the file cffi-sbcl.lisp above would be invisible when running the archive-op on any implementation other than SBCL.
<etimmons>
When .asd files are loaded, they are LOADed, for better or worse
<random-nick>
I'm guessing it's probably fine for most usecases to use reader macros like that
<etimmons>
So you can have a form in there that runs your test and pushes the result to features
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
tyson2 has joined #commonlisp
<phantomics>
I can see the rationale, the issue is that the system will fail to compile under ABCL unless Maven is installed because it uses CFFI
<phantomics>
There's an alternative method for the small part of the code that uses CFFI, so this reader macro method could work in that case. What it means is that the theoretical archive-op would not include the CFFI-dependent system if the archive was done using ABCL without Maven
pjb has joined #commonlisp
Guest74 has joined #commonlisp
VincentVega has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Ping timeout: 268 seconds]
beach` is now known as beach
<etimmons>
phantomics: the hypothetical archive-op may not always need to see all possible dependencies, but a dependency extractor would (something I'm passionate about)
<etimmons>
You should be able to put something like (when (and abcl-p maven-installed-p) (pushnew :my-system-maven-installed features)) before your system definition (replacing the tests with something real)
taiju has quit [Ping timeout: 260 seconds]
taiju has joined #commonlisp
<etimmons>
And then in your system definition's depends-on list, (:feature (:and :abcl :my-system-maven-installed) "cffi")
<etimmons>
And an appropriate fallback for abcl without maven installed
Lycurgus has joined #commonlisp
engblom has joined #commonlisp
<etimmons>
Note you can also use :if-feature on component definitions to conditionally load modules or files as well
peterhil has quit [Ping timeout: 260 seconds]
peterhil has joined #commonlisp
<phantomics>
Ok, I'll see about that
<engblom>
How would you loop over a plist so you with each iteration get both the key and the value?
<pjb>
(loop for (key value) on plist by 'cddr)
<engblom>
pjb: Thanks!
tyson2 has quit [Remote host closed the connection]
<Nilby>
phantomics: A pattern I use in .asd's is :defsystem-depends-on (:config) … :depends-on ((:feature :feature-added-in-config) … I'm not sure if it's the best idea, but it works
<Nilby>
I think the danger with :defsystem-depends-on is if you make the rest of the system definition unreadable without it.
pranavats has left #commonlisp [#commonlisp]
<phantomics>
Thanks Nilby, have any repos online with examples of this?
peterhil has quit [Quit: Leaving]
peterhil_ has joined #commonlisp
makunbound has joined #commonlisp
makunbound has left #commonlisp [#commonlisp]
dra has joined #commonlisp
victor_ has quit [Remote host closed the connection]
splittist has quit [Remote host closed the connection]
hubvu has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
drmeister has quit [Remote host closed the connection]
jcowan has quit [Remote host closed the connection]
ullbeking has quit [Remote host closed the connection]
cosimone has joined #commonlisp
pjb has quit [Ping timeout: 256 seconds]
<engblom>
What does this mean: Lock on package COMMON-LISP violated when
<engblom>
globally declaring the FTYPE of TYPE while in package GPON-LIB.
alanz has quit [Remote host closed the connection]
Lord_of_Life_ has joined #commonlisp
<beach>
You seem to have a function named TYPE in that package.
<beach>
And that's a standard Common Lisp symbol, so it is not allowed.
Lord_of_Life has quit [Ping timeout: 268 seconds]
Lord_of_Life_ is now known as Lord_of_Life
scymtym has joined #commonlisp
<engblom>
beach: Thanks, I got it figured out now. In this case it was not very obvious. I tried to do some classes and one of them had a "type" slot.
<beach>
That would do it.
<beach>
Maybe not for the slot name, but for the accessor.
<engblom>
Yes, the accessor had that name too
jsatk has quit [Ping timeout: 246 seconds]
travv0 has quit [Ping timeout: 260 seconds]
stylewarning has quit [Ping timeout: 260 seconds]
sgithens has quit [Ping timeout: 260 seconds]
conjunctive has quit [Ping timeout: 250 seconds]
griffinmb has quit [Ping timeout: 268 seconds]
pl has quit [Ping timeout: 260 seconds]
<beach>
engblom: You can always SHADOW that name.
iisi has quit [Ping timeout: 260 seconds]
jmercouris has quit [Ping timeout: 246 seconds]
<beach>
I do that all the time when the most "natural" name that I want happens to be a standard Common Lisp symbol.
<engblom>
I would actually want to create something like (get-nested-property plist key1, key2, key3 ...) where getf gets nested as many times as there are keys given. How should I do that?
<engblom>
With only two keys given it would be (getf (getf plist key1) key2)
<phantomics>
I have one more question about this ABCL thing. I have the ASDF system and package definition working properly, only loading the package if ABCL is set up correctly
<phantomics>
However, in the actual code, I'm having a problem. The code looks like this: #.(if (abcl-test) '(cl-cpus:get-number-of-processors) '(do-something-else))
<pjb>
Why not #+abcl (cl-cpus:get-number-of-processors) #-abcl (do-something-else) ?
Lord_of_Life has joined #commonlisp
<phantomics>
And I get this message: The package "CL-CPUS" can't be found. Despite the fact that that clause will only be part of the code if the (abcl-test) passes. It's the same qualifier I use to decide whether to :depend-on the system and require it for the package
<phantomics>
pjb: I'm doing more than testing for the presence of ABCL. The alternative path is only followed if 1) the implementation is ABCL, and 2) the Java utility Maven is not available
<pjb>
phantomics: #. is read-time evaluation. So the package needs to be loaded at read-time…
<pjb>
so cl-cpus should be a dependency to your system, so that it'd be loaded before your system is compiled/loaded.
<phantomics>
Ok, problem is that if Maven is not available loading cl-cpus causes an error, because it depends on CFFI which requires Maven under SBCL. A catch-22
<pjb>
Then use 1 or 2 instead… Just until you can load it.
z3t0 has quit [Read error: Connection reset by peer]
<phantomics>
Use 1 or 2? As in 1 or 2 cpus?
z3t0 has joined #commonlisp
<pjb>
Yes.
<pjb>
1 is the conservative value, but even on a mono-processor, 2 shouldn't break anything.
rogersm has joined #commonlisp
<phantomics>
I can do that, problem is that the method used to find the number of CPUs should either use cl-cpus or not whether Maven is present. I can check whether Maven is present at read time, but I now understand I can't use #. to build code from symbols that don't exist under the given conditions
<phantomics>
Maybe I could do a minimal (defpackage #:cl-cpus) before the file gets read including a function called get-number-of-processors? Then that package definition would be overridden by the real cl-cpus if it's loaded but the #. should still work
Lord_of_Life_ has joined #commonlisp
<pjb>
phantomics: sysctl hw.physicalcpu_max # works on unix systems (Darwin, Linux).
Lord_of_Life has quit [Ping timeout: 260 seconds]
<phantomics>
Yeah, I have a backup function with a set of commands to fetch the CPU count in different OSes, I could just ditch cl-cpus, it seems robust though
<engblom>
pjb: You created apparently a recusive function called rgetf. I will have to try to create a rsetf, as I will need it too.
ullbeking has quit [Ping timeout: 260 seconds]
<phantomics>
cl-cpus is out
alanz has joined #commonlisp
ullbeking_ has joined #commonlisp
drmeister has joined #commonlisp
sgithens has joined #commonlisp
jcowan has joined #commonlisp
pl has joined #commonlisp
stylewarning has joined #commonlisp
travv0 has joined #commonlisp
jsatk has joined #commonlisp
<pjb>
engblom: indeed.
griffinmb has joined #commonlisp
conjunctive has joined #commonlisp
tophullyte has joined #commonlisp
<pjb>
engblom: there's the question with a (setf rgetf) or rsetf function, what to do when the plist is nil.
iisi has joined #commonlisp
<pjb>
engblom: (let ((plist '())) (rsetf plist :a 42) plist) -> ??? with a function you cannot do anything, and plist will stay NIL.
d_run has joined #commonlisp
<pjb>
engblom: for this case, you need a defsetf or define-setf-expander
gendl has joined #commonlisp
<pjb>
engblom: for the case where the plist is not NIL, you can always mutate the cons cells.
<engblom>
pjb: It would be prefarable if the program would end up in debugger if that happens, as it is something unallowed.
<engblom>
So simply crashing
splittist has joined #commonlisp
<Guest74>
i'm a fan of crashing
<lagash>
Guest74: let me guess.. you use Erlang or Elixir? :P
<Guest74>
no, only lisp
jmercouris has joined #commonlisp
victor_ has joined #commonlisp
IUSR has joined #commonlisp
hubvu has joined #commonlisp
dbotton has joined #commonlisp
<engblom>
pjb: Thinking about the problem for some time, I think it would need to create the lists so there is a way to add elements too. thus (let ((plist '())) (rsetf plist :a 42) plist) would give (:a 42)
<engblom>
pjb: (let ((plist '())) (rsetf plist :a :b 42) plist) would give (:a (:b 42))
Devon has quit [Ping timeout: 256 seconds]
<pjb>
engblom: think more.
<pjb>
There are no lists in lisp.
<pjb>
Only the symbol NIL, which is immutable, and cons cells.
<pjb>
(rsetf plist :a :b 42) is the same thing as (rsetf nil :a :b 42) there's no way for it to mutate plist.
<pjb>
to update a place like plist, you need to define a setf'er with defsetf or with define-setf-expander. In simple case, you can also use a macro.
theothornhill has quit [Quit: Quit]
mrcom has quit [Read error: Connection reset by peer]
varjag has quit [Ping timeout: 256 seconds]
yewscion has quit [Ping timeout: 250 seconds]
Inline has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 256 seconds]
karlosz has joined #commonlisp
rogersm has quit [Quit: Leaving...]
Inline has joined #commonlisp
pjb has quit [Killed (lithium.libera.chat (Nickname regained by services))]
pjb has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
paul0 has quit [Remote host closed the connection]
theothornhill has joined #commonlisp
paul0 has joined #commonlisp
aeth_ has joined #commonlisp
pjb has quit [Ping timeout: 268 seconds]
aeth has quit [Ping timeout: 264 seconds]
yewscion has joined #commonlisp
aeth_ is now known as aeth
aartaka has joined #commonlisp
dre has joined #commonlisp
Oladon has joined #commonlisp
cjb has joined #commonlisp
Devon has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
holycow has joined #commonlisp
theothornhill has quit [Remote host closed the connection]
ym has quit [Ping timeout: 240 seconds]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` is now known as X-Scale
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
tyson2 has joined #commonlisp
mrcom has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
mfiano has quit [Ping timeout: 256 seconds]
aartaka has quit [Ping timeout: 260 seconds]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
lexi_sparks has joined #commonlisp
pjb has joined #commonlisp
gaqwas has joined #commonlisp
Bike has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
<dre>
anyone thinking of doing AoC2021 ?
<dre>
I am nowhere near strong enough to do it in CL
<hayley>
This is why we have training montages, no?
<Guest74>
training montage? I'll stumble through aoc as usual
<dre>
haha :D
<dre>
* rocky theme plays in the background *
holycow has quit [Quit: leaving]
mrcom_ has joined #commonlisp
<Guest74>
::notify Xach the link to ch-image on your skippy page is broken.
<Colleen>
Guest74: Got it. I'll let Xach know as soon as possible.
dra has quit [Quit: Leaving]
mrcom has quit [Ping timeout: 250 seconds]
<_death>
hmm, it's already been 7 years of aoc.. wouldn't want to break that chain
<_death>
oh, 6 years.. I created a directory for aoc2021
asarch has joined #commonlisp
<Guest74>
anybody remember who wrote that automatic downloader? I might be too lazy to copy paste links this time.
Colt has joined #commonlisp
lottaquestions has quit [Remote host closed the connection]
lottaquestions has joined #commonlisp
pjb has quit [Ping timeout: 260 seconds]
pjb has joined #commonlisp
Lycurgus has joined #commonlisp
yewscion has quit [Ping timeout: 250 seconds]
pve has quit [Quit: leaving]
<Xach>
Guest74: ok
<Colleen>
Xach: Guest74 said 1 hour, 3 minutes ago: the link to ch-image on your skippy page is broken.