This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun fib-tail-recursion (n &optional n-1 n-2) | |
(let ((n-1 (or n-1 1)) | |
(n-2 (or n-2 0))) | |
(cond ((zerop n) n-2) | |
(t | |
(fib-tail-recursion (- n 1) (+ n-1 n-2) n-1))))) | |
(defun fib-tail-recursion-cl-lables (n) | |
(cl-labels ((fib-in (n n-1 n-2) | |
(cond ((zerop n) n-2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun walk-leaf-cl-labels (lst fn) | |
(cl-labels ((walk-leaf-in | |
(lst fn &optional acc) | |
(setq acc (funcall fn lst acc)) | |
(cond | |
((or | |
(null lst) | |
(not (listp lst))) | |
acc) | |
(t (walk-leaf-in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((electric-input-enable-dmeassage nil)) | |
(defun set-electric-input-dprint (flag) | |
(setq electric-input-enable-dmeassage flag)) | |
(defun get-electric-input-dprint () | |
electric-input-enable-dmeassage) | |
(defun electric-input-dmessage (&rest args) | |
(when electric-input-enable-dmeassage | |
(let ((inhibit-message t)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Emacs Lisp version of On Lisp with-gensyms | |
(defmacro with-make-symbol (vars &rest body) | |
`(let ,@(mapcar (lambda (v) | |
`((,v (make-symbol ,(symbol-name v))))) | |
vars) | |
,@body)) | |
(defmacro inc (var) | |
`(setq ,var (1+ ,var))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/GetVmId.cpp b/src/GetVmId.cpp | |
index ba5a612..dd7bcee 100644 | |
--- a/src/GetVmId.cpp | |
+++ b/src/GetVmId.cpp | |
@@ -8,9 +8,12 @@ | |
* GetVmId.cpp: Get GUID of WSL2 Utility VM with LxssUserSession COM interface. | |
*/ | |
+#include <Wbemidl.h> | |
#include <winsock.h> |
OlderNewer