istewart has quit [Quit: Konversation terminated!]
chomwitt has joined #commonlisp
by9042 has joined #commonlisp
ryanbw has joined #commonlisp
ingeniot has joined #commonlisp
FallenSky has quit [Ping timeout: 260 seconds]
lusciouslover has quit [Quit: \]
lusciouslover has joined #commonlisp
Oladon has quit [Quit: Leaving.]
olivial has quit [Ping timeout: 276 seconds]
olivial has joined #commonlisp
markb1 has quit [Ping timeout: 260 seconds]
lusciouslover has quit [Remote host closed the connection]
lusciouslover has joined #commonlisp
markb1 has joined #commonlisp
rgherdt has joined #commonlisp
ingeniot has quit [Ping timeout: 268 seconds]
screwlisp has quit [Remote host closed the connection]
edgar-rft has joined #commonlisp
edgar-rft` has quit [Ping timeout: 268 seconds]
FallenSky has joined #commonlisp
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
pve has joined #commonlisp
bpanthi977 has quit [Ping timeout: 245 seconds]
lusciouslover has quit [Remote host closed the connection]
lusciouslover has joined #commonlisp
chomwitt has quit [Ping timeout: 268 seconds]
<nil>
bike: In the old days pathname-host would be what machine-instance returns now, a unique supposedly identifier of the machine, at least on the local net. It seems sbcl hijacked it for their own purposes because nobody really uses it, and for unix,macos,windows when they have network drives, the host is actually part of the pathname-directory.
slyrus has quit [Ping timeout: 252 seconds]
iNomad has joined #commonlisp
chkhd has joined #commonlisp
by9042 has quit [Ping timeout: 260 seconds]
<nil>
In some way Emacs with the right packages loaded acts more like old Lisp where you can just put a host name in front of a path and it will use ssh or something to act like it's just another path.
rtypo has joined #commonlisp
slyrus has joined #commonlisp
chkhd has quit [Quit: Poof...]
chkhd has joined #commonlisp
reb` has joined #commonlisp
apac has joined #commonlisp
reb has quit [Ping timeout: 260 seconds]
zwr has quit [Ping timeout: 260 seconds]
zwr has joined #commonlisp
by9042 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
FallenSky has quit [Ping timeout: 252 seconds]
FallenSky has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
slyrus has joined #commonlisp
lusciouslover has quit [Remote host closed the connection]
<ixelp>
Setup A New Documentation Site · Issue #11 · sharplispers/lparallel
ingeniot has joined #commonlisp
flip214 has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
m5zs7k has quit [Ping timeout: 248 seconds]
andromeda has joined #commonlisp
<andromeda>
Is this the right place to ask stupid beginner questions or is there a better channel for that?
slyrus_ has joined #commonlisp
andromeda has quit [Client Quit]
slyrus has quit [Ping timeout: 260 seconds]
m5zs7k has joined #commonlisp
reb`` has joined #commonlisp
slyrus_ has quit [Ping timeout: 252 seconds]
apac has quit [Ping timeout: 265 seconds]
reb` has quit [Ping timeout: 248 seconds]
ingeniot has quit [Ping timeout: 252 seconds]
<g-gundam>
(they give up so quickly)
apac has joined #commonlisp
treflip has joined #commonlisp
by9042 has quit [Quit: Konversation terminated!]
veqq has quit [Remote host closed the connection]
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
ingeniot has joined #commonlisp
mwnaylor has joined #commonlisp
rgherdt_ has joined #commonlisp
rgherdt has quit [Read error: Connection reset by peer]
TactfulCitrus has quit [Remote host closed the connection]
<drmeister>
Hey folks I have a common lisp coding style question. I have a specialized vector of double-floats where successive values can have different meaning. As in at a particular position in the vector it can store successive values labeled (q6 theta6 phi6) and in other places it can store (q5 phi5).
<drmeister>
Here is an example of some macros I wrote to deal with this and then some functions that access the values the old way I was using with hardcoded integer offsets and then the new way using the macros...
<drmeister>
For example, there is a function `extract-ring6-cps-old` that uses the old way and `extract-ring6-cps` that uses the new way with macros. Does anyone have any suggestions or thoughts on how to improve the macro style in any way?
<drmeister>
I also didn't test this code yet and now that I'm compiling it I see some problems. (sheesh)
<drmeister>
Think of it as pseudocode until I get it actually working.
<jackdaniel>
perhaps I don't understand the thing in here, but wouldn't defining a structure with the allocation type vector define named accessors for you?
<jackdaniel>
there's also involved cpindex offset it seems, so nevermind then
<drmeister>
Hi @jackdaniel - right - I need a cpindex into the vector to identify where the three (or two) values start.
<beach>
drmeister: In what way do you want this thing to be "future proof"?
<beach>
drmeister: Will you add 7q etc?
<drmeister>
Yes - I may do that in the future.
chomwitt has joined #commonlisp
<beach>
If the relevant values are always sequential, it seems to me the old way is more readable.
<drmeister>
I'm storing the minimum number of parameters required to represent a 5-member ring (two - q phi) and 6-member rings (three - q theta phi). In the future I may decide to handle 7-member rings.
<drmeister>
I may also reorder the values - the order is arbitrarily chosen. I recently picked (q theta phi) rather than (phi theta q). Also 6-member rings could be represented as (phi2 q2 q3) - and I started with that and then had to rewrite a lot of code to switch to the new representation and order.
<beach>
Right. I take that back.
<|3b|>
if you don't use multiple internal vectors, i'd probably be tempted to hide it in with-cpinternals or similar, and just pass cpindex
<drmeister>
I picked (q theta phi) because "q" has units of distance and "theta" and "phi" are in radians.
<beach>
You are still going to have the problem of labeling the values in the place where they are used, no?
<drmeister>
|3b| That is an interesting suggestion. Deal with them as a group rather than one value at a time.
<beach>
And that suggestion might also solve the problem I just mentioned.
<drmeister>
My current code has a lot of hard-coded offsets like this...
<drmeister>
This is all in one file - so at least I have that.
<|3b|>
sort of depends on how much you do within one function, or how much you can afford the cost of a special to make it work across functions, but (with-cpinternals (cpinternals) ... (@6q index) (@6phi index)... ) etc, and if you usually operate on whole set at once, a version that expands to values
<|3b|>
(which you can setf directly, so works for the 2nd example too)
<drmeister>
I do work with the whole set at once. Sometimes its a 5-member-ring pair (q phi) and sometimes it's a 6-member ring triplet (q theta phi)
<|3b|>
i suppose you could even mix the 2 if a special is on the edge, bind the special for global macros to use, and shadow those with a macrolet that uses a lexical binding
slyrus has joined #commonlisp
<drmeister>
|3b| What is `@6q` within `(with-cpinternals (cpinternals) ... (@6q index) (@6phi index)... )`
<drmeister>
Are they defined with `macrolet` within the `with-cpinternals` macro?
<|3b|>
same as your (@6q cpinternals cpindex), just with cpinternals from the enclosing macro
<drmeister>
Nice.
<drmeister>
I'll code that up and see how it looks.
<|3b|>
either way... bind a special and access that from a global macro, or bind a lexical var and use from macrolet
<|3b|>
(or do both, if accessing a special is somewhat expensive and binding one isn't, and you want it to work across functions)
* |3b|
is assuming high performance is a goal from the data structure
slyrus_ has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
<|3b|>
though tiny functions doing arefs without any declarations says maybe not :)
* |3b|
doesn't know how that does on your compiler though, so maybe
slyrus has joined #commonlisp
<|3b|>
multiple-value-call can also be useful for things like that were you have small data groups of values stored in a big blob, read/write as a set, then pass around to things that know about the group as VALUES
<|3b|>
instead of passing the blob+index and read/write for every intermediate step
slyrus_ has quit [Ping timeout: 260 seconds]
<beach>
I am just thinking about how to implement MULTIPLE-VALUE-CALL, and I am wondering how efficient it is in existing implementations. How is it done in SBCL, for instance?
King_julian has quit [Ping timeout: 276 seconds]
random-nick has joined #commonlisp
treflip` has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
King_julian has joined #commonlisp
* |3b|
has the impression it is fast on sbcl (assuming known types, no boxing, etc), but no recent actual evidence now that i think about it. and no idea how it is implemented either
<jackdaniel>
in ecl i nthe worst case scenario you push values onto the stack and then apply them to the function
treflip has quit [Ping timeout: 268 seconds]
<|3b|>
possibly also helps that i would tend to inline the sort of small functions where it is particularly useful for, making it even easier for the compiler
<jackdaniel>
if number of values of each argument form in MVC is known then it may be optimized
slyrus has joined #commonlisp
<beach>
jackdaniel: OK, but where are the values put by individual argument forms, and how are they saved between the evaluation of each argument form?
<beach>
... in the general case.
<jackdaniel>
in pseudo code: OP_CALL OP_PUSHVALUES OP_CALL OP_PUSHMOREVALUES ... OP_CALL_FROM_STACK where pushvalues puts them on the stack (in ecl case the stack is a runime structure holding lisp values)
<beach>
Got it. Thanks.
<jackdaniel>
sure
<beach>
Oh, one more. Where are the values after OP_CALL has been executed?
slyrus_ has joined #commonlisp
<drmeister>
|3b| I'm not very practiced with nested macrolet definitions. The following is wrong because the compiler is complaining about cpinternals. How should this look?
<|3b|>
could use alexandria:once-only or similar instead of manually rebinding to gensyms, and i'd add a symbol macro for the VALUES form with all 3 as well
<|3b|>
though i guess that would hide the ordering unless it had a long name, so maybe not if you aren't sure about the ordering
slyrus_ has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
<drmeister>
I can can now clean up the code like this...
<drmeister>
It's making dealing with this vector of double-floats containing lots of different sized groupings of numbers with different meaning easier to deal with.
slyrus_ has quit [Ping timeout: 245 seconds]
slyrus has joined #commonlisp
<drmeister>
It would be nice if I could sufix the `@5q` with something like `@5q-first` and `@5q-second` if I need to nest these.
<drmeister>
Wow, I'm going to start calling ChatGPT(o3) "Mac".
<drmeister>
Prompt: "Add a third optional parameter that is added as a suffix to the @5q and @5phi symbol names like @5q-suffix and @5phi-suffix in cases where I want to nest more than one of these with-cpring5 macros."
chkhd has quit [Quit: ZZZzzz…]
chkhd has joined #commonlisp
* drmeister
hopes he doesn't take vacations.
chkhd has quit [Ping timeout: 268 seconds]
slyrus_ has joined #commonlisp
slyrus has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
slyrus_ has quit [Ping timeout: 248 seconds]
slyrus has quit [Ping timeout: 272 seconds]
treflip`` has joined #commonlisp
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
slyrus has joined #commonlisp
treflip` has quit [Ping timeout: 268 seconds]
Everything has joined #commonlisp
treflip`` has quit [Remote host closed the connection]
slyrus has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
slyrus_ has joined #commonlisp
TactfulCitrus has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
chomwitt has quit [Ping timeout: 252 seconds]
TactfulCitrus has quit [Read error: Connection reset by peer]
Gleefre has quit [Remote host closed the connection]
slyrus_ has quit [Ping timeout: 268 seconds]
slyrus has joined #commonlisp
yitzi has joined #commonlisp
calx-87 has joined #commonlisp
slyrus has quit [Ping timeout: 276 seconds]
slyrus has joined #commonlisp
semz has quit [Quit: ZNC 1.8.2+deb2ubuntu0.1 - https://znc.in]
slyrus_ has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
netchan has quit [Ping timeout: 252 seconds]
slyrus_ has quit [Ping timeout: 245 seconds]
semz has joined #commonlisp
slyrus has joined #commonlisp
rootnode_ has left #commonlisp [ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.1)]
slyrus_ has joined #commonlisp
Oddity has quit [Ping timeout: 265 seconds]
acdw has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
slyrus has joined #commonlisp
slyrus_ has quit [Ping timeout: 272 seconds]
slyrus_ has joined #commonlisp
slyrus has quit [Ping timeout: 245 seconds]
slyrus_ has quit [Ping timeout: 248 seconds]
slyrus has joined #commonlisp
acdw has quit [Quit: See You Space Cowpokes . . . . .]