Re: [Oberon] Fwd: IDE with integrated source level debuggerandLuaJIT VM running the Oberon System
@ all I uploaded a new version of the Win32 Oberon IDE binary: http://software.rochus-keller.info/OberonIDE_win32.zip It fixes a crash detected by Michael Schierl and adds a first implementation of FileDir.Enumerate so System.Directory does something (although I'm not sure yet how the prefix mechanism is supposed to work). Best R.
Other OSes use directories and subdirectories to structure the filesystem tree. Oberon uses prefixes to do so. If Hans wants to collect all his files, he usually creates a directory „Hans“ and collect all his files in there. The Oberon way to do it is to prefix his files with „Hans.“ As example: Hans.ORS.Mod, Hans.ORB.Mod, Hans.ORG.Mod and Hans.ORP.Mod are the compiler file Hans created and modified. Instead of „cd Hans“ and „ls“, you do in Oberon „System.Directory Hans.*“ Jörg
Am 16.02.2020 um 01:44 schrieb "rochus.keller@bluewin.ch" <rochus.keller@bluewin.ch>:
@ all
I uploaded a new version of the Win32 Oberon IDE binary: http://software.rochus-keller.info/OberonIDE_win32.zip
It fixes a crash detected by Michael Schierl and adds a first implementation of FileDir.Enumerate so System.Directory does something (although I'm not sure yet how the prefix mechanism is supposed to work).
Best R. -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On 2020-02-16 02:14, Jörg wrote:
As example: Hans.ORS.Mod, Hans.ORB.Mod, Hans.ORG.Mod and Hans.ORP.Mod are the compiler file Hans created and modified. How is a module named Foo.Bar.Mod imported by a client module? According to the Oberon language report a module name cannot contain dots.
-- August
The module name and the filename are two different things. The module name in the file Hans.ORP.Mod is ORP.Mod Jörg
Am 16.02.2020 um 09:22 schrieb August Karlstrom <fusionfile@gmail.com>:
On 2020-02-16 02:14, Jörg wrote:
As example: Hans.ORS.Mod, Hans.ORB.Mod, Hans.ORG.Mod and Hans.ORP.Mod are the compiler file Hans created and modified. How is a module named Foo.Bar.Mod imported by a client module? According to the Oberon language report a module name cannot contain dots.
-- August -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Sorry, the module in Hans.ORP.Mod is ORP, obviously. If you look at the S3 distribution, the Windows implementation of the files start with the prefix Win32. (Win32.Display.Mod, Win32.Math.Mod etc) Jörg
Am 16.02.2020 um 11:09 schrieb Joerg <joerg.straube@iaeth.ch>:
The module name and the filename are two different things. The module name in the file Hans.ORP.Mod is ORP.Mod
Jörg
Am 16.02.2020 um 09:22 schrieb August Karlstrom <fusionfile@gmail.com>:
On 2020-02-16 02:14, Jörg wrote: As example: Hans.ORS.Mod, Hans.ORB.Mod, Hans.ORG.Mod and Hans.ORP.Mod are the compiler file Hans created and modified. How is a module named Foo.Bar.Mod imported by a client module? According to the Oberon language report a module name cannot contain dots.
-- August -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On 2020-02-16 11:09, Joerg wrote:
The module name and the filename are two different things. The module name in the file Hans.ORP.Mod is ORP.Mod But if we have Foo.Bar.Mod and Baz.Bar.Mod and module M imports Bar, which one is picked?
-- August
The one you compiled last. Similar problem with directories and your searchpath is not as expected... Jörg
Am 16.02.2020 um 13:38 schrieb August Karlstrom <fusionfile@gmail.com>:
On 2020-02-16 11:09, Joerg wrote:
The module name and the filename are two different things. The module name in the file Hans.ORP.Mod is ORP.Mod But if we have Foo.Bar.Mod and Baz.Bar.Mod and module M imports Bar, which one is picked?
-- August -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi August,
But if we have Foo.Bar.Mod and Baz.Bar.Mod and module M imports Bar, which one is picked?
Each .Mod file will presumably begin with MODULE Bar; ... and the module name is what is used to generate the object file and symbol file. So if Bar is not already loaded, the last-compiled object file, e.g. Bar.rsc in the FPGA Oberon system, will get loaded. It really doesn't matter what the source code files are called, what matters is the module identifier. HTH Paul
Am 16.02.2020 um 01:44 schrieb rochus.keller@bluewin.ch:
It fixes a crash detected by Michael Schierl and adds a first implementation of FileDir.Enumerate so System.Directory does something (although I'm not sure yet how the prefix mechanism is supposed to work).
As the directory index in the Oberon filesystem is a B-Tree, the prefix is used to optimize the scanning to only look at pages that may contain the given prefix. So when you pass a prefix of "X", you will receive files "XY.Mod" or "X.Mod" or "X", but not "Y.Mod" or "Files.Mod". A prefix of "" will return all files. So when you call System.Directory for XY*Z*.Mod, it will pass "XY" as prefix to speed up the search. When searching for "*.Mod", the prefix will be empty and no speedup can occur. Implementations of FileDir.Enumerate are free to ignore the prefix, as the only caller in System.Mod will validate the whole filename afterwards anyway. In case the API you are using supports prefixes or globs (like FindFirstFile on Windows or glob(3) on Unix), you can of course pass the prefix too, to make the search faster. Regards, Michael
Hi Michael,
As the directory index in the Oberon filesystem is a B-Tree, the prefix is used to optimize the scanning to only look at pages that may contain the given prefix. ... Implementations of FileDir.Enumerate are free to ignore the prefix, as the only caller in System.Mod will validate the whole filename afterwards anyway.
But other clients might not - rather, expecting that Enumerate is implemented as in the book, surely? "The set of visited elements can be restricted by specifying a string which is to be a prefix to all enumerated names" https://inf.ethz.ch/personal/wirth/ProjectOberon/PO.System.pdf, p.100 Cheers, Paul
participants (6)
-
August Karlstrom -
Joerg -
Jörg -
Michael Schierl -
Paul Reed -
rochus.keller@bluewin.ch