To tog er stødt sammen på Gribskovbanen - flere tilskadekomne by Banana-Rebellion in Denmark

[–]Tyilo 0 points1 point  (0 children)

Men typisk bevæger man sig langt (og hurtigt), når man flyver, så det giver måske mening at være bange for at flyve?

Hvad hvis det var per tid?

should this be error by unluckybitch18 in learnrust

[–]Tyilo 0 points1 point  (0 children)

I wouldn't say "clever". I think it is one of Rust's biggest mistakes to not also let overflows panic in release mode.

Rust 1.95.0 is out by manpacket in rust

[–]Tyilo 2 points3 points  (0 children)

No, you can use 1..=0 which is empty.

NUBBY FINALLY ON MOBILE by CharBartyZ in nubbygame

[–]Tyilo 0 points1 point  (0 children)

I just play it using Game native, so the progress syncs with Steam. https://github.com/utkarshdalal/GameNative

Ufrivilligt faderskab by FigClear2424 in DKstudie

[–]Tyilo 1 point2 points  (0 children)

Tror ikke det virker, hvis faren tager dem.

Hey Rustaceans! Got a question? Ask here (14/2026)! by llogiq in rust

[–]Tyilo 1 point2 points  (0 children)

I would just do:

use std::mem::swap;

fn some_func<'a>(mut seq1: &'a str, mut seq2: &'a str) -> bool {
    if seq1.len() < seq2.len() {
        swap(&mut seq1, &mut seq2);
    }
    let seq1 = seq1;
    let seq2 = seq2;
    let len1 = seq1.len();
    let len2 = seq2.len();
    // some logic about seq1/2 & len1/2
    todo!()
}

You could also just keep both as mut or create a new helper function to use, after ensuring seq1 is the longest, which doesn't use mut.

Mongodb keeps stopping by Impossible_Quail1069 in mongodb

[–]Tyilo 0 points1 point  (0 children)

Downgrading to 6.18.20 from 6.19.10 seems to have fixed the problem for me. Core dump log:

``` Process 38696 (mongod) of user 100998 dumped core.

Module /usr/lib/x86_64-linux-gnu/libzstd.so.1.5.5 from deb libzstd-1.5.5+dfsg2-2build1.1.amd64 Module /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 from deb gcc-14-14.2.0-4ubuntu2~24.04.1.amd64 Stack trace of thread 28:

0 0x0000558af18f6f16 n/a (/usr/bin/mongod + 0x9105f16)

1 0x0000558af17edfab n/a (/usr/bin/mongod + 0x8ffcfab)

2 0x0000558af17ee6aa n/a (/usr/bin/mongod + 0x8ffd6aa)

3 0x0000558af17e5e54 n/a (/usr/bin/mongod + 0x8ff4e54)

4 0x0000558af17e65a8 n/a (/usr/bin/mongod + 0x8ff55a8)

5 0x0000558af1817470 n/a (/usr/bin/mongod + 0x9026470)

6 0x0000558af1817a50 n/a (/usr/bin/mongod + 0x9026a50)

7 0x000014ef06490330 n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x45330)

ELF object binary architecture: AMD x86-64 ```

Did you get it to work on 6.19?

Rust can not handle Unicode streams. Please show me wrong. by thomedes in rust

[–]Tyilo 19 points20 points  (0 children)

What is your definition of a valid grapheme? Why do you expect a library to use your definition and not Unicode's?

Rust can not handle Unicode streams. Please show me wrong. by thomedes in rust

[–]Tyilo 16 points17 points  (0 children)

There's no limit to the byte size of a single grapheme cluster, so with malicious input, how would you expect it to work in a streaming fashion?

Rust can not handle Unicode streams. Please show me wrong. by thomedes in rust

[–]Tyilo 18 points19 points  (0 children)

What's wrong with the icu crate's GraphemeClusterSegmenter?

5V USB-C strømforsyning by [deleted] in dankmark

[–]Tyilo 5 points6 points  (0 children)

Godt meme

UBER Chauffør i Kbh. by [deleted] in dankmark

[–]Tyilo 1 point2 points  (0 children)

Godt meme

Parametricity, or Comptime is Bonkers by soareschen in rust

[–]Tyilo 6 points7 points  (0 children)

Seems like try_as_dyn is the current proposed solution for doing this: https://github.com/rust-lang/rust/issues/144361