HNHacker News
TopNewBestAskShowJobs

joebaf

1,298 karma · joined February 20, 2013

Software developer interested in creating great code and passionate about teaching.

see my blog at: http://www.bfilipek.com/

submissionscomments
joebaf··on C++ Initialization Story
Here's the direct link to the blog post on the book:

https://www.cppstories.com/2023/init-story-print/

And the book at Leanpub:

https://leanpub.com/cppinitbook

joebaf··on Combining Collections with Zip in C++23 for Efficient Data Processing
Do you have more examples where zip is handy? I've noticed it's a quite common feature of other languages like Python...
joebaf··on Std: Initializer_list in C++ 2/2 – Caveats and Improvements
Do you us std::initializer list in your code?
joebaf··on C++ at the End of 2022
is ChatGPT actually the most important thing that happens... not just for C++, but in terms of all programming languages? How will it affect programming?
joebaf··on C++ at the End of 2022
is ChatGPT actually the most important thing that happens... not just for C++, but in terms of all programming languages? How will it affect programming?
joebaf··on Const vs. constexpr vs. consteval vs. constinit in C++20
on the other hand with more options you can express more and write safer code (for example with constinit which solves static order init fiasco...) And if you don't have enough knowledge you can just stick to const.

What re alternatives for a system programming language? (Rust seems to be fine, but still it's not super easy...)

joebaf··on Custom types and std:format from C++20
and std::print is already voted into C++23!
joebaf··on C++ Templates: How to Iterate through std:tuple: std:apply and More
Hi, Author here - I went to lambdas because I got some compilation issues... because some stupid mistakes the code with std::apply(printImpl<Args...>, tp) didn't compile...

But now I see the issue and it's improved. So the version:

template <typename... Args> void printTupleApplyFn(const std::tuple<Args...>& tp) { std::cout << "("; std::apply(printImpl<Args...>, tp); // << std::cout << ")"; }

is fine and probably the easiest

joebaf··on How to Refactor new/delete into unique ptr
Yep, smart pointers are essential for modern C++, and they provide improved security over raw pointers.

How do you use smart pointers? What’s your common use case to refactor into smart pointers?

joebaf··on C++20 Oxymoron: Constexpr Virtual
Do you have any better use cases for those constexpr techniques? maybe we could make simpler code to CRTP?
joebaf··on Constexpr vector and string in C++20 and One Big Limitation
do you have any useful use cases for such expressions? computing values based on text config? generating lookup tables? something else?
joebaf··on I Improved My Legacy C++ Project with PVS-Studio
Do you use static analysis for your projects? Do you find it as a key factor that improves the code quality or it's not that strong?

I think it can be an important element of the build process, but some tunning is needed to match the project needs.

joebaf··on Notes on C++ SFINAE, Modern C++ and C++20 Concepts
So it seems that with concepts we can reduce the tricks of template code! Do you have your own examples where you needed SFINAE stuff?
joebaf··on Bartek's coding blog: An Extraterrestrial Guide to C++20 Text Formatting
Python -style text formatting in C++ :) Have you used the library - {fmt} - before? It's great that after years of effors it's core functionality was placed in the Standard.
joebaf··on C++20 Reference Card
[author here] you can always unsubscribe at any time, I think it's a fair trade. So please consider removing that comment with the links.
joebaf··on How C++17 Benefits from Boost Libraries
and part two: https://www.fluentcpp.com/2019/11/22/how-c17-benefits-from-b...
joebaf··on Elephants Rarely Get Cancer, Now We Know Why (2015)
Still, we have pediatric cancers that are not caused by lifestyle. I wonder what's the ratio for small elephants. Are the also more protected ?
joebaf··on How to get File Size in C++?
old problem, new solutions, hopefully with C++17 it's much cleaner
joebaf··on Speeding Up Pattern Searches with Boyer-Moore Algorithm from C++ 17
It's great that C++17 offers more and more new algorithms, directly from the Standard Library.

Have anyone got some experience with Boyer Moore in day to day code?

joebaf··on Performance of std::string_view vs. std::string from C++17
What is your experience with string_view? Does it bring so much benefits?
joebaf··on Examples of Parallel Algorithms from C++17
from the recent ISO meeting, it looks like the TS merge is uncertain for C++20.
joebaf··on C++ Will No Longer Have Pointers
I think it's a good decision for the language!
joebaf··on Simplify code with 'if constexpr' in C++17
'if constexpr' shows the simplification process in the C++ standard. It's easier to use that SFINAE tricks, so maybe non-template-experts will also use it from time to time
joebaf··on What was your best passive income in 2017?
2016 https://news.ycombinator.com/item?id=13150144

2015 https://news.ycombinator.com/item?id=10879529

2014 https://news.ycombinator.com/item?id=8201392

joebaf··on Custom Deleters for C++ Smart Pointers
that's the beauty of using destructors to clean things when an object goes out of scope.

in your OnScopeExit we could use templates (and not use std::function), that way any callable thing could be called - and it would be lighter than std::function

joebaf··on The Matrix Updated
the postprocessing effects if very simple, you just apply a glyph (even random) instead of a pixel. So if might be used in lots of places... like you mention - for camera input. This was done 13 years ago for Desktop, C++... but now WebGL would be definitely a better choice.
joebaf··on What was your best passive income in 2015?
I've seen it some time ago and this site is great! it really brings value to users, so I am not surprised it's growing.
joebaf··on What was your best passive income in 2015?
wow.... that's a lot of views! so what's the link to your site? maybe I could copy your solution <evil><evil> :)
joebaf··on What was your best passive income in 2015?
what number of users/visitors daily do you have? 1700$ made from AdSense is pretty decent amount!
joebaf··on What was your best passive income in 2015?
previous:

https://news.ycombinator.com/item?id=8822151

https://news.ycombinator.com/item?id=8107588

https://news.ycombinator.com/item?id=8201392

https://news.ycombinator.com/item?id=8395801

Page 1 of 2Next →