@SciPyTip Weird to see this advertised. I made the last commit in 2019 and it hasn't seen any active development since. Maybe there is some fork that I don't know about but it isn't linked to here.
@hankadusikova fnc returns an object which is contextually convertible to bool and also supports structured binding of 3 names. The test checks the return of fnc.
std::simd types should be regular
Deviating from standard value-semantic types, the proposed == operator for SIMD types returns a mask instead of bool. This inconsistency detrimentally
effects user experience. wg21.link/P2892R0
Coauthored with @__qualname__
@pdimov2@david_sankel You'd need a different mask type for each of the comparisons. Also, it makes storing the result in a temporary variable information destroying unless you are sure to use auto everywhere.
@vector_of_bool Yes!!
I want to have the class synopsis separate from the specific description of each member. How is this not an option?
This is also like the one thing I dislike about Rust docs (although at least there, they're all on the side so it's not that bad really)
@atomgalaxy A recent use case I had was a function object which called std::get on the input, for use in things like ranges transform. There wasnt a great name to differentiate the value version used in tuples and arrays from the type version used in variant.
My C++ Metaprogrammers: what would you do with universal template parameters if you had them?
(this is a shameless call for usage examples for the paper open-std.org/jtc1/sc22/wg21…)
@jcristharif If your bottleneck is allocation, you might be able to get a big win by writing a custom allocator that bulk allocates and keeps your objects close in memory. Maybe you can use github.com/llllllllll/que… or at least some of the ideas here to optimize allocation and deallocation
@pganssle I like them for functions that take booleans, especially if there is more than one. The benefit to the user is that they won't accidentally pass the arguments in the wrong order which will silently do the wrong thing.
Does anyone have some good situations where making a parameter keyword-only without accepting `*args` is required or a benefit for the end user?
Note that I do not consider it a benefit to force end users to write "clearer code" by passing parameters by keyword.
things still need to be moved around -- the shit cleaned off -- and the wires cleaned up, but having everything is nice
old monitor -- thinking about going wider or adding a second one
@jcristharif "unpopular" opinion, but I'd say learn C++. I started using it over C for small things like RAII and iterators, and just fell in love with the blend of abstraction and bare metal performance. It's definitely my favorite programming language at this point, even with all its warts
@jcristharif First I would just see if you get the same hotspots as identified by perf, then I would see if there is anything clear to optimize or see if you're leaning on the compiler a lot there, then finally check out the functions in compiler explorer to see what's happening
@jcristharif One thing to check is just that you are using a comparably new gcc. I have seen a lot of cases where someone compares the latest clang to some old system gcc. You can also construct a benchmark and run it under `perf` to find the hot spots and check for different codegen there.
Anyone know how to remove a fork relationship on Github?
I forked a repo, but then refactor'd it and probably won't contribute it back upstream since they are now pretty different
Repo in question: github.com/trevoraron/mul…
@jakevdp@raymondh@MoksvaMitch In general, dotted names (and index lookups like a[b]) are valid lvalues and can appear in for loops, context managers, and structured bindings. They cannot be used in import as or except as, but it is syntax error, not silently different behavior.
@raymondh@MoksvaMitch Are there other cases where the presence or absence of a dot in the identifier changes the semantics from binding to reading a value?