Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming

Node.js Now Runs COBOL and FORTRAN (arstechnica.com) 86

Last summer a developer created a plugin which made it possible to run snippets of COBOL code embedded in JavaScript using the Node.js interpreter. Now Slashdot reader techfilz writes: Romanian developer Bizau Ionica has engineered a software bridge called node.cobol which can execute Node.js scripts from within COBOL programs.
The link shows COBOL code executing a Node.js script that launches a Web server and creates ASCII art from a JPEG image -- in this case, Admiral Grace Hopper, who helped create COBOL in 1959. And Ars Technica points out the same developer has also built a Node.js bridge for FORTRAN.
This discussion has been archived. No new comments can be posted.

Node.js Now Runs COBOL and FORTRAN

Comments Filter:
  • Now if I could just figure out a way to rein those 1000+ Hollerith card decks...
  • by Hognoxious ( 631665 ) on Sunday May 22, 2016 @06:37AM (#52159149) Homepage Journal

    He needs to be stopped before he gets round to Visual Basic.

  • by campuscodi ( 4234297 ) on Sunday May 22, 2016 @06:41AM (#52159155)
    No surprise Bizau did it. This guy has been making JavaScript do weird stuff for a long time. Just check out his GitHub repo.
  • Worthless (Score:5, Funny)

    by 110010001000 ( 697113 ) on Sunday May 22, 2016 @06:41AM (#52159157) Homepage Journal
    Until it runs ADA it will be a toy language for hipsters.
    • by Anonymous Coward

      It's called Ada, not ADA! Now hand in your Geek card!

      • It's called Ada, not ADA! Now hand in your Geek card!

        Actually, I think its "Ada(tm)" because I recall that the books on the orange (later grey) wall used to read "VAX Pascal; VAX BASIC; VAX C; and VAX(r) ADA(tm)".

    • by Anonymous Coward

      Don't they use ADA a lot in military, aerospace and air line industry? When they make ADA work, the next thing any flying thing will need is a fscking insecure and crashing browser. And apps. And app developers. And app stores.

      NO

    • I have three words for you: Ada on rails [adalabs.com].
    • Until it runs ADA it will be a toy language for hipsters.

      Let me know when it runs Lisp.

  • ...
    Monuments of unageing intellect. ...
    Once out of nature I shall never take
    My bodily form from any natural thing,
    But such a form as Grecian goldsmiths make
    Of hammered gold and gold enamelling
    To keep a drowsy Emperor awake; ...

    from Sailing to Byzantium by William Butler Yeats

  • by Ngarrang ( 1023425 ) on Sunday May 22, 2016 @07:03AM (#52159195) Journal

    ...they never stopped to think if they should.

    Please, stop creating excuses to keep all that old FORTRAN and COBOL code around. Think of the children!

    • by Anonymous Coward

      JavaScript belongs to the same garbage bin as COBOL and Fortran anyway. Associating these three languages together is actually a good thing. They should all die.

      • by Theovon ( 109752 )

        No, Javascript belongs in an entirely different bin. Javascript is an interpreted object-oriented language that makes functions a first-class datatype. The other languages were compiled, completely procedural, and at least Fortran didn’t even support recursion until the 90’s.

        • by ooloorie ( 4394035 ) on Sunday May 22, 2016 @08:29AM (#52159377)

          The other languages were compiled, completely procedural, and at least Fortran didn’t even support recursion until the 90’s.

          I'm not sure what you mean by "were". Fortran is widely used in scientific computing. It has supported recursion since the 1970's, although it only was standardized in 1990. Fortran 200x is object oriented, supports operator overloading, and has excellent support for array and parallel computing.

          • by Theovon ( 109752 )

            Fine. So there’s some overlap between Fortran 200x and Javascript. Name two things in the universe that are completely disjoint (besides Creationists and honesty).

          • The other languages were compiled, completely procedural, and at least Fortran didn’t even support recursion until the 90’s.

            I'm not sure what you mean by "were". Fortran is widely used in scientific computing. It has supported recursion since the 1970's, although it only was standardized in 1990. Fortran 200x is object oriented, supports operator overloading, and has excellent support for array and parallel computing.

            I'm not sure what you mean by "it." Just because some compiler vendors may have supported non-standard extensions that allowed recursion does not mean you can claim the language supported it in general. GP is right: Fortran, as a standard, did not support recursion until 1990. Granted, it was possible to "hack" recursion with F77 constructions [psu.edu] but that's more of a conceptual exercise than a viable practice. When it's that hard to do something in a language, you need to use a different one.

            For better or for

            • I'm not sure what you mean by "it." Just because some compiler vendors may have supported non-standard extensions that allowed recursion does not mean you can claim the language supported it in general

              Almost all C programs in existence depend on implementation-define features, so by that measure, there exist almost no C programs at all.

              For better or for worse (mostly the latter) Fortran has been very slow to adopt new paradigms throughout its history.

              How? The first C standard ever came out in 1989, the firs

              • I'm not sure what you mean by "it." Just because some compiler vendors may have supported non-standard extensions that allowed recursion does not mean you can claim the language supported it in general

                Almost all C programs in existence depend on implementation-define features, so by that measure, there exist almost no C programs at all.

                What "implementation-define[d] features" do you mean, and how do "[a]lmost all C programs in in existence depend" on them?

                My experience with both languages is that it is Fortran, not C, that has suffered historically from a lack of portability due to implementation-defined features.

                For better or for worse (mostly the latter) Fortran has been very slow to adopt new paradigms throughout its history.

                How? The first C standard ever came out in 1989, the first Fortran standard with recursion in 1990, one year later. The first C++ standard came out in 1998, the first Fortran standard with OOP came out in 2003. And, of course, C++ still lacks many of the numerical features, parallel programming features, and multidimensional arrays found in Fortran.

                That's a straw-man. You seem to think that C and C++ are the only languages and standards to be compared with Fortran.

                First of all, support for recursion dates back to Algol 68. And the de facto definition of the C language was c

                • That's a straw-man. You seem to think that C and C++ are the only languages and standards to be compared with Fortran.

                  No, I simply corrected some nonsense that you and Theovon were saying.

                  Again, you seem to think that C and C++ are the only valid comparisons to Fortran.

                  Mostly, I think that you just don't have anything interesting to say.

          • by JanneM ( 7445 )

            The parallel array stuff in later Fortrans are really neat. But last time I looked, doing it explicitly yourself with MPI in FORTRAN77 was still quite a bit faster. Have compilers improved to the point where that speed difference is mostly gone?

            • The parallel array stuff in later Fortrans are really neat. But last time I looked, doing it explicitly yourself with MPI in FORTRAN77 was still quite a bit faster. Have compilers improved to the point where that speed difference is mostly gone?

              You're thinking coarrays; that's only one of several parallel programming facilities.

              Coarray performance depends on the hardware and compiler. For MPI-like setups, you can use OpenCoarrays, which simply maps coarray code into MPI code, so performance should be simila

        • by ceoyoyo ( 59147 )

          Characterizing javascript as object oriented is a bit of a stretch. It's object oriented in much the same way that C is. You can do it, but the language doesn't really do much to help out.

        • by hey! ( 33014 )

          Well, it's object oriented features suck, but it's really quite nice for functional programming. I'm glad to see that paradigm make such a comeback.

    • by Anonymous Coward

      Fortran is actually faster than C at certain math-heavy algorithms. However, I have seen the LuaJIT heuristics beat both at the same heavy math stuff so these days I have replaced all my Fortran stuff with Lua. LuaJIT is nicely easy to use and very fast at everything other than string stuff, it absolutely fails at heavy string manipulation.

      • It's also quite difficult to customize code on the fly with Fortran with any decent speed, whereas you can feed code transformed at run time into LuaJIT on the fly and end up with something that actually runs fast.
      • Oh, by the way, have you considered writing your own string library? The immutable string model should lend itself to some tree-based approach pretty nicely. Gauche Scheme does similar things, even going so far as to pretend mutable strings on top of mutable ones, including giving you functions for delayed concatenation etc. so as to give you decent speeds without resorting to dirty tricks.
    • that old FORTRAN

      That old FORTRAN code works. It's been beaten to death and unit tested left and right.

      Thousands of Engineering Apps are built on that FORTRAN code. Numpy is just a wrapper on it. Matlab is just a wrapper on it. Even the C tools are just wrappers.

      Everything from Computational Fluid Dynamics to Finite Element Analysis to Wireless RF Modems uses the FORTRAN (even if it's not exposed as such to the end user). Modern society would grind to a halt without that FORTRAN code.

      • This technology could extend the useful many languages, it seems.

        node.ada
        node.apl
        node.pl1
        node.snobol

  • by rebelwarlock ( 1319465 ) on Sunday May 22, 2016 @07:05AM (#52159203)
    No one says why this was done. I'm beginning to suspect the people who did it don't know why either.
  • It just forwards code between runtimes/compilers and executes the separate process. You cannot run fortran or cobol unless you install GNU's implementations of them on your machine.

  • Pfffft (Score:5, Funny)

    by JustAnotherOldGuy ( 4145623 ) on Sunday May 22, 2016 @07:42AM (#52159273) Journal

    I won't be happy until I can run COBOL in my browser under WINE through a VM running on a aliased instance of Win XP under AmigaOS.

    Oh, and I want a high frame rate too.

  • Finally (Score:5, Funny)

    by Opportunist ( 166417 ) on Sunday May 22, 2016 @09:33AM (#52159615)

    About time my malware runs on payroll mainframes!

  • Battlestar Galactica will be pleased.

  • Since the Slashdot community seems to appreciate the work of this fellow [slashdot.org], I just read another of his lectures (EWD273) [utexas.edu] where he had some harsh criticism for both of these languages. (The whole article is a good read, but the first mention of FORTRAN and COBOL can be found in just the last few paragraphs of the transcription.)

You know you've landed gear-up when it takes full power to taxi.

Working...