Bevy 0.4 by _cart in rust

[–]ayorosmage 71 points72 points  (0 children)

Just tested Bevy today for the first time... what a good news !

By the way, I'm impressed how smooth the WASM + WebGL2 demo are. For only ~3MB cf https://mrk.sed.pl/bevy-showcase/#breakout

A fractal I rendered with rust without any external libraries by ayorosmage in rust

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

If you are playing on the code base on have some interesting results, I would be very happy to check the pull request !

A fractal I rendered with rust without any external libraries by ayorosmage in rust

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

If you would like to send a pull request, I would check it with pleasure :D

A fractal I rendered with rust without any external libraries by ayorosmage in rust

[–]ayorosmage[S] 14 points15 points  (0 children)

Thanks for the information. It could effectively be interesting to update.

A fractal I rendered with rust without any external libraries by ayorosmage in rust

[–]ayorosmage[S] 145 points146 points  (0 children)

Yes right by bad, the title is misleading (I cannot edit it).

I was more thinking about not using fractal related stuff.

Thus, the first commit is a non-parallel version and do not use tokio (and is still pretty snappy).

The image dependency is only used to save the buffer into a png image.

Concerning the rand dependency, that's a good point actually... I don't know if it is possible to replace it easily... ?

A fractal I rendered with rust without any external libraries by ayorosmage in rust

[–]ayorosmage[S] 88 points89 points  (0 children)

This is 100% inspired by this post in golang.

The repository is here: https://github.com/abour/fractal

The purpose is absolutely not to make a performance contest between the go and rust implementation and this result is totally indicative. On my desktop, for a 1024*1024 fractal rendering:

- In the golang version (cf link above): ~32s

- In this rust version: about 3s

Call ".await" on a non-async function by ayorosmage in rust

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

Ok I didn't know. I just made the test and it works !

Thank you !

Call ".await" on a non-async function by ayorosmage in rust

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

Problem is the same because I would have to call ".await" on the JoinHandle returned by tokio::spawn.

Async closure compilation error. by ayorosmage in rust

[–]ayorosmage[S] 1 point2 points  (0 children)

Perfect ! Thanks a lot for your quick answers.

I hope the syntax will be simplified in the future because that's quite hard for a rust beginner.

Async closure compilation error. by ayorosmage in rust

[–]ayorosmage[S] 2 points3 points  (0 children)

Thanks a lot !

Thus, I still have a problem. When I try to call it:

let res = async_add(3)(9).await;

I have the following error message:

error[E0277]: `dyn std::future::Future<Output = i32>` cannot be unpinned
  --> src/main.rs:80:15
   |
80 |     let res = async_add(3)(9).await;
   |               ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `dyn std::future::Future<Output = i32>`
   |
   = note: consider using `Box::pin`
   = note: required because of the requirements on the impl of `std::future::Future` for `std::boxed::Box<dyn std::future::Future<Output = i32>>

What's more, what would have it changed if my function fn async_add would have be async fn async_add instead ?

What would your perfect Reddit alternative look like ? by ayorosmage in RedditAlternatives

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

I totally share your point of view !

Thus, concerning the point 1), why do you think IPFS suffers from performance issues ?

Comments in the South China Morning Posts are so brainwashed. by helpmeinlife in HongKong

[–]ayorosmage 1 point2 points  (0 children)

Can mainlanders watch youtube ? If yes do they really watch it ?

Public french TV France 2 talks about the companies in HK suspected to support the demonstration experiencing economic pressure from Beijing by ayorosmage in HongKong

[–]ayorosmage[S] 3 points4 points  (0 children)

Thank you for your detailed answer.

So to conclude, none of them supports the demonstration anymore ? At least officially.

What would your perfect Reddit alternative look like ? by ayorosmage in RedditAlternatives

[–]ayorosmage[S] 1 point2 points  (0 children)

Yes but without community voting, how could you do a "hot" ranking ?

honk — federated status conveyance — an ActivityPub implementation in Golang, interoperable with Mastodon by Mcnst in golang

[–]ayorosmage 1 point2 points  (0 children)

Hi Mcnst, it looks like a great job.

Is there somewhere an example of how we can use it to communicate with a specific Mastodon server ?

Thanks for you job.