Colossus Cipher Challenge Winner On Ada
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.'"
He should have used a real programming language like Java or VB.Net.
If you haven't made a developer cry, you've wasted a day.
From heretical.com:
MALE PRIORITY. Of course, another immediately obvious explanation for F25D3's flitting off while I was still in mid-sentence exists. It is that my conversation was unbearably boring and F25D3 had withdrawn to escape the tedium, or there may have been some other defect in my presentation. By way of response I state explicitly here that:
1. I don't believe that my conversation was boring, and in any event my conversation had certainly not been considered so by F25D3 when we had met previously and a hint had been given. I knew it to be true that people with specialized skills could be monotonous, and had even found some of my own friends so on occasion. Although such people might be thought dull, the information and skills they had were useful.
2. Compared to the utter trivia which seems to circulate in the minds of all but a tiny proportion of females, almost anything was an improvement. Even in a technologically advanced society such as the one in which we currently live, females seemed to think that their inconsequential conversations about relationships and similar immature tittle-tattle were equal to male conversations about abstract concepts and objects. [amen brotha]
3. As a male I was a wealth creator rather than (as the female) a net consumer, and reasoned that as such my desires should have priority over those of females.
4. The relatively safe and comfortable society from which females were now unreservedly taking benefit had been created by my male forebears, people like me, and their success demonstrated that my desires had more validity. The females were taking advantage of male efforts as blithely and unthinkingly as someone who believes that the blowing of a whistle is the power which sets a train in motion.
5. Whether by the medical research I had done, the organization I ran or by this study I was contributing in at least a small way to the advancement of humankind. Not only did this reinforce my conviction that my male desires should be honoured, in preference to those of females, but in addition I resented the pressure I was clearly under to indulge in dishonesty and trickery in order to fulfil my desires, especially since such dishonesty of thought, for example by selective perception and distortion of truth, was directly antagonistic to such advancement.
I wonder how easy it would be to break the Allies corresponding machine, the SIGABA (http://www.quadibloc.com/crypto/ro0205.htm). It was stated that during WWII, the Lorenz machine was broken, but the SIGABA wasn't. Of course, given 60 years of computer improvements, it might be possible to break the SIGABA, now.
It was at the University of Dayton in the late 90s. ADA was the language they taught all their intro computer science classes in. They then switched to C++. I didn't like ADA, but looking back that may have been my own prejudges more than anything wrong with the language. Every computer class I had in high school used a different programing language. I was getting sick of learning new languages when I wanted to be advancing in my computer skills.
Brian
For those that know the differences in Ada, its a very strongly typed language which makes it harder for a beginning programmer to pickup. It doesn't allow for type conversion and pretty much enforces strict coding rules. It would make sense that he used this since he would have complete control over what his code did exactly. This wouldn't be the case with java or other languages which allow type conversions easily, which is nice for alot of people, but can definitely lead to issues when not accounted for.
CmdrTaco here. A few years ago, while browsing around the library downtown, I had to take a piss. As I entered the john, a big beautiful all-American football hero type, about twenty five, came out of one of the booths. I stood at the urinal looking at him out of the corner of my eye as he washed his hands. He didn't once look at me. He was "straight" and married -- and in any case I was sure I wouldn't have a chance with him.
As soon as he left, I darted into the booth he'd vacated, hoping there might be a lingering smell of shit and even a seat still warm from his sturdy young ass. I found not only the smell but the shit itself. He'd forgotten to flush. And what a treasure he had left behind. Three or four beautiful specimens floated in the bowl. It apparently had been a fairly dry, constipated shit, for all were fat, stiff, and ruggedly textured. The real prize was a great feast of turd -- a nine inch gastrointestinal triumph as thick as a man's wrist. I knelt before the bowl, inhaling the rich brown fragrance and wondered if I should obey the impulse building up inside me. I'd always been a heavy rimmer and had lapped up more than one little clump of shit, but that had been just an inevitable part of eating ass and not an end in itself.
Of course I'd had jerkoff fantasies of devouring great loads of it (what rimmer hasn't?), but I had never done it. Now, here I was, confronted with the most beautiful five-pound turd I'd ever feasted my eyes on, a sausage fit to star in any fantasy and one I knew to have been hatched from the asshole of the world's handsomest young stud.
Why not? I plucked it from the bowl, holding it with both hands to keep it from breaking.
I lifted it to my nose. It smelled like rich, ripe limburger (horrid, but thrilling), yet had the consistency of cheddar. What is cheese anyway but milk turning to shit without the benefit of a digestive tract? I gave it a lick and found that it tasted better then it smelled. I've found since then that shit nearly almost does. I hesitated no longer. I shoved the fucking thing as far into my mouth as I could get it and sucked on it like a big brown cock, beating my meat like a madman. I wanted to completely engulf it and bit off a large chunk, flooding my mouth with the intense, bittersweet flavor. To my delight I found that while the water in the bowl had chilled the outside of the turd, it was still warm inside. As I chewed I discovered that it was filled with hard little bits of something I soon identified as peanuts. He hadn't chewed them carefully and they'd passed through his body virtually unchanged. I ate it greedily, sending lump after peanutty lump sliding scratchily down my throat. My only regret was the donor of this feast wasn't there to wash it down with his piss. I soon reached a terrific climax. I caught my cum in the cupped palm of my hand and drank it down. Believe me, there is no more delightful combination of flavors than the hot sweetness of cum with the rich bitterness of shit. Afterwards I was sorry that I hadn't made it last longer. But then I realized that I still had a lot of fun in store for me. There was still a clutch of virile turds left in the bowl. I tenderly fished them out, rolled them into my hankercheif, and stashed them in my briefcase.
In the week to come I found all kinds of ways to eat the shit without bolting it right down. Once eaten it's gone forever unless you want to filch it third hand out of your own asshole -- not an unreasonable recourse in moments of desperation or simple boredom.
I stored the turds in the refrigerator when I was not using them but within a week they were all gone.
The last one I held in my mouth without chewing, letting it slowly dissolve. I had liquid shit trickling down my throat for nearly four hours. I must have had six orgasms in the process. I often think of that lovely young guy dropping solid gold out of his sweet, pink asshole every day, never knowing what joy it could, and at least once did,bring to a grateful shiteater.
Use a masochistic language to break a German code...groovy.
The cancel button is your friend. Do not hesitate to use it.
01010111 01101001 01101101 01110000 00100000 01110101 01110011 01101001 01101110 01100111 00100000 01000001 01010011 01000011 01001001 01001001
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
Has anyone else started to notice an ADA resurgence? I feel like several years ago the general feeling was "ADA is a backwards language used only on old military projects." Now I read a positive story about ADA every few weeks! Was ADA 2005 that good of a language revision?
Really good interview found here.
http://www.netbsd.org/gallery/schueth-interview.html
Comment removed based on user account deletion
I think that the main reason why Ada has 'lost' to C++ is that some time ago, C++ compiler were either cheap or free whereas Ada compiler were expensive.
Too bad since Ada is 'by default' a language which is more secure than C++..
http://www.schlaupelz.de/SZ42/SZ42_software.html
There's another interview with him at adacore.com (makers of the GNAT compiler)
http://www.adacore.com/home/ada_answers/lorenz-code/
I often wondered at the time if this was a fair test?
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.
The programmer won the competition; not the language. He just happened to write it in Ada. Languages are nothing but syntax: none are "better" than anther at certain operations. Folks here /. apparently never learned that in school.
I can't imagine using the words concise and Ada in the same sentence.
Constricted - maybe. Painful - most certainly.
Lodragan Draoidh
The more you explain it, the more I don't understand it. - Mark Twain
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.
I play with programming on both the PC and Mac (at work I am on a mini and there is no ADA there at all) so I am curious...
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?
* Winners compare their achievements to their goals, losers compare theirs to that of others.
As someone whose first programming language was Ada, and who knows of several universities around the same time who chose Ada as a teaching language, I can say with certainty that you are completely wrong.
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?
An Eye for an Eye will make the whole world blind - Gandhi
They're on to java now, but I think Ada was great. Sure, not much in the way of market demand, but the way that Ada makes everything so explicit was helpful in making the students understand what was going on.
Its not really surprising that he found ADA nicer to use than C for this sort of project because its not the sort of thing C was created for. People seem to think that C was designed as an all purpose programming language - it wasn't. It was specifically designed as a systems programming language that could substitute for assembler 99% of the time. Its abilities lie in low level manupulation of memory and I/O , not in high level mathematics algorithms (though obviously it can do this too).
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.
I've used both verilog (C based) and VHDL (ADA based) and the latter wins hands down for being maintainable and easy to debug. Nobody had to write a LINT checker for VHDL like they did for verilog. I totally believe this guy.
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.
Deleted
Ada Boy!!
He (and his successor, Attlee) kept it classified. Then, during decolonization, they gave lots of captured Enigma machines to former colonies to allow them to keep their communications secure -- and allow the former colonial power to keep an eye on things :)
truth never wins -- its opponents just go extinct
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.
I can't help wondering how many of the people making snide comments about Ada (note: not ADA; it's not an acronym) have actually used it.
I don't want to start a philosophical battle here, but I would appreciate it if you could give me a pointer to a reference explaining what are the features of C that make it suitable for "low-level manipulation of memory and I/O"?
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 functions are typically written in assembler and then accessed by the C mainline code or the compiler is enhanced to provide these functions more natively. For high performance applications, the programmers may find that they have to use assembler to minimize latency between commands. These factors typically result in code that isn't portable unless the compiler features and libraries can be used in the target.
It might seem that I'm glossing over the point (that I agree with) that C can be used in 99% of the places where assembly language could be used, but what I'm really doing is questioning why it is accepted as the best language, and how it has been optimized, for low-level programming.
Thanx,
myke
Mimetics Inc. Twitter
there is no god but truth, and reality is its prophet
He obviously settled on Ada, because Ada allowed him to implement.
Well, there are bit fields in C. There is no bit type, since there is no machine that actually supports working with single bit datablocks.
Yes, there are issues with C. Yes, Ada may have nice features, but the language is extremely difficult to learn and leads to excessively verbose code (this is not a good thing, since it makes it more difficult to grasp what an expression that would have been 1 line of clean C is suddenly 3 or 4 lines of Ada).
Note, I write Ada professionally, and it is a decent language for some tasks, but systems programming is not one of them.
The article mention Misra-C for enhanced safety, but that is just a myth. Misra-C exists in order to support crappy compilers for embedded chipsets.
Misra makes the following statement illegal for example:
"if (x == 5)", instead it has to be written as "if (5 == x)" in order to prevent bugs from missing one of the =. Note, that any reasonable C compiler (and it would be better to have a certification of the compilers that are used instead of forcing in unintuitive code) will give you a warning about assigning something as "if (x = 5)".
But in order to fall back to the post, firstly as noted, there are bit fields in C, and you can use them to represent sequences of bits in 90% of the cases where you need to.
C has bitwise operators that actually works (compared to Ada), which makes it a lot more suitable for bitmanipulation than Ada.
C also treat arrays and pointers as the same, and pointers are not checked, and you can cast data and pointers to whatever you want, this is why it is suitable for low level memory manipulation.
The thing is not really that C could not be better on low level programming, it could definitely be improved. But the plain thing is, there is nothing better for the task out there.
I can see that D might have a future though, but it is not there yet.
"Civis Europaeus sum!"
But in order to fall back to the post, firstly as noted, there are bit fields in C, and you can use them to represent sequences of bits in 90% of the cases where you need to.
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 redefine the stream attributes for the type, Ada will automatically assume that the minimum size of the type is 8 bits, and will resize fields smaller than this. Makes for a lot of fun when trying to figure out why your file format is wrong, or you read in incorrect data.
C has bitwise operators that actually works (compared to Ada), which makes it a lot more suitable for bitmanipulation than Ada.
Oh, hell yes. Bitwise operations in Ada are so clumsy they made me tear my hair out.
C also treat arrays and pointers as the same, and pointers are not checked, and you can cast data and pointers to whatever you want, this is why it is suitable for low level memory manipulation.
I don't consider treating arrays and pointers the same to be a huge benefit; it's more of a kludge. Anyway, you can get the same performance as C pointers by using Ada access types; just make sure your types are aliased.
Man is the animal that laughs.
And occasionally whores for Karma.
"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."
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.
"Civis Europaeus sum!"
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, you're doing something wrong (or writing a driver.) Since the OS determines address space and whatnot, you need to make system calls to handle I/O, or to get it to map some of the virtual addresses your process owns to the physical address where the hardware buffers are (for DMA-type stuff.)
I'm not a driver programmer, and my experience with C and assembler is in real mode - no OS, no swap, no paging, flat memory, etc. But, this is an OS/hardware problem which every language has to deal with, and you'll have to interact with the operating system to transfer data outside of your memory space.
(Aside: This is why 32bit XP doesn't always see all of your memory if you install 4 GB. It gives every process its own flag 4 GB virtual address space, and maps the upper virtual addresses of every process to the same physical address that stores parts of the kernel. That way, no swapping occurs when your program makes a system call.)
There is no "bit" data type because you will never access individual bits through hardware. Registers are byte sized, and memory is accessed in word-sized chunks. A "bit", outside of software abstraction, will never be found on its own. You use masking to set/reset/toggle individual bits from within a byte (unsigned char) or other type. (Something along the lines of
- AND, OR, and XOR are &, |, and ^.)My understanding is that it's not so much that C is "optimized" for low-level programming, but that there are very few abstractions between C commands and the assembly language they generate. And, ever since FORTRAN, optimizing compilers generally generate faster code than even someone skilled with an assembler.
Anyway, if there's something I misunderstood, or else another opportunity for C fanboi-ism, let me know.
DATABASE WOW WOW
Granted, forcing a language on everyone probably wasn't a smart move, even if the language is really good (as some of us think Ada is). But having made that decision, ISTM that they should have stuck to their guns rather than giving in to the whining.
IIRC, the now-familiar GPL'd gnat compiler was one of the earliest Ada compilers, funded at NYU by the military. As others have mentioned, it is now fully integrated into the GNU Compiler Collection (gcc). I don't know how useful it was back in the old days.
Sheesh, evil *and* a jerk. -- Jade
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...
Sheesh, evil *and* a jerk. -- Jade
It should be called FrackYou_Conversion. On our compiler it "converted" an 8 bit value to a 16 bit value by just grabbing the next byte.
So you could end up with 256 different conversions depending on where in memory you code is located.
College-Pages.com - Online Colleges, Degrees, and Programs
Since C99 there is a "bit" data type. It's called bool.
I think you'll find in reality its actually an int (or other type that uses up a memory word) that the compiler pretends is a bit at the language level. Anyway , C++ has had it for years so its nothing new.