freenode/#lisp - IRC Chatlog
Search
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
13:37:48
flip214
aorst: well, one major point in Let-over-lambda was code-walking - "understanding" the language needs more than just a CONS-tree. (LET (let) (LET ((let let)) let))
13:49:14
tfb
phoe: there's a difference still: Lisp has a 'syntax of least commitment', Python (say) doesn't, anywhere near
13:51:24
tfb
and the *common* workaround is still 'language in a string' and the death and horror of that
13:56:47
tfb
edgar-rft: setiously, in my most recent job the system was configured by, I think, two (perhaps three) layered m4-style macro languages, each treating the languages below it as strings.
13:59:48
splittist
everyone knows there is no problem in devops that can't be solved by another layer of yaml
14:06:43
tfb
edgar-rft: well, they weren't idiots, anywhere near. I think that the ideas that make Lisp so interesting just are still not widely distributed.
20:49:05
phoe
"eql may not be true of two floats even when they represent the same value. = is used to compare mathematical values."
20:51:27
sjl
1.0d0 and 1.0f0 represent the same value but might not be eql because they're different types (in SBCL)
20:58:27
mfiano
The standard doesn't adopt IEEE754, only recommends its use. They may have been implying that depending on the floating point encoding, it may not hold true, but = does. (eql 0f0 -0f0) ; => NIL, but (= 0f0 -0f0) ; => T
20:58:33
daphnis
how do you write a macro that accepts unquoted symbols and produces a function call with quoted symbols? eg.: (mac a b c) --> (fun 'a 'b 'c)
20:59:11
no-defun-allowed
(defmacro mac (&rest rest) `(fun ,@(loop for symbol in rest collect (list 'quote rest))))
21:03:48
mfiano
alternatively, something like: (defmacro foo (sym &body body) `(,sym ,@(mapcar (lambda (x) `',x) body)))
21:04:29
Nilby
phoe: consider maybe an implementation that natively supported different float formats like maxima's bigfloat
21:05:51
_death
phoe: you can encode all pairs, sans a few large easy-to-demarcate portions of equivalence classes, of floats by bruteforce and try them
21:10:11
mfiano
Always found CLISP's arbitrary precision floats strange, in regard to the constant value pi. IIRC, the manual even says that it is no longer a constant value, which seems wrong to me.
21:12:54
Nilby
_death: Yes, but I'm not that pleased with clisp anymore, and I haven't used sb-mpfr because I worry about implementation in C and possible overhead.