Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: About java program. Date: Fri, 21 Jun 2013 23:42:21 +0000 (UTC) Organization: A noiseless patient Spider Lines: 68 Message-ID: References: <324f929f-772e-4004-81e1-6b454cdae794@googlegroups.com> <19wnriq53qxel.u9rt8wy6z52g.dlg@40tude.net> <6euehy3ijswn.e08p5nxwbfbf.dlg@40tude.net> <11vzgu1flpfc0$.fjdyohv4dmbv.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 21 Jun 2013 23:42:21 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="25503"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3keEb/VIfLZaOJNhTHPDS6ewVpXOjTbk=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:NAhvzeiNJ/EPXcYZ3goK46wqNs4= Xref: csiph.com comp.lang.java.programmer:24505 On Fri, 21 Jun 2013 23:37:59 +0200, Joerg Meier wrote: > On Fri, 21 Jun 2013 21:14:39 +0000 (UTC), Martin Gregorie wrote: > >> On Fri, 21 Jun 2013 12:27:49 +0200, Joerg Meier wrote: >>> On Fri, 21 Jun 2013 04:16:32 +0000 (UTC), Martin Gregorie wrote: >>>> [...] > >>>> days = gdatebin(String.format("%02d/%02d/%02d",day, month, >>>> year)); >>>> return gbindate(days - 1); >>>> } > >>>> ... and wasn't much longer in assembler. > >>>> gdatebin() converted a date string into binary days since 31/12/1899 >>>> and gbindate() did the reverse. I have no idea why the bloke thought >>>> his mess of assembler would fall over after Feb 2100: the 1900 held >>>> dates in a signed 24 bit number, so its Y2K moment isn't due until >>>> some time in 24866 AD. >>> It's ironic that after all that, your algorithm would have failed on >>> Y2K ;) >> How do you work that out? > > I must apologize for prompting this long (but interesting) post based on > a mistake on my part: my sleep-deprived brain forgot about that pesky > 400 year thing affecting 2000. That seems to happen a lot to my posts > here lately. In other words: my bad, I see nothing wrong (other than the > +1 thing). > No problem and no apology needed. It was fun delving back into the early days. FWIW, I've always liked block structured languages, probably because I first learned to program on an Ellott 503 in Algol 60 about 1967. Interesting beast: it had 8K of 39 bit words and another 16Kwords of slower ferrite core that it used as a sort of fast disk. It just preceded integrated circuits: its logic was built with discrete transistors and was a true scientific computer: its floating point divide was faster than its integer divide. With the long 39 bit word it had no double length arithmetic (didn't need it!) and it stored two instructions per word: the spare bit determined whether the first instruction modified the second or not. We programmed in on paper tape using a Flexowriter (much superior to a teletype, as it had a huge array of symbols as well as both cases and underline (Ellott Algol underlined reserved words. Output was either on a big, fast line printer or more paper tape. The machine was surprisingly fast: everything we did on it was compile and go from paper tape, but despite that and a 3 minute testing slot, you could easily compile your program and get a useful bit of data crunching done within the three minute period. In fact a year or two later I was sysadmin on an ICL 1903S with 60 MB disks as well as loads of tapes etc. It ran George 3, one of the earliest true multi-user, multi-tasking operation systems, but no matter what I tried with that and despite keeping my source on disk (of course) and not printing the compiler listings etc. I never was able to match the compilation speed of that old Elliott 503 despite it reading the program off a 1250 cps tape reader and printing the compiler listings direct to the (guessed) 600 lpm line printer. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |