symbolic links?
Tim Rowledge (1742) 170 posts |
I’d like to be able to make symbolic links so that I can collect a bunch of files from various directories into one convenient place for CC to beat them up. Sure, I currently have a Makefile that refers to this file over there, that file other in that corner, oh, yes, include files are on this path… etc. Tidier would be nicer. Links would probably help. LinkFS, to my amazement after so many years, works ok to link directories but they don’t help me too much. Googling finds ancient references to a small variety of utilities that I can’t track down anymore. Anybody got current links, code, an interest in writing some? |
GavinWraith (26) 1563 posts |
I do not know whether Links on http://www.wra1th.plus.com/throw.html |
nemo (145) 2546 posts |
UnixLib supports SymLinks (1C8), but not transparently (ie its a fiddle). A module could transparently support links, but it would be best if it were via a new filetype to avoid weirdness with UnixLib and compatible apps. An ImageFS wouldn’t work, but sitting on various file vectors would. |
Tim Rowledge (1742) 170 posts |
Argh! Gavin, your Link is close but the compiler awards no cigar. Dang. Making a link to the Makefile and d-clicking that works just fine; the build proceeds as normal. Making a link to a C file fails because the compiler simply reads you link file as text and doesn’t want to play. What a pity. A new FS which supports this sort of thing would be lovely. I know there’s a big bounty related file on this site but links are quite low in the list and I don’t see any news of big progress :-( |
GavinWraith (26) 1563 posts |
I see. So you need a reference to a link to be interpreted as a reference to the link’s target? Is that how soft links in Unix work? That would require a modification of how RISC OS interprets Obeyfiles – you would need lazy rather than eager evaluation of Obeyfile expressions, or something like that. |
nemo (145) 2546 posts |
No, symlinks must be supported at the lowest levels of the file system API, not in one specific use of files (Obey). That’s why I said it would have to sit on various file system vectors. Almost all of them in fact. |
Steve Revill (20) 1361 posts |
Your only option right now would appear to be to have the makefile copy all the various source files into your temporary build directory. Yuck! |
Tim Rowledge (1742) 170 posts |
Steve, that would be plausible (although as you say a touch yuck) for a simple chunk of C code. The VM for Squeak is not simple. We have the core application, with some code portable across all the platforms that are supported and a number of platform specific files – the C main() , window handling, input event handling, timers, stuff like that. Then we have a variable but quite large number of dynamically loadable modules (I use the very fabulous rink system for this) that again have portable parts and platform specific parts – sockets, large integers, 3D graphics, gesture recognition, locales, sound sample generation etc etc. And they have so many other uses as well. Please Santa, bring me links for this year? |
nemo (145) 2546 posts |
I will have a go at knocking up a symbolic link module. |
Steffen Huber (91) 1953 posts |
IIRC, Martin Würthner did a module called “SoftLinks” in the old days (perhaps RISC OS 2?) which worked perfectly. Maybe ask him for the source? |
nemo (145) 2546 posts |
It turns out I’ve already written one, in 2001. Forgot all about it. Checking… |
Steve Revill (20) 1361 posts |
Ah, yes. I’ve done some work with that in the recent past. It’s a fairly complicated beast so I feel your pain. |
Tim Rowledge (1742) 170 posts |
Ah yes Steve, Eben has explained a bit. There will be some interesting problems we need to discuss sometime soon… |
Tim Rowledge (1742) 170 posts |
Nemo, once you’ve got symbolic links working, how about quickly putting together a real filing system like maybe ZFS? (http://www.freebsd.org/doc/handbook/filesystems-zfs.html) I realise it might be tricky with the rather large memory usage it seems to desire but we’re a clever lot and there are several of us… |
Malcolm Hussain-Gambles (1596) 811 posts |
Slightly off topic, but is the “File system improvements (Step 1)” bounty going anywhere? |
nemo (145) 2546 posts |
Turns out I wrote ‘SyLink’ already, but didn’t finish it, so it’s buggy. However, OS_Find/BGet/BPut/GBPB work so it’s pretty usable already, including from the command line (which is the important bit). OS_File is broken though. Didn’t have time to look at it over the weekend. Design choices, some may be open to negotiation:
|
nemo (145) 2546 posts |
I quote, “At a bare minimum, the total system memory should be at least one gigabyte”. Forgive me if I don’t spend too long on that. |
Rick Murray (539) 13840 posts |
Tim – have you read the ZFS wiki page? Don’t you think that is a bit overkill for a non-server OS? |
Wouter Rademaker (458) 197 posts |
maybe ext2: http://www.freebsd.org/doc/handbook/filesystems-linux.html |
Dave Higton (1515) 3526 posts |
I’ve just been copying a large number of files from a Linux system to RISC OS. There are many symlinks in the source, which means it’s impossible to get a reasonably accurate copy. So I too would like to see symlinks in RISC OS. |
Steve Pampling (1551) 8170 posts |
Given the contributions above, perhaps someone could prod nemo to open the source to the “buggy” module |