20 ms·
GnuCOBOL 3.1.1
- yeneek 6y agoWord COBOL triggers in me PTSD.
- enriquto 6y agofor me it's "import pandas as pd"
- markus_zhang 6y agoOh no plz no
- nmrcq 6y agoSeeing this at the top of any piece of code running in a production environment is enough to induce an anxiety attack :(
- deleted 6y ago[deleted]
- enriquto 6y ago> Seeing this at the top of any piece of code running in a production environment is enough to induce an anxiety attack Then what about this?: import pandas as pd from matplotlib import pyplot as plt import numpy as np import math from __future__ import print_function (sorry about that)
- Bostonian 6y agoWhat's wrong with that? I have seen it often in books and other places.
- michaelcampbell 6y agoI suspect they are more suspicious of `pandas` than the syntax of the import. But, I'm also curious as to why.
- bildung 6y agoProbably because it is indicative of a script written by a scientist, ignoring software engineering principles.
- michaelcampbell 6y agoAh, yes, that could be. The tool is not bad, but it's used badly often.
- bsg75 6y agoBecause of Pandas specific issues, or the concept of data frames in general, which are also prevalent in R and Scala?
- pletnes 6y agoPersonally I don’t think it is stable enough for a long lived service. But opinions differ. Might be worse if the author reinvented pandas manually, too.
- speeder 6y agoSometimes I wonder if I should learn COBOL just so maybe I can get my first real programming job. (and no, I am not joking...)
- rhabarba 6y agoAt least they will pay you well.
- melenaboija 6y agoAnd you will not have to deal with the ego of the current programmers that pretend they now everything about any existing programming language, paradigm and technical stack (where I include myself and because that is what is demanded)
- the_af 6y agoIn my experience, COBOL jobs don't pay particularly well. It's not even true that young people aren't learning it, so you'll have competition, too.
- Minor49er 6y agoJust curious, but why is COBOL the first language that you think about for this?
- hackbinary 6y agoCOBOL, Assembler, and FORTRAN are actually kind of cool.
- rhabarba 6y agoCoolness is probably not what matters in a programming language - but they’re efficient in their niches.
- roel_v 6y agoHaving spent much of my time in Fortan 90 the last couple of months - I'm going to have to go ahead and disagree with you on this one. You know all these people saying "when will I ever have to write mu own hash table?" Well, when you start working in Fortran.
- ironmagma 6y agoThere are hashtable implementations for Fortran such as in FLIBS.
- Jtsummers 6y agoF90 isn't bad, try F77. F90 and on you had more options with the layout of your program so that it was actually sensible. And you can use recursion without having to check if your compiler supports it. And reentrant functions. But the built-in types are collection types are anemic, it's similar to C in that regard. It's a relatively low-level language compared to other high-level languages. But if I were doing math/simulation stuffs, I would definitely consider using it again. Just, please, no more embedded programs written in Fortran. That was a bad idea (unless it's doing complex math like for the radar system).
- xioxox 6y agoMe too... the lack of decent non-array containers is frustrating. The string handling is also painful (seemingly TRIM everywhere). I've also hit several compiler bugs trying to use fairly new features.
- kjs3 6y agoDo you have some weird constraint where you can't use 3rd party libraries? Yeah, hash tables aren't built into the language, but libraries to provide them are all over the place. See for example http://fortranwiki.org/fortran/show/Hash+tables http://fortranwiki.org/fortran/show/Hash+tables. Or you could a C function. Or C++ in some compilers.
- peter_retief 6y agoI think I may have started a course in COBOL many years ago. Wonder if would be worth learning it now? There is a lot of COBOL code that needs to be maintained.
- johannes1234321 6y agoIf you want to have a career in large corporations keeping a decades old codebase alive it can be a good way, which might be saner than many startups. If you however want to build up something new and put your heart into it and revolutionize the world it probably isn't.
- rhabarba 6y agoRevolutionizing the world with COBOL? Game’s on!
- johannes1234321 6y agoWell, there is the chance of enabling creative new insurance or banking products, if you cna bend the legacy in interesting ways. The chance is technically there, if management allows is the other question ;)
- rhabarba 6y agoDepends on the age of the managers, I guess...
- peter_retief 6y agoI love learning new languages, I have worked with MUMPS
- michaelcampbell 6y agoI'm so sorry.
- sto_hristo 6y agoI once saw a web framework done in prolog. Modern world is abundant in everything you need and everything else you don't. (not a complaint)
- jodrellblank 6y agoSure, what do you think https://swish.swi-prolog.org/ https://swish.swi-prolog.org/ is built with?
- bjarneh 6y agoKeeping it old school with sourceforge of course
- rhabarba 6y agoKeeping the sources in SCCS would make it harder to pull the whole archive, I guess.
- the_only_law 6y agoI'm afraid of SF links not even because the malware thing from a few years back, but because there's a 50/50 chance "the project that looks like it will perfectly solve my issues" is just straight up abandonware.
- Koshkin 6y agoI do not get all the hatred. The idea behind COBOL’s syntax is the same as SQL’s: it is merely yet another “Structured English Query/Programming Language” designed, initially, for non-programmers to be able to describe in words what it is they would like to accomplish in a way they could be understood by the computer.
- michaelcampbell 6y agoCOBOL put me through undergrad, so I'm ok with it. And, it was developed long before a lot of modern compiler theory was even thought of, so it's going to be a little unfamiliar to those used to "modern" languages.
- anoncake 6y agoBut it was developed long after math notation was thought of.
- rhabarba 6y agoI should probably post more APL news.
- pklausler 6y agoYes, please.
- michaelcampbell 6y agoSure, but you'll note they didn't name it COMOL.
- pletnes 6y agoOr FORmula TRANslation?
- simias 6y agoWhose hatred? I don't think I've seen anybody really hate on COBOL, it's just mostly irrelevant for modern programmers and people like to mock the FULL CAPS ULTRA VERBOSE SYNTAX (something that COBOL programmers themselves routinely do, see ADD 1 TO COBOL GIVING COBOL).
- simias 6y agoAnd they say only Rust makes it to the front page of HN. More seriously is this release particularly notable in the COBOL world? I know very little about the language and I find it odd to find the Changelog of a minor release at the top of the frontpage.
- rhabarba 6y agoGnuCOBOL seems to be the de-facto standard COBOL implementation on Unix-like platforms these days, so (at least) it is a notable software. They seem to have no actual blog, so the changelog is the best news link I could come up with...
- venatiodecorus 6y agoI don't think this is the de-facto standard, probably moreso Microfocus, or perhaps NetCobol.
- pjmlp 6y agoNope, that place is reserved for MicroFocus and Fujistu.
- Mister_Snuggles 6y agoThis seems like a great candidate for a future Advent of Code! Old languages have a special place in my heart, so doing Advent of Code with them is kind of fun. I'm doing this year's in UniVerse BASIC[0] which traces its roots back to Pick[1] which is only six years newer than COBOL, but manages to be less well-known. [0] https://news.ycombinator.com/item?id=25250582 https://news.ycombinator.com/item?id=25250582 [1] https://en.wikipedia.org/wiki/Pick_operating_system https://en.wikipedia.org/wiki/Pick_operating_system
- galoisgirl 6y agoI'm doing in COBOL: https://github.com/GaloisGirl/Coding/tree/master/AdventOfCode2020 https://github.com/GaloisGirl/Coding/tree/master/AdventOfCod... I'm having a problem with day 7 with the lack of hash tables. Care to share your BASIC solutions?
- Jtsummers 6y agoYou can do it without hash tables. If you're able to create a graph structure with references/access/pointer types or whatever COBOL uses you can have records with contents similar to: record Bag: string : Description array of Bag Pointer : Children array of Integer : Count Where the indexes into the two arrays correlate. Since, as you parse, you don't know where the children may be, you can use an array to store the bags as you read them in. And in a second pass construct the graph proper. You may also want a set of pointers up to the bags containing a bag, but it's not, strictly, needed. If I were doing this year's in C, I'd have done something like that since it, also, doesn't have a built-in hash table/dictionary.
- galoisgirl 6y agoThanks! I'll give that a try over the week-end.
- thequux 6y agoSo was I! https://thequux.github.io/posts/advent-of-cobol/advent-of-cobol-day-1/ https://thequux.github.io/posts/advent-of-cobol/advent-of-co... Sadly, I got jammed up with dealing with stream files on day 4, and then a C3 talk got accepted, so I haven't gotten much time to work on it since
- hansor 6y agoIts awful that most people here are criticizing COBOL, yet they don't even know it, but they just "heard bad things about it". In my country and in Sweden it is quite easy to get good and stable job in banking/insurance/consulting business with Cobol on Z/OS. Salary is around 10-30k PER MONTH. Around 3x more then in let's say Java.
- mprev 6y ago30k in Swedish krone?
- mrweasel 6y agoI doubt that very many Swedes in IT works for less than 30.000SEK, so I would assume USD.
- levosmetalo 6y agoMy guess would be EUR. In most of the Europe people don't mentally convert to USD but to EUR.
- mrweasel 6y agoThat kinda depends, as a Dane I honestly only ever need to think in EUR when I shop online from Germany. I do however need to convert from DKK to USD and back much more frequently when reading news online. Technically most of Europe don't need convert to EUR, they already use Euros so they're also more likely to need to convert to USD.
- the_only_law 6y agoI’ve always heard COBOL devs referred to as either highly paid consultants keeping critical applications alive for corporations or wage slaves maintaining a painful app for below average pay.
- Jakobeha 6y ago
- joseluisq 6y agoIf anyone of us has not learned the lesson yet. > Real programmers don't write in COBOL. COBOL is for COmmon Business Oriented Laymen who can run neither a business nor a real program. http://www.bernstein-plus-sons.com/RPDEQ.html http://www.bernstein-plus-sons.com/RPDEQ.html
- enthd 6y agoAh COBOL, oddly enough I started my first dev job in COBOL in the banking industry(I'm in my 30s and started my professional coding career in my 20s), I have mixed feelings about it...it's a weird language but it has it's place, I wouldn't advise anyone to jump into a COBOL career path unless you are doing it for a job and a job alone.
- the_only_law 6y agoI would kill to get a personal mainframe though. Read a story some time ago about some guy who snagged one from a government auction. Sadly they never have anything cool when I look.
- rhabarba 6y agoBuy one. IBM still produces them.
- shrubble 6y agoThe Hercules emulator plus the MVS 3.8j version of the IBM mainframe operating system are both freely available.
- paulie_a 6y agoEbay sometimes has them Otherwise if you live in the Midwest...uw oshkosh use to have one for free. The stipulation was that you had to remove it from the campus. And it weighed 3 tons
- galoisgirl 6y agoYou can get a free account on one, for example in Master the Mainframe. Sure, it's not half as cool as having the machine like that guy, but you don't need to reinforce the floor in your house, so there's that.
- kjs3 6y agoI remember that story. I don't think he ever got it working. There's a lot to getting a real mainframe running, starting with some onerous licensing terms for the software. And the cost to power one would be ugly. There were some actual 'personal mainframes' made by IBM. The PC/370 was a PC or PC/AT with a set of ISA bus mainframe processor addin cards. The PC became the I/O processor. The PC/390 was a later version based on a PS/2 running OS/2. All long obsolete now.
- herodotus 6y agoMy first job, after graduating, was for Control Data Corporation. I was called a Systems Analyst, but what I did was write a lot of Cobol code. Many years later, I wrote a paper about a novel data structure that could be used for what is called "The Balance Line Algorithm". I illustrated the use of this data structure with some Cobol. That was the last time I even thought about Cobol until I came across a citation to my paper. In excitement at being cited, I looked at the reference in the citing paper. Imagine my disappointment when I read the citation: "[X]showed that this can even be done in Cobol".
- driminicus 6y agoSounds like high praise to me
- bencollier49 6y agoIn actual fact the data structure format in COBOL is rather clever. I'd like to have access to that in Java when dealing with data formats like ASN1.
- GnarfGnarf 6y agoThe "MOVE CORRESPONDING" was kind of neat, don't see that in today's languages. Instead you have to tediously copy each individual field.
- int_19h 6y agoSCATTER/GATHER in dBase and derivatives was similar in spirit.
- kencausey 6y agoIt would be great if we could transition to actually discussing GnuCOBOL specifically.
- shrubble 6y agoOn the one hand we love and respect Admiral Grace Hopper and on the other hand the COBOL language she is credited with is scorned. I always thought this was somewhat unusual.
- the_only_law 6y agoSee this comment in this thread: https://news.ycombinator.com/item?id=25386312 https://news.ycombinator.com/item?id=25386312
- GartzenDeHaes 6y agoAny stories from production users of GnuCOBOL?
- the_only_law 6y agoI’m curious too, my understanding is that 90% of COBOL work is done in older mainframes (or ported from older mainframes to newer ones) and likely uses whatever IBM compilers. I don’t think I’ve ever heard of GnuCOBOL being used outside of learning.
- nonesuchluck 6y agoIn my (very limited) z/OS experience, COBOL by itself is necessary but not nearly sufficient. COBOL code is used inside a framework of highly proprietary software and system services: - DB2 (database is builtin to the mainframe) - GDG (Generation Data Groups, versioned file system) - ACL (IBM's original access control lists) - JCL (automation, parameters, logging) - SyncSort (data sorting, joining) - various CA Technologies products - etc!
- the_only_law 6y agoYep this is why I'm also weary of people who suggest to "just learn COBOL" for a job.
- kjs3 6y agoDon't forget CICS (OLTP component). But spot on...a mainframe is an ecosystem, not a language.
- nonesuchluck 6y agoProbably not hard for you to guess that my experience is limited entirely to enterprise batch processing and data warehousing. I've heard of CICS, but only as a nasty rumor.
- deleted 6y ago[deleted]
- MaxBarraclough 6y agoProject home-page: https://www.gnu.org/software/gnucobol/ https://www.gnu.org/software/gnucobol/ Curious to see a GNU project rely on SourceForge.
- vkaku 6y agoThey renamed it very recently. Not a bad home for the project.
- atum47 6y agoI once wrote a perceptron in cobol, just for fun. https://github.com/victorqribeiro/perceptronCobol https://github.com/victorqribeiro/perceptronCobol It was a challenge I was able to do in about 4 hours of code I didn't find that much harder to program in a Cobol (given that you use the right IDE, I wrote it in Gedit and the identation was a pain at first)
- nonamenoslogan 6y agoI've spent the last three years translating COBOL programs off of an HP3000 in to to SQL-backended web-apps and can say as a non-Programmer who was given a pile of COBOL source to decompile, I like its simplicity and ease of readability. Most of the code is from the 80's or 90's but is well commented and easy to work with and understand. Speaking of, most of this code still works or was in use until 2-3 years ago--on the HP3000. Its a testament to how long this stuff can be kept useful. Also, the COBOL team here wasn't astoundingly well paid, but good stable and low-stress jobs in the middle-range of local income is something that is becoming harder and harder to find.
- fiftyacorn 6y agoThe importance of the comments in COBOL reminds me of a developer I worked with who was famous for removing comments to 'tidy up the code' The other developers then spent time readding the comments
- Iwan-Zotow 6y ago> was famous for removing comments to 'tidy up the code'. The other developers then spent time readding the comments "good stable and low-stress jobs in the middle-range of local income"
- Viliam1234 6y agoYep. In high-stress jobs you sometimes meet an asshole who removes the comments, but no one has time to re-add them.
- ta988 6y agoI hope you removed that dev to tidy up the team.
- ithkuil 6y agoI did see codebases with tons of comments saying the wrong thing. Comments (prose) are not compiled and executed and tested and can easily drift
- xvilka 6y agoThere is an initiative[1][2] to create a tree-sitter parser and GitHub Semantic support for COBOL. [1] https://github.com/Neppord/tree-sitter-cobol https://github.com/Neppord/tree-sitter-cobol [2] https://github.com/github/semantic/issues/452 https://github.com/github/semantic/issues/452
- kyting 6y agoRM Cobol, Nevada Cobol, Cobol-80..., what a good old days to use those Cobol compilers back on early 90s. old soldiers never die but fade away.
- kjs3 6y agoWow...Nevada Cobol. That brings back some memories. We were kinda shocked someone could fit it on a CP/M machine. Had a friend who learned enough using Nevada at home to get a job doing VM/370 Cobol for an airline and ended up becoming a VP by the time he retired.
- kyting 6y agoExactly, the Nevada Cobol was able to run under Apple II machine with Microsoft Softcard, quite amazing at the time.
- moonbug 6y agoCOBOL has done more for the global economy than anything silicon valley has done this century.
- zoom6628 6y agoI used to wonder why so many different programming languages and why so many opinions about them. After couple of decades i learnt about Domain Specific Language (DSL) concept. I started out coding COBOL and some assembler after learning Pascal and others during education. I now code in python, c, c# or whatever us best fit. My opinion and experience suggests these are all DSL just as COBOL was probably one of the first. It is excellent for business logic and business transaction oriented data processing. Like all languages and tools the in output is mostly unreliable garbage in the hands of the ignorant and unskilled/ill-disciplined. I don't think the popularity of languages is as much to do with their technical merits add it is about the community that builds around each. Each community if like a tribe and the tribes have norms arising from their environment and common needs. My 2c.
- vkaku 6y agoCan someone comment on the COBOL conformance of this 3.1 release? How many tests left to pass?
- blippage 6y agoI tried writing my own little accounting app in GnuCOBOL. For fun, believe it or not. It didn't take me too long to bow to the inevitable and rewrite it in Perl. Speaking tangentially, there's a project on Sourceforge called Applewood Computers Accounting System https://sourceforge.net/projects/acas/ https://sourceforge.net/projects/acas/ I had a look at it a few years ago, and decided it probably wasn't suitable for my purposes. Interestingly, I see that it was updated in June of this year. The original code stretches back decades, IIRC, and has been deployed in a commercial setting. I spoke to the author on one occasion. I have a casual interest in retro stuff, so Cobol was kinda interesting to play with for awhile, but in the end I decided that it was hopelessly impractical.
- submeta 6y agoIs there no way to write a DSL in Lisp for instance, and make code generation easier? That way it'd be more fun to program COBOL, no? But I reckon the task is more code maintance and slight changes and less writing large amounts of code?