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/>
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
mrcom has joined #commonlisp
yitzi_ has joined #commonlisp
yitzi_ has quit [Client Quit]
yitzi_ has joined #commonlisp
yitzi_ has quit [Client Quit]
yitzi has quit [Ping timeout: 245 seconds]
alcor has quit [Remote host closed the connection]
yitzi has joined #commonlisp
random-nick has quit [Ping timeout: 264 seconds]
neuroevolutus has joined #commonlisp
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
akoana has joined #commonlisp
jonatack has quit [Ping timeout: 265 seconds]
yitzi has joined #commonlisp
jonatack has joined #commonlisp
Bubblegumdrop has quit [Quit: ZNC 1.9.1+deb1 - https://znc.in]
Bubblegumdrop has joined #commonlisp
theruran has joined #commonlisp
istewart has joined #commonlisp
neuroevolutus has quit [Ping timeout: 256 seconds]
Akbar-Birbal has joined #commonlisp
awlygj has quit [Quit: leaving]
drewjose has quit [Ping timeout: 244 seconds]
drewjose has joined #commonlisp
amb007 has joined #commonlisp
istewart has quit [Quit: Konversation terminated!]
yitzi has quit [Ping timeout: 246 seconds]
amb007 has quit [Ping timeout: 244 seconds]
st_aldini1 has joined #commonlisp
st_aldini has quit [Ping timeout: 252 seconds]
st_aldini1 is now known as st_aldini
brokkoli_origin has quit [Read error: Connection reset by peer]
brokkoli_origin has joined #commonlisp
troojg has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
akoana has quit [Quit: leaving]
Pixel_Outlaw has joined #commonlisp
troojg has quit [Ping timeout: 260 seconds]
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life has joined #commonlisp
Pixel_Outlaw has quit [Remote host closed the connection]
lucasta has quit [Remote host closed the connection]
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
theruran has quit [Quit: Connection closed for inactivity]
ixelp has quit [Ping timeout: 260 seconds]
char has joined #commonlisp
ixelp has joined #commonlisp
decweb has quit [Ping timeout: 245 seconds]
char has quit [Ping timeout: 246 seconds]
char has joined #commonlisp
char has quit [Remote host closed the connection]
Alfr has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
Alfr has joined #commonlisp
opcode has quit [Ping timeout: 248 seconds]
Akbar-Birbal has left #commonlisp [#commonlisp]
mwnaylor has quit [Remote host closed the connection]
oneeyedalien has joined #commonlisp
Akbar-Birbal has joined #commonlisp
beach` has joined #commonlisp
beach has quit [Ping timeout: 244 seconds]
amb007 has joined #commonlisp
oneeyedalien has quit [Quit: Leaving]
Akbar-Birbal has left #commonlisp [#commonlisp]
Akbar-Birbal has joined #commonlisp
donleo has joined #commonlisp
neuroevolutus has joined #commonlisp
donleo has quit [Ping timeout: 252 seconds]
ingeniot has joined #commonlisp
beach` is now known as beach
mgl_ has joined #commonlisp
bitspook has joined #commonlisp
taku has joined #commonlisp
taku has quit [Remote host closed the connection]
donleo has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
traidare has joined #commonlisp
wacki has joined #commonlisp
neuroevolutus has quit [Quit: Client closed]
shka has joined #commonlisp
treflip has joined #commonlisp
treflip has quit [Remote host closed the connection]
treflip` has joined #commonlisp
treflip` has quit [Remote host closed the connection]
treflip has joined #commonlisp
alcor has joined #commonlisp
mgl_ has quit [Ping timeout: 244 seconds]
alternateved has joined #commonlisp
alternateved has quit [Remote host closed the connection]
treflip has quit [Ping timeout: 245 seconds]
alternateved has joined #commonlisp
prokhor_ has quit [Ping timeout: 260 seconds]
prokhor has joined #commonlisp
skeemer has joined #commonlisp
pve has joined #commonlisp
prokhor has quit [Remote host closed the connection]
treflip has joined #commonlisp
attila_lendvai has joined #commonlisp
prokhor has joined #commonlisp
cmack` has joined #commonlisp
cmack` has quit [Client Quit]
random-nick has joined #commonlisp
random-nick has quit [Ping timeout: 272 seconds]
mgl_ has joined #commonlisp
treflip has quit [Ping timeout: 244 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
decweb has joined #commonlisp
wacki has joined #commonlisp
random-nick has joined #commonlisp
spdegabrielle has joined #commonlisp
McParen has joined #commonlisp
Akbar-Birbal has left #commonlisp [#commonlisp]
<McParen> if I wrap defun and export in a macro, when is that symbol exported? during compile, load, execute? I have a problem that since i wrapped defun and export in a macro, the symbol is not recognized as external in another package in the file that is loaded after the first file in the asd system definition.
edgar-rft` has joined #commonlisp
<McParen> If i call defun, then export it works fine, but when i wrap defun and export in a macro and then call the macro, it doesnt. I know that i can solve that somehow using eval-when, but i dont understand what i should wrap and when.
chomwitt has joined #commonlisp
edgar-rft_ has quit [Ping timeout: 248 seconds]
<McParen> okay, i think i got it, but i dont understand why it works: the call to export has to be called during :compile-toplevel. so i ave to wrap the export form in eval-when within the macro. defun is obviously called during compile-toplevel anyway.
Akbar-Birbal has joined #commonlisp
edgar-rft` is now known as edgar-rft
mgl_ has quit [Ping timeout: 265 seconds]
ingeniot has quit [Ping timeout: 256 seconds]
chomwitt has quit [Ping timeout: 260 seconds]
<mrcom> McParen: How are you wrapping it in the macro? If you are, for example, putting them in a LET then they're no longer top-level forms, and that makes a difference.
<mrcom> However, if they are in a PROGN then they're still top-level.
jon_atack has joined #commonlisp
<mrcom> clhs 3.2.3 discusses "not-compile-time" and "compile-time-too" mode.
<mrcom> clhs 3.2.3.1 has the pretty archane rules re top-level form processing.
jonatack has quit [Ping timeout: 252 seconds]
lucasta has joined #commonlisp
<mrcom> And clhs 3.2.3.1.1 , "Processing of Defining Macros", may be your issue.
<McParen> mrcom: i am wrapping it in a progn (defmacro (progn (defun ..) (export ..))), but the export isnt visible in another package unless i wrap export in (eval-when ..) so the export is done before the other package is read.
<McParen> do you know when macros are expanded, during compile time or even before that?
alexander1 has joined #commonlisp
kurtis has joined #commonlisp
JuanDaugherty has joined #commonlisp
<kurtis> Hey, newbie question. I installed sbcl. I am also using Slime. If I want to add a dependency to my project (e.g. Drakma) then what is the conventional way(s) to do that?
alexander1 has quit [Ping timeout: 252 seconds]
<McParen> kurtis: in an asd system definition
<mrcom> The detailed rules are fairly complicated. That's what https://www.lispworks.com/documentation/HyperSpec/Body/03_b.htm is all about.
<ixelp> CLHS: Section 3.2
<cage> kurtis: you need asdfm take a look here: https://lispcookbook.github.io/cl-cookbook/systems.html
<ixelp> Defining Systems
<cage> McParen: Hi! 👋
<McParen> cage: Ho! :)
<cage> (little ot) how you doing?
<kurtis> I used asd years ago and totally forgot about its existence. I'll grab that and also check out the 03_b.htm link. Thank you!
<mrcom> McParen: but when doing file compilation the macros are expanded at compile time (we aren't talking about load time right now).
<cage> you're welcome kurtis!
<ixelp> CLHS: Section 3.2.3.1.1
<mrcom> "In particular, the information stored by the defining macros at compile time might or might not be available to the interpreter (either during or after compilation), or during subsequent calls to the compiler."
<mrcom> And then that section gives an example of non-portable usage, and then making it portable by wrapping everything in EVAL-WHEN.
donleo has quit [Read error: Connection reset by peer]
donleo has joined #commonlisp
kurtis has quit [Remote host closed the connection]
<mrcom> McParen: When you compile the definition file, are you loading the FASL before compiling the next file, or just compiling it and then compiling the next?
<mrcom> clhs3.2.3 "Successive forms are read from the file by compile-file and processed in not-compile-time mode; in this mode, compile-file arranges for forms to be evaluated only at load time and not at compile time. When compile-file is in compile-time-too mode, forms are evaluated both at compile time and load time."
<mrcom> One effect is that merely compiling something doesn't make it available. You have to load the compiled file. _Unless_ you've engaged compile-time-too mode by using the proper combination of EVAL-WHEN options.
rtypo has joined #commonlisp
<McParen> mrcom: i am compiling one afer another from the asd definiton.
<mrcom> asdf does a load after compile, so that's OK.
JuanDaugherty has quit [Quit: JuanDaugherty]
jrx has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
McParen has left #commonlisp [#commonlisp]
<mrcom> McParen: OK, out of easy answers :) The next steps, if you wanted to figure out exactly what's going on, would probably be to expand the macro, plug the expanded code directly into the file,
<mrcom> and play around with EVAL-WHEN, trying a different compiler, etc. It *sounds* like the EXPORT isn't getting loaded, or is loaded before the function definition, but I'm having a hard time imagining something that wouldn't result in a error when loading the first file.
char has joined #commonlisp
skeemer has quit [Ping timeout: 244 seconds]
jrx has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
cmack has quit [Remote host closed the connection]
dim has quit [Ping timeout: 260 seconds]
skeemer has joined #commonlisp
troojg has joined #commonlisp
Akbar-Birbal has left #commonlisp [#commonlisp]
triffid has joined #commonlisp
mgl_ has joined #commonlisp
bitspook has quit [Read error: Connection reset by peer]
Akbar-Birbal has joined #commonlisp
jonatack has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
jon_atack has quit [Ping timeout: 264 seconds]
synchromesh has joined #commonlisp
semarie has quit [Quit: WeeChat 4.4.2]
semarie has joined #commonlisp
troojg has quit [Ping timeout: 252 seconds]
fitzsim has quit [Read error: Connection reset by peer]
opcode has joined #commonlisp
mgl_ has quit [Ping timeout: 248 seconds]
fitzsim has joined #commonlisp
Inline has joined #commonlisp
opcode has quit [Quit: hopefully not k:lined]
opcode has joined #commonlisp
phantomics_ has joined #commonlisp
phantomics has quit [Ping timeout: 246 seconds]
mgl_ has joined #commonlisp
phantomics has joined #commonlisp
phantomics_ has quit [Ping timeout: 260 seconds]
Akbar-Birbal has left #commonlisp [#commonlisp]
bitspook has joined #commonlisp
jon_atack has joined #commonlisp
char has quit [Ping timeout: 245 seconds]
jonatack has quit [Ping timeout: 272 seconds]
mmontone has joined #commonlisp
char has joined #commonlisp
spdegabrielle has quit [Quit: Connection closed for inactivity]
JuanDaugherty has joined #commonlisp
dim has joined #commonlisp
char has quit [Ping timeout: 260 seconds]
spdegabrielle has joined #commonlisp
Demosthe1ex has joined #commonlisp
yitzi has joined #commonlisp
lucasta has quit [Quit: Leaving]
Demosthenex has quit [Ping timeout: 260 seconds]
mon_key_phn has joined #commonlisp
attila_lendvai_ has joined #commonlisp
<mon_key_phn> @mmontone hey there.
<mmontone> mon_key_phn hi
attila_lendvai has quit [Ping timeout: 246 seconds]
<mon_key_phn> hey there, I'm stan nice to meet you.
<mon_key_phn> So, I guess my first question about mold-desktop (MD) is the *store* variable.
<mmontone> Hi Stan, nice to meet you.
uhuh has joined #commonlisp
<mon_key_phn> thanks for making MD it is neat. still just starting to play with it.
<mmontone> The *store* variable is an in-memory database with all the user objects.
<mmontone> Ok, MD is a complex system, and not very well documented atm.
<mon_key_phn> when i evaluate start it wants a value for *store* which I've set to <SOME-PATH>/mold-desktop.db
<mmontone> Ok, you can start with :load-database nil
<mon_key_phn> i just created this file, but it isn't clear if there is a database format or if i can just supply a filename.
<mmontone> I will change that so that no error is signaled if there's no database file.
<mmontone> The database format is a CL-STORE format file.
<mmontone> But try with :load-database nil
<mon_key_phn> Yes, I did this :)
<mon_key_phn> Is there an interface to the database? Is there something that should be done to initialize the db?
<mon_key_phn> I multiple levels of interest in MD. Im interested in how you impplemented it with clog. I figured it might be a good way to learn clog.
<mmontone> Try using 'Add object from url' command.
<mmontone> Then 'Save system' command and see if that works.
<mon_key_phn> at a more conceptual level im interested in the interfacing concepts.
<mmontone> If it doesn't, I'll fix the database things this week.
<mon_key_phn> so the URL object creates fine
<mon_key_phn> does this initialize the db?
<mmontone> At the conceptual level, MD works with objects with everything exposed, attributes, status, events, etc.
<mmontone> And then they get attarched serveral views.
<mmontone> The types of views available depend on the type of the objects.
<mmontone> The 'Save system' command initializes the database.
<mon_key_phn> Yes, it's very introspective. That's part of the appeal, but also the challenge of wrapping my head around it.
<mon_key_phn> I went down an Alan Kay youtube hole after i installed mold. Also, the naked-objects paper
<mmontone> I really really should document things. And at the conceptual level. There's a manual, but my native language is Spanish, and so struggle with explaning things naturally in English.
<mmontone> But that's something I need to do.
<mon_key_phn> OK, so i loaded the URL and then did System > Save User Data. That effectively saved the file to the cl-store file
<mmontone> Ok, so now if you start mold again, it will load your objects.
<mon_key_phn> I understand. Documentation is challenging :)
<mmontone> It is very raw at the moment.
<mmontone> YOu also have 'Load system' command to load the database file.
<mon_key_phn> You've accomplished more with mold most other CL things i've encountered.
<mmontone> CLOG makes the UI easy, or as easy as it is possible, and so I was able to implement complex things.
<mon_key_phn> how do you use mold?
<mmontone> CLOG UI composes very well, and that is a need for this kind of UI, and the Web tech makes the layout stuff, etc, good.
<mon_key_phn> I've been watching what you're doing with the emacs-inpsector stuff recently.
<mon_key_phn> abstractly i feel like i can visualize how you are approaching UI design from a Lisp/smalltalk approach.
<mmontone> There's not a single way of using Mold, and everything is raw. But I thought using for bookmarking stuff on the web would be a good start.
<mmontone> But it is a desktop environment, and so, I include RSS feeds, tasks, calendar, potentially email, etc.
<mmontone> But no applications, only objects, and views and workspaces.
<uhuh> What would be the best way to make a function work with both numbers and symbols? Would good style here be defining separate functions, using typecase, or using generics?
<uhuh> These are math functions and I want to be able to both compute them and get symbolic representations depending on what I call them with
lucasta has joined #commonlisp
<mmontone> Commands need to declare the type of its arguments. And they dont' support a type like: (or integer symbol) at the moment.
<mmontone> The UI uses the types of the arguments of the command to ask the user their value using a method that depends on the argument type.
<mmontone> Of instance, if an argument has type (member foo bar), the UI lets you select from a list with foo and bar.
<mmontone> But I don't have support for something like (or integer symbol) atm.
<uhuh> Oh my question was not about CLOG but Common Lisp anyways
<mmontone> Sorry, I got confused, I thought you were mon_key_phn
quidnunc has joined #commonlisp
mon_key_phn has left #commonlisp [ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
<quidnunc> I'm trying to try out "unix-in-lisp" (I have very little experience with common lisp). When trying to (ql:quickload "unix-in-lisp") I get the error ""no dispatch function defined for #\t" when trying to compile the file "hu.dwim.util-stable-git/source/miscellaneous.lisp". (I'm using ultralisp). What am I doing wrong?
mon_key_phn has joined #commonlisp
<mrcom> uhuh: There are a couple of basic ways to specialize functionality by parameter type.
<mrcom> One is by typecase and such--conditional code inside a function.
<mrcom> The other is with generic functions. This is the generally preferred idiom, but it depends on what you're doing.
mgl_ has quit [Ping timeout: 245 seconds]
<mrcom> With GFs you can do things such as "(defmethod foo ((arg1 symbol) (arg2 symbol)) (+ (symbol-value arg1) (symbol-value arg2)))", and
<mrcom> (defmethod ((arg1 integer) (arg2 integer)) (+ arg1 arg2))
yitzi has quit [Remote host closed the connection]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
<uhuh> Alright, then shadowing the core math functions with generic equivalents that can also accept symbols seems like a good path, thank you
<mrcom> Oooh, nope.
<mon_key_phn> @mmontone i think i killled our chat buffer on accident.
<uhuh> Why not?
<mrcom> A generic function has to be declared as such, for example "(defgeneric foo (arg1 arg2))"
<aeth> if you want generic arithmetic, you have to turn variadic into binary, so you'd keep a variadic function for #'+ and then would have to have a binary one that the #'+ expands into, such as #'%+
<aeth> whether or not you use a method or something more sophisticated with macros (or both)
<aeth> s/whether or not/whether/
<aeth> You also have to make a note that (+) is 0 and (+ x) is x if x is a number, so there are two non-binary expansions for a call to #'+ as well
<mrcom> "Conforming programs" (ones that will behave consistently across conforming CL implementations) are limited (by decree) as to what they're supposed to shadow.
<mrcom> In general, "thou shalt not fool with the standard-defined stuff".
<uhuh> I see, I'll give my functions different names then
<mrcom> That's the way to go.
<uhuh> Thanks! Also, quidnunc, does (ql:quickload "hu.dwim.util") result in the same errors?
<mrcom> Also note you can only have generic _functions_. Macros are a different thing. You can still make them to different stuff depending upon the types of arguments, but its much more complicated and fragile.
<aeth> in particular, it requires DECLAREs for the types, not being able to use any inferred information that the compiler may have
<aeth> so it gets annoying fast
* mrcom wonders why there hasn't been a CL implementation whose claim to fame is exposing compiler inferred types.
<aeth> Imo on CL:+ vs another +... all rules are made to be broken when needed, and if you really want to redo +, -, /, *, etc., etc., then in practice what you're suggesting is to replace (use #:cl) with something else that is _mostly_ CL and that's fine if that's what the problem calls for imo. But if you make too many changes, people won't want to read your code.
<aeth> uiop has a use-reexport and some other defpackage alternatives do as well. That can help.
<aeth> It's still going to have you wind up with a ton of boilerplate
amb007 has quit [Ping timeout: 252 seconds]
<mrcom> Actually... uhuh: Can you describe a bit more what you're wanting to do? It's possible there's a different idiom that does it.
<uhuh> I'm trying to port over the robotics toolbox library available in matlab and python
<mmontone> uhuh you can look at generic-cl just in case
<uhuh> Basically a collection of convenience functions for 3d math and matrix operations
<aeth> It's always linear algebra.
<uhuh> And when the functions are called with symbols instead of numbers one can get symbolic outputs from the functions, for further analysis
<aeth> You could try extending someone's graphics linear algebra library beyond 4x4 matrices and vec4s.
<quidnunc> uhuh: yeah same error
<aeth> I'm assuming that non-graphics more-than-4x4 linear algebra just partitions the matrices down into block matrices no larger than 4x4, at least on the GPU. Or at least, that's one possible approach.
<uhuh> This one is mainly 4x4 as well actually
rtypo has quit [Quit: WeeChat 4.4.1]
chomwitt has joined #commonlisp
<mrcom> uhuh: So real symbolic algebra. Have you looked at the existing symbolic libraries? Even if you don't use the code they could give you pointers on API and general methods.
<quidnunc> uhuh: Does it work for you?
<mrcom> Maxima (fully open-source port of Macsyma) is the biggie, I think.
<uhuh> I did see one that redefined operations like we discussed
<quidnunc> with ultralisp
<uhuh> quidnunc: It seemed to work for me with ultralisp. I remember getting a similar error when the line endings of git-cloned repositories I was installing were in CRLF instead of LF, but I don't think such a thing would occur in your case with a quickload
<aeth> mrcom: does Maxima still do that Fortran recompile in its core that seems to have been written in the 90s and probably isn't as efficient as it could be on e.g. today's SBCL?
<quidnunc> uhuh: Is ultralisp updated just now?
amb007 has joined #commonlisp
<quidnunc> is your ultralisp up to date*
rtypo has joined #commonlisp
<aeth> I wonder how feasible it would be to rewrite the Fortran parts in Maxima with modern CL numerics
<quidnunc> (ql:update-dist "ultralisp")
<uhuh> quidnunc: Updated and was able to install hu.dwim.util without issue here
<uhuh> Altough I think the library is sourced from Quicklisp and not Ultralisp anyways
<quidnunc> uhuh: thanks
<mrcom> No idea, just passing accquaintance with Maxima. Verrrry large library. I kind of doubt, though, that SBCL would outdo barely-above-assembler Fortran for large number-crunching tasks.
<aeth> mrcom: but it's not Fortran, it's Fortran recompiled into CL iirc... which means it probably isn't tuned for SBCL-specific optimizations that help a lot, such as type DECLAREs (I'm assuming) and the DISASSEMBLE wouldn't look as good as handwritten SBCL
<aeth> Not to mention that I think SBCL _could_ beat old Fortran these days, by using SB-SIMD and even the GPU if latency doesn't matter.
<aeth> (But for the GPU, how much of that actually counts as CL is arguable)
<aeth> although perhaps a SB-SIMD backend would be the way to go
<aeth> hmm, this is a bit hard to search for because "CL" is overloaded for "Common Lisp" and "OpenCL" (thankfully, OpenCL is mostly dead these days)
<aeth> I believe it's this... "24 years ago" uh oh. https://github.com/rtoy/f2cl
<ixelp> GitHub - rtoy/f2cl: F2cl - A Fortran 77 to Common Lisp translator
pve has quit [Quit: leaving]
<aeth> actually, the copyright headers say 1992-95
<mrcom> Wow. Why? Before CFFI?
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
<quidnunc> uhuh: One last question: Which OS are you on?
<aeth> looking through the source, it has a bunch of .lisp files here: https://sourceforge.net/p/maxima/code/ci/master/tree/src/numerical/slatec/
<ixelp> Maxima -- GPL CAS based on DOE-MACSYMA / Code / [7c5a15] /src/numerical/slatec
<aeth> and a fortran subdirectory
bitspook has quit [Ping timeout: 245 seconds]
<aeth> and the .lisp files all have "compiled by f2cl version". https://sourceforge.net/p/maxima/code/ci/master/tree/src/numerical/slatec/d9aimp.lisp
<ixelp> Maxima -- GPL CAS based on DOE-MACSYMA / Code / [7c5a15] /src/numerical/slatec/d9aimp.lisp
<aeth> so they're not generated every time
drewjose has quit [Quit: Ping timeout (120 seconds)]
<aeth> They do have type declarations so the generated SBCL assembly may not be _that_ bad, but, idk
drewjose has joined #commonlisp
<uhuh> quidnunc: Windows, SBCL 2.4.3
<aeth> hmm, at a glance, the problem with f2cl might be the translation of (quite a few!) globals to LETs around DEFUNs, which will turn off any top level optimizations (if there are any) because those DEFUNs are not top level and are in a closure
<mrcom> The code's really transpiled, not just marshalling stuff for calling out to foreign libs. I like the translated tags: "label30" "label40".
<quidnunc> uhuh: thank you
<paulapatience> uhuh: there is also the 3d-math library
<aeth> but I suspect this is faster than CFFI because the CFFI (probably) has an overhead and this should have none
<aeth> paulapatience: there are about a dozen such libraries
<uhuh> paulapatience: I am aware of it, but I was hoping to recreate the interface I am familiar with (and also have symbolic support)
Inline has quit [Ping timeout: 248 seconds]
chomwitt has quit [Ping timeout: 246 seconds]
<mrcom> Looks like it's capturing function metadata, too, which makes sense for a symbolic system.
mgl_ has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 244 seconds]
<aeth> uhuh: the Python interface? so the numpy-style one that they're converging on? i.e. https://data-apis.org/array-api/latest/index.html
<ixelp> Python array API standard — Python array API standard 2023.12 documentation
<mrcom> Mixing single and double floats; that doesn't seem performant. (declare (type (single-float) eta) (type (double-float) z sqrtx))
mon_key_phn has quit [Ping timeout: 260 seconds]
mwnaylor has joined #commonlisp
<uhuh> aeth: I'm mainly attracted by the various possible methods of initializing transforms in the library that I'm trying to port.
<aeth> personally, the approach I've been taking with linear algebra lately is an embedded DSL
<aeth> which has to go through an entire IR so I can target SPIR-V (GPUs)
<uhuh> wow, what's the syntax like?
<aeth> exactly the same syntax as CL, no custom reader
chomwitt has joined #commonlisp
<younder> Wouldn't you just use BLAS or LAPACK or CU-BLAS CU-LAPACK for NVidia GPU. Yes, old Fortran code, but I'm pretty sure SBCL won't hold a candle on the performance of these highly optimized libraries.
attila_lendvai_ has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
<aeth> younder: I'm writing my linear algebra DSL to use a multiple-backend IR with SPIR-V (GPU), CL scalar (CPU), and SB-SIMD (CPU) backends for my linear algebra. In principle, this approach allows substitution for (or new writing of!) faster implementations at various parts along the way, with the catch being that the results won't line up exactly when they're different implementations (but even GPU vs SIMD
<aeth> CPU vs scalar CPU will have this issue).
<aeth> younder: I didn't want to take this approach initially, but it does address your objections since, in principle, you can substitute out the backend and it is at "compilation" (technically, macroexpansion) time so there isn't really a cost for the genericness, which is key for math
mgl_ has quit [Ping timeout: 248 seconds]
<aeth> For instance, I'd expect someone could want to port the GPU stuff to CUDA rather than the graphics-oriented SPIR-V (or perhaps going SPIR-V to CUDA if that's doable).
<aeth> In principle, everything I do is overengineered to address anticipated pedantic/niche IRC/internet objections. For instance, my macro that lets you use DEFMETHOD-style syntax for type declarations as a DEFUN alternative also allows you to generate CHECK-TYPE since people object that declarations are not always ideal since they're UB.
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shka has quit [Ping timeout: 265 seconds]
traidare has quit [Ping timeout: 252 seconds]
alcor has quit [Ping timeout: 264 seconds]
alternateved has quit [Remote host closed the connection]
uhuh has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
attila_lendvai_ has quit [Ping timeout: 264 seconds]
kurtis has joined #commonlisp
kurtis has quit [Remote host closed the connection]
kurtis has joined #commonlisp
kurtis has joined #commonlisp
kurtis has quit [Changing host]
kurtis has quit [Ping timeout: 252 seconds]
kurtis has joined #commonlisp
kurtis has quit [Changing host]
kurtis has joined #commonlisp
skeemer has quit [Ping timeout: 252 seconds]
robin has quit [Quit: Leaving]
tane has joined #commonlisp
lucasta has quit [Ping timeout: 246 seconds]
chomwitt has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 248 seconds]
kurtis has quit [Remote host closed the connection]
kurtis has joined #commonlisp
kurtis has quit [Remote host closed the connection]
kurtis has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
ezakimak has quit [Ping timeout: 244 seconds]
donleo has quit [Ping timeout: 260 seconds]
ezakimak has joined #commonlisp
yitzi has joined #commonlisp
robin has joined #commonlisp
rtypo has quit [Ping timeout: 252 seconds]
robin has quit [Quit: Leaving]
Pixel_Outlaw has joined #commonlisp