freenode/#lisp - IRC Chatlog
Search
14:39:00
makomo
a very interesting video: "Why Black Boxes are so Hard to Reuse, lecture by Gregor Kiczales", https://www.youtube.com/watch?v=5l2wMgm7ZOk
14:41:38
pfdietz_
Xof: it used long form define-method-combination, but not :arguments or :generic-function. Although looking at those, I could see them being useful in my specific case.
14:50:34
phoe
Is it wise to (defmacro bar ...) (setf (macro-function 'foo) (macro-function 'bar)) to have the same macro definition under two distinct names?
14:51:25
phoe
" The consequences are undefined if environment is non-nil in a use of setf of macro-function."
15:15:22
pfdietz_
The method combination is called randomized. It invokes a random applicable method. The methods have weights that control their relative likelihoods.
15:27:03
pfdietz_
If I want a method to be able to fail and reinvoke the generic function, that would be a use case for the :generic-function argument (as I understand how that works).
15:28:13
pfdietz_
Yes. Or if I wanted to have some control over the random number generator, there could be extra arguments to do that.
15:33:27
Xof
hey, pfdietz, that's a "fun" ansi test: check that defining a method combination with a :arguments &key foo clause doesn't cause that keyword to be accepted by the generic function
15:33:51
Bike
i was going to say you could expand into (tagbody top ...however you choose... (call-method method (make-method (go top)))) to do "failure" by call-next-method, but the make-method form is evaluated in a null lexical environment
15:36:05
pfdietz_
The methods always know the name of their generic function, so unless the failing is occuring in the method combination's glue code that use isn't a very good one.
15:38:29
Xof
I wanted to implement a finite state machine method combination, using qualifiers as state labels
15:39:13
Xof
but again it's not quite right, because the qualifiers are for compile-effective-method-time and the methods' return values are effective-method-run-time
15:40:01
Xof
so far the most promising use of :arguments (for me) is information to affect the combination passed as an extra keyword argument
15:40:54
pfdietz_
Method combination for constraint satisfaction, where each superclass is a different kind of constraint.
15:59:25
Bike
pfdietz_, Xof: https://gist.github.com/Bike/5ca14ba142f3ca3fc65e4c912f4cde9f now if you'll excuse me i need to escape my volcano lair before it erupts
16:00:21
pfdietz_
Method combination for implementing simulated annealing, where temperature is an argument.
16:00:49
pfdietz_
Method combination for executing methods in separate threads, where max # of threads is an argument.
16:07:28
wooden_
i'm doing ncurses development, so running sbcl in another window and slime-connect'ing to it. i would like to use log4cl, but in addition to printing in the slime repl, it prints to the sbcl window as well, messing up the ncurses display. can i disable output to the sbcl repl? if so, how?
16:10:29
scymtym_
wooden_: (log4cl:remove-all-appenders log4cl:*root-logger*) (log:config :stream SLIME-STANDARD-OUTPUT) where SLIME-STANDARD-OUTPUT is just *standard-output* if you execute the forms in the SLIME repl
16:14:45
Bike
i forgot you can't have multiple methods in the same group if they have the same level of specialization, which makes the whole exercise even mroe pointless than it was already
16:43:59
orestarod
my question regards cl-yacc and I want a clarification regarding whether it is possible to state precedence for prefix operands in my grammar
16:49:23
scymtym_
orestarod: not sure if this is what you need, but for infix operators in esrap grammars, maybe have a look at https://github.com/scymtym/parser.common-rules/#infix-operators . it can handle some common cases
16:54:01
orestarod
scymtym_: I would need to rewrite my grammar in your parser. If I see no light from cl-yacc, I will switch to your work and maybe consult you after reading the docs. Thank you nonetheless! :)
16:55:30
Bike
eight lines to cover basic arithmetic seems a lot more convenient than yacc, though maybe it's hard to do in addition to non-expressions or something
16:56:50
orestarod
What I am trying to do is more complex than simple arithmetics,though not too complex. I will provide the grammar if you wish to check for yourself and maybe tell me a few tips.
16:56:57
Bike
minion: message for scymtym: in the parser.common-rules readme, the link to architecture.builder-protocol in the "infix operators" section is a little messed up.
16:56:58
minion
message for scymtym in the parser.common-rules readme, the link to architecture.builder-protocol in the "infix operators" section is a little messed up: An error was encountered in lookup: Parse error:URI "http://www.cliki.net/message%20for%20scymtym%20in%20the%20parser.common-rules%20readme%2C%20the%20link%20to%20architecture.builder-protocol%20in%20the%20\"infix%20operators\"%20section%20is%20a%20little%20messed%20up?source" contains illegal character #\" a
16:57:35
orestarod
THe problem is the grammar is inherently ambiguous, and needs proper operand precedence to solve that
18:12:53
mfiano
Oh, nevermind. I thought you were the maintainer of McCLIM. Sigh, I am getting really confused lately.
18:31:26
mfiano
Likewise, but moreso that something like this could be created in a such a short period.
18:34:51
phoe
People can prepare their libraries in advance, but they start coding at a given hour of a given day and they must finish coding before a given hour of another day.
18:36:14
mfiano
jackdaniel: Thanks for the excellent work in McCLIM if I never thanked you (and all the other contributers too).
18:39:53
mfiano
Some months ago I saw that my pngload library was forked in preparation for the mezzano port, and I'd like to know if that ever got anywhere
18:40:34
jackdaniel
well, as far as I know it works just fine on mezzano, I think he needs to tie some loose ends here and there and it will be merged upstream
18:41:02
jackdaniel
he was a little blocked by me, because I was refactoring mirror class hierarchy until two weeks ago
18:43:10
mfiano
After the jam deadline (tonight/tomorrow depending where you live), everyone will have 4 days to play and then rate their favorites, so stop by again then :)
18:44:46
jackdaniel
but that will have to wait until I'm done with things (now I'm hacking on ECL and I'm learning Forth)
19:12:38
phoe
flip214: https://github.com/phoe/protest/blob/master/src/1am/1am.lisp that's my integration code
19:14:17
flip214
phoe: but neither quickdocs nor quicklisp:system-apropos nor a listing of my ~/quicklisp/.../software found any matching system name!
19:21:15
phoe
jackdaniel: I promise you that the next testing framework I create will be called HALF-PAST-TWO
19:21:25
flip214
phoe: I looked for "4", "5", and "6", each "pm" and "am", but couldn't find anything.
19:22:33
phoe
jackdaniel: thanks for the heads-up, I'll think of integrating it with PROTEST based on my 1AM code
19:23:40
jackdaniel
do whatever you please. I'm not planning to put it on quicklisp, I'm already confused with unit test frameworks we have, not going to make the problem bigger
19:44:43
Xof
Bike: that (:method-combination machine) looks surprisingly sane. Doesn't use arguments or generic-function, though :-)
19:49:59
Bike
so really we'd like to have an infinite number of metnod groups. define method combination is not powerful enough, obvs
20:02:48
Xof
but you can make your machine method combination work with sbcl by making :start a method-combination argument
20:39:52
Petit_Dejeuner
Anyone want to reccomend a testing framework? I was just going to use lisp-unit or maybe 5am, but my reccomendations are 11 years old now.
20:41:37
jackdaniel
as of other gazzilion unit testing frameworks – can't tell. 1am is good for running tests by hand and stress tests
23:59:08
pfdietz_
I've found it useful to run unit tests repeatedly in random order. In systems with hidden state this can expose bugs. Found a bug in clisp doing this.