You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/11/25 04:38:56 UTC

[GitHub] [incubator-kvrocks] PragmaTwice opened a new pull request, #1139: Introduce fmt dependency to simplify string formatting

PragmaTwice opened a new pull request, #1139:
URL: https://github.com/apache/incubator-kvrocks/pull/1139

   In this PR, we introduce [**fmt**](https://github.com/fmtlib/fmt), the de facto standard of string formatting in C++ and the origin of `std::format` (c++20) & `std::print` (c++23), which is also the most popular formatting library in C++, used in softwares like 
   ceph, mariadb, scylladb and mongodb.
   
   And we can replace the old formatting methods (this PR replaced part of them, far from all):
   - `snprintf` or similiar C functions: need to specify types like `d`, `f`, `s`, `g`, and hard to format basic types like `uint64_t` (need some ugly macros). cannot format custom types. need to create a fixed-length buffer by our own.
   - `std::stringstream` or similiar stream-like C++ types: very slow, and verbose to write.
   - `std::to_string` and string concat (like `"..." + to_string(num1) + "..." + to_string(num2)`): inefficient, and hard to write.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on pull request #1139: Introduce fmt dependency to simplify string formatting

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #1139:
URL: https://github.com/apache/incubator-kvrocks/pull/1139#issuecomment-1327339211

   Merging...
   
   BTW, NOTICE file can be concise. Depencies' licenses and notices can be simply copied under the `licenses` folder. Then we don't maintain a big text file (manually) :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on pull request #1139: Introduce fmt dependency to simplify string formatting

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on PR #1139:
URL: https://github.com/apache/incubator-kvrocks/pull/1139#issuecomment-1327240532

   > @PragmaTwice Changes are good to me, but we need to update the NOTICE as well.
   
   Done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun merged pull request #1139: Introduce fmt dependency to simplify string formatting

Posted by GitBox <gi...@apache.org>.
tisonkun merged PR #1139:
URL: https://github.com/apache/incubator-kvrocks/pull/1139


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on pull request #1139: Introduce fmt dependency to simplify string formatting

Posted by GitBox <gi...@apache.org>.
git-hulk commented on PR #1139:
URL: https://github.com/apache/incubator-kvrocks/pull/1139#issuecomment-1327231887

   @PragmaTwice Changes are good to me, but we need to update the NOTICE as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org