<fitzsim>
mfiano: it seems like the automatic merge that GitHub did for my prior pull request went to the "main" branch
<fitzsim>
where "master" is the actual latest branch
<fitzsim>
my patch wasn't complete anyway though; I wasn't doing a completely clean test
Inline has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
kenran has joined #commonlisp
<fitzsim>
if the contents of ppc64-2 hit quicklisp, then I think sdl2 will install without compiler errors on ppc64 and ppc64le
amb007 has joined #commonlisp
<fitzsim>
however look at the ugly hack I had to put in SDL2.h
Inline has quit [Read error: Connection reset by peer]
<fitzsim>
I experimented with autowrap:c-include options :exclude-sources and :include-sources, but they seemed to have no effect on sys/types.h vs stdint.h
<fitzsim>
oh well, at least how to get it working on ppc64 is documented somewhere, even if it's unsuitable for merging
<fitzsim>
see if you think it's too ugly to have arch-specific stuff in SDL2.h; or maybe you can see a better way to fix it
bilegeek has joined #commonlisp
akoana has quit [Quit: leaving]
attila_lendvai has joined #commonlisp
<easye>
Mornin' all. Anybody got the Emacs 29 Tree Sitter stuff working with Common Lisp? I'm wondering what the right key would be for treesit-language-source-alist, maybe "common-lisp"?
<easye>
Hmm, after browsing through <https://www.masteringemacs.org/article/how-to-get-started-tree-sitter> it seems that Tree Sitter requires a fair amount of re-engineering with current major modes for programming languages, so unless one is prepared to do a fair amount of work, things ain't gonna "just work".
<ixelp>
How to Get Started with Tree-Sitter - Mastering Emacs
<beach>
easye: How would that technique work in the presence of reader macros and such?
johnjaye has joined #commonlisp
<easye>
beach: no idea, but I would guess "not well".
<easye>
which seems to have been "ported" from Clojure, which doesn't have reader macros from what I remember, so they were probably not considered at all.
<easye>
Well, Tree Sitter certainly seems like an improvement over that Semantic garbage for parsers in Emacs, but its gonna take a while for this ol' dog to learn the new tricks, so punting on this for now.
habamax has quit [Remote host closed the connection]
<beach>
easye: Are you aware that we are working on analyzing an editor buffer using Eclector, and a compiler framework? Not for Emacs, though.
<easye>
Yep, I know about Eclector ambiently (maybe you spoke about at an ELS or the Online Lisp series), but I haven't studied it at all.
<beach>
Since the buffer will then be processed by the same tools as the compiler uses, the analysis will be very precise.
fosskers has quit [Ping timeout: 246 seconds]
<easye>
What is interesting about Tree Sitter (or anything in Emacs)for me lies in the nature of ABCL deelopment being having a "mixed" Java/CL source tree.
<beach>
I see.
<easye>
So, perhaps much more primitive than having an exact parser, is the "given a symbol/literal jump to its implementation/definition/usages" kind of task. I make do with a script that munges together a mixed etags table.
<easye>
err not "literal" but "java identifier" if I have my terms right...
<easye>
Frankly, I tend to use a lot of "M-x ag", an Emacs interface to The Silver Searcher <https://github.com/ggreer/the_silver_searcher>, a fast recursive grep kinda tool. But I use that for a lot of languages that I haven't had the time/inclination to hone my Emacs fu for.
<ixelp>
GitHub - ggreer/the_silver_searcher: A code-searching tool similar to ack, but faster.
rgherdt has joined #commonlisp
mgl has joined #commonlisp
fosskers has joined #commonlisp
habamax has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
Brucio-61 has quit [Ping timeout: 245 seconds]
scymtym has quit [Ping timeout: 246 seconds]
attila_lendvai has joined #commonlisp
Gleefre has joined #commonlisp
qhong has quit [Read error: Connection reset by peer]
qhong has joined #commonlisp
johnjaye has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 240 seconds]
Brucio-61 has joined #commonlisp
johnjaye has joined #commonlisp
mingus has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Client Quit]
MajorBiscuit has joined #commonlisp
pve has joined #commonlisp
dino_tutter has joined #commonlisp
euandreh has quit [Ping timeout: 246 seconds]
euandreh has joined #commonlisp
<jdz>
easye: ripgrep is the now silver searcher.
habamax has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 260 seconds]
cosimone has joined #commonlisp
amb007 has joined #commonlisp
mingus1 has joined #commonlisp
bilegeek has quit [Quit: Leaving]
mingus has quit [Ping timeout: 240 seconds]
mingus1 is now known as mingus
habamax has joined #commonlisp
ronald has quit [Ping timeout: 240 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #commonlisp
attila_lendvai has quit [Quit: Leaving]
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 260 seconds]
mi6x3m has joined #commonlisp
<mi6x3m>
hey, is there the opposite of (use-package ?
<hayley>
unuse-package
* hayley
end of file on #<IRC-INPUT-STREAM>
<mi6x3m>
damn just found it myself :D CL is so awesome
rpx has joined #commonlisp
pkal has quit [Remote host closed the connection]
cosimone` has quit [Ping timeout: 260 seconds]
johnjaye has quit [Ping timeout: 260 seconds]
pkal has joined #commonlisp
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
mi6x3m has quit [Ping timeout: 245 seconds]
johnjaye has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life has joined #commonlisp
johnjaye has quit [Ping timeout: 246 seconds]
johnjaye has joined #commonlisp
Brucio-61 has quit [Remote host closed the connection]
pranavats has joined #commonlisp
Brucio-61 has joined #commonlisp
mi6x3m has joined #commonlisp
mi6x3m has quit [Client Quit]
amb007 has quit [Ping timeout: 264 seconds]
amb007 has joined #commonlisp
<jcowan>
"I have a cup of strong chicken tea for you." "You can't make tea from a chicken!" "Tell that to the chicken."
<edgar-rft>
but you might not be able to make tea from really strong chicken
jmd_ has quit [Ping timeout: 246 seconds]
mgl has quit [Quit: Client closed]
yitzi has joined #commonlisp
markb1 has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
markb1 has joined #commonlisp
rtypo has joined #commonlisp
igemnace has quit [Read error: Connection reset by peer]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
ronald has joined #commonlisp
igemnace has joined #commonlisp
mgl has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
mgl has quit [Quit: Client closed]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
euandreh has quit [Ping timeout: 245 seconds]
Brucio-61 has quit [Ping timeout: 250 seconds]
jesse` has joined #commonlisp
mgl has joined #commonlisp
euandreh has joined #commonlisp
waleee has joined #commonlisp
MooExtraCredit has joined #commonlisp
Brucio-61 has joined #commonlisp
mgl has quit [Quit: Client closed]
fosskers has quit [Ping timeout: 244 seconds]
MooExtraCredit has quit [K-Lined]
tyson2 has quit [Remote host closed the connection]
euandreh has quit [Ping timeout: 246 seconds]
euandreh has joined #commonlisp
cosimone has joined #commonlisp
tyson2 has joined #commonlisp
karlosz has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
herjazz has quit [Quit: leaving]
amb007 has joined #commonlisp
fosskers has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
splatt990 has joined #commonlisp
fosskers has quit [Ping timeout: 246 seconds]
tyson2 has quit [Remote host closed the connection]
rpx has quit [Quit: Client closed]
waleee has quit [Ping timeout: 260 seconds]
johnjaye has quit [Ping timeout: 246 seconds]
johnjaye has joined #commonlisp
kenran has quit [Remote host closed the connection]
amb007 has joined #commonlisp
karlosz has quit [Quit: karlosz]
karlosz has joined #commonlisp
cage has joined #commonlisp
Lycurgus has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2>
Hey :trumpet:
<Josh_2>
yesterday I was bitten in the arse by a bug using #'remove. Kinda annoying that if you use remove on an adjustable array the array created isn't adjustable...
<Josh_2>
Maybe that is an implementation detail
<Josh_2>
Hmm
<Josh_2>
but if I use delete then it does remain adjustable
<Josh_2>
guess I will just use delete instead
<beach>
Careful!
<Josh_2>
Yeh...
<Josh_2>
I have unit tests to check to make sure that the arrays I am modifying are actually adjustable
<beach>
It is perfectly valid for an implementation to return a different sequence with DELETE. What you are observing is probably that the same sequence is returned.
<Josh_2>
Yes
<beach>
So you can't rely on DELETE returning an adjustable array.
<Josh_2>
I will write a wrapper like (ensure-adjustable ..) which performs the check
Lycurgus has quit [Quit: Tschüss]
<beach>
What I am saying is that the fact that the original array is adjustable doesn't mean that the result is.
<Josh_2>
I understand
<beach>
So how will the check help you?
<Josh_2>
Seems silly to me that if you pass an array that is adjustable to remove that the new array created doesn't have similar initargs
<Josh_2>
Well (ensure-adjustable ..) will make a new adjustable array if the one passed isn't
<beach>
Oh, so you apply it to the result. OK. That's not what you said initially.
<Josh_2>
My mistake
jesse` has quit [Ping timeout: 240 seconds]
skin has joined #commonlisp
cosimone` has joined #commonlisp
lucasta has joined #commonlisp
cosimone has quit [Ping timeout: 260 seconds]
yvm has joined #commonlisp
prxq has joined #commonlisp
<White_Flame>
Josh_2: sounds to me like you should write your own version of remove/delete
<White_Flame>
that retains all your assumptions for you, instead of working around the wiggle room
<Josh_2>
my #'ensure-adjustable function works. This is a bit of an edge case in my system
<White_Flame>
ok
<Josh_2>
If it stops being an edge case then I'll certainly consider it
mgl has joined #commonlisp
Oladon has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
cosimone` has quit [Remote host closed the connection]
thuna` has joined #commonlisp
cosimone` has joined #commonlisp
cosimone` has quit [Ping timeout: 246 seconds]
ello has quit [Ping timeout: 264 seconds]
ello has joined #commonlisp
mingus has quit [Quit: mingus]
MajorBiscuit has quit [Quit: WeeChat 3.6]
alcor has joined #commonlisp
lucasta has quit [Quit: Leaving]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
Oladon has quit [Quit: Leaving.]
azimut has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.0.2]
mgl has quit [Quit: Client closed]
amb007 has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
tyson2 has joined #commonlisp
waleee has joined #commonlisp
chrcav has quit [Quit: leaving]
chrcav has joined #commonlisp
yitzi has quit [Ping timeout: 245 seconds]
yitzi has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
dino_tutter has quit [Ping timeout: 245 seconds]
tyson2 has quit [Ping timeout: 264 seconds]
tyson2 has joined #commonlisp
Krystof has joined #commonlisp
yvm has quit [Ping timeout: 260 seconds]
tyson2 has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
Reinhilde is now known as AmyMalik
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: No route to host]
ROYGBYTE has quit [Quit: WeeChat 3.4.1]
waleee has quit [Ping timeout: 244 seconds]
waleee has joined #commonlisp
ROYGBYTE has joined #commonlisp
bitmapper has joined #commonlisp
ROYGBYTE is now known as ROYGBYTE
cage has quit [Quit: rcirc on GNU Emacs 28.2]
ROYGBYTE has left #commonlisp [WeeChat 3.4.1]
tertek has quit [Ping timeout: 246 seconds]
dino_tutter has joined #commonlisp
cosimone has joined #commonlisp
ronald__ has joined #commonlisp
ronald has quit [Ping timeout: 264 seconds]
tertek has joined #commonlisp
rgherdt__ has joined #commonlisp
rgherdt_ has quit [Read error: Connection reset by peer]
NotThatRPG has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
cosimone has quit [Read error: Connection reset by peer]
coderdan has joined #commonlisp
<coderdan>
How can I declare the type of the &rest part of an argument list?
Oladon has joined #commonlisp
<coderdan>
E.g. I want to do something like (declaim (ftype (function (&rest integer) integer) foo) (defun foo (&rest ints) (apply '+ ints)), and get an error when I call (foo 3.4 3)
<mfiano>
Lists are heterogenous and do not have element types associated with them.
* |3b|
gets an error from that exampls
<mfiano>
But in this case, (declaim (ftype (function (&rest (integer * *)) (integer * *)) foo))
<mfiano>
Replacing the *'s with your bounds
<mfiano>
Or just `integer`, or some subtype like (unsigned-byte 32)
<|3b|>
oops, erros is in wrong place, nevermind
<|3b|>
but that does seem to be the correct declaration as far as i can tell
<mfiano>
Oh I see. Yes, declaim with an ftype declaration does not wrap the function it is annotating
<coderdan>
Yeah my mistake, I missed a closing paren
yitzi has quit [Read error: Connection reset by peer]
<|3b|>
ah, i get an error from compiling that, but not direct calls
<|3b|>
which is somewhat reasonable, since declaim ftype applies to calls, and type declarations can be ignored
<coderdan>
Using this declaration (declaim (ftype (function (&rest integer) number) foo)) I can still use floats as arguments in SBCL
<|3b|>
(arguably a quality-of-implementation issue that it complains sometimes but not always though)
<|3b|>
coderdan: in compiled calls, where it knows you are passing a float?
<|3b|>
like compiling (defun bar (x) (declare (type float x)) (foo x 1)) gives a warning and runtime error
<|3b|>
without the declaration, it can't give a compiletime error, and won't give a runtime error because FOO accepts floats
<mfiano>
Yeah you have to propagate the types of any variables not described somewhere
<mfiano>
Whether in another ftype or a struct's type annotations or whatnot
<mfiano>
SBCL can deduce a lot from context but not all :) Let me know when we have that though
<|3b|>
ftype declarations apply to /calls/ to the function, so the function itself doesn't check the type
<|3b|>
if you want foo to reject floats, put a check-type or declaration inside it (which is somewhat hard for &rest since you need to manually check the entire list)
<coderdan>
Sorry not sure if I'm following. I have this https://plaster.tymoon.eu/view/3915#3915 in a file script.lisp. Can I make sbcl --script script.lisp generate an error?
<coderdan>
It will generate an error if I change the return type from number to integer
<|3b|>
add (assert (every 'integerp ints)) to the definition of FOO
<|3b|>
and/or ask the sbcl devs to make your nonconforming code error instead of returning a float or whatever UB it happens to do
rgherdt__ is now known as rgherdt
shka has quit [Ping timeout: 246 seconds]
<|3b|>
and that is a more-or-less serious suggestion, since sbcl tends to error for that sort of undefined behavior in general, and missing that particular case is somewhat odd. but you should also know that the code is in fact invoking undefined behavior, and getting an error in the first place is an sbcl extension :)
<coderdan>
What's the nonconforming aspect? Getting errors as a result of using declaim?
<|3b|>
type declarations in CL are promises to the compiler. if you do not fulfil that promise, the result is undefined
<|3b|>
you promised to only pass integers to that function. you did not do so
<coderdan>
I see. I just figured I had the syntax wrong for specifying the expected type of &rest
<semz>
Interestingly even on max safety SBCL doesn't signal an error.
<|3b|>
sbcl tends to signal errors in cases like that, but returning 7.4 is conforming, as would be returning 1079613854
<|3b|>
(which you would get for example if an implementation believed your promise that you gave it an int, and stored the 3.4 as 32 bit single float with sufficiently similar tagging to normal ints)
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
<|3b|>
presumably in that case sufficiently top-level (and/or simple) forms are evaluated with a simpler evaluator which doesn't check ftypes so you get no error
<|3b|>
actually, looks like sbcl might include ftype declarations into function calls even though the spec doesn't require it. presumably it doesn't do so for &rest due to needing to check entire list
<|3b|>
includes it into function bodies i mean
* |3b|
isn't sure that is completely conformant, but is probably what most people seem to expect
<Josh_2>
Why webdev gotta be so lame
<Josh_2>
:sob:
<Josh_2>
Can't we just have a version of CLIM working in web :sob:
<|3b|>
in particular ftype affects function /names/, so (setf (fdefinition baz) #'foo) would give you a function name without that declaration you could call with a float
<|3b|>
didn't we have that at some point?
attila_lendvai has joined #commonlisp
<Josh_2>
CLOG powered CLIM :thinking:
<Josh_2>
CLIM powered by CLOG :thinking:
<|3b|>
or just a huge wasm blob with all of ecl, clim, etc :p
<|3b|>
(and some magic backend to make it interact with the browser)
<Josh_2>
I'm down with that
<Josh_2>
CLOG is pretty cool. Will see if I can do what I want using it
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
<Josh_2>
I spend entire week writing unit tests and refactoring based on problems I found
<Josh_2>
Happy with the results. CLOS is awesome :sunglasses:
attila_lendvai_ has joined #commonlisp
Oladon has quit [Quit: Leaving.]
ec has quit [Remote host closed the connection]
attila_lendvai has quit [Ping timeout: 246 seconds]
dino_tutter has quit [Ping timeout: 260 seconds]
ROYGBYTE has joined #commonlisp
ROYGBYTE is now known as ROYGBYTE
tyson2 has joined #commonlisp
prokhor_ has joined #commonlisp
prokhor_ has quit [Client Quit]
prokhor_ has joined #commonlisp
prokhor_ has quit [Remote host closed the connection]
prokhor has quit [Read error: Connection reset by peer]
bitmapper has quit [Quit: Connection closed for inactivity]
prokhor has joined #commonlisp
rgherdt has quit [Remote host closed the connection]
jmdaemon has joined #commonlisp
ec has joined #commonlisp
pve has quit [Quit: leaving]
amb007 has quit [Remote host closed the connection]
alcor has quit [Remote host closed the connection]
attila_lendvai_ has quit [Ping timeout: 246 seconds]
coderdan has quit [Remote host closed the connection]