Xach 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>
<pjb> skeemer: note that systems are named with lower-case strings. packages are named with (usually upper-case) strings. symbols are named with (usually upper-case) strings. functions are named by symbols or lists of the form (setf foo).
<pjb> skeemer: now, as mentionned the packages are only used when reading; for the lisp objects, it's a flat namespace: just symbols. It just happens that some symbols may have a given home package, and some other symbols may have another home package.
<pjb> skeemer: even if two symbols have two different home packages, they may still be present or visible in the same package (eg. because one is imported in the home package of the other, or because they're exported and their home packages are used by the current package, etc).
<pjb> also, the current package bound to CL:*PACKAGE* is only used to read the symbols, it has no consequence on the objects created by the expressions.
<pjb> eg. (in-package "FOO") (defun bar::f (x) (+ x 2)) (defun quux::f (y) (* 3 y)) binds two function objects to the symbols BAR::F and QUUX::F. Unrelated to the package FOO.
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 258 seconds]
Oladon has quit [Quit: Leaving.]
igemnace has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Qwnavery has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 258 seconds]
tyson2 has joined #commonlisp
nature has quit [Ping timeout: 265 seconds]
Nilby has quit [Ping timeout: 264 seconds]
jcowan has quit [Ping timeout: 258 seconds]
jcowan has joined #commonlisp
drmeister has quit [Read error: Connection reset by peer]
ullbeking has quit [Read error: Connection reset by peer]
igemnace has quit [Quit: WeeChat 3.3]
ullbeking has joined #commonlisp
drmeister has joined #commonlisp
Psybur has quit [Remote host closed the connection]
Guest-liao has joined #commonlisp
vats has quit [Ping timeout: 265 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
jcowan has quit [Ping timeout: 258 seconds]
ullbeking has quit [Ping timeout: 264 seconds]
ullbeking has joined #commonlisp
jcowan has joined #commonlisp
holycow has joined #commonlisp
mariari has quit [Remote host closed the connection]
mariari has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
mariari has quit [Client Quit]
mariari has joined #commonlisp
<beach> Good morning everyone!
Oladon has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
vats has joined #commonlisp
jealousmonk has quit [Quit: ERC (IRC client for Emacs 27.1)]
taiju has quit [Ping timeout: 258 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
akoana has quit [Quit: leaving]
semz_ has joined #commonlisp
semz has quit [Ping timeout: 258 seconds]
nature has joined #commonlisp
Bike has quit [Quit: Lost terminal]
nature has quit [Ping timeout: 244 seconds]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 276 seconds]
vats has quit [Ping timeout: 265 seconds]
aartaka has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 265 seconds]
Guest-liao has quit [Quit: Client closed]
Guest-liao has joined #commonlisp
holycow has quit [Quit: leaving]
Guest-liao has quit [Ping timeout: 256 seconds]
taiju has joined #commonlisp
Guest-liao has joined #commonlisp
Guest-liao has quit [Ping timeout: 256 seconds]
hobo has quit [Ping timeout: 264 seconds]
Qwnavery has joined #commonlisp
lotuseater has joined #commonlisp
taiju has quit [Ping timeout: 265 seconds]
waleee has joined #commonlisp
Oladon has quit [Quit: Leaving.]
zacque has joined #commonlisp
lisp123 has joined #commonlisp
etiago has quit [Quit: ZNC 1.8.2 - https://znc.in]
Guest-liao has joined #commonlisp
etiago has joined #commonlisp
lisp123 has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
taiju has joined #commonlisp
lisp123 has joined #commonlisp
akoana has joined #commonlisp
lance has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
gaqwas has joined #commonlisp
kakuhen has joined #commonlisp
pve has joined #commonlisp
varjag has joined #commonlisp
hendursa1 has joined #commonlisp
hendursaga has quit [Ping timeout: 276 seconds]
JeromeLon has quit [Quit: WeeChat 3.0.1]
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
gaqwas has quit [Remote host closed the connection]
gaqwas has joined #commonlisp
cage has joined #commonlisp
dec0d3r has joined #commonlisp
dec0d3r has quit [Remote host closed the connection]
makomo has joined #commonlisp
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
rgherdt has joined #commonlisp
winning-luser has joined #commonlisp
notzmv has quit [Ping timeout: 264 seconds]
random-nick has joined #commonlisp
<skeemer> pjb, you gave me a lot of information, i thank you a lot... really
cross has quit [Ping timeout: 245 seconds]
kevingal has joined #commonlisp
cross has joined #commonlisp
kevingal has quit [Remote host closed the connection]
srhm has quit [Read error: Connection reset by peer]
akoana has quit [Quit: leaving]
srhm has joined #commonlisp
<pjb> skeemer: you're welcom.
<pjb> +e
lisp123 has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
Guest-liao has quit [Quit: Client closed]
kdlv has joined #commonlisp
kdlv has quit [Changing host]
Qwnavery has quit [Quit: WeeChat 3.3]
makomo_ has joined #commonlisp
makomo has quit [Ping timeout: 244 seconds]
wyrd has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #commonlisp
Nilby has joined #commonlisp
X-Scale has quit [Ping timeout: 260 seconds]
Krystof has joined #commonlisp
peterhil has joined #commonlisp
dra has joined #commonlisp
igemnace has joined #commonlisp
Nilby has quit [Remote host closed the connection]
Guest-liao has joined #commonlisp
notzmv has joined #commonlisp
aartaka has quit [Ping timeout: 244 seconds]
aartaka has joined #commonlisp
Bike has joined #commonlisp
semz_ is now known as semz
makomo has joined #commonlisp
vats has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
holycow has joined #commonlisp
edgar-rft has joined #commonlisp
pyrotao has joined #commonlisp
X-Scale has joined #commonlisp
nature has joined #commonlisp
pyrotao has quit [Remote host closed the connection]
pyrotao has joined #commonlisp
X-Scale has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Nine out of ten l33t h4x0rz prefer it]
edgar-rft has quit [Quit: Leaving]
pyrotao has quit [Remote host closed the connection]
pyrotao has joined #commonlisp
pyrotao has quit [Remote host closed the connection]
dra has quit [Quit: Leaving]
tyson2 has joined #commonlisp
varjag has joined #commonlisp
lisp123 has joined #commonlisp
voltron has joined #commonlisp
Nilby has joined #commonlisp
<lisp123> I'm having some issues with SBCL's character-offset not being exact - has anybody else faced that in the past?
<beach> What is character-offset?
<lisp123> It's meant to tell you which character in the file a particular item is
<lisp123> (sb-introspect:find-definition-source #'something) --> will give info including the character-offset
<beach> As I recall, the source position of things like symbols is indicated by the position of the CONS of which it is a CAR.
<beach> Because the SBCL reader can't keep track of the source position of individual symbols, given that symbols in different places are often EQ after being read.
<lisp123> Sorry, this is for definitions
<lisp123> (if that helps)
skeemer has quit [Remote host closed the connection]
<lisp123> Might be an issue with my editor I think..its consistently off by 3 or so lines (but not always the same error, varies between 2 and 5)
<lisp123> beach: On a related note, one of the issues (well its not an issue) I had with the pretty printer is that its a deterministic algorithm, and thus cannot capture style or intent of the user. So my approach now is to get the actual text data from source files for a definition
<lisp123> As one personally line breaks to their preference, and its likely better to use that manual formatting vs. passing source code through the pretty printer
<beach> I see. You are gravitating towards the SICL approach.
<lisp123> Oh I see. So will you forgo a "new and improved" pretty printer for just reading the original source written by the user?
<beach> In SICL, I read the entire text of the source file into memory. Then, error messages and such do not refer program elements, but to source text, so that in an IDE we can then just whip up the text and highlight it.
<beach> Then, the source code could have undergone any number of transformations. The message seen by the application programmer is always exactly in terms of what was written in the original source.
<lisp123> Nice! It really does feel like a much better way
<lisp123> I can't wait for the overall project to go live, but don't want to rush you by asking a timeframe :) SBCL will do for now
<beach> Sure.
aleamb has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
djuber has quit [Ping timeout: 260 seconds]
<lisp123> I will test this 'character-offset' functionality on another machine. Sublime & Emacs both point to the wrong character when I (goto character-offset)
<beach> What OS are you on?
<lisp123> Mac
<Nilby> Character offset has been off for a while, becuase of unicode. Emacs language modes usually search for the thing near the character offset.
<Bike> usually when i've hit source locations being wrong it's because the source files are a different version from the actually loaded fasl
<Bike> prolly you've accounted for that already though
<lisp123> Bike: I hope so, I did :force t to recompile & restarted inferior lisp. But interesting that it works for you
pve has quit [Ping timeout: 244 seconds]
<lisp123> Nilby: Thanks for confirming. Yes, its very close but not exact
<Nilby> Only byte offset is accurate, and it bears little relation to what people expect, which is "grapheme" offset, or possibly what Lisp might have as unicode code-point offset. And if you have emoji's in your text, you'll have to update the software every time they add a new emoji combination, which is like every day.
<lisp123> Nilby: Thanks for that. No emojis just yet, but perhaps its not a bad idea to add some ;)
<lisp123> I'm reading an older thread on Reddit, but the comment seems quite wrong: The simplest answer why CL doesn't provide line numbers is: macros. It's hard to attribute a specific expression that's being evaluated to a specific line. It might be possible to build heuristics for the most common situations (for instance a macro that uses a single &body etc.), but I don't think any CL provides that yet.
<lisp123> I don't think macroexpansion is the reason, because its quite close but not exact
Mandus has quit [Ping timeout: 264 seconds]
<Nilby> It's true that the actual definition may not even be visible in the source file.
<Bike> i don't understand the premise that "CL doesn't provide line numbers"
Mandus has joined #commonlisp
<Bike> Doesn't provide how?
<lisp123> I think that is in relation to it being easier to count the number of top-level forms (e.g. form 5 is what you are after), but anything more precise (either exact character position or line number) is challenging
<lisp123> I am going to try and count by forms now, but I think that above reddit comment doesn't really make sense (but nobody refuted it so never know)
<Bike> it's challenging, but like it's done
<Bike> if i write (defun foo () (error "test")) in a file, compile and load it, and run (foo), i can get to the particular line the error form is on from sldb
<Bike> the character position of it, even
<lisp123> Yeah
<lisp123> I agree
<beach> Macros don't change the line numbers. Line numbers are valid only for expressions that are read, and macro expansion is done after that.
<beach> But "line numbers" are quite silly in a language that is not line oriented.
<beach> Even for C, line numbers are questionable.
<lisp123> beach: Thanks for confirming as well. I'm going to reply on that thread to avoid any one else getting confused
<beach> Sure.
<beach> In SICL, to avoid problems with newline representations and such, the source information is represented by four numbers start-line, start-column, end-line, and end-column.
<beach> Also, those are character positions, not byte positions in the file.
<lisp123> That is helpful (I just wrote a hack to read from character offset until a blank newline appears, but that assumes each top-level form is separated by a newline)
dra has joined #commonlisp
<beach> How about using Eclector so that you can do it right?
<lisp123> beach: Will look at it now
Guest-liao has quit [Quit: Client closed]
<Nilby> But unfortunately it's still a bit of work to go from eclector to where a function defintion is reliably.
Mandus has quit [Ping timeout: 264 seconds]
<beach> Sure.
voltron has quit [Read error: Connection reset by peer]
Mandus has joined #commonlisp
voltron has joined #commonlisp
<lisp123> beach: If I have a filename and a top-level form number, is there a function to extract that top-level form in eclector?
<beach> Well, you would apply READ for each top-level form and store the result in a vector I imagine.
<beach> I mean, READ doesn't read an entire file. Just an expression.
<lisp123> Yes, that makes sense. Is there an option to "turn on" source tracking ("parse results which will wrap the Common Lisp expressions in objects...")
<beach> Yes, in CSTs.
<beach> The Cleavir compiler turns CSTs into ASTs, preserving source information.
<beach> So you would use the CST entry point of Eclector.
<beach> I believe Eclector has good documentation.
<lisp123> Thanks, will try it after dinner
voltron has quit [Quit: Leaving]
zacque has quit [Quit: Goodbye :D]
pve has joined #commonlisp
Oladon has joined #commonlisp
waleee has quit [Ping timeout: 258 seconds]
waleee has joined #commonlisp
<lisp123> beach: worked a treat (just in time for dinner, now I'm off!)
<beach> Take care!
Mandus has quit [Ping timeout: 244 seconds]
Mandus has joined #commonlisp
edgar-rft has joined #commonlisp
jeko has joined #commonlisp
Mandus has quit [Ping timeout: 244 seconds]
jeko has quit [Remote host closed the connection]
Mandus has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
aartaka has quit [Ping timeout: 244 seconds]
aartaka has joined #commonlisp
edgar-rft has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
robin has quit [Ping timeout: 260 seconds]
robin has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 260 seconds]
peterhil has quit [Ping timeout: 244 seconds]
peterhil has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
Mandus has quit [Ping timeout: 244 seconds]
edgar-rft has joined #commonlisp
Mandus has joined #commonlisp
lisp123_ has joined #commonlisp
lisp123 has quit [Ping timeout: 244 seconds]
omr has joined #commonlisp
notzmv has quit [Ping timeout: 260 seconds]
aartaka has quit [Ping timeout: 258 seconds]
aartaka has joined #commonlisp
omr has quit [Quit: leaving]
random-nick has quit [Read error: Connection reset by peer]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
random-nick has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
fitzsim has quit [Ping timeout: 265 seconds]
aeth has joined #commonlisp
Oladon has quit [Quit: Leaving.]
thmprover has joined #commonlisp
notzmv has joined #commonlisp
peterhil has quit [Ping timeout: 244 seconds]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #commonlisp
peterhil has joined #commonlisp
CptKirk has joined #commonlisp
vats has quit [Remote host closed the connection]
vats has joined #commonlisp
<thmprover> Is anyone working on computational group theory using lisp?
<thmprover> (I found a library for algebraic topology, but nothing on group theory)
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
Oladon has joined #commonlisp
Noisytoot has quit [Quit: ZNC 1.8.2 - https://znc.in]
peterhil has quit [Ping timeout: 245 seconds]
Noisytoot has joined #commonlisp
peterhil has joined #commonlisp
aartaka has quit [Ping timeout: 244 seconds]
fitzsim has joined #commonlisp
aartaka has joined #commonlisp
tyson2 has joined #commonlisp
aartaka has quit [Ping timeout: 244 seconds]
lisp123_ has quit [Quit: Leaving...]
ec_ has joined #commonlisp
jeko has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
makomo has quit [Ping timeout: 258 seconds]
peterhil has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 264 seconds]
waleee has joined #commonlisp
dra has quit [Quit: Leaving]
peterhil has joined #commonlisp
ec_ has quit [Remote host closed the connection]
ec_ has joined #commonlisp
waleee has quit [Ping timeout: 245 seconds]
cage has quit [Quit: rcirc on GNU Emacs 27.1]
makomo_ has quit [Quit: WeeChat 3.2]
waleee has joined #commonlisp
qhong has quit [Quit: ZNC 1.8.2 - https://znc.in]
qhong has joined #commonlisp
Oladon has quit [Quit: Leaving.]
jeosol has quit [Quit: Ping timeout (120 seconds)]
shka has quit [Ping timeout: 264 seconds]
tyson2 has quit [Quit: ERC (IRC client for Emacs 27.2)]
akoana has joined #commonlisp
pve has quit [Quit: leaving]
jeko has quit [Remote host closed the connection]
jeko has joined #commonlisp
hhdave has quit [Ping timeout: 258 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
johnjay has quit [Ping timeout: 244 seconds]
X-Scale has joined #commonlisp
tyson2 has joined #commonlisp
nature has quit [Ping timeout: 244 seconds]
johnjay has joined #commonlisp
thmprover has quit [Ping timeout: 252 seconds]
peterhil has quit [Ping timeout: 244 seconds]
peterhil has joined #commonlisp
CptKirk56 has joined #commonlisp
CptKirk has quit [Ping timeout: 256 seconds]
jealousmonk has joined #commonlisp
varjag has quit [Ping timeout: 244 seconds]
CptKirk has joined #commonlisp
CptKirk56 has quit [Ping timeout: 256 seconds]
scymtym has quit [Ping timeout: 265 seconds]
rgherdt has quit [Ping timeout: 260 seconds]
srhm has quit [Read error: Connection reset by peer]
srhm has joined #commonlisp
Qwnavery has joined #commonlisp
holycow has quit [Remote host closed the connection]