Moved to https://github.com/DragonMinded/libdragon/wiki/Debugging-via-gdb
Spherical cap cone analytic solution is a 1d problem, since the cone cap sphere slides along the ray. The intersection point to empty space sphere is always on the ray. | |
S : radius of cone cap sphere at t=1 | |
r(d) : cone cap sphere radius at distance d | |
r(d) = d*S | |
p = distance of current SDF sample | |
SDF(p) = sdf function result at location p | |
x = distance after conservative step |
Pekka Väänänen, Aug 19 2021.
This proposal is a response to It's Time to Retire the CSV by Alex Rasmussen and the discussion on lobste.rs. Don't take it too seriously.
CSV files (comma-separated values) are great but sometimes difficult to parse because everybody seems to have a slightly different idea what CSV means. The obvious solution is to transmit some metadata that tells what to expect but where do you put it? Well, how about a ZIP archive?
An archive with two files. The first file, say format.txt
, has the metadata inside and the second one is the original CSV file unchanged. This is still readable by non-technical users because ZIP files are natively supported by both Windows and macOS. People can double click on them like a directory and then double click again on the CSV to open it up in Excel.
Pekka Väänänen, Sep 14 2020
Data-Oriented Design (2018) by Richard Fabian
Computers keep getting faster but the future ain't what it used to be. Instead of higher clock rates we get deeper pipelines, higher latencies, more cores. Programming these systems requires paying attention to how we structure and access our data. In Data-Oriented Design Richard Fabian—who has worked at Frontier Developments, Rockstar Games, and Team17—presents us an approach to reason about these issues from a C++ game developer's perspective.
Data-oriented design is about caches and decoupling meaning from data. The former implies laying out your data so that they're compact and predictably accessed. The latter means exposing the raw transforms from one sequence of bits to another. For example, finding the pla
""" | |
A pretty terrible arithmetic coder with a 0th order model. | |
Based on Matt Mahoney's fpaq0 implementation available at | |
http://mattmahoney.net/dc/#fpaq0 | |
""" | |
import sys |
import numpy as np | |
import matplotlib.pyplot as plt | |
from numpy import array | |
import torch | |
from torch import Tensor | |
""" | |
A dumb triangle rasterizer with PyTorch. | |
It evaluates the barycentrics for all image pixels for each triangle | |
and then picks the "colors" (just barycentrics again) for each pixel |
import numpy as np | |
import matplotlib.pyplot as plt | |
from numpy import array | |
width = 100 | |
height = 80 | |
# The triangle | |
d = np.array([ [ [0.9, 0.5], [0.5, 0.8], [0.1, 0.15] ] ]) |
// This file is automatically generated, but you can add your own variables here too. | |
// Syntax: SET_VAR(variable_name, default, low_limit, upper_limit, slider_exponent) | |
// In code you can read the variable with: GET_VAR(variable_name) | |
SET_VAR(tower_height, 520.0f, 0.0f, 3000.0f, 1.0f) | |
SET_VAR(KSpring, 520.0f, 1.0f, 3000.0f, 1.0f) | |
SET_VAR(WireRadius, 2.0f, 0.1f, 34.0f, 1.0f) | |
SET_VAR(volcanic_sun_x, 0.088000, -20.0f, 20.0f, 1.0f) | |
SET_VAR(mothership_sun_x, 2.026000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(mothership_sun_y, 0.507000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(wire_fog_exp, 0.0f, 0.0f, 100.0f, 1.0f) |
#!/usr/bin/python | |
import sys | |
from ast import literal_eval | |
if len(sys.argv) != 2: | |
print "Usage: ebin INTEGER" | |
sys.exit(1) | |
s = "{0:08b}".format(literal_eval(sys.argv[1])) | |
n = 4 # split into 4 bit blocks | |
# awful reversing hack to get proper formatting | |
s = s[::-1] |
▄▄▄▄▄ ▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ | |
█▓▒░ ░█ █▓▒░ ░▒▓▒█ █▒░ ░▒▓▒░ █ █░ ░▒▓▒░█ █▓▒░ ░▒▓█ █ ░▒▓▒░ ░▒█ | |
█▒░ ░▒█ █▒░ ░▒▓▒░█ █░ ░▒▓▒░ ░█ █ ░▒▓▒░ █ █▒░ ░▒▓▒█ █░▒▓▒░ ░▒▓█ | |
█░ ░▒▓█ █▒░ ░▒▓▒░ ░█ █░ ░▒▓▒░ ░▒▓█ █░▒▓▒░ ░▒█▒░ ░▒▓▒░█ █▒▓▒░ ░▒▓▒█ | |
█ ░▒▓▒█ █░ ░▒▓▒░ ░▒█ █ ░▒▓▒░ ░▒▓▒█ █▒▓▒░ ░▒▓▒░ ░▒▓▒░ █ █▒▓▒░ ░▒▓▒░ █ | |
█░▒▓▒░█ █ ░▒▓██ ░▒▓█ █░▒▓▒░██▒▓▒░█ █▓▒░ ░▒▓▒░ ░▒▓▒░ ░█ █▓▒░ ░██▒░ ░█ | |
█▒▓▒░ █ █░▒▓▒██░▒▓▒█ █▒▓▒░ ██▓▒░ ░██▒░ ░▒█▒░ ░▒█▒░ ░▒█ █▒░ ░▒██░ ░▒█ | |
█▓▒░ ░█ █░▒▓▒░██▒▓▒░ █▒▓▒░ ░██▒░ ░▒██░ ░▒▓█░ ░▒▓█░ ░▒▓█ █░ ░▒▓██ ░▒▓█ | |
█▒░ ░▒█▄▄▄█▒▓▒░ ░▒▓▒░ ░█▓▒░ ░▒▓▒░ ░▒▓██ ░▒▓▒█ ░▒▓▒█ ░▒▓▒██░ ░▒▓▒░ ░▒▓▒░█ | |
█░ ░▒▓▒░ ░▒▓▒░ ░▒▓▒░ ░▒▓▒░ ░▒▓▒░ ░▒▓▒░ ░▒▓▒░██▒▓▒██░▒▓▒░██ ░▒▓▒░ ░▒▓▒░ █ |