Skip to content

Instantly share code, notes, and snippets.

View miguelraz's full-sized avatar
:shipit:

Miguel Raz Guzmán Macedo miguelraz

:shipit:
  • UNAM
  • UNAM, Mexico
View GitHub Profile
for issue_num in $(gh issue list -L 20 --label "state:needs triage" --state "closed" | awk '{print $1}'); do
url="https://github.com/zed-industries/zed/issues/$issue_num"
gh issue edit $issue_num --add-label "state:needs repro" &;
gh issue edit $issue_num --remove-label "state:needs triage" &;
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome $url;
done
@miguelraz
miguelraz / README.md
Created November 3, 2025 03:05
A script for plotting

Plotting from Julia with Rust - "Just don't!" version :D

  1. Run julia plotter.jl in a REPL, changing data1 appropriately
  2. Modify your main.rs to dump the interesting files

Otherwise, you can probably setup a loop to redo this every 5 seconds - Makie is fast enough that just parsing and displaying the data should feel pretty fast.

#!/bin/sh
set -eu
if ! cargo fmt -- --check
then
echo "There are some code style issues."
echo "Run `cargo fmt` first."
exit 1
fi
[
{
"arguments": [
"/usr/bin/g++",
"-march=native",
"-mtune=native",
"-m64",
"-std=c++17",
"-DPACKAGE_NAME=\"patchelf\"",
"-DPACKAGE_TARNAME=\"patchelf\"",
[
{
"arguments": [
"/usr/bin/gcc",
"-march=native",
"-mtune=native",
"-m64",
"-std=gnu99",
"-D_GNU_SOURCE",
"-Wall",
# TODO: https://teejeetech.com/2025/08/14/debian_13_tips/
sudo apt install curl llvm clang -y
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# . "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
#source "$HOME/.cargo/env.fish" # For fish
#source $"($nu.home-path)/.cargo/env.nu" # For nushell
# Install binstall from source :DDD
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
use core::future::Future;
use core::pin::Pin;
use core::time::Duration;
use std::future::poll_fn;
use std::task::Poll;
pub async fn try_join<'a>(
futs: impl IntoIterator<Item = Pin<Box<dyn Future<Output = Result<(), &'a str>>>>>,
) -> Result<(), &'a str> {
// Define the iterator outside of the loop so we can repeatedly call `futs_iter.next()` without ownership issues

Rust Fundamentals

Overview

  • Writing Safe Rust gets you the following benefits instantly:
    • running UBSAN, ASAN, THREADSAN and RAII analysis at compile time, without the performance penalty at runtime
    • all bindings are consted by default unless they specifically opt out with let mut
    • all code you depend on is also analyzed under the same constraints by the compiler
  • C++ copies variables by default, Rust transfers ownership (moves) by default. Custom types may opt into implicit Copy or explicit Clone copy semantics.
https://educacioncontinua.geofisica.unam.mx/index.php/sismicos-basico/