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/>
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
xlymian has joined #commonlisp
random-nick has quit [Ping timeout: 255 seconds]
<aeth> when you see (* u v) what would you want/expect for a vector? Numpy-style "broadcasting" element-by-element multiplication? dot-product? (cross-product? probably not) type error?
<aeth> Mathematical vec, not the VECTOR type
akoana has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
yitzi has joined #commonlisp
<yitzi> aeth: an error. * is scalar multiplication. Besides overloading the core arithmetic operations is not a good idea, imho.
<Colleen> yitzi: drmeister said at 2024.08.02 12:01:42: I need to up my game with nglview to debug the spiroligomer/receptor design monte carlo code.
<ixelp> magicl/doc/high-level.md at master · quil-lang/magicl · GitHub
<ixelp> 3d Math
<paulapatience> The former uses .* and the latter v* for your case
<paulapatience> aeth: ^
<aeth> I've seen .*
<aeth> I've considered bc* or bc #'* for broadcast, but . seems to be a convention that exists sometimes
<aeth> yitzi: technically, this isn't overloading the core arithmetic operations, this is a vector DSL
<aeth> yitzi: probably even more controversial, but aesthetically seems better than every single vector operation also being a compiler macro that is effectively an entrypoint into the vector DSL
<yitzi> Gotcha.
<aeth> paulapatience: I think I'll go with .* I guess?
amb007 has joined #commonlisp
<yitzi> I just don't think much of the desire to pretend that everything is * and I don't mind names like "inner-product", etc.
<aeth> paulapatience: notice how the .* style extends to more things more clearly (such as e.g. .max) and it applies clearly to matrices as well as vectors
<paulapatience> aeth: Yeah. It's also the style used in Julia, but I think it is suffixed. Let me check.
<aeth> yitzi: I already overload * for matrices, but that's a thing that actually exists for matrices... vectors have "more than one" multiplication so there's no clear * use
<ixelp> Functions · The Julia Language
<aeth> plus, .* can just as easily apply to matrices as vectors
<paulapatience> Take a look at that for some inspiration. I think Julia is well designed in that respect.
<yitzi> Except matrix multiplication isn't commutative.
<paulapatience> aeth: Is this DSL for your spirv library?
<aeth> yitzi: this is first and foremost for shader/CPU shared code... more porting the shader language than trying to port a CL feel to shaders
<aeth> yitzi: so matrix multiplication with * is not going to be surprising at all when like half of the multiplications are going to be matrix ones
amb007 has quit [Ping timeout: 255 seconds]
<yitzi> Ok
yitzi has quit [Remote host closed the connection]
<aeth> paulapatience: right, a large amount of engine code makes sense using the "shader language" that targets SPIR-V without needing to actually run on the GPU
<paulapatience> I'm curious to see how it turns out. I wrote a vector math library some time ago which acted on subvectors via start/end pairs, and if the effective length was 4 or less and detectable at compile-time would unroll the operations.
<paulapatience> But specifying start and end several times for the same vectors is verbose.
<paulapatience> A DSL might have been better.
<paulapatience> (It used start/end pairs to avoid displaced vectors)
<aeth> everything clever and efficient is either (a) too clever for me or (b) too verbose
<aeth> I should be able to target sb-simd as an optional backend, though sb-simd is incomplete in scope at the moment
<paulapatience> aeth: Is this DSL part of zombie-raptor?
<aeth> for now, yes
xlymian has quit [Ping timeout: 276 seconds]
<paulapatience> Being able to target sb-simd is another argument for writing a DSL. Really cool. Keep me apprised of any progress (if you remember)!
<aeth> paulapatience: right, my options were to basically turn every vector operation into a tree-walking compiler macro (as some do!) or do a DSL
<aeth> paulapatience: because right now I manually have a multiple-value, mutation (-into), and consing (regular vector syntax but usually least efficient)... and I'd have to add vectorized, too!
dnhester26 has joined #commonlisp
dnhester26 has quit [Ping timeout: 252 seconds]
lucasta has quit [Quit: Leaving]
molson has quit [Ping timeout: 252 seconds]
dnhester26 has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
amb007 has joined #commonlisp
dnhester26 has quit [Ping timeout: 255 seconds]
pestctrl has quit [Ping timeout: 260 seconds]
amb007 has quit [Ping timeout: 252 seconds]
decweb has quit [Ping timeout: 248 seconds]
istewart has joined #commonlisp
zlqrvx has quit [Ping timeout: 244 seconds]
zlqrvx has joined #commonlisp
xlymian has joined #commonlisp
triffid has quit [Remote host closed the connection]
istewart has quit [Remote host closed the connection]
King_julian has joined #commonlisp
rtypo has quit [Ping timeout: 245 seconds]
King_julian has quit [Ping timeout: 252 seconds]
mandw has quit [Ping timeout: 252 seconds]
mandw has joined #commonlisp
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
varjag has joined #commonlisp
shka has joined #commonlisp
rtypo has joined #commonlisp
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
akoana has quit [Quit: leaving]
cage has joined #commonlisp
easye has joined #commonlisp
attila_lendvai has joined #commonlisp
mgl has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
wacki has joined #commonlisp
Guest3921 is now known as wobbol
JuanDaugherty has joined #commonlisp
kamafam has joined #commonlisp
pve has joined #commonlisp
mgl has joined #commonlisp
dino_tutter has joined #commonlisp
alcor has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
dnhester26 has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
Demosthe1ex has joined #commonlisp
Demosthenex has quit [Ping timeout: 255 seconds]
Demosthenex has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 260 seconds]
mgl has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
amb007 has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
random-nick has joined #commonlisp
mwnaylor has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 265 seconds]
dnhester26 has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 245 seconds]
kamafam has quit [Ping timeout: 248 seconds]
dnhester26 has joined #commonlisp
varjag has joined #commonlisp
varjag has quit [Ping timeout: 260 seconds]
dino_tutter has quit [Remote host closed the connection]
kamafam has joined #commonlisp
pestctrl has joined #commonlisp
brokkoli_origin has quit [Remote host closed the connection]
dino_tutter has joined #commonlisp
brokkoli_origin has joined #commonlisp
Demosthe1ex has joined #commonlisp
Demosthenex has quit [Ping timeout: 260 seconds]
mgl has quit [Ping timeout: 245 seconds]
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #commonlisp
decweb has joined #commonlisp
Demosthenex has joined #commonlisp
Demosthe1ex has quit [Ping timeout: 248 seconds]
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
mgl has joined #commonlisp
wacki has quit [Ping timeout: 252 seconds]
amb007 has quit [Read error: Connection reset by peer]
JuanDaugherty has joined #commonlisp
amb007 has joined #commonlisp
wacki has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
varjag has joined #commonlisp
varjag has quit [Ping timeout: 248 seconds]
yitzi has joined #commonlisp
uhuh has joined #commonlisp
dnhester26 has quit []
awlygj has joined #commonlisp
random-nick has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
dino_tutter has quit [Ping timeout: 244 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
molson has joined #commonlisp
amb007 has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
wacki has joined #commonlisp
X-Scale has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
jonatack has joined #commonlisp
<paulapatience> Is there any precedent for a kind of 'setf-if-not-null' macro or function? Maybe maybe-setf. This is for setting the fields of a C struct which have certain default values, but on the CL side I wanted the defaults to be NIL.
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #commonlisp
jonatack has quit [Excess Flood]
torgny has quit [Changing host]
torgny has joined #commonlisp
jonatack has joined #commonlisp
shawnw has quit [Ping timeout: 255 seconds]
JuanDaugherty has quit [Quit: JuanDaugherty]
cage has quit [Remote host closed the connection]
waleee has joined #commonlisp
<Alfr> paulapatience, ... pray that the C side never wants a list.
<Alfr> or a boolean for that matter.
<paulapatience> Alfr, it would be a vector to pass to the C side rather than a list, so that's fine. For booleans you're right if the default is not false. In my case there are no booleans anyway.
<Alfr> paulapatience, nice. But I'm saying that it's rather easy in CL to make the intent to use a default value explicit by providing some other sentinel value than NIL. You also get support for &optional and &key in the form of default values and supplied-p parameters.
<paulapatience> Ah, I see. Hm, it's not a bad idea. But now that you mention it, the FFI library I'm using represents booleans with 0 and 1, so there is no confusion possible with NIL.
edgar-rft_ has joined #commonlisp
edgar-rft has quit [Ping timeout: 252 seconds]
triffid has joined #commonlisp
donleo has joined #commonlisp
uhuh has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
X-Scale has joined #commonlisp
X-Scale3 has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
mgl has joined #commonlisp
X-Scale has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
X-Scale83 has joined #commonlisp
X-Scale3 has quit [Ping timeout: 256 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale83 has quit [Ping timeout: 256 seconds]
halloy2230 has joined #commonlisp
X-Scale has joined #commonlisp
awlygj has quit [Quit: leaving]
cage has joined #commonlisp
mgl has joined #commonlisp
X-Scale74 has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
pirmin has joined #commonlisp
X-Scale74 has quit [Ping timeout: 256 seconds]
edgar-rft_ is now known as edgar-rft
X-Scale has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
X-Scale has quit [Ping timeout: 256 seconds]
gpiero_ has joined #commonlisp
psilord` has joined #commonlisp
Noisytoot has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
Noisytoot has joined #commonlisp
kg7ski- has joined #commonlisp
Patternm1ster has joined #commonlisp
SAL9000 has quit [Killed (NickServ (GHOST command used by SAL9000_))]
SAL9000_ has joined #commonlisp
dmgk_ has joined #commonlisp
halloy2230 has quit [*.net *.split]
easye has quit [*.net *.split]
attila_lendvai has quit [*.net *.split]
zlqrvx has quit [*.net *.split]
psilord has quit [*.net *.split]
beach has quit [*.net *.split]
kg7ski has quit [*.net *.split]
pkal has quit [*.net *.split]
dmgk has quit [*.net *.split]
gpiero has quit [*.net *.split]
jmercouris has quit [*.net *.split]
lonjil has quit [*.net *.split]
kmroz has quit [*.net *.split]
Patternmaster has quit [*.net *.split]
susam has quit [*.net *.split]
dmgk_ is now known as dmgk
easye has joined #commonlisp
zlqrvx has joined #commonlisp
beach has joined #commonlisp
attila_lendvai has joined #commonlisp
pkal has joined #commonlisp
jmercouris has joined #commonlisp
susam has joined #commonlisp
lonjil has joined #commonlisp
kmroz has joined #commonlisp
X-Scale has joined #commonlisp
lucasta has joined #commonlisp
psilord` is now known as psilord
X-Scale has quit [Ping timeout: 256 seconds]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
slyrus_ has quit []
mgl has joined #commonlisp
beach` has joined #commonlisp
mgl has quit [Ping timeout: 245 seconds]
beach has quit [Ping timeout: 265 seconds]
beach`` has joined #commonlisp
psilord has quit [Remote host closed the connection]
beach` has quit [Ping timeout: 264 seconds]
dino_tutter has joined #commonlisp
kingcons has joined #commonlisp
beach`` is now known as beach
X-Scale has joined #commonlisp
shawnw has joined #commonlisp
mgl has joined #commonlisp
psilord has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 252 seconds]
shawnw has quit [Ping timeout: 260 seconds]
mgl has quit [Ping timeout: 248 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
xlymian has quit [Ping timeout: 276 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
tisanae has joined #commonlisp
tisanae has quit [Client Quit]
terrorjack has joined #commonlisp
pirmin has quit [Remote host closed the connection]
JuanDaugherty has joined #commonlisp
varjag has joined #commonlisp
xlymian has joined #commonlisp
kamafam has quit [Read error: Connection reset by peer]
yitzi has quit [Remote host closed the connection]
pestctrl has quit [Remote host closed the connection]
mwnaylor has joined #commonlisp
akoana has joined #commonlisp
attila_lendvai has quit [Ping timeout: 265 seconds]
zephyr has joined #commonlisp
zephyr has quit [Quit: The Lounge - https://thelounge.chat]
zephyr has joined #commonlisp
Alfr has quit [Quit: Leaving]
rtypo has quit [Ping timeout: 244 seconds]
xlymian has quit [Ping timeout: 276 seconds]
char has joined #commonlisp
pve has quit [Quit: leaving]
thuna` has quit [Remote host closed the connection]
xlymian has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
Alfr has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
alcor has quit [Ping timeout: 260 seconds]
zetef has joined #commonlisp
zetef has quit [Client Quit]
akoana has quit [Ping timeout: 248 seconds]
mala has quit [Quit: ZNC 1.6.1 - http://znc.in]
shka has quit [Ping timeout: 260 seconds]
mala has joined #commonlisp
dino_tutter has quit [Ping timeout: 276 seconds]
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.2)]
Pixel_Outlaw has joined #commonlisp
mala has quit [Quit: ZNC 1.6.1 - http://znc.in]
mala has joined #commonlisp
zetef has joined #commonlisp
zetef has quit [Client Quit]
yitzi has joined #commonlisp
rendar has quit [Read error: Connection reset by peer]
rendar has joined #commonlisp
ebrasca has joined #commonlisp
eddof13 has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eddof13 has quit [Client Quit]
jrm has quit [Quit: ciao]
jrm has joined #commonlisp
cmack has joined #commonlisp
eddof13 has joined #commonlisp
donleo has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: eddof13]
yitzi has quit [Remote host closed the connection]
troojg has joined #commonlisp
zephyr has quit [Quit: The Lounge - https://thelounge.chat]
zephyr has joined #commonlisp
troojg has quit [Ping timeout: 248 seconds]
robin has quit [Quit: Leaving]
thuna` has joined #commonlisp
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
mala has quit [Quit: ZNC 1.6.1 - http://znc.in]
mala has joined #commonlisp