Skip to content

Instantly share code, notes, and snippets.

View repi's full-sized avatar
🦎

Johan Andersson repi

🦎
View GitHub Profile
@repi
repi / crate-health.md
Last active February 22, 2024 01:17
Guidelines on evaluating health & quality of third-party crates at Embark

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info

@conradludgate
conradludgate / vet-interactive.sh
Created June 17, 2022 20:12
Interactive cargo-vet
#!/bin/bash
inspect() {
local name="$1"
local from="$2"
local to="$3"
if [ "$from" = "0.0.0" ]
then
cargo vet inspect "$name" "$to"
else
@h3r2tic
h3r2tic / restir-meets-surfel-lighting-breakdown.md
Created November 23, 2021 02:15
A quick breakdown of lighting in the `restir-meets-surfel` branch of my renderer

A quick breakdown of lighting in the restir-meets-surfel branch of my renderer, where I revive some olde surfel experiments, and generously sprinkle ReSTIR on top.

General remarks

Please note that this is all based on work-in-progress experimental software, and represents a single snapshot in development history. Things will certainly change 😛

Due to how I'm capturing this, there's frame-to-frame variability, e.g. different rays being shot, TAA shimmering slightly. Some of the images come from a dedicated visualization pass, and are anti-aliased, and some show internal buffers which are not anti-aliased.

Final images

@brendanzab
brendanzab / gist:d41c3ae485d66c07178749eaeeb9e5f7
Last active July 19, 2023 04:28
My personal list of Rust grievances (September 2021)

September 2022:

This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.

Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.

My personal list of Rust gr

@nollbit
nollbit / tokyo.md
Last active April 9, 2019 10:13
Tokyo Tips
  • Get a Pocket WiFi. That plus Google Maps is the best way to find your way around Tokyo. Walking, busses, metro, trains etc.
  • get a suica card for paying trains, busses, 7-11 etc . If you have a newer iPhone you can get a virtual Suica and pay with Apple Wallet.
  • Remember that many restaurants / bars are not on street level. Don’t be afraid to venture to the upper floor restaurants.
  • Go on day trips! Nikko, Atami, Mt Takao. Hakone is nice as well, but requires two days to fully appreciate.
  • Visit parks! Unnecessary tip given the season, but Tokyo has amazing parks.
  • Visit Odaiba. Strange 90s futuristic man made island.
  • Eat plenty of the cheap Japanese comfort food. Curry, ramen (try all types, can recommend Tsukemen with noodles on the side), Sushi (of course). Generally, food is of extremely high quality everywhere, so generally no need to splurge.
  • People are generally extremely friendly and eager to please. This is great, but also remember that people might like to avoid saying no or be unfriendly

State of Roblox graphics API across all platforms, with percentage deltas since EOY 2017. Updated December 17 2018

Windows

API Share
Direct3D 11+ 80% (+3%)
Direct3D 10.1 10% (-1%)
Direct3D 10.0 8% (-1%)
Direct3D 9 2% (-1%)
Language Adding files from filesystem to the build How? Unfinished files break the program?
Rust Explicit mod declaration No
CommonJS Explicit require import No
ES6 Explicit import import No
Python Explicit import import No
Lua (new) Explicit require import No
PHP Explicit require or use via autoload import or any use No
Perl Explicit use import No
@NocturnDragon
NocturnDragon / Swizzles.h
Last active October 15, 2023 01:20
Swizzles in Clang, GCC, and Visual c++
#include <stdio.h>
// #define CLANG_EXTENSION
// Clang compile with -O3
#define VS_EXTENSION
// https://godbolt.org/z/sVWrF4
// Clang compile with -O3 -fms-compatibility
// VS2017 compile with /O3
@aras-p
aras-p / prefix.shader
Created September 4, 2016 15:56
Prefix to compile Shadertoy shaders to Vulkan/SPIR-V
// pasting this in front of most shadertoys allows them to be compiled with:
// glslangValidator -V inputFile.frag -o outputFile.spv
#version 430
layout(binding = 1, std140) uniform glob {
uniform vec3 iResolution;
uniform float iGlobalTime;
uniform float iTimeDelta;
uniform int iFrame;
uniform float iFrameRate;
uniform float iChannelTime[4];
// cl /nologo /I "%DXSDK_DIR%\Include" rastafontgpu.cpp /link /LIBPATH:"%DXSDK_DIR%\Lib\x86"
#include <tchar.h>
#include <stdint.h>
#include <stdio.h>
#include <windows.h>
#include <D3D11.h>
#pragma comment(lib, "kernel32.lib")