jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
feliocrat has quit [Remote host closed the connection]
schweers has quit [Remote host closed the connection]
v3ga has quit [Ping timeout: 264 seconds]
akoana has left #lisp ["Leaving"]
rumbler31 has joined #lisp
rgherdt has quit [Ping timeout: 264 seconds]
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
Bike has quit [Quit: Lost terminal]
Oladon1 has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
v3ga has joined #lisp
skapate has joined #lisp
skapata has quit [Ping timeout: 272 seconds]
random-nick has quit [Ping timeout: 264 seconds]
nij has joined #lisp
<nij> Sure. I finally found out.. but only for sly. However, sly is a fork of swank, so I don't expect them to differ too much at lower levels.
<nij> With multiple connected repls, we can read+select+check respectively by
<nij> sly-net-processes, (sly-select-connection (nth 0 sly-net-processes)), (sly-current-connection)
<nij> These are not exported elisp functions, but we can evaluated them manually.
<nij> By using these, I can confidently switch to the process I want.
<nij> And then the command that sends string (to be interpreted as commands) to the connected process is (sly-interactive-eval "(+ 1 1)"), for example.
<nij> Phew~ finally I can control it directly from xmonad ~_~
frodef has quit [Ping timeout: 246 seconds]
ex_nihilo has quit [Ping timeout: 264 seconds]
bitmapper has joined #lisp
domovod has joined #lisp
pankajsg has quit [Ping timeout: 246 seconds]
wxie has joined #lisp
Wezl has quit [Ping timeout: 260 seconds]
domovod has quit [Quit: WeeChat 3.0]
wxie has quit [Ping timeout: 246 seconds]
wxie has joined #lisp
ex_nihilo has joined #lisp
zulu-inuoe has quit [Read error: Connection reset by peer]
mrcom has quit [Ping timeout: 265 seconds]
dbotton has quit [Quit: This computer has gone to sleep]
nij` has joined #lisp
nij has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Remote host closed the connection]
dbotton has joined #lisp
madage has quit [Remote host closed the connection]
madage has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
charles` has quit [Ping timeout: 258 seconds]
wxie1 has joined #lisp
wxie has quit [Ping timeout: 240 seconds]
wxie1 is now known as wxie
greeb has quit [Ping timeout: 246 seconds]
wxie has quit [Ping timeout: 240 seconds]
mrcom has joined #lisp
freshmaker666 has joined #lisp
freshmaker666 has joined #lisp
freshmaker666 has quit [Changing host]
zacts has quit [Quit: leaving]
ptrkriz has quit [Remote host closed the connection]
gaqwas has quit [Ping timeout: 256 seconds]
gaqwas has joined #lisp
mr-iznogud has joined #lisp
mmmattyx has quit [Quit: Connection closed for inactivity]
housel has quit [Read error: Connection reset by peer]
peasynt has joined #lisp
dbotton has quit [Quit: This computer has gone to sleep]
peasynt has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
peasynt has joined #lisp
nij` has quit [Remote host closed the connection]
abhixec has quit [Quit: leaving]
renzhi has quit [Ping timeout: 258 seconds]
zacts has joined #lisp
<beach> Good morning everyone!
Stanley00 has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 258 seconds]
charles` has joined #lisp
jeosol has joined #lisp
rumbler31 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
toorevitimirp has joined #lisp
msk has joined #lisp
notzmv has quit [Ping timeout: 260 seconds]
yonkunas has quit [Quit: Connection closed for inactivity]
notzmv has joined #lisp
housel has joined #lisp
Stanley00 has quit [Remote host closed the connection]
Stanley00 has joined #lisp
mmohammadi9812 has quit [Ping timeout: 264 seconds]
mmohammadi9812 has joined #lisp
pankajsg has joined #lisp
rumbler31 has quit [Remote host closed the connection]
mmohammadi9812 has quit [Ping timeout: 256 seconds]
krid has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #lisp
mmohammadi9812 has quit [Client Quit]
Yardanico has quit [Ping timeout: 264 seconds]
kapil_ has quit [Ping timeout: 272 seconds]
kapil_ has joined #lisp
Yardanico has joined #lisp
aartaka has joined #lisp
orivej has joined #lisp
zacts has quit [Ping timeout: 246 seconds]
charles` has quit [Remote host closed the connection]
Nilby has joined #lisp
vegansbane696 has quit [Quit: The Lounge - https://thelounge.chat]
vegansbane696 has joined #lisp
freeman42x[d] has quit [Ping timeout: 240 seconds]
koo5[d] has quit [Ping timeout: 264 seconds]
karlicoss[d] has quit [Ping timeout: 264 seconds]
CasAM[d] has quit [Ping timeout: 256 seconds]
[d] has quit [Ping timeout: 264 seconds]
aindilis[d] has quit [Ping timeout: 258 seconds]
dmiles[d] has quit [Ping timeout: 258 seconds]
jacobpdq[d] has quit [Ping timeout: 264 seconds]
bilegeek_ has joined #lisp
bilegeek has quit [Ping timeout: 264 seconds]
bilegeek_ has quit [Quit: Leaving]
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 264 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
jacobpdq[d] has joined #lisp
dmiles[d] has joined #lisp
aindilis[d] has joined #lisp
karlicoss[d] has joined #lisp
koo5[d] has joined #lisp
CasAM[d] has joined #lisp
freeman42x[d] has joined #lisp
[d] has joined #lisp
Sauvin has joined #lisp
skapate has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
imode has quit [Ping timeout: 258 seconds]
hjudt has joined #lisp
Lycurgus has quit [Ping timeout: 256 seconds]
euandreh has quit [Ping timeout: 260 seconds]
jeosol has quit [Ping timeout: 248 seconds]
Krystof has quit [Ping timeout: 240 seconds]
euandreh has joined #lisp
frgo has joined #lisp
rumbler31 has joined #lisp
frgo_ has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 256 seconds]
amb007 has joined #lisp
catt has joined #lisp
lowryder_ has quit [Ping timeout: 264 seconds]
lowryder_ has joined #lisp
rogersm has joined #lisp
Cymew has joined #lisp
attila_lendvai has joined #lisp
midre has quit [Ping timeout: 240 seconds]
midre has joined #lisp
catt has quit [Remote host closed the connection]
jacobpdq[d] has quit [Ping timeout: 240 seconds]
dmiles[d] has quit [Ping timeout: 240 seconds]
karlicoss[d] has quit [Ping timeout: 240 seconds]
[d] has quit [Ping timeout: 240 seconds]
CasAM[d] has quit [Ping timeout: 240 seconds]
freeman42x[d] has quit [Ping timeout: 240 seconds]
aindilis[d] has quit [Ping timeout: 240 seconds]
koo5[d] has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
rgherdt has joined #lisp
brahmastra has joined #lisp
amb007 has quit [Ping timeout: 265 seconds]
edgar-rft has joined #lisp
amb007 has joined #lisp
jonatack has quit [Ping timeout: 258 seconds]
jonatack has joined #lisp
zacts has joined #lisp
narimiran has joined #lisp
anticrisis has quit [Quit: Leaving]
brahmastra has quit [Quit: Leaving]
aartaka_d has quit [Ping timeout: 258 seconds]
Anonymous_ has quit [Remote host closed the connection]
catt has joined #lisp
ex_nihilo has quit [Quit: Leaving]
shka_ has joined #lisp
liberliver has joined #lisp
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
aartaka has joined #lisp
surabax has joined #lisp
nij has joined #lisp
frodef has joined #lisp
nij has quit [Quit: ERC (IRC client for Emacs 27.1)]
Krystof has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
attila_lendvai has quit [Ping timeout: 258 seconds]
amb007 has quit [Read error: Connection reset by peer]
ralt has joined #lisp
pve has joined #lisp
amb007 has joined #lisp
Major_Biscuit has joined #lisp
nij has joined #lisp
<nij> Hello! I'm reading about Hygienic macros (https://en.wikipedia.org/wiki/Hygienic_macro).
<nij> It says that common lisp uses package to resolve the problem. Can I see what's the name of the package? What if the package conflicts with existing package?
<nij> It also says that Scheme resolves this by impose hygienic macros. How exactly do they do that (or should this go to #scheme)?
<no-defun-allowed> In Common Lisp, you usually use GENSYM to make names of variables that the client shouldn't be able to see.
<beach> nij: That would be the package that was current when the macro was created.
nij has quit [Remote host closed the connection]
<nij> Hmm.. so perhaps wikipedia is outdated or something.
<nij> Yeah.. that's what I read from gigamonkey.
nij has joined #lisp
<beach> nij: No, two different problems.
<beach> nij: What the article is referring to is a specific function called by the expansion of the macro. That function should then have a name that is typically in the same package as the name of the macro.
<beach> nij: What no-defun-allowed is saying is that, if some lexical variable is needed by the expansion of the macro, but with a name that does not matter otherwise, then GENSYM is used.
<beach> nij: All this is quite well explained in the book On Lisp by Paul Graham.
hendursa1 has joined #lisp
<no-defun-allowed> The article mentions both GENSYM and using internal symbols.
<beach> So it does.
<no-defun-allowed> Those are in the "Temporary symbol creation" and "Packages" sections, respectively. Note that uninterned symbols, such as those made by GENSYM, have no package, so they can never conflict with other symbols.
hendursaga has quit [Ping timeout: 268 seconds]
frodef has quit [Remote host closed the connection]
<beach> no-defun-allowed: That's not all there is to it though. If you use a symbol such as #:mumble in a macro, then it can conflict if macros are nested.
ravndal has quit [Quit: WeeChat 3.0]
<beach> ... it can conflict with itself in different nesting depths.
<nij> I did notice that.. just had an impression that the package method was preferred.
<beach> nij: They solve two different problems as I said.
<no-defun-allowed> That is true, you will want to call GENSYM (or whatever symbol-creating function you choose) in the macro definition that is the result of another macroexpansion, to avoid conflicts.
frodef has joined #lisp
<beach> So it is important to use GENSYM so that different symbols are used for each (possibly nested) expansion.
aartaka has quit [Read error: Connection reset by peer]
ravndal has joined #lisp
aartaka_d has joined #lisp
aartaka has joined #lisp
<nij> Oh I got temporarily disconnected.. now I see. Thank you beach.
<beach> Sure.
<nij> Thank you no-defun-allowed :)
<nij> (I'm pretty sure you use defmacro all the time. Keep the hard work ;))
<no-defun-allowed> I tend to over-use GENSYM.
deltab has quit [Ping timeout: 265 seconds]
<beach> nij: Macros are not used nearly as often as functions (for instance), but when you need a macro, it is good that DEFMACRO is there.
<no-defun-allowed> For example, there's a neat little "continuation" pattern, where one expands (with-foo () ...) to (flet ((continuation () ...)) (call-with-foo #'continuation)), in which case CONTINUATION can be an internal symbol.
aartaka_d has quit [Ping timeout: 246 seconds]
<no-defun-allowed> SBCL uses internal symbols (for example, in WITH-MUTEX-HELD), but I GENSYM anyway.
<no-defun-allowed> (Er, SBCL calls it WITH-MUTEX.)
<nij> uh oh oh it's just a bad joke toward no-defun-allowed's nickname
<nij> sorry, but yeah I am not pretty sure when to use macros either
ebrasca has joined #lisp
deltab has joined #lisp
frgo has quit [Remote host closed the connection]
nij has quit [Remote host closed the connection]
nij has joined #lisp
karlosz has quit [Quit: karlosz]
mr-iznogud has quit [Ping timeout: 265 seconds]
mrcom has quit [Ping timeout: 265 seconds]
devon has quit [Remote host closed the connection]
tgbugs has quit [Ping timeout: 246 seconds]
tassleoff has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 258 seconds]
tgbugs has joined #lisp
scymtym has quit [Remote host closed the connection]
aindilis[d] has joined #lisp
karlicoss[d] has joined #lisp
jacobpdq[d] has joined #lisp
koo5[d] has joined #lisp
freeman42x[d] has joined #lisp
CasAM[d] has joined #lisp
[d] has joined #lisp
dmiles[d] has joined #lisp
zacts has quit [Ping timeout: 240 seconds]
Stargazer2005 has joined #lisp
sveit has quit [Quit: Bye]
sveit has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Zeco has joined #lisp
Stargazer2005 has quit [Quit: Connection closed]
aartaka has joined #lisp
Lord_of_Life_ has joined #lisp
aartaka_d has quit [Ping timeout: 240 seconds]
Stargazer2005 has joined #lisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
aartaka has quit [Ping timeout: 246 seconds]
koo5[d] has quit [Remote host closed the connection]
jacobpdq[d] has quit [Remote host closed the connection]
freeman42x[d] has quit [Remote host closed the connection]
CasAM[d] has quit [Remote host closed the connection]
karlicoss[d] has quit [Remote host closed the connection]
[d] has quit [Remote host closed the connection]
dmiles[d] has quit [Remote host closed the connection]
aindilis[d] has quit [Remote host closed the connection]
h4ck3r9696 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aartaka has joined #lisp
scymtym has joined #lisp
[d] has joined #lisp
<no-defun-allowed> Well, you couldn't use macros to implement WITH-MUTEX, and requiring the client to use CALL-WITH-MUTEX wouldn't look great.
nij has quit [Remote host closed the connection]
nij has joined #lisp
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
surabax has quit [Quit: Leaving]
Stargazer2005 has quit [Quit: Connection closed]
Anonymous_ has joined #lisp
frodef has quit [Ping timeout: 264 seconds]
random-nick has joined #lisp
<[d]> <n​o-defun-allowed#0000> Well, you couldn't use macros to implement WITH-MUTEX, and requiring the client to use CALL-WITH-MUTEX wouldn't look great.
<[d]> <n​o-defun-allowed#0000> [edit]:
galex-713 has quit [Ping timeout: 264 seconds]
vegansbane696 has quit [Quit: The Lounge - https://thelounge.chat]
<no-defun-allowed> I agree, no-defun-allowed#0000.
mrcom has joined #lisp
galex-713 has joined #lisp
igemnace has quit [Remote host closed the connection]
Lycurgus has joined #lisp
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #lisp
<jmercouris> is there a way to signify to the compiler that a redefinition is intended so that no warnings are emitted?
<jmercouris> so if I have (defun xyz), and then elsewhere I have (defun xyz) again, can I let the compiler know that is on purpose somehow?
<jackdaniel> what would be a prupose of it?
<jackdaniel> purpose*
<jmercouris> I have two systems, one of them implements one version, another one version
<jmercouris> sometimes I load system 1 and then system 2
<jmercouris> system 1 has functionaly not existent in system 2, that system 2 requires
<jmercouris> but system 2 modifies the behavior of system 1 by overriding some functions
vegansbane696 has joined #lisp
<jackdaniel> you may (setf (fdefinition 'your-function) (lambda …))
<jackdaniel> I think that this begs for a declaration, that your function is notinline (in system 1)\
<jmercouris> a declaration?
<jmercouris> notinline?
<jmercouris> is that a keyword I don't nkow?
<jmercouris> s/nkow/know
<jackdaniel> (proclaim (declaim (notinline xyz))
<jackdaniel> tfu
<jackdaniel> without proclaim
<jackdaniel> (declaim (notinline xyz))
<jmercouris> I didn't know that was something I could declaim
<jmercouris> interesting
<jackdaniel> otherwise your compiler may inline the function body, and then your clever redefinition won't work as expected
<jmercouris> what about for methods though
<jmercouris> will it still allow me to set the fdefinition?
<jackdaniel> methods are not functions
<jmercouris> ay yai yai
<jmercouris> is there a "ignore warnings" form or something I can put at the top of my file?
<jmercouris> to suppress warnings when loading it?
<jackdaniel> there is sbcl muffle-warnings, write asdf method which wraps your file compilation in muffle-warnings
<jmercouris> seems clisp has *supress-check-redefinition*
<jmercouris> I wish there was a cross implementation way to do this... I don't want to add SBCL specific code
<jackdaniel> a new standard!
<jackdaniel> cl2021
tassleoff has quit [Ping timeout: 258 seconds]
<jmercouris> ...
<jmercouris> I'm happy enough with cl21 thank you very much
<jmercouris> or what was it called again?
<jmercouris> that thing by Eitaro
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<jmercouris> http://cl21.org/
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<jmercouris> I would seriously consider cl21 if it had a compiler to CL
<jmercouris> it has some good ideas in there I think
<jackdaniel> then use it, it is written in common lisp
ukari has quit [Remote host closed the connection]
<jackdaniel> (as in: you may simply load it, and you have access to common lisp compiler whatsoever)
<jackdaniel> including all well known libraries like quicklisp, alexandria and asdf
<jackdaniel> (if you like it that is - I don't)
ukari has joined #lisp
Major_Biscuit has quit [Ping timeout: 240 seconds]
flazh has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #lisp
Major_Biscuit has joined #lisp
<jmercouris> you can't use cl21 code in cl, that's my problem with it
<jmercouris> I mean you can
<jmercouris> but not without cl21 itself
<jmercouris> you can't compile cl21 to standalone cl if I'm not mistaken
<jackdaniel> I don't understand
<jackdaniel> just do (ql:quickload :cl21) (save-lisp-and-die) and you have a binary with cl21
galex-713 has quit [Ping timeout: 272 seconds]
themasterbuilder has joined #lisp
vindarel has joined #lisp
themasterbuilder has quit [Quit: Lost terminal]
[d] has quit [Remote host closed the connection]
Stanley00 has quit []
heisig has joined #lisp
nij has quit [Remote host closed the connection]
nij has joined #lisp
Zeco has quit [Quit: WeeChat 2.3]
nij has quit [Client Quit]
luni has joined #lisp
galex-713 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
vindarel has quit [Quit: Connection closed]
amb007 has joined #lisp
Inline has joined #lisp
<ebrasca> jmercouris: I don't understand the purpose of cl21 , parts of it are alredy done by cl libraries.
<jmercouris> yeah, parts of it are done by CL Libraries
saganman has joined #lisp
<jmercouris> I just like the idea of a community effort to a new 'de facto' set of libraries to be included in a default distribution
<jmercouris> also some of the reader macros are nice
Cymew has quit [Remote host closed the connection]
<ebrasca> I think it is better to make small libraries , then people chose what they like.
<Gnuxie[m]> No cos the idea of 'de facto' libraries is a terrible one
Cymew has joined #lisp
<_death> clhs muffle-warning
Iolo has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Iolo has joined #lisp
<flip214> did anyone manage to compress streams with CL-PDF? swank cross-reference tells me that I can activate the SALZA2 (LOAD-ZLIB) function, but *compress-streams* stays NIL
ex_nihilo has joined #lisp
orivej has joined #lisp
<jmercouris> _death: I see, thank you
frodef has joined #lisp
<jmercouris> here's what I ended up with: http://dpaste.com/3BBXM8M9J
<jmercouris> feels... strange
<jmercouris> progn is unneeded..
<phoe> don't ignore the condition
<phoe> why did you define ignore-warning though? you should be able to use muffle-warning directly
<jmercouris> phoe: IDK the CLHS had an example like that, so I mindlessly copied
galex-713 has quit [Ping timeout: 258 seconds]
Inline has quit [Ping timeout: 260 seconds]
skapata has joined #lisp
<jmercouris> phoe: what is meant to be done with the condition there?
<jmercouris> I assume of all people, you would know :-D
<phoe> pass it to muffle-warning
<phoe> use #'muffle-warning directly in the handler-bind and scrap your custom function
<jmercouris> oh I see
<jmercouris> I wonder why they did this indirection in the CLHS
<jmercouris> wonder what they had in mind
<phoe> CLHS examples contain a lot of silly things
<beach> Yes, and non-conforming code. :)
<beach> ... like top-level SETQs without prior definitions.
<jmercouris> phoe: how much money would someone have to pay you to write the CLUS?
<jackdaniel> I think that this gives a nice context of how people used pre-CL Lisp
<jmercouris> just out of curiosity, like if there was a big coporation sponsoring you
<jmercouris> how much would you charge
<beach> jmercouris: My guess is that it is more a question of available time than of money.
caret has joined #lisp
lotuseater has quit [Read error: Connection reset by peer]
dbotton has joined #lisp
grobe0ba has quit [Quit: ZNC 1.7.5 - https://znc.in]
<jmercouris> I don't see the difference
grobe0ba has joined #lisp
<jmercouris> give someone enough money, and they will make the time
Inline has joined #lisp
<beach> Sure, but that might involve quitting the dayjob.
<jmercouris> Yeah, that's true
<beach> jmercouris: For instance, I could spend up to 1k€ per month for at least 6 months to get help with SICL-related projects, but there just aren't any people that are both available and qualified.
<jmercouris> I bet if you had 300k€ per month, many more qualified people would suddenly be available
<jmercouris> I think a lot of the problem with Common Lisp is the money available in the ecosystem, the problem is not technological
<jmercouris> People learn JS not because it is a Oasis in a desert of bad languages, but because there is money to be made
<jmercouris> why? industry movements, who knows why
<beach> Yes, there is obviously some amount where people would quit their dayjobs.
<jmercouris> the problem is and will continue to be a question of money
Bike has joined #lisp
<jmercouris> there are many more people who would like to use Lisp more often, but they cannot, because having fun programming doesn't always put food on the table
<jmercouris> slingings bits of JS however, often does
<beach> That's not all there is though. A lot of the work that we need done requires more basic knowledge than your typical Web job in industry.
amb007 has quit [Read error: Connection reset by peer]
<jmercouris> sure, many things are pioneering efforts rather than implementing yet another CRUD site
<jmercouris> however, there are plenty of highly qualified people working in reesearch that requires lots of background
nij has joined #lisp
<aeth> You need charismatic projects. Then qualified people might be willing to take a pay cut (because if they're American they might be making well over $300,000 and you'll never have FAANG money).
amb007 has joined #lisp
<jmercouris> Yes, you're right aeth
<jmercouris> maybe Nyxt will change that
<jmercouris> I don't anticipate having FAANG level money, but I do anticipate success
mmohammadi9812 has quit [Read error: Connection reset by peer]
tgbugs has quit [Ping timeout: 246 seconds]
Lycurgus has quit [Quit: Exeunt]
mmohammadi9812 has joined #lisp
<aeth> I wouldn't call a web browser "charismatic", but unfortunately Mozilla seems to be doing its best to implode recently, so maybe it will be one in the future.
<aeth> (Especially mobile, wow I hate that redesign.)
<jmercouris> well, your mistake is in thinking that Nyxt is a web browser
<jmercouris> Nyxt is a lisp platform
dbotton has quit [Quit: This computer has gone to sleep]
<jmercouris> anyways, what would be a 'charismatic' project?
amb007 has quit [Read error: Connection reset by peer]
<jmercouris> Mezzano?
amb007 has joined #lisp
dbotton has joined #lisp
<aeth> Gamedev is probably the perennial software field where people take pay cuts to join. The rest are fairly opportunistic, like e.g. a social network in the past. Maybe VR or AR in the near future?
<jmercouris> I don't find game development particularly inspiring or technologically interesting
<aeth> Chat seems to be a fairly strong motivator, too...
<aeth> Never would've motivated me since we have IRC, of course.
<aeth> Maybe self-driving cars were an example of this in the past? They have the money now, though.
amb007 has quit [Read error: Connection reset by peer]
<Xach> I think I may get to use ldiff in real code today!
norserob has quit [Quit: leaving]
amb007 has joined #lisp
<aeth> jmercouris: I've probably missed a huge amount of categories just because they've always seemed fairly boring to me. e.g. maybe NoSQL was like this in the past. As in, just plain boring database stuff with a PR spin.
<jmercouris> well, one mans boredom is another man's fascination
imode has joined #lisp
<jmercouris> I'm sure most people here find browsers relatively boring
<aeth> Yeah. It's probably hard to tell which fields had lots of people willing to take pay cuts in over the years to work in. Probably only VCs have that complete data set.
<beach> Maybe a killer app rather than an OS would be "charismatic". Imagine something like MuseScore but written in Common Lisp instead.
rumbler31 has joined #lisp
<beach> I mean, an OS is what we need, but it would be hard to make people accept and use it.
norserob has joined #lisp
yonkunas has joined #lisp
<beach> It is hard for me to understand why anyone would write such a thing in C++.
<jmercouris> Nyxt is supposed to be the killer App
<jmercouris> Mezzano is supposed to be the OS :-D
<_death> Xach: ldiff/member idiom is cool
<jmercouris> I'll report back in 10 years if I've made headway or not...
<Xach> _death: i feel like i don't use ldiff enough, so it makes me smile when i come up with a new, non-contrived reason to use it.
<Xach> now if only i could find reasons to use nreconc or revappend more
<beach> jmercouris: I was under the impression that large parts of Nyxt are written in C or C++. Not so?
<jmercouris> Nothing in Nyxt is written in C
<jmercouris> we just use foreign libraries
<_death> Xach: another use could be (do* ((right list (rest right)) (left nil (ldiff list right))) ((null right)) ...)
rumbler31 has quit [Ping timeout: 264 seconds]
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
<beach> jmercouris: But those are written in C or C++, right?
<jmercouris> that's correct, but they are not part of Nyxt
<beach> Still, I wouldn't be able to run Nyxt on an OS without a C compiler.
<jmercouris> sure, luckily C code can compile on Mezzano
<jmercouris> and we will also make a renderer at some point that we can afford to
<jmercouris> s/that/when
<beach> Yeah, I wasn't thinking of Mezzano right then.
<_death> Xach: looks like I used ldiff twice in aoc2020.. I was certain that I have some revappend uses somewhere as well, but can't find'em right now
Blukunfando has quit [Ping timeout: 246 seconds]
theothornhill has joined #lisp
zaquest has quit [Quit: Leaving]
mmohammadi9812 has quit [Ping timeout: 240 seconds]
theothornhill has quit [Remote host closed the connection]
renzhi has joined #lisp
Stargazer2005 has joined #lisp
zaquest has joined #lisp
Anonymous_ has quit [Remote host closed the connection]
dbotton has quit [Quit: This computer has gone to sleep]
wsinatra has joined #lisp
red-dot has joined #lisp
<red-dot> Hello everyone.
<red-dot> anyone on Windows using UIOP:run-program will a full path?
<red-dot> e.g. (uiop:run-program "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe")?
luni has quit [Quit: Connection closed]
pfdietz has joined #lisp
wsinatra has quit [Ping timeout: 240 seconds]
<red-dot> It doesn't seem like uiop:run-program works with absolute paths, at least not with SBCL and Windows. I thought this was working in the past...
<pfdietz> The CLHS has some thing that are in direct conflict with each other.   complex types, I'm looking at you.
dbotton has joined #lisp
Stargazer2005 has quit [Quit: Ping timeout (120 seconds)]
KeyboardWorrier has quit [Ping timeout: 265 seconds]
pfdietz has quit [Quit: Ping timeout (120 seconds)]
<Bike> oh, are there parts that disagree about how they work with upgrading?
<Bike> yyyyyes. super
mmohammadi9812 has joined #lisp
theothornhill has joined #lisp
nij has joined #lisp
<nij> After getting stumpwm from ql:quickload, can I make install using asdf, but not the GNU make tools as it's stated in the readme? https://github.com/stumpwm/stumpwm
<Bike> i don't think asdf really does installations
<jmercouris> you COULD have your asd file do the installation for you, but it is not part of ASDF
<nij> What then is the make tools used commonly in CL community? GNU make tools?
<jmercouris> typically just a makefile, yes
<jmercouris> we don't need it for much, mostly just moving around an executable
<jmercouris> possibly checking for dependencies, simplifying the compilation process for non lisp users
<nij> if the users have sbcl and quicklisp installed, the compilation process would be easier?
<jmercouris> well, yeah
<jmercouris> how else could they compile CL without CL?
<nij> First install CL for them as a dependency.
jeosol has joined #lisp
<nij> Oh I see. At that stage you better use Make.
<jmercouris> users do not need to compile your software for you to distribute it
<jmercouris> you can distribute lisp images of your software compiled on similar machiens
<jmercouris> s/machiens/machines
liberliver1 has joined #lisp
gxt has joined #lisp
liberliver has quit [Ping timeout: 258 seconds]
liberliver1 is now known as liberliver
Stargazer2005 has joined #lisp
<_death> red-dot: try passing (list (uiop:native-namestring "C:\\...")) .. if a string is passed, uiop:run-program treats it as a "command", which I guess won't do with spaces and no quotes or something similar
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
toorevitimirp has quit [Remote host closed the connection]
v3ga has quit [Ping timeout: 258 seconds]
toorevitimirp has joined #lisp
_oldtopman has joined #lisp
lansiir has quit [Ping timeout: 272 seconds]
Major_Biscuit has quit [Ping timeout: 272 seconds]
nij has quit [Quit: ERC (IRC client for Emacs 27.1)]
Major_Biscuit has joined #lisp
Anonymous_ has joined #lisp
theothornhill has quit [Ping timeout: 272 seconds]
thatpythonboy has joined #lisp
<thatpythonboy> hi
<beach> Hello thatpythonboy.
<thatpythonboy> if i read roots of lisp paper, will i know lisp-like qualities such as read/eval/macros
<thatpythonboy> i prefer rootsoflisp as i find gigamonkeys too big
<beach> I don't know that paper. Do you have a link?
<beach> But I would say "no" because many of the current features were not in there from the beginning.
<beach> Looking at it briefly, I am now convinced that the answer is "no".
<beach> Well, you will know some.
<beach> Like EVAL is explained.
<thatpythonboy> then what extra gigamonkeys has
galex-713 has joined #lisp
<beach> Macros, classes, generic functions, ...
<alandipert> writing your own small lisp can be very informative and https://norvig.com/lispy.html is a great guide (using python)
<thatpythonboy> i know classes,functions from python
<beach> thatpythonboy: No, they are very different in Common Lisp.
euandreh has quit [Ping timeout: 272 seconds]
<thatpythonboy> i am talking about concepts not OOP/paradigms
<thatpythonboy> i read functions chapter it's the same
<thatpythonboy> classes are different
<beach> I said "generic functions". They are unique to Common Lisp.
<thatpythonboy> what do you mean generic, a function is a function
<phoe> thatpythonboy: not in CL
<ecraven> thatpythonboy: it is indeed not
<thatpythonboy> this is mysterious language
<phoe> a generic function is a term in Common Lisp
<phoe> read the proper PCL chapter to figure it out!
<ecraven> it's like a virtual function on steroids
<phoe> a generic function is something that has methods. in CL, methods don't belong to classes.
<beach> thatpythonboy: Clearly, if you expect Common Lisp to be just like the languages you know, there is nothing to learn.
<ecraven> hm.. what does c++ call the implementations of a virtual function? just "implementations"?
euandreh has joined #lisp
<phoe> overrides or something
<ecraven> they should just have used proper names :P
<thatpythonboy> i read functions chapter it didn't seem different than python
<thatpythonboy> which chapter then
<jdz> beach: Julia also has generic functions (inspired by CL, as far as I know).
<beach> jdz: I see. Thanks!
<thatpythonboy> but julia functions don't have methods
<ecraven> thatpythonboy: first hit on google, https://docs.julialang.org/en/v1/manual/functions/, says "f (generic function with 1 method)"
<ecraven> so it seems to use *exactly* the same names for things
<_death> there's also dylan, goo, etc. but they all miss some CLOS features (and may have features not in CLOS, though we also have a good MOP)
* beach forgot about Dylan.
tgbugs has joined #lisp
<thatpythonboy> that is just a function that julia calls a method due to multiple dispatch
<phoe> using julia nomenclature though, julia's GFs *do* have methods
dbotton has quit [Quit: This computer has gone to sleep]
<phoe> so do CL generic functions
<ecraven> beach: I wish prefix-dylan would have taken off
<_death> thatpythonboy: a generic function contains a bunch of methods.. when it's called, it decides which methods to call
<phoe> and CL's methods are *not* "just" functions due to the presence of method combinations.
<ecraven> phoe: is there *any* other language or non-CL-Lisp that has method combinations?
<beach> ecraven: I see what you mean. RScheme from U Texas is essentially that.
<phoe> ecraven: I am not aware of one
<ecraven> the more I try to implement these things myself in different Schemes, the more I wonder how any of this can be even halfway performant in CL... you guys (and all before you) really do great work!
toorevitimirp has quit [Remote host closed the connection]
<beach> ecraven: What are "these things" that you are referring to?
<ecraven> making method dispatch fast
<thatpythonboy> peter norvig shows a lisp interpreter in python, is there one in lisp itself?
<phoe> thatpythonboy: yes, roots of lisp shows one
<ecraven> I tried implementing a generic predicate dispatch in chez scheme (which is really fast by itself)
<_death> thatpythonboy: PCL is a book, whereas roots of lisp is a short article.. you say PCL is too big, but you're also asking whether to read a short article, which is strange
<ecraven> it's really slow :D
<thatpythonboy> rootsoflisp says the interpreter is incomplete
<beach> ecraven: I see. I suppose you read my paper about that, yes?
<ecraven> beach: I read all of your and other people's papers
saganman has quit [Quit: WeeChat 1.6]
<beach> Wow!
<ecraven> I just need a few more years of time to implement things ;)
<beach> Heh.
<ecraven> (sorry, "on that subject", not "all of your papers in general")
<phoe> thatpythonboy: if you mean "just" a lisp, then https://github.com/kanaka/mal has a lot of those
<phoe> that's not going to be CL though.
toorevitimirp has joined #lisp
<ecraven> maybe
<phoe> though there is an implementation of MAL in Common Lisp at https://github.com/kanaka/mal/tree/master/impls/common-lisp
<thatpythonboy> just need a basic interpreter not big CL mess
<ecraven> I should just give up and use CL already... :D I've been trying to implement halfway decent SLIME support in various Schemes, and none of them are even halfway as introspectable as the worst CL implementation
<phoe> then that is going to work well
<_death> thatpythonboy: maybe you should go to a non-CL channel then
<ecraven> thatpythonboy: #lisp is actually
<ecraven> #common-lisp
<beach> thatpythonboy: It is not a great idea to call the topic of this channel a "mess". At least not if you want help.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<alandipert> Bless This Mess <3
Stargazer2005 has quit [Quit: Connection closed]
flazh has joined #lisp
rumbler31 has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
h4ck3r9696 has quit [Ping timeout: 256 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #lisp
thatpythonboy has quit [Ping timeout: 240 seconds]
dbotton has joined #lisp
dbotton has quit [Client Quit]
<beach> Strange one this "thatpythonboy" person. Maybe just a result of being uncomfortable and/or having some problems with English.
charles` has joined #lisp
amb007 has quit [Ping timeout: 246 seconds]
Alfr has joined #lisp
amb007 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
ebrasca` has joined #lisp
ebrasca has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 256 seconds]
cage_ has joined #lisp
dbotton has joined #lisp
catt has quit [Ping timeout: 240 seconds]
frodef has quit [Remote host closed the connection]
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #lisp
waleee-cl has joined #lisp
frodef has joined #lisp
<jmercouris> format directive for a percentage?
thatpythonboy has joined #lisp
<jmercouris> well, this is what I have resorted to: (format t "~0d%" (* 100 .01))
<jmercouris> ... :'(
<jmercouris> ay yai yai
frodef has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
frodef has joined #lisp
dbotton has quit [Quit: This computer has gone to sleep]
hnOsmium0001 has joined #lisp
bilegeek has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
dbotton has joined #lisp
thatpythonboy has quit [Ping timeout: 246 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
h4ck3r9696 has joined #lisp
theothornhill has joined #lisp
thatpythonboy has joined #lisp
v3ga has joined #lisp
madage has quit [Quit: leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
thatpythonboy has quit [Ping timeout: 272 seconds]
nij has joined #lisp
theothornhill has quit [Ping timeout: 256 seconds]
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
<jasom> jmercouris: if you need to do it a lot you can make your own printer function and use ~/
nij has quit [Remote host closed the connection]
<jmercouris> I see
<jmercouris> jasom: don't know how to do that, maybe I will learn it at some point
<jasom> jmercouris: it comes at a cost of either polluting cl-user or having really long names
<jasom> jmercouris: https://github.com/jasom/jtk/blob/master/ltk.lisp#L1089 <- example here. I like it very much for escaping because (format s "~A ~A ~A" x (escape y) z) is much harder to tell is correct than (format s "~A ~/ltk:esc/ ~A" x y z) (assuming the item in the 2nd position must be escaped and 1st and 3rd must not)
h4ck3r9696 has quit [Quit: Leaving.]
aindilis has quit [Remote host closed the connection]
<jasom> totally OT, but the "correct" algorithm for escaping strings in TCL is *really* non-obvious, exposed in LTK by the fact that when I added this one, there were already 2 other escaping functions, one of which was super-linear in time and the other one of which was wrong.
<jackdaniel> 3 is a reasonable approximation of pi
<jackdaniel> and it is a fixnum! :)
<_death> it's also a good approximation of 2
<jackdaniel> true that
<jasom> it's a pretty darn good approximation of 0 in a lot of domains as well
<jackdaniel> (zerop pi) ;-> T
<charles`> on the cosmological scale, everything is nearby
<jmercouris> (zerop pi) -> nil
<jmercouris> not sure which version of CL you are using, must be a bug in ECL
<jasom> (zerop (* 10 (round pi 10))) ;-> T
<_death> jmercouris: ~D is for printing integers
<jmercouris> yes, sorry
jeosol has quit [Quit: Ping timeout (120 seconds)]
karlosz has joined #lisp
tgbugs has quit [Ping timeout: 258 seconds]
tgbugs has joined #lisp
<jmercouris> do (print element))(defparameter q '((a b c) (1 2 3)))
<jmercouris> sorry, ignore that, starting over
<jmercouris> (defparameter q '((a b c) (1 2 3)))
<jmercouris> now I want to: (loop for element in q with a = (first element) do (print a))
<jmercouris> the loop would print "a" and then "1"
<jmercouris> possible? or do I need a let binding within the do?
<jackdaniel> replace with with for
madage has joined #lisp
<jmercouris> oh, thank you
<jackdaniel> or replace replace with for
<jmercouris> I confuse those
<jackdaniel> eventually replace with for for
<jmercouris> ???
<jmercouris> I'm now completely lost replace with for for?
<jackdaniel> I was making a joke with the original "with with" that was /not/ a typo
aartaka_d has quit [Ping timeout: 258 seconds]
<jmercouris> I see
<jmercouris> 11
<_death> use let
<jmercouris> _death:
<jmercouris> why?
<_death> you can also use FOR
<jackdaniel> (loop for (i) in '((a b c) (1 2 3)) do (print i))
<jackdaniel> so many ways
<jackdaniel> (progn (print 'a) (print 1))
<_death> if you get confused, others may find it confusing as well.. so if you're in doubt, just use the more primitive operators
<jackdaniel> _death: this isn't a good argument for standard operators -- one would get confused why are you not using a designed operator to achieve something
<_death> jackdaniel: well, here we're discussing LOOP.. there are many pitfalls with LOOP so I don't mind if I see someone using let there instead of other ways
<jackdaniel> OK, that position could be defendable in context of loop, I've read it as a general advice
<_death> jackdaniel: I think it may also stand as a general advice, but I'm not sure I want to defend that position
<jmercouris> I have grown to love loop
<jmercouris> maybe in time I will love format too
<jmercouris> probably not for a long time
<_death> jackdaniel: basically I'd rather read transparent, if a bit eccentric, code than confused code ;)
root____2 has joined #lisp
<jackdaniel> me too. but I'd rather see defclass instead of bunch of interwingled closures
Major_Biscuit has quit [Ping timeout: 272 seconds]
<jmercouris> I'm personally a master of obfuscating the purpose of my code via OO paradigms
<jmercouris> I'm just joking of course
<jackdaniel> interwingled is of course a mashup of intertwined and intermingled
aartaka has joined #lisp
theothornhill has joined #lisp
<Nilby> give in and love format https://plaster.tymoon.eu/view/2272#2272
aartaka has quit [Ping timeout: 258 seconds]
rumbler31 has joined #lisp
<theothornhill> Nilby: that almost looks like rust :)
* Nilby *gasps*
rumbler31 has quit [Ping timeout: 240 seconds]
__jrjsmrtn__ has joined #lisp
<_death> the last one is relevant to jmercouris's problem.. (format t "~{~1{~A~}~}" q)
_jrjsmrtn has quit [Ping timeout: 265 seconds]
theothornhill has quit [Remote host closed the connection]
theothornhill has joined #lisp
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #lisp
catt has joined #lisp
anticrisis has joined #lisp
geospeck has joined #lisp
nij has joined #lisp
skapate has joined #lisp
skapata has quit [Ping timeout: 272 seconds]
skapate is now known as skapata
geospeck has quit [Remote host closed the connection]
heisig has quit [Quit: Leaving]
lowryder_ has quit [Ping timeout: 240 seconds]
luni has joined #lisp
alfred188 has joined #lisp
lowryder_ has joined #lisp
Sauvin has quit [Remote host closed the connection]
Christ0pher has joined #lisp
root____2 is now known as MrFantastik
nij has quit [Quit: ERC (IRC client for Emacs 27.1)]
<jasom> jmercouris: only thing to remember with the loop FOR clause is that it *sets* the value, it does not make a new binding for each iteration
iskander- has joined #lisp
<jasom> (mapcar #'funcall (loop for i from 1 to 10 collect (lambda () i))) ;-> (11 11 11 11 11 11 11 11 11 11)
<jasom> compare to (mapcar #'funcall (loop for i from 1 to 10 collect (let ((i i)) (lambda () i))))
orivej has quit [Ping timeout: 240 seconds]
iskander has quit [Ping timeout: 264 seconds]
Josh_2 has joined #lisp
<Josh_2> Hey, I am pretty sure I read a paper or blog post by someone in here regarding random testing?
iskander has joined #lisp
<Xach> Josh_2: pfdietz has done a lot of work on the topic but i don't know of a paper or blog post about it by him.
<Josh_2> I think thats the fella
iskander- has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
pfdietz has joined #lisp
iskander- has joined #lisp
iskander has quit [Ping timeout: 258 seconds]
aartaka has quit [Ping timeout: 272 seconds]
xificurC has joined #lisp
mmohammadi9812 has quit [Remote host closed the connection]
mmohammadi9812 has joined #lisp
carkh has joined #lisp
tgbugs has quit [Ping timeout: 240 seconds]
mpontillo_ is now known as mpontillo
<xificurC> is it possible to create an object that for all intents and purposes behaves like <X> but also has other capabilities? <X> = anything, e.g. string or list. E.g. I have a string holding a preprocessor template and depending on some configuration I later have to decide how to export it (escaped or not). I thought attaching the fact that it is a
<xificurC> template as metadata would be a nice solution, since the exporter can get other, non-templaty strings as well.
<xificurC> wrapping it in a special object deprives the rest of the code accessing that string as a string, which it really is
<Bike> sounds like subclassing. you can't subclass string or list, though.
rogersm has quit [Quit: Leaving...]
<Nilby> I made my own string class, but it's a lot of work, since it's below the "bolted on".
cods has quit [Ping timeout: 264 seconds]
cods has joined #lisp
<xificurC> Bike you're right, it is subclassing basically. Thanks for the answers. I won't push against a wall then
<xificurC> I thought it might be simple or that mop might allow it
theothornhill has quit [Ping timeout: 264 seconds]
tgbugs has joined #lisp
luni has quit [Quit: Connection closed]
<anticrisis> Should this print without the SBCL version banner? echo '(write-line "Hello world")' | sbcl --no-sysinit --no-userinit --noprint --noinform
<Bike> yeah so that ties in with the sort of confusing way sbcl command line options work
<Bike> you need to specify --noinform before before the other options
<Bike> because, when you run sbcl, you run the sbcl _runtime_, which loads the sbcl image which starts the sbcl _toplevel_, and then you can put options the user program can get at
<Bike> --noinform is an option for the runtime while the others are options for the toplevel
<Josh_2> is the :report keyword (when defining conditions) basically a shortcut for print-object
<Bike> so, when you put --no-sysinit first, it thinks you haven't specified any runtime options, and --noinform is not a toplevel option so it's treated as a user option (I think)
<Bike> Josh_2: yes. the clhs page gives the particular equivalence
<anticrisis> Oh wow, and I was reading the man page
<anticrisis> Nice, thank you
<Bike> it's in the man page, though it's not a super detailed explanation
<anticrisis> it might be nice to add to sbcl --help
<Bike> i suppose the "Usage:" line in sbcl --help is supposed to indicate it
<Bike> but --help is necessarily pretty brief
<Bike> doesn't even mention noinform, huh
<anticrisis> right :)
<anticrisis> I just wanted to time it against the equivalent `node -e` to look at startup time
hiroaki has quit [Remote host closed the connection]
<_death> xificurC: you could keep a hash-table associating that object with whatever you want.. you can have it weakly keyed
<xificurC> startup time compared to node is really unfair
<anticrisis> unfair to node?
hiroaki has joined #lisp
<xificurC> yes, it's like comparing the fattest kid from the school to, well, any other kid
theothornhill has joined #lisp
<xificurC> _death then it's a hash table, not a string anymore
<anticrisis> I like to tease my node friend now and then
h4ck3r9696 has joined #lisp
<White_Flame> your object is a key to the metadata table, instead of the metadata being on the object itself
<_death> xificurC: no, you just use the hash-table to associate information with the object.. you pass the string as-is, and when you need to make a decision based on that information you check the hash-table.. but it could get tricky with mutable objects
<White_Flame> of course, the object should be a heap object, too. if you have a fixnum or character or whatever, you're not going to be identifying that specific instance of that value, because it's not reified
theothornhill has quit [Ping timeout: 258 seconds]
<_death> White_Flame: right
<xificurC> ah, that makes sense and might be a viable alternative. Thanks _death and White_Flame
<White_Flame> it's better than making everything inherit from my-object which piles on all the custom doodads you want on your stuff :-P
<White_Flame> which is what you tend to end up with many other languages
<xificurC> White_Flame I'd just put a hash-table in for storing metadata. It's a bit more convenient than having the metadata spread out in multiple hash tables, but it does the job
nij has joined #lisp
<_death> you could have an object-plist (generalizing symbol-plist) accessor, sure.. with the caveats mentioned
VincentVega has joined #lisp
pfdietz has quit [Ping timeout: 240 seconds]
aindilis has joined #lisp
caret has quit [Read error: Connection reset by peer]
pfdietz has joined #lisp
[d] has joined #lisp
VincentVega has quit [Quit: Connection closed]
xificurC has quit [Quit: Connection closed]
cage_ has quit [Quit: Leaving]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #lisp
Nilby has quit [Ping timeout: 258 seconds]
shka_ has quit [Ping timeout: 240 seconds]
red-dot has joined #lisp
liberliver has quit [Quit: liberliver]
liberliver1 has joined #lisp
nij has left #lisp ["ERC (IRC client for Emacs 27.1)"]
hnOsmium0001 has left #lisp [#lisp]
liberliver1 has quit [Ping timeout: 276 seconds]
<Josh_2> If you kill a thread with destroy-thread I assume that (unwind-protect ..) doesn't matter?
h4ck3r9696 has quit [Quit: Leaving.]
narimiran has quit [Ping timeout: 240 seconds]
<no-defun-allowed> It will not unwind, no.
<Josh_2> Is there a portable version of SBCL's Timer subsystem?
Christ0pher has quit [Ping timeout: 240 seconds]
<no-defun-allowed> I think a better idea is to interrupt the thread with a function which attempts to unwind, maybe by wrapping MAKE-THREAD so that the thread function is run in a dynamic environment with e.g. a CATCH tag or a handler for some error type. (Or can you (invoke-restart 'abort) in other threads?)
<Bike> restarts are part of the dynamic context, so they're not copied for new threads
<no-defun-allowed> https://github.com/no-defun-allowed/bailout/blob/master/Code/job.lisp#L45 is an overengineered implementation of that idea.
<Bike> but implementations usually establish an ABORT or ABORT-THREAD restart in all threads
<Bike> on sbcl for example, every thread function has an implicit (catch 'sb-thread::%abort-thread ...) around its body, and then when you abort it just throws, which naturally unwinds everything
<Josh_2> no-defun-allowed: I normally just set a variable some place and the thread shuts itself down
<no-defun-allowed> Right, then you could get stuck if the threads get stuck somehow. But the alternative is that, by unwinding, you could still violate the expectations the code author had w.r.t control flow, and break something.
<Josh_2> if the threads get stuck the threads generally get yeeted
<no-defun-allowed> (This is, in part, why the capability is only sent to the supervisor when something goes wrong.)
<Josh_2> give 'em five seconds then yeet em
<Josh_2> anyway I don't need to do that if there is a nice library that'll let me run a function in a thread every X amount of time
<Josh_2> Trivial-timers :P
ukari has quit [Remote host closed the connection]
<no-defun-allowed> Assuming your function returns instantaneously, (bt:make-thread (lambda () (loop until stopped? do (f) (sleep x)))) is pretty close.
<no-defun-allowed> Adjusting the sleep time is an exercise for the reader.
ukari has joined #lisp
<no-defun-allowed> Oh, also locking or CASing the stopped? variable, so that you don't get weird looks.
<Josh_2> make it an object and use metalock
<Josh_2> problem solved
aindilis has quit [Ping timeout: 240 seconds]
<Josh_2> huh I just tried to quickload :trivial-timers and it failed
<Josh_2> well rip I'll just do it myself
<no-defun-allowed> I wonder what those locks are supposed to achieve.
<Josh_2> what locks?
h4ck3r9696 has joined #lisp
<no-defun-allowed> In metalock, specifically because they only make slot-value and (setf slot-value) atomic.
<Josh_2> yes
<Josh_2> well no it makes slot-value-using-class atomic
<no-defun-allowed> Usually I find myself wanting to have exclusive access to slots for a while, e.g. with-lock-held. You could do unconditional sets with metalock, but you couldn't e.g. implement a counter properly.
<Bike> no read-modify-write?
<no-defun-allowed> That's the other option, yes.
<Josh_2> anyway, it works as intended :P
<no-defun-allowed> decentralise2 has a "locked box" structure for those kinds of things.
dbotton has quit [Quit: This computer has gone to sleep]
<Josh_2> metalock has a metaclass for those kinds of things :P
<no-defun-allowed> You can implement counters with a locked-box: https://gitlab.com/cal-coop/netfarm/cl-decentralise2/-/blob/master/Code/Utilities/thread-box.lisp
<Bike> docstring really inspiring confidence here
<no-defun-allowed> Empirically, it did work, but it's slow for concurrent access of course.
<Bike> anyway, yeah, i wonder what the author of metalock is thinking. are there interesting thread safe data structures that don't need at least a RMW?
<Josh_2> RMW?
<_death> no-defun-allowed: but (incf (box-value box)) exposes a race condition
<Bike> read-modify-write
h4ck3r9696 has quit [Quit: Leaving.]
<no-defun-allowed> _death: Correct, use (with-unlocked-box (v box) (incf v))
<Josh_2> Bike: I simply didn't want to have to call with-held-lock, thats all xD
<no-defun-allowed> Perhaps (setf box-value) is a worse idea than box-value, but if your idea of concurrency is that of Josh_2, then it'll work fine. :D
<_death> no-defun-allowed: so I'm not sure what the point of a box is? associate a lock with a value?
<Bike> Josh_2: you don't understand what i'm saying. If you can only read or write slots, you cannot safely do things as simple as increment a counter.
<Bike> Josh_2: If you read a slot and then write it, another thread could try to increment the slot value between those two operations, and then your write would undo that.
<Josh_2> yes
<no-defun-allowed> _death: Exactly that. And that it's harder to get at the value without locking.
<Bike> okay, so what is that actually good for?
<Josh_2> Not doing that
<Bike> But what ARE you doing
<Josh_2> Literally not having to called "with-lock-held"
<Bike> I am asking what kind of thread safe algorithms don't need RMW or anything. I am curious.
<no-defun-allowed> If you make (box <blah> :copier #'identity), then (modify! (box-value <that box>)) then it's game over, but it has made foot-shooting in concurrent programs a bit harder for me.
<no-defun-allowed> I'm pretty sure it's only good for sharing "should I stop now?" variables which are set unconditionally.
<_death> I think these things evolved into STM, which supports transparent composition.. (the other way is message passing)
<Josh_2> generally I have just used it for a top level object that holds various other structures, such as a 'server' class etc
<Bike> But what do you do with them if you can't write modifications back safely?
<no-defun-allowed> I wasn't aware of STM when I started writing decentralise2, and I don't know how it would interact with hash tables, for example.
<_death> no-defun-allowed: for counters and flags like that, atomic operations seem to work
<Josh_2> I don't know what you mean
<no-defun-allowed> You could have an ABA problem with metalock.
<Bike> I don't understand what you're doing with the lcoks. In what situation would you want a "with-lock-held" as you put it to begin with?
<Bike> I'm just asking what kind of synchronization you're actually doing.
<Josh_2> a access is wrapped by a reader writer lock
<Bike> i know what a rw lock is. i am asking about the higher level design.
<Josh_2> what higher level design, there isn't any
<Bike> I mean, look. Say I have an application with a bunch of threads. Each thread does some work and then increments a counter when its done. The main thread polls the counter to display a progress bar and then exits when it's maximized.
<Bike> That's a higher level design. I think it's pretty simple but metalock can't do it. So I'm just kind of curious what sort of design you would use it for instead.
<Josh_2> all that library does is change the default behaviour slot-value-using-class so that it performs It's read/write with a writer lock
pfdietz has quit [Quit: Connection closed]
<Josh_2> or reader lock, it doesn't guarantee anything
<no-defun-allowed> Exactly.
<Josh_2> It's not meant to guarantee anything other than you won't read/write at the same time
gaqwas has quit [Ping timeout: 258 seconds]
<no-defun-allowed> What can you achieve if it doesn't guarantee anything else?
<_death> but blindly holding a lock when writing something doesn't get you much
<no-defun-allowed> Suppose you have two threads A and B which run (setf (some-locked-thing) (1+ (some-locked-thing)), and (some-locked-thing) evaluates to 1 to start with.
<Josh_2> yes
<no-defun-allowed> One order of events is A reads 1, B reads 1, B sets 2, A sets 2. You want to lock for the whole SETF form, so that the whole computation is atomic.
attila_lendvai has quit [Ping timeout: 258 seconds]
<no-defun-allowed> (i.e that it must be A reads 1, A sets 2, B reads 2, B sets 3, or that but with A and B swapped.)
<Josh_2> Literally just guarantees that two threads wont write a slot at the same time
<Bike> Yes but why. Why does it guarantee that and not more. What does that guarantee get you? What is it useful? I can't think of any thread coordination algorithms that only need that guarantee. That's what I'm asking. I don't understand what the usecase is. I understand what the guarantee is and you don't need to repeat that.
<Josh_2> I have personally found it quite useful
<Bike> for what?
<_death> we have https://cliki.net/stmx .. though right now as I tried to load it, it got "stuck" until I C-c C-c'd, and at that point it resumed.. gasp
<Bike> i remember that one did some pretty in depth sbcl stuff for the hardware STM
<Bike> maybe it's out of date
<Bike> er, hardware TM
<_death> last commit was not long ago.. deleting the fasls it does the same, seems reproducible
<_death> <WARN> [00:22:22] stmx.lang thread.lisp (detect-thread-support fun5) - Warning: compiling STMX without multi-threading support. reason: (BORDEAUX-THREADS:JOIN-THREAD (BORDEAUX-THREADS:MAKE-THREAD ...)) signaled an exception: inconsistent form-number-translations
<Bike> what does that inconsistent form-number-translations thing actually mean? i get it in sbcl a lot
<Bike> for non-stmx reasons. something about M-.?
<_death> Bike: yeah, I sometimes get that as well with recent SBCLs
<Bike> also, i hope bordeaux threads provides a better way to check thread support than that
<_death> Bike: yeah, it happened when I tried to go to source in the debugger
<Bike> https://github.com/cosmos72/stmx/blob/209241acec51b5aaeac321d4cdad629f2190ba04/lang/thread.lisp#L92-L102 yeah, this doesn't seem great. shouldn't it be (or warning error) or something?
<Bike> i mean, in addition to that bt should have something. maybe the new api will
<_death> right, it handler-case on condition
<no-defun-allowed> Josh_2: that's only of any use for unconditional writes though, and it's of no use for exclusive access to mutable data.
<_death> changing to (or warning error) does not help join-thread there for some reason.. but calling (stmx.lang::detect-thread-support) just works.. strange
<_death> *evaluating in the repl
<Josh_2> no-defun-allowed: yes
<_death> ah, it could be the eval-always.. it does that while being compiled
pillton has joined #lisp
<_death> it makes no sense to test for this while being compiled.. let me try :load-toplevel :execute
<_death> much better.. loads fine and stmx.lang::*feature-list* looks good
specbot has quit [Remote host closed the connection]
minion has quit [Remote host closed the connection]
minion has joined #lisp
specbot has joined #lisp
<_death> hmm, but then it miscompiles start-thread etc. geez
<_death> best to just remove that test and assume sanity :x
ebrasca` has quit [Remote host closed the connection]
Inline has quit [Ping timeout: 258 seconds]
galex-713 has quit [Ping timeout: 272 seconds]
bilegeek has quit [Remote host closed the connection]
bilegeek_ has joined #lisp
galex-713 has joined #lisp
vegansbane696 has quit [Remote host closed the connection]
ukari has quit [Remote host closed the connection]
Inline has joined #lisp
amb007 has quit [Ping timeout: 240 seconds]
vegansbane696 has joined #lisp
Inline has quit [Ping timeout: 256 seconds]
lalilulelo has joined #lisp
igemnace has joined #lisp
random-nick has quit [Ping timeout: 264 seconds]
gxt has quit [Ping timeout: 268 seconds]
rgherdt has quit [Ping timeout: 264 seconds]
hjudt has quit [Quit: leaving]
gxt has joined #lisp
hjudt has joined #lisp
theothornhill has joined #lisp
amb007 has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 265 seconds]
dbotton has joined #lisp
gxt has quit [Remote host closed the connection]
v3ga has quit [Ping timeout: 264 seconds]