Discussion:
Questions from Unix world...
(too old to reply)
WLad
2004-06-04 15:27:49 UTC
Permalink
Dear colleague!

I show Aos to one Plan9 programmer.
in Oberon/bluebottle, do we have
1. something like 'grep' to search regular expressions (or the like)
within textfiles;
2. something like 'awk' to work with flatfile databases, or some
other database system;
3. something to view .ps and .pdf files;
4. something to create .ps and/or .pdf files;
5. some functions to manipulate bitmaps;
6. some plotting (x vs. y, and like) ??
7. as I most of the code I use daily is written in C, is there some
translator like reversed O2C [==C2O], or should I hire an expert?
Does anybody have answers?
jmdrake
2004-06-09 15:02:09 UTC
Permalink
Post by WLad
Dear colleague!
I show Aos to one Plan9 programmer.
in Oberon/bluebottle, do we have
1. something like 'grep' to search regular expressions (or the like)
within textfiles;
Yes. There is a package called "RX" that comes with Oberon System 3, NO
and BlueBottle. See:

http://www.oberon.ethz.ch/software/RX.html

Also there is another regular expressions package called "Regul".

http://www.oberon.ethz.ch/software/Regul.html
Post by WLad
2. something like 'awk' to work with flatfile databases, or some
other database system;
Nothing like "awk" exists, but you can make calls to the RX module
from inside another program, do pattern matching and accomplish much
of what someone might do with awk inside a simple Oberon program.
(I'm not an awk guru. I'm just basing this on the few awk examples
I've seen). Since Oberon has always compiled extremely fast you
don't always need a "scripting" language, although I've seen some
implemented in Oberon. There is an underlying object oriented
database for Oberon System 3 called the "library". It's mainly
used for storing/retrieving gadget objects, but it can be "tweeked"
to handle more general information. I've played with this a little,
but I haven't done anything serious. Bluebottle has something called
a "prevalence system" which looks like an XML based database, but
I haven't delved into it. (The web server uses it for user
authentication and webforums). System 3 for Windows has (had?)
ODBC support. It was dropped from the latest release (plugin
Oberon) although I saw someone mention that they had gotten it
working again. Oberon V4 for Windows also has ODBC support. And
there's also a powerful (but buggy) object oriented database for
Oberon V4. I'm not sure what it would take to port it to Oberon Sys3/Bluebottle.

http://www.ssw.uni-linz.ac.at/Research/Projects/OberonD.html
Post by WLad
3. something to view .ps and .pdf files;
Not to my knowledge. The closest I can think to this is a "dvi"
viewer for LaTeX output.
Post by WLad
4. something to create .ps and/or .pdf files;
Oberon can print to a PostScript file.
Post by WLad
5. some functions to manipulate bitmaps;
Several. The best is the "Gfx" package.
Post by WLad
6. some plotting (x vs. y, and like) ??
There have been several over the years. Here's the most
recent one I've seen.

ftp://ftp.inf.ethz.ch/pub/ETHOberon/Contrib/hreba/Diagrams.Arc

In addition the Voyager package can do 2-d and 3-d plots.

http://www.antsinfields.de/
Post by WLad
7. as I most of the code I use daily is written in C, is there some
translator like reversed O2C [==C2O], or should I hire an expert?
There no such animal. The closest I've seen is a package that's
included in the XDS Oberon implementation called "H2D". It converts
a C header to a Modula 2 "def" file. Because of the similairity between
Oberon and Modula-2 this can be used to create a "skeleton" Oberon
module, but that's all. This is typically used when using Oberon
in conjuction with another OS (either a standalone compiler or a
"hosted" version of the Oberon OS) so that Oberon can access external
libraries written in C (such as ODBC and OpenGL). Oberon does have
a few decent compiler tools available. I don't know why no one has
ever taken this on as a project.

Regards,

John M. Drake
Post by WLad
Does anybody have answers?
n***@top-post
2004-06-12 14:18:51 UTC
Permalink
Post by jmdrake
Post by WLad
Dear colleague!
I show Aos to one Plan9 programmer.
in Oberon/bluebottle, do we have
1. something like 'grep' to search regular expressions (or the like)
within textfiles;
Yes. There is a package called "RX" that comes with Oberon System 3, NO
http://www.oberon.ethz.ch/software/RX.html
Also there is another regular expressions package called "Regul".
http://www.oberon.ethz.ch/software/Regul.html
I was persuaded to fetch this, because I didn't realise that it
couldn't do [as described below] what is needed.
It's a monster, because it is part of the meta compiler: Bable;
and needs several other packages. You must buy the complete
automobile if you want to test the cigarette lighter !
Post by jmdrake
Post by WLad
2. something like 'awk' to work with flatfile databases, or some
other database system;
Nothing like "awk" exists, but you can make calls to the RX module
from inside another program, do pattern matching and accomplish much
of what someone might do with awk inside a simple Oberon program.
Efficient searching for text is undoubtely becoming a key for
productivety, beside minimising possible great frustration.
As a 'heavy' user of NO, this is what helps me [PLUS what I still need]:-
* file spaces are organised by topic into disk-partitions: say 5 to 20.
* new incoming 'articles' get appended to their appropriate file,
under their 'chapter number & title' and the 'chapter number & title'
appears at the file header as an index thus:
file = AImisc:ExprtSys4Legal
1. Overview of AI Research Groups in The Netherlands
2. Legal advisory system - EDI within EC
3. A Pragmatic Legal Expert System
4. Some URLs
5. About Legal informatics
6. expert systems
7. lexit.at/resource
8. A Pragmatic Legal Expert System
9. Book: Representation and Reasoning in Law

Guided by colours-info [qed with NO], its a 'wipe & a click'
[750 ms.] to get to the beginning of the "6. expert systems" chapter.

* For searching a <text string> in a partition:-
in order to avoid half the redundant *.Bak files, have a pre-build
file list in eg. ACTnRule:SearchTemplate which looks like this:---
ACTnRule:SearchTemplate ==
Updated 2004 Jan 25 Find.All ^

Find.Domain
ACTnRule:AI.ES.4law
ACTnRule:AbortionAct
ACTnRule:Aces2InfoAct
ACTnRule:AmdCompaniesAct
...
ACTnRule:UsuryAct
ACTnRule:WillsAct.html
~ ---- end of file: ACTnRule:SearchTemplate

With nicely coloured for hi-lighting of the 2 commands:
'Find.Domain' selects the set of files [which was created by
System.Directory <partitonID.>:* and Store the Directory and
RX.Grep Directory \i ".Bak"; to remove the redundany *.Bak].
And select <keyString> , click 'Find.All ^' rapidly list all files of the
partition containing <keyString>.

What is needed !!
List all files [in the list of files {which BTW can be further partitioned
by date - using SmartDir.Tool ; it's very common to want limit access
to files that you've been working on recently} ] containg <string1>
and <string2> ...<stringN> in any order in files of the file set.

I mistakenly though that I could hack this function by running the
output of 'Find.All ^'
[a text of lines of: <FileID> <Tab> <subString containing Key> ]
through RX to remove the <Tab> <subString containing Key>,
and then use the reduced set of 'satisfying files' to test for the
next key.

Of course this is no good since multiple finds of a single key
produce multiple FileIDs for the next stage.
What I need is another quick hack to remove duplicate lines,
in the text if one-FileID-per-line. Any solutions welcomed !

Alternatively, it would be valuable if someone [ELSE ;-] could add
a command to Find.Mod [perhaps by extending existing code] to
search for multiple strings, in a short-circuited-AND way.
And just output the fileIDs which pass: contain ALL of the strings
- in any oder.

Related to this: it looks as if "western civilisation" is getting overly
dependent on google ? The dissapearance of the facilities would
be disasterous for me.

== Chris Glur.
jmdrake
2004-06-13 13:37:38 UTC
Permalink
Post by n***@top-post
I was persuaded to fetch this, because I didn't realise that it
couldn't do [as described below] what is needed.
It's a monster, because it is part of the meta compiler: Bable;
and needs several other packages. You must buy the complete
automobile if you want to test the cigarette lighter !
So did you try RX? That's the package I was "describing".
Regul is simply another regular expressions package.
I think Regul has some nice features and is much better
than what you've described, but you're entitled
to your opinion. Anyway if you look in RX.Tool
you will see that RX has a "Grep" command. As it
is designed it will allow you to return all of the
lines from a particular file that fits a search pattern.
It would be trivial to extend it to search
mulitple files.

Regards,

John M. Drake
SSS
2004-06-18 01:16:20 UTC
Permalink
just a test...

Loading...