freenode/#lisp - IRC Chatlog
Search
16:05:21
makomo
how do you guys pronounce "macrolet"? ever since i read that about it in cltl2, i can't stop pronouncing it in a way that rhymes with chevrolet :-)
16:19:57
kenanb
Bike: yeah, that looks like a pretty elegant way to express such a thing. btw your ELS talk is very interesting.
16:23:31
alandipert
anyone have suggestions about how i could speed this up? it's currently about 2x slower than c. thanks in advance! https://github.com/alandipert/puzzles/blob/master/blackjack/sbcl/outcomes_optimized.lisp
16:28:53
alandipert
my guess is function call overhead (of PARTITIONS) is maybe the next slowest thing? but i don't know how to measure that. and i can't easily inline partitions because it's recursive
16:29:20
alandipert
so i was thinking maybe a next step would be a tail recursive version of partitions
17:01:52
kenanb
if you are really worried about performance, maybe you should stick to loops. making it tail-recursive will make the stack happy, but it will not decrease your call overhead.
17:01:54
slyrus2
Is there a way to "trace" ASDF such that one can actually see what the calls to the compiler are?
17:04:06
pfdietz
You could trace COMPILE-FILE, or maybe there's some generic function you could write an around method for.
17:04:34
slyrus2
pfdietz: yeah, I tried that but I don't seem to get any output. I must be doing something wrong.
17:05:18
kenanb
AFAIK asdf already provided an interface to access generated list of all tasks for a certain load-op.
17:10:26
kenanb
slyrus2: asdf:traverse is the function. as I said, that is only for getting the generated task list
17:21:43
slyrus2
aha! the with-muffled-compiler-conditions form in uiop.lisp was stealing my trace output.
17:39:22
Bike
compile-file is a standard function, so tracing it is undefined behavior and might do weird dumb thing.s
17:40:08
slyrus2
Hmm.. interesting. In this case it works fine once I unmuffle the conditions down inside UIOP:compile-file*
18:16:13
random9899
the interactive failure thing was annoying, throwing you into the debugger and stuff....
21:26:11
Inline
the test-creating-multiple-tests testsuite in lift gives me once 4 or 3 or 2 as an answer to a 3 tests grouped by 2 case
21:46:45
Inline
compiling the lift-test system gives consistent results tho, so something is in the vulnerable ephemeral state somewhere
21:47:13
Inline
cause testing it right after i load all of my packages and my repl tends to give wrong answers
23:45:01
asarch
2) How could you specify which 'get-sugar' (either from 'chocolate' or from 'cafe') you want in 'serving-drink'?
23:45:44
asarch
From the question #1 I get: 3: (ERROR "Illegal function call in method body:~% ~S" ((FORMAT T "The level of sugar is: ~d~%" (GET-SUGAR CUP))))
23:46:38
on_ion
although i would say, the slot 'sugar' would be part of something that the chocolate and the cafe would share
23:47:11
Bike
you have serving-drink with a defgeneric with one parameters, and then the method has two parameters.
23:49:38
Bike
which, per precedence rules, would be the one for CHOCOLATE since it's the leftmost superclass
23:50:16
Bike
you should just specify the sugar slot in a parent class, and then specify initforms in the lower class if you'd like
23:54:26
asarch
In my example, because of the class precedence list 'serving-drink' uses 'sugar' from 'chocolate'
23:55:10
Bike
As I said, you probably don't want to do that. You can't have two distinct slots with the same name in the same object.
23:58:07
Bike
As I said, if you must you can think of everything about classes as being what C++ terms "virtual".
23:59:09
specbot
Inheritance of Slots and Slot Options: http://www.lispworks.com/reference/HyperSpec/Body/07_ec.htm
23:59:51
asarch
So, if I do: (defparameter *my-cup* (make-instance 'dinner)) and then (serving-drink *my-cup*), 'sugar' from 'cafe' doesn't exist, right?
0:00:35
Bike
The defclass merges the slot definition information from the 'cafe' and 'chocolate' classes.
0:01:54
asarch
In (defclass dinner (chocolate cafe) ()), I thought the 'sugar' slot was from the last element from the class precedence list
0:03:16
Bike
The two slot definitions only differ in their initform and docstring. According to the page I just linked, dinner's slot will have these from the most specific superclass, i.e. CHOCOLATE.
0:07:51
Bike
you might even be able to arrange a metaclass where child classes just get the unaltered class from their supers
0:08:10
Bike
and then you access them with some special slot-value where you include a class designator in addition to the slot name
0:13:17
asarch
Reading about CLOS and all related stuff, I found the CLOS version of Racket is Swindle
0:14:59
msmith
hi all, can someone remind me of the command that would allow me to destructure a list and use it as parameters in a function?
0:17:49
asarch
So far I found three "glitches" in Lisp: 1) You can't read the value of "ARGS" in a binary file (for passing values) 2) There is no standard way to access to the value of :documentation from defclass 3) And this :-P
0:21:45
asarch
Well, you write an small application in Lisp to start a web server and then you need to specify the port number manually: my-lisp-server --port 8080
0:23:12
Bike
it's nothing i do very often, but there are some libraries, like http://quickdocs.org/command-line-arguments/
0:29:45
White_Flame
of course, each implementation also exposes a simple list of strings representing C's argv
3:28:47
drmeister
Is there some special return value that the handler returns to indicate that it does or doesn't handle the condition?