- Save
happy.hlsl
to disk, note the path for later. - Open Windows terminal settings
- Open settings as JSON
- Add a custom shader to the default profile, see excerpt below.
{
"profiles": {
#define WINDOWS_TERMINAL | |
Texture2D shaderTexture; | |
SamplerState samplerState; | |
// -------------------- | |
#if defined(WINDOWS_TERMINAL) | |
cbuffer PixelShaderSettings { | |
float Time; | |
float Scale; |
namespace MyNamespace | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; |
using System.Runtime.CompilerServices; | |
// An "immutable" string | |
var x = "I am immutable"; | |
// *Insert evil laugh here* | |
var y = Unsafe.As<char[]>(x); | |
var z = "mutable!!"; | |
// Overwriting the string | |
// Might only "work" on x64 but for hackers 'Might' is good enough ;) |
var repoRepos = new RepositoryRepository(); | |
var pageRepo0 = repoRepos.GetRepository<IPage>(); | |
var pageRepo1 = repoRepos.GetRepository<IPage>(); | |
class RepositoryRepository | |
{ | |
readonly List<IBaseRepository> _repos = new(); | |
IBaseRepository CreateRepository(Type t) | |
{ |
The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise
Edsger W. Dijkstra
This is my contribution to F# Advent Calendar in English. Thanks to Sergey Tihon for making sure this happens every year.
module RResult = | |
open System.Collections.Generic | |
open System.Text | |
[<RequireQualifiedAccess>] | |
type RBad = | |
| Message of string | |
| Exception of exn | |
| Object of obj | |
| DescribedObject of string*obj |
Shadertoy is an online platform where programmers can create and share shaders - small programs that run on a GPU and render graphics and animations in real-time. The platform has become popular among graphics enthusiasts and game developers, as it provides an accessible and engaging environment for exploring the capabilities of modern graphics hardware.
For those who enjoy programming and are interested in graphics, there are few experiences as rewarding as writing shaders on Shadertoy. In this blog post, we'll explore the joy of programming shaders on Shadertoy, and why it has become such a popular platform among graphics enthusiasts.
namespace SomeLib | |
{ | |
using System.Globalization; | |
using System.Runtime.CompilerServices; | |
static partial class StringInterpolation | |
{ | |
// This is to allow to use fast string interpolation | |
public static string FastInvariantInterpolation(ref DefaultInterpolatedStringHandler handler) | |
{ |