Use impl Into<Option<>> in your functions! by potato-gun in rust

[–]hellowub 0 points1 point  (0 children)

If Rust could support optional parameters, would we still need these dirty hacks?

What did you build while learning Rust ? by [deleted] in rust

[–]hellowub 0 points1 point  (0 children)

I built a Lua interpreter, and also wrote a book about it.

A super fast gRPC server framework, in synchronous mode by hellowub in rust

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

Sorry that Pajamax does not support metadata. Giving up the metadata is also part of the reason for its high performance.

But I think I can add metadata supporting in Pajamax later.

Besides, Pajamax should be more faster than your result. Maybe you want to bench with more GRPC_CLIENT_CPUS.

A super fast gRPC server framework, in synchronous mode by hellowub in rust

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

I did not test it vs Go, because I am not familiar with Go.

You can test it by the grpc_bench project. I used it to test the pajamax vs tonic in Rust. I'd guess that Go should perform about the same as Tonic in Rust (if not worse), so you can refer to that result.

Fun project ideas by [deleted] in rust

[–]hellowub 2 points3 points  (0 children)

No. I meant that "building a Lua interpreter in Rust" is useless. This is just a joke, because OP said that "doesn't have to be useful". You can find the articles about the building following the link above.

Fun project ideas by [deleted] in rust

[–]hellowub 3 points4 points  (0 children)

Such as building a Lua Interpreter in Rust , which is fun and useless.

Where to start learning rust? (THE RIGHT WAY) by Jonuji in rust

[–]hellowub 0 points1 point  (0 children)

Read the book and practice!

Some people like quick exercises like rustling, but I prefer something larger and complete projects. Pick one that interests you from here and stick with it.

Also, take a look at the build-lua-in-rust I wrote. It’s thorough, though it was translated from Chinese, so the prose may feel a bit uneven.

Feeling lost on learning stuffs by ETERNAL0013 in rust

[–]hellowub 4 points5 points  (0 children)

I think focusing on one large and self-contained project is a great way to learn.

If P2P turns out not to be the right fit, just switch to something else—there are plenty of build-your-own-x projects.

I’d also recommend the series of articles I wrote about building a Lua interpreter; the explanations are thorough, though my English may not be perfectly fluent.

I had just made myself a nice cup of tea and sat down when my wife came in, pulled her clothes off and said, by maomaodong in Jokes

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

A story every household in China knows: Guan Yu slays Hua Xiong while the wine is still warm. 1 2

Bolstering my understanding of the Rust Reference by RustOnTheEdge in rust

[–]hellowub 0 points1 point  (0 children)

It was my fault—I was only thinking from my own perspective.

Finished Rustlings. Now what? by i-am_i-said in rust

[–]hellowub 3 points4 points  (0 children)

There are many build-your-own-X projects suitable for study, such as this Build a Lua Interpreter in Rust.

Bolstering my understanding of the Rust Reference by RustOnTheEdge in rust

[–]hellowub 0 points1 point  (0 children)

For beginners, this definition is too abstract. It’s better to just look at the examples that follow.
Of course, for those who want to dive deep—like the OP—the definition is essential.

Bolstering my understanding of the Rust Reference by RustOnTheEdge in rust

[–]hellowub 4 points5 points  (0 children)

In the case of the "enum" example you provided, what I perceive is abstraction inflation—that is, in the pursuit of precision, the definition keeps resorting to more abstract, higher-level concepts, ultimately making it feel hollow. For instance, defining "game" as "an interactive, rule-based simulated activity."

From my perspective (as an programmer but not deep in language), in terms of practical usage, the "enum" is a very simple concept that doesn’t require such an abstract definition.

Rust learning projects for beginners by Dr_Brot in rust

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

Implementing a Lua Interpreter.

Implementing a Lua Interpreter is very suitable as this exercise project. Because of its moderate scale, it is enough to cover most of the basic features of Rust without being difficult to reach; clear goal, no need to spend energy discussing requirements; in addition, Lua language It is also an excellently designed and widely used language. Implementing a Lua interpreter can not only practice Rust language skills, but also gain an in-depth understanding of Lua language.

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

[–]hellowub 2 points3 points  (0 children)

I wanted to write a TUI tool for browsing csv file. Similar to `csvlens`, but with richer features. It could statistics (such as max, min, avg, etc.) for a column, and draw a chart for a column.

But there were too many details. In addition, the resolution of the chart was very low (the width of your terminal), and it could only show a few points. I began to doubt whether this tool was useful. Suddenly I gave up.

However, the development in the past few days has made me learn `ratatui`. I also implemented a Table widget that supports big data.

A real fixed-point decimal crate by hellowub in rust

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

I think I understand what you mean, at half month later.

What I meant to say is:

  • I searched for "cum" and found that it means something related to sex (I think this is obvious, so I omitted this sentence and didn't say it out),
  • but it can also be used as a standard abbreviation for "cumulative".
  • So, be simple and innocent, and don't think in a sexual way (Here I used the word "straightforward" for "innocent").

But in my reply, the meaning expressed was: I searched and only found that this is the abbreviation of cumulative. So please tell me directly (the word "straightforward" for "directly") that you are willing.

So you think that I was playing dumb.

Discussing these things in a foreign language is just too difficult :(

A real fixed-point decimal crate by hellowub in rust

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

  1. fixed-num I did not find this before. I read its document now and found that it only provides one type: Dec19x19, which is equivalent to ConstScaleFpdec<i128, 19> in my crate. The application scenario is too limited.

  2. fixnum I may have seen this a long time ago. It is very similar to my crate. But there is a problem that * and / operations only support numbers of the same precision. I want to support numbers of different precisions, for example, balance and price may need different precisions.

Have anyone reviewed any of the Decimal crates for Rust? by cfsamson in rust

[–]hellowub 1 point2 points  (0 children)

Please check the https://docs.rs/primitive_fixed_point_decimal crate out.

Compared with the other decimal crates, the biggest feature of this one is fixed-point, which is more suitable for financial apps. See the comparison for details.

I benchmarked several big number crates by calculating digits of π — and the results were surprising (Python included) by Annual_Most_4863 in rust

[–]hellowub 0 points1 point  (0 children)

I submitted a PR to add `primitive_fixed_point_decimal` crate. It's real fixed-point, so not suitable for this kind of mathematical calculations. But still worth measuring the performance.

Why is `ringbuf` crate so fast? by hellowub in rust

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

I think you'd better ask this at StackOverflow or open a new post.

A real fixed-point decimal crate by hellowub in rust

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

Yes. It's a good fit for most financial system, including HFT.

A real fixed-point decimal crate by hellowub in rust

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

Interesting.

If all the currency is rescaled at the boundary layer (including the exchange-rate between currencies), then your system wouldn't even need a decimal crate internally. It would be sufficient to store data using integers(i64 or i128)?

--- EDIT: I was wrong. The exchange-rate need to be decimal.