[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] tree data, embedding a language or string interpol
Re: [open-cobol-list] tree data, embedding a language or string interpolation?
Fri, 15 Mar 2013 19:27:28 -0400
Opera Mail/12.14 (Linux)
On Fri, 15 Mar 2013 17:41:11 -0400, Patrick
With Jim's help I am working on a web application written in Cobol. It
will likely take me some time and I will do it in stages. The first
stage is going to be an offline webpage generator and in doing so, the
first obstacle is the templating engine. I will just upload static after
Yeah, Jim is da man. You have to keep your eyes on the quietly productive
people. They DO things. ;-)
Cobol is good for lots of things but in seems to me that at it's core it
is Awk on steroids. It is really good for tabular data but what about
tree data. I can chop up a tree based webpage into "square snippets"
but it would be nice to have other options. The best option is a way to
parse HTML from Cobol but baring that string interpolation would solve
the problem too.
So for instance with "<title> $title </title>" the variable $title is
inserted into the string, no need for concatenation.
I've never tried it with .html, but libXML2 may be just the thing for this.
Sergey wrote a sample that recursively travels through nodes.
I can't see why libXML2 wouldn't handle HTML files. I could be wrong
If Cobol does not support this, I was thinking of embedding another
language that supports it.
Python and Lua do not support this.
PHP and Perl do but I'd rather not
Ruby, Tcl, Falcon and Vala support this.
And REBOL3 is open source now. I'll be embedding R3 in OpenCOBOL someday
soon. REBOL makes tree traversal almost easy. REBOL 2.7.8 is a worthy
toolkit for any developer. Source is not open, but the system is free to
redistribute (unmodified) and now includes the SDK features that used to
be for fee. REBOL 2 and RebGUI for the win. The recent release of REBOL
3 has reinvigorated the developments, but it lacks some of the niceties
built into REBOL 2. R3 will be a sweet thing soon though. Many busy
http://www.rebol.com Carl Sassenrath is one of my heroes.
Another nifty little language is the Unicon fork of Icon. (I was being
jokey when I said nifty little. Icon is one of the most advanced
programming languages on the planet.) The late Ralph Griswold's name also
hangs on the heroes wall. http://www.cs.arizona.edu/icon/ and
https://sourceforge.net/projects/unicon/ The books are well written and
free. I hope the experimental $C macro handler gets into V13 of Unicon,
but I've already proven the old LOADFUNC Icon feature works with OpenCOBOL
modules. Full integration with Unicon will be voodoo ridden, which is
Ruby can interact with C but it's normally to extend Ruby. mruby is
being designed to be embedded and will compete with Lua but it's not
I like Tcl and I like jimsh but Tcl is slightly quirky.
I don't know much about Flacon but Brian does and he already has samples
of how to use it with Cobol
Ditto for Vala
Any feedback would be appreciated-Patrick
Use all these. ;-)
embeddable systems. I haven't looked this week, but as soon as Node.js
ships as a shared library (it's in the docs, but the make breaks), we'll
have Node.js in OpenCOBOL as well.
In terms of 'synergy'; OpenCOBOL is destined to become a GNU project.
Keisuke Nishida started OC, and also plays a key role in Guile
development. Guile is the GNU scripting engine of choice. So, it'll make
sense for the 'official' branch of OpenCOBOL to support a --with-guile
option to the ./configure compiler builds. That is in the works, but I
was waiting for the Guile 2 release to become more ubiquitous before
diving in head first.
Guile (along with it's roots in Lisp) is a multi-language interpreter
now. It'll even decode
+++++ +++++ [ > +++++ ++ > +++++ +++ > + <<< - ] > -- . + . > ++ . --
. > .
to display DERP. I'll just say that code is bf, as I'm not a huge fan of
the actual name given to the brain twisting language, even though it's a
lot of fun for how useless it is.
Keisuke assisted with the Guile VM layer. So in terms of GNU adoption,
Guile support will put a plus in the accept column.
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
open-cobol-list mailing list