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/>
<Josh_2> Hmm
<Josh_2> Is it practical to combine all of my metaclasses into 1 with 1 super metaclass which I use for describing the relationship of classes to postgres tables (only to list which keys are associated with which JSONB columns) while still retaining all of the additional functionality added with sub metaclasses :thinking:
<Josh_2> I can call (call-next-method) in compute-slots in order to have all the superclass compute-slots called right?
pve has quit [Quit: leaving]
<Josh_2> I dont feel like manually writing out the relationships between slots and JSONB columns so I can have my nice (update-in-db ..) macro :(
<Gnuxie> no and this is a case where metaclasses are being abused to add annotations to slots/classes in a way that isn't generic, which is a problem bc it's a pita to combine different metaclasses
<Josh_2> I thought that might be the case
euandreh has quit [Quit: euandreh]
<Josh_2> But metaclasses are supposed to be abused :sunglasses:
euandreh has joined #commonlisp
<Josh_2> I think annoyances with how slots are inherited would be the biggest pita
bilegeek_ has joined #commonlisp
<Gnuxie> there should just be one metaclass library for making generic annotations and injecting mixins
bilegeek has quit [Ping timeout: 260 seconds]
<Josh_2> :(
<Gnuxie> then ORM bs libraries can use that and if you need to annotate for other things like for JSON serialization, you won't' need another metaclass you just use the same generic annotation protocol
<Josh_2> Well I am not using an ORM which is why I'm trying to come up with crafty solutions that are easily extensible down the line
<Josh_2> There is very little that "flexible" about an ORM, but rolling my own half ORM I can add new slots and have them auto encoded and decoded to a JSONB column
<Josh_2> making adding new slots easy
random-nick has quit [Ping timeout: 248 seconds]
Catie has quit [Quit: sQuit]
akoana has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> hey whats a good way to search these logs
<lisp123> i struggle with the tymoon search but I might be doing it wrong
<lisp123> is there a plain text file of all the logs for the year / last year etc
<Josh_2> I have only ever used the tymoon search
<lisp123> when I use it it gives me a blank page mostly for each date
<lisp123> oh cool search by author works well
<lisp123> result seems too small
<lisp123> Shinmera, is there a limit on what is returned?
<Bike> lisp123: before a few months ago, we were on freenode.
<lisp123> Bike, was that this year
<lisp123> thought it was last yera
<lisp123> (but still the results are way too small)
dipper has joined #commonlisp
<Bike> uh, 2021 i guess
<lisp123> search seems to be working fine (except for super large queries which is unnecesary anyway), I must have been an idiot in the past when I tried to use it
cuz has joined #commonlisp
lisp123 has left #commonlisp [Leaving]
<Josh_2> Back when we owned #lisp :(
<Josh_2> The good ol' days
lisp123 has joined #commonlisp
<Josh_2> lisp123: hey look its me :sunglasses:
<lisp123> Josh_2, I missed the joke
<Josh_2> What joke? In the link you post I am right there :sunglasses:
<lisp123> Josh_2, ah
<Josh_2> :smirk:
<lisp123> back to refactoring all my code :(
Oladon has quit [Quit: Leaving.]
<Josh_2> :(
<Josh_2> What are you working on?
<lisp123> i'm writing a modified recursive descent parser
<lisp123> So previously I had Operator & Terminal as the same class Token, differing on the slot value type
<lisp123> Now I am going to create new subclasses for them, since some attributes only exist on operators and not terminals
<lisp123> So i've learnt to subclass whenever there are optional properties
<lisp123> good learning experience, but need to re-do everything now :D
Fare has quit [Ping timeout: 260 seconds]
<Josh_2> Oof
<Josh_2> so now you are writing a 2nd recursive decent parser
<lisp123> i'm modifying my old one
<lisp123> its been like 4 - 6 months (on and off with health issues)
<lisp123> A lot of time is spent on error handling, which has changed the strategy a few times
<Josh_2> What does your parser parse?
<Josh_2> What are you doing for error handling? restarts?
<Josh_2> (restarts are cool)
<Josh_2> You know I write restarts but then I remember I'm the only one using my code base :shrug:
<lisp123> Math expressions
<lisp123> I have a restart when I have a "(" but no closing ")"
<lisp123> Version 1 forced all parentheses to be balanced
<Josh_2> But that sounds like something you would want no?
<lisp123> But when someone is typing, they would be like a + b + ( --> usually people don't like paredit style auto-closing of parenthesis (where "|" is cursor --> a + b + (|)")
<Josh_2> oh
<lisp123> Initially I always balanced parens, now I disregard the opening "(" if its not closed down the line
<Josh_2> hmm
<Josh_2> I think I would prefer the stricter syntax
<lisp123> Yeah i will have that as an option
<lisp123> I'm used to balanced parentheses, so I would do the same. But I remember how jarring it wsa at the start when I used paredit for the first time
<Josh_2> I see
<Josh_2> I dont use paredit
<shunter> found an issue with posix-shm
<Josh_2> I have been using lisp idk many many years now
<Josh_2> no paredit
<lisp123> Its hard to change muscle memory
<lisp123> I use like 50% of vim binding, but cbf on the last 50% because I'm used to my current approach
<Josh_2> In all this time I've been lisping I've still never collaborated with anyone on a project
<Josh_2> I have done backend and someone else front end but never anything else
<Josh_2> vim bindings in emacs?
<lisp123> evil-mode
<shunter> On my laptop, shm_open() lives on librt. Just found out on my desktop it's merged with libc. Now posix-shm complains that it can't find librt. Not sure how to remedy that in CFFI...
<lisp123> Most lispers are lone wolfs and wolfettes
<Josh_2> For better or for worse
<lisp123> I met someone in real life who used lisp, that was nice
<lisp123> i think beach and hayley and some of the others work together on SICL
<shunter> I feel like most lispers collaborate w each other by claiming a system as territory and communicating via API's
<lisp123> that + the SBCL team probably are the most collaborative projects I'm aware of
<lisp123> oh and McClim too
<aeth> shunter: right... most 'collaboration' comes from keeping libraries small, mostly self-contained, and permissively licensed
<lisp123> shunter, that sounds very true
<aeth> a lot easier to take a floating point or linear algebra library from someone than an entire philosophy of how such things should be done in a large application
<Josh_2> But "large" applications are relatively small in CL when compared to other languages
<shunter> I believe the Shirakumo group collaborates together
<Josh_2> but ofc that comes with much macrology
dipper has quit [Remote host closed the connection]
<lisp123> the problem with larger programs is that its hard to get everyone to communicate / work on the same page
<shunter> hrm, on second hand, first few projects by the shirakumo is 98% shinmera
<lisp123> problem with lisp might be that you need equally experienced people if you want to use advance combinations of macros + oo programming + functional programming
<lisp123> its easier to get monkeys punching out java to some degree
<lisp123> shunter, yeah that's what I thought (lot of the team work on non-lisp)
Fare has joined #commonlisp
<Josh_2> yep
<lisp123> maybe a rule for large projects should be don't macro - leave it to the team leads
<Josh_2> :thinking:
<Josh_2> Idk about that
<lisp123> revision: don't export macros from your package unless approved by team leads
<lisp123> in your package, do what you want
<Josh_2> export everything, use everything :sunglasses:
<lisp123> lol
OlCe has quit [Ping timeout: 248 seconds]
<shunter> Packages as a unit of shared resource during dev work. Packages would be "owned" by max 1 person per sprint / dev cycle
<lisp123> that makes sense
<shunter> I've seen the Grammarly blog post, but it would be nice to view nuggets from lispworks or allegra on how they developed CL
<Josh_2> Fairy dust
<lisp123> you can gleam a bit from reading their source code (allegro at least publishes freely online, LW you gotta pay to see editor.lisp)
<Josh_2> fairy dust, bull cum and unicorn piss
<Josh_2> thats how :sunglasses:
<shunter> :/
<shunter> thanks for the tidbit lisp123, might view allegro's code
<shunter> I have no money for LW though
<lisp123> What I learnt from reading LW's code is that they write a lot in one file
<lisp123> I used to splitting everything across files before trying to be fancy with abstraction but they just dump everything into a large file
<lisp123> I started doing that and became more productive - now I do that for the draft, then refactor like hell, sticking to 1 class to 1 file in the end (so ultimately I do spread across many files)
<lisp123> Allegro write very clean code, its a joy reading their code
<lisp123> LW was a bit more obfuscated
<boigahs> I used to do the huge file thing, but using alphabetical-asdf reduced the cost of having lots of files and now I break things up fairly regularly
<boigahs> I default to one big file until a logical way to split the stuff up shows itself, though
Fare has quit [Ping timeout: 260 seconds]
<pdietz> What I see causing lots of things in a single file is package-defined-system.
azimut has joined #commonlisp
<shunter> Oh, I was using an old version of posix-shm
pjb has quit [Remote host closed the connection]
Fare has joined #commonlisp
Fare has quit [Ping timeout: 260 seconds]
cuz has quit [Ping timeout: 260 seconds]
cuz has joined #commonlisp
euandreh has quit [Remote host closed the connection]
cuz has quit [Ping timeout: 260 seconds]
euandreh has joined #commonlisp
euandreh has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
keinbock has left #commonlisp [#commonlisp]
cuz has joined #commonlisp
nij- has joined #commonlisp
euandreh has joined #commonlisp
ryanbw has quit [Ping timeout: 252 seconds]
ryanbw has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
cuz has quit [Ping timeout: 252 seconds]
saturn2 has quit [Quit: WeeChat 1.0.1]
clone_of_saturn has joined #commonlisp
clone_of_saturn is now known as saturn2
<mfiano> I wonder why other dynamic and typed languages go to so much trouble when it comes to hash tables. Why must the keys be of the same type, when there are general equality predicates, or writing your own? An even better question is, why do the values all have to be homogeneous too? Nearly every language has types T,U for keys/values of a hash table instance, and I'm not sure why. I'm legitimately
<mfiano> curious.
lisp123 has joined #commonlisp
akoana has quit [Quit: leaving]
euandreh has quit [Remote host closed the connection]
euandreh has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
euandreh has quit [Remote host closed the connection]
<kakuhen> hm... clojure seems to be happy with whatever you stick as a key
<kakuhen> as a demonstration, here are {:way 2 "many" ["different"] #{"kinds" "of"} "types"}
<kakuhen> i think deep down under the hood it just looks at hashCode() for each object you decide to use as a key, bucketing as needed.
<kakuhen> i assume CL won't care too much about hash table keys either since you just supply a test function otherwise it defaults to EQL iirc
<mfiano> Ignoring the few dynamic languages that do, why does every batch-compiled language with static typing require the keys and values to be homogeneously typed? I mean, what does that buy you for a hash table implementation?
<shunter> hash tables default to EQL yeah
<mfiano> (restated because barely any of your response was answering that)
<shunter> I know, I'm parsing the rest
<lisp123> mfiano, good question
<lisp123> maybe they order the keys?
<lisp123> that way you can get around EQL requiring the key to be exactly the same UNLESS the language also ensured that "string a lisp is cool" EQLs to another instance of "string a lisp is cool"
<shunter> I don't know any benefit to a static-typed key unless there's some possible benefit to making a specialized hashing function
<mfiano> Yes, I do believe CL is the only language that defines hash tables quite nicely. I only wish it was more extensible with CLOS.
<shunter> I suppose it gives a type-defined expectation of what keys should be in hte table
<mfiano> Ah, ok, that makes sense being metadata that never leaves the type domain.
<shunter> I heard complaints about CL's hash-table that I thought were legitimate. Let me try to find them...
<lisp123> mfiano, I find most custom hashing solutions inevitably come down to incorporating an id at the appropriate place in the classes and equating based on that
<lisp123> its always a hard question of when should we treat two objects to be equal
<mfiano> I'd be curious, because I am thinking about making an extension library of sorts. Portability can come later.
<lisp123> shunter, just google using objects as keys to hashes, should lead you down the rabbit hole
<mfiano> Or well, it partially overlaps with a project I am still planning, and will probably start coding towards end of the year.
<shunter> nvm -- I thought there was a deeper complaint, but I guess the person just laments hash tables only allow for the predefined EQ EQL EQUAL EQUALP tests
<lisp123> shunter, yeah but with CLOS it becomes a bit of a pain because you typically end up in situations where you want objects as keys
cuz has joined #commonlisp
<lisp123> an extension that created Ids based on your logic of equality could make it a bit more streamlined
<lisp123> e.g. if somebody implements an equals generic function, the macro 'somehow' reads that and implies how to construct the relevant key for hashing
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
<beach> Here we go again!
<lisp123> ?
Lord_of_Life_ is now known as Lord_of_Life
<kakuhen> I guess in statically typed, batch-compiled languages, it's probably "easier" for the programmer to be able to statically know the type of a key as opposed to relying on run-time type interference all the time
<kakuhen> but i think this discussion is largely irrelevant to Common Lisp
<mfiano> The core topic isn't, which is an extension to make hash tables extensible with CLOS protocols
waleee has quit [Ping timeout: 246 seconds]
mfiano has quit [Quit: WeeChat 3.7.1]
mfiano has joined #commonlisp
mister_m has quit [*.net *.split]
lonjil has quit [*.net *.split]
Nilby has quit [*.net *.split]
yitzi has quit [*.net *.split]
zups has quit [*.net *.split]
lonjil has joined #commonlisp
zups has joined #commonlisp
mister_m has joined #commonlisp
x88x88x has quit [Read error: Software caused connection abort]
yitzi has joined #commonlisp
mfiano has quit [Quit: WeeChat 3.7.1]
mfiano has joined #commonlisp
x88x88x has joined #commonlisp
pdietz has quit [Ping timeout: 260 seconds]
jello_pudding has quit [Ping timeout: 252 seconds]
<remexre> is there a non-screwy way to get at the set of files that ASDF reads from and writes to?
<remexre> (where screwy = ptrace or similar; I'm fine if something is implementation-specific but supported across a few)
cuz has quit [Ping timeout: 260 seconds]
lisp123 has quit [Ping timeout: 240 seconds]
Patternmaster has quit [*.net *.split]
zagura has quit [*.net *.split]
drakonis has quit [*.net *.split]
stylewarning has quit [*.net *.split]
hexology has quit [*.net *.split]
loke[m] has quit [*.net *.split]
bitspook[m] has quit [*.net *.split]
Gnuxie has quit [*.net *.split]
dilated_dinosaur has quit [*.net *.split]
zagura has joined #commonlisp
stylewarning has joined #commonlisp
Patternmaster has joined #commonlisp
Patternmaster has quit [Changing host]
Patternmaster has joined #commonlisp
dilated_dinosaur has joined #commonlisp
hexology has joined #commonlisp
drakonis has joined #commonlisp
bitspook[m] has joined #commonlisp
loke[m] has joined #commonlisp
jello_pudding has joined #commonlisp
Gnuxie has joined #commonlisp
causal has joined #commonlisp
<shunter> remexre: (asdf:input-files OPERATION COMPONENT) and asdf:output-files (likewise) should get you the set of files for a singular operation
<shunter> You can call e.g. (asdf:make-plan NIL 'asdf:load-op (asdf:find-component :my-system)) and the plan should contain all operations and components to perform to do the larger performance, if you want to gather *all* input/output files touched to load a system (from the current lisp state)
<remexre> okay; is there something better than asdf::plan-actions to use to iterate over them?
<shunter> I'm not sure
Nilby has joined #commonlisp
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #commonlisp
lapiss has joined #commonlisp
srji has quit [Ping timeout: 260 seconds]
srji has joined #commonlisp
enzuru has quit [Quit: ZNC 1.8.2 - https://znc.in]
enzuru has joined #commonlisp
cuz has joined #commonlisp
goober has joined #commonlisp
cuz has quit [Ping timeout: 260 seconds]
rgherdt has joined #commonlisp
pve has joined #commonlisp
szkl has joined #commonlisp
lapiss has left #commonlisp [ERC 5.4 (IRC client for GNU Emacs 28.1)]
Fare has joined #commonlisp
cosimone has joined #commonlisp
Bike has quit [Read error: Software caused connection abort]
iisi has quit [Ping timeout: 252 seconds]
Bike has joined #commonlisp
iisi has joined #commonlisp
srji has quit [Remote host closed the connection]
srji has joined #commonlisp
shka has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 240 seconds]
glaucon has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
goober has quit [Remote host closed the connection]
bilegeek_ has quit [Quit: Leaving]
goober has joined #commonlisp
Fare has quit [Quit: Leaving]
goober has quit [Remote host closed the connection]
goober has joined #commonlisp
euandreh has joined #commonlisp
cosimone has quit [Read error: Connection reset by peer]
selwynning has quit [Read error: Software caused connection abort]
selwynning has joined #commonlisp
rgherdt_ has quit [Remote host closed the connection]
random-jellyfish has joined #commonlisp
random-jellyfish has quit [Quit: Client closed]
tyson2 has joined #commonlisp
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest7028
goober has quit [Read error: Connection reset by peer]
jeffrey has joined #commonlisp
euandreh has quit [Ping timeout: 268 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
cosimone has joined #commonlisp
glaucon has quit [Quit: Leaving.]
cage has joined #commonlisp
random-nick has joined #commonlisp
cuz has joined #commonlisp
karlosz has joined #commonlisp
pjb has joined #commonlisp
cuz has quit [Ping timeout: 260 seconds]
jmdaemon has quit [Ping timeout: 252 seconds]
rainthree has joined #commonlisp
glaucon has joined #commonlisp
gamaliel has joined #commonlisp
<gamaliel> Hi, I have this code here: https://plaster.tymoon.eu/view/3513#3513. It essentially builds the code for a nested list from the contents of an array. However, I'm not sure how to convert it to a macro, as I always find I eventually need to (eval). Any suggestions would be welcome.
<beach> gamaliel: That code is very hard to read because you are not respecting conventional indentation. What tool did you use to create it?
<pjb> gamaliel: dim-num can be computed from mat = (array-dimensions mat)
<gamaliel> beach: The plaster website
epony has quit [Ping timeout: 268 seconds]
<pjb> or I miss a docstring describing the parameters.
<beach> gamaliel: I don't know that one, but it seems to have no idea how to indent Common Lisp code.
<beach> Oh, plaster.tymoon.eu. Well, you should first edit your code locally, using a Common Lisp-aware tool.
triffid has quit [Ping timeout: 255 seconds]
<beach> Then paste the locally created code to tymoon.
<pjb> gamaliel: (defmacro dim (array dim-num n) (dim-code array dim-num n))
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
triffid has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
cyberbanjo has joined #commonlisp
<gamaliel> pjb: would it work in the case of global variables? I tried running it with a matrix *x* created with (defparameter *x* '(3 4)) and it gives me an error: The value *x* is not of type ARRAY.
<gamaliel> (defparameter *x* (make-array '(3 4)))
pranavats has joined #commonlisp
<gamaliel> Nvm,  I found the mistake. Sorry.
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
<gamaliel> I'm still not wrapping my head about macros, but I'll keep reading :-)
<beach> gamaliel: What editor do you use locally to edit your code?
<gamaliel> emacs + slime usually, but for this I opened Kate. It seems to use a very strange spacing.
sedzcat has joined #commonlisp
<beach> Yes. I suggest you use Emacs+SLIME to indent this code, and the re-paste it.
<beach> *and then
<beach> Much better.
<beach> So what seems to be the problem?
<beach> You want to turn the generated data into code?
<gamaliel> Well, I'm not sure how to make it a macro. If I (eval) the code, it does what I want, but when I created it with defmacro, all sorts of errors happened.
<beach> Just stick it in a macro. Something like (defmacro dim-code-macro (arr dim-num n) (dim-code arr dim-num n))
<beach> Your choices of names are terrible too, by the way.
<beach> ARR, DIM, SYour variable
<beach> Sorry, ARR, DIM, SYMS.
<beach> DIMS, SEQ, N
<beach> DIM-NUM
<beach> All terrible.
<beach> What is wrong with ARRAY, DIMENSION, SYMBOLS, DIMENSIONS, SEQUENCE, etc.?
srji has quit [Ping timeout: 256 seconds]
srji has joined #commonlisp
lisp123 has joined #commonlisp
sedzcat has quit [Quit: sedzcat]
sedzcat has joined #commonlisp
<lisp123> any plans for another ELS next year?
<beach> Yes.
gamaliel has quit [Ping timeout: 260 seconds]
<beach> There were three candidates announced in Porto. I don't know which one was decided upon by the steering committee.
<lisp123> idea on dates?
<beach> Not me, but then I am not a member of the steering committee.
<beach> It is usually around March.
<beach> And it is usually Monday and Tuesday.
<lisp123> Hope I can make it, otherwise definitely next yera
<lisp123> as in 2025
epony has joined #commonlisp
<beach> Something wrong with 2024?
<lisp123> im travelling in february, not sure if I can travel again in march from australia
pdietz has joined #commonlisp
<lisp123> but if its at the start of march I might be able to fit it in
<beach> No, I mean, now is 2022, next year is 2023 when the next ELS will be held. You said you hope you can make it this year, if not next year, which you then clarified as 2025.
<beach> Er, you said you hope you can make it next *time*, which is 2023.
<beach> It doesn't matter. Forget it.
<lisp123> Oh yes 2024
epony has quit [Ping timeout: 268 seconds]
<lisp123> I have mentally already clocked into 2023
epony has joined #commonlisp
cosimone has quit [Remote host closed the connection]
<Duuqnd> I won't be mentally ready for 2023 until the sun stops setting in the afternoon
Lycurgus has joined #commonlisp
<beach> I know precisely what you mean.
<Duuqnd> Even though I've lived in Sweden my whole life I'm always surprised by how short days get during winter
waleee has joined #commonlisp
<beach> Even at my latitude, things are getting really depressing now.
<lisp123> off topic but have you tried vitamin d tablets
<beach> Every person in France has a vitamin D deficiency, so we are all prescribed monthly doses. Unfortunately, that doesn't alter the time of sunrise and sunset.
Lycurgus has quit [Quit: Exeunt https://tinyurl.com/4m8d4kd5]
<lisp123> Unfortunately it does not.
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<pjb> beach: don't complain, we're not living in Helsinki…
<pjb> That said, this is an argument to go live in space stations. There we can have as much Sun we want all the time.
lisp123 has quit [Ping timeout: 260 seconds]
igemnace has joined #commonlisp
Algernon69 has joined #commonlisp
epolanski has joined #commonlisp
Algernon69 has quit [Ping timeout: 240 seconds]
<Josh_2> I like earth thanks
nij- has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #commonlisp
McParen has joined #commonlisp
thuna` has joined #commonlisp
McParen is now known as mcparen
waleee has quit [Ping timeout: 240 seconds]
mathrick has quit [Ping timeout: 260 seconds]
cyberbanjo has quit [Ping timeout: 260 seconds]
pdietz has quit [Ping timeout: 260 seconds]
mathrick has joined #commonlisp
rgherdt has joined #commonlisp
pdietz has joined #commonlisp
jello_pudding has quit [Ping timeout: 240 seconds]
jello_pudding has joined #commonlisp
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
rainthree has joined #commonlisp
mcparen has left #commonlisp [#commonlisp]
Josh_2 has quit [Quit: Gotta go fast!]
notzmv has quit [Ping timeout: 260 seconds]
pdietz has quit [Quit: Client closed]
joast has joined #commonlisp
euandreh has joined #commonlisp
jeffrey has quit [Ping timeout: 240 seconds]
tyson2 has quit [Remote host closed the connection]
sedzcat has quit [Quit: sedzcat]
perrierjouet has quit [Quit: WeeChat 3.7.1]
perrierjouet has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
Josh_2 has joined #commonlisp
jeffrey has joined #commonlisp
<Josh_2> Whats the column width supposed to be for my lisp files?
glaucon has quit [Quit: Leaving.]
<pjb> Whatever you want.
sedzcat has joined #commonlisp
<pjb> (window-body-width) --> 254 with the current font.
<Josh_2> Hmm
<pjb> but it could be 362 or more.
<Josh_2> Mine is 93
<pjb> Just make it readable.
<Josh_2> Oh right but split panel
<Josh_2> I mean for conforming indentation
<pjb> You can meta-document your limit adding a fill-column: 90; in the -*- modeline -*- of your files.
<edgar-rft> Josh_2: column width is the width per column in tabulated output, CL has no default value for that
<Josh_2> I see
azimut has quit [Ping timeout: 255 seconds]
<Josh_2> Well its a bugger to work on someone elses code and have an indentation mismatch
tyson2 has joined #commonlisp
jeffrey has quit [Ping timeout: 240 seconds]
glaucon has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
mister_m has quit [Remote host closed the connection]
waleee has joined #commonlisp
alejandrozf has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
rgherdt_ has joined #commonlisp
morganw has joined #commonlisp
cosimone has joined #commonlisp
haoms has joined #commonlisp
<Josh_2> pjb: what do you mean? where do I add such things?
pdietz has joined #commonlisp
jeffrey has joined #commonlisp
<pjb> Josh_2: a comment on line 1 or 2: ;;;; -*- mode:lisp;coding:utf-8;fill-column:90 -*-
<pjb> you can set any emacs variable there.
<pjb> Josh_2: see File Local Variables in emacs documentation, you can also set then at the end of the file in a Local Variables: / End: block in the last 512 bytes of the file.
<kakuhen> i always add the modeline, but there's very little chance people will respect it unless they use the same editor as you
notzmv has joined #commonlisp
<kakuhen> I typically have `-*- mode: Lisp; fill-column: 95; indent-tabs-mode: t; -*-` but fill-column is useless unless auto-fill-mode is enabled
<Josh_2> The same can be done with the per directory local variables
<Josh_2> sbcl 2.2.9 is now the stable version in portage.. Time to go and rebuild all of my remote lisp image so I can connect remotely :sob:
rainthree has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 3.7.1]
rgherdt_ has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
haoms has left #commonlisp [#commonlisp]
alejandrozf has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 260 seconds]
glaucon has quit [Read error: Connection reset by peer]
<kakuhen> dir-locals will make emacs complain to the user unless they permanently trust the directory, so i try avoiding them in projects i share w/ people
<kakuhen> but i have had to use it in a common lisp project before so that djula templates placed nicely with emacs' web-mode
waleee has joined #commonlisp
<thuna`> Can I use #+ and #- to achieve something similar to (eval-when (:compile-toplevel))?
<Bike> What do you mean? Those are pretty different things.
<kakuhen> ^
<shunter> #+ #- only chooses whether the next expression should be read whether the given feature is present or missing.
<shunter> It has nothing to do with when the expression is eval'd
<thuna`> Uhh, so I want the package to be defined with defpackage when compiling (due to some weird issue) and uiop:define-package when I'm tinkering with it
<Bike> if you want to run something at compile time, use eval-when. you can make it run during compile-file and not otherwise if you want.
<shunter> I suppose aside from fixing the root issue, you could have a macro you can redefine to mean defpackage or define-package whenever you feel like it
<thuna`> Well, I guess I should at least ask about the issue
<shunter> Just curious, is there any bad behavior putting either within a nested form? Like (when +debug?+ (defpackage ....) (define-package ....))
<Bike> well, if you do that it won't have any compile time effect
<thuna`> ...The issue fixed itself...
<shunter> epic
<Bike> glad to be of assistance!
<thuna`> :(
<Bike> gremlins do this to us all
<shunter> cons gremlins at it again
<thuna`> Wait, did it fix itself? Slime might just be frozen instead
epolanski has quit [Quit: Connection closed for inactivity]
akoana has joined #commonlisp
<thuna`> Alright, it's still here. Yay.
pdietz has quit [Ping timeout: 260 seconds]
<thuna`> So when I add a new symbol to :import-from, without exception, I get name-conflicts, with foo:bar and my-package::bar, despite bar never being in my package. If I shadowing-import-it in the restart, then in the next C-c C-c, I get the same error but with no restart option
<shunter> anywhere in code living in your package that uses "bar"? Even internal symbols will be interned and added to the package, so lisp needs to figure out whether that internal symbol and your imported symbol is intended to be the same
<thuna`> shunter: Nope, definitely not
<shunter> Huh, not sure where the name conflict would be coming from, then
<thuna`> The only possibility I can imagine is that passing the symbols to defpackage itself interns them
<thuna`> But then shadowing-import-it should fix the issue, which it doesn't
<Bike> defpackage forms are read like any other forms, so yes, using a symbol in them will intern it in whatever package the form is read in
<Bike> one of the reasons it's pretty usual to use #:symbols or "SYMBOL-NAMES" in defpackage forms
<pjb> shunter: the name conflict probably come from the iterative aspect of your modification. if you rebooted your lisp, you probably wouldn't get them. So use the restart to resolve the conflict when you want to keep the runnning session.
<shunter> did you mean to hilight thuna` ?
<pjb> sorry, yes, thuna`
<pjb> thuna`: Otherwise, indeed, if the same symbol name is exported from two used packages, you need to use shadowing-import-from.
<thuna`> Bike: Right, and I have package names as #:package but the symbols themselves are just symbols
<pjb> I prefer to use strings to avoid risking collisions due to the defpackage forms themselves, but it's more rare.
<thuna`> I guess define-package doesn't have this issue, and since I'm used to it I don't want to change it up right now
waleee has quit [Ping timeout: 260 seconds]
<Bike> define-package forms will be read in the same way
<thuna`> I'm not sure why, but define-package definitely works
cage has quit [Quit: rcirc on GNU Emacs 27.1]
jeffrey has quit [Quit: Client quit]
skeemer has joined #commonlisp
Guest7028 has quit [Quit: WeeChat 3.7.1]
akoana has quit [Quit: leaving]
<phoe> thuna`: do you have your defpackage posted anywhere?
<thuna`> phoe: Posted?
<phoe> yes, plaster or somewhere else
<pjb> termbined!
<phoe> so I could take a look at this name conflict
<thuna`> Oh, hold on
<phoe> yes, use #: for the imported symbols too
<pjb> use #: for everything!
<pjb> or "FOO".
<phoe> otherwise these are going to get interned, at read-time, into whatever current package
<phoe> if you are in package CL-TODO, then first the reader is going to intern stuff like CL-TODO::DEFINE-cONSTANT
<phoe> and then the evaluator is going to try to import ALEXANDRIA:DEFINE-CONSTANT into CL-TODO
<thuna`> Right, I got that much, but define-package somehow doesn't have this issue
<phoe> which is the source of the conflict
<phoe> uiop:define-package tries to be much more DWIM in its working
<phoe> and afaik it automatically uninterns symbols on import if they are already internal in the package
<phoe> but in this case it would be cleaner to #: everything as pjb said
<thuna`> #: is two extra characters per symbol, "..." is both two extra characters and manual capitalization, so I really dislike both options
<phoe> sure, feel free to dislike them
<phoe> using "raw" symbols in defpackage/define-package forms is yuck
<thuna`> Hmm, maybe I can put a (in-package :cl-user) before defpackage
<phoe> sure, you'll intern into CL-USER then, which is sort of a workaround
jmdaemon has joined #commonlisp
<thuna`> No, C-c C-c doesn't recognize it
<thuna`> ...Fine, I guess I'll make them strings
<phoe> strings mean that your code will only break with non-standard reader settings and ACL modern mode
<thuna`> lmao
<phoe> which is mostly fine
<thuna`> It broke with strings as well
<phoe> because the symbols are already interned
<phoe> (in-package :cl-user) (delete-package :cl-todo)
<phoe> and try again
<thuna`> No, this is after I chose the shadowing-import-it restart
<thuna`> Which should have fixed it
<phoe> paste the defpackage form again!
<thuna`> Alright
tyson2 has joined #commonlisp
<thuna`> This is the defpackage https://0x0.st/o64d.txt, C-c C-c on it fails and puts me into the buffer *slime-compilation*, whose contents are https://0x0.st/o64n.txt
<thuna`> No interactive debug
epony has quit [Quit: QUIT]
waleee has joined #commonlisp
<phoe> add (:shadow "*TICKS-PER-COUNT*")
<phoe> that's what the warning says
<phoe> SBCL is kinda strict when it comes to package variance
<phoe> it'll warn you whenever the new package definition misses something that the old package definition had, like an export or a shadow
<thuna`> Alright, moving "*TICKS-PER-COUNT*" to a :shadowing-import-from solves it
<phoe> but yes, if you want to have your package definition be DWIM rather than warn you about things during interactive development, DEFINE-PACKAGE all the way
<thuna`> Unfortunately lisp-executable doesn't seem to recognize define-package
<phoe> what's lisp-executable?
<phoe> what do you mean by "doesn't recognize"? does it parse DEFPACKAGE forms in some way?
<thuna`> I'm not sure. When I do (asdf:oos 'lisp-executable:create-executables-op "lisp-executable-example"), if I have define-package it errors, but defpackage works fine
<thuna`> I messed up my files so it doesn't compile right now, but I'll try to get it working to find the exact error
<phoe> please do
<phoe> anything related to building Lisp binaries shouldn't differ whether you use DEFPACKAGE or DEFINE-PACKAGE
<phoe> because by the time one can try to dump a Lisp image all packages should already be defined
lisp123 has joined #commonlisp
shka has quit [Ping timeout: 260 seconds]
<thuna`> `"DEFINE-CONSTANT" is not of type SYMBOL' what is this /now/
<phoe> ...what's the stacktrace?
<pjb> (type-of "DEFINE-CONSTANT") #| --> (simple-base-string 15) |#
<thuna`> You mean backtrace?
<phoe> yes
<pjb> thuna`: don't add idiotic quotes!
<pjb> thuna`: use the REPL
<phoe> pjb: calling quotes idiotic is idiotic
<thuna`> pjb: What quotes?
<thuna`> You mean `'?
<pjb> thuna`: `…'
<thuna`> It's to seperate the error and my message
<pjb> It looks like UIOP/PACKAGE:DEFINE-PACKAGE doesn't accept string designators, but only symbols.
<pjb> A good reason to throw it away.
<phoe> hahah, TIL that define-package doesn't accept strings
<phoe> I wonder if that's by design...
<phoe> because, if not, that's an UIOP bugticket
<aeth> using strings isn't maximally compatible because that depends on the reader case.
<thuna`> What the hell, I don't even have *ticks-per-count* in the defpackage https://0x0.st/o6Jz.txt
<pjb> Probably. Some people don't like (defpackage "FOO" (:use "CL")) so they explicitely exclude that from define-package. Idiots.
<aeth> of course, so many libraries use "FOO" to build parts of symbol names instead of (symbol-name '#:foo)
<phoe> thuna`: the old definition still has it
<phoe> the SBCL complains that the old definition had it but the new one doesn't
<thuna`> Alright, fixed that
<phoe> and I don't like that but that's what SBCL does
<thuna`> Ok. Got it to a state where asdf:oos works with defpackage
<thuna`> Here's that for reference https://0x0.st/o6JH.txt
<thuna`> Now switched that to define-package (https://0x0.st/o6J8.txt), and I get this output https://0x0.st/o6JP.txt, the relevant section is at the end
<phoe> show me the full contents of your packages.lisp file please?
<thuna`> The first link is the full packages.lisp
<phoe> oh okay
<phoe> hmmm
<thuna`> Here's cl-todo.asd also https://0x0.st/o6Jq.txt
jello_pudding has quit [Quit: WeeChat 3.7.1]
jello_pudding has joined #commonlisp
<phoe> I think I know what happened
<phoe> try to remove your compilation cache for CL-TODO
epony has joined #commonlisp
<thuna`> Uhh, how do I do that
<phoe> the easiest way is to find your way around ~/.cache/common-lisp/
<phoe> I think that the FASL for packages.lisp got compiled in a funky way
<phoe> that form must have been compiled with *PACKAGE* being CL-TODO, and since it has CL-TODO as its package name in DEFINE-PACKAGE, the FASL now has a symbol reference to CL-TODO::CL-TODO
<thuna`> Ok, emptying /home/thuna/.cache/common-lisp/sbcl-2.2.0-linux-x64/home/thuna/projects/cl-todo
<phoe> so the package CL-TODO needs to exist in order for you to be able to load the DEFINE-PACKAGE form, which is circular
<thuna`> Nope, it ended up the same
<phoe> empty the cache again AND (in-package :cl-user) before compiling packages.lisp
<thuna`> Wait, let me clear out the original directory as well
<phoe> or, even better
<phoe> use #: everywhere in packages.lisp and that'll break any package references
<thuna`> Oh, #: did it. Fuck
<phoe> perfect
<thuna`> I also had to do it for :export symbols
<phoe> now you know why not to use raw symbols in defpackage forms!
<phoe> there's all sorts of circularity issues that can happen, among other things
<thuna`> Sigh
<thuna`> phoe: Well, regardless, thank you for the help, really
<phoe> and I guess that strings not being accepted in DEFINE-PACKAGE is a bug since DEFINE-PACKAGE is meant to be a drop-in replacement for DEFPACKAGE; it's just possible that no one reported that bug because using strings in package designators is kind of a thing of the past whereas DEFINE-PACKAGE is a thing of the future
<phoe> but yeah I'll raise a ticket in a moment
alejandrozf has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 256 seconds]
dipper has joined #commonlisp
alejandrozf has quit [Ping timeout: 268 seconds]
seok has joined #commonlisp
<fe[nl]ix> anyone here on OSX 13 and XCode 14 ?
morganw has quit [Ping timeout: 260 seconds]
morganw has joined #commonlisp
pve has quit [Quit: leaving]
sedzcat has quit [Remote host closed the connection]
pdietz has joined #commonlisp
Sauvin has quit [Quit: Leaving]
<kakuhen> IME most common lisp users on a mac will be using older versions... I'm personally on 10.15... soon upgrading to 10.14...
Sauvin has joined #commonlisp
<pjb> Darwin unknown 21.6.0
<pjb>
<pjb> I've not updated my distribution script yet…