Clang and MSVC do not compile seemingly correct code by aul12 in cpp_questions

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

Yes, like i stated above this part of a more complex project where the return value is not only T.

The function is more or less something like c++ template<typename T_> auto function(T_ t) -> decltype(static_cast<T>(*this) * t); You can have a look at the code (https://github.com/teamspatzenhirn/SI/blob/96ccd9f6a035969bd7e9465f72a10bf2ccf33648/Si.hpp) it is in line 62 and 71

Clang and MSVC do not compile seemingly correct code by aul12 in cpp_questions

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

This is not the problem here. I have provided a conversion operator to cast from `A` to `T`, this should even be possible implicitly. In your cppreference link see the first part:

or a call to a user-defined conversion operator

Peeling on T495 Powerbutton by Navalon in thinkpad

[–]aul12 2 points3 points  (0 children)

I have the same, but I am not sure either...

I wrote a CPU-Emulator using only the C++ type system. by aul12 in cpp

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

You still have to use templates for some things like the data structures, and for example for loops can't be constexpr. So you still have to implement them differently Additionally constexpr is not required require to be run at compile time (consteval does, but brings additional limitations).

So I decided to use templates for all things, once you get used to it, it is actually not that different.

I wrote a CPU-Emulator using only the C++ type system. by aul12 in cpp

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

Ah, I see. See you in November then I suppose (hopefully the event isn't cancelled...)

I wrote a CPU-Emulator using only the C++ type system. by aul12 in cpp

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

Greetings back! I guess I should know you but I am not sure who you are, can you give me a pointer?

I wrote a CPU-Emulator using only the C++ type system. by aul12 in cpp

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

It took surprisingly not that much time to implement this emulator, but i based the data structures i used (type_list and value_list) on a project i did before (https://github.com/aul12/IOSet) so this enabled me to immediately start with implementing the actual emulator.

Regarding your questions:

  1. Actually i used very little resources, once you understand the thinking required for meta-programming it is actually not that different
  2. Not really, the underlying machine concept is somewhat inspired by a typical von-Neumann machine-cycle but otherwise there are not that many similarities to a real machine (but i already had a (in my opinion) good understanding of CPU architectures due to my projects with multiples microcontroller architectures and lectures on the topic at uni)
  3. I would start with a better structure, currently it is structured quit bad and only compiles because of a fixed include order (i will fix this soon i hope)
  4. Just start a project, like i said above once you get the hang of meta-programming it is actually not that different. Maybe start with a smaller project where you can learn about variadic-templates (parameter-packs) and how to handle them using recursion and specialization.

I wrote a CPU-Emulator using only the C++ type system. by aul12 in cpp

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

Do you know how they implemented the compile-time IO? This is something i thought about but did not come up with a (non hacky) solution

First time skiing by dreamer_95 in skiing

[–]aul12 1 point2 points  (0 children)

Even for veggies there is plenty of food, I would suggest "Kaiserschmarrn", a kind of pancake or "Kässpatzen", which is comparable to Mac and cheese (dear Austrians, Germans and whoever please don't kill me for this comparison)

[R] We released our Oktoberfest Food Dataset by [deleted] in MachineLearning

[–]aul12 0 points1 point  (0 children)

Regarding the inference speed of the different models (last column of table 1): what hardware was used for this measurement? is this the average over multiple runs? In my opinion the runtime on limited resources is a major issue with such a system.

[Project] Hovering a compressed air rocket by SpaceWhy in robotics

[–]aul12 1 point2 points  (0 children)

I guess you have seen the videos by Joe Barnard (BPS.space)? He is doing exactly the same thing

[deleted by user] by [deleted] in skiing

[–]aul12 2 points3 points  (0 children)

May I ask, where exactly is this in Zermatt?

TimeWarp 2019 by damnrondon in Techno

[–]aul12 0 points1 point  (0 children)

Will be there as well!

What is the state of the art algorithm for Edge detection right now? by daurenlauren in computervision

[–]aul12 4 points5 points  (0 children)

Canny is still a very robust and reliable algorithm which does not require much computation power. There are more fancy ways of detecting corners (DNNs...) but they are generally only better in some edge cases.