Slashdot Mirror


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.'"

168 comments

  1. Let the raging tardfight commence by Malevolent+Tester · · Score: 2, Funny

    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.
    1. Re:Let the raging tardfight commence by morgan_greywolf · · Score: 5, Funny

      He should have used a real programming language like Java or VB.Net.
      Pffft. Real men write programs like this:

      $ cat >/bin/myprogram
    2. Re:Let the raging tardfight commence by jellomizer · · Score: 4, Insightful

      For the most part the language doesn't matter that much. ADA, C, C++, PASCAL, BASIC, LISP... Almost every languge can get the job done. It is just a matter on how well it handles different details. I like Python for its List Processing and Top Down Design. Some people like Visual Basic for its ease in creating good interfaces. Some people like C and C++ because they can control the system at a lower level.
      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)

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:Let the raging tardfight commence by L4t3r4lu5 · · Score: 1

      C:\>copy con c:\decrypt.exe
      --
      Finally had enough. Come see us over at https://soylentnews.org/
    4. Re:Let the raging tardfight commence by morgan_greywolf · · Score: 1

      For the most part the language doesn't matter that much. ADA, C, C++, PASCAL, BASIC, LISP...


      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 C interpreter, for instance.
    5. Re:Let the raging tardfight commence by Nolde+Huruska · · Score: 1

      It matters not which language is used, just as long as it is edited with vi.

    6. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      And, some folks like Borland Delphi (Object Pascal)!

      Mainly because it's been shown (& as far back as 1997, in OF ALL PLACES, "Visual Basic Programmer's Journal" Oct. 1997 issue "INSIDE THE VB 5 COMPILER") to produce code that is far F A S T E R than VB, & even MSVC++!

      (Especially in math & strings, which EVERY PROGRAM DOES, mind you, & Delphi swept the majority of the tests done, from both of them)...

      APK

    7. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      Let the raging tardfight commence It seems to have started sooner than you expected.
    8. Re:Let the raging tardfight commence by jellomizer · · Score: 1

      Whoa Hold the phone! Sience when have computers been able to compute math? This is a big deal, this could change the world!

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    9. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      You're right! Ada is an engineering language! why would he use something like that for such a trivial problem like a Cipher Challenge... Oh! wait! he may have actually wanted it to work properly without spending more time debugging then he spent on coding! You can send a man to the moon using a slide-rule but why not use something that will actually do a alot of the work for you! (type checking, runtime checking...) and allow you to do the actual engineering required! (instead of debugging all the time).

      I have always wondered why tools like Ada have not caught on in the larger world... The only thing I can think of is that most apps are not really thought out very well before hand, they are just slapped together and _made_ to work without much (if any) actual engineering. I guess that's why most apps are crap!

      TBM

    10. Re:Let the raging tardfight commence by morgan_greywolf · · Score: 2, Insightful

      In 1997, producing small, fast executables for desktop and database client applications (Delphi's raison d’ètre) mattered a whole lot more than it does today. These days, it's generally far more important to use a tool that lets the programmer be very productive and to produce nice, maintainable code. Both of which Delphi does very well, mind you.

    11. Re:Let the raging tardfight commence by compro01 · · Score: 1

      what about the real programmers who set the universal constants at the start of the universe? =P

      --
      upon the advice of my lawyer, i have no sig at this time
    12. Re:Let the raging tardfight commence by valentingalea · · Score: 3, Funny

      He should have used Brainfuck!

    13. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      it's just, that GP was funny, and you're not. EVER. =P

    14. Re:Let the raging tardfight commence by B3ryllium · · Score: 1

      I still think they should have gone with DOS-based batch files ... or Monad/Windows PowerShell :)

    15. Re:Let the raging tardfight commence by chaim79 · · Score: 1

      'Course there's an EMACS command to do that... the butterfly thing that is.

      --
      DEMETRIUS: Villain, what hast thou done?
      AARON: Villain, I have done thy mother.
      Shakespeare invents 'your mom'
    16. Re:Let the raging tardfight commence by oni · · Score: 1

      Some people like Visual Basic for its ease in creating good interfaces.

      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 less than how you use it (and for performance, the language matters less than how it's implemented). But if you know several languages equally well, then you know the little idiosyncrasies that make each better suited to a particular task, and can make an informed choice.

    17. Re:Let the raging tardfight commence by patchvonbraun · · Score: 3, Insightful

      I only found out about the contest a couple of days before it began, and I was away at the time, so I
      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 competition like
          this:

                      o The *appropriateness* of the language
                      o The skills of the coder

      Joachim got all the glory on this one, since he
          was first to announce the breaks. But there are
          probably a number of others who were "close"
          when Joachim announced his break.

    18. Re:Let the raging tardfight commence by ozmanjusri · · Score: 1

      You may mock, but I wrote my first program with the pointy part of a compass.

      --
      "I've got more toys than Teruhisa Kitahara."
    19. Re:Let the raging tardfight commence by megaditto · · Score: 2

      Yeah, but how much choice do they really have in picking those?

      --
      I made myself sad just now

      --
      Obama likes poor people so much, he wants to make more of them.
    20. Re:Let the raging tardfight commence by Strilanc · · Score: 1

      I know C, Java, VB, and python, and I really like VB(.net).

      Reasons:
      C is almost always too low-level for what I need. I don't want to worry about garbage and tracking the size of arrays.
      python doesn't have static type checking or really any type of static checks (because of its interpreted nature). I really, really like compile-time checks.
      Java is alright, but it doesn't have operator inheritance, doesn't force you to declare methods as overridable, and (mainly) doesn't have an IDE as nice as Visual Studio. Java generics are more flexible, though.

      The big downside of VB is the dependency on windows, and some of the leftover junk from VB6 like on error goto.

    21. Re:Let the raging tardfight commence by ArtuRock · · Score: 1

      Some people like Visual Basic for its ease in creating interfaces. Fixed it for you.
    22. Re:Let the raging tardfight commence by compro01 · · Score: 1

      just added that for the sake of people who don't read xkcd, and thus wouldn't get the joke.

      --
      upon the advice of my lawyer, i have no sig at this time
    23. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      pffffft.

      Vi sucks compared to pico.

      (trolling - can't beat it)

    24. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 1, Insightful

      You only like VB.Net because you don't know C#.

    25. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 1, Funny

      You misspelled "emacs."

    26. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      Uhm... your point, please?

      Now - If you're trying to be funny, then so be it... sarcasm has its place too!

      (However - despite the fact your statement's pretty humorous? It still doesn't change the facts & tests I cited, from a reputable publication for coders in this field, period... & the data + results haven't changed lately either on the account I noted (i.e./e.g.-> Borland Delphi produces faster code than MS' VB & VC++ products, especially in math & strings, which EVERY PROGRAM DOES)).

      I wonder, what kind of processing occurs MOST in the type of work being done for this report/article @ /. here? Strings, & math related, by SOME/ANY chance?? Thanks for the answer on that note...

      ----

      Don't get me wrong either:

      I have used MSVB since version 3.0 on Win16 platforms, & MSVC++ since version 2.0 on 16-bit Windows too, & all the way up to current VB.NET/ASP.NET in Visual Studio 2005 for 32-bit development, professionally!

      Hey - .NET's decent stuff, that has its merits & places!

      (PLUS, .NET WAS DESIGNED/ARCHITECTED LARGELY BY DELPHI's CREATOR ( MS "Distinguished Engineer" title holder, @ MS, in Mr. Anders Hejlsberg, hired away from Borland by Microsoft no less ) but since .NET code's runtime interpreted, it's just slower than Delphi executables are, (no doubt about it, hands-down/period))...

      ----

      HOWEVER - It's TOUGH to NOT have to use Microsoft's compilers & IDE's, especially today & nowadays for the past 10 yrs. now mostly imo + experience professionally in this field as a developer!

      "Nobody ever got fired for buying IBM" is the old saying, & today, might as well replace IBM with MICROSOFT!

      See - the business reasoning I have been given time & again, despite my showing & extolling the virtues of Delphi over .NET stuff especially for speed (yes, even though they have "garbage cleanup", a GOOD coder knows how to "de-lint" memory allocations w/ a matching freeing of them, well... VB & VC++ are just slower than Delphi, period)?

      Well - since MS has the "BIG BUCKS"? Mgt. OFTEN feels "they will be here today, tomorrow, & years from now - will Borland?" (etc. et al)

      ----

      Then again, by way of actual "hands-on" experience, "in the trenches", actually doing the job of coding & design ( as far as my 16++ yr. professional career in this field has shown me ( mostly MIS/IS/IT coding ( db work etc. )))?

      I have had literally, only 2-3 mgr.'s, in that timeframe, that I could respect as being able to do the job & do it right... largely because THEY COULD ACTUALLY DO THE JOB & HAVE BEFORE PROFESSIONALLY ( most have not, unfortunately, & this IS a problem in this field ( and, others )).


      That said? Who says mgt. really knows ANYTHING of worth, where the "rubber meets the road" (in actually having done the job, themselves, hands-on) when it comes to actually knowing AND DOING the job, themselves?? Imo, unfortuntely???

      Most mgt. are just "stooges/flunkies" for the UPPER mgt. whose only goal is to make money, NOT QUALITY PRODUCTS, as well as being literally nearly incompetent @ doing the jobs of their subordinates, themselves.

      APK

      P.S.=> Build crappy product, you LOSE monies & get a poor rep... build it RIGHT, w/ the BEST TOOLS (relative term, it depends on which languages lends itself to the job, best, & I'll freely concede that based on time to build/to get to market, ease of use & maintenance, BUT ALSO FOR SPEED/EFFICIENCY as well as security), you get that GOOD REP, & sales out the "wazoo", because it's done right the first time out... apk

    27. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      "In 1997, producing small, fast executables for desktop and database client applications (Delphi's raison dètre) mattered a whole lot more than it does today." - by morgan_greywolf (835522) * on Thursday May 15, @10:22AM (#23417700) Homepage In my book? It still does... efficiency, & security, especially in code, matter ( & in ANY KIND of code! )... @ least, that's how I feel + TRY to design for.

      E.G.-> Even my latest freeware creation for Dr. Who fans worldwide exemplifies this ideal of mine (&, many others (based on the rest of your reply below, seems you espouse it as well)) & it too, was created in Delphi, plus proven Win32 API lib/dll function calls, & Inline Assembler code, here:

      ----

      APK Doctor Who ScreenSaver 2008++ version 1.0:

      http://www.drwhodaily.com/community/index.php?showtopic=386

      ----

      (That's a multithreaded (2/3 threads, depending on the stage of operation it is in) designed monolithic/"1 moving part only" Win32 PE program, that uses a "blend" of proven F A S T coding tools, in addition to "hand-tuning" (more of that there, as to details))

      Also - for more speed/efficiency still, that screensaver program LITERALLY "self-contains", internally (via resources storage), the animation it plays back inside of itself, & plays it from MEMORY, not disk, for more efficiency/speed still!

      (Plus/lastly - it also "self-checks" itself vs. viral infestation (or, tampering via corruption OR disassembly techniques + tools to a good extent) via CRC-32 & Filesize checks - heck, even its self-extracting WinRar installer is protected vs. meddling &/or infestations, via RAR locking & a 5% recovery record built-in!)

      ----

      "These days, it's generally far more important to use a tool that lets the programmer be very productive and to produce nice, maintainable code. Both of which Delphi does very well, mind you. - by morgan_greywolf (835522) * on Thursday May 15, @10:22AM (#23417700) Homepage Ah, I see you agree, FOR THE MOST PART, on the strengths of Delphi, 'right outta the box'...

      APK

      P.S.=> QUESTION:

      I was wondering - & on this very post @ /. ( slashdot ), IF the task + data being computed gain an advantage, via Delphi's strength in STRING & MATH Processing
      ( which Delphi has over BOTH MSVB & MSVC++ ) thus, quite possibly giving said computational task better/faster/more efficiencies, via being developed in DELPHI ( especially if the compiler you use shows strengths in strings & math processing work tasks, which Delphi has )?

      After all, EVERY program does strings & math, but somehow I think this type of processing ( which this post is about ) do an especially LARGE amount of that kind of work, & on THAT KIND OF DATA!

      Now, I could be wrong, but just asking
      ... apk

    28. Re:Let the raging tardfight commence by morgan_greywolf · · Score: 1

      Hmmmm....maybe some.

      OTOH, first of all, there are far more tools available than just MSVB and MSVC++. For example, could your program's efficiency be improved by being developed in straight C (not C++)? Especially given that executables for object-oriented languages tend to be larger than those written in C?

      As far as OO-tools, have you compared vs. GNU C++ or other open source compilers? How about Free Pascal? (Your Delphi code might even compile in Free Pascal unmodified). What about other commercial C++ compilers?

      Secondly, using a given tool doesn't necessarily give you optimal efficiency, which is as at least as much about the skill of the programmer as it is about the tool. No optimizing compiler can optimize sloppy, poorly-written code.

      Finally, if optimizing for size and performance, you have to design that way. Rampant featuritis is responsible for far more code bloat than incompetent coders. Think of Zawinski's Law: Every program of sufficient complexity expands until it can read mail.

    29. Re:Let the raging tardfight commence by morgan_greywolf · · Score: 1

      Yes. It's M-x in-air-light-refraction-affecting-butterflies. I think by default it's bound to C-M-S-Shift-L C-B

    30. Re:Let the raging tardfight commence by Hasmanean · · Score: 2, Funny

      Real men don't use constants. They express all quantities in their natural units, (such as the size of the known universe, or the diameter of a hydrogen atom). Needless to say, they do not require constants to convert the answers to meter-kilogram-second units.

      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.

      --
      Hasan
    31. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      Some people like Visual Basic for its ease in creating good interfaces. Making it easy to code interfaces doesn't mean you make good ones. There's much more to it than that.
    32. Re:Let the raging tardfight commence by XHIIHIIHX · · Score: 1

      Almost every languge can get the job done
    33. Re:Let the raging tardfight commence by quanticle · · Score: 1

      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!

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    34. Re:Let the raging tardfight commence by john.r.strohm · · Score: 2, Informative

      Joachim also chose to work a much harder problem than you did.

      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.

    35. Re:Let the raging tardfight commence by DrPizza · · Score: 1

      I bet you couldn't even write a program that would score 5/5 at ZDNet.

    36. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      "Hmmmm....maybe some." - by morgan_greywolf (835522) * on Thursday May 15, @03:16PM (#23422750) Homepage Actually, as far as the scores, from Visual Basic Programmer's Journal Oct. 1997 issue I mentioned (Delphi, vs. VB, vs. MSVC++)?

      Math Processing:

      1.523 ms for Delphi
      2.890 ms for MSVC++
      7.871 ms for VB

      String processing:

      0.275 ms for Delphi
      0.600 ms for MSVC++
      4.091 ms for VB

      (Fairly LARGE "orders of magnitude" in those scores, & IN FAVOR OF DELPHI! In fact, everytime? IT LITERALLY WAS ENTIRE ORDERS OF MAGNITUDE (@ least double))

      I strongly wager also, & I asked this question in my earlier replies?? That this type of work, for Ciphers??? Has a TON of BOTH Math & Strings processing going on for it to happen!

      ----

      "OTOH, first of all, there are far more tools available than just MSVB and MSVC++" - by morgan_greywolf (835522) * on Thursday May 15, @03:16PM (#23422750) Homepage Never said there wasn't... but, you have to take things into consideration, like business costs of development, & that means time (developer time, & it's NOT cheap, because not everyone/anyone can do it)... RAD (rapid application development) tools do this, especially object oriented ones.

      ----

      " How about Free Pascal? (Your Delphi code might even compile in Free Pascal unmodified)." - by morgan_greywolf (835522) * on Thursday May 15, @03:16PM (#23422750) Homepage Delphi IS, already, "multi-platform" (@ least for Linux & Win32), look up Kylix (& yes, it still works on the latest Linux distros, though it might need a TINY little patch (version check stuff, easily added by anyone, easily via notepad.exe even)...

      ----

      "Secondly, using a given tool doesn't necessarily give you optimal efficiency, which is as at least as much about the skill of the programmer as it is about the tool. No optimizing compiler can optimize sloppy, poorly-written code." - - by morgan_greywolf (835522) * on Thursday May 15, @03:16PM (#23422750) Homepage Never said it was the ONLY thing that could be done to optimize code (a better algorithm/engine, is the best, or one of the best things you can do... efficient foundations!)

      If you saw the URL I have posted here & the detailed explanations I wrote on it?

      Well - I did some 'tricks' above & beyond std. compiler directives that gain speed (optimizing/profiling via hi-res multimedia timers & counting out the LONGEST running routines I have, & concentrating on THOSE (using inline asm directives & code, IF/WHEN I had to, for example... or, just "re-thinking" various routines!)

      ----

      "Finally, if optimizing for size and performance, you have to design that way. Rampant featuritis is responsible for far more code bloat than incompetent coders. Think of Zawinski's Law: Every program of sufficient complexity expands until it can read mail." - by morgan_greywolf (835522) * on Thursday May 15, @03:16PM (#23422750) Homepage I do! I note the POLISH name there (assuming this, hopefully NOT incorrectly)? We've been shown in academia the past few years now, to have the BEST ON THE PLANET as far as coding via competitions in academia & yes, I read it here on /. (this site), no less!

      (Finding THAT out? It was, pretty cool - makes ME proud, to be POLISH in fact!)

      APK

    37. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      "I bet you couldn't even write a program that would score 5/5 at ZDNet." - by DrPizza (558687) on Thursday May 15, @08:17PM (#23426924)

      You KNOW better than THAT, PeterB (DrPizza): Yes, I've been noted & reviewed well in written publications in this field around 10x now PeterB since 1996 (yes, I remember you, the gay guy that also posts online as DrPizza)... & yes, also on websites over time, doing well in "stars ratings" of work I had done in freeware/sharewares.

      In fact, one of them being Windows IT Pro (back when it was Windows NT magazine, for EEC Systems/SuperSpeed.com), circa 1996, in regards to my having been a part of a successful commercially sold ware - & one that took superspeed.com to a finalist position @ MS Tech Ed 2000 & 2001 iirc, as a finalist in the hardest category there - SQLServer Performance Enhancement for techniques I noted in HOW TO USE IT EFFECTIVELY (& it worked, bigtime))

      And, you arstechnica "online psycho-stalkers" STILL TO THIS DAY (you doing this sarcastic little post of yours only shows more of it) still try to pester me online & have kept it up since 2001 to present day (you're just another example thereof now)?

      Well - time to let YOU, embarass yourselves (arstechnicans in general), like usual.

      PeterB/Dr.Pizza, a question:

      (The same one I had asked you arstechnica forums people years ago, & NOT A ONE OF YOU "ARSTECHNICA UNDERACHIEVERS" HAD ACCOMPLISHED ANYTHING OF THAT NOTE/CALIBER, WHATSOEVER - & this embarassing of you all led to the b.s. noted below from Windows IT Pro mag forums no less):

      What have YOU done, that was noted as decent in the way of code online (your "private playpen" @ arstechnica doesn't count, because LORD KNOWS, you all "support one another" lol, via "alternate guises" ( same arstechnica forums people posting but using diff. logon names no less ( & yes, there is proof below )))?

      How about in well-respected written publications in this field as well??


      ----

      AND then, there is ALWAYS THIS ( a hilarious testimony to the foolishness & incompetence of arstechnicans ) too:

      http://windowsitpro.com/articles/index.cfm?articleid=41095&cpage=216#feedbackAnchor

      That's where you arstechnicans got:

      ----

      1.) Kicked off your hosting providers (hilarious, the very thing Jay Little & Jeremy Reimer tried to do to me, backfired, & they got kicked from CrystalTech.com OR had parts of their sites removed, or the WHOLE websites they had were removed, by their hosting providers for libel, death threats, & more)!

      2.) Jeremy Reimer got nailed by his ISP in Shaw (Canada) for repeated email harassment (ask Jeremy Reimer about that)

      3.) Jay Little shot his mouth off about being an "expert on Exchange" & then did not know that memory optimization programs clear up issues on that!

      4.) Jeremy Reimer was also caught impersonating myself online on his website (you arstechnicans did the same to myself on your websites also, & also edited my posts too - only LOSERS do that when they are getting themselves beaten by their own stupidities PeterB)

      5.) That is lastly where arstechnica people were caught RED HANDED posting as others (same person, diff. logon screennames) to "support one another", & it was hilarious trapping you all in that, & letting you embarass yourselves in THAT.

      ----

      You ONLY DID THAT, to yourselves, like usual.

      I truly wonder this - How can you arstechnica people, like those 2 (Jeremy Reimer, Jay Little, & other arstechnicans up there @ Windows IT Pro & now, also inclusive of yourself now doing this razzing of myself here now) live w/ yourselves I wonder... you must be gluttons for punishment.

      APK

      P.S.=> HOWEVER (& this is actually in YOUR favor on this one):

    38. Re:Let the raging tardfight commence by DrPizza · · Score: 1

      I have no idea what you're talking about, I'm afraid. If the Delphi compiler is so awesome, why not give us a comparison of a program doing the same computation in the same way written in both Delphi and another language (C++, say), built using modern compilers? If you're just going to compare with VC6, which is a decade old next month, I'm not interested.

    39. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      "If the Delphi compiler is so awesome, why not give us a comparison of a program doing the same computation in the same way written in both Delphi and another language" - by DrPizza (558687) on Monday May 19, @08:08AM (#23460844) From VISUAL BASIC PROGRAMMER'S JOURNAL ISSUE "INSIDE THE VB COMPILER" (a respected trade magazine for coders):

      [b]Math Processing:[/b]

      1.523 ms for Delphi
      2.890 ms for MSVC++
      7.871 ms for VB

      [b]String processing:[/b]

      0.275 ms for Delphi
      0.600 ms for MSVC++
      4.091 ms for VB

      (Fairly LARGE "orders of magnitude" in those scores, & IN FAVOR OF DELPHI! In fact, everytime? IT LITERALLY WAS ENTIRE ORDERS OF MAGNITUDE (@ least double))

      I strongly wager also, & I asked this question in my earlier replies?? That this type of work, for Ciphers??? Has a TON of BOTH Math & Strings processing going on for it to happen!

      APK

      P.S.=> That's what I have literally sitting in front of me PeterB/DrPizza (& about what I am talking about in my last reply? Hey - Can't you read??)

      Read it & verify my statements on the pages they occurred on, they are there plain as day, & easily verified as truth!

      Hey - just as the results of Delphi whipping both VB & MSVC++ by entire ORDERS OF MAGNITUDE, overall no less from a respected publication in this field, programming. I'd say contrary evidence & the burden of proof is now on you, not I, for contrary results! apk

    40. Re:Let the raging tardfight commence by Anonymous Coward · · Score: 0

      "If the Delphi compiler is so awesome, why not give us a comparison of a program doing the same computation in the same way written in both Delphi and another language" - by DrPizza (558687) on Monday May 19, @08:08AM (#23460844) From VISUAL BASIC PROGRAMMER'S JOURNAL ISSUE "INSIDE THE VB COMPILER" (a respected trade magazine for coders):

      Math Processing:

      1.523 ms for Delphi
      2.890 ms for MSVC++
      7.871 ms for VB

      String processing:

      0.275 ms for Delphi
      0.600 ms for MSVC++
      4.091 ms for VB

      (Fairly LARGE "orders of magnitude" in those scores, & IN FAVOR OF DELPHI! In fact, everytime? IT LITERALLY WAS ENTIRE ORDERS OF MAGNITUDE (@ least double))

      I strongly wager also, & I asked this question in my earlier replies?? That this type of work, for Ciphers??? Has a TON of BOTH Math & Strings processing going on for it to happen!

      APK

      P.S.=> That's what I have literally sitting in front of me PeterB/DrPizza (& about what I am talking about in my last reply? Hey - Can't you read??)

      Read it & verify my statements on the pages they occurred on, they are there plain as day, & easily verified as truth!

      Hey - just as the results of Delphi whipping both VB & MSVC++ by entire ORDERS OF MAGNITUDE, overall no less from a respected publication in this field, programming. I'd say contrary evidence & the burden of proof is now on you, not I, for contrary results! apk

    41. Re:Let the raging tardfight commence by DrPizza · · Score: 1

      To quote from my post, "If you're just going to compare with VC6, which is a decade old next month, I'm not interested." In fact, given that you are quoting from the October 1997 issue, you're comparing against an even older compiler. Surely you must have something that's slightly more current to support your claim? At the very least, post the source code....

  2. Comparison with Allies cypher machine by Anonymous Coward · · Score: 3, Interesting

    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.

    1. Re:Comparison with Allies cypher machine by RebornData · · Score: 3, Informative

      Here's a recent cryptanalysis of SIGABA:

      http://www.sjsu.edu/mscs/research/projects/chan_wing-on.pdf

      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.

  3. I had to learn ADA in college by Anonymous Coward · · Score: 1

    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

    1. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0

      btw, that was my first exposure to the free software foundation. We used the gnu compiler to compile the ada programs. I never heard of the free software foundation. I remember speaking to the department head about "the Free Software Foundation." I remember him telling me, "you wont understand this now, but one can make money off of "free software." He was right, I didn't understand, but I do know. He didn't even use the "free speech / free beer" analogy. To my recollection he didn't give any more details at all. But if got my interest. I went online and started looking up the Free Software foundation. Then I somehow came across Linux. And here I am to day posting as an Anonymous Coward on Slashdot from my Gentoo box.

      Brian

    2. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0

      a late age geek! let me ask, while you are here how was having a girlfriend, back then?

    3. Re:I had to learn ADA in college by kellyb9 · · Score: 2, Funny

      Actually most colleges don't want to be typecasted a "C++ school" or an "ADA school". It's more important to learn data structures and theory. If you went to a good school, the language something is written is trivial, learning the syntax should not be that difficult.

    4. Re:I had to learn ADA in college by Shinmizu · · Score: 3, Funny

      Brian As a cat once told me, "Anonymous Coward, ur doin it wrong."
    5. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0, Flamebait

      I had a similar experience. My teacher told me FREE software could pay, and demonstrated by hooking me up with a paid summer job porting ghostscript to 64-bit alpha (at the time, GNU coding guidelines mandated 32-bit only, so it was a huge pain). They flew me to MIT to meet with RMS and the FSF people that summer. That really opened my eyes (not to mention my anus...). Now, years later I make a living writing "FREE" software and working as a gay prostitute.

    6. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0

      yep, you do the same operations across the board. The language is equivalent to a car. You get from point a to point b. All that matters is you use the right vehicle for the road you are on and your activity.

      Some change gears for you, others require a little more work but go faster. Reliability depends on the mechanic 8)

    7. Re:I had to learn ADA in college by ajs318 · · Score: 1

      Yes indeed. Programming languages are a lot like cars. Pascal is a driving school car with an extra brake and clutch on the passenger side. Modula-2 is a dodgem car with only one pedal and two gears and it isn't allowed on the main roads. ADA is a military staff car and if you want to drive it, you have to submit six different forms in triplicate to eighteen different departments, some of which are offsite, and then deal with at least one situation where you have to cross out your signature and sign the correction and one where you have to try to get some order forms out of the stationery stores without an order form for the order forms order. C is an engineer's car; it's held together with bits of string, there's no synchro so you have to double-declutch and there's a special technique for starting it, which nobody except its rightful owner has ever mastered. Python is a boy racer's car with blacked-out windows, fluffy dice, air horns, MAX POWER stickers and a riduculously loud stereo -- but its owner still hasn't got a girlfriend. Perl is a Ford Transit that's looked old and beaten-up since it was new, but it still gets you there.

      --
      Je fume. Tu fumes. Nous fûmes!
    8. Re:I had to learn ADA in college by nospam007 · · Score: 1

      Perl is a Ford Transit that's looked old and beaten-up since it was new, but it still gets you there.

      You forgot the 8track tape.

    9. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0

      and FORTRAN is an old Dodge pickup with a toolbox in the back, and BASIC is a Yugo with busted windshield.
      Enough frickin' car analogies for ya?

    10. Re:I had to learn ADA in college by Thiez · · Score: 1

      Assembler is a pair of shoes.

    11. Re:I had to learn ADA in college by ajs318 · · Score: 1
      You mean as in

      use Audio::Retro qw(cart_8trk)
      ?
      --
      Je fume. Tu fumes. Nous fûmes!
    12. Re:I had to learn ADA in college by Anonymous Coward · · Score: 0

      If you went to a good school, the language something is written is trivial, learning the syntax should not be that difficult.


      I take it you didn't exactly go to a "good school", given you do not seem to understand distinction between semantics and syntax...


      Syntax is, indeed, trivial, but complexity with programming languages really has to do with semantical features of the language, as well as usage patterns. Plus the fact that usually it's matter of choosing a platform (language + libraries + tools), not a language itself.

    13. Re:I had to learn ADA in college by kellyb9 · · Score: 1

      I take it you don't know how to read. I was supporting my previous point that the language something is written in is trivial because the syntax shouldn't be difficult to learn.

      P.S.: Register a goddamn username.

  4. Type Casting by hroo772 · · Score: 3, Interesting

    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.

    1. Re:Type Casting by egilhh · · Score: 2, Insightful

      What makes you think that Ada does not allow type conversion?
      "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...

    2. Re:Type Casting by Zoxed · · Score: 2, Informative

      > It doesn't allow for type conversion

      It does (unchecked_conversion), but never (AFAIK) *implicitly*.

    3. Re:Type Casting by morgan_greywolf · · Score: 2, Insightful

      languages which allow type conversions easily, which is nice for alot of people, but can definitely lead to issues when not accounted for.
      This is, IMHO, both Python's greatest strength and it's greatest weakness as a dynamically-typed language. Sometimes you can get bizarre results if you're not careful. OTOH, once you get the hang of it, you won't make those mistakes.
    4. Re:Type Casting by Anonymous Coward · · Score: 0

      Actually, Ada DOES allow type conversion - but only via "unchecked conversion" which puts all responsibility on the user as to policing what he/she is doing - i.e. giving the user a nice long rope on which to hang himself. :-) It definitely isn't "easy" to do, but the language (Ada 95) does provide this facility.

    5. Re:Type Casting by Anonymous Coward · · Score: 1, Interesting

      I disagree with the difficulty statement. Of all the languages I studied over the course of my computer science education Ada was by far the most straight foreward (as compared to Fortran [fucking columbs] and C/C++ and all the type casting) the only other language which might be somewhat comparable in ease of picking would be Lisp (fucking braces). Sure Ada might not lend itself to as much trickeration, but I'm not necessarily of the opinion that is a failing. Every Ada program I ever compiled performed perfectly within normal limits of my I guess Algebra. C? Oh hahaha. No, not so much.

      With Ada I found you either understood the problem at hand well enough to express it program logic or not. C invites one to make certain kinds of assumptions which might get your there, but might not always be reliable. But that's just my personal experience.

    6. Re:Type Casting by fitten · · Score: 2, Informative

      That was pretty much my experience... when you finally got the Ada program to compile, it worked... it just sometimes took a lot of work to get it to compile ;) Back then, you had to be explicit in everything you wanted to do, particularly type conversion... of course, you could get around that by just using everything the same type, but if you started out typing everything, if you got your program to compile, you knew that you were always calling the right functions and/or always doing the typecasts you needed to do.

    7. Re:Type Casting by drxenos · · Score: 1

      What the hell are you talking about? Ada most certainly does allow for type conversions. It just don't potentially unsafe ones implicitly.

      --


      Anonymous Cowards suck.
    8. Re:Type Casting by kst · · Score: 2, Informative

      >> It doesn't allow for type conversion

      > 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 languages.

      And yes, my experience is that it's more common in Ada than in, say, C, for a program to work correctly the first time you get it to compile successfully.

    9. Re:Type Casting by drxenos · · Score: 1

      Unchecked_Conversion reinterprets the bits of the argument as a value of the specified type.

      Maybe, maybe not. There are several rules that define what it does, and many that are implementation-specific.

      --


      Anonymous Cowards suck.
    10. Re:Type Casting by Anonymous Coward · · Score: 0

      Ada does support type conversion, it just does not do it implicitly. And unchecked_conversion is not necessarily needed, rather "Integer(float_value)" will convert between types. One annoyance is that you cannot mix types in an expression/equation so y:=10.0*x+3 is not valid since 3 is an integer. You'd need to use y:=10.0*x+3.0 or y:=10.0*x+float(3), both of which make the cast explicit to the compiler (and reader) but can muddy the code.

    11. Re:Type Casting by Have+Brain+Will+Rent · · Score: 1

      If you really want protection from typecasting then UTM(*) is the language you want to use!

      (*)Universal Turing Machine

      --
      The tyrant will always find a pretext for his tyranny - Aesop
  5. I like the choice. by DrWho520 · · Score: 4, Funny

    Use a masochistic language to break a German code...groovy.

    --
    The cancel button is your friend. Do not hesitate to use it.
    1. Re:I like the choice. by Chris+Burkhardt · · Score: 1

      Use a masochistic language to break a German code...groovy.

      He used Ada, not Groovy

      --
      "And there be unix which have made themselves unix for the kingdom of heaven's sake." - Matt. 19:12
  6. Wimp using ASCII by jellomizer · · Score: 2, Funny

    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.
    1. Re:Wimp using ASCII by 91degrees · · Score: 2, Informative

      But you're using an ASCII representation of a binary representation of an ASCII string!

      You're using ASCII twice so you're twice the wimp!

  7. ADA Resurgence? by Arakageeta · · Score: 5, Interesting

    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?

    1. Re:ADA Resurgence? by Anonymous Coward · · Score: 1, Funny

      Was ADA 2005 that good of a language revision?
      If you put lipstick on a pig, it's still a pig.
    2. Re:ADA Resurgence? by Skeptical1 · · Score: 5, Funny

      Ada is not a backward language. Ada is a palindrome.

    3. Re:ADA Resurgence? by hercubus · · Score: 1
      Oracle's procedural language (PL/SQL) is quite similar to ADA, PostreSQL's procedural language is quite similar to Oracle's


      so there's some ADA-influenced code out there running in non-military projects

      my managers keep trying to put me on the Java bandwagon -- i nod and smile, humor them, laugh at their jokes, slap them on the back, then when they're not looking i jump off and go back to my horrible, obsolete, verbose, backwards, sickly efficient ADA-like PL/SQL. joy

      --
      -- How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
    4. Re:ADA Resurgence? by Anonymous Coward · · Score: 3, Interesting

      Ada was considered too complex. By now C++ is orders of magnitudes more complex and still does not do half the things (Ada has had a sane integrated threading model that could be used for message passing constructs, namely actual OO programming techniques, pretty much from the start).

      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 everything Unix does, except doing it all wrong and contorted and only borderline operative.

    5. Re:ADA Resurgence? by Barromind · · Score: 5, Informative

      Ada 2005 is comparatively minor (although some changes, like interfaces, are not that minor). The real improvement was Ada 95. The 95 revision managed to standardize many things that C++/java are now settling.

      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 :P? And that inter-thread communication is really well done?

    6. Re:ADA Resurgence? by ChrisA90278 · · Score: 1

      It is good to program in a language designed for the task at hand. 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. So Ada will be a minority language.

      Ada will always be used more by projects where the cost of software error is very high.

    7. Re:ADA Resurgence? by kst · · Score: 1

      Ada isn't just a palindrome. It's a hexadecimal palindrome. How many other languages can make that claim?

      (Well, six that I can think of: B, C, D, E, F, and my own 99.)

    8. Re:ADA Resurgence? by surfingmarmot · · Score: 1

      I think the PR spike may indicate Microsoft is behind an astro-turf campaign to raise awareness of Ada in support of their unannounced but soon to beta Visual Ada Plus Professional Platinum Edition 2008 for the Web.

    9. Re:ADA Resurgence? by TeknoHog · · Score: 1

      Heh, sounds a lot like Fortran, for instance with the built-in concurrency. The real goodies came with the F90 standard, while GCC has enabled them only fairly recently. And people associate the name with something old and clunky :-/

      --
      Escher was the first MC and Giger invented the HR department.
    10. Re: ADA Resurgence? by Black+Parrot · · Score: 1

      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 multithreading are integral to the language - not a common thing when it came out in '83.

      And when other programmers say $FAVORITELANGUAGE has strong typing, Ada programmers laugh.

      IIRC it's used on the F-22, and an Ada subset is used to program the Space Shuttle.

      It does not guarantee bug-free programs, but it tends to move bug discovery forward. I.e., due to the strictness it finds lots of stuff at compile time that in most other languages you wouldn't notice until run time, and finds things at run time that in most other languages you wouldn't notice until you discovered that your application had been sowing garbage among its results for the past three years of deployment.

      Regarding the Arianne V, see Babbage's remark to the question he got when he described his machine to the House of Lords.
      --
      Sheesh, evil *and* a jerk. -- Jade
    11. Re: ADA Resurgence? by Black+Parrot · · Score: 2, 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.
      --
      Sheesh, evil *and* a jerk. -- Jade
    12. Re:ADA Resurgence? by samkass · · Score: 1

      I thought the same thing except that it sounded like Java to me. Java's definitely a language that's targeted more towards folks willing to think than just sit and hack, and is far more introspect-able, thus moving significantly more errors to code/analysis time rather than runtime. (And it has concurrency built in to the language and standard libraries.)

      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 about C/C++.

      --
      E pluribus unum
  8. Too bad he did not mention his choice of NetBSD by Ober · · Score: 1, Informative

    Really good interview found here.
    http://www.netbsd.org/gallery/schueth-interview.html

    1. Re:Too bad he did not mention his choice of NetBSD by Anonymous Coward · · Score: 0

      Why was he complaining about O_LARGEFILE? I've never used open() directly. The function fopen() should be able to handle large files and that is available from LIBC.

  9. Comment removed by account_deleted · · Score: 3, Funny

    Comment removed based on user account deletion

  10. Compiler price.. by renoX · · Score: 5, Interesting

    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++..

    1. Re:Compiler price.. by Anonymous Coward · · Score: 0

      There has been a free Ada compiler (GNAT) available since 1995, which is currently part of the GNU compiler collection.

    2. Re:Compiler price.. by renoX · · Score: 1

      Yes I know, but GNU C++ is from 1987..
      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.

    3. Re:Compiler price.. by Anonymous Coward · · Score: 0

      what and let those pesky ruskies get to use it too?

    4. Re:Compiler price.. by Anonymous Coward · · Score: 0

      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++.. back before ada95--the only game in town was vertix and yesit was expensive compared to university-free c++
  11. Software and recorded audio can be found here by puddles · · Score: 2, Informative

    http://www.schlaupelz.de/SZ42/SZ42_software.html

  12. Another interview by egilhh · · Score: 1, Informative

    There's another interview with him at adacore.com (makers of the GNAT compiler)

    http://www.adacore.com/home/ada_answers/lorenz-code/

  13. hmm. by apodyopsis · · Score: 3, Interesting

    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.

    1. Re:hmm. by Anonymous Coward · · Score: 0

      "should not of won"

      What the hell does that mean?

    2. Re:hmm. by Anonymous Coward · · Score: 0
      Some people don't seem to know what they're saying. Probably here he meant "Shouldn't've won" which does sound like "Should not of won" but really means "Should not have won".

      Then again, it's still a sort of random conjecture on his part.

    3. Re:hmm. by Anonymous Coward · · Score: 0

      mod -1 grammar-nazi flamebait

    4. Re:hmm. by TeknoHog · · Score: 1

      "should not of won" What the hell does that mean?

      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."

      --
      Escher was the first MC and Giger invented the HR department.
  14. Programmer not langauge. by Anonymous Coward · · Score: 1, Insightful
    ADA being a government/military based languge I am not to suprised that it won the competition decifering a goverment/military code.

    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.

    1. Re:Programmer not langauge. by jellomizer · · Score: 4, Informative

      Well it is more complex then that. Different language syntax can help or hinder someones performance for a particular job. For example old C didn't have much to say in terms of string handling if you wanted to use a string you needed to do a Char *VarName then when working with that languge you need to insure memory managment and that you don't create buffer overflows..... A big pain if you didn't make youself some good String functions you spend a lot of your programming just making sure your program doesn't blow up. vs. Newer Languges And the String class in C++ where you can concatinate get sub strings parse.... it makes doing such job much easier and a lot less anoying. Most well programed languges will not prevent you from getting anything done. However there is the Human element of the equasion if the syntax is to difficult for a particular job then the person will tire out and make more mistakes. The winner of this competition felt that ADA syntax offered him the ability to solve the problem better, thus helped him to win.

      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.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Programmer not langauge. by Lodragandraoidh · · Score: 2, Interesting

      If I could type 90 wpm and never make a mistake, I'd be using Ada or Fortran today.

      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

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    3. Re:Programmer not langauge. by gigabyteme · · Score: 2, Informative

      If I could type 90 wpm and never make a mistake, I'd be using Ada or Fortran today.
      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 poetry and reads like natural language. Anyone can easily program in Ada as long as they understand data types. It is possible to code 1000s of new lines between compiles and have it compile perfectly on the first shot. I've done it and I'm definately not a "superstar programmer".
    4. Re:Programmer not langauge. by Anonymous Coward · · Score: 0

      Talking about parsing and making the job "easier and a lot less annoying," maybe if you would learn some basic grammar, spelling, and punctuation it wouldn't be such a damned difficult and annoying job trying to parse your writing.

    5. Re:Programmer not langauge. by jellomizer · · Score: 1

      nevar!

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    6. Re:Programmer not langauge. by Lodragandraoidh · · Score: 1
      I think much of the tension between adherents of Ada and other compiled languages, and the newer languages has to do with strictures and philosophy surrounding data types and the overhead, or lack thereof, to manage same.

      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++). Simply put, 'Duck' typing makes no assumptions (in fact has no knowledge) of the type of a given variable - instead it assumes that there is a method available to perform a given action on the variable, and if not - raises a runtime error - which can be handled by the application. Python's implementation of 'Duck' typing is also strongly typed, as a result. This has helped me immensely - things that I used to be able to do (even if by accident or omission) in Perl or C, are impossible in Python.

      This allows a developer to safely code very quickly, and refactor and maintain code easily. In the future, I could see where more languages handle much of the duplication required of traditional compiled languages behind the scenes in ways that are fool proof; we've already seen this with garbage collection systems used in various languages to avoid memory leak conditions - and as languages get more mature there will be opportunities in other areas.

      As a result I think Ada and the like will remain niche players, and more advanced languages will evolve to provide secure and viable code approaching the level of consistency and error free operation of the old languages.

      My original comment was an oblique response to this agenda put forward in the article:

      Computer geeks who can afford learning a language simply because it is cool have now access to an Ada compiler. My hope is that some day they will grow into positions in IT industry and bring Ada into the widespread use that the language deserves, without having to convince anybody. -
       
        Joachim Schüeth

      I disagree with the author: there is no reason to bring Ada and similar old languages into widespread use. The energy needs to be put into finding ways to make programmers more efficient by leveraging the computer to move forward - much as we have seen with python and similar languages. Just as assemblers gave way to compilers, and structured languages gave way to OO and hybrid languages, error creation as a symptom of the foibles of a given language will be taken out of the programmers hands.
      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  15. Concise??!! by Lodragandraoidh · · Score: 2, Insightful

    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
    1. Re:Concise??!! by hey! · · Score: 5, Funny

      I can't imagine using the words concise and Ada in the same sentence.


      Perhaps you should read what you just wrote.
      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    2. Re:Concise??!! by LynnwoodRooster · · Score: 1

      The choice was obvious! What better way to solve a cypher contest but to code in a language that is pretty much a cypher to everyone else?

      --
      Browsing at +1 - no ACs, I ignore their posts. So refreshing!
    3. Re:Concise??!! by Lodragandraoidh · · Score: 1

      Glad you found it mildly amusing. Anything to please the crowd.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    4. Re:Concise??!! by Haeleth · · Score: 1

      Which of Brainfuck, Malbolge, and Perl did you have in mind?

    5. Re: Concise??!! by Black+Parrot · · Score: 2, 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 write clean complex programs in the language of your choice; it's just that Ada won't let you be a slouch. It makes you do the details right, but once you've done that you can forget the details and deal with concepts instead.

      Admittedly, I used it at the hobbyist level for several years before I realized how to do that.
      --
      Sheesh, evil *and* a jerk. -- Jade
  16. other factors often dominate language choice by _|()|\| · · Score: 4, 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.

    1. Re:other factors often dominate language choice by hey! · · Score: 4, Insightful

      Well libraries. That's a huge part of language choices these days; you really choose frameworks or libraries and live with the language as a consequence. A lot of what we do these days is glue stuff together.

      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.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    2. Re:other factors often dominate language choice by ChrisA90278 · · Score: 1

      "when it comes to my first choice, independent of problem domain,"

      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 problem to be solved in large scale software is getting the various parts to fit together. Ada it turns out is very good at speciying interfaces and isolating the effect of a change. This last part is realy the most importent. You need to have high certainty that a change some place doe not cause a bug some place else.

  17. What are the good ones? by Shivetya · · Score: 1

    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.
    1. Re:What are the good ones? by glop · · Score: 2, Informative

      Hi,

      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...

    2. Re:What are the good ones? by DdJ · · Score: 3, Informative

      Can't give you advice on the PC, but on the Mac, the default compiler is the GNU compiler suite. That's where the C, C++, and Objective-C compilers come from.

      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.

    3. Re:What are the good ones? by konohitowa · · Score: 1
    4. Re:What are the good ones? by Anonymous Coward · · Score: 0

      This is tangential to the discussion, but in C (as of C-99), the "restrict" keyword lets you get rid of aliasing issues. You have to be aware of the problem though, which most programmers are not, unless the program is extremely performance sensitive.

  18. You couldn't BE more wrong by MosesJones · · Score: 4, Insightful

    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
    1. Re:You couldn't BE more wrong by Anonymous Coward · · Score: 0

      >those strict rules help you because you spend miles less time debugging stuff you don't understand

      Well, yes, it's clear why you need this sort of help. Time isn't measured in miles, dear.

    2. Re:You couldn't BE more wrong by Profane+MuthaFucka · · Score: 1

      Right. It's measured in parsecs.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    3. Re:You couldn't BE more wrong by Abcd1234 · · Score: 1

      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?

      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.

    4. Re:You couldn't BE more wrong by Anonymous Coward · · Score: 0

      This is a process issue, if I spend the time writing adequate unit tests as I write my code I can virtually guarantee correct operation the first run.

      I also guarantee that I can find plenty of code monkeys that will compile programs that "fall over" despite being written in Ada and managing to compile.

      I did not RTFA so I'm not sure to what the OP is referring with his whole type conversion argument. I strongly suspect it's something pulled out of his you know what that sounds knowledgeable, but in a Cliff Claven sort of way. If it's a reference to the actual article, well then great, he should perhaps indicate as such given /. tradition.

    5. Re:You couldn't BE more wrong by Anonymous Coward · · Score: 0

      Time to a working solution may vary, but there's no excuse for one solution to be less understandable than another.

      Would you agree that code written in Malboge might be harder to follow?

    6. Re:You couldn't BE more wrong by Abcd1234 · · Score: 1

      I believe I said "any of those languages", not "any language ever invented by man".

    7. Re: You couldn't BE more wrong by Black+Parrot · · Score: 1

      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.
      --
      Sheesh, evil *and* a jerk. -- Jade
    8. Re:You couldn't BE more wrong by bm_luethke · · Score: 1

      "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."

      I would say you are *both* wrong - though neither completely wrong (you both have points).

      For many people languages like PERL that just sorta "do the right thing" are quite beneficial. It allows them to quit focusing on details such as type or even declaring a variable. A lot of beginners are this way - most fairly simple algorithms are easier to implement on weakly typed languages because many of the finer details just happen. These people are called programmers - they just want to get the job done and to hell with everything else.

      However, hopefully at some point in your career you advance past that stage and become a "software engineer". For those of us doing that enforced coding rules are *really* nice. They catch all sorts of errors and, because the system follows easy, strict, and generally orthogonal rules it is both quite powerful and not prone to many errors in the final product. For a pure software engineer this is a Good Thing.

      For most of us we are somewhere in between (I find myself strongly on the Software Engineering side and tend to agree more with you). Few are truly just a programmer (code monkey) or are purely a Software Engineer that doesn't worry much about implementation.

      Ada, and other languages out there, are much stronger towards the "software engineer" aspect of our industry. Another language I fell in love with (and have yet to ever use professionally) is Eiffel. Like ADA it has some great concepts that I carried over to other languages.

      I also tend to agree that these are good languages to teach in because the promote (and some say enforce) good programming standards. If you can do that then you have the foundation to scale back from them as needed and will do MUCH better in the medium to long term. However, I do agree with the parent's assertion that most people have more initial trouble with strict programming standards.

      To give a personal anecdote - I had one of my professors remark after hearing me rant about PERL doing what it thought I wanted to do instead of telling me that the statement didn't make much sense "You are becoming a software engineer". Thinking back to when I was a freshman PERL's behavior would have been welcomed as it would have mostly "fixed" my mistakes, as a senior or grad student it was irritating because it was hard to control.

      --
      ------- Sorry about the spelling, I suffer from two problems. Dyslexia makes it difficult to spell well, lazy makes it
    9. Re:You couldn't BE more wrong by Anonymous Coward · · Score: 0

      +1

      I came from a University that taught Ada95 as our first language. Brilliant move.

    10. Re:You couldn't BE more wrong by MosesJones · · Score: 1

      Why not? Or does Ada magically make complex algorithms more comprehensible?

      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.

      --
      An Eye for an Eye will make the whole world blind - Gandhi
    11. Re:You couldn't BE more wrong by Anonymous Coward · · Score: 0

      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.


      I call bullshit. Have ever even used Java? It is strongly typed language, with runtime type info. So there is very little that c/c++ and Java have in common here. I just do not see this particular problem you allege.


      And as to complex code: if it is truly complex, there is little programming language can do to help. If it's hard to grasp in Ada, it'll be hard to grasp in any other general-purpose programming language. Only DSLs can help here.

    12. Re:You couldn't BE more wrong by Abcd1234 · · Score: 1

      Wow! You've presented a useless argument backed by nothing, and then claimed victory! Congratulations! My mind truly boggles at your boundless intellect.

      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.

    13. Re:You couldn't BE more wrong by MosesJones · · Score: 1

      Java is terse in comparison to languages like Pascal, Ada, Eiffel, etc it might not be terse in comparison with Perl or Brainfuck but that isn't exactly a bar that people should want to go under.

      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 improve my clear lack of understanding in language design.

      --
      An Eye for an Eye will make the whole world blind - Gandhi
  19. Hey me too! Freshman year. by Anonymous Coward · · Score: 0

    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.

  20. Horses for courses by Viol8 · · Score: 4, Interesting

    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.

  21. HDL by Anonymous Coward · · Score: 2, Interesting

    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.

  22. At the moment, software developers are like masons by Colin+Smith · · Score: 1

    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
  23. Ada Boy!! by n1ckml007 · · Score: 1

    Ada Boy!!

  24. Churchill didn't order it scrapped... by Anonymous Coward · · Score: 2, Interesting

    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 :)

    1. Re:Churchill didn't order it scrapped... by Charbox · · Score: 1

      [citation needed]

  25. Re:I, for one... (obligatory) by Anonymous Coward · · Score: 0

    Big beautiful all-American football hero type here. You're welcome.

  26. Planck quote by nguy · · Score: 1

    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.

    1. Re:Planck quote by Black+Parrot · · Score: 1

      Ada is neither You, of course, are an expert on the topic?
      --
      Sheesh, evil *and* a jerk. -- Jade
    2. Re:Planck quote by nguy · · Score: 1

      You, of course, are an expert on the topic?

      Yes.

  27. I wonder ... by kst · · Score: 2, Interesting

    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.

  28. Re:Horses for courses - please explain by mykepredko · · Score: 1

    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

  29. Sounds like Object Pascal by acheron12 · · Score: 1
    From TFA:

    That any discrete type can be used as an array index type, not just the predefined integer type, is a feature that sets Ada aside from most languages that I have seen so far. Pascal does that. With the Object Pascal extensions, it does most of the other things he mentioned too.
    --
    there is no god but truth, and reality is its prophet
    1. Re:Sounds like Object Pascal by Anonymous Coward · · Score: 0
    2. Re:Sounds like Object Pascal by Anonymous Coward · · Score: 0

      Ada was derived from Pascal, so that's not a surprise. People in this thread have talked about Ada being a good teaching language - that's probably because Pascal was meant to be a teaching language.

  30. Obvious.. by jovius · · Score: 2, Informative

    He obviously settled on Ada, because Ada allowed him to implement.

  31. Re:Horses for courses - please explain by lordholm · · Score: 1

    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!"
  32. Re:I, for one... (obligatory) by Anonymous Coward · · Score: 0

    Look, CmdrTaco, I like slashdot, I spend a lot of time on slashdot. I don't really care what you do in your offtime, but this is giving me a stiffy, and I'm at work.

  33. Re:Horses for courses - please explain by default+luser · · Score: 2, Informative

    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.

  34. Re:Horses for courses - please explain by lordholm · · Score: 2, 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."

    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!"
  35. Re:Horses for courses - please explain by Z34107 · · Score: 1

    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

    variable = variable & mask;
    - 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
  36. Re: Compilerprice.. by Black+Parrot · · Score: 1

    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 back the mandate.

    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
  37. Re:At the moment, software developers are like mas by Black+Parrot · · Score: 1

    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...
    --
    Sheesh, evil *and* a jerk. -- Jade
  38. Now that's strong typing! by ClosedSource · · Score: 1

    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.

  39. Re:Horses for courses - please explain by sp332 · · Score: 1

    Since C99 there is a "bit" data type. It's called bool.

  40. Re:Horses for courses - please explain by Viol8 · · Score: 1

    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.