Skip to content

Instantly share code, notes, and snippets.

rm -f test_popupwin.res test.log messages starttime
if test -n "${ASAN_OPTIONS}"; then \
ASAN_OPTIONS="${ASAN_OPTIONS}_test_popupwin" UBSAN_OPTIONS="${UBSAN_OPTIONS}_test_popupwin" VIMRUNTIME=../../runtime ../vim -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_popupwin.vim --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C awk '/Executing Test_/{match($0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($0, RSTART, RLENGTH) "\r"; fflush()}' ; \
else \
VIMRUNTIME=../../runtime ../vim -f -u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S runtest.vim test_popupwin.vim --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C awk '/Executing Test_/{match($0, "([0-9][0-9]:[0-9][0-9] *)?Executing Test_[^\\)]*\\)"); print substr($0, RSTART, RLENGTH) "\r"; fflush()}' ; \
fi
00:00 Executing Test_adjust_left_past_screen_width()
00:00 Executing Test_bufdel_skips_popupwin_buffer()
00:00 Executing Test_notifications()
0
@bstaletic
bstaletic / CMakeLists.txt
Last active September 20, 2024 19:19
c++23 modules example
cmake_minimum_required(VERSION 3.30)
# Set experimental flag to enable `import std` support from CMake.
# This must be enabled before C++ language support.
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
# This specific value changes as experimental support evolves. See
# `Help/dev/experimental.rst` in the CMake source corresponding to
# your CMake build for the exact value to use.
"0e5b6991-d74f-4b3d-a41c-cf096e0b2508")
project(std_module_example CXX)
@bstaletic
bstaletic / ycmd_omnisharp_chatter.log
Created August 17, 2024 19:26
Omnisharp not respecting documentSymbol capabilities
2024-08-17 21:26:13,983 - DEBUG - TX: Sending message: b'Content-Length: 2101\r\n\r\n{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports","source.fixAll"]}},"dataSupport":true,"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"documentationFormat":["plaintext","markdown"],"resolveSupport":{"properties":["documentation","detail"]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":false,"labelSupport":false,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"hover":{"contentFormat":["plaintext","markdown"]},"inlay_hint":{},"semanticTokens":{"augmentSyntaxTokens":true,"formats":["relative"],"requests":{"full"
@bstaletic
bstaletic / GHA.log
Last active August 13, 2024 15:29
omisharp LSP log
2024-08-13 06:58:33,073 - INFO - Starting OmniSharp-Roslyn: ['D:\\a\\ycmd\\ycmd\\ycmd\\completers\\cs\\..\\..\\..\\third_party\\omnisharp-roslyn\\OmniSharp.exe', '-lsp', '-v']
2024-08-13 06:58:33,073 - INFO - OmniSharp-Roslyn started with PID 6644
2024-08-13 06:58:33,073 - DEBUG - TX: Sending message: b'Content-Length: 1920\r\n\r\n{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports","source.fixAll"]}},"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"documentationFormat":["plaintext","markdown"],"resolveSupport":{"properties":["documentation","detail"]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"documentSymbol":{"hierarchicalDocumentSymbolSupport":false,"labelSupport":false,"symbolKind":{"valueSe
@bstaletic
bstaletic / .config
Created July 23, 2024 16:09
kernel-build.eclass errors
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.35 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 13.3.1_p20240614 p17) 13.3.1 20240614"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130301
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24200
@bstaletic
bstaletic / gist:b79dd75bd34af6546d1232f5943f3c46
Created April 10, 2024 18:44
Trying to recall my automatic driving class
A A B C D D E E F
e ---->--->(1+k_1)--->+--->(z^-1/2)--->--->(1+k_2)--->+--->(z^-1/2)---> y
| /\ | /\ |
| | | | |
| | | | |
\/ (-k_1) \/ (-k_2) |
k_1 /\ k_2 /\ |
| | | | |
| | | | |
| | | | |
@bstaletic
bstaletic / tiny_wsgi_framework.py
Last active February 19, 2024 15:52
The bare minimum needed for supporting YouCompleteMe
# TODO: Handle headers that do not exist.
# TODO: Documentation.
# TODO: Type hints
import http.client
import json
import sys
import traceback
_MEMFILE_MAX = 10 * 1024 * 1024
@bstaletic
bstaletic / mwe_pypy.cpp
Last active January 10, 2024 22:25
WIP minimal reproducer for Yannick
#include <memory>
#include <pybind11/cast.h>
#include <pybind11/options.h>
#include <pybind11/pybind11.h>
#include <pybind11/pytypes.h>
class A {};
class B {};
namespace py = pybind11;
@bstaletic
bstaletic / preprocessed_file.i
Created December 6, 2023 15:29
clang segfault
This file has been truncated, but you can view the full file.
# 1 "foo.cpp"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 462 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "/usr/include/gentoo/fortify.h" 1
# 3 "/usr/include/gentoo/fortify.h" 3
# 2 "<built-in>" 2
# 1 "/usr/include/gentoo/maybe-stddefs.h" 1
@bstaletic
bstaletic / lama.md
Last active October 8, 2023 10:52
lama.md

Completers

  • String statement has no effect - but was a "docstring" for a global variable
  • Consider f-string instead of manual format...
  • Consider x not in {a, b} instead of x != a and x != b
  • Consider raise NewException( ... ) from OldException
  • NamedTemporaryFile/urlopen/subprocess.Popen() - consider context manager - NamedTemporaryFile should have been!
  • Catching too wide exception type - Exception - bleh...
  • Override changes number of args.
  • Tuple unpacking - unused variables should be _