Search
Thursday, 12th of January 2023, 23:03:27 UTC
23:03:38
ldb
ACTION just completed adding lisp symbol index to CLtL2, would not consider add the glossary
23:13:48
nij-
Any CL system that helps compute "1+8*9" (=> 73) and so forth?
23:19:22
White_Flame
you mean a library to call? there is an infix-math system
23:24:04
ldb
april helps compute "1+8×9" → 73
23:25:13
nij-
But I don't like typing ×..
23:25:50
nij-
Input needs to be a string, and output is the calculated answer..
23:27:17
morganw
I'm pretty sure that the Winston and Horn book has a section which implements an infix form converter.
23:31:09
White_Flame
most lisp infix tools deal with (1 + 2 * 3) sorts of forms, not strings, so breaking apart the string will be a separate issue.
23:31:38
ldb
as these days there are plenty of parser generator I just recommand to try build one with them, like https://github.com/eugeneia/maxpc
0:03:18
pjb
nij-: you may also consider using maxima.
0:03:35
pjb
(but it's overkill as a 4-operation calculator).
2:49:16
nij-
I'm sure maxima has that subcomponent..
2:49:34
nij-
but I don't know how to just use that, and let lisp to parse the result into lisp.
2:58:28
edgar-rft
nij-: there's an infix macro written by Mark Kantrowitz somewhere in the CMU archives that can compute infix math expressions
2:59:58
edgar-rft
CLiki knows more about it -> https://www.cliki.net/Infix
7:47:12
jackdaniel
White_Flame: pjb: kakuhen: phoe: thanks. yes, after examining a bit closer the protocol, there is always a surrounding logand operator, so the negative value will be yanked either way, so I'm good with (logand #<something> (lognot #<the number>)) ; the issue was that the negation was used with unqualified integer values (i.e 3), so I couldn't know how many bits the number had
Friday, 13th of January 2023, 11:03:27 UTC