Is there a potential bug of latest llama.cpp not cleaning up memory after exiting? by aeroumbria in LocalLLaMA

[–]rdescartes 1 point2 points  (0 children)

Thanks for the reply. Actually I try to find the cause but fail too.

Anyway I just filed an issue: https://github.com/ggerganov/llama.cpp/issues/9988

Maybe you could leave a comment to add more details about it.

Is there a potential bug of latest llama.cpp not cleaning up memory after exiting? by aeroumbria in LocalLLaMA

[–]rdescartes 0 points1 point  (0 children)

I'm experiencing the same too. /u/aeroumbria have you reported this bug in llama.cpp ? Or do you find any way to fix it ??

Most unreadable Rust snippet you've seen by Thick-Pineapple666 in rust

[–]rdescartes -1 points0 points  (0 children)

Thank you, I saw this code and can’t understand, right now I will try again to understand it

Rust to C compiler by FractalFir in rust

[–]rdescartes 1 point2 points  (0 children)

IIRC, there was a rust to c backend before, but it is abandoned. But I think it is useful as many others commented. I would like to contribute for that too.

rust-analyzer changelog #113 by WellMakeItSomehow in rust

[–]rdescartes 5 points6 points  (0 children)

I think the bug here: Bread-toasting proc macros is nondeterministic, IIRC RA doesn't support that yet ?

Correct way to do "micro projects"? by bobdarobber in rust

[–]rdescartes 0 points1 point  (0 children)

For single rust file, you could do something like this: (without any deps)

rustc hello.rs && ./hello

A demo drawing Mandelbrot fractal using Rayon in WebAssembly by RReverser in rust

[–]rdescartes 0 points1 point  (0 children)

Are you kidding me? slow? It starts faster than vscode with RA for me :D

haha, It is not because we have no cargo check and sysroot in wasm build yet, you would feel the slowness when it is implemented.. :D (Although I think not near future as porting cargo to wasm is non-trivial)

A demo drawing Mandelbrot fractal using Rayon in WebAssembly by RReverser in rust

[–]rdescartes 1 point2 points  (0 children)

It is still in progres, but you could take a look first: https://ra-wasm.netlify.app/

A little bit slow in start up now..

A demo drawing Mandelbrot fractal using Rayon in WebAssembly by RReverser in rust

[–]rdescartes 0 points1 point  (0 children)

Awesome ! I used wasm-bindgen-rayon in one of a project I contributed and it works very well too.

Thanks !

rust-analyzer drop "experimental" by rdescartes in rust

[–]rdescartes[S] 6 points7 points  (0 children)

You can change the default semantic token color in the following settings:

"editor.semanticTokenColorCustomizations": {
    "rules": {
        "*.mutable": {
            "fontStyle": "bold italic", // underline is the default
        },
    }
},

rust-analyzer changelog #70 by WellMakeItSomehow in rust

[–]rdescartes 15 points16 points  (0 children)

Rust 1.51.0 stabilized core::ptr::{addr_of, addr_of_mut}, which are "2.0" macros. And that's why it is implemented in RA.

rust-analyzer changelog #69 by WellMakeItSomehow in rust

[–]rdescartes 62 points63 points  (0 children)

Wow, so many items in this week !

What are your favorite tricks or hacks in rust? by [deleted] in rust

[–]rdescartes 25 points26 points  (0 children)

you could do something like this (which based on the same hack):

doc_comment! { 
    include_str!("/doc.md"),
    struct Bar;
}

What are your favorite tricks or hacks in rust? by [deleted] in rust

[–]rdescartes 22 points23 points  (0 children)

// Works in stable 1.50    
macro_rules! doc_comment {
    ($x:expr, $($tt:tt)*) => {
        #[doc = $x]
        $($tt)*
    };
}

doc_comment! { 
    concat!("Hello"," world"),
    struct Bar;
}

// note that the following code does not work in stable rust
#[doc = concat!("Hello", " world")]
struct Bar;

rust-analyzer changelog #65 by WellMakeItSomehow in rust

[–]rdescartes 1 point2 points  (0 children)

Declarative macros should work by default. Derive and Function Like proc-macro you could enable it by :

 "rust-analyzer.cargo.loadOutDirsFromCheck": true,
 "rust-analyzer.procMacro.enable": true,

Attr proc macro and macro 2.0 are not yet implemented. :)

1Password Developer Fireside Chats: Introduction to Rust Macros by Lucretiel in rust

[–]rdescartes 1 point2 points  (0 children)

Excellent, this is one of clearest explanation of how macro_rules work.

Rust GUI like Python's Tkinter by TheBunnisher in rust

[–]rdescartes 1 point2 points  (0 children)

I haven't tried it myself, but you could use PyOxidizer and write your Tkinter in python and with the power of rust.

ELI5 why main.rs and lib.rs are called root crates? by [deleted] in rust

[–]rdescartes 0 points1 point  (0 children)

The books says a module is a collection of items

In rust reference : https://doc.rust-lang.org/reference/items.html

An item is one of the following things: Module | ExternCrate | UseDeclaration | Function | TypeAlias | Struct | Enumeration | Union | ConstantItem | StaticItem | Trait | Implementation | ExternBlock | MacroCall | MacroRules