Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run  ·  activity timestamp 12 hours ago

found a great section in the rust stdlib which describes previous attempts to fix a metaprogramming issue as "crater runs" and has a list of all previous challengers who foolishly attempted to fix this https://github.com/rust-lang/rust/blob/2e854a9344154564259de51385e9ec9506c0f3b7/library/core/src/array/mod.rs#L484-L487

// Trying to improve the `[T; 0]` situation has proven to be difficult.
// Please see these issues for more context on past attempts and crater runs:
// - https://github.com/rust-lang/rust/issues/61415
// - https://github.com/rust-lang/rust/pull/145457
GitHub

rust/library/core/src/array/mod.rs at 2e854a9344154564259de51385e9ec9506c0f3b7 · rust-lang/rust

Empowering everyone to build reliable and efficient software. - rust-lang/rust
  • Copy link
  • Flag this post
  • Block
iitalics
iitalics
@milo@types.pl replied  ·  activity timestamp 11 hours ago

@hipsterelectron crater run is referring to this https://rustc-dev-guide.rust-lang.org/tests/crater.html

Crater - Rust Compiler Development Guide

A guide to developing the Rust compiler (rustc)
  • Copy link
  • Flag this comment
  • Block
Ted Mielczarek
Ted Mielczarek
@tedmielczarek@mastodon.social replied  ·  activity timestamp 12 hours ago

@hipsterelectron crater is a tool that runs a rustc change against a large number of crates (maybe all of crates.io?), FYI.

  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

@tedmielczarek oh i was having fun with the idea that it was like fighting bayle in elden ring. CURSE YOU BAYLE!!!!!!! but that's cool too

  • Copy link
  • Flag this comment
  • Block
Ted Mielczarek
Ted Mielczarek
@tedmielczarek@mastodon.social replied  ·  activity timestamp 9 hours ago

@hipsterelectron I heard that Alex Crichton made the crater run in under twelve parsecs.

  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

this is quite literally what jeanheyd's keynote was about btw https://soasis.org/posts/a-mirror-for-rust-a-plan-for-generic-compile-time-introspection-in-rust/

Shepherd's Oasis

A Mirror for Rust: Compile-Time Reflection Report

A plan for generic compile-time introspection in Rust, without the usual run-time baggage.
  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

i do actually think the correct way to do a type system is through the macro system, but that would be like racket or elisp with mechanisms to construct macro abstractions! but using macro_rules! like this is so ridiculous

  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

libsignal had a massive macro_rules! setup at one point for their various ffis. i think they do something better now

  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

they do proc macros now https://github.com/signalapp/libsignal/tree/main/rust/bridge

GitHub

libsignal/rust/bridge at main · signalapp/libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible. - signalapp/libsignal
  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

yeah see when your build system has absolutely no framework to hook together build products you have to create the entire build process by hand. thanks steve klabnik for keeping us all safe from our own code https://github.com/signalapp/libsignal/blob/cfaf27f3a2d743e776ef553a770295d7e751277d/rust/bridge/jni/bin/gen_java_decl.py#L52

GitHub

libsignal/rust/bridge/jni/bin/gen_java_decl.py at cfaf27f3a2d743e776ef553a770295d7e751277d · signalapp/libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible. - signalapp/libsignal
  • Copy link
  • Flag this comment
  • Block
d@nny disc@ mc²
d@nny disc@ mc²
@hipsterelectron@circumstances.run replied  ·  activity timestamp 12 hours ago

to be clear libsignal is actually doing the thing here like going the extra mile to recreate an entire reproducible auditable cross-language build system but cargo is not helping at all and that sucks!!!!

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct