Skip to content

Instantly share code, notes, and snippets.

#if PY_VERSION_MAJOR >= 3
#define PYBIND11_ARGV_TYPE wchar_t**
#else
#define PYBIND11_ARGV_TYPE char**
#endif
struct wide_char_arg_deleter {
void operator()(void* ptr) const {
#if PY_VERSION_HEX >= 0x030500f0
// API docs: https://docs.python.org/3/c-api/sys.html#c.Py_DecodeLocale
[INFO rust_analyzer] lifecycle: server started
[INFO rust_analyzer::config] Config::update({})
[INFO rust_analyzer::config] Config::update() = Config {
client_caps: ClientCapsConfig {
location_link: false,
line_folding_only: false,
hierarchical_symbols: false,
code_action_literals: false,
work_done_progress: false,
code_action_group: false,
S<int>& std::forward<S<int>&>(std::remove_reference<S<int>&>::type&)
S<int>&& std::forward<S<int> >(std::remove_reference<S<int> >::type&)
S<int>* std::__addressof<S<int> >(S<int>&)
S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >& std::forward<S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&>(std::remove_reference<S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&>::type&)
S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&& std::forward<S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(std::remove_reference<S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::type&)
S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >* std::__addressof<S<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(S<std::__cxx11::basic_string<char, std::char_traits<c
@bstaletic
bstaletic / clangd.log
Last active July 13, 2020 05:43
clangd crash when encountering std::ranges
I[07:42:31.299] clangd version 10.0.0
I[07:42:31.299] PID: 16868
I[07:42:31.299] Working directory: /home/bstaletic/work/NanoRange
I[07:42:31.299] argv[0]: /usr/sbin/clangd
I[07:42:31.299] argv[1]: -background-index=0
I[07:42:31.299] argv[2]: -clang-tidy=0
I[07:42:31.299] argv[3]: -header-insertion-decorators=0
I[07:42:31.299] argv[4]: -limit-results=500
I[07:42:31.299] argv[5]: -log=verbose
I[07:42:31.299] Starting LSP over stdin/stdout
@bstaletic
bstaletic / clamp.hpp
Created June 20, 2020 19:31
New nano::ranges algorithms
// nanorange/algorithm/clamp.hpp
//
// Copyright (c) 2020 Tristan Brindle (tcbrindle at gmail dot com)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef NANORANGE_ALGORITHM_CLAMP_HPP_INCLUDED
#define NANORANGE_ALGORITHM_CLAMP_HPP_INCLUDED
#include <nanorange/ranges.hpp>
[ 0%] Building CXX object test/CMakeFiles/test_nanorange.dir/algorithm/partition.cpp.o
In file included from /home/bstaletic/work/NanoRange/test/algorithm/partition.cpp:25:
/home/bstaletic/work/NanoRange/include/nanorange/algorithm/partition.hpp: In instantiation of ‘static constexpr nano::ranges::subrange_::subrange<I> nano::ranges::detail::partition_fn::impl(I, S, Pred&, Proj&) [with I = forward_iterator<int*>; S = sentinel<int*>; Pred = {anonymous}::is_odd; Proj = nano::ranges::identity]’:
/home/bstaletic/work/NanoRange/include/nanorange/algorithm/partition.hpp:50:34: required from ‘void {anonymous}::test_iter() [with Iter = forward_iterator<int*>; Sent = sentinel<int*>]’
/home/bstaletic/work/NanoRange/test/algorithm/partition.cpp:203:53: required from here
/home/bstaletic/work/NanoRange/test/algorithm/partition.cpp:47:26: in ‘constexpr’ expansion of ‘nano::ranges::function_objects::partition.nano::ranges::detail::partition_fn::operator()<forward_iterator<int*>, sentinel<int*>, {anonymous}::is_odd>(
@bstaletic
bstaletic / clangd_cuda.log
Created May 28, 2020 04:15
Missing __syncthreads
I[06:14:01.171] clangd version 10.0.0
I[06:14:01.171] PID: 20535
I[06:14:01.171] Working directory: /home/bstaletic/work/test
I[06:14:01.171] argv[0]: /usr/sbin/clangd
I[06:14:01.171] argv[1]: -cross-file-rename
I[06:14:01.171] argv[2]: -hidden-features
I[06:14:01.171] argv[3]: -header-insertion-decorators=0
I[06:14:01.171] argv[4]: -limit-results=500
I[06:14:01.171] argv[5]: -log=verbose
I[06:14:01.171] Starting LSP over stdin/stdout
@bstaletic
bstaletic / client log
Created May 6, 2020 19:27
ycmd bug!!!
2020-05-06 21:25:26,752 - DEBUG - POST b'http://127.0.0.1:52475/receive_messages'
2020-05-06 21:25:26,858 - DEBUG - RX: <Response [200]>
false
{
"filepath": "/home/bstaletic/work/YouCompleteMe/foo.md",
"line_num": 1,
"column_num": 1,
"working_dir": "/home/bstaletic/work/YouCompleteMe",
"file_data": {
"/home/bstaletic/work/YouCompleteMe/foo.md": {
"contents": "\\n",
"filetypes": [
"markdown"
@bstaletic
bstaletic / _comments.md
Last active April 6, 2020 10:47
Watchdog deadlock
  • Thread 26: New lock acquire point, in a watchdog method - on_modified
  • Thread 23: New lock acquire point, in a watchdog method - on_created
  • Thread 17: New lock acquire point, in a watchdog method - on_created
  • Thread 11: New lock acquire point, in a watchdog method - on_modified
  • Thread 8: New lock acquire point, in a watchdog method - on_created
  • Thread 5: LSP connection WriteData
  • Thread 2: HandleNotificationInPollThread - happened after the deadlock(?)
  • Thread 1: DebugInfo - waiting for lock