Forgot your password?
typodupeerror

Comment: Re:Transition period? (Score 1) 259

by Sun (#48151055) Attached to: "Double Irish" Tax Loophole Used By US Companies To Be Closed

I didn't say that was okay. I said that was Ireland's rationale.

If memory serves me well, Cayman Islands have a similar shtick. No income tax for either corporations or residents, but lots of taxes on product consumption (customs etc.)

It is the trade offs that countries do to attract the "right" type of economy.

Shachar

Comment: Re:Transition period? (Score 3, Insightful) 259

by Sun (#48146995) Attached to: "Double Irish" Tax Loophole Used By US Companies To Be Closed

As far as Ireland is concerned, that is exactly it.

Google, Facebook and Microsoft (to name three, I'm fairly sure there are more) hold huge development and support centers in Ireland. While corporate tax in Ireland is low, income tax is fairly high. The Ireland government isn't losing from this deal.

Shachar

Comment: Re:Einstein's Nobel was for Photo-electric effect (Score 5, Informative) 984

by Sun (#48127791) Attached to: Independent Researchers Test Rossi's Alleged Cold Fusion Device For 32 Days

To the best of my knowledge, no one has won multiple Nobels in a single field.

Okay, after checking that statement, it is not true. Frederick Sanger has won two Nobel prizes in Chemistry. He won it alone, in 1958, "for his work on the structure of proteins, especially that of insulin", and again in 1980, with Walter Gilbert, "for their contributions concerning the determination of base sequences in nucleic acids" (source).

It seems to me that the Nobel committee does not like to award the same prize twice. I think, had Frederick done the nucleic research on his own, he would not have won the second one. I think the committee only awarded him the second prize because not doing so would have denied Walter Gilbert the prize (and awarding only Walter a prize for joint work would be strange).

In that respect, Einstein got only one Nobel because he did his research alone.

Shachar

Comment: Re:Oracle (Score 1) 146

by Sun (#48102617) Attached to: Google Takes the Fight With Oracle To the Supreme Court

The action against Microsoft was based on anti-competitive acts, founded on the assumption (validated by the court) that Microsoft is a monopoly.

This action is based on strict copyright. Oracle is not alleging that Google are trying to harm Java, just that they didn't have the right to do what they did.

Shachar

Comment: Re:Unicomp (Score 1) 304

by Sun (#48100957) Attached to: The Greatest Keyboard Ever Made

Did you buy the full size or what they call the "space saver"?

I am typing this on the space saver, and I can, indeed, flex it (if I try hard enough) by a few millimeters. For me, the reduced weight is a plus, though.

If you consider that a minus, you should go with the "Classic" version. I doubt you'll see any difference, USB and extra keys aside.

Shachar

Comment: Re:Why do people still care about C++ for kernel d (Score 1) 365

by Sun (#48062927) Attached to: Object Oriented Linux Kernel With C++ Driver Support

Smart pointers in C++ are rarely larger in size than normal pointers.

std::unique_ptr has the same sizeof of void *. std::shared_ptr has the same sizeof as void *, but adds another allocation. Then again, boost::intrusive_ptr has the same sizeof as void *, does reference counting, does not require virtual functions in the destination class and carries no extra allocations (but does require that the class being indexed be aware it has references).

Shachar

Comment: Re:Why do people still care about C++ for kernel d (Score 1) 365

by Sun (#48060957) Attached to: Object Oriented Linux Kernel With C++ Driver Support

Yeah, Linus mentioned those too. Where does C++ do hidden heap allocations?

The only example I can think of is when throwing an exception (and see below about that), and even then, the compiler rarely actually performs a heap allocation. Small exception classes are stored in a pre-allocated static buffer.

And if you are talking about library use, then you need to realize two things:
1. STL is the most allocation aware library I have ever seen. With a few C++11 related exceptions, it will always allow you to pick an allocator, and will always avoid allocation where one can be avoided.
2. If you think even that level of care is not enough, then you are free to not use STL. Assuming you are correct, your options are "Don't use STL, implement your own implementation in C++" or "Don't use STL, implement your own in C", and I fail to see how option 2 is preferrable to option 1.

As for the other two, RTTI cost you a few extra bytes per defined class (not instance). You are free to tell your compiler not to generate those if you don't use it (for user space, I rarely bother).

Exceptions are a different story. They get a very bad rap, and it's only partially justified. There are two reasons to not like exceptions for kernel code. The first is that exception use is a fundemental design decision. It is not something that can be slapped on to existing code. To do it properly, you must also have RAII and a good structuring of your code. Since those two are a good idea regardless, most good C++ programmers don't mind, but it's hard to migrate existing code to use it properly.

The other reason exceptions are not liked is because of a design decision made by the C++ committee that exceptions have no runtime cost when an exception is not thrown. This leads to the compiler generating the same code twice, and to a very complicated stack unwind code. I don't think either of these will prevent exceptions from working in the kernel (given the proper adaptations), but I do understand how these cause people to be weary of them.

I do agree with Linus about one thing. C++ is a language that is too complex. This leads to good C++ programmers being a minority among C++ programmers.

Shachar

Comment: Re:C=128 (Score 1) 167

by Sun (#48013961) Attached to: Why the Z-80's Data Pins Are Scrambled

What only Amiga users know is that the only way the power led can be controlled is by enabling/disabling the low-pass filter on the audio output since the status of the enable signal is indicated by dimming the led. It's not possible to turn it off completely to simulate the computer being dead.

The original Amiga 500, including the early Kickstart 1.3 ones, would actually completely turn off the LED. If you don't believe me, you are welcome to visit me. I still have my original machine in (more or less) working order.

You are correct that later models would not turn it off completely, but rather only dim it. I only remembered that fact after I hit Send, and thought no one will be anal enough to demand a clarification.

It's also possible to read a single sector, but that would require starting the DMA on a timer so it's more cumbersome than reading the entire track and it's not guaranteed to be faster since it's a spinning media.

In other words, the hardware does not support it.

As for MFM/RLL encoding the floppy controller does neither, it reads the raw bits. The order of the bits is interleaved on Amiga formatted disks to allow for blitter accelerated MFM-(de)coding.

That is one point I am not as sure about. It goes against what I remember, but I might be wrong on that point. However:

Don't trust anecdotes, the developer guides are available online.

Do provide links. Please. I failed to find them, and my black 2.04 books are buried in some box from my latest moving day (if I had not thrown them out).

Shachar

"Of course power tools and alcohol don't mix. Everyone knows power tools aren't soluble in alcohol..." -- Crazy Nigel

Working...