News for hackers. Stuff that matters.
Re:COBOL bridge for Node.js by jevgeni on Monday August 17, 2015 @10:12AM (#10073050)
(silent tears of joy)
[deleted]
Re:COBOL bridge for Node.js by jevgeni on Monday August 17, 2015 @11:01AM (#10073431)
I so totally agree.
Re:COBOL bridge for Node.js by _1 on Monday August 17, 2015 @09:03AM (#10072652)
(Not a JS'er) You can pass a comment as a parameter?
Re:COBOL bridge for Node.js by marpstar on Monday August 17, 2015 @09:10AM (#10072686)
not in the language itself, but you can obtain the full text of a function, detect the comment and parse it, and inject it where ever it needs to go.
Re:COBOL bridge for Node.js by STRML on Monday August 17, 2015 @10:13AM (#10073057)
Yep. "Passing a comment" is used by calling .toString() on the function. It fails when using minification for obvious reasons but of course you wouldn't on Node code.

It's a clever hack around JS's awful multiline string support. But with ES6 template strings it's not really needed anymore.

Re:COBOL bridge for Node.js by untog on Monday August 17, 2015 @09:58AM (#10072966)
You can, but I'm a little confused as to why you would, instead of just passing a string.

Fits in with the esoteric nature of the library, though.

Re:COBOL bridge for Node.js by maxmcd on Monday August 17, 2015 @10:34AM (#10073219)
Possibly because multiline strings are not supported?
Re:COBOL bridge for Node.js by ivank on Monday August 17, 2015 @10:43AM (#10073290)
ES6 template strings can span multiple lines.
Re:COBOL bridge for Node.js by vittore on Monday August 17, 2015 @10:38AM (#10073252)
Every time I was reading about old COBOL systems, I was wondering if we can compile COBOL to asm.js, this is slightly other direction but IMHO this topic requires more love.
Re:COBOL bridge for Node.js by exabrial on Monday August 17, 2015 @12:23PM (#10074103)
Wow, match made in heaven!
Re:COBOL bridge for Node.js by dark_ph0enix on Monday August 17, 2015 @09:55AM (#10072950)
But why?
Re:COBOL bridge for Node.js by protomyth on Monday August 17, 2015 @10:26AM (#10073152)
The same reason you could write part of your site in COBOL (Micro Focus) because you have a large body of legacy and need to get to the web.
Re:COBOL bridge for Node.js by jschwartzi on Monday August 17, 2015 @10:16AM (#10073082)
It gives you a way to connect your enterprise system to your corporate intranet.
Re:COBOL bridge for Node.js by tolle on Monday August 17, 2015 @01:52PM (#10074825)
Seems like a pretty stupid way to do it. Why not just use the raw data from the data files or direct access to the DB/2 database? Does this even handle the ebcdic to ascii conversion? Or packed decimal numbers?
Re:COBOL bridge for Node.js by jackweirdy on Monday August 17, 2015 @10:46AM (#10073313)
Atwood's Law
Re:COBOL bridge for Node.js by charriu on Monday August 17, 2015 @08:58AM (#10072629)
Uh... Neat?