freenode/#lisp - IRC Chatlog
Search
8:15:54
fiddlerwoaroof[m
The best part of programming is how you can always make work to avoid the bits you don't want to do :)
10:13:33
flip214
I've got a (DEFUN foo (.. &key a)), and in the same file later on a call to FOO - with a mistyped keyword argument.
10:14:16
flip214
I would have expected to get a compile error via ASDF, but it was silently successful... Do I need to change some parameter to get "better" checking?
10:14:42
flip214
I'm well aware that FOO could have been redefined before being called, but at least a warning or style-warning would be nice.
10:17:19
aeth
flip214: which implementation? I do get an error here in SBCL: (with-compilation-unit () (defun foo (&key a) a) (defun bar () (foo :b 42)))
10:17:41
scymtym
flip214: with SBCL i get a full warning for COMPILE-FILE and an error from ASDF for a file containing (defun foo (&key a)) (defun bar () (foo :b 2))
10:18:30
scymtym
or do you mean that the value of the keyword argument is of the wrong type when you say "mistyped"?
10:18:46
aeth
flip214: compilation-unit will behave the same as a file compilation (so C-c C-k, not C-c C-c)
10:19:34
aeth
I used with-compilation-unit so I could get the same effect as a file compilation, but in the REPL
10:19:42
scymtym
flip214: my example is like that as well and as i said, i get a full warning and ASDF error
10:27:51
scymtym
without :VERBOSE, quicklisp seems to muffle all warnings, not just style warnings. that is probably why the "outcome" changes
10:29:02
scymtym
flip214: did you change the source file or delete the FASL before trying the above? once the FASL is produced, no compilation is performed and the warning is not signaled again
10:29:46
flip214
and the :verbose t output includes warnings, but the script doesn't stop with an error
10:34:56
scymtym
flip214: can you share the code? this seems to be more about the surrounding setup than SBCL or ASDF
10:36:55
flip214
(asdf:operate 'asdf:load-op :XXX :on-warnings :error :on-failure :error :verbose t)
10:37:40
flip214
I touched a file with warnings, and the file gets recompiled - I get the warnings during compilation
12:00:10
edgar-rft
I think typos are type-errors, too. But they happen at TYPE-TIME what is *before* READ-TIME. The spec doesn't seem to be very well-worded in that regard :-)
12:13:51
edgar-rft
There are some success stories but also many projects we never heard of again. Maybe they accidentally deleted themselves :-)
12:18:54
edgar-rft
davros_: I played for some time with Genetic Programming but it turned out that writing a working fitness function (the thing that decides if the generated code works better or worse than some other code) requires more detaIl knowlege than is needed for solving the problem youself.
12:20:46
edgar-rft
It's in so far good that you learn a lot about different AI ideas and concepts but do not expect too much useful results :-)
12:54:42
davros_
edgar-rft, i ask because elsewhere i'm talking to someone who has their own picture of how to do AGI and it involves code generation (although what they describe sounds even more far fetched), i asked them if they'd ever heard of lisp beign used for this sort of thing
13:10:31
edgar-rft
davros_: you don't necessarily need Lisp for self-rewriting code, but in Lisp it's particularly easy because lists are first-class data objects, so everything for code generation is already built-in. Also Genetic Programming *can* give useful results, but often it depends on how lucky you are to find a useful result in tolerable time :-)
13:30:32
davros_
yeah i know - any programming langauge can print source and spawn a compiler, or load dynamc modules or ahve an eval function.. but it's LISP's homoiconicity that's it's USP
13:34:26
flip214
edgar-rft: well, self-*modifying* code is very easy on CPUs without any MMU... 6502, for example ;)
13:34:55
phoe
in today's environment, homoiconicity is just a shortcut; people work around this issue in other languages by operating on ASTs, or just printing out code into strings and reading it afterwards