Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-14 12:02:35 -0700 (Wed, 14 Apr 2004)
Revision: 338
Log message:
Added rudimentary support for display in a Web Browser.
To use, use the command "mpopt -browser [-port <int>]",
and follow the directions. The interface is basically
the same as the normal toploop. You type commands in
the input area, and MetaPRL displays the output.
Some notes about authentication. The interface uses
challenge/response validation based on MD5 sums.
The connection requires a password, which is stored
in the clear in a protected file on the MetaPRL host,
and optionally as a cookie in your browser. The
password is never sent in the clear over the network.
This isn't finished yet, but is pretty usable. I would
appreciate comments.
TODO:
1. Some exceptions are not being caught. In general
exception printing should be directed to the browser.
2. Normal output should also be directed to the browser.
3. Somehow Mozilla is not remembering cookies, which
means that you have to enter your password more
often than necessary. Undoubtably this is due
to my lack of Javascript knowledge. If this can be
fixed, the challenge can be updated frequently.
4. There are some leftover files from a frame-based
interface. Frames are awkward, so I'll delete these
files after the commit.
5. I haven't tried it on Win32.
Changes | Path |
+4 -0 | libmojave/stdlib/lm_filename_util.ml |
+1 -0 | libmojave/stdlib/lm_filename_util.mli |
+1 -4 | libmojave/stdlib/lm_string_util.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-18 18:46:45 -0700 (Sun, 18 Apr 2004)
Revision: 339
Log message:
This is an annoying commit. It looks massive, but many of the changes
are just to "open" statements. Here is the issue that is addressed.
1. Format is a superset of Printf, and it is much better.
2. MetaPRL's Rformat is a superset of Format, and it is much better.
This commit moves Rformat into libmojave, as Lm_rformat. With this
commit, all output normally goes through Lm_rformat. Feel free to
continue to use Format/Printf in special cases, but normal user output
should go through Lm_format/Lm_printf. You will probably need to use
Lm_pervasives as well.
Lm_pervasives defines an (output_rbuffer : out_channel -> Lm_buffer.t -> unit)
that should be used instead of the print_text_channel function.
There is a new FORMAT option in mk/config. Define FORMAT=Format to
enable old behavior if you have trouble.
There are two reasons behind this:
1. We had a mix of files that use Printf and those that use Format
for output. This was a mess. For instance format-style print
directives (like "@[<hv 3>Content of text box@]@.") can't be
used in raw Printf. This meant that output functions had
to be duplicated, one version for Printf, and one for Format.
This commit solves the problem.
2. Another reason, and the real reason behind this, is to allow
output to be diverted based on the display device.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-19 08:36:51 -0700 (Mon, 19 Apr 2004)
Revision: 340
Log message:
Display output correctly in browser mode.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2004-04-19 15:16:39 -0700 (Mon, 19 Apr 2004)
Revision: 341
Log message:
- Removed Lm_string_util.concal which was just duplicating String.concat.
- A bit more debugging in Shell_browser.
Changes | Path |
+1 -1 | libmojave/stdlib/lm_filename_util.ml |
+1 -1 | libmojave/stdlib/lm_pervasives.ml |
+0 -18 | libmojave/stdlib/lm_string_util.ml |
+0 -4 | libmojave/stdlib/lm_string_util.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-19 19:33:11 -0700 (Mon, 19 Apr 2004)
Revision: 342
Log message:
Well, Lm_string_util.concat is *not* the same as String.concat.
I suppose the documentation should say so. I hope we can recover
all the places that were mistakenly replaced...
Changes | Path |
+18 -0 | libmojave/stdlib/lm_string_util.ml |
+4 -0 | libmojave/stdlib/lm_string_util.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-19 19:42:40 -0700 (Mon, 19 Apr 2004)
Revision: 343
Log message:
Actually, let's rename the "concat" function to "prepend".
This will do the concat with the given separator, and
also make sure the result begins with the separator.
Changes | Path |
+5 -12 | libmojave/stdlib/lm_string_util.ml |
+2 -2 | libmojave/stdlib/lm_string_util.mli |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2004-04-19 20:39:34 -0700 (Mon, 19 Apr 2004)
Revision: 344
Log message:
Removing a generated file.
Changes | Path |
Deleted | libmojave/stdlib/lm_pervasives.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-19 21:49:30 -0700 (Mon, 19 Apr 2004)
Revision: 345
Log message:
Some minor changes to the browser display mode. This *should*
add:
1. Catch chdir exceptions, so the browser doesn't abort
if you give it a bad directory.
2. The Short/Long mode is now handled in your browser,
in Javascript. If you refresh, you get short mode.
3. Sessions. This really only makes sense with threads,
so you will normally use session/2.
4. Use <span> instead of <font>.
Changes | Path |
+1 -1 | libmojave/stdlib/lm_rformat_html.ml |
+4 -1 | libmojave/stdlib/lm_string_util.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2004-04-20 12:40:30 -0700 (Tue, 20 Apr 2004)
Revision: 346
Log message:
Fixing a bug that was dropping some symbols.
Changes | Path |
+1 -1 | libmojave/stdlib/lm_rformat_html.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2004-04-21 02:47:02 -0700 (Wed, 21 Apr 2004)
Revision: 347
Log message:
Be more clean on "omake clean"
Changes | Path |
+1 -1 | libmojave/stdlib/OMakefile |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 12:10:19 -0700 (Fri, 23 Apr 2004)
Revision: 348
Log message:
I had been working on the browser sporadically; here is a demo
update.
Changes:
1. Use frames instead of div. I'm still not sure what the
advantage is beyond getting the scrollbars to work
properly. The control code is a lot more complicated
of course.
2. This history works with the arrow keys.
3. Session support is better.
Tested just on Mozilla 1.4, I haven't tested on other browsers.
TODO:
1. It is not possible to create a new session currently.
2. Menubar should have some default non-context-sensitive
entries.
Changes | Path |
+1 -0 | libmojave/stdlib/Files |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 12:50:42 -0700 (Fri, 23 Apr 2004)
Revision: 349
Log message:
Somehow, I forgot to add these files in the last browser commit.
Changes | Path |
Added | libmojave/stdlib/lm_int_set.ml |
Properties | libmojave/stdlib/lm_int_set.ml |
Added | libmojave/stdlib/lm_int_set.mli |
Properties | libmojave/stdlib/lm_int_set.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 19:17:59 -0700 (Fri, 23 Apr 2004)
Revision: 350
Log message:
Remove aggressive use of Lm_rformat. To use the normal format library,
use Lm_printf. For output that should be diverted to the output device,
use Lm_rprintf.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 20:26:21 -0700 (Fri, 23 Apr 2004)
Revision: 351
Log message:
Remove some references to Lm_format.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 20:41:42 -0700 (Fri, 23 Apr 2004)
Revision: 352
Log message:
Remove a reference to Lm_format.
Changes | Path |
+2 -3 | libmojave/util/lm_arg.ml |
+0 -0 | libmojave/util/lm_arg.mli |
+6 -3 | libmojave/util/lm_format_util.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-23 21:03:38 -0700 (Fri, 23 Apr 2004)
Revision: 353
Log message:
Removing more dependencies on Lm_format.
Adjusting name comvention: functions named output_XXX take an output
channel, and functions names print_XXX send to stdout. We violated
this all over the place, using print_XXX not output_XXX. No big deal.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-24 09:43:51 -0700 (Sat, 24 Apr 2004)
Revision: 354
Log message:
This should remove the final vestige of Lm_format in the omake
part of libmojave.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-24 17:33:51 -0700 (Sat, 24 Apr 2004)
Revision: 355
Log message:
Sorry for the spam commits. I'm hoping this is the final change to IO
that will enable porting omake to the new IO model.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-24 17:53:02 -0700 (Sat, 24 Apr 2004)
Revision: 356
Log message:
Port to the new IO model in libmojave.
Aleksey, I forgot the password to cvs.metaprl.org.
Would you link the following files into omake?
lm_printf.ml, lm_printf.mli, lm_symbol.mli
Also, delete the following:
lm_format_util.ml{,i}
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-24 21:15:08 -0700 (Sat, 24 Apr 2004)
Revision: 357
Log message:
For the formatter, added an "azone" that assumes that its body is
"atomic." That is, the body is to be typeset all or none. The width
of an atomic block is 1 unit.
This addresses the formatting problem where multi-character
sequences were getting split. By default, if we use UTF-8, the
formatter would interpret a multi-character unicode sequence
as multiple characters. By wrapping it:
azone <utf-8-sequence> ezone
the utf-8-sequence gets interpreted as an atomic unit.
This should work properly in prl and html mode. The TeX version
is not implemented, but is no big deal for the moment.
For PRL mode, we may or may not want to split multiple character
Unicode sequences, like atomic["?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189?\239?\191?\189"] (Leftrightarrow)
since it is actually a sequence of several unicode characters.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-27 21:30:08 -0700 (Tue, 27 Apr 2004)
Revision: 358
Log message:
This adds the final major feature I wanted to add to the browser:
copy/paste of terms into the rulebox. There are two parts:
1. The display form engine saves the terms in "slot" position
into a table based on a string ID.
2. Javascript to paste a term identified by ID into the rulebox.
To use this, just click on a term, and it will be pasted into the
rulebox.
The term in the rulebox is pasted in "src" mode. Currently, terms
in "src" mode are not parsable by Term_grammar. Ugh.
At long last, I declare the the browser interface to be in bugfix mode.
Bugfix TODO:
1. Terms in "src" mode cannot be parsed. Working on this.
See Bugzilla bug #212.
2. Need to add an "options" menu for things like:
a. default "ls" flags
b. handles on terms, so any term can be selected
3. Remove the "Edit" menu, at least for now
4. The mouse events are hardcoded in Lm_rformat_html. Try to
figure out a better way.
Changes | Path |
+2 -2 | libmojave/stdlib/lm_rformat_html.ml |