Skip to content

Instantly share code, notes, and snippets.

View sztomi's full-sized avatar

Tamás Szelei sztomi

View GitHub Profile
This file has been truncated, but you can view the full file.
2024-03-15 11:36:04.195 [info] (Client) Pylance async client (2024.2.3) started with python extension (2023.14.0)
2024-03-15 11:36:04.691 [info] [Info - 11:36:04 AM] (2125926) Pylance language server 2024.2.3 (pyright version 1.1.348, commit cfb1de0c) starting
2024-03-15 11:36:04.691 [info] [Info - 11:36:04 AM] (2125926) Server root directory: file:///home/tamas/.vscode/extensions/ms-python.vscode-pylance-2024.2.3/dist
2024-03-15 11:36:04.694 [info] [Info - 11:36:04 AM] (2125926) Starting service instance "llvmcraft"
2024-03-15 11:36:04.733 [info] [Info - 11:36:04 AM] (2125926) Setting pythonPath for service "llvmcraft": "/home/tamas/.local/share/hatch/env/virtual/knit/hPnSDupG/knit/bin/python"
2024-03-15 11:36:04.733 [info] [Info - 11:36:04 AM] (2125926) Setting environmentName for service "llvmcraft": "3.10.13 (knit venv)"
2024-03-15 11:36:04.734 [info] [Info - 11:36:04 AM] (2125926) Loading pyproject.toml file at /home/tamas/projects/llvmcraft/pyproject.toml
2024-03-15 11:36:04.736 [info] [Info - 11
@sztomi
sztomi / Boring clang-18
Last active March 13, 2024 22:55
Benchmark output
❯ ./benchmark.py ~/src/CMake/build/compile_commands.json /home/tamas/projects/build-llvm/bin/clang-18
Loading commands...
Benchmarking ProcessUNIX.c compilation... Mean: 0.045s
Benchmarking Base64.c compilation... Mean: 0.010s
Benchmarking Encodin
@sztomi
sztomi / benchmark.py
Created March 13, 2024 22:30
PGO mystery
#! /usr/bin/env python3
import json
import os
import shlex
import subprocess as sp
import time
from contextlib import contextmanager
from pathlib import Path
from tempfile import TemporaryDirectory
@sztomi
sztomi / linux.yml
Created November 8, 2023 13:02
toolchain.yml
settings:
host:
os: Linux
arch: x86_64
build_type: Release
build:
os: Linux
arch: x86_64
build_type: Release
@sztomi
sztomi / gist:ff051599cf318cb72eff91b01f86a343
Created November 6, 2023 11:47
clang-bootstrap cmake defs
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_X86_RELAX_RELOCATIONS=ON',
'-DCLANG_DEFAULT_CXX_STDLIB=libc++',
'-DCLANG_DEFAULT_LINKER=lld',
'-DCLANG_DEFAULT_OBJCOPY=llvm-objcopy',
'-DCLANG_DEFAULT_RTLIB=compiler-rt',
'-DCLANG_DEFAULT_UNWINDLIB=libunwind',
'-DCLANG_ENABLE_BOOTSTRAP=ON',
'-DCLANG_LINKS_TO_CREATE=clang++;clang-cpp',
'-DLLVM_BUILD_TESTS=OFF',
@sztomi
sztomi / bwrap-args
Created June 3, 2022 10:12
bwrap-args contents
--bind
/tmp
/tmp
--symlink
usr/sbin
/sbin
--ro-bind
/media
/media
--symlink
use std::env;
use std::mem;
use std::os::raw::c_int;
use std::path::PathBuf;
use std::ptr;
use anyhow::Result;
use sciter::dom;
use sciter::dom::event::{EventHandler, DRAW_EVENTS, EVENT_GROUPS};
use sciter::dom::{Element, HELEMENT};
[tool.poetry]
name = "pretty_plz"
version = "0.1.3"
description = "pretty_plz is a tool that turns utility scripts into runnable commands"
authors = ["Tamás Szelei <szelei.t@gmail.com>"]
license = "MIT"
homepage = "https://github.com/sztomi/pretty_plz/"
repository = "https://github.com/sztomi/pretty_plz/"
keywords = ["productivity", "commandline", "cli"]
classifiers = [
@sztomi
sztomi / func_try_block.cpp
Created May 7, 2014 14:17
This file demonstrates the usage of function try blocks for implementing thread-safe copy constructors. Note, that the equality operator for ExpensiveFoo is omitted (implicitly default), so in reality, there would be even more time spent in the BarSlow copy constructor than in this example.
#include <chrono>
#include <iostream>
#include <mutex>
#include <thread>
struct ExpensiveFoo
{
ExpensiveFoo()
{
std::cout << "ExpensiveFoo default constructor... ";
@sztomi
sztomi / LICENSE.txt
Created October 28, 2011 20:02 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE