I've decided after good example to write some diary pages with toughts and events.
Oh, in case anybody fails to understand, I'd like to remind them that these pages are copyrighted, and that everything found here may not be redistributed in any other way then over this direct link without my prior consent. That includes family, christianity, and other cheats. The simple reason is that it may well be that some people have been ill informed because they've spread illegal 'copies' of my materials even with modifications. Apart from my moral judgement, that is illegal, and will be treated as such by me. Make as many references to these pages as you like, make hardcopies, but only of the whole page, including the html-references, and without changing a iota or tittel...
And if not? I won't hesitate to use legal means to correct wrong
that may be done otherwise. And I am serious. I usually am. I'm not sure
I could get 'attempt to grave emotional assault' out of it, but infrigement
on copyright rules is serious enough. And Jesus called upon us to respect
the authorities of state, so christians would of course never do such a
thing. Lying, imagine that.
Entries | List
of Diary Pages | Home
I saw it is not the latest, but jave 1.4 (java 2) is quite a different story its seems, though I think it allows for older version programs to be compiled too, it is in beta version, and I think many web browsers will need a new java plugin before they can run applets from it, so not generally good idea at this moment.
I tried some of the 1.3 examples, which mostly work fine, though out-of the-box not all of them run, and to test the compiler, called javac, I compiled the clock example, which is an analog clock in a web page, made by a simple clock.java source file. After storing the prefab clock.class, which is the actual java program elsewhere, I tried setting the PATH variable in the cygnus shell to the bin directory in the jdk distribution, and straight away the compiler was able to produce a java program that when loaded in the web page indeed worked under netscape.
The next example was a more daring one, I've pasted the code from my own diary web page 30 into a cat program running in a bash shell, as to be sure I'd take exactly the same code, added one forgotten close parentesis in vi, changed the filename to the name of the applet, minding the case of the letters, and compiled at first the socket based text applet, which has a single line of text and a little text window in it, and is supposed to be one part of a simplistic aol or unix 'talk' window.
It compiled straight away, and after making a 4 line html page with standard applet tags in it, I dropped the page into a web browser, and waited for things to happen. It seemed ok, there where the two windows, and a little test text in it, and no error reports, except that there was no connection, which was logical.
So I started a copy of my trusted tcl/tk script application 'pcom',
in fact together with bwise, and set it up to listen to the right free
socket number, all on the local host, which in this case happened to be
179 (pretty random, I guess on the previous system I ran the example that
was a convenient value), and
again dropped the page with the applet from file explorer into the web page, to reload and reinitialize the applet, which seems to be about the only way, reload doesn't work.
And plinck, a little line in pcom indicating a connection was made, followed be me typing some text in the input fields of the webpage applet and the pcom application, which indeed communicated! At least that is a major basis as in starting point for serious development, and it integrates many essentials of java in a very small untrivial example, which is good experience.
I found that I forgot that I made the applet only to work with an echoing peer, that is it doesn't act as a fill duplex communication partner, when return is pressed, the line of text in the upper line is sent over the connection, and it waits for text to be returned, which are added to the lower text window. That indeed workd, but pcom would be able to send and receive at any time and order, which in the java program is not programmed. I forgot that.
I'm going to look into a synth applicatoin in java, that may be good for demonstration purposes, though it required a small plugin to be installed, which makes in unsuited for my web pages, I think. It's good though to have a good example of what a synth I can built could do.
Oh, and out of lets say discontentment, I did my own fortune program,
maybe I'll paste the source, just a random generator with right range and
clock based seed, and a verse grabber in C, works fine, I'll throw in one
/home 501 $ source ~/.bashrc
"Obviously, a major malfunction has occurred."
-- Steve Nesbitt, voice of Mission Control, January 28,
1986, as the shuttle Challenger exploded within view
of the grandstands.
/home 502 $
in fact it is random, which makes it more fun.
I had written the above line before I started a shell with the fortune in it, and without looking much pasted the fortune in, and think it at least appropriate to mention that the fun in this case was not primarily in the content of this fortune.
I assure everyone that the text is taken from 627 different possibilities to be precise, and that it is taken quite random, I've tested the random generator, and the debugging information is still in the output of the program to show the number of the fortune is quite random.
American language ?
I tried two more, and can't resist putting the screendump on:
Maybe I should write a book.
In case someone is wondering, the first numbers in the output are the
random 'verse numbers', the second large integers are the maximum random
numbers, used to scale the random function output with.