Am Mittwoch, den 23.09.2009, 15:42 +0900 schrieb Teika Kazura: > Hi, all. > > It's true that librep byte-compiler is buggy, as Timo said. Let me > explain. > > First case: > ------------------------------------------------------------------------ > ;; 1st > (define-structure sawfish.wm.compiler-bug > (export ) > (open rep ) > > (define (outer) > (define (double arg) > arg) > > (define (inner) > (double t) > ) > (inner) > ) > ) > ------------------------------------------------------------------------- > Let's see what happens on (double), one by one. It is defined inside > of (outer). In this case, Compiler says nothing. OK. > > ------------------------------------------------------------------------ > ;; 2nd > (define-structure sawfish.wm.compiler-bug > (export ) > (open rep ) > > (define (double) > t) > > (define (outer) > (define (double arg) > arg) > > (double t) > ) > ) > ------------------------------------------------------------------------ > In this case, (double) is two-fold. Inside of (outer), the inner > definition is used. Compiler says nothing. OK. > > Now, I'll pull out a rabbit from the hat. > ------------------------------------------------------------------------ > ;; 3rd > (define-structure sawfish.wm.compiler-bug > (export ) > (open rep ) > > (define (double) > t) > > (define (outer) > (define (double arg) > arg) > > (define (inner) > (double t) > ) > (inner) > ) > ) > ------------------------------------------------------------------------ > What's the difference? (double) is now called inside of (inner). > Because (inner) is defined inside of (outer), it should use the > inner definition of (double). > > But in this case, compiler warns: > bug.jl:14: In function `outer': > bug.jl:14: warning: too many arguments to `double' (1 given, 0 used) > > The code should be ok. So it's a compiler bug. > > If you liked my magic show, now let me offer you a dove: > ------------------------------------------------------------------------ > ;; 4th > (define-structure sawfish.wm.compiler-bug > (export ) > (open rep ) > > (define (double) > t) > > (define (ok-func) > t) > > (define (outer) > (define (double arg) > arg) > (define (ok-func arg) > arg) > > (define (inner) > (double t) > ) > (inner) > (ok-func t)) > > ) > ------------------------------------------------------------------------ > Now, (ok-func) is added. Compiler says: > bug.jl:19: In function `outer': > bug.jl:19: warning: too many arguments to `double' (1 given, 0 used) > bug.jl:22: warning: too many arguments to `ok-func' (1 given, 0 used) > > Please compare it to (double) in 2nd example. It's defined in the same > manner, and it used to be ok. But (double) has confused the compiler > to shift its policy; call to (ok-func) is declared to be illegal. > I hope that it's only the byte compiler, not the execution. The > 4th example looks quiet nasty. > > I don't know if what I've displayed here is related to prompt[-*].jl > problem, but remember, there *is* a bug(s). > > Now, dear Sawfish lovers, it's really welcome to show that librep is > buggy, and to exhibit exactly how it turns us down. If it gets rid of > an issue of real problem, then it's good. But > On Sat, 19 Sep 2009 18:59:28 +0300, Timo Korvola wrote: > > The original code looks fine to me. > > So, the simplest solution will be to go back to the original one. > Remember that we're in short of developers. Please use your energy to > actually improve Sawfish, and don't get stuck on aesthetics. HEAD already reverted + compiler shut up = goal achieved. > I'm sorry for being lazy, staying away form your discussions. I've > been aware of the problem, but I've deffered the analysis until > today. (One reason for my truancy is that your arguments level is > higher than my understandings. I don't know lisp well. I've never > understood fluid ;) > > Thank you Matthew, Jeremy, Chris and Timo for your sincerity. > > # I wonder if someone could summarize the util.prompt discussion. > > With best regards, > Teika (Teika kazura) > >
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil