dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
asarch has quit [Quit: Leaving]
pdietz has joined #commonlisp
pdietz has quit [Ping timeout: 244 seconds]
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
causal has joined #commonlisp
perrierjouet has joined #commonlisp
jeffrey has joined #commonlisp
saura has joined #commonlisp
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
saura has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 276 seconds]
pdietz has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #commonlisp
pdietz44 has joined #commonlisp
jeffrey has quit [Quit: Client quit]
thuna` has quit [Quit: out]
pdietz has quit [Ping timeout: 244 seconds]
pdietz44 has quit [Ping timeout: 244 seconds]
pdietz has joined #commonlisp
perrierjouet has quit [Quit: WeeChat 3.7.1]
tyson2 has quit [Remote host closed the connection]
pdietz has quit [Ping timeout: 244 seconds]
dipper_ has joined #commonlisp
dipper has quit [Ping timeout: 252 seconds]
perrierjouet has joined #commonlisp
seletz has joined #commonlisp
seletz has quit [Ping timeout: 248 seconds]
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
pillton has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
beach` is now known as beach
<dipper_>
Some days ago, I push a tweet, suggesting how newbie coder get quickly start handy coding. One of mine advises was said, "Learn code from career programmer and memorize some excellent code if necessary", then somebody not agree with that. I think if someone implements a logic with a good design pattern, then remember this code is a good way to learning, just like we appreciate beautiful sentences. But somebody just think this is ridiculous
<dipper_>
and misleading the newbie. Mastering code is mainly continuous practice and experience, and remember code always not a good way to learn. What do you think?
dre has joined #commonlisp
<beach>
dipper_: There are a lot of unreasonable people around. Don't be surprised. Looking at other people's work (both good work and bad work) is absolutely necessary in many domains and that includes programming. But you are not going to win the argument and convince that person.
bilegeek has quit [Remote host closed the connection]
bilegeek has joined #commonlisp
<beach>
So if you enjoy that kind of exchange, go ahead. But don't count on any results. I gave up trying to convince people with arguments a long time ago.
Guest88 has joined #commonlisp
bitmapper has quit [Quit: Connection closed for inactivity]
bilegeek has quit [Remote host closed the connection]
pranavats has left #commonlisp [Disconnected: Hibernating too long]
bilegeek has joined #commonlisp
<dipper_>
beach: thanks for you advises, I know avoid conflict possible, I want to ask remember someone's code is a good way for learn?
pranavats has joined #commonlisp
<beach>
Well, I personally don't remember the exact code. But I remember the general techniques used by the people whose code I look at.
<beach>
Sometimes it is hard to learn by looking at code, because it may lack explanations, and you don't know whether the code is uniformly good. An alternative way is to read a book such as PAIP where Norvig explains every step and the advantages and disadvantages of each solution.
phantomics has quit [Ping timeout: 272 seconds]
<dipper_>
ok thanks
<beach>
Sure.
<beach>
dipper_: With your experience, if I were you, I would concentrate on learning rather than trying to convince other people. But that's just me.
<ixelp>
GitHub - vindarel/cl-str: Modern, simple and consistent Common Lisp string manipulation library.
<Helmholtz>
Shinmera: to be consistent
<beach>
Helmholtz: It would be as irritating to read your code as it is (for me) to listen to a person speaking English with a heavy foreign accent.
<Shinmera>
Consistent with what? Scheme?
<aeth>
s/that/that?/
<Shinmera>
Using ? is not consistent with CL
<Helmholtz>
yes
epony has quit [Ping timeout: 252 seconds]
<Shinmera>
Ok, but you're not writing Scheme, you're writing Common Lisp.
<Shinmera>
Or is this some kind of interoperation attempt?
<Helmholtz>
no
<Shinmera>
Then don't do it.
<Helmholtz>
so why that library provided ? predicates?
<beach>
I totally agree with Shinmera.
<Helmholtz>
vindarel:
<aeth>
I use ? in my code a lot because it looks better and is clearer, but I don't rename CL's stuff because that's weird and it might even interfere with some optimizations and renaming COMMON-LISP (CL) stuff won't save you from everyone else's library code, anyway. And it can't be automated because is "foop" supposed to be "foo?" or the word "foop"? By contrast, "foo-p" can be automated, but people tend to
<aeth>
only do that when it's two words, like "foo-bar-p".
<Shinmera>
Here we go again
<aeth>
So it basically takes no effort to go FOO? -> FOOP or FOO? -> FOO-P, but the other direction is lossy so you're just going to cause a lot of pain and a lot of work trying to do that.
epony has joined #commonlisp
<beach>
I think if you (Helmholtz or aeth) are going to expose your code to others, using conventions from a different language is a very bad idea. It will be very irritating to the people you expose your code to. If you keep your code to yourself, you can of course do whatever you please.
<aeth>
I'm literally saying that attempting to translate other people's FOOP into FOO? is a bad idea, but sure, nobody read past the first part of my line.
<Shinmera>
We did read past the first line, but the first line is neverthelesess "muddying the waters".
aartaka has quit [Ping timeout: 252 seconds]
<frodef>
aeth: I agree with the technical argument, but the social argument is stronger.
<Helmholtz>
I asked this before, but is there a f-string like print or C-like printf (with C format specifiers like %f for float) library for CL? Is it advisable to use?
<aeth>
Shinmera: More like, speaking from experience, it's not a good idea. I even started to go away from doing the ? style, including in the implementation of Scheme project, since, amusingly, it helped clarify the distinction between the languages to make CL look like CL and Scheme look like Scheme and not attempt to borrow conventions.
<beach>
Helmholtz: What is missing from FORMAT that you need?
<aeth>
I now mostly use FOO? in a different way from Scheme, in a different context. Mostly for clearly-just-boolean variables. Yes, yes, technically you could consider that a sort of Hungarian notation and say that that's bad, too, but it's really useful to make it clear "the only thing that matters about this variable is that it's true or false"
<Helmholtz>
beach: ~a~ stuff :\
<hayley>
Does it have to include the part where you can do return-oriented programming using incorrect arguments for a format string?
<aeth>
I now think FOO? for predicates in CL was a failed experiment, just like avoiding LOOP.
<beach>
Helmholtz: I guess I don't know what that does.
<aeth>
To be clear, I still think that FOO? for predicates looks better and is clearer, but single-word FOO-P basically does the same job. It's the lack of a distinction between FOO and FOOP that bothers me, really.
<Helmholtz>
beach: I mean the specifiers in format is a bit weird...I know this is cause CL is very old
<Shinmera>
They're not any weirder than C's format specifiers
<beach>
I see nothing more weird with Common Lisp FORMAT than with C printf.
<Helmholtz>
*no-defun-allowed*: hmm..no?
<pjb>
aeth: really, ? and P are very close, graphically…
<hayley>
I suspect C printf is older than CL, but CL got its format strings from Fortran apparently.
<pjb>
hayley: only the name FORMAT, AFAICS. Fortran format strings were quite different and much more limited.
<aeth>
pjb: interesting, I never noticed how close they are until now
<beach>
Helmholtz: I think you are confusing objective qualities with what you happen to be used to.
<aeth>
pjb: I still think that -P consistently helps make it easier for tools, just like DO- consistently and DEFINE- consistently, though. For instance, Emacs does know to syntax highlight DO-FOO and DEFINE-FOO, but doesn't know how to highlight DOFOO and DEFFOO unless they're built-ins like DOLIST or DEFUN. And CL itself seems to have moved towards removing the one-word special case even in the era when the
<aeth>
standard kept getting updated, such as DEFINE-CONDITION
<beach>
Helmholtz: Just as with the `?' thing, it would not be a good idea to put C-like printf strings in Common Lisp code. Again, unless of course, you never plan to expose your code to anyone, like when you want to ask for help to debug something.
<aeth>
s/kept getting/still got/
makomo has joined #commonlisp
luna-is-here has quit [Quit: luna-is-here]
luna-is-here has joined #commonlisp
phantomics has quit [Ping timeout: 252 seconds]
<Posterdati>
beach: fixed! In the past I send the fixes, but it seems they are ignored for now!
<beach>
Posterdati: I think it was phoe who encouraged you to send fixes.
<Posterdati>
beach: yes...
<phoe>
Posterdati: ignored, how/where? do you mean CFFI github?
<Posterdati>
phoe: yes, I'm adding a new issue right now
<phoe>
with BSDs you might be more or less on your own, but as long as it breaks nothing maybe you could ask luis to review and merge any BSD-specific code
pranavats has left #commonlisp [Disconnected: Hibernating too long]
<Posterdati>
phoe: ... and gsll is broken too :)
<phoe>
Posterdati: :D
<phoe>
ah, the beauty of sailing on uncharted waters
cosimone has joined #commonlisp
phantomics has joined #commonlisp
pranavats has joined #commonlisp
<Posterdati>
phoe: BSDs are good to recycle >10 years old machines :)
<phoe>
yes, but this doesn't really mean that they are a popular choice with lispers - and this means that there are less eyes to make bugs shallow
<phoe>
;; which also means that your BSDish eyes are worth relatively more™ right now
<aeth>
it doesn't help that there are 3+
<Shinmera>
luis has been very busy and hasn't had time to handle CFFI stuff.
<luis>
it'd be helpful if someone would point Quicklisp to CFFI master! :(
<phoe>
Shinmera: TIL, is there a need for a maintainer?
<Posterdati>
phoe: this is particular pity since BSD are generally performing on x86_64
<luis>
phoe: for sure, help is always welcome
<phoe>
...and/or some help with Quicklisp? it does seem like Xach needs support with it too
<phoe>
luis: sign me up, I'm not very knowledgeable with CFFI internals but I should be able to at least do basic lispy review and ask people to run tests and merge things
makomo has quit [Ping timeout: 252 seconds]
dre has quit [Ping timeout: 276 seconds]
<luis>
phoe: invite sent
<phoe>
luis: accepted
<phoe>
luis: what is the process of merging a PR into CFFI? what sort of tests/test suites need to be run? I see there's some sort of CI, is this though?
<phoe>
Posterdati: which PRs should I take a look at?
<luis>
phoe: there was CI at some point. Is Travis CI still alive?
<phoe>
yes
<phoe>
it has limits for FOSS projects now but it does not seem like CFFI hits them
<phoe>
might be worthwhile to move to GitHub Actions someday, but it's not a very burning issue right now
<ixelp>
GitHub - splittist/printfcl: A configurable printf implementation for Common Lisp
* splittist
is not really surprised
<phoe>
splittist: TIL, nice
<Helmholtz>
splittist: wow thank
<Helmholtz>
*thanks
<Posterdati>
phoe: I had a branch for cffi :)
<pjb>
Helmholtz: it looks like wukix folded. Not enough customers? Lispworks provides compilers targetting iOS and Android. There's also clicc, but it would need some love.
<Posterdati>
phoe: sorry a fork!
<pjb>
Helmholtz: and of course, ecl for Android (and perhaps iOS too).
<phoe>
Posterdati: please make a PR from your fork to cffi/cffi then
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
makomo has joined #commonlisp
attila_lendvai has quit [Ping timeout: 240 seconds]
<pjb>
Josh_2: I'd suggest: (format nil "Good Morning ~/sunglasses/") so the function cl-user::sunglasses could insert the right text. O^O or 🕶.
dipper_ has quit [Remote host closed the connection]
dipper_ has joined #commonlisp
<Shinmera>
unfortunately xach has also been very busy. :/
<luis>
:(
<phoe>
Posterdati: yes, I can see it
<phoe>
Shinmera: yes, I see - are you aware if there is any support needed with running Quicklisp?
<Shinmera>
Well, the problem is that all the infrastructure is under Xach's control and his tooling is undocumented. I don't know if he'd be open to sharing that responsibility.
<Shinmera>
I've done some efforts on my side to replicate his tooling. https://github.com/shirakumo/redist should be capable of producing a dist from the ql-projects repo. Unfortunately the repo includes a bunch of project urls that have gone offline since, so it cannot yet replicate an identical dist.
<ixelp>
GitHub - Shirakumo/redist: A toolkit to handle the Shirakumo Quicklisp dist.
<Posterdati>
phoe: ok
<phoe>
Posterdati: merged
<Shinmera>
Once I (or someone??) gets around to implementing using another dist as a project source in redist, I could publish an alternate quicklisp dist.
<Shinmera>
Though, obviously, this won't exactly fix the situation.
splittist has quit [Ping timeout: 246 seconds]
splittist has joined #commonlisp
<phoe>
maybe the ultralisp sources can somehow help?
<Shinmera>
it's not hard, it's a matter of doing it.
aartaka has joined #commonlisp
<Posterdati>
phoe: what do you think about gsll? There's no github for it! :)
<phoe>
Posterdati: it's a matter of making an account on the clnet gitlab, asking ehuelsmann[m] to give you some project space, and then making a merge request there
<Posterdati>
phoe: ok, is him on irc too? :)
<phoe>
you could /join #common-lisp.net and start from there
<phoe>
yes, on the clnet IRC channel
<Posterdati>
ah
<Posterdati>
not libera servers?
<phoe>
libera, yes
<phoe>
the channel is named #common-lisp.net
<phoe>
but it's on libera chat
aartaka has quit [Ping timeout: 255 seconds]
epony has quit [Ping timeout: 252 seconds]
epony has joined #commonlisp
redsith has joined #commonlisp
mgl has joined #commonlisp
pve has joined #commonlisp
aartaka has joined #commonlisp
Guest88 has left #commonlisp [#commonlisp]
redsith has quit [Remote host closed the connection]
<jackdaniel>
you can throw in there letf or something
xlarsx has quit [Remote host closed the connection]
<phoe>
NotThatRPG: probably, I think
<phoe>
actually (with-open-file ... (with-closed-file ...) ...) would be all sorts of fun I guess
<thuna`>
I don't think WITH-CONTEXTS' WITH is what I was thinking of.
shka has quit [Ping timeout: 252 seconds]
Josh_2 has joined #commonlisp
<Josh_2>
If package X exports symbol S, then Package Y imports symbol S from X, can I reference X's S through Y? So something like y:s instead of having to do x:s?
<Josh_2>
Hnng
<phoe>
you mean something like (defpackage #:x (:use) (:export #:s)) (defpackage #:y (:use) (:import-from #:x #:s))?
<phoe>
in this case, y::s is EQ to x:s
<Josh_2>
I think I see why I should have declared an :import-from <my-package> <my class> then I could have just changed the import package...
<phoe>
if Y also exports S then you can also use y:s
<Josh_2>
Uh
<Josh_2>
Well I have package #:core which exports a class, in other aspects of my code I reference that as core:class, but upon a little refactor I want to put class into a package within core.. but still refer to the class as core:class :thinking:
<Josh_2>
well it exports symbols but hey
<phoe>
this works, just have CORE import and reexport the symbol
<Josh_2>
Okay :)
<Josh_2>
thinking about it I should probably just use :import-from
<ixelp>
GitHub - ruricolist/dpans2texi: Convert the ANSI Common Lisp draft to Texinfo
Brucio-61 has quit [Ping timeout: 252 seconds]
xlarsx has joined #commonlisp
Bung has quit [Quit: Leaving]
<thuna`>
Neat, thanks.
Brucio-61 has joined #commonlisp
<Josh_2>
Is there a way I can see what slots are inherited from a superclass?
<Josh_2>
:thinking:
<Josh_2>
I have my superclass and I want all other new slots to be converted into JSON and put into a db in a special key, means I can make classes dynamically and easily store/restore them :sunglasses:
<Josh_2>
New slots in my subclasses
<phoe>
Josh_2: you can diff direct-slots and all-slots
<Josh_2>
Nice
<Josh_2>
Thanks
<Josh_2>
In direct-slots will a slot that is inherited but given a new initform be listed?
<phoe>
moptilities has all-slots I think
<phoe>
it's either inherited or given a new initform
<phoe>
IIRC you can't give a slot an initform without declaring it as a direct slot
<Josh_2>
ah
<Josh_2>
perhaps I can use default-initargs instead then
<char[m]>
highlights cons-source rather than just the first element.
<char[m]>
...)
Everything has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
tyson2 has quit [Remote host closed the connection]
epony has joined #commonlisp
matt`` has joined #commonlisp
matt` has quit [Ping timeout: 252 seconds]
<char[m]>
interesting If the cons is all on one line, sly highlights the whole thing, if it is broken up on multiple lines, then it can highlight just the car.
<Bike>
yeah, it should be a direct slot even if you don't actually change anything.
<phoe>
and it is a direct slot, at least on SBCL
<phoe>
the value from the fourth form is not NIL
ec has quit [Ping timeout: 258 seconds]
ec has joined #commonlisp
triffid has joined #commonlisp
<Josh_2>
Perhaps
<Josh_2>
but I am checking in #'compute-slots where that doesn't seem to be the case
pve has quit [Quit: leaving]
<Josh_2>
if I inherit a slot from <my super> and then change its initform its listed as a direct slot when I eval c2mop:class-direct-slots within #'compute-slots
<Josh_2>
If I do not alter the slot provided by <my super> then it does not.
Guest7164 has quit [Ping timeout: 252 seconds]
Guest7164 has joined #commonlisp
<Bike>
you don't have to alter it. you do have to list it in the definition.
<Josh_2>
Yes
<Josh_2>
my mistake
cosimone has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
<thuna`>
I wanted to define an alias with (setf (fdefinition 'unquote) #'sb-int:unquote) but SBCL seems to not treat FOO:UNQUOTE as a defined function (it gives me a STYLE-WARNING, apparently UNQUOTE is undefined). How would I fix/silence that?
<phoe>
unquote is not a function
jmdaemon has joined #commonlisp
<phoe>
it might not even be a macro
Everything has quit [Quit: leaving]
<jackdaniel>
there even may not be an operator responsible for unqouting
<jackdaniel>
(i.e it may be implemented directly in the reader and that would be conforming willy nilly)
<thuna`>
But SB-INT:UNQUOTE is a function and the compiler should know that
<thuna`>
If you are asking if SB-INT:UNQUOTE exists or not, I checked; it exists.
<ixelp>
(progn (setf (fdefinition 'unquote) #'sb-int:unquote) (unquote 42)) ERROR: There is no package named "SB-INT" .
<phoe>
...welp, right
<phoe>
but yes, (progn (setf (fdefinition 'unquote) #'sb-int:unquote) (unquote 42)) gives me ,42 which is invalid syntax
<phoe>
what are you trying to do?
<thuna`>
I want to make comma reader macro into a dispatch-macro-character, so that other reader macros such as `,?' can be defined.
<phoe>
I think a better approach would be to just modify fare-quasiquote altogether
<phoe>
since it's portable, unlike implementation-defined backquotes
Guest7164 has quit [Quit: WeeChat 3.7.1]
<thuna`>
Alright, so that's one thing. But what about my question? I don't understand why the compiler wouldn't be able to pick up on that.
<phoe>
how are you testing this? (progn (setf (fdefinition 'unquote) #'sb-int:unquote) (unquote 42)) returns normally for me
<Bike>
when you say you get unquote is undefined, what context is that in? cos i just tried what phoe did and it went fine
<thuna`>
Alright, so I have a file compat.lisp which is (eval-when (:compile-toplevel :load-toplevel :execute) (setf (fdefinition 'unquote) #'sb-int:unquote (fdefinition 'comma-charmacro) #'sb-impl::comma-charmacro))
<thuna`>
It exports unquote and comma-charmacro
morganw has joined #commonlisp
<thuna`>
Then I have another file foo.lisp which imports those two from the compat package. Compiling that gives me the warning
<thuna`>
Wait. I forgot the in-package... ;-;
<phoe>
it's not packages
<phoe>
there's no way it's packages
<phoe>
it was packages
<phoe>
there, a haiku about the lisp package system
* thuna`
claps
gko has quit [Remote host closed the connection]
tyson2 has quit [Remote host closed the connection]
sveit has quit [Quit: Bye]
sveit has joined #commonlisp
epony has quit [Ping timeout: 252 seconds]
gko has joined #commonlisp
epony has joined #commonlisp
matt``` has joined #commonlisp
matt`` has quit [Ping timeout: 252 seconds]
akoana has joined #commonlisp
<thuna`>
,(block #:? (return-from #:? t) nil)
<ixelp>
(block #:? (return-from #:? t) nil) ERROR: While compiling an anonymous function : ↩ Can't RETURN-FROM block : #:?.
<thuna`>
Although I'm a bit surprised #1=#:? works
<phoe>
why wouldn't it? #1= reads an object and labels it, no matter what the object is
<thuna`>
It was just not immediately obvious that it would work, at least to me
thonkpod_ has quit [Ping timeout: 255 seconds]
thonkpod_ has joined #commonlisp
Madsy_ has joined #commonlisp
Madsy_ has quit [Client Quit]
igemnace has quit [Remote host closed the connection]
eddof13 has joined #commonlisp
cosimone has quit [Remote host closed the connection]
OlCe` has quit []
OlCe has joined #commonlisp
tyson2 has joined #commonlisp
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
dipper has quit [Remote host closed the connection]
dipper has joined #commonlisp
<Josh_2>
,(quit)
<Josh_2>
:sunglasses:
<Josh_2>
,(print "hi")
<ixelp>
(print "hi") ↩ "hi" => "hi"
<Josh_2>
aww
<Josh_2>
,(funcall #'print "hi")
<ixelp>
(funcall #'print "hi") ↩ "hi" => "hi"
<Josh_2>
,(funcall #'quit)
<Josh_2>
:(
<phoe>
it'll just come back up
<phoe>
you could try to find some creative ways of breaking it on query, it responds there, too
rgherdt has quit [Remote host closed the connection]
Noisytoot is now known as [
matt``` has quit [Remote host closed the connection]
<Josh_2>
Creative ways pfft
dre has joined #commonlisp
<Josh_2>
Hmm I've never written a macro that takes a normal lisp form like (defclass ) destructures it and creates a new version of defclass. Normally I'd just use a plist as arguments but it looks much nicer like this
<Josh_2>
My macro takes defclass forms :smile:
jeffrey has joined #commonlisp
<thuna`>
,(defun car () nil)
<ixelp>
(defun car () nil) ERROR: The function CAR is predefined in Clozure CL.
<thuna`>
Aw
<Josh_2>
,(progn (defun test (x)
<Josh_2>
oops
<thuna`>
,(setf (fdefinition 'car) nil)
<ixelp>
(setf (fdefinition 'car) nil) ERROR: The value NIL is not of the expected type FUNCTION.
<thuna`>
This is the macroexpansion, so something is definitely wrong (rutils:with (((a b) @ (list 1 2))) (list a b)) => (DESTRUCTURING-BIND (A B) @ (LIST A B))
<thuna`>
Same with `?'
<phoe>
hmmm
<phoe>
even after importing it does not seem to work
<phoe>
strange
<thuna`>
Maybe the ql version is bugged? Is upstream the same?
karlosz has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
<phoe>
thuna`: got it
<phoe>
you need to (named-readtables:in-readtable rutils:rutils-readtable) first
<thuna`>
phoe: For WITH?
tevo has quit [Read error: Connection reset by peer]
<phoe>
for @
<thuna`>
? still doesn't work
tevo has joined #commonlisp
<phoe>
.....because ? is not a reader macro for whatever reason
<phoe>
and you need to explicitly qualify it like (rutils:with ((((g :g) (h :h)) rutils:? #h(:g 6 :h 7))) (list g h))