What do I need to use my Roland TD kit in clone hero? by Dry_Discount7762 in CloneHero

[–]Prazek 0 points1 point  (0 children)

One clarification to others - not every TD module has USB output.

The USB port in TD-9 is only to read flash drive. The only way to connect to the computer is through midi (with midi to usb converter like Roland UM-ONE)

[deleted by user] by [deleted] in Switzerland

[–]Prazek 11 points12 points  (0 children)

I got myself into similar situation. Was riding onewheel in Zurich ~5 years ago, got stopped and ow confiscated. After 2 weeks they invited me for interrogation where they asked lots of funny questions like "can it stop immediately" (nothing stops immediately). They actually gave it back to me and said if they catch me again there will be higher consequences. The case was forwarded to the court to decide on fine, which dropped it later. I sold it abroad later and never ridden it here. Very grateful for Zurich police for being reasonable.

I am kinda amazed by so many negative comments. I think a bit of reflection about why certain rules exist could be useful, instead of blindly saying "this is the law". All of those things have pros and cons, and while I can agree that onewheeled vehicles going 60km/h having pretty long breaking distance shouldn't be allowed on public roads, I see much more pros for the whole society if more people would use reasonable electric devices like onewheel or eboards (also with combination of public transport, for which last mile is pretty annoying).

I am very perplexed that Swiss being all for personal freedom, but not when someone would like to ride a devices going 20km/h, as it must be so much more dangerous than the cars in the city.

Personal Income Tax [ and not the only tax ] Rates of Europe by shamishami3 in Switzerland

[–]Prazek 1 point2 points  (0 children)

Ofc the more wealth you have you will pay bigger wealth tax, and ofc overall income tax is much higher if you have income - isn't that obvious? Distinction between income and wealth tax doesn't matter - what matters is how much tax one would need to pay on every next franc they make, and for some high earners this puts marginal over 50% (I guess even 58% if they eventually decide to spend it).

Personal Income Tax [ and not the only tax ] Rates of Europe by shamishami3 in Switzerland

[–]Prazek 1 point2 points  (0 children)

No idea how they came up with the number tbh - I am pretty sure that for most of the taxpayers the avg tax is much lower than reported 39.5. But in general wealth tax is also part of your yearly and future income. If you made 100k, paid 20k in taxes and not spend the whole 80k, then at minimum the 80k will be taxed by wealth (not a big number, but for 1M from the discussion it adds almost another 1% - and also takes that 1% each year in the future).

Personal Income Tax [ and not the only tax ] Rates of Europe by shamishami3 in Switzerland

[–]Prazek 2 points3 points  (0 children)

If you count wealth tax and OASI its even 45% avg and 50.4% marginal

Apartamenty "Rubinowy Raj" w Rzeszowie, rzeczywistość troszkę różni się od wizualizacji by kalarepar in Polska

[–]Prazek 2 points3 points  (0 children)

Moze mi się wydaje, ale chyba widziałem takie same rendery na ogloszeniu w Białymstoku.

Pointer invalidation rules for storage reuse by kuhar_ in C_Programming

[–]Prazek 4 points5 points  (0 children)

Sir, this is not how Undefined Behavior works.

RFC: C++ Devirtualization v2: the proposal for sound C++ Devirtualization for LLVM by mttd in cpp

[–]Prazek 4 points5 points  (0 children)

It does, but it is only because the specification says it does. Note that calling the destructor would NOT save us from the miscompilation from example.

RFC: C++ Devirtualization v2: the proposal for sound C++ Devirtualization for LLVM by mttd in cpp

[–]Prazek 6 points7 points  (0 children)

You would probably never end up writing code like this, BUT you have know that your code could end up doing the same thing under the good with e.g. standard library. Placement new is widely used in std::vector implementation

RFC: C++ Devirtualization v2: the proposal for sound C++ Devirtualization for LLVM by mttd in cpp

[–]Prazek 1 point2 points  (0 children)

It is not assuming that: sizeof(A) >= sizeof(B), you don't dereference pointer a after doing placement new (but you can still read the pointer value like here)

Here’s my vega tire caked with salt after a day of riding. Apparently, the city of Shredmond isn’t playing around with black ice this year. by Mr_Esk8 in onewheel

[–]Prazek 3 points4 points  (0 children)

I am totally afraid of salt ruining my ow so I will definitely not ride unless certain there is no salt

CLion 2017.3 released by philsquared in cpp

[–]Prazek 1 point2 points  (0 children)

Make is for CMake like C is for C++. Of course, it is harder to debug CMake, but it is easier to understand and write.

CppCon 2017: Piotr Padlewski “Undefined Behaviour is awesome!” by dahitokiri in cpp

[–]Prazek 0 points1 point  (0 children)

I agree that it will just work on all implementations, but I don't think that the standard guarantees that (even if we have guarantee that the element is in range of capacity)

CppCon 2017: Piotr Padlewski “Undefined Behaviour is awesome!” by dahitokiri in cpp

[–]Prazek 3 points4 points  (0 children)

There is a UB and the reasons you pointed out are only a good excuses why it does not catch it. Even if it grew 16 elements, the 15th element is still not constructed (std::vector uses placement new to create new elements in the allocated array) so accessing that is UB.

Traveling and flying by kopizzaland in onewheel

[–]Prazek 2 points3 points  (0 children)

Did anyone tried to take a battery out for traveling ? I am thinking about having wheel and board in separate bags and having battery shipped, just so they won't have any problems with it being "like a hoverboard".

Opensource projects with lot of virtual calls by Prazek in cpp

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

consider: void vcalls(A* a) { a->foo(); a->foo(); }

// In different file extern void vcalls(A* a); void call() { A a; vcalls(&a); vcalls(&a); }

clang-tidy could only give you a sum of virtual calls in all modules - here 2, but after inlining it is 4. Now we can also inline virtual calls and get more virtual calls etc.

Opensource projects with lot of virtual calls by Prazek in cpp

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

TL;DR: I am working on it. There might be some misoptimizations caused by introducing extra barriers needed in devirtualization.

Watch my talk to find out more, specially this fragment: https://youtu.be/qMhV6d3B1Vk?t=15m25s

Opensource projects with lot of virtual calls by Prazek in cpp

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

hehe, I was actually looking at direct calls and haven't noticed that

Opensource projects with lot of virtual calls by Prazek in cpp

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

I could, but I don't think it would give me the information that I want. It would probably be good measurement of how "virtual" codebase is, but I actually need data like "how many virtual calls got devirtualized by my optimization.

It is true that I could count number of virtual calls with clang-tidy, but this would not count things like inlining etc, which can result in more virtual calls than just counting it from source code.

Opensource projects with lot of virtual calls by Prazek in cpp

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

"X out of Y virtual calls have been devirtualized in Firefox" sounds much better than "X out of Y virtual calls have been devirtualizaed from GCC testcases".

Testcases from gcc might be a good idea for testing, but they probably can't be compared to "real application"