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> |
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
(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
(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
(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
--- summarye.el.orig 2024-03-28 23:29:03.094303000 +0900 | |
+++ summarye.el 2024-03-28 23:27:05.399045100 +0900 | |
@@ -24,7 +24,7 @@ | |
;; and this notice must be preserved on all copies. | |
;; Commentary: | |
-; Todo: | |
+ ; Todo: | |
;; CHANGE LOG | |
;; Ver 2.5.2 [2005-07-25T09:28:12.00+9:00] |
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
local ffi = require('ffi') | |
ffi.cdef[[ | |
typedef int BOOL; | |
typedef void* HANDLE; | |
typedef void* LPVOID; | |
typedef const char* LPCSTR; | |
typedef unsigned long DWORD; | |
typedef DWORD* LPDWORD; | |
typedef long* LONG_PTR; | |
typedef struct _SECURITY_ATTRIBUTES { |
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
:lua local ns=vim.api.nvim_create_namespace('test') vim.api.nvim_set_decoration_provider(ns, {on_start=function() error('on_start error') end}) | |
==1175== 170 bytes in 1 blocks are definitely lost in loss record 165 of 303 | |
==1175== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) | |
==1175== by 0x2CFB71: try_malloc (memory.c:80) | |
==1175== by 0x2CFBBF: xmalloc (memory.c:114) | |
==1175== by 0x1AAC01: api_set_error (helpers.c:838) | |
==1175== by 0x2A30B2: nlua_call_ref (executor.c:1597) | |
==1175== by 0x1E3EAF: decor_provider_invoke (decoration_provider.c:27) | |
==1175== by 0x1E4362: decor_providers_start (decoration_provider.c:91) |
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
receive_msgpack (src/nvim/msgpack_rpc/channel.c) | |
parse_msgpack (src/nvim/msgpack_rpc/channel.c) | |
handle_reuest (src/nvim/msgpack_rpc/channel.c) | |
msgpack_rpc_get_handler_for (src/nvim/api/private/dispatch.c) -> get handler form static Map(String, MsgpackRpcRequestHandler) methods. | |
Registration to "methods" is done by "msgpack_rpc_add_method_handler" in "build/src/nvim/auto/api/private/dispatch_wrappers.nenerated.h" that generated by "src/nvim/generators/gen_api_dispatch.lua". | |
"receive_msgpack" is passed to "rstream_start" as "read_cb" in "rpc_start". |
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
local tty_set_mode = vim.api.nvim_create_augroup("tty_set_mode", {}) | |
vim.api.nvim_create_autocmd("VimEnter", { | |
pattern = '*', | |
group = tty_set_mode, | |
callback = function() | |
local tty = vim.loop.new_tty(0, true) | |
local retry_count = 10 | |
while retry_count > 0 do | |
local _, err, _ = vim.loop.tty_set_mode(tty, 2) | |
if err and err['name'] == 'UV_EINTR' then |
NewerOlder