freenode/#lisp - IRC Chatlog
Search
10:56:14
Josh_2
Is there a library that has bindings to Windows functions like mouse pointer position?
10:58:12
pjb
Josh_2: just use CFFI to call directly MS-Windows API. It works nicely. Microsoft has a nice documentation website.
11:02:33
Josh_2
Well I want to make some software that lets me share my mouse/keyboard across my Gentoo install and Windoge
11:30:30
JuanDaugherty
well i essentially have tnat now. looking at a 36 desktop fvwm pager, don't have a dos vnc session right now
11:31:40
JuanDaugherty
so if i used guacamole or any of a plethora of other things could share it with others in a browser
11:34:35
JuanDaugherty
as to whether there's a cl binding to whatever currently replaces win32, i would guess not but not with confidence
11:37:37
JuanDaugherty
it used to be win32 and wouldn be surprised if it was win64 now but doubt that, again with little confidence
11:42:01
JuanDaugherty
doesn't slime show up on the main menu bar anymore? it executes fine but there's no slime menu when I have a lisp file open
17:37:57
mfiano
drmeister: It depends, really. Do you mean combinations or permutations? Are repetitions allowed? Are the inputs always guaranteed to be "sets"? etc
17:41:51
mfiano
drmeister: Depending on your answers, it can be a Cartesian product, combination, permutation, permutation with repetitions (different), the "Power set", etc
20:15:39
drmeister
Hi mfiano - thank you - it was the cartesian product that I was looking for. This function does the job nicely.
20:57:04
sjl
but it always confuses me that some of the map-* ones collect the results of the function you pass and others dont
20:58:00
sjl
well, map-permutations returns nil, map-combinations returns the sequence you pass it, and map-product returns a list of the results
21:03:57
sjl
oh fun, map-permutations sometimes returns nil only if you permute the entire sequence, but returns the original sequence if you permute a subsequence of it
21:05:49
sjl
hah, if you pass it a one-element sequence though, it returns the result of your function :)
21:30:42
stacksmith
Could someone clarify CLHS eval description "The evaluator expands macro calls as if through the use of macroexpand-1"... Why is it limited to 1 level of expansion?
21:32:16
Bike
because the algorithm is more complicated. for example, it can do compiler macroexpansion too
21:35:32
stacksmith
However, if eval is limited to 1 level of macroexpansion, would it not behave differently from compiling identical code?
21:36:06
Bike
it says it works like macroexpand-1 does, but it doesn't say it can't do that more than once
21:36:28
phoe
if you have (+ (foo) (bar)) then eval first starts evaluating the whole call, but then since it's a function call, it must evaluate its arguments
21:39:12
stacksmith
phoe: CLHS 3.1.2.1.3 A form that is neither a symbol nor a cons is defined to be a self-evaluating object.
21:40:23
stacksmith
Bike: why is it relevant to mention that eval acts as if it does a macroexpand-1?
21:42:19
stacksmith
Sometimes not understanding seemingly trivial things leads to terrible problems in the 'internal model' of how things work.
21:42:46
Bike
well, as concerns your comment about compile/eval divergences, those are pretty strictly laid out
21:43:09
phoe
You can't define any macros on self-evaluating objects, hence evaluating them can have no side effects.
21:43:38
phoe
So theoretically an implementation would be allowed to optimize away such calls when it notices that it would have no effect anyway.
21:43:53
phoe
Or, for simplicity, it could call eval on them anyway just to have it immediately return.
22:01:07
phoe
every time you evaluate the number 42, a random file is deleted on your computer as a side effect
22:09:58
stacksmith
Here is another one: CLHS 3.4.4.1 Destructuring lambda-lists starts with "Anywhere in a macro lambda list where a parameter name can appear, and where ordinary lambda list syntax (as described in Section 3.4.1 (Ordinary Lambda Lists)) does not otherwise allow a list, a destructuring lambda list can appear in place of the parameter name"... Does this imply that &rest parameter may be a destructuring lambda-list?
22:12:07
stacksmith
I don't think I've ever encountered it... Is it any different from using &whole and destructuring in required parameters?
22:15:53
stacksmith
Bike: example: (defmacro foo (a &rest (b c))) as opposed to (defmacro bar (a (b c)))? Is there any difference?
22:16:27
Bike
(foo 1 2 3) is valid for the first but not the second, (foo 1 (2 3)) is valid for the second but not the first
22:17:33
stacksmith
(defmacro foo (a &rest ((b c)))) as opposed to (defmacro bar (a (b c))) then. I think I see.
22:17:54
Bike
you could understand them as (defmacro foo (a &rest s) (destructuring-bind (b c) s ...)) and (defmacro foo (a s) (destructuring-bind (b c) s ...))