Colossus Cipher Challenge Winner On Ada 168
An anonymous reader writes "Colossus Cipher Challenge winner Joachim Schueth talks about why he settled on Ada as his language of choice to unravel a code transmitted from the Heinz Nixdorf Museum in Germany, from a Lorenz SZ42 Cipher machine (used by the German High Command to relay secret messages during the World War II). 'Ada allowed me to concisely express the algorithms I wanted to implement.'"
Let the raging tardfight commence (Score:2, Funny)
Re:Let the raging tardfight commence (Score:5, Funny)
Wimp using ASCII (Score:3, Funny)
Re: (Score:2, Informative)
You're using ASCII twice so you're twice the wimp!
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:3)
--
I made myself sad just now
Re: (Score:2, Funny)
In fact better men than these do not even use equations. They let the laws of physics fall out of their simulations, as evanescent perennial relationships between variables.
Re: (Score:2)
Re: (Score:2)
Re:Let the raging tardfight commence (Score:5, Insightful)
ADA being a government/military based languge I am not to suprised that it won the competition decifering a goverment/military code. (it is more complex then that)
Re: (Score:1)
The *language* doesn't matter so much as the *particular implementation* of that language and the platform(s) on which it runs and the libraries available.
C is a fine langugage, but don't try writing an OS kernel using the Ch [softintegration.com] C interpreter, for instance.
Re: (Score:2)
Re: (Score:2)
Perhaps OT: but I think people like VB because they don't know any other language.
I have never in my life heard anyone say, "I know C, Java, Ruby and VB and I really like VB!" More often it's, "I was working as an office assistant and wanted a promotion so I got a book titled, _Fast-Track Learn VB in 10 Hours for Dummies_ and this is the only language I've ever used - and I like it!"
Other than that, you're right. The language matters l
Re: (Score:3, Insightful)
couldn't participate in "real time", but I used the
copies of the sent ciphertexts on the Bletchley
website.
I worked away on a lorenz breaker for the SZ42 stuff, written in C. I was able to break
ciphertext roughly an order of magnitude faster
than Joachims code. Joachim worked away on his code
for several weeks in advance of the contest. I had only a couple of days notice.
I think two things matter in a competi
Re: (Score:3, Informative)
You worked with the symbolic cyphertexts. He worked with raw baseband audio from the radio receiver, complete with noise.
You knew this, of course, because you RTFA.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2, Insightful)
Re:Programmer not langauge. (Score:5, Informative)
I have written Web Apps in FORTRAN 77 just to prove that you can. However I wouldn't say it would be OK to consult a client to do the same, as it really isn't the right tool for the job.
Re: (Score:3, Interesting)
I can't, so I don't.
For me it is how fast I can produce what the customer/user desires that matters - and more importantly, how fast I can change it - so I use Python - with the option (as yet unneeded) to build C/C++ modules for that language for slow bits. If a bug pops out of my code, I can easily squash it; more difficult with a compiled language.
YMMV
Re: (Score:2, Informative)
Oh please. Once upon a time I used Ada as my primary language for several years and I simply don't understand all these "Ada is too verbose", or "Ada is too strictly typed for beginners to learn" type of comments. People making these comments have never used Ada. Ada code can be verbose and hard to read just like any other language, but most of the time good Ada code is concise and readable to the point where it's almost
Re: (Score:2)
I do agree there is a place and applications for strongly typed languages. But I also believe there is a happy medium that can be obtained for most other programs. Python, for example, uses 'Duck' typing - which is considered type-safe, in comparison to other languages (such as C and C++)
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
No. ED is the standard editor! You don't ask for a viitor or an emacsitor, you ask for an editor! Real programmers use ed. Vi (or, god forbid, vim) is for quiche eaters!
Re: (Score:3, Funny)
Comparison with Allies cypher machine (Score:3, Interesting)
Re:Comparison with Allies cypher machine (Score:4, Informative)
http://www.sjsu.edu/mscs/research/projects/chan_wing-on.pdf [sjsu.edu]
In normal use, it appears to have had a keyspace of about 48 bits, which is not easy to attack now with a modest distributed effort, but way out of the reach of WWII technology.
However, a variant of the machine used for communication between the US President and British PM had an effective keyspace of 95+ bits, which (if you have access to some known plaintext) can be reduced to 86 bits, which although shorter than key lengths in common use today is still out of reach.
I had to learn ADA in college (Score:1)
Brian
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
P.S.: Register a goddamn username.
Re: (Score:3, Funny)
Type Casting (Score:3, Interesting)
Re: (Score:2, Insightful)
"typename(variable)" is pretty easy in my opinion...
(not much harder than the type cast in other languages: "(typename)variable")
Ada even has a package called Ada.Unchecked_Conversion if you don't care
about ensuring the result is within the bounds of the target type...
Re: (Score:3, Informative)
It does (unchecked_conversion), but never (AFAIK) *implicitly*.
Re: (Score:3, Informative)
> It does (unchecked_conversion), but never (AFAIK) *implicitly*.
Unchecked_Conversion reinterprets the bits of the argument as a value of the specified type.
Ada also allows ordinary value conversions (for example, converting 3.1 to type Integer yields 3) among sufficiently closely related types; for example, a value of any numeric type can be converted to any other numeric type. It requires such conversions to be explicit in more cases than many other languag
Re: (Score:2)
Maybe, maybe not. There are several rules that define what it does, and many that are implementation-specific.
Now that's strong typing! (Score:2)
So you could end up with 256 different conversions depending on where in memory you code is located.
Re: (Score:2, Insightful)
You couldn't BE more wrong (Score:5, Insightful)
First off those strict rules help you because you spend miles less time debugging stuff you don't understand, once it compiles it will tend to run and the compiler gives helpful messages about what you are doing wrong (often including suggestions on how to fix it). With Java, and especially C and C++, let alone scripting languages the beginner spends much more time debugging non-operational code than writing the code in the first place. This tends to mean that these people focus on "getting an executable" rather than "getting it running".
Ada is a brilliant language to teach newbies in (again I've personally done this) as you can explain the abstract concepts and then have the compiler make sure they are doing it right rather than have them say "it compiles but it keeps falling over, why?".
Ada's issues are due to the mentality of lots of (IMO) unprofessional engineers who focus on the number of characters over the operational viability of a system.
And for a final point. Take a look at the complex code the guy wrote, if that was in Java, C, C++, Scala, Ruby, Perl, LISP or what ever do you think that you'd have a chance of understanding it?
Re: (Score:2)
Why not? Or does Ada magically make complex algorithms more comprehensible?
Sorry, but a competent programmer should be able to build a clean, comprehensible solution in any of those languages. Time to a working solution may vary, but there's no excuse for one solution to be less understandable than another.
Re: (Score:2)
ds ths rd ok? it cn b dffclt 2 ndrstnd a trs lngg
or
Does this read ok? It can be difficult understand a terse language?
That is the difference between Ada and the likes of C and Java. Sure a good coder could build it but will it be as comprehensible? No it won't.
Re: (Score:2)
Honestly, I'd counter your point... except you didn't even make one.
And to argue that, for example, Java is terse (probably the *last* thing people would accuse it of), let alone any of those other languages (which are only as terse as the developer who uses them) clearly demonstrates you probably have no idea what you're talking about.
Re: (Score:2)
C syntax languages are all terse the have ternary operators, ++, += and all those character saving devices but not comprehension saving devices.
Now I'm sure you've got another witty response that shows how Java is a massive verbose language in comparison with Pascal, Ada or Eiffel... I'd love to see it to help me im
Re: (Score:2)
Re: You couldn't BE more wrong (Score:2)
First off those strict rules help you because you spend miles less time debugging stuff you don't understand
As I like to put it, "Ada makes you say what you mean and mean what you say."
That is indeed a stumbling block to most newbies, but if you bite the bullet and go through with it, it soon becomes second nature to think that way. And you find yourself dealing with algorithms and abstractions, because once you've built a component you can forget the details and expect it to work right.
Too bad so many programmers absolutely detest saying what they mean and meaning what they say.
Re: (Score:2)
Re: (Score:2)
(*)Universal Turing Machine
Re: (Score:2, Informative)
I like the choice. (Score:5, Funny)
ADA Resurgence? (Score:5, Interesting)
Re:ADA Resurgence? (Score:5, Funny)
Re: (Score:2)
(Well, six that I can think of: B, C, D, E, F, and my own 99 [99-bottles-of-beer.net].)
What are the good ones? (Score:2)
Which are the good compilers for ADA for Mac and PC. As well as being good, what are the relative costs?
Finally, which sites do ADA supporters consider best?
Re: (Score:3, Informative)
The GNAT is based on GCC. It's free and it is damn good.
I was also using AONIX and they have a free (as in beer) version. I have always preferred GNAT though.
I am not sure about a website though...
Re:What are the good ones? (Score:4, Informative)
The GNU compiler suite also has an ADA compiler (GNAT, GNU Ada Translator). Should be possible to get it and plug it in without much trouble, and then it'd integrate with everything else. Heck, should be possible to include ADA modules into an Objective-C Cocoa application, even.
There is also a GNU FORTRAN, worth checking out. Even today, you can't do mathematics as efficiently in C as you can in FORTRAN. (This is because of the language; in Fortran, taking the address of an existing variable isn't normal, so variables don't end up with the possibility of "aliases" that they don't know about, which means a lot more stuff can safely be done all in registers and stuff like that.)
There is also a GNU Pascal, but unlike ADA and FORTRAN, I'm not personally aware of any reason to actually use it.
Re: (Score:3, Interesting)
C++ templates, for example, are just a ripoff of Ada's generics _including_ the Ada angle bracket constraint notation which does not fit at all into C.
Basically it is like the Unix renaissance after Windows tried to offer ever
Re:ADA Resurgence? (Score:5, Informative)
Ada is not trendy, but it has had built-in portable concurrency and many other killer features for more than a decade. Proper specifications are one of my favs.
Of course there are other factors, like the lack of good and free compilers. Fortunately now the gcc toolchain has put this to rest. Also there are few libraries. Really few. Binding to C is easy, but still a deterrent for the hobbyist.
It's emphasis in making maintenance easy over quick programming really pays in the end, not even in the middle/long term but shortly after getting familiar with the language. I find myself much more productive. When something compiles, I'm sure that the only bugs remaining are logical, not some funny pointer or unexpected type conversion or overflow. Nowadays I rarely fire the debugger more than once a month. My C/C++ has improved because Ada forbids the things that are considered bad practices in C/C++, but you still end doing because "you know better".
I think that Ada is getting now more exposure because, albeit a niche language, Adacore is pushing hard behind it. Also, its SPARK derivative by Praxis has made some headlines with large and difficult projects getting flying marks. SPARK has made static analysis a reality for large projects.
I'd say that anyone capable of discipline will enjoy the benefits of Ada. It's not the thing for quick hacking, but it is perfect for anything not trivial. Software engineers should love it. I have heard somewhere that it is a safe C++, and I concur: feature-wise is more or less on par, it catches bugs sooner and prevents many typical ones.
Have I already said that concurrency is built-in and portable
Re: (Score:2)
Re: (Score:2)
I remember the days when some folks thought that learning BASIC was a stain on a developers psyche that took years to heal. Now I feel the same way abou
Re: (Score:2)
Ada will always be used more by projects where the cost of software error is
Re: ADA Resurgence? (Score:3, Insightful)
Ada was designed to control "things that can't fail" like aircraft flight controls and nucear power plants, guidance systems of "smart bombs" and soon. Must people don't work in this area. Most people write stuff that runs on desktop machines and web servers. In that environment software error is just expected and tolerated.
And that attitude is exactly why the world is filled with crapware.
We should expect software to work correctly, and take our business elsewhere when it doesn't.
No one dies if your kitchen faucet squirts the water out sideways, but we don't just shrug it off and live with it.
Re: (Score:2)
Re: ADA Resurgence? (Score:2)
Has anyone else started to notice an ADA resurgence?
s/ADA/Ada/ -- It's a proper name rather than an acronym. (It refers to Ada Lady Lovelace, Charles Babbage's assistant.)
It seems to be popular in France, presumably because the guy who invented it was French. (No, it wasn't designed by a committee. It was selected via a competition for a language to satisfy a rich set of requirements, with special attention to support for embedded programming.)
For those who aren't familiar with it, it's very similar to Pascal, but has a lot more features. Things like mul
Compiler price.. (Score:5, Interesting)
Too bad since Ada is 'by default' a language which is more secure than C++..
Re: (Score:2)
8 years is a *very long time* in computer history.
Granted GCC is not the only compiler but my memory is that Ada's compiler were expensive whereas C++'s compilers less so which explain (partly) why Ada is much less widespread than C++ nowadays.
IMHO, the DOD should have invested in making a Free Ada compiler to create a community of Ada users in order to ensure that Ada would become widespread, to secure his investment in Ada's code.
Re: Compilerprice.. (Score:2)
Granted GCC is not the only compiler but my memory is that Ada's compiler were expensive whereas C++'s compilers less so which explain (partly) why Ada is much less widespread than C++ nowadays.
Back in the day, Digital (DEC) had a very nice Ada compiler for VMS and whatever they called their flavor of UNIX. (ULTRIX?) And it was indeed pretty expensive.
IMHO, the DOD should have invested in making a Free Ada compiler to create a community of Ada users in order to ensure that Ada would become widespread, to secure his investment in Ada's code.
They naively assumed everyone would jump on it because they wanted people to use it. There was a "mandate" to use it, but a loophole that allowed granting exceptions. Everyone requested exceptions, because they couldn't find programmers who wanted to learn a new language that requires an unaccustomed level of self-discipline to use. So they rolled
Software and recorded audio can be found here (Score:2, Informative)
hmm. (Score:4, Interesting)
I mean the german fellow was near teh transmitting station and got a very good signal and started right away.
Bletchley Park on the other hand, because of the atmospheric conditions did not get a signal until late in the day and started late. On the other hand the german SW took only 46 seconds.
I'm not saying that the german fellow should not of won, he did fair and square - but there seemed to be no mention in much of the news at the time of the receiver issues.
On the plus side, it was excellent publicity for the park and colossus. If only Churchill had not ordered then scrapped then Britain could of led the technological era.
Churchill didn't order it scrapped... (Score:2, Interesting)
Re: (Score:2)
It means "I'm a computer geek, working with a programming language where a single-letter typo can lead to a disaster. Therefore, logically, I'm unable to type my native language halfway correctly."
Concise??!! (Score:3, Insightful)
Constricted - maybe. Painful - most certainly.
Re:Concise??!! (Score:5, Funny)
Perhaps you should read what you just wrote.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: Concise??!! (Score:3, Insightful)
I can't imagine using the words concise and Ada in the same sentence.
Not concise in spelling out the details of some low-level module, but very concise for higher-level programming, because it made you be precise when implementing the components.
Once you've worked in an area for several years you end up with a good collection of libraries with clean interfaces, and you find yourself throwing very complex programs together with simple code that "just works", rather than the spaghettied jazzturbation that you usually see when people use other languages.
No reason you can't wr
other factors often dominate language choice (Score:5, Interesting)
Like the author of the article, I have a tendency to dabble with a variety of programming languages. I haven't used Ada seriously, but I am intrigued by it, especially in contrast to the looser languages that are currently popular. A lot of bytes have been spilled on the topic of static and dynamic typing, bondage & discipline vs. unit testing, etc. While these discussions often devolve to religious wars, I do think that language matters. Never mind Sapir-Whorf or Turing, some languages are simply more or less pleasurable or powerful for certain tasks.
That said, often the language itself is not the dominant factor in choosing the language. As nice as (Ada | Erlang | Haskell | Lisp | Ruby) is, it's not going to be my first choice if another language has a readily available library that will make it easier to write the program. I can write web applications in Lisp, but I probably won't. There is probably a parser generator for Ada, but I'd rather use Flex and Bison, or maybe ANTLR. And when it comes to my first choice, independent of problem domain, I'll usually pick Python, in part because of its extensive library.
Re:other factors often dominate language choice (Score:5, Insightful)
This problem, however is a completely different kind of programming. It's old school stuff: building everything you need yourself to run on really slow hardware. And hardware is always slow relative to crypto problems. Ever try to implement RSA encryption from scratch? I have. There's a reason the public key stuff is only used for key exchange.
I think the usefulness of Ada on this kind of problem is related to the issue of testing being costly. When I started in this business, compiling and linking a two hundred line program took about fifteen minutes. Something like unit testing would have been utterly impractical. So a strictly typed language was for nearly everyone a good idea.
Over the last couple of years, I've been trying my hand at a number of difficult algorithmic problems. This is not the stuff that 99% of the programmers in the world do professionally, including me.
Working on these problems was like programming was in the old days. Not only was it just you and the problem with no frameworks to come between, every output becomes a milestone when it takes a program days to generate. It also means that the style of programming is different. You don't worry so much about language restrictions introducing frictional losses into the code/test/recode cycle. You do worry more about mistakes that make it past the compiler.
Ada's philosophy is that coding should be, if not exactly slower certainly more deliberate. If you are running something for which your hardware is monumentally slow, then this is a good style to work in.
Re: (Score:2)
Notice the choise of words here. nothing wrong but it implies a small one-person project. Maybe even less then that a one person part time project.
But what if there were 250 software engineeers working full time over three the five years? This is what Ada was designed for, large scale software. Very few companies can do this kind of work. Mostly you are looking at the big aerospace companies, like Northrop, Lockeed and Boeing. The major
Horses for courses (Score:5, Interesting)
Then of course C++ came along which wanted to have its cake and eat it and the end result was a nasty mishmash of low and high level constructs which is difficult to learn , unintuitive and generally messy to use.
Re:Horses for courses - please explain (Score:2)
I've always found it to be sub-optimal due to its lack of a "bit" data type, the need to explicitly set pointers to address specific regions in memory (which may or may not be in the same address space as I/O - ie the x86 architecture), etc. To get around these issues, access func
Re: (Score:2)
Maybe I misunderstand your question, but I dabble in C, so let me formulate a response.
In your second paragraph, you mention that you "need to explicitly set pointers to address specific regions in memory (which may or may not be in the same address space as I/O - ie the x86 architecture." I assume you're talking about paging, swapping, segmentation, and the like.
The OS determines address space. And, if you're trying to program this kind of memory management from within a multitasking operating system
Re: (Score:3, Informative)
Ada has an equivilant with packed types. You can set the 'Size attribute on custom types with bit precision, and you can pack multiple custom types into a record just like bitfields. We use this to read in packed data from hardware all the time.
The only major failing I found was using these for stream IO (file in/out): unless you rede
Re: (Score:2, Informative)
Yes, this is true, and it is one of the areas where Ada is very nice, i.e. for doing packet decoding (though in my opinion, erlang is nicer in this aspect).
The bad thing is that the syntax for declaring your packed records in Ada is a bit redundant.
Re: (Score:2)
HDL (Score:2, Interesting)
At the moment, software developers are like masons (Score:2)
Re:At the moment, software developers are like mas (Score:2)
Chipping the code into a specific shape by hand... Give it a few years and software development will be more like civil engineering. Pouring concrete into shapes which have known specifications.
Yep, Real Soon Now, just like we've been telling ourselves for the past quarter of a century.
And by the time we get to that point, all the coding will be done by code generators that take the specs as input.
Too bad none of us will ever meet a customer who actually knows what he wants until after you deliver the program...
Planck quote (Score:2)
Yes, and the people who promote Ada as a secure and productive programming language have almost died out.
Ada is neither, and fortunately, the market has realized that.
Re: (Score:2)
Re: (Score:2)
Yes.
I wonder ... (Score:3, Interesting)
Obvious.. (Score:2, Informative)