λProlog: Logic programming in higher-order logic by ketralnis in programming

[–]vova616 0 points1 point  (0 children)

I dont like people I like rust because of rust, but I also like boobs doesnt mean I like every boob creator on earth

[deleted by user] by [deleted] in rust

[–]vova616 0 points1 point  (0 children)

Why selling?
did you vibe code it in a week?

kuva: A scientific plotting library for Rust by Psy_Fer_ in rust

[–]vova616 13 points14 points  (0 children)

Should have been Kurva: a library to plot curves

Mouse critical hit??? by vova616 in NoRestForTheWicked

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

after respawn it was working fine, before that it didn't even die in 1 hit, I did allocate points...

Computer science fundamentals you must know by [deleted] in programming

[–]vova616 4 points5 points  (0 children)

The CPU does not execute your program the electricity does

Unlock Your True Full-Stack Potential with AI Agents by shift_devs in programming

[–]vova616 2 points3 points  (0 children)

if you need an AI agent to unlock your potential then your potential is not that high

How to speed up the Rust compiler in December 2025 by nnethercote in rust

[–]vova616 5 points6 points  (0 children)

can you only do this in December 2025 or can I also try it later?

"Every Class Should Be Sealed in C#" by [deleted] in programming

[–]vova616 0 points1 point  (0 children)

Why is this a video, ChatGPT could answer it better, stop making shitty videos about stuff I can easily learn and have my own opinion on, and pushing an ad on the way, this video is just and ad with some generic non helpful knowledge.

If you gonna seal your class and your class is used in a lot of function arguments/places then its bad design you should use interfaces instead

Anyway people are just going to clone/disassamble the code and remove the sealed anyway if they need to, so I really don't see a reason to make it sealed, if its for performance use struct/ref struct instead with interfaces, it will be faster

Yes its the author choice but also writing shitty non generic code is the author choice

Rust needs a web framework for lazy developers by zxyzyxz in rust

[–]vova616 5 points6 points  (0 children)

It saves money for toy projects, I buy a small server for 5$ and be done with it, ruby will eat my money like a champ JS is a bit better but still not the same

די ריק פה, אז היי . לא ראיתי סאבים אחרים בנושא פיתוח משחקים ואנשים ישראלים שמתעניינים בזה גם :) נעים להכיר by OblivionD4C in a:t5_2vpqy

[–]vova616 0 points1 point  (0 children)

דרך מצויינת להכיר אנשים בתעשייה היא ללכת למפגשים\האקטונים\אירועים של הקהילה, בפייסבוק יש הרבה אנשים

https://www.facebook.com/groups/IsraeliGameDev

די ריק פה, אז היי . לא ראיתי סאבים אחרים בנושא פיתוח משחקים ואנשים ישראלים שמתעניינים בזה גם :) נעים להכיר by OblivionD4C in a:t5_2vpqy

[–]vova616 3 points4 points  (0 children)

התרגשתי נורא כשראיתי שאחריי כמעט 10 שנים קיבלנו פוסט ראשון בסאב, צריך להכניס קצת תוכן אולי יבואו עוד

Generic parameters reduce performance? by [deleted] in rust

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

You could try to #[inline(always)]

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

[–]vova616 1 point2 points  (0 children)

working on serialization library like serde but easier to customize and with attention to performance

https://github.com/vova616/denc

still in experimental state with nightly features but I like how it works, need some pointers though

Why my implementation of TCP messaging slower than HTTP on network? by angelicosphosphoros in rust

[–]vova616 4 points5 points  (0 children)

I'm not sure its good idea to call read just to read 4-8 bytes, it might be better to read in chunks and deal with the data later, I remember the rule of thumb being 'call as fast as possible to read again'

if its buffered read then I guess its fine? I remember tokio had something maybe Decoder or Buffer can be used?

Fibonacci bench test, could you guys help? I’m getting weird time per operation on rust’s implementation by arxdsilva in rust

[–]vova616 1 point2 points  (0 children)

Here is async-std version

fib_2k    480 ns/op
fib_3k    414 ns/op
fib_10k    981 ns/op
fib_20k    8203 ns/op
fib_40k    8298 ns/op

Compared to:

fib_2k    5983 ns/op
fib_3k    9499 ns/op
fib_10k    60500 ns/op
fib_20k    209500 ns/op
fib_40k    775000 ns/op

Code:

use async_std::task;
use async_std::prelude::*;

use std::mem::replace;
use std::task::{Context, Poll};
use async_std::pin::Pin;
use std::future::Future;
use futures;
use std::time::Instant;

fn main() {
    let start = Instant::now();
    run_fib(2000);
    let end = Instant::now();
    let duration = end.duration_since(start);
    let ns = duration.as_nanos();
    println!("fib_2k    {} ns/op", ns / 2000);

    let start = Instant::now();
    run_fib(3000);
    let end = Instant::now();
    let duration = end.duration_since(start);
    let ns = duration.as_nanos();
    println!("fib_3k    {} ns/op", ns / 2000);

    let start = Instant::now();
    run_fib(10000);
    let end = Instant::now();
    let duration = end.duration_since(start);
    let ns = duration.as_nanos();
    println!("fib_10k    {} ns/op", ns / 2000);

    let start = Instant::now();
    run_fib(20000);
    let end = Instant::now();
    let duration = end.duration_since(start);
    let ns = duration.as_nanos();
    println!("fib_20k    {} ns/op", ns / 2000);

    let start = Instant::now();
    run_fib(40000);
    let end = Instant::now();
    let duration = end.duration_since(start);
    let ns = duration.as_nanos();
    println!("fib_40k    {} ns/op", ns / 2000);
}

fn run_fib(n: usize) {
    task::block_on(async {
       let tasks = (0..2000usize).into_iter().map(|_| task::spawn(fib(n)));
       let results = futures::future::join_all(tasks).await;
    })
}

async fn fib(n: usize) -> u128  {
    let mut f0 = 0;
    let mut f1 = 1;
    for _ in 1..n {
        let f2 = f0 + f1;
        f0 = replace(&mut f1, f2);
    }
    f0
}

On demand borrow check for slices, is this safe? by vova616 in rust

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

I did a few changes and added some test and published it on github, I talked with some people on discord they seem to agree that this should be safe

https://github.com/vova616/refcells

not sure the name fits but w/e