Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Clone != exact copy (Score 5, Insightful) 172

As we saw with Dolly the Sheep, a clone is not an exact copy of an animal. It may contain nearly all the DNA information but first this DNA may be damaged (if nothing else, shortened telomers) and second it may not contain all the exact matrilineal content. This include both midocondral DNA as well as an epigenetic controls the mother's cell line places on its DNA. It is possible someone could have take those into account and made the best possible approximation to those. But it also possible that the crucial developmental characteristics of a quarter horse are in those missing elements.

Thus at a minimum the Quarter horse association could reasonably say that unless the donor cell line is from a quarter horse, it is not a quarter horse. It would also be someone reasonable to say that even with that precaution the shortened telomers mean this is a genetically damaged quarter horse and they want to exclude it from breeding with genetically healthy quarter horses.

Comment Re:Syntax and typo errors compile (Score 1) 757

Fortran Compilers I have worked with caught these at compile time not run time. C compilers, at least some of them miss this. In C including the headers.h files is what is supposed to catch this, but if you declare the header wrong, or don't use a header but instead use extern then this doesn't get caught.

Comment Re:Python/Fortran Combo (Score 1) 757

google f2py and you will find lots of tutorials. but it not complicated and after you customize the paths and options for your particular compiler then compiling from within python takes just a couple lines, and then you import the result.

almost any compiler can work in principle. I used open source compilers because 1) I wanted to be able to share my work 2) numpy and scipy come distributed that way. but I know from the mail lists people used commerical compilers as well such as compaq visual fortran. I did once use a commercially curated distribution called enthought. Since I didn't want to have to maintain two compliers I made the choice to use the one I used to compile scipy or numpy, which is almost any, but on your specific computer you have probably installed numpy in either binary or source form using some package manager, or if its a mac the one that came with the computer. f2py is in most package managers. By using the package manager route this also simplified getting the paths to libraries set up correctly as well-- but that's just a general property of package managers not specific to f2py.

I've done this now using different package managers and different compilers and the only problems I've had were in the package managers themselves when dependencies got broken, but again that's the packagemanager woe no specific to f2py.

You can do all the sorcery right from scipy itself. since scipy and numpy can use fortran order arrays, you can pass things in and out directly without thinking about them as objects. they just show up as fortran arrays.

Comment Re:Syntax and typo errors compile (Score 1) 757

For me, the example I gave is an example that comes up when you read some one elses dialect of C-coding. I take great pains never to use one of those forms. I'll split it over two lines of type definition and array declaration if I need to. Running array declaration and two diffierent type declarations on a single line is confusing to anyone who has a different c- dialect. This also comes up when your just a little sleepy. A missed parens can mean hours of run time debugging.

My larger issue however was the title of my post. It's not that these things can't be read correctly, it's that typos that convert one into the other both compile.

this is where the inexpert C-programmer ends up writing crap code. It's not the experts I worry about. the subject of this is why Crap code proliferates. C is just a great way to do that.

Comment Re:Python/Fortran Combo (Score 4, Interesting) 757

I have discovered late in the game that Python + Fortran is almost magical. It's better than Python C++. when you are needing fast algorithms or code close the metal (SIMD or GPU) then fortran provides all the muscle that you need without all the baggage of c++. You offload complex class and memory allocation to the python.

The amazing thing I really like about the fortran is that it compiles so damn fast compared to C++ that it's easy to write a python program that generates optimized fortran and then compile it at run time rather than simply pre-compile a C++ library to include. The fortran is cleaner looking and its hard to make typos. The limits and ugly bits of fortran are pretty much not a concern since those chores can be offloaded to the python.

Comment Syntax and typo errors compile (Score 5, Informative) 757

C itself has so many pitfalls. For the best tour review the underhanded C contest. "features" like automatic concatenation of consecutive character strings means that if you leave out a comma in a list, the adjacent array element entries are concatenated rather than throwing a syntax error. That list will now not match the declared array size (one short, so there's a null or random pointer in the last element) but the compiler allows initialization listed mismatched to the array sizes. Character strings have to be declared one longer than the initialization string length (room for the unstated \0) but are accepted by the compiler if they don't giving an unbounded string length.

it's mind boggling to realize that
int (*int)[20];
int *int[20];
are different things.

the number of different ways an array argument in a function can be written makes code hard to grasp: is it a pointer, an array, a reference? many work alike but then fail in different ways.

The most common of all pitfalls and hard to read codes are the in-line initializations that pop up in function arguments and what not. this leads to classic blunder of writing = when you mean ==.

Perhaps the most insane thing is that If you declare an external function with the wrong prototype then any mismatch in the argument count leaves or takes something off the stack. Holy cow..... I mean what the hell? Why would any language ever ever ever let you leave a orphan argument on the stack, or worse pop one off that was not yours? This is very useful for the underhanded C folks however.

While I know there's little love for fortran, it's worth noting that none of those things is even possible in Fortran, so its an existence proof that there's not any necessity for those to exist and that it doesn't limit the power of the language to remove them. It's very fair to say that no simple typo will ever compile in fortran (yes very complicated offsetting typos can compile).

Comment there's a dongle for that. (Score 4, Insightful) 392

there's a dongle for anything really. Apple just deprecates things slightly ahead of people realzing they soon won't need that. I recall when apple dropped the modem socket. I figured I needed that for sure and bought a modem dongle but then found I never used it. Ethernet had become easy to find then next time I traveled. When they dropped the ethernet socket, I bought an ethernet dongle. I used it about 10 times in many years. Wifi is just ubiquitous. Even when it's not around tethering to my phone was easier than reaching in the bag for the dongle and then finding a chair near an availble ethernet port. When they dropped the DVD I thought I'd miss it but oddly about the same time I stopped burning DVDs and started using thumb drives and DropBox only. The same was true when apple dropped parallel ports and then Floppies.

So apple will make dongles to bridge the momentary time you need to bridge with legacy devices, then you will find everything new you buy is wireless. It's interesting the headphone jack is still there since bluetooth chips are so cheap, easy to use, and are smaller than the headphone jack itself. I guess the problem for wireless headphones is powering them requires too many batteries.

Comment USB was no longer standard either (Score 2) 392

mini USB ports became a shambles when all the new devices started breaking the specs to charge higher power devices. I din't follow this closely but it seems there are ways a USB device can can communicate that it would accept higher then default power levels. But in my experience this is totally broken. High power chargers from one manufactuer don't work with others. IN some cases the higher power devices just won't charge. When I plug my iphone into my car it constantly resets as it tries to draw too much power and the car circuit breaker kicks in. My Kindle won't charge at all on most of my wall plugs. My Dlink USB hub which has several high power ports on it will not supply high current on those when it is also plugged into the computer making them useless for charging high power devices (why have a hub you don't plug it into the computer?).

So it's total chaos in the USB world unless your phone or kindle will allow low power charging and the charging device doesn't overload when using such a device.
You also can't combine the high speed I/O functions on the USB with some low speed devices. Video output is non-standard.

The lightning blade style connector is incredibly strong, it's reversible, it's very easy to clean the socket when pocket lint gets in there. And there's so many apple devices out there that use it, there's no reason it needs to be a standard to be widely usable and widely available. There's plenty of authorized clones as well as even more cheapo knockoffs available at any gas station. In some ways being apple-only is an advantage since they can customize the power chips to get just the right power levels to the device by not trying to be everything to everyone.

Comment How does tor anonimize the sender and receiver. (Score 1) 98

Perhaps someone could explain how Tor creates anonimity. Most places I read stress the more obvious part of Onion Routing which is sort of merry go round tumbler so people can't associate where you got on from where you got off. But What I don't understand is how you preserver anonimity in the getting on part. Two things strike me as give-aways. First It seems like there has to be some zero conf step where you learn where a tor entrance node is and what port it wants to initiate the protocol. It seems like these entrance nodes would have to not change frequently so any determined adversary just needs to program key routers to watch for traffic to that IP address. Lots of diverse traffic to any specific computer with a characteristic port number would be the bread crumbs used to identify the watched IP addresses. Second, since the packets are encoded in some layered way, surely there is some sort of header or something that a deep packet inspector could recognize as a tor format, also giving the game away.

So I could see how tor could obfuscate who is talking to who, it seems like it would have a hard time obfuscating the set of people involved.

Slashdot Top Deals

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...