jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
aeth has quit [Ping timeout: 248 seconds]
Inline has joined #commonlisp
aeth has joined #commonlisp
random-nick has quit [Ping timeout: 276 seconds]
igemnace has joined #commonlisp
karlosz has joined #commonlisp
xaotuk has quit [Ping timeout: 240 seconds]
Inline has quit [Ping timeout: 260 seconds]
xaotuk has joined #commonlisp
karlosz has quit [Quit: karlosz]
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
waleee has quit [Quit: WeeChat 3.5]
waleee has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
pjb has quit [Ping timeout: 248 seconds]
igemnace has quit [Remote host closed the connection]
igemnace has joined #commonlisp
dre has joined #commonlisp
Bike has quit [Quit: Connection closed]
akoana has joined #commonlisp
ldb has quit [Remote host closed the connection]
ec has quit [Quit: ec]
ebrasca has quit [Remote host closed the connection]
dilated_dinosaur has quit [Ping timeout: 246 seconds]
dilated_dinosaur has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
jack_rabbit has joined #commonlisp
knusbaum has quit [Ping timeout: 276 seconds]
leeb has quit [Ping timeout: 276 seconds]
leeb has joined #commonlisp
ec has joined #commonlisp
NotThatRPG has joined #commonlisp
Bike has joined #commonlisp
Inline has joined #commonlisp
notzmv has joined #commonlisp
triffid has quit [Ping timeout: 240 seconds]
triffid has joined #commonlisp
euandreh has quit [Ping timeout: 250 seconds]
waleee has quit [Ping timeout: 240 seconds]
hashfunc65d has quit [Ping timeout: 260 seconds]
euandreh has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pranavats has joined #commonlisp
igemnace has quit [Remote host closed the connection]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
Jach has quit [Remote host closed the connection]
Jach has joined #commonlisp
<beach> Good morning everyone!
Inline has quit [Quit: Leaving]
yauhsien has quit [Remote host closed the connection]
Inline has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
attila_lendvai_ has joined #commonlisp
semz_ has joined #commonlisp
semz has quit [Ping timeout: 248 seconds]
slowButPresent has quit [Quit: leaving]
tyson2 has quit [Remote host closed the connection]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 246 seconds]
X-Scale` is now known as X-Scale
vats has joined #commonlisp
Bike has quit [Quit: sleep]
aeth has quit [Ping timeout: 260 seconds]
Inline has quit [Quit: Leaving]
aeth has joined #commonlisp
attila_lendvai_ has quit [Read error: Connection reset by peer]
thonkpod_ has quit [Ping timeout: 250 seconds]
thonkpod_ has joined #commonlisp
attila_lendvai_ has joined #commonlisp
jeosol has quit [Quit: Client closed]
jmes has quit [Remote host closed the connection]
<jackdaniel> typical rust programmer: I use rust, typical c programmer: I go fast, typical lisp programmer: I'm not dead yet
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 248 seconds]
dre has quit [Remote host closed the connection]
vats has quit [Ping timeout: 246 seconds]
igemnace has joined #commonlisp
Inline has joined #commonlisp
jmes has joined #commonlisp
frgo has quit [Ping timeout: 248 seconds]
kiki_lam1 has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
Inline has quit [Remote host closed the connection]
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
Inline has joined #commonlisp
Cymew has joined #commonlisp
kiki_lamb has joined #commonlisp
anticomputer_ has quit [Ping timeout: 240 seconds]
kiki_lamb has quit [Ping timeout: 248 seconds]
ec has quit [Ping timeout: 240 seconds]
triffid has quit [Ping timeout: 240 seconds]
gxt has quit [Ping timeout: 240 seconds]
MajorBiscuit has joined #commonlisp
Algernon69 has joined #commonlisp
pjb has joined #commonlisp
shka has joined #commonlisp
kiki_lamb has joined #commonlisp
CodeBitCookie[m] has quit [Quit: Bridge terminating on SIGTERM]
nosolls has quit [Quit: Bridge terminating on SIGTERM]
Gnuxie has quit [Quit: Bridge terminating on SIGTERM]
autrim64[m] has quit [Quit: Bridge terminating on SIGTERM]
kakuhen has quit [Quit: Bridge terminating on SIGTERM]
aartaka has quit [Ping timeout: 256 seconds]
icepic1984[m] has quit [Quit: Bridge terminating on SIGTERM]
yosef36 has quit [Quit: Bridge terminating on SIGTERM]
joe_fen[m] has quit [Quit: Bridge terminating on SIGTERM]
infra_red[m] has quit [Quit: Bridge terminating on SIGTERM]
Mrtn[m] has quit [Quit: Bridge terminating on SIGTERM]
yitzi has quit [Quit: Bridge terminating on SIGTERM]
rodentrabies[m] has quit [Quit: Bridge terminating on SIGTERM]
char[m] has quit [Quit: Bridge terminating on SIGTERM]
dieggsy has quit [Quit: Bridge terminating on SIGTERM]
Duuqnd has quit [Quit: Bridge terminating on SIGTERM]
<pjb> seok: singlep multiple-word-predicate-p but beware, there's the nuance that vector-singlep where the root name of the predicate is singlep, and vector- is just a prefix. For example: string-lessp it's not a (string-less (without string) -p redicate), it's a string- (lessp redicate). There could be a real-lessp or a generic lessp.
opcode has quit [Ping timeout: 240 seconds]
kiki_lamb has quit [Ping timeout: 246 seconds]
dieggsy has joined #commonlisp
opcode has joined #commonlisp
anticomputer has joined #commonlisp
aartaka has joined #commonlisp
triffid has joined #commonlisp
ec has joined #commonlisp
gxt has joined #commonlisp
pjb has quit [Ping timeout: 240 seconds]
kiki_lamb has joined #commonlisp
Mrtn[m] has joined #commonlisp
Gnuxie has joined #commonlisp
yitzi has joined #commonlisp
Duuqnd has joined #commonlisp
kakuhen has joined #commonlisp
CodeBitCookie[m] has joined #commonlisp
autrim64[m] has joined #commonlisp
char[m] has joined #commonlisp
infra_red[m] has joined #commonlisp
rodentrabies[m] has joined #commonlisp
yosef36 has joined #commonlisp
nosolls has joined #commonlisp
joe_fen[m] has joined #commonlisp
icepic1984[m] has joined #commonlisp
scymtym has joined #commonlisp
kiki_lamb has quit [Ping timeout: 256 seconds]
ttree has quit [Ping timeout: 276 seconds]
kiki_lamb has joined #commonlisp
kahve has joined #commonlisp
leeb has quit [Ping timeout: 276 seconds]
kiki_lamb has quit [Ping timeout: 248 seconds]
leeb has joined #commonlisp
aeth has quit [Ping timeout: 256 seconds]
akoana has quit [Quit: leaving]
aeth has joined #commonlisp
treflip has joined #commonlisp
Brucio-61 has joined #commonlisp
kiki_lamb has joined #commonlisp
kiki_lamb has quit [Ping timeout: 256 seconds]
rotateq has joined #commonlisp
_Posterdati_ has joined #commonlisp
Posterdati has quit [Ping timeout: 256 seconds]
pranavats has left #commonlisp [Error from remote client]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
_Posterdati_ has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
Posterdati has joined #commonlisp
kiki_lamb has joined #commonlisp
xaotuk has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
treflip has quit [Remote host closed the connection]
aartaka has joined #commonlisp
kiki_lamb has quit [Ping timeout: 248 seconds]
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #commonlisp
karrq has joined #commonlisp
varjag has joined #commonlisp
kiki_lamb has joined #commonlisp
Dynom has joined #commonlisp
razetime has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
kiki_lamb has quit [Ping timeout: 256 seconds]
adlai has joined #commonlisp
<adlai> contrapunctus: did nobody bite your question about CRDTs?
<adlai> fwiw, you can roll your own CRDTs without too big a headache; the trouble, in my experience, is always interoperating with previously-existing ones.
<adlai> e.g., if you are reinventing blockchains, just (ql:quickload 'ironclad) and rock on; if you are interoperating with ethereum, lascherre ogni speranza...
<adlai> the irclog.tymoon.eu viewer is still operated by Shinmera ?
<Shinmera> I guess?
<adlai> someone might wanna update /topic with an early alert for whichever conference next has a call-for-papers deadline.
<adlai> Shinmera: cool, thank you for providing this public service; and my question is, again, about the search function.
<Shinmera> "again"?
* adlai recalls bugging you about it, a few years ago; different issue this time.
<adlai> it does not work, whatsoever, from w3m; I've not tested other similar minimal browsers.
<Shinmera> Uh. Ok. I don't really care about weird browsers like that. It's just an HTML form though so idk what they're doing.
<adlai> my inclination, instead of going down the line of text-only browsers, is simply to read the clientside code and send whatever kind of request it wants using drakma.
<adlai> ok, so I think it's a reasonable plan.
kiki_lamb has joined #commonlisp
<adlai> so, contrapunctus , in case your question about "CRDT library" encompasses interoperating with existing blobs: I did once, in a fit of anger, write a monster macro that snarfs `bitcoin-cli help` and barfs a package of RPC wrappers.
<adlai> it is as dangerously almost-useless as it sounds from my description.
<adlai> e.g., some programmer changing the text convention of how the RPC arguments are documented, would break it silently, yet there's a chance it'd still compile cleanly.
<adlai> if you need this kind of rubberhose idiocy, it's the files under #p"src/bitcoin/" in the cjhunt repo, from my github account.
* adlai won't even link, it is that bad
kiki_lamb has quit [Ping timeout: 248 seconds]
<contrapunctus> adlai: I don't need to interop with existing systems right now, since it's just for my own application(s). I've been reading the CRDT paper, and I guess I'll write my own library for it, if there's no existing one...
<adlai> well, remember why you are using it; if you require zero chance of conflicts, ever, rather than merely FLOATING-POINT-UNDERFLOW-ERROR risk of conflicts, then any possible divergence of your program from preexisting implementations must be deterministic.
kevingal has joined #commonlisp
kevingal has quit [Ping timeout: 252 seconds]
<adlai> as for our earlier conversation about facial expressions: I'm fortunate enough to have reasonably typical ability to recognize these, although it simply adds overhead to require that a human's entire emotional spectrum be considered while reading technical text.
analogsalad has joined #commonlisp
kevingal has joined #commonlisp
<adlai> imagine if authors of monographs included emojis in each paragraph describing the false starts of subsequently disproven theories.
<adlai> maybe this could be cute for audiobooks played to schoolchildren, who may need something emotionally shepherding them back to the topic; yet it's quite tedious when you're an adult, focusing on technical topics.
<adlai> speaking of topics, I'm the worst offender! thank you for your attention and patience.
notzmv has quit [Ping timeout: 250 seconds]
yauhsien has joined #commonlisp
* adlai places here a reminder, perhaps mostly only for himself, that the logger linked from the /topic does not publish /part messages
semz_ is now known as semz
yauhsien has quit [Ping timeout: 248 seconds]
kiki_lamb has joined #commonlisp
jmdaemon has quit [Ping timeout: 250 seconds]
kiki_lamb has quit [Ping timeout: 248 seconds]
analogsalad has quit [Quit: bye]
pranavats has joined #commonlisp
pjb has joined #commonlisp
kiki_lamb has joined #commonlisp
pranavats has left #commonlisp [#commonlisp]
kiki_lamb has quit [Ping timeout: 248 seconds]
<bollu> If I have a list variable, how do I append another list to it? It seems like nconc messes up if the list variable starts out empty!
<jackdaniel> bollu: (setf my-variable (append my-variable another-list))
<jackdaniel> or (setf my-variable (nconc my-variable another-list)) if you really really must
Lord_of_Life_ has joined #commonlisp
kiki_lamb has joined #commonlisp
<bollu> jackdaniel isn't that expensive/wasteful? :(
<jackdaniel> how is this wasteful and expensive?
<jackdaniel> btw, alexandria has: (appendf my-list another-list)
<adlai> if you're worried enough about performance to use nconc, and you don't know whether your list is non-empty yet, then you probably want one of the LOOP keywords instead.
Lord_of_Life has quit [Ping timeout: 246 seconds]
<jackdaniel> if you are worried about performance then you should probably change the data structure to avoid appending lists in the first place
<bollu> jackdaniel that's fair. I'm not "worried" per se, but I don't want to write obviously poor code (in terms of asymptotics)
<bollu> so what data structure should I use? vector?
<jackdaniel> I don't know what you are working on
<jackdaniel> different structures are good for different things
<adlai> ehhhhh, lists are convenient enough that efficient handling of them is not completely useless
<adlai> clhs 6.1.3
Lord_of_Life_ is now known as Lord_of_Life
MajorBiscuit has quit [Ping timeout: 256 seconds]
<jackdaniel> bollu: my advice is to care about writing fast code when convenient, but to not obscure the program unless you've profiled the program and found the bottleneck
<adlai> bollu: CLHS/6.1.3 will help you for accumulating lists within a loop; it will not help you for accumulating into specialized arrays, which is probably what jackdaniel is suggesting.
<jackdaniel> adlai: appending with loop of two lists will be no more performant than using nconc
<jackdaniel> I'm not suggesting accumulating into specialized arrays, I'm suggesting (setf foo (append foo bar))
<beach> bollu: As jackdaniel hinted, the way you design your representation is to first figure out what kind of operations you want. Then you can often determine what low-level representation to use. But without the operations, no advice can be given.
<adlai> jackdaniel: what I'm imagining as the worst possible result is someone hand-optimising code that preallocates specialized vectors etc... and then hands them directly to their only consumer, some graph theory junk-in-progress that converts everything to lists anyways.
<jackdaniel> bollu: as Peter Norvig said: Common Lisp is a perfect language to write fast programs and it is a perfect language to write programs fast
kiki_lamb has quit [Ping timeout: 260 seconds]
<adlai> isn't learning to use CL:LOOP the best way to meet both of those goals ?
<jackdaniel> I don't see how cl:loop could optimize here anything (so I consider your advice bogus from the start)
adlai has left #commonlisp [quietly]
<jackdaniel> bollu: regarding why I'm advising to use append instead of nconc - if there is no particular need for mutating data then leave it be; you won't accidently modify a list that is also stored somewhere else
<bollu> jackdaniel yep, alright. Will use `append` for now, in that case.
razetime has quit [Ping timeout: 260 seconds]
yagamisato has quit [Ping timeout: 276 seconds]
MajorBiscuit has joined #commonlisp
<_death> append of two lists takes time linear in proportion to the number of elements of the first.. so (i) make sure you're ok with that (ii) if you don't mind the order, pass the one likely to be the shortest first
random-nick has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
yagamisato has joined #commonlisp
Oddity has quit [Ping timeout: 260 seconds]
razetime has joined #commonlisp
treflip has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
kiki_lamb has joined #commonlisp
xaotuk has quit [Ping timeout: 248 seconds]
kiki_lamb has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
sander has quit [Ping timeout: 246 seconds]
kiki_lamb has joined #commonlisp
ec has quit [Ping timeout: 240 seconds]
kiki_lamb has quit [Ping timeout: 252 seconds]
<semz> I seem to recall that there was a project to get parallel ASDF builds working. Does anyone know what its state is?
rgherdt has joined #commonlisp
rgherdt_ has quit [Ping timeout: 248 seconds]
aeth has quit [Ping timeout: 248 seconds]
Sankalp has joined #commonlisp
aeth has joined #commonlisp
kiki_lamb has joined #commonlisp
ec has joined #commonlisp
kiki_lamb has quit [Ping timeout: 260 seconds]
notzmv has joined #commonlisp
slowButPresent has joined #commonlisp
Bike has joined #commonlisp
vats has joined #commonlisp
EsoAlgo has quit [Quit: The Lounge - https://thelounge.chat]
EsoAlgo has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
kiki_lamb has joined #commonlisp
kiki_lamb has quit [Ping timeout: 260 seconds]
epolanski has joined #commonlisp
xaotuk has joined #commonlisp
vats has quit [Read error: Connection reset by peer]
kevingal has quit [Ping timeout: 248 seconds]
kevingal has joined #commonlisp
kiki_lamb has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.4]
ec has quit [Ping timeout: 240 seconds]
aartaka has quit [Ping timeout: 260 seconds]
kiki_lamb has quit [Ping timeout: 246 seconds]
cage has joined #commonlisp
ec has joined #commonlisp
kiki_lamb has joined #commonlisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.3)]
yagamisato has quit [Ping timeout: 260 seconds]
karrq_ has joined #commonlisp
karrq has quit [Ping timeout: 248 seconds]
szkl has joined #commonlisp
waleee has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has joined #commonlisp
yagamisato has quit [Changing host]
dlowe has joined #commonlisp
rotateq has quit [Remote host closed the connection]
kiki_lamb has left #commonlisp [#commonlisp]
aeth has quit [Ping timeout: 252 seconds]
aeth_ has joined #commonlisp
aeth_ is now known as aeth
<pjb> bollu: if you don't want to waste time on appending onto lists, then don't! Instead, push on the front! Use push. If the order of the elements matter, you may use nreverse at the end.
<pjb> bollu: this includes the case with appending lists, as long as the appendenda is smaller than the appended list.
Cymew has quit [Ping timeout: 276 seconds]
NotThatRPG has joined #commonlisp
<pjb> (setf my-list (append another-list my-list))
<pjb> or with order: (setf my-list (revappend another-list my-list))
yewscion has joined #commonlisp
<pjb> also, keep in mind that APPEND will produce a list that share structure with the last argument, so you may prefer to use concatenate 'list to produce a result that is 100% entirely fresh.
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
<Shinmera> If any lispers are in Krakow May 16th-20th, hit me up!
montxero has joined #commonlisp
nature has joined #commonlisp
aeth has quit [Ping timeout: 248 seconds]
z4kz has joined #commonlisp
aeth has joined #commonlisp
nature has quit [Ping timeout: 260 seconds]
euandreh has quit [Ping timeout: 260 seconds]
ec has quit [Ping timeout: 240 seconds]
ec has joined #commonlisp
OlCe has joined #commonlisp
rotateq has joined #commonlisp
vats has joined #commonlisp
anticomputer has quit [Ping timeout: 240 seconds]
anticomputer has joined #commonlisp
azimut has joined #commonlisp
sander has joined #commonlisp
z4kz has quit [Quit: Client closed]
ebrasca has joined #commonlisp
theBlackDragon has quit [Ping timeout: 256 seconds]
theBlackDragon has joined #commonlisp
frgo has joined #commonlisp
euandreh has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
attila_lendvai has joined #commonlisp
miker2049 has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
guest74 has joined #commonlisp
pranavats has joined #commonlisp
<pvalenta> hello, I found this example about keyword parameters: (defun show-members (&key a b c d ) (write (list a b c d))) ...what if one of parameters valid value is nil? ...for example (show-members a: nil) ...How can I recognize if value is nil or parameter is missing? Thanks
<beach> pvalenta: User the SUPPLIED-P parameter.
<beach> pvalenta: See the definition of the lambda lists.
<beach> I suppose you mean that the ARGUMENT is missing, rather than the parameter, right?
<pvalenta> beach, yes, argument is missing
<rotateq> pvalenta: You can give after the default value for your keyword parameter the supplied-p symbol what beach mentioned. Like (&key (a nil a-supplied-p) b c d) to really check if A was given and not just uses the default value.
neirac has joined #commonlisp
<neirac> I'm trying to use clog but I'm getting this error when doing ql:load cd ~/common-lisp
<neirac> The archive file "clog-20220331-git.tgz" for "clog" is the wrong size: expected 10,028,907, got 1,658,880
<pvalenta> rotateq, that is clever, thanks
<Bike> neirac: maybe it was only partially downloaded?
<rotateq> pvalenta: I see it for me similar in terms of usefulness like the second value of GETHASH (a generalized boolean). One really knows from that if not the value for key is NIL, but if this key is already bound in the hash table.
<pvalenta> beach, when can I find these definitions? I am new to commonlisp and trying to find some good documentation. There is nothing about the definition of lambda lists here in this page: http://www.sbcl.org/manual/
<rotateq> pvalenta: This is the documentation for your documentation. :) The standard is documented in the HyperSpec: http://www.lispworks.com/documentation/HyperSpec/Front/
<beach> pvalenta: You wouldn't look in an implementation-specific document for standard Common Lisp definitions. Use the link provided by rotateq.
<rotateq> I would recommend starting with a good book like Practical Common Lisp which is also online readable: https://gigamonkeys.com/book/
<beach> clhs 3.4.1
<pvalenta> rotateq, beach, thank you both very much
<beach> pvalenta: That ^ link describes the ordinary lambda list.
<beach> Pleasure.
kevingal has quit [Remote host closed the connection]
neirac has quit [Ping timeout: 248 seconds]
analogsalad has joined #commonlisp
neirac has joined #commonlisp
pfd has quit [Ping timeout: 252 seconds]
treflip has quit [Remote host closed the connection]
<rotateq> pvalenta: Oh sorry, I did a mistake, I meant of course "This is the documentation for your implementation."
<pvalenta> rotateq, it's ok. I understood how it was meant :)
attila_lendvai has quit [Quit: Leaving]
attila_lendvai has joined #commonlisp
aartaka has joined #commonlisp
neirac has quit [Ping timeout: 246 seconds]
aeth has quit [Ping timeout: 248 seconds]
aeth has joined #commonlisp
razetime has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
morganw has joined #commonlisp
neirac has joined #commonlisp
<neirac> Bike, now it worked I just tried again, seems my network is not working correctly todaya
ebrasca has quit [Ping timeout: 260 seconds]
q3cpma has joined #commonlisp
<q3cpma> Hello, and sorry if that question is dumb, but what would be the most idiomatic way to emulate C++ templates (compile-time class change for select instances)?
<minion> q3cpma, memo from jmercouris: consider nfiles https://github.com/atlas-engineer/nfiles
<q3cpma> Use case would be to make a hash table where to bucket type can be switched between list and vector (and tree, maybe)
<Bike> hash tables don't have a bucket type. could you be more specific about what you need?
<q3cpma> They do if I make by own hash table
<Bike> you can put anything you want in a hash table without a forward type declaration
<Bike> how does your hash table implementation work that this isn't possible?
<rotateq> What does the term "bucket type" mean?
<q3cpma> The bucket type isn't what's inside the bucket
<Bike> okay, so what is it?
<q3cpma> Open addressing vs "buckets" (or chained hashing)
<q3cpma> You know, usual hash table implementation stuff
<Nilby> q3cpma: keep in mind you can use the whole language at compile time
<Bike> okay. i've never heard that referred to as "bucket type" before is all.
<q3cpma> Nilby: I know, but wrapping the entire file (defstruct/defclass and defuns) inside a macro is a bit dirty
<q3cpma> Bike: well, it may not be the "correct" term
<Bike> so you want the ability to specify what kind of implementation you want at compile time with something like a template parameter? Like in C++ it would be HashTable<OpenVector> or something?
<q3cpma> Well, I'm not that difficult, I just wonder what would be the less painful way to have that
<q3cpma> I know I can do it with macros, but that's not going to be pretty
neirac has quit [Ping timeout: 256 seconds]
<q3cpma> I see https://github.com/cosmos72/cl-parametric-types, but it's a bit dead because CL lacks a (standard?) way for the compiler to communicate type information during macro expansion time
<Bike> a lot of implementations support the cltl2 extension to do so, but it's not standard, no.
<Nilby> q3cpma: you don't have to wrap in macros, you can use dynmaic variables, or packages, etc.
<q3cpma> Nilby: but that'd be a cond/typecase for each function call, right?
<Bike> if i understand what you want correctly, my feeling is that lisp programs do not usually encode this kind of information into types.
<q3cpma> Indeed, I think I'll use macros to create hash-table/list, hash-table/vector, hash-table/bst, etc...
<guest74> I'm curious, what are you trying to do.  What is the use case?
<Bike> i can imagine some sorta exotic but standard solutions without types. for example, you could have (define-symbol-macro hash-table-implementation whatever), and then define your mgethash as a macro or with a compiler macro, that consults that information with (macroexpand-1 'hash-table-implementation env)
<q3cpma> For not using the builtin hash tables?
<Nilby> q3cpma: if you find yourself doing a typecase for every call, you can use methods
<Bike> that would involve no runtime dispatch, at least
<q3cpma> Nilby: indeed, and there are enough solutions to dispatch generic methods at build time, already
<q3cpma> Bike: Now that's the Lisp equivalent of spaghetti code if I've ever seen some =)
<Bike> it's probably going to be less spaghettiish than anything you could hack up with the type system.
<contrapunctus> q3cpma: I'm not entirely sure I understand what you want, but does LIL do it? https://github.com/fare/lisp-interface-library
<Bike> it is not built to express this kind of information. C++'s is because it's been used for that for decades.
<Bike> lisp types are conceptually attached to values rather than variables, so they don't work the same way, and probably can't be made to without some pain
<q3cpma> Bike: why? making distinct hash-table/<container> types then generic methods on those (using macros to avoid code duplication) and static-dispatch/fast-generic-functions will probably be alright
<Nilby> q3cpma: if you want to do it at compile time because of speed, with type decls compilers make the overhead for method calls very small
<Bike> the static dispatch libraries are much more complex than my code snippet.
<Bike> while working in essentially the same way: you attach some information to the environment, then retrieve this later in a macro or whatever.
<q3cpma> Anyway, my initial reason for making my own hash tables is that I want a simple but efficient thread-safe solution. Chained hashing with a rwlock per bucket > a single rwlock for the whole table
<q3cpma> Well, yeah, static-dispatch IS complex, but it does a lot
<Nilby> q3cpma: e.g. i use a whole generic sequence library including hash tables and never notice any performance difference
<q3cpma> Nilby: let's say that I find that more "correct", even before I have to optimize of whatnot
<Bike> static dispatch also doesn't work like c++ types, is what i meant. it's basically conceived of as an optimization, and thus kind of optional: though you can probably tell it to warn you or whatever if it does so, it can always fall back to runtime dispatch. this is of course not how c++ works.
<q3cpma> Bike: I know it's very different, but that's a potential solution to my problem
<Bike> could be, yeah. just trying to explain what i meant.
<q3cpma> Yeah, I do use C++17 at work, I "know" how different it is
<q3cpma> Though I wonder if https://github.com/marcoheisig/fast-generic-functions isn't cleaner
<dlowe> is the problem that you want to have different table structures or different table key types?
<q3cpma> Different table structures
<q3cpma> For example, SBCL uses open addressing
<q3cpma> Which is (probably) why locking is done on the whole table
<q3cpma> Thanks a lot for the help, guys, I'm out
neirac has joined #commonlisp
q3cpma has quit [Quit: leaving]
neirac has quit [Ping timeout: 260 seconds]
ttree has joined #commonlisp
PT has joined #commonlisp
neirac has joined #commonlisp
wmblathe_ has joined #commonlisp
wmblathers has quit [Ping timeout: 272 seconds]
tyson2 has quit [Remote host closed the connection]
guest74 has quit [Quit: Connection closed]
Algernon69 has quit [Ping timeout: 240 seconds]
epolanski has quit [Quit: Connection closed for inactivity]
rgherdt has quit [Ping timeout: 256 seconds]
rgherdt_ has joined #commonlisp
theBlackDragon has quit [Ping timeout: 248 seconds]
theBlackDragon has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
jcowan has joined #commonlisp
<jcowan> Other than macros, what are the (modern) applications of uninterned symbols?
<dlowe> they make good package specifiers
rgherdt has joined #commonlisp
kpoeck has joined #commonlisp
aeth has quit [Ping timeout: 276 seconds]
aeth has joined #commonlisp
<semz> sentinel values when nil is not an option
<dlowe> don't you want interned symbols for that
cage has quit [Quit: rcirc on GNU Emacs 27.1]
<dlowe> you wouldn't be able to compare them with anything
<semz> you can put the symbol into a variable
<bollu> I'm trying to learn how to use uiop:with-temporary-file
<bollu> The declaration string says
<bollu> with-temporary-file (&key stream pathname directory prefix suffix type keep direction element-type external-format) &body body
<bollu> how do I actually read that?
<semz> a local variable specifically, so that no input can contain the symbol
<bollu> (as in, what does &key mean, for example? which of the options are optional? which are key-value pairs?
<bollu> how do I use the API? :)
<dlowe> (with-temporary-file (:stream my-stream) (code-using-temp-file))
<dlowe> bollu: there should be a manual that says what the exact effects of each item are
<dlowe> bollu: but &key denotes keyword arguments which are specified by name like my example
<bollu> dlowe body also has a &body, but I don't see it being a keyword argument; what am I missing?
<bollu> Oh, is it that `&key` followed by <stuff> denotes list of possible keys?
<bollu> While `&body` denotes a body ?
<bollu> dlowe I would be very grateful if you could point me to the place that teaches me how to read these
theBlackDragon has quit [Ping timeout: 256 seconds]
orestarod has joined #commonlisp
<bollu> (with-temporary-file (:stream my-stream) (+ 1 2)) gives the error: The variable MY-STREAM is unbound.
<rotateq> bollu: The &BODY argument is normally the rest of your expression set of arbitrary length in a macro call.
theBlackDragon has joined #commonlisp
<NotThatRPG> bollu: &body == ((+ 1 2)) in your example
<dlowe> bollu: I was just giving an example
<NotThatRPG> bollu: Your example works for me
<dlowe> bollu: have you taken a look at the book Practical Common Lisp?
<dlowe> It can help you get oriented pretty fast, even if you don't finish the book
<NotThatRPG> bollu: See https://pastebin.com/piYMj6Vg
<bollu> NotThatRPG it seems the problem is related to namespaces
<bollu> (uiop:with-temporary-file (:pathname foo) (print foo)) works :)
<bollu> dlowe no, I have not
<NotThatRPG> bollu: ah, yes, that makes sense
<NotThatRPG> Common Lisp is different enough from other programming languages that trying to learn it will rely either on access to people nearby who can help you, or some reading. It's not going to be sufficient to do, e.g., what I did learning Python -- skim an article, start writing code, and just google when I couldn't figure something out.
<dlowe> there's also a lot less representation on stack overflow :p
<dlowe> though what there is, is excellent
<rotateq> dlowe: Many nice and well written answers by lispm (Rainer Joswig) for example.
Oddity has joined #commonlisp
<vats> bollu: As for &key in particular, see section 3.4.1.4 Specifiers for keyword parameters from CLHS. http://www.lispworks.com/documentation/HyperSpec/Body/03_dad.htm
karrq_ has quit [Ping timeout: 276 seconds]
<dlowe> rotateq: yeah, that's who I was thinking of :)
<dlowe> I used to answer CL questions on there but I was so outclassed I stopped :D
lispy has joined #commonlisp
<vats> bollu: Keywords are always optional. The var will get bound to nil if one omits an init-form.
<jackdaniel> that depends what do you mean by optional. One could write (defun foo (&key (a (error "req"))))
<jackdaniel> in fact that's often done for default initargs
<lispy> Hey guys, I saw a question asking why '`q evaluates to 'Q, not sure why, is it because once the backtick evaluates all that is inside its practically just a quote ? or am i missing smth here ? Thanks
yauhsien has joined #commonlisp
<vats> jackdaniel: It's as optional as &optional, I suppose? :D
<dlowe> lispy: backticks are identical to single quotes if there's no unquote operator (, or @,)
jmdaemon has joined #commonlisp
<dlowe> lispy: so ''q expands to (quote (quote q)) which evaluates to (quote q) which displays as 'q
<rotateq> lispy: First the ' is seen by the reader and leaves it unevaluated, and `q works like 'q in this case. It's like (quote (quote q)).
<lispy> hmm
<lispy> Okay, thanks
<rotateq> dlowe: That's the good thing of IRC, it's more dynamic and you can see if you've understood something yourself or where you may lack effort by then.
yauhsien has quit [Ping timeout: 260 seconds]
PT has quit [Quit: Leaving]
<bollu> does slime support "refactoring"? Something like "rename this symbol to something else"?
triffid has quit [Remote host closed the connection]
<rotateq> bollu: First of all a symbol stands for itself and then different meanings like a value or a function can be bound to that.
<bollu> rotateq Sorry, I was imprecise. Is there some functionality akin to "find all uses of this struct and rename it"?
<rotateq> You can say for example (setf (symbol-value 'foo) 'bar) or (setf (symbol-function 'foo) 'bar).
<rotateq> Ah so good training to be more precise. :)
<jackdaniel> bollu: no, slime doesn't help with that
<jackdaniel> it may query the image for information like "who calls my function" and usch
<vats> bollu: Symbols may be members of packages. One might want to rename symbol X in one package but not in another. It's difficult to determine which package a symbol belongs to just by its textual representation (since package suffix may be omitted). If you use package local nicknames, however, you can use regexps to do that.
<jackdaniel> vats: rotateq: state of the art ide toolkits usually are shipped with a fancy compiler that is used to analyze the code
<rotateq> jackdaniel: Is that what others call the future?
<jackdaniel> I'm not sure what do you mean. I think that in cl world the thing that would enable such things would be an editor as envisioned by beach (climacs2) which actually reads the code instead of simply parsing it
<vats> jackdaniel: I wonder if it'd be similar to how Dr. Racket can find occurences of bound variables.
<jackdaniel> I can imagine someone adding a symbol tracer to eclector, so it is possible to rename the same symbol (that would require further editor integration)
<vats> s/package\ suffix/package\ prefix :D
<bollu> jackdaniel so I take it that is not currently possible, but might be in the future once IDE tooling is built?
<jackdaniel> that's my understanding, yes
<jackdaniel> that said I don't know capabilities of lispworks and allegro editors, they may have such functionality already
<jackdaniel> I need to go to sleep now; good night \o
<rotateq> Sounds like a good idea, it's kind of time for me too.
OlCe has quit [Ping timeout: 256 seconds]
<bollu> night!
<bollu> Does common lisp have some kind of functionality like python docstring, where I don't need to escape double quotes?
<dlowe> No raw strings by default.
<rotateq> bollu: There's cl-interpol by Edi Weitz for some more flexibility: https://edicl.github.io/cl-interpol/
<rotateq> Do you need so many double quotes inside of simple strings?
kevingal has joined #commonlisp
<rotateq> bollu: So you can use the new #? readmacro and write #?'abc' or #?|abc| or even #?<abc> as seen in the examples and more like writing characters with their actual unicode names in the string. Double quotes will be escaped in the produced string.
Dynom has quit [Quit: WeeChat 3.5]
<bollu> rotateq neat, thanks for the pointer!
montxero` has joined #commonlisp
montxero has quit [Ping timeout: 256 seconds]
neirac has quit [Ping timeout: 248 seconds]
neirac has joined #commonlisp
neirac has quit [Ping timeout: 256 seconds]
tyson2 has joined #commonlisp
neirac has joined #commonlisp
OlCe` has joined #commonlisp
neirac has quit [Ping timeout: 248 seconds]
montxero` has quit [Ping timeout: 248 seconds]
montxero` has joined #commonlisp
neirac has joined #commonlisp
Algernon69 has joined #commonlisp
kpoeck has quit [Ping timeout: 252 seconds]
dmgk has quit [Quit: ZNC - https://znc.in]
dmgk has joined #commonlisp
lagash has quit [Ping timeout: 240 seconds]
dmgk has quit [Client Quit]
montxero` has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
lagash has joined #commonlisp
<bollu> Can I disable stdout/stderr in slime?
dmgk has joined #commonlisp
<bollu> As in, I want to interactively develop some command line applicatoin
<bollu> but it writes a shitton to stderr
<bollu> I want to suppress it while I debug the app
<Bike> you could bind *error-output* to (make-broadcast-stream)
<Bike> or do you mean like c stderr
analogsalad has quit [Quit: bye]
aartaka has quit [Ping timeout: 256 seconds]
dmgk has quit [Quit: ZNC - https://znc.in]
dmgk has joined #commonlisp
bitmapper has joined #commonlisp
orestarod has quit [Ping timeout: 248 seconds]
<lispy> when I call this func :
<lispy> (funcall (let ((test-dynamic 2))
<lispy>                     (lambda () test-dynamic))
<lispy> where test-dynamic is defined as 5, it prints 5
aartaka has joined #commonlisp
<lispy> shouldn't it be 2  since its still inside the closure ?
OlCe` has quit []
OlCe has joined #commonlisp
matt` has joined #commonlisp
n1to has joined #commonlisp
n1to has quit [Remote host closed the connection]
<mfiano> Common Lisp only has lexical closures. This is one reason it's important to use *earmuffs*
shka has quit [Ping timeout: 276 seconds]
<lispy> weird, I am reading let over lambda and I remember they mention that there are closures which arent lexical
<mfiano> There are not. It's a trick that makes it appear as such under certain conditions with a special symbol-macro-heavy macro.
aartaka has quit [Ping timeout: 256 seconds]
<mfiano> That book is not recommended for beginners.
<lispy> I read practical common lisp and wrote some stuff, I am a beginner still obviously but I am understanding most of the stuff in the book
<mfiano> And arguably experienced users. It makes use of many anti-patterns many people would frown upon.
<lispy> I dont see where the trick regarding macros is
<mfiano> LoL makes use of symbol macros and anaphors to seem like it "breaks open" closures.
<lispy> I haven't reached those chapters yet, its just normal closures, one moment
<mfiano> If you don't understand the how after reading it, I would skip this material for now.
matt` has quit [Remote host closed the connection]
pillton has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
<bollu> mfiano what is an anaphor?
<lispy> mfiano, I figured out what the problem was
<mfiano> anaphora are words like "it" or "he" that refer back to another subject.
<lispy> my mistake.
<mfiano> In CL terms, they are unhygienic macros.
<bollu> mfiano I see
<lispy> I guess here is the better question :
<lispy> (funcall (let ((test-dynamic 2))
<lispy>            (lambda () test-dynamic)))
<lispy> returns 5
<lispy> But
<lispy> (defun ret-test ()
<lispy>            test-dynamic)
<lispy> (let ((test-dynamic 2))
<lispy>            (ret-test))
<lispy> returns 2.. why ?
<mfiano> Please don't post code here.
<lispy> My mistake
<mfiano> Use a paste service.
Algernon69 has quit [Ping timeout: 252 seconds]
<lispy> I don't understand why using a lambda there makes a different, arent functions and lambdas supposed to be basically the same ?
<lispy> makes a difference*
<mfiano> Most of your confusion comes from not using earmuffs. dynamic variables are a stack of bindings and need to be discerned differently.
<semz> the value of dynamic variables depends on the context in which they're called. the (let ((test-dynamic 2)) ...) is already over when funcall starts, whereas it is still active during the call to ret-test
<lispy> oh wow, yeah that makes sense
<lispy> yeah, now I get it, what a dumb mistake, thanks everyone.
lispy has quit [Quit: Client closed]
yewscion has quit [Ping timeout: 248 seconds]
hashfunc65d has joined #commonlisp
xaotuk has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
ec has quit [Quit: ec]
pfd has joined #commonlisp
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
pfd has quit [Quit: Client closed]
morganw has quit [Remote host closed the connection]
neirac has quit [Ping timeout: 248 seconds]
<NotThatRPG> mfiano: You can have an anaphoric macro that is hygienic. IF-LET is an example; it's easy to implement that with a hygienic macro.
attila_lendvai has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
neirac has joined #commonlisp
kevingal has quit [Remote host closed the connection]
<bollu> what's recommended for task parallelism in common lisp?
<bollu> I have a list of data, and I want to spawn a thread to manipulate each datum in parallel
<sm2n> lparallel is pretty good
<sm2n> you get lparallel:pmap