Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A Programming Question (Now That Chris is On Vacation)

A Programming Question (Now That Chris is On Vacation)

Scheduled Pinned Locked Moved The Lounge
questionhtmlcom
32 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Bassam Abdul Baki

    1. Looking at ProjectEuler and the OEIS website, it seems that some programming languages offer shorter methods of doing something (mathematical) (and I'm not just talking about the obfuscatory syntax). One language that comes to mind is J; another is Maple. It seems that you can do a lot with just a few short calls. Why isn't that added to most languages? Is there a repository that adds the most optimal method to do something into a library for that language so that it may be used? 2. What is the longest running program? I assume the programs developed for Voyager 1 and 2 are pretty much up there. What other types are there? Is there a never-ending program that is calculating all the primes and storing them in a library somewhere? 3. Happy January 9 = 1/9 = 3/33 = 3/27 = March 27!

    Web - BM - RSS - Math - LinkedIn

    K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #7

    #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

    TTFN - Kent

    P B R N F 6 Replies Last reply
    0
    • K Kent Sharkey

      #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

      TTFN - Kent

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #8

      Kent Sharkey wrote:

      APL's matrix manipulation as another example

      BASIC-PLUS -- which was my first introduction to programming, on a PDP-11 in 1983 -- also has matrix operations built in.

      U 1 Reply Last reply
      0
      • B Bassam Abdul Baki

        1. Looking at ProjectEuler and the OEIS website, it seems that some programming languages offer shorter methods of doing something (mathematical) (and I'm not just talking about the obfuscatory syntax). One language that comes to mind is J; another is Maple. It seems that you can do a lot with just a few short calls. Why isn't that added to most languages? Is there a repository that adds the most optimal method to do something into a library for that language so that it may be used? 2. What is the longest running program? I assume the programs developed for Voyager 1 and 2 are pretty much up there. What other types are there? Is there a never-ending program that is calculating all the primes and storing them in a library somewhere? 3. Happy January 9 = 1/9 = 3/33 = 3/27 = March 27!

        Web - BM - RSS - Math - LinkedIn

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #9

        Chris's eyes and ears are everywhere.

        Peter Wasser "The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts." - Bertrand Russell

        1 Reply Last reply
        0
        • B Bassam Abdul Baki

          Did you actually read it? Just having nonsensical thoughts.

          Web - BM - RSS - Math - LinkedIn

          N Offline
          N Offline
          Nelek
          wrote on last edited by
          #10

          Did you actually read him?... His haven't much more sense than yours :laugh: :laugh:

          M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

          1 Reply Last reply
          0
          • B Bassam Abdul Baki

            1. Looking at ProjectEuler and the OEIS website, it seems that some programming languages offer shorter methods of doing something (mathematical) (and I'm not just talking about the obfuscatory syntax). One language that comes to mind is J; another is Maple. It seems that you can do a lot with just a few short calls. Why isn't that added to most languages? Is there a repository that adds the most optimal method to do something into a library for that language so that it may be used? 2. What is the longest running program? I assume the programs developed for Voyager 1 and 2 are pretty much up there. What other types are there? Is there a never-ending program that is calculating all the primes and storing them in a library somewhere? 3. Happy January 9 = 1/9 = 3/33 = 3/27 = March 27!

            Web - BM - RSS - Math - LinkedIn

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #11
            1. Apparently, it's MOCAS[^] - started running in 1958 and still going ... 3) Only in backwards colonies. The real world writes it 27/3/.... or ....-03-27

            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            D P B K 4 Replies Last reply
            0
            • P PIEBALDconsult

              Kent Sharkey wrote:

              APL's matrix manipulation as another example

              BASIC-PLUS -- which was my first introduction to programming, on a PDP-11 in 1983 -- also has matrix operations built in.

              U Offline
              U Offline
              U G Leander
              wrote on last edited by
              #12

              So has FORTRAN 90, the long-running vehicle :-D

              1 Reply Last reply
              0
              • OriginalGriffO OriginalGriff
                1. Apparently, it's MOCAS[^] - started running in 1958 and still going ... 3) Only in backwards colonies. The real world writes it 27/3/.... or ....-03-27

                Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                D Offline
                D Offline
                Daniel Pfeffer
                wrote on last edited by
                #13

                OriginalGriff wrote:

                Apparently, it's MOCAS[^]

                Perhaps the question should have been "running substantially unchanged, on the same hardware". The IBM 2098 E-10 was only first available in 2008, to say nothing of the upgrades to the interface etc.

                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff
                  1. Apparently, it's MOCAS[^] - started running in 1958 and still going ... 3) Only in backwards colonies. The real world writes it 27/3/.... or ....-03-27

                  Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                  P Offline
                  P Offline
                  PeejayAdams
                  wrote on last edited by
                  #14

                  OriginalGriff wrote:

                  1. Apparently, it's MOCAS[^] - started running in 1958 and still going ...

                  If it ain't broke ... But I am wondering what happened with MOCAS and the Millennium bug.

                  Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                  K 1 Reply Last reply
                  0
                  • K Kent Sharkey

                    #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

                    TTFN - Kent

                    B Offline
                    B Offline
                    Bassam Abdul Baki
                    wrote on last edited by
                    #15

                    1. Makes you wonder what users are actually programming. Programming for the sake of programming or actually trying to solve problems through automation. 2. Cool. Never heard of it before. I know the IMDB website's data is based of the old newsgroup, but that's data. 3. Are you familiar with Euler's [Equal Sums Of Like Powers](http://euler.free.fr/)?

                    Web - BM - RSS - Math - LinkedIn

                    1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff
                      1. Apparently, it's MOCAS[^] - started running in 1958 and still going ... 3) Only in backwards colonies. The real world writes it 27/3/.... or ....-03-27

                      Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                      B Offline
                      B Offline
                      Bassam Abdul Baki
                      wrote on last edited by
                      #16

                      1. Bug without this. Couldn't start from 2. 2. Wow! No wonder we're in debt. :D 3. Never! The only other correct way of writing it is YYYY-MM-DD.

                      Web - BM - RSS - Math - LinkedIn

                      OriginalGriffO 1 Reply Last reply
                      0
                      • P PeejayAdams

                        OriginalGriff wrote:

                        1. Apparently, it's MOCAS[^] - started running in 1958 and still going ...

                        If it ain't broke ... But I am wondering what happened with MOCAS and the Millennium bug.

                        Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain

                        K Offline
                        K Offline
                        kalberts
                        wrote on last edited by
                        #17

                        Millenium bug? A program storing dates either with 4 digit year (or actually anything else than 2 digit "mod 100" style) encountered no problems with the new millennium. Assuming, of course, that the OS didn't crash or deliver the wrong values. My guess is that the OS used in 1958 was so primitive that it had few if any built-in calendar-related functions beyond reporting the current date and time. As long as that report didn't use a mod 100 year value, you'd be fine. Related anecdote: The University of Copenhagen ran a huge Univac 1100 mainframe, from the days when CMOS and battery backed up real-time clocks had't been invented yet. So if the machine was rebooted (which could be due to normal maintenance), the operator had to set the current time manually. At one reboot, the operator happended to mistype the year, setting the machine 10 years into the future. It wouldn't be that dramatic, if they hadn't - before the mistake was discovered - run the program deleting all files that hadn't been accessed for six months. ("On a clear disk, you can seek forever"...) There is a second part to this story: The data wasn't actually deleted. Storage for large systems was heavily tape based in those days. Univac had a very compact format where all the metadata, the catalog information with pointers to the data blocks, were kept on disk. Only the data blocks themselves were written to tape ... without any metadata. So all the data blocks were there, but with no pointers to them. No indication of which data blocks belonged to which file. (This was a well known "real life" story in my student days - my U had two huge Univac 1100 mainframes; the operators loved to tell about this incident. I never saw any "hard" documentation. If anyone can point me to reliable sources, I'd be happy!)

                        OriginalGriffO 1 Reply Last reply
                        0
                        • K kalberts

                          Millenium bug? A program storing dates either with 4 digit year (or actually anything else than 2 digit "mod 100" style) encountered no problems with the new millennium. Assuming, of course, that the OS didn't crash or deliver the wrong values. My guess is that the OS used in 1958 was so primitive that it had few if any built-in calendar-related functions beyond reporting the current date and time. As long as that report didn't use a mod 100 year value, you'd be fine. Related anecdote: The University of Copenhagen ran a huge Univac 1100 mainframe, from the days when CMOS and battery backed up real-time clocks had't been invented yet. So if the machine was rebooted (which could be due to normal maintenance), the operator had to set the current time manually. At one reboot, the operator happended to mistype the year, setting the machine 10 years into the future. It wouldn't be that dramatic, if they hadn't - before the mistake was discovered - run the program deleting all files that hadn't been accessed for six months. ("On a clear disk, you can seek forever"...) There is a second part to this story: The data wasn't actually deleted. Storage for large systems was heavily tape based in those days. Univac had a very compact format where all the metadata, the catalog information with pointers to the data blocks, were kept on disk. Only the data blocks themselves were written to tape ... without any metadata. So all the data blocks were there, but with no pointers to them. No indication of which data blocks belonged to which file. (This was a well known "real life" story in my student days - my U had two huge Univac 1100 mainframes; the operators loved to tell about this incident. I never saw any "hard" documentation. If anyone can point me to reliable sources, I'd be happy!)

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #18

                          Trust me, back in those days, a mod 100 year would have been used - memory was small and damn expensive - you wouldn't waste a byte per date! (Your code might have worked with year >= 50 == 1900 + year, year < 50 == 2000 + year but in the fifties that was very, very unlikely - that was a big part of the Millenium Bug) Bear in mind that in those days its was mostly punch cards - which had 12 rows so a month could be encoded in a single digit to save space! :laugh:

                          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          G K J 3 Replies Last reply
                          0
                          • B Bassam Abdul Baki

                            1. Bug without this. Couldn't start from 2. 2. Wow! No wonder we're in debt. :D 3. Never! The only other correct way of writing it is YYYY-MM-DD.

                            Web - BM - RSS - Math - LinkedIn

                            OriginalGriffO Offline
                            OriginalGriffO Offline
                            OriginalGriff
                            wrote on last edited by
                            #19
                            1. ...and uses UTC... :-D

                            Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              Trust me, back in those days, a mod 100 year would have been used - memory was small and damn expensive - you wouldn't waste a byte per date! (Your code might have worked with year >= 50 == 1900 + year, year < 50 == 2000 + year but in the fifties that was very, very unlikely - that was a big part of the Millenium Bug) Bear in mind that in those days its was mostly punch cards - which had 12 rows so a month could be encoded in a single digit to save space! :laugh:

                              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                              G Offline
                              G Offline
                              GKP1992
                              wrote on last edited by
                              #20

                              Now that is something I never thought about. :omg:

                              1 Reply Last reply
                              0
                              • K Kent Sharkey

                                #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

                                TTFN - Kent

                                R Offline
                                R Offline
                                realJSOP
                                wrote on last edited by
                                #21

                                I don't think a "system" counts as a program. Granted, SABRE is possibly the oldest civilian system in existance, but the longest continuously running software probably goes to NASA's various interstellar probes. Earth-bound software is replaced too frequently to even come close to the NASA stuff. 41 years (as of this August/September) and counting... They expect the probes to lose power some time in 2025.

                                ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                -----
                                You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                -----
                                When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                1 Reply Last reply
                                0
                                • K Kent Sharkey

                                  #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

                                  TTFN - Kent

                                  N Offline
                                  N Offline
                                  Nagy Vilmos
                                  wrote on last edited by
                                  #22

                                  MATLAB, [curses and spits on the floor] is built around matrices and is damned good for that [curses again]. Any IO outside of its ecosystem is totally fubar though.

                                  veni bibi saltavi

                                  1 Reply Last reply
                                  0
                                  • OriginalGriffO OriginalGriff

                                    Trust me, back in those days, a mod 100 year would have been used - memory was small and damn expensive - you wouldn't waste a byte per date! (Your code might have worked with year >= 50 == 1900 + year, year < 50 == 2000 + year but in the fifties that was very, very unlikely - that was a big part of the Millenium Bug) Bear in mind that in those days its was mostly punch cards - which had 12 rows so a month could be encoded in a single digit to save space! :laugh:

                                    Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                    K Offline
                                    K Offline
                                    kalberts
                                    wrote on last edited by
                                    #23

                                    Naah... You worry about those two bytes when you store time stamps thousands or millions of records. An OS that provides a single "current date" value does not chop off two digits to save two bytes in the single date value presented to applications. The chopping off would take far more than two bytes of code! I have worked with several OSes from the early 1970s, and they all provided 4 digit year values. If two digits were chopped off, that was done by the application, not by the real time clock in the OS. I rather question whether a 1958 vintage system really had a real time clock at all, and an OS that at all provided the current time in a dd-mm-yyyy format. My guess is that after reboot, the operator could set the startup date/time in a single well known location, alongside with a register counting machine cyles since startup. Remember that machines of those days did not have byte addressing, and yyyymmdd in decimal format fits well within a word, even on 32 bit machines (most were 36 bits at that time). Storing yymmdd in a single word saved no space compared to yyyymmdd. Of course MOACS itself could choose to chop off digits to save space in a million of records, probably to save magnetic tape. I doubt that it held zillions of records in memory at the same time! Also note that it is written in COBOL, The Great Promoter of BCD - PACKED DECIMAL uses 4 bits to the digit, so only a single byte would be saved by a yy format. BCD could save quite a few bytes per accounting record with lots of numeric values. Once you half the space for numeric entities by using BCD, chances are less that you go further to save a single byte by using mod 100 year values. Anyway: In lots of applications, a time stamp is just a label; you don't do arithmetic on in. In the days of Pascal, with enumeration values as a primary non-numeric data type, I was arguing with fervor that April is not half of September, but followers of this new "C" language protested: Why not? As long as a date is just a label, there is no millenium problem. A person reading the label will know from the context that "95" is ten years before "05" rather than ninety years later. When we entered the new millenium, quite a few people (not limited to diehard preppers!) had filled their basements with canned food and water bottles, bought freestanding propane heaters etc. expecting the entire society infrastructure to break down at midnight. We know it didn't happen, even though numerous computer systems were NOT updated to handle year 2

                                    1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff
                                      1. Apparently, it's MOCAS[^] - started running in 1958 and still going ... 3) Only in backwards colonies. The real world writes it 27/3/.... or ....-03-27

                                      Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                      K Offline
                                      K Offline
                                      kalberts
                                      wrote on last edited by
                                      #24

                                      I was so happy when 2012 was over! I did loose a lot of hair from intense head scratching over dates like 01/02/03 or 01-02-03, which has at least three different interpretations. 01/02/13 reduced it to two, and the slashes raised the probability of one of them. 01-02-13 rasised the probability of the other. With 13-01-02, you could almost be sure of the interpretation, 13/01/02 tended towards the other, but with less certainty. Still, you can't know for sure unless you have two parts of 13+, but the period from 2001 to 2012 was really a nightmare wrt. interpreting dates. I really wish that the transition to ISO 8601 (i.e. yyyy-mm-dd style) would go faster! I know that "International Standards Organization", ISO, makes a lot of USAnians stall: It isn't invented here! But doesn't the American Standards Asocciation provide an American standard with the same contents, but a True American Standard reference that can be used to promote it in the USA?

                                      M 1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        Trust me, back in those days, a mod 100 year would have been used - memory was small and damn expensive - you wouldn't waste a byte per date! (Your code might have worked with year >= 50 == 1900 + year, year < 50 == 2000 + year but in the fifties that was very, very unlikely - that was a big part of the Millenium Bug) Bear in mind that in those days its was mostly punch cards - which had 12 rows so a month could be encoded in a single digit to save space! :laugh:

                                        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                        J Offline
                                        J Offline
                                        jsc42
                                        wrote on last edited by
                                        #25

                                        Two bytes for the year to hold only two digits was common in the commercial world using languages like COBOL and PL/1, but even COBOL had a condensed mode (forget the exact keyword) to save as BCD which gave two digit in a single byte. In the scientific world we used languages like FORTRAN that use binary values so a single byte could hold up to 256 values so it was common to use 1900 + byte for the year which was (and still is) OK from 1900 to 2255. The ICL 1900 series dates were in the format ddmmmyy but they had the convention that yy >= 65 represented 1900 + yy, yy < 65 represented 2000 + yy. So, if there are any ICL 1900s still around, they are safe.

                                        K 1 Reply Last reply
                                        0
                                        • K Kent Sharkey

                                          #1. It is odd that some language-specific features don't spread more broadly (APL's matrix manipulation as another example). I guess that the general language users don't need them, so it doesn't migrate into the more common languages. Some stuff does migrate (quicksorts and whatnot), so I assume it's just need vs. experimental languages. #2. I know I had asked around when I worked at a different place, and Sabre (computer system) - Wikipedia[^] was listed as one of the oldest still running (albeit likely updated). #3. Need to work that into a x^3+Y^3+z^3 format ;)

                                          TTFN - Kent

                                          F Offline
                                          F Offline
                                          Forogar
                                          wrote on last edited by
                                          #26

                                          Wow! Someone else has come across APL! No-one else I have spoken too recently has ever heard of APL.

                                          - I would love to change the world, but they won’t give me the source code.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups