Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
waltman
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
408 ms
·
1.
▲
by
waltman
4y ago
Exploiting your opponent's weaknesses seems like a perfectly cromulent strategy to me, whether your opponent is made of meat or silicon. Go humans!
2.
▲
by
waltman
9y ago
Sure. My point was just that it's more difficult than it seems. Also this would mean that lines like add x to y giving z become something like cobol_add_giving(&a, &b, &c); which is a lot less readable.
3.
▲
by
waltman
9y ago
It’s certainly possible; after all, the GnuCOBOL compiler is written in C. A large part of every COBOL program tends to be simple move and arithmetic statements that seem like they should be easy to port. The difficulty comes with the data
4.
▲
by
waltman
9y ago
It's also solved by modern editors that do syntax highlighting. Both emacs and vim flagged that period as an error when I was working on the example in the article. But sadly the editor I was using at the time did not.
5.
▲
by
waltman
9y ago
When I wrote the article I didn't have access to code I worked on 2 decades ago, and if I did I couldn't have used it in the article anyway. This was indented to illustrate the problem with problem with column 73, not to handle al
6.
▲
by
waltman
9y ago
I'm the author of the article, and I linked to the source of those numbers. The numbers seem reasonable to me too for the same reasons dcminter gave. One other reason is COBOL is a language that lends itself to copying and pasting old
7.
▲
by
waltman
9y ago
I'm the author of the article, and to be honest the only reason I did it this way was to make sure the period ended up in column 73. I've presented this in talks about half a dozen times now, and you're the first person ever
8.
▲
by
waltman
9y ago
My experience with COBOL was on Stratus computers running the VOS operating system. This was a better environment than mainframes, but I'm still ambivalent about the language.
9.
▲
by
waltman
9y ago
It's certainly true that there's a lot of boilerplate verbosity involved in reading files in COBOL. But once you've done that, parsing out the fields will likely be much simpler than in most modern languages. Records like thi
10.
▲
by
waltman
9y ago
COBOL structures are better for fixed-length strings than C structs are because C really prefers strings do be null terminated. In C you've got to specify the length of each string, whereas in COBOL the compiler takes care of that for
11.
▲
by
waltman
9y ago
That 72-character limit came about because the most popular IBM punch card reader at the time COBOL was being written could only read 72 of the 80 characters on a card. Once you know that anything after column 72 will be ignored, you can re