Author Topic: Who said OS/2 app development was dead? Introducing: LorgLuath!  (Read 732 times)

RTAN

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +12/-0
Who said OS/2 app development was dead? Introducing: LorgLuath!

I have a local copy of the IBM FTP server on my NAS in case it ever goes offline, along with a whole load of other Retro-related files and folders. I got kinda tired trying to use Windows Explorer to find them by filename, and I've never really found the built-in Windows Indexing service to be that great so... I wrote my own!

And then I thought "why don't I use that idea as the basis for my first ever OS/2 app as well?" Well here it is, proudly brought to you by the magic of IBM CSet++ and tested right from OS/2 2.0 (seriously) all the way up to ArcaOS 5.1.2.

So what is LorgLuath? The phrase lorg luath is Scottish Gaelic for "find fast", as in "find it quickly, rather than waiting an eon for 'dir/s' to slowly trawl each disk".

LorgLuath creates a binary index of all files and folders on any drives attached to the system - so that's obviously Drive-C, plus also any mapped network drives you may have. Then, whenever you want to find either a filename or a folder name you simply type:

Code: [Select]
ll ibm
And it will show you all filenames containing that search phrase, highlighted in red. Simple as that!

There are other options, including searching for folder names rather than file names, changing the highlight colour, and you can run a periodic update which simply updates the binary index with any changes. Full details are in the README.TXT that accompanies ll.exe and an appropriate INSTALL.CMD file in the zip download which you can get from https://www.lorgluath.com.

Feedback is welcome, but please be kind - this is my first ever OS/2 program. My background (at least so far as app development goes) is VB.NET with a little Python and a little C++. So it was quite a learning curve.

At the moment you must manually update the binary index whenever you want to do so by running
Code: [Select]
ll /update but in a future version I'm hoping to build the OS/2-equivalent of a Windows Service to do this periodically automatically (I haven't even looked-up what those are called yet).

Did I think to see whether Hobbes already contained something similar before I wrote this? Of course not! What would be the fun in that? I wanted to write something myself and it seemed an ideal first OS/2 program.

Happy LorgLuath'ing!
https://www.lorgluath.com

Richard.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5664
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • Martin's Personal Blog
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #1 on: March 24, 2026, 10:24:36 pm »
Nice !!!

I was just checking it very quick, I think you forget to put the license. Is it freeware, right?

I quickly wrote it down on the wiki: https://wiki.os2world.com/index.php?title=LorgLuath

Regards
« Last Edit: March 24, 2026, 10:44:38 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

RTAN

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +12/-0
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #2 on: March 24, 2026, 11:13:35 pm »
Hi Martin,

Good catch! Thanks for that, and for adding it to the Wiki. It is indeed freeware. I've now added a licence statement at the bottom of the home page and I'll include a LICENCE.TXT file in the next build.

Richard.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5748
  • Karma: +150/-1
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #3 on: March 25, 2026, 12:27:19 am »
Hi Rtan, good idea as good search programs are short on OS/2.
Problems, seems to be C: orientated. Many use a different boot disk besides C: which traditionally was reserved for DOS and/or Windows. I'm using W: (and others) for a boot volume and the install procedure tried to update C:\config.sys.
Perhaps adding it to the PATH should be optional.
Program object would be nice and REXX can do it. I think REXX can figure out your boot volume too, though I'm far from an expert,
Thanks for your work

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5748
  • Karma: +150/-1
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #4 on: March 25, 2026, 12:43:53 am »
Tried indexing, it died.
Code: [Select]
[H:\tmp\LorgLuath-OS2-v1.1a]timex ll /index all
LorgLuath v1.1a, (c) 2026 Richard T.A. Neal, find files FAST

Probing drive A: not ready
Probing drive B: not ready
Probing drive C: ready
Indexing C:  files 563542  folders 62059  C:\work\qt6-os2\qt6-webengine-os2\...
Probing drive E: ready
Indexing E:  files 53835  folders 3120  E:\Mozprofiles\Mozilla\SeaMonkey\Pro...
Probing drive F: ready
Indexing F:  files 37933  folders 3001  F:\XFree86\xfree86\lib\X11\.gimp-1.2...
Probing drive G: ready
Indexing G:  files 352322  folders 36669  G:\work\cc45-git\mozilla\mobile\an...
Probing drive H: ready
Indexing H:  files 4879  folders 408  H:\tmp\trunk\.git\logs\refs\remotes\or...
Probing drive K: ready
Indexing K:  files 164199  folders 181910  K:\lm3cddb\rock\
ERROR: indexing failed on K:
Elapsed time: 45.96 seconds
Lots of files on K: and actually trying to run du on it hangs
Code: [Select]
56M     ./lm3cddb/other/Cat Stevens/Greatest Hits
56M     ./lm3cddb/other/Cat Stevens
Perhaps a bad file. Hmm, seems to be an inode problem, trying to use FC to change into the directory reads like a TB and dies. Dir /s gives  a sys0002, The system cannot find the file specified. Guess a bad file name or an inode pointing where it shouldn't. I'll try a chkdsk.
We don't really services, closest is likely detach, help detach. There are tricks to get the PID and have another program to kill, restart etc the detached program.
« Last Edit: March 25, 2026, 12:46:27 am by Dave Yeo »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5748
  • Karma: +150/-1
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #5 on: March 25, 2026, 07:10:59 am »
On my drive K: error. Chkdsk didn't help. Backing it up, I saw,
Code: [Select]
rsync: opendir "k:/lm3cddb/other/Crosby Stills Nash & Young" failed: Not enough
memory (12)
file has vanished: "k:/lm3cddb/other/Neil Diamond/The Essential Neil Diamond (CD 2)/12 DESIR"
file has vanished: "k:/lm3cddb/rock/Sin"
file has vanished: "k:/lm3cddb/rock/Crosby Stills Nash & Young/D"
At that point SM died, and looking at memory use after the memory failure, rsync was using 2.75 GB's and my swap was at 150 MB's. I have 16 GB's of ram with 3.5GB accessible.
I'll have to format the volume to recover or perhaps try deleting the bad directory using Linux.
It does remind me that Cset++ has no knowledge of the high memory arena and that once you get your program working well, you might want to port it to a newer compiler that can handle the high arena. Newer toolkit too.
The high arena is memory that is above the 1GB barrier and only accessible on Warp 4.5+, and unaccessible to 16 bit code. Low shared memory is a scarce resource.
Suggestion, allow the user to decide on which partitions to index, perhaps with an ini file or such.
Does it support wild cards?

RTAN

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +12/-0
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #6 on: March 25, 2026, 04:56:47 pm »
Hi Dave,

Thanks very much for your detailed feedback. In the next version I'll see if I can detect the boot volume and correct location of CONFIG.SYS and offer to update it rather than forcefully doing so.

For the time being if you want to index just specific drives you can do this as follows:

ll /index c d e f

And then an "ll /update" will only update those drives (actually, I'll double-check that!)

Yes, it supports wildcards including * and ?

I'll update the README and inline help text in the next version as well, so as to better explain those wildcards.

On your point about switching to a different compiler: my intention was actually to have something that worked on as old a version of OS/2 I could manage (i.e. OS/2 2.0). If I were to switch to a different or newer compiler, would you be kind enough to recommend something that would at least retain compatibility with Warp 3 FP43?

Thanks,
Richard.

RTAN

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +12/-0
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #7 on: March 25, 2026, 06:43:18 pm »
Just another quick question Dave: hopefully you don't think my directory crawling routines contributed to your disk corruption in any way, but if I've misunderstood and you do think that then please let me know so I can pull the download straight away.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5748
  • Karma: +150/-1
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #8 on: March 26, 2026, 03:51:23 am »
Just another quick question Dave: hopefully you don't think my directory crawling routines contributed to your disk corruption in any way, but if I've misunderstood and you do think that then please let me know so I can pull the download straight away.

No, your software just exposed it. At some point I screwed up and didn't have UNICODE.SYS loaded and one of those songs probably had a title with weird characters in it, So maybe a code page problem. It's good that your software exposed it. Looking at the log, the error appears to have appeared in a backup I did on Jan 28, so been there a while, I don't back up that volume very often as not much changes.
Played a bit more with less indexing, the program works well and is it fast, partially due to the nVME device.
Keeping compatibilty with OS/2 2.0 or at least the latest Warp v3 does limit things. Perhaps OpenWatcom is the best choice. Depends on which toolkit you use too. Generally advised to use the latest os2tk45.
Features could be detected and worked around for older versions of OS/2. Or a macro like from sqlite3,
Code: [Select]
#if defined(MOZ_OS2_HIGH_MEMORY)
                DosAllocSharedMem(&pvTemp, (PSZ)shmName, szRegion,
                  PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_ANY) != NO_ERROR &&
#endif
                DosAllocSharedMem(&pvTemp, (PSZ)shmName, szRegion,
                  PAG_READ | PAG_WRITE | PAG_COMMIT) != NO_ERROR ) {
              rc = SQLITE_NOMEM;
To allow allocating in the high arena.
Of course if you don't need much memory...

RTAN

  • Jr. Member
  • **
  • Posts: 88
  • Karma: +12/-0
Re: Who said OS/2 app development was dead? Introducing: LorgLuath!
« Reply #9 on: March 26, 2026, 11:28:27 pm »
Thanks for taking the time to reply Dave, I'll take a look at OpenWatcom and see if I can switch to that as a compiler.

Thanks for the code snippet as well. I use Sqlite in the Win11 version but didn't do so in the OS/2 version because of how old a version of OS/2 I was targeting. Perhaps I should revisit that and plan to target something newer instead.

I do hope you manage to get your file system corruption back under control, or at least restore from a known good backup  :(