Skip to content

Instantly share code, notes, and snippets.

@bluss
bluss / flextelescope.lua
Last active April 28, 2024 17:49
Telescope find_files/live_grep but with support for toggling no-ignore/hidden
-- Flextelescope
--
-- Replace telescope builtins find_files and live_grep
-- with wrappers that support toggling no-ignore/hidden
local M = {}
local relaunch_marker = "flextelescope_relaunch"
local telescope_builtin_original = nil
#!/usr/bin/env python3
"""
Start a version sensitive ipython3 that also goes into "foreign" virtualenvs.
Rye-enabled ipython: an ipython that follows your pinned python version and is usable
in all rye managed projects.
"""
from pathlib import Path
<html>
<head>
<title>Cargo Build Timings — ndarray 0.12.1</title>
<meta charset="utf-8">
<style type="text/css">
html {
font-family: sans-serif;
}
#!/usr/bin/python3
import sys
import functools
import re
from collections import namedtuple, OrderedDict
Rec = namedtuple("Rec", "name time line")
def file_to_records(filename):
@bluss
bluss / git-st
Created January 11, 2017 09:24
#!/bin/sh
# Display a git status, without touching or
# displaying any untracked files;
# just display the diffstat for index and worktree
USAGE="[<directory>]"
LONG_USAGE="Display diffstat for staging area and working directory, relative to current directory (or the given directory, -t for top)"
SUBDIRECTORY_OK=y
; ModuleID = 'id_result.cgu-0.rs'
source_filename = "id_result.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"core::result::Result<u64, i64>" = type { i64, [0 x i64], [1 x i64] }
; Function Attrs: uwtable
define void @id_result(%"core::result::Result<u64, i64>"* noalias nocapture sret dereferenceable(16), %"core::result::Result<u64, i64>"* noalias nocapture dereferenceable(16)) unnamed_addr #0 {
entry-block:
@bluss
bluss / -
Created December 12, 2016 16:07
This file has been truncated, but you can view the full file.
rust-nightly-x86_64-unknown-linux-gnu/
rust-nightly-x86_64-unknown-linux-gnu/cargo/
rust-nightly-x86_64-unknown-linux-gnu/cargo/manifest.in
rust-nightly-x86_64-unknown-linux-gnu/cargo/bin/
rust-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo
rust-nightly-x86_64-unknown-linux-gnu/cargo/lib/
rust-nightly-x86_64-unknown-linux-gnu/cargo/lib/cargo/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/
rust-nightly-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/
@bluss
bluss / float_fast.s
Last active December 11, 2016 12:16
Compiler output using `rustc -Copt-level=3 -Ctarget-cpu=native --emit=asm float_fast.rs -Cllvm-args=-x86-asm-syntax=intel`
.text
.intel_syntax noprefix
.file "float_fast.cgu-0.rs"
.section .text.dot3_fast,"ax",@progbits
.globl dot3_fast
.p2align 4, 0x90
.type dot3_fast,@function
dot3_fast:
.cfi_startproc
cmp rcx, r9
// MIR for `id_option`
// node_id = 4
// pass_name = CopyPropagation
// disambiguator = after
fn id_option(_1: std::option::Option<u32>) -> std::option::Option<u32> {
let mut _0: std::option::Option<u32>; // return pointer
scope 1 {
let _2: std::option::Option<u32>; // "a" in scope 1 at id.rs:6:18: 6:19
scope 2 {
#![crate_type="lib"]
#[no_mangle]
pub fn id_option(a: Option<u32>) -> Option<u32> {
match a {
Some(x) => Some(x),
None => None,
}
}