habamax has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
akoana has joined #commonlisp
Andrew- is now known as andrewyu
NicknameJohn has joined #commonlisp
mi7 has quit [Read error: Connection reset by peer]
NicknameJohn has quit [Ping timeout: 250 seconds]
mi7 has joined #commonlisp
notzmv has quit [Ping timeout: 250 seconds]
azimut has joined #commonlisp
selwynning has quit [Ping timeout: 260 seconds]
selwynning has joined #commonlisp
waleee has quit [Ping timeout: 256 seconds]
migap has quit [*.net *.split]
migap_ has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
zest has joined #commonlisp
<zest>
Is there a specific syntax for Common Lisp docstrings? I wanna embed specific code examples in my docstrings but dont know if there is a standard or not..
zest has quit [Read error: Connection reset by peer]
notzmv has joined #commonlisp
<splittist>
zest: (perhaps on your return) there is no standard
<beach>
gendl__: Thanks. I'll take a look.
akoana has quit [Quit: leaving]
azimut has quit [Ping timeout: 240 seconds]
Oddity has quit [Ping timeout: 250 seconds]
<beach>
gendl__: I am not sure I can find it from the CLF home page. Do you have a link?
Oddity has joined #commonlisp
<bitblit1>
Hello everyone!
<bitblit1>
I can't understand the difference between #: and #' . I know #' is for referencing a function and that colon (:) is for a keyword which always creates a symbol. But what is #: ?
<hayley>
It creates an uninterned symbol.
<bitblit1>
kindly remind me what that means again?
<beach>
bitblit1: You follow that link, and then you click on "uninterned".
<bitblit1>
Okay thanks but should we use this when creating :export
<bitblit1>
also when specificying packages using defpackage, what is the difference between just package-name and :package-name for example (defpackage :package-name ...) vs (defpackage package-name)
<beach>
bitblit1: You follow that link and then you click on "string designator".
<bitblit1>
Oh okay thanks
<bitblit1>
How do you guys structure things in your package
<bitblit1>
Like what I am currently doing is having one package called closting/backend which has one class definition (for now), a closting/gui to deal with gui functions, closting/db for saving and loading, updating etc from a database then finally closting which is the main package to run this and main method.
<bitblit1>
now a common used class called financial-module is in backend
<bitblit1>
like closting/backend -> backend it would be ambigious and I would also have to do that for closting/gui closting/db etc for consistency...
<bitblit1>
If I just use a :use it is even more ambigious; So what is the perfect middle ground? What should I do?
ec_ has joined #commonlisp
<jackdaniel>
experiment and see what works best for you
<jackdaniel>
or study other people code
<beach>
bitblit1: Why would the local nicknames be ambiguous? You choose them yourself.
<bitblit1>
For other people reading my code
<bitblit1>
beach: Actually, I don't really know how to choose good local nicknames, for example backend is pretty generic, and db too if later I decide to use postgresql for my database it would be clashing
<beach>
It is still not ambiguous. The person reading your code will obviously have to know the mapping.
<beach>
How about cb cg and cd?
<bitblit1>
is having a my- prefix "unproffessional"?
Gleefre has quit [Ping timeout: 245 seconds]
<beach>
How does that fix the ambiguity?
<bitblit1>
Well it would be my-backend
<beach>
The package-local nicknames are by definition local to the package that defines them. So there is no risk of collisions.
<bitblit1>
beach: How do you usually do it for your projects?
<beach>
Pretty much as I just suggested to you.
<beach>
ico = iconoclast, bld = iconoclast-builder ses = s-expression-syntax.
<beach>
Again, since you choose them yourself, and they are local to the package defining them, there can't be any ambiguities.
<bitblit1>
Oh,
<bitblit1>
beach: What I meant by ambiguities was that for example postgresql exports as it's own package nickname :DB, if I were to use :DB as my package local nickname wouldn't there be a clash of symbols??
<beach>
I haven't looked at what the implementation does, but I would assume that the package-local nickname takes priority. Plus, if some external library uses such a short nickname, I would not use it.
<beach>
Ordinary nicknames are "global", so it would be very impolite of a library to monopolize short ordinary nicknames.
<bitblit1>
Oh yeah! Awesome, I am using the cbe cdb cgui convention now. Thanks as always!
<beach>
Sure.
<bitblit1>
beach: Wait so I shouldn't use ordinary nicknames for this?
<beach>
You should use package-local nicknames.
<beach>
Not ordinary nicknames.
<bitblit1>
Okay
<beach>
bitblit1: Oh, and the reason to use uninterned symbols for package names and such, rather than strings or interned symbols is that a string looks ugly because it would typically be upper case, whereas when you use the package name, you would type it in lower case, and using an uninterned symbol signals to the person reading your code that only the name of the symbol is being used.
<beach>
Some people say that using interned symbols waste space, which is true, but that's not a major problem.
<bitblit1>
beach: Ahhh, i see
msavoritias has joined #commonlisp
pve has joined #commonlisp
Inline has joined #commonlisp
attila_lendvai has joined #commonlisp
Gleefre has joined #commonlisp
dnhester26 has joined #commonlisp
_Posterdati_ has quit [Ping timeout: 240 seconds]
Krystof has joined #commonlisp
santiagopim has joined #commonlisp
Posterdati has joined #commonlisp
alcor has joined #commonlisp
Inline has quit [Ping timeout: 240 seconds]
dcb has quit [Quit: MSN Messenger 3.8]
ronald has quit [Ping timeout: 268 seconds]
ronald has joined #commonlisp
Oddity has quit [Ping timeout: 255 seconds]
morganw has joined #commonlisp
shka has joined #commonlisp
<pjb>
bitblit1: uninterned symbols are symbols that don't have a home package. (symbol-package '#:foo) #| --> nil |#
<pjb>
bitblit1: note: if you import them in a package, they're automatically interned in it: (let ((s '#:foo)) (import s "CL-USER") s) #| --> common-lisp-user::foo |#
habamax has joined #commonlisp
<pjb>
bitblit1: real old timers don't find uppercase ugly, on the contrary. They're reminiscent of good old time, line printers, teletypes, vtys, etc…
<beach>
Interestingly, that's not the definition given in the glossary, but the result is the same.
<alcor>
pjb: The only footgun I encountered with the uppercase/lowercase thing is that `(EQ :x (INTERN "x" "KEYWORD"))' is NIL, but `(EQ :x (INTERN "X" "KEYWORD"))' is t 🤯
<alcor>
It makes sense when you look closely, but it's … somewhat unexpected at first
antonv has joined #commonlisp
<jackdaniel>
that's one of these things that newcomers stumble upon and then that becomes somewhat obvious
awkravchuk has joined #commonlisp
<pjb>
alcor: only if you didn't (SETF (READTABLE-CASE *READTABLE*) :PRESERVE) ;-)
<jackdaniel>
that's problematic, because that raises the entry barrier yet it is downplayed as something trivial (and it somewhat is trivial)
<jackdaniel>
antonv: I'll read it later today. do you want comments as an issue entry?
<antonv>
Thank you. I was thinkinf of issues, yes. Or in any other way convenient to you. Irc is fine as well.
<jackdaniel>
sure. I'll make an issue entry then
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #commonlisp
<beach>
antonv: Like I said a short time ago, the main reason for using uninterned symbols is not to avoid "pollution", but to signal to the person reading the code that only the name of the symbol is of interest.
Gleefre has quit [Remote host closed the connection]
<antonv>
beach: interesting point. Would a keyword also signal that only the name is of interest?
<beach>
No, because its package is the keyword package.
Gleefre has joined #commonlisp
<jackdaniel>
string does not hint symbol nature of the package name
<jackdaniel>
uninterned symbol does
<antonv>
jackdaniel: the suggestion is to use usual (interned) symbols, not strings. For the package name and all the exported symbols, used packages, etc
dnhester has joined #commonlisp
Inline has joined #commonlisp
rendar has joined #commonlisp
rendar has quit [Changing host]
rendar has joined #commonlisp
dnhester has quit [Ping timeout: 245 seconds]
dnhester26 has quit [Ping timeout: 255 seconds]
<pjb>
jackdaniel: package names ARE STRINGS !!!
<pjb>
(package-name :cl) #| --> "COMMON-LISP" |#
<jackdaniel>
no shit sherlock
<pjb>
Therefore use strings in defpackage.
<pjb>
jackdaniel: no shit, don't say otherwise!
<jackdaniel>
where did I say otherwise?
azimut has joined #commonlisp
<pjb>
"<jackdaniel> string does not hint symbol nature of the package name"
<jackdaniel>
in other words, symbols does hint a symbol nature of the package name (what is an incorrect thing to hint) -- that was an argument in favor of using strings
<jackdaniel>
because symbols _hint_ that package names are symbols
<alcor>
Does this also apply to ASDF? I.e. the :depends-on clause? Should we also use strings there?
<pjb>
It's not clearly expressed. We didn't know what you wanted to imply.
<pjb>
alcor: asdf system names are also strings, using usually lower-case.
<pjb>
alcor: it's important to understand it because when using symbols as system names, you have to know that they're downcased.
<alcor>
pjb: So package names are always normalized to lowercase strings in the end?
<pjb>
No. package names are usually upper-case.
<pjb>
(package-name :cl) #| --> "COMMON-LISP" |#
<pjb>
But you can use lowercases. (defpackage "Foo" (:export "BAR")) #| --> #<Package "Foo"> |# (defconstant |Foo|:bar 42) (values |Foo|:bar) #| --> 42 |#
ds9soft has joined #commonlisp
<pjb>
alcor: but you must distinguish system names from package names, because they're mostly unrelated.
<pjb>
Loading a system may define 0, 1, or more package, and may intern symbols in any number of packages.
<alcor>
pjb: Yeah, sorry about that. It seems that the naming conventions for both aren't as uniform as I thought.
* alcor
makes a mental note the check gigamonkeys on packages/systems
<antonv>
jackdaniel: but using strings for package name in defpackage requires knowing the readtable-case that will be used for this code. Most often people use keywords or uninterned symbols. It's rare to see strings.
<jackdaniel>
I think that you should assume the readtable case in the package definition (if not explicitly control it)
<pjb>
As if people used a different readtable-case than :upcase…
<jackdaniel>
my opinion is that using a string is semantically the purest thing to do and using a symbol (without the "uninterned reader macro") is the most readable
<pjb>
(incf jackdaniel)
<jackdaniel>
using uninterned symbol is both poorly human-readable (as common questions about "why there is #: in front of <some package> name" prove) and semantically muddy (package names /are not/ symbols after all)
<jackdaniel>
and I'm guilty myself of often using #:foo myself, so if you got to shoot someone, please oversee that ,)
<jackdaniel>
overlook*
<jackdaniel>
pollution imo is not a problem
<jackdaniel>
antonv: if you can't assume the reader case, then you don't know the package name anyway
<jackdaniel>
it may be "FOO", or "foo", or "Foo" -- good luck finding that
<jackdaniel>
(because your program may have a different reader case from the reader case used when the dependency was read)
awkravchuk has quit [Remote host closed the connection]
antonv has quit [Remote host closed the connection]
<pjb>
However, using plain symbols lead to errors that require the same amount of explanation to newbies.
attila_lendvai has quit [Ping timeout: 255 seconds]
<pjb>
(defpackage foo (:export poo)) (use-package 'foo) ; have fun!
random-nick has joined #commonlisp
karlosz has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
ds9soft has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ds9soft has joined #commonlisp
ds9soft has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cage has joined #commonlisp
lucasta has joined #commonlisp
<jackdaniel>
green_: are you atgreen?
waleee has joined #commonlisp
matt` has joined #commonlisp
Posterdati has quit [Remote host closed the connection]
mgl has joined #commonlisp
andrewyu is now known as Andrew
Andrew has quit [Killed (lead.libera.chat (Nickname regained by services))]
AndrewYu has joined #commonlisp
Posterdati has joined #commonlisp
dnhester26 has joined #commonlisp
Inline has joined #commonlisp
matt` has quit [Remote host closed the connection]
ec_ has quit [Ping timeout: 240 seconds]
habamax has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
matt` has joined #commonlisp
jeffrey has joined #commonlisp
tyson2 has joined #commonlisp
ec_ has joined #commonlisp
mgl has quit [Quit: Client closed]
matt` has quit [Remote host closed the connection]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Hibernating too long]
euandreh has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
Guest86 has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
Inline has quit [Ping timeout: 260 seconds]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
srji has joined #commonlisp
srji has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
ec_ has quit [Ping timeout: 240 seconds]
Guest86 has quit [Quit: Client closed]
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
ds9soft has joined #commonlisp
Inline has joined #commonlisp
ec_ has quit [Remote host closed the connection]
pranavats has joined #commonlisp
ec_ has joined #commonlisp
ds9soft has quit [Remote host closed the connection]
ds9soft has joined #commonlisp
ds9soft has left #commonlisp [#commonlisp]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
dnhester26 has quit [Ping timeout: 260 seconds]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
morganw has quit [Remote host closed the connection]
zest has joined #commonlisp
notzmv has quit [Ping timeout: 250 seconds]
matt` has joined #commonlisp
santiagopim has quit [Ping timeout: 255 seconds]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
dnhester26 has joined #commonlisp
ec_ has joined #commonlisp
Oddity has joined #commonlisp
kevingal has joined #commonlisp
zest has quit [Read error: Connection reset by peer]
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
attila_lendvai has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
ec_ has joined #commonlisp
ec_ has quit [Ping timeout: 240 seconds]
molson has quit [Remote host closed the connection]
molson_ has quit [Remote host closed the connection]
molson has joined #commonlisp
ec_ has joined #commonlisp
molson_ has joined #commonlisp
molson_ has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
occ has quit [Ping timeout: 246 seconds]
<rbcarleton>
I'm using the packeded clisp 2.49 on openbsd 7.3. The describe function is trying to access the hyperspec on www.ai.mit.edu. I have a local copy. How do I point clisp at the local copy?
<yitzi>
rbcarleton: I think you can set the environment variable CLHSROOT
<rbcarleton>
It kind of worked, but now I'm getting a different kind of failure. Clisp then tries to connect to http://clisp.cons.org/impnotes/id-href.map which fails on the redirect to TLS...