Initially taken by Niko Matsakis and lightly edited by Ryan Levick
- Introductions
- Cargo inside large build systems
- FFI
- Foundations and financial support
| ### | |
| ### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
| ###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
| ###. things to watch out for: | |
| ### - Check out the `nix-darwin` instructions, as they have changed. | |
| ### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
| ### | |
| # I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
| # So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
| global.THREE = require("three"); | |
| const canvasSketch = require('canvas-sketch'); | |
| const Random = require('canvas-sketch-util/random'); | |
| const gradientHeight = 512; | |
| const settings = { | |
| dimensions: [ 2048, gradientHeight * 2 ] | |
| }; |
| protocol KeyPathUpdatable {} | |
| extension KeyPathUpdatable { | |
| func updating<LeafType>(_ keyPath: WritableKeyPath<Self, LeafType>, to value: LeafType) -> Self { | |
| var copy = self | |
| copy[keyPath: keyPath] = value | |
| return copy | |
| } | |
| } |
| // code updates are now there: | |
| // https://github.com/Bleuje/processing-animations-code/blob/main/code/radialcollapse/radialcollapse.pde | |
| // Processing code by Etienne JACOB | |
| // motion blur template by beesandbombs | |
| // opensimplexnoise code in another tab is be necessary | |
| // --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
| // See the license information at the end of this file. | |
| // View the rendered result at: https://bleuje.com/gifanimationsite/single/radialcollapse/ |
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
First off, thanks for all the comments and kind words on the original writeup; I've been meaning to follow up on some of the suggestions and write about the different ways to represent monads (and functors, HKTs, etc) that now exist, but a month of being busy has kind of gotten in the way (mainly with three new kittens!).
And for sure, I do not expect (nor do I want) this to become the norm for production-level Rust: rather, I hope that this can contribute to the foundations of programming with higher-level abstractions in Rust, somewhat like how early template metaprogramming in C++ and typeclass-constraint-unification metaprogramming in Haskell have contributed, perhaps indirectly, to later innovations in their respective languages and ecosystems that were much more reasoned, sound and usable.
One of the things suggested in the com
I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.
There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.
As an example, currently we can express this type:
| 1) Install cloudflared using homebrew: | |
| brew install cloudflare/cloudflare/cloudflared | |
| 2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
| proxy-dns: true | |
| proxy-dns-upstream: | |
| - https://1.1.1.1/dns-query | |
| - https://1.0.0.1/dns-query |