Code Monkey home page Code Monkey logo

red_blog's Introduction

Red's blog

This is the source repo for the blog and its content. Feel free to fork the code or copy parts of it. I would only ask you to change the theme to make it look different if you intend to use it publicly.

The blog is generated with Zola; for now it's done manually since I'm checking the result anyway. The built website is updated in docs/ when it's ready to be published.

The code and theme are home-made. It's very basic and should be fine on handheld devices, though it was done for 1080p monitors or larger.

To-do list

  • check handheld device compatibility
  • add utterances script for comments
  • fix dark code theme
  • favicon
  • light / dark theme switch, script
    • add a "system preference" option
  • 2-stage collapse of nav and TOC panels
  • move the tags elsewhere when this panel is collapsed
  • search
  • add a clipboard copy button for code
  • feeds

External components

red_blog's People

Contributors

blueglyph avatar

Watchers

 avatar

red_blog's Issues

blog posts

Subscribe to this issue to receive notifications on new posts.

Some comments on trait-impl-macros

First, I'm not approving "Act on your behalf" to comment. That's way too broad.

let's consider the crates providing macros to instantiate a HashMap object

It's now [(a, b), (c, d)].into(), without needing a macro.

Finding the Right Crate

If you haven't already, be sure to try out https://lib.rs/ -- it's a more opinionated site that uses more heuristics and such to attempt to be more useful for some things than the normal crates dot io site.

Delegated curation is best, IMHO. Write a book about your topic (like https://rust-cli.github.io/book/index.html) and recommend crates for that domain in it.

I never want to spend reviewer bandwidth on fights over which not-owned-by-rust-lang crates should be mentioned in the standard library docs, for example, so the only reasonable option is to not link to any of them.

After all, if they're good enough for all the implementations in an essential library, they must be worth sharing.

This is definitely not true. For example, the 2468-line uint_impl is certainly not worth sharing

https://github.com/rust-lang/rust/blob/e013d8f8b3984ed2409e489f5d5183a0e3d091cf/library/core/src/num/uint_macros.rs#L1-L25

As as you pointed out, if it was made public, that would basically prevent changes like rust-lang/rust#108279 to make it easier to read in the callsites.

as if by resentment, showing no goodwill to share the code with us.

No, because stability promises are expensive.

"When we must repeat something several times, we consider automatizing it and sharing the code" is just as true for library developers -- that's why things like rust-lang/rust#102300 exist.

But it wouldn't happen if every internal macro had to have enough libs-api oversight to put it on the path to stabilization.

Macros are no different here from all the pub(crate) functions in the standard library that you can't use either, like https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/alloc/vec/struct.IntoIter.html#method.into_vecdeque

On the overall idea

A bunch of this got caught up in the specialization problems.

There's long been a wish that there'd just be some sort of

#[bikeshed_fallback_impl]
impl<T: Copy> Add<&T> for &T
    where T: Add<T>
{
    type Output = <T as Add<T>>::Output;
    fn add(self, other: &T) -> Self::Output {
        *self + *other
    }
}

or similar in core so you never have to use a macro to implement those.

But specialization is a quagmire if the impls can depend on lifetimes, so it hasn't moved in ages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.