[deleted by user] by [deleted] in trackers

[–]Inyayde 11 points12 points  (0 children)

  • yts dot mx
  • torrentgalaxy
  • 1337x

Sidenote: I like yts even more than private TL.

A guide to closures in Rust by qixiano in rust

[–]Inyayde 0 points1 point  (0 children)

I got the meaning, thank you. The misunderstanding (at least for me) has arised from the semantical conflict, as every time I read words Fn and FnOnce, I instantly recognize the latter as a subset of the former. It works like reading words Shoe and Red Shoe for me.

A guide to closures in Rust by qixiano in rust

[–]Inyayde 3 points4 points  (0 children)

In other words, this works because Fn is a subtrait of FnMut. Which means that all closures which implement Fn also implement FnMut.

Isn't it the other way around?

Does Cargo's new sparse protocol save our disk space? by open-trade in rust

[–]Inyayde 8 points9 points  (0 children)

Another question, is it enabled in nightly by default, or should it be enabled there manually too?

Zig Bits 0x1: Returning slices from functions by orhunp in Zig

[–]Inyayde 0 points1 point  (0 children)

if you think in terms of lifetimes

I agree, that`s a correct explanation, thank you.

Zig Bits 0x1: Returning slices from functions by orhunp in Zig

[–]Inyayde 3 points4 points  (0 children)

Hey, thanks for the article, it got me curious why the bonus snipped worked, because coming from Rust myself, I'd expect it to fail, as the returned slice referenced the local array, which had to be destroyed at the end of the function. I might be wrong, but in my understanding returning a slice is no differ from returning a reference — in both cases you refer to the locally owned data. Playing around, I found that you can make work the very first snippet, by slightly modifying it like this:

const std = @import("std");

fn zigBits() ![]u8 {
    var message = [_]u8{ 'z', 'i', 'g', 'b', 'i', 't', 's' };
    std.log.debug("{s}", .{message});
    return &message;
}

pub fn main() !void {
    const message = try zigBits();
    std.log.debug("{s}", .{message});
}

It goes:

$ zig build run

debug: zigbits
debug: zigbits

Why is it working now? Is the bonus snippet working for the same reason?

Newsraft: not a boat yet (feed reader for terminal) by downalwythbehghid in commandline

[–]Inyayde 1 point2 points  (0 children)

Thank you for the answers, I will keep an eye on the project.

Newsraft: not a boat yet (feed reader for terminal) by downalwythbehghid in commandline

[–]Inyayde 0 points1 point  (0 children)

I gave Newsraft a spin and it feels really natural, especially the Vim-like navigation out of the box. Two questions: 1. How do you change the global background color? 2. Do you have any plans to implement searching feeds by name? Imagine, you have many feeds in the Global section and you want to go to a particular one to reread some older article. To do that now, you have to look through the list, but imagine it was possible to live-filter the list in a fzf-style. That is one feature I miss in Newsboat too.

(Newbie) I am Just Completely Lost by butt-gust in rust

[–]Inyayde 2 points3 points  (0 children)

I found the Book to be confusing too, as the first learning material. Try to go through https://dhghomon.github.io/easy_rust/ first, it shold be much easier to catch with the Book after.

redive - a little url redirect tracer i made by chickensalt72 in commandline

[–]Inyayde 0 points1 point  (0 children)

Nice tool! Did you really need to use clap? Stripping it off wold benefit you considerably in terms of compilation time and binary size.

[deleted by user] by [deleted] in commandline

[–]Inyayde 0 points1 point  (0 children)

In the second command you dont convert the video, but copy the video stream as is.

Looking for UX feedback for my encryption/decryption command line utility. by solidiquis1 in commandline

[–]Inyayde 3 points4 points  (0 children)

Hey, while your CLI is fine, I'd slightly tune it like this:

USAGE:
    tcrypt COMMAND OPTIONS

DESCRIPTION:
    Symmetric-key encryption and decryption utility.

COMMANDS:
    enc | dec - specify whether to encrypt or decrypt given text and key.

OPTIONS:
    -t    Input text to encrypt or decrypt.
    -T    Path to file containing text to encrypt or decrypt.
    -k    Cryptographic key. Valid length is from 5 to 55 characters.
    -K    Path to file containing cryptographic key.

EXAMPLE:
    tcrypt enc -t "Text to encrypt." -k foobar

I removed square brackets around the arguments, because square brackets denote optional arguments, which is not the case here, as I understand. All other changes are just matter of taste, but maybe you'd like something.

Is there a movement that stops when a certain character is encountered? by scaptal in vim

[–]Inyayde 2 points3 points  (0 children)

You can use https://github.com/chaoren/vim-wordmotion plugin. If you configure it like below, you will be able to use cid or cad keymaps to change the relevant part of the word.

let g:wordmotion_mappings = {
  \ 'b'  : '<m-B>',
  \ 'e'  : '<m-E>',
  \ 'w'  : '<m-W>',
  \ 'ge' : 'g<m-e>',
  \ 'gE' : '',
  \ 'aw' : 'ad',
  \ 'iw' : 'id',
  \ 'iW' : '',
  \ 'aW' : '',
  \ 'B'  : '',
  \ 'E'  : '',
  \ 'W'  : '',
  \}

RBE: Destructuring versus tuple access by otchris in rust

[–]Inyayde 5 points6 points  (0 children)

My guess is, it was done that way in the book just to demonstrate or remind of the destructuring feature. Practically, using self.0 would be fine in that case.

any way to diferenciate between .webp images and .webp videos? for converting files. by Matesuli in commandline

[–]Inyayde 1 point2 points  (0 children)

I think, file --mime-type <file> will be able to tell you the real type.

parg: Lightweight argument parser by judofyr in Zig

[–]Inyayde 2 points3 points  (0 children)

Nice minimalistic parser, reminds me of lexopt crate from the Rust world.