libera/#commonlisp - IRC Chatlog
Search
20:33:21
pjb
_death: you can still run lisp 1.5 code in CL. http://informatimago.free.fr./i/develop/lisp/com/informatimago/small-cl-pgms/wang.html
20:39:32
random-jellyfish
is there some open source parser that can translate C++ code to lisp s-expressions e.g. (int main () (printf "Hello World") (return 0)) ?
20:42:51
random-jellyfish
common lisp has powerful pattern matching libs that could be useful for linting
20:44:49
yitzi
I doubt that a CL based linter will be able to determine more info about C++ code than clang ASTs.
20:49:15
random-jellyfish
I'm assuming it would be easier to work with sexpressions in lisp than with some AST structs in C++
20:50:24
an_origamian[m]
Clang is one of the few libraries that can properly parse C++ though. From what I've heard, it's really hard to parse yourself.
20:51:03
an_origamian[m]
And theoretically, you can call Clang from Lisp. Yitzi would know more about that though.
20:52:00
random-jellyfish
yeah, it would be unrealistic and impractical to even try to write a c++ parser from scratch, the standard is thicker than the bible lol
21:07:25
pjb
random-jellyfish: I started a C11 implementation in CL, but I only have cpp, the parser is not done yet. On the other hand, it seems that gilberth in #lispcafe is also working on a C or C++ parser, and he's more advanced.
21:10:45
an_origamian[m]
I'm guessing that's because it says it's probably not for practical coding.
5:24:22
semz
I don't understand this part of clhs 7.6.4: "The checking of the validity of keyword names is done in the generic function, not in each method. A method is invoked as if the keyword argument pair whose name is :allow-other-keys and whose value is true were supplied, though no such argument pair will be passed."
5:26:20
beach
It means that the method does not have to explicitly accept the keyword arguments that the generic function accepts because the verification is disabled.
5:27:45
semz
Oh, I see; I was unaware that :allow-other-keys had a special meaning for keyword functions.
6:14:55
doulos05
I've got a problem with a function that I want to assemble a string and then return it. https://pastebin.com/GAgdeDjH
6:19:27
doulos05
Both can hit. Eventually, there will be different forms of primary move and secondary move
6:20:02
doulos05
I wrapped those CONCATENATE calls in SETFs to mv-string to fix it, is that the best way?
6:20:29
White_Flame
there are many ways, and I don't think they're going to be that significantly different in syntactic size or performance
6:21:16
White_Flame
or have a single FORMAT string whose components render as "" if the conditional fails, etc