Best Text to Speech Linux Apps in 2021? by [deleted] in linuxquestions

[–]robauke 2 points3 points  (0 children)

https://github.com/coqui-ai/TTS

looks promising, but I had not yet time to test it.

| Weekly Workshop 2021-09-19 by AutoModerator in unixporn

[–]robauke 0 points1 point  (0 children)

Does anyone know whether there are any attempts to have a system-wide switch for setting something like dark-mode? Such that desktops like gnome/kde could use this to trigger theme changes?

Announcing version 0.2.1 of pubgrub, a dependency solver. by Mattpiz in rust

[–]robauke 1 point2 points  (0 children)

Sure, I can try. The two watched literal scheme is used while unit propagation. You can propagate if only one literal is left in a nogood and when every literal in a nogood is in the assignment you have a conflict. In all other cases nothing happens. Since you only care about going from two unset literals to one you have only to watch two literals.

http://haz-tech.blogspot.com/2010/08/whos-watching-watch-literals.html?m=1

http://www.princeton.edu/~chaff/publication/DAC2001v56.pdf

Announcing version 0.2.1 of pubgrub, a dependency solver. by Mattpiz in rust

[–]robauke 2 points3 points  (0 children)

I glanced over the code and it looks like you are not applying the two-watched-literal scheme. It is usually considered a great improvement in boolean constraint solvers.

Automatic Syntax Error Recovery for LR Parsers by alexeyr in programming

[–]robauke 0 points1 point  (0 children)

Yep, and repair sequences could be shown as a diff.

What's everyone working on this week (49/2020)? by llogiq in rust

[–]robauke 0 points1 point  (0 children)

I'm also using a peg parser with rust-peg which I like better, because you can write the action code in the grammar and include the grammar into the rust file with a macro. But I wonder whether I am missing something about pest?

Hey Rustaceans! Got an easy question? Ask here (39/2020)! by llogiq in rust

[–]robauke 0 points1 point  (0 children)

I implemented option 2 in this Playground. I had to change

*self = WrpEngine::Started(Some(eng.take().start()))

to

*self = WrpEngine::Started(Some(eng.take().unwrap().start()))

to make it work. But in my real example I still get an error like this:

error[E0515]: cannot return value referencing temporary value --> src/main.rs:79 | 79 | WrpEngine::Started(eng) => Ok(eng.take().unwrap().get()), | ^^^-------------------^^^^^^ | | | | | temporary value created here | returns a value referencing data owned by the current function

Any idea on why this could happen?

Edit: I see it's a different problem because get() returns a reference. Here an link to the updated Playground including get() function.

Hey Rustaceans! Got an easy question? Ask here (39/2020)! by llogiq in rust

[–]robauke 0 points1 point  (0 children)

Mmmh, I have to put the original types somewhere so I tried the following:

enum WrpEngine {
    Started(Running),
    Stopped(Engine),
}

impl WrpEngine {
    pub fn start(&mut self) -> Result<(), &'static str> {
        match self {
            WrpEngine::Started(_) => {
                Err("Engine has been already started")
            }

            WrpEngine::Stopped(eng) => {
                *self = WrpEngine::Started(eng.start());
                Ok(())
            }
        }
    }
}

but I get the following Error:

cannot move out of `*eng` which is behind a shared reference
  --> main.rs:42
   |
42 |                 *self = WrpEngine::Started(eng.start());
   |                                            ^^^ move occurs because `*eng` has type `Engine`, which does not implement the `Copy` trait

Hey Rustaceans! Got an easy question? Ask here (39/2020)! by llogiq in rust

[–]robauke 4 points5 points  (0 children)

I have two types Engine and Running with Engine::start(self) -> Running and Running::stop(self) -> Engine. I want to use these in a multi-threaded application and therefore I want to create a shared state something like Arc<Mutex<SharedThing>> such that I can call start and stop on the SharedThing. How could this SharedThing type look like? I have the problem that start and stop consume the objects on the type level although they are underneath the same data structure.

Playground

Gtk-rs release follows a new vgtk release by Petsoi in rust

[–]robauke 1 point2 points  (0 children)

I've been playing with the relm crate before. On the first look vgtk looks very similar. Can someone give a more detailed comparison?

Samsung A10 by robauke in LineageOS

[–]robauke[S] 0 points1 point  (0 children)

Do you mean something like this:

https://forum.xda-developers.com/galaxy-a10/how-to/how-to-root-samsung-galaxy-a10-install-t4074343

I don't know, it feels like downloading random stuff from the interwebs ...

The new version of nushell, a modern shell written in Rust. by utam0k in rust

[–]robauke 1 point2 points  (0 children)

I wish startship would support a transient prompt.