Roger F. Gay

Ranch Hand
+ Follow
since Feb 16, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roger F. Gay

I do a lot of work in Java, including AI stuff. Lots of Python out there that Jython might do.
Going with Scala sounds very interesting.

5 years ago
There is a free version - a command line tool that converts XPL files to valid XML files. It not only takes care of special characters, it also assures that your file encoding matches that is specified - fixing a common problem for dealing with other kinds of special characters like foreign text, copyright symbols etc.

In addition, the project is GIVING AWAY FREE copies of the developer version - which provides that core parser package and source code to get you started with StAX-PL, StAX, SAX, and DOM processing. The StAX-PL -> SAX code shows you how to use Java concurrency as described in the article posted above.
8 years ago

Seems to me that once upon a time, this was sufficient. If something went wrong, I'd be right in there in the right place to find a fix. Am I getting less information with Oracle's v8 than ever before, or is it just my imagination?

Error handling is fundamental. I'm getting too little info from this. When I google for something more, I find long cryptic speculations on getting a stack trace of some kind. But this is fundamental ... should be very easy at this point.

What I want, is to get error information that tells me enough about the problem to find the issue immediately so that I can fix it. Must be easy and direct because error handling is fundamental

What's your best way?
8 years ago
First offering in practical AI from the HLL Project, including a free version; supporting an AI fundamental; code as data.
http://hll.nu/purchase/GetFreeXPL.htm

First blog article on the topic coming soon: Artificial Intelligence, XML, and Java Concurrency.

9 years ago

Rob Spoor wrote:

Roger F. Gay wrote:Besides that, I don't want multiple distributions. This is Java - build once, run anywhere. :)


Java is, but your scripts aren't.



That I know. I've tested on both Linux and Windows. The distribution includes batch scripts for Windows and shell scripts for Linux.
Darn this thing. I think I actually figured it out once by going back and forth between the two systems and using Windows Icacls to set file permissions.
In my mind, it wasn't that hard so I didn't write down the procedure or anything. When I came back to it, I couldn't do it again.
9 years ago
Free for a limited time. I'm about to release a product and would appreciate a bit of user feed-back first. Free single-user license and code if you're willing to let me know about any problems you encounter and provide general feedback. email contact: hll@hll.nu

XPL (eXtensible Process Language) - It's like XML but you can include "special characters" (<,>,",',&) in text elements - without escaping or wrapping.
When you need lots of special characters in the data, XPL files are easy to create and maintain.
(It incidentally fixes encoding mismatches). website: hll.nu

The core of this product is a Java package built within the HLL Project in support of heavy use of source code in XML.

?xpl .... it's like ?xml except for the special characters in text elements.



The XPL processor is based on a pull parser - very StAX like and called StAX-PL.
XPL processing can be used on its own, instead of XML in simple limited cases. When you need the full power of XML, StAX-PL is a preprocessor.
You can get more details on the website: hll.nu

The download (jar file) includes source code for StAX-PL reader and writer (customizable handler class), and quick start source code for StAX, SAX, and DOM processing.

I'm particularly interested in the initial experience. How easy is it to get started working with XPL given the software and instructions provided. --- you got the jar file ... you extracted the software ... you looked at the quick start docs, starting with README ... quickly ran the examples and they worked. No problem re-compiling. (and since you read the quick start docs you knew how easy that was). Easy to understand that you can easily integrate XPL processing into an application ... using your choice of IDE, whatever? I mean, how did it go "right out of the box" so to speak?

Contact me by email if you're interested. hll@hll.nu

9 years ago

Paul Clapham wrote:Then it seems to me you distribute an ordinary ZIP file for Windows, since extracting from a zip automatically applies the correct permissions there, and you distribute a TAR file for Linux, like Rob says, and specify the appropriate permissions in it. No? You're going to make different Windows and Linux distributions anyway, aren't you?



When I've packaged with zip, the download chokes; i.e. it works, but browsers / systems want to give a warning that something is being downloaded that can potentially damage your system (executable program).
Besides that, I don't want multiple distributions. This is Java - build once, run anywhere. :)

This product is software, including source code ... aimed at Java developers. I don't think it's too much to expect them to have the jar tool, even on Windows.
Experienced Linux / Unix users aren't going to have a problem setting permissions.

I think I'm just going to have to deal with inexperienced users by posting instructions on the website, and in the README file, etc. There is also an installation_use.txt file that comes with.
I was hoping to make this totally worry free because this is a very small start-up venture and I'm not going to be able to provide technical support.

9 years ago

Rob Spoor wrote:JAR files are little more than ZIP files, and ZIP does not preserve permissions. You'd need something like TAR, preferably compressed with GZIP or BZIP. Those can't be opened by Windows without a 3rd party application like 7-Zip though.



I'm bent toward making life as easy as possible, so I don't think I can use anything that requires another tool on Windows. It's just a collection of Java source and executables. Easy enough, I figured, to extract the contents somewhere and there ya go! Ready to use. (It is that way on Windows.) Right now my worst case is explaining to Linux users that they need to run a chmod command before doing anything. And there, I'm only really worried about inexperienced Linux users. People who know their stuff are already going to know that.
9 years ago
I would like to know how to create a jar file that preserves the file permissions of its content.

I'm packaging up source and executables in a jar file that will be extracted before use. People should be able to immediately run the examples and demonstrations by running batch / shell script files. Then they should be able to modify source and re-compile everything.

I'm trying to make life easy for people who use it and this includes people who are new to Java and programming who might be working on Linux / Unix.

I have access to machines running Windows and Linux. I don't use Linux a lot so maybe I've done something wrong.

I created a jar file on Linux using jar cf .... after setting permissions on the files so that everything worked as needed. Then I created a new test directory and extracted the jar file contents into it. The file permissions were not preserved ... i.e. -rw-rw-r--
9 years ago
It sometimes can happen that explaining and thinking about how to explain what I want leads me in other directions and google keywords. I've tested this and it works. Wondering if anybody sees any problems? Supposedly using a thread means it will run in some reasonably balanced way - not waiting until the output finishes before the input processing starts (thus requiring lots of memory).

Original source for this approach: http://ostermiller.org/convert_java_outputstream_inputstream.html



I'm building a process that creates XML (from a variety of sources and for a variety of purposes that I don't know in advance) and I want to pump the resulting XML directly into standard XML processing like SAX, StAX, and DOM. I'm starting with SAX because it seems like a push parser is well suited for the job; processing the XML as it becomes available.

I don't quite see how to set up simply passing strings from one Java component into the SAX parser process. Most examples I've found read files and there are some that use URLConnection in support of service type applications. The source in this case will be another Java component that is part of the same system.

I've already done a StAX implementation that first produces an XML file and the StAX process reads the file. But I'd really like to skip the intermediate file creation and read.
XPL Automatic Special Character Preprocessing for XML

I'll be posting a link in the advertising / promotional forum when it's ready, but I'm thinking about free early versions for those who participated in the discussion if you're interested. The WebSite is under construction and I'm wondering whether I need to link a license agreement click to a promotional code or just include the license in the package - implied agreement. It's a regular commercial EULA, one-machine license.

Since this discussion,
I decided to distribute this as a separate product. It will be integrated into another product early next year; the one that caused me to build this in the first place.
Have worked on a new website for the HLL Project that will include sale of products.
Still spending a bunch of time trying to figure out how to get a PayPal button to work so people can get instant downloads after payment but it won't give out to just anybody who wanders onto the page. It's my first time doing a pay button.
My custom parser is running, with valid XML output via XMLStreamWriter. I found no direct solution to the initial question, so I'm just using XMLStreamWriter for output; and not existing StAX methods with a custom parser; although the high level read code looks just the same as high level StAX code (except it's calling my factory and methods instead).

As far as I can tell from documentation, you have your choice of using one of three pre-approved parsers. If you specify any other, it would throw an error.
Well, it's Saturday. Turns out my processor wasn't processing XMLStreamConstants.END_DOCUMENT sent from my parser.