Skip to content

Instantly share code, notes, and snippets.

View PoignardAzur's full-sized avatar
💭
Sleep mode off

Olivier FAURE PoignardAzur

💭
Sleep mode off
  • Paris, France
View GitHub Profile
@PoignardAzur
PoignardAzur / AnimorphsFicIdea.md
Created June 20, 2020 17:46
Animorphs fic Idea
@PoignardAzur
PoignardAzur / DynSafeMcp.md
Last active July 8, 2020 12:42
MCP - Expand object safety

Proposal

NOTE: There has been some debate in the past as to what term best describes when a trait can be turned into a trait object with the syntax dyn MyTrait. The current official term is "object safety", but it is widely agreed to be unsatisfying. We use "dyn-safety" in this document.

Summary

  • Progressively move the language towards having by-default dyn-safety for all traits.

  • To that end, add a new ?dyn trait qualifier to indicate that template parameters accept a trait object.

I poured myself a cup of tea, floated down my books from upstairs, and sat down across from him.

There was no burst of energy or determination in my veins. I felt as frightened and unfocused and tired as I did an hour ago. And I wanted more than anything to get drunk, or play Jao Lu, or listen to the radio or watch something on one of those fancy new television sets.

I sat down at the coffee table, next to Hira. And I flipped open the book.

https://pithserial.com/2020/06/30/7-a-the-blue-charlatan/

pub trait VirtualDom {
fn update_value(&mut self, other: Self);
#[track_caller]
fn init_tree(&self, cx: &mut Cx);
fn apply_diff(&self, other: &Self, cx: &mut Cx) -> bool;
}

Long-lived callbacks are evil

Imperial society

Modern life is very structured around imperial utilities

Lots of household chores (cooking, cleaning, deliveries) are handled by state-owned corporations.

Status is displayed by having top-tier service from these corporations. Having personal servants is perceived as un-imperial, barbarian, associated with slavery. High-status people don't have personal housekeepers/cooks/etc, they have contracts with high-reputation housekeeping/cooking/cleaning corporations. Since these corporations are state-owned, getting priority service from them involves personal favors and horse-trading.


Povcon

Alternate git frontend

TODO

Note: have feature to track previous commits that interacted with your local branch last rebase (eg to handle renames)

Users should be able hit a "record" button, do a bunch of things, then be given a "Summary of what you just did" that goes:

  • There were X mousemove events
  • There were X mouseenter events
  • There were X mouseexit events
  • There were X click events
  • There were X keyboard events

About variadics in Rust

This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.

Introduction

Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.

To give a quick example, a Rust function with variadic generics might look like this: