Skip to content

Instantly share code, notes, and snippets.

Core was generated by `/home/deen/git/materialize3/target/release/clusterd --storage-controller-listen'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007ff66129226b in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
[Current thread is 1 (Thread 0x7ff6495ff6c0 (LWP 2679964))]
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/deen/git/materialize3/target/release/clusterd.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) bt
#0 0x00007ff66129226b in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
template<class T>
void SendPackMsg()
{
if constexpr(is_sixup<T>::value) {
std::cout << "a" << std::endl;
} else {
std::cout << "b" << std::endl;
}
}
==22735== Conditional jump or move depends on uninitialised value(s)
==22735== at 0x214699: str_utf8_decode (system.c:3094)
==22735== by 0x2762BB: CTextRender::TextEx(CTextCursor*, char const*, int) (text.cpp:924)
==22735== by 0x2758A3: CTextRender::TextWidth(void*, float, char const*, int, float*) (text.cpp:758)
==22735== by 0x34C3AE: CUI::DoLabel(CUIRect const*, char const*, float, int, int) (ui.cpp:390)
==22735== by 0x34C55A: CUI::DoLabelScaled(CUIRect const*, char const*, float, int, int) (ui.cpp:403)
==22735== by 0x2D34C5: CMenus::RenderNews(CUIRect) (menus.cpp:917)
==22735== by 0x2D3DDD: CMenus::Render() (menus.cpp:1038)
==22735== by 0x2D8178: CMenus::OnRender() (menus.cpp:1812)
==22735== by 0x3228F5: CGameClient::OnRender() (gameclient.cpp:608)
// g++ -o x x.cpp && ./x
#include <iostream>
struct CMeteor
{
CMeteor(unsigned x)
{
std::cout << x << std::endl;
}
@def-
def- / x.py
Created November 27, 2018 17:15
import re
import timeit
def deslugify2(string):
try:
n = u''
t = 0
i = 0
for c in string:
import math
const
params = 2'i32
print = 10000'i32
generations = 100000'i32
popsize = 100
mutate = 0.5
bound_from = 0.0
bound_to = 100.0
import os, osproc, strutils, rdstdin
type UserNotFound = object of Exception
const
userFields = ["Full Name", "Account active", "Account expires", "Password last set"]
userNotFound = "The user name could not be found"
proc getDomainUser(username: string): seq[string] =
result = @[]
proc fib(n: int): int =
if n <= 0: 1
else: fib(n-1) + fib(n-2)
static:
echo fib(3)
@def-
def- / foo.nim
Created September 7, 2017 11:06
import tables, sequtils
let t = {1: "one", 2: "two"}.toTable
let k = toSeq(t.keys())
echo k
@def-
def- / foo.nim
Created September 5, 2017 16:58
import sequtils
proc `[]`[T](s: openarray[T], x: int, y: Slice[int]): seq[T] =
result = newSeq[T]()
for i in countup(x, y.b, y.a - x):
result.add(s[i])
let x = toSeq(0..20)
echo x[3,5..13]