Skip to content

Instantly share code, notes, and snippets.

@xpe
xpe / ChatGPT-o1-wrong-thread-pools-2024-12-21.md
Last active December 21, 2024 16:37
ChatGPT o1 wrong on thread pools 2024-12-21

ChatGPT o1 wrong on thread pools 2024-12-21

Here is an edited transcript.


User

Claim: thread pools are ONLY needed when one creates a variable number of threads but wants to cap the maximum number. Agree or disagree or clarify. Explain.

@xpe
xpe / burn-CHANGELOG-v0.15.0.md
Last active December 3, 2024 16:19
Burn (Rust ML library) CHANGELOG up to v0.15.0

v0.15.0 - 2024-10-28

Summary

This release brings major performance improvements to tensor operations, particularly in matrix multiplication and convolution, along with experimental ROCm/HIP and SPIR-V support enabled by CubeCL runtimes. It also introduces foundational features for multi-backend compatibility and adds new quantization operations.

Support for ONNX models has been expanded, with additional operators and bug fixes for better operator coverage.

As with previous releases, this version includes various bug fixes, further performance optimizations, new tensor operations, and enhanced documentation.

@xpe
xpe / discussion-anti-pattern-ideological-commentary.md
Last active November 4, 2024 18:00
Discussion Anti-Pattern: Ideological commentary about linked news stories

Discussion Anti-Pattern: Ideological commentary about linked news stories

So many discussion forums are broken in so many ways.

Antipattern Pattern

  1. Someone posts a link to a news story.
  2. Subsequent comments pick a side and argues in favor of it.

Below, I will explain why this is an anti-pattern.

@xpe
xpe / ai_policy_memo.md
Last active June 13, 2024 16:06
Synthesizing Expert Knowledge on AI Safety Risks

MEMORANDUM

TO: Head of AI Safety, National Institute of Standards and Technology (NIST)

SUBJECT: Synthesizing Expert Knowledge on AI Safety Risks

Problem Statement

How can NIST best synthesize a diversity of expert knowledge on AI safety?

@xpe
xpe / compiler_optimization_idea_reusing_function_calls.md
Last active May 28, 2024 14:12
Optimization questions and perhaps an idea

Consider this code. Please pay attention to how .style() derives from element. The rest is not important for the point I'm hoping to make here.

/// Centers `element` horizontally and vertically inside `canvas`.
/// Returns a `Node` struct containing the calculated position and dimensions
/// of the repositioned `element`.
pub fn center_element(element: &HtmlElement, canvas: &Canvas) -> Node {
    let dim = bounding_client_dim(element);
    let pos = centered_pos(&dim, &canvas.dim);
 {
@xpe
xpe / tera_macro_google_fonts.html
Last active May 9, 2024 15:39
Macro for Google Fonts links for use Tera (a templating engine written in Rust)
{% macro google_fonts(families) %}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
{% set prefix = "https://fonts.googleapis.com/css2?" -%}
{% set s = "" -%}
{% for family in families -%}
{% if loop.index0 > 0 -%}
{% set_global s = s ~ "&" -%}
{% endif -%}
{% set_global s = s ~ "family=" ~ family -%}
@xpe
xpe / cp_connecting_ip.rs
Created January 22, 2024 13:54
/src/server/extractors/headers/cp_connecting_ip.rs
use std::net::IpAddr;
use axum::http::HeaderMap;
#[derive(Debug, thiserror::Error)]
pub enum IpHeaderError {
#[error("`CF-Connecting-IP` header is missing")]
MissingHeader,
#[error("`CF-Connecting-IP` header contains invalid characters")]
@xpe
xpe / predictive-processing-20230918.md
Last active September 18, 2023 14:29
Predictive Processing Model - Introduction 2023-09-18

Predictive Processing in Consciousness

ChatGPT 4.0 transcript on 2023-09-18

User

Are you familiar with the cognitive science / neuroscience theory that consciousness is a simulation error-corrected by our senses?

What is this theory called? / In what academic disciplines is it situated? / When was it first proposed? / Please comment on how well it has or has not been adopted.

@xpe
xpe / ChatGPT-guidance-unsolicited-advice.md
Created June 10, 2023 14:39
ChatGPT Guidance: Unsolicited advice

No unsolicited advice

Do not give advice unless I specifically ask for it.

For example: don't tell me to seek out authorities, experts, or regulatatory guidance. This includes:

  • doctors
  • healthcare professionals
  • building inspectors
  • electrical codes
@xpe
xpe / open_letter_2022-09-09.md
Last active September 10, 2022 13:32
Open Letter to Paul of the Unison language