<yottabyte>
incomplete function, but yeah. primarily I'm running it on windows which needs the " escaped even in the ' in the --data, that's why the \\ are present before each \"
yitzi has quit [Remote host closed the connection]
<yottabyte>
but I copy and paste exactly what's in that format t line and it works fine
bubblegum has quit [Read error: Connection reset by peer]
bubblegum has joined #commonlisp
wacki has joined #commonlisp
Inline has joined #commonlisp
cage has joined #commonlisp
xlymian has joined #commonlisp
alcor has joined #commonlisp
mgl has joined #commonlisp
dnhester26 has joined #commonlisp
mgl has quit [Ping timeout: 248 seconds]
shka has joined #commonlisp
Inline has quit [Quit: Leaving]
pve has joined #commonlisp
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
X-Scale has quit [Ping timeout: 256 seconds]
dnhester26 has quit [Ping timeout: 244 seconds]
danza has joined #commonlisp
msv has quit [Remote host closed the connection]
danz63218 has joined #commonlisp
danza has quit [Read error: Connection reset by peer]
dino_tutter has joined #commonlisp
McParen has joined #commonlisp
donleo has joined #commonlisp
mgl has joined #commonlisp
mgl has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
<cage>
Hi!
<cage>
I wonder why: (loop for i single-float from 0.0f0 to 10.0f0 by 0.0f0 collect i) => signal error
<cage>
but (loop for i single-float from 0.0f0 to 10.0f0 by 0.1f0 collect i) => (0.0 ...)
<cage>
is it a bit strange?
<cage>
FWIW i am using SBCL 2.3.7
<beach>
Sounds like a bug.
uhuh has joined #commonlisp
mwnaylor has quit [Ping timeout: 260 seconds]
JuanDaugherty has joined #commonlisp
<uhuh>
I want to transpile common lisp code onto other platforms like microcontrollers. Do any of the compiling implementations let you run their optimizing passes without fully compiling the input? I want to give a function some lisp code and get a simplified/optimized version back without inserting it into my lisp environment.
<beach>
uhuh: I suspect most optimization takes place on intermediate code, so there should be some representation that has been optimized, but that is not native code. But that intermediate code probably won't look like Lisp at all. And this is highly specific to each Common Lisp implementation.
<JuanDaugherty>
seems misguided
<JuanDaugherty>
big time actually
<JuanDaugherty>
without in anyway being nonsensical
<cage>
thanks beach, i am going to send the code on #sbcl, then
<uhuh>
Ok then I'm assuming it would be better to implement things from scratch rather than trying to piggyback off of the existing stuff.
<JuanDaugherty>
given the decision to do it, you could take some 'lisp' and adapt its backend to produce uc code
<JuanDaugherty>
and there's py
<beach>
uhuh: You might be able to use bike's Maclina that generates somewhat optimized bytecodes from Common Lisp source. The bytecodes can be interpreted, or translated to something like C.
<uhuh>
thanks, I'll look into that
uhuh has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
decweb has joined #commonlisp
bollu has quit [Quit: Ping timeout (120 seconds)]
bollu has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
wacki has joined #commonlisp
pestctrl has joined #commonlisp
<beach>
Please give me a realistic example (to put in a book) of a generic function with a single required parameter, two or three methods where more than one method is applicable to a certain argument. I am thinking either specializers, list/cons, list/null, number/float, sequence/list, or something similar.
<beach>
I cold put in something silly like (format t "A number was given"), but I am looking for something semi-useful.
<beach>
*could
<beach>
It should make sense to call CALL-NEXT-METHOD in the most specialized method applicable.
<selpoke>
uh
<selpoke>
you could reimplement sqrt as a generic function
<beach>
That's an idea. Thanks! I'll contemplate that one.
<selpoke>
well, not quite sqrt
<selpoke>
the method that specialises on complex numbers returns the two values that square to the argument
<beach>
Yes, I see.
<selpoke>
if the argument is real - you know only one unique solution exists, so another method specialised on reals computes that solution
<selpoke>
happy to help
<selpoke>
what are you writing?
<beach>
It's the book that was discussed the other day, about CLOS programming.
<selpoke>
oh right
<beach>
I want some examples that don't require user-defined classes, so as to explain generic functions and methods more easily.
<selpoke>
ive read amop and thought i understood it.. i think i need to read it another five times
<beach>
I know what you mean.
<selpoke>
i suppose sqrt might not be that interesting
<selpoke>
as people expect or know it to exist in common lisp
<beach>
No, that's fine. I am already using a recursive generic LENGTH function as one example.
<selpoke>
ok
<beach>
... pointing out that LENGTH should not be recursive, of course.
younder has joined #commonlisp
<McParen>
beach: a new lisp book in the works sounds great. congrats.
<McParen>
can you say when it is getting published?
<beach>
Thanks, but don't hold your breath. It is very hard for me to work without the encouragement of my favorite coauthor. So we'll see how long it lasts.
<McParen>
i get excited like a kid every single time when i hear that somebody is working on a new book.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
danz63218 has quit [Remote host closed the connection]
danza has joined #commonlisp
semarie has quit [Ping timeout: 276 seconds]
amb007 has quit [Ping timeout: 276 seconds]
amb007 has joined #commonlisp
semarie has joined #commonlisp
JuanDaugherty has quit [Quit: JuanDaugherty]
danz48777 has joined #commonlisp
danza has quit [Ping timeout: 252 seconds]
<paulapatience>
I'm starting a library for mathematical optimization in Common Lisp, initially specialized to derivative-free optimization algorithms, as that is what I am studying. https://git.sr.ht/~paulapatience/fossick
<ixelp>
~paulapatience/fossick - Mathematical optimization algorithms and utilities in Common Lisp - sourcehut git
<ixelp>
GitHub - libprima/prima: PRIMA is a package for solving general nonlinear optimization problems without using derivative [...]
<beach>
Nice!
<beach>
I have always wanted a simplex solver that can handle rational numbers, so that the result is exact if the parameters are rational.
X-Scale has joined #commonlisp
<beach>
paulapatience: Are you planning to include things like flow optimizations in graphs, SAT solvers, etc?
McParen has left #commonlisp [#commonlisp]
X-Scale has quit [Ping timeout: 256 seconds]
<selpoke>
i regularly use sat/smt with lisp
<selpoke>
so far i have prepared the problem instances in lisp and handed them off to an external solver though
rtypo has joined #commonlisp
danz48777 has quit [Remote host closed the connection]
danza has joined #commonlisp
awlygj has quit [Remote host closed the connection]
<paulapatience>
beach: I don't have any experience with those so I wouldn't be qualified to write those parts, but if people are willing to contribute, I'm open including that.
<paulapatience>
s/open/open to/
<paulapatience>
My plan for now is to write wrappers for some existing libraries, and eventually I will implement some derivative-free algorithms natively in Lisp, since that's more my field of interest.
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wacki has joined #commonlisp
<selpoke>
it would be interesting to implement an smt solver in common lisp
<selpoke>
but a huge project
yitzi has joined #commonlisp
<danza>
huh does non exist already?
<danza>
*none
<pve>
beach: I think Garnet's object system is called "KR".