Reply
Thread Tools
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#91
Things that are shared, could go under their own subfolder insider a folder dedicated for shared things, no need to pile everything.

In messy situations where one program needs one version and the other program needs another version and the thing they need different versions wasn't designed to have more than one version in the system, with Windows we just use the order where things are looked for, first in the folder where the executable is, and then in %PATH% (there are probably some other steps in between and perhaps beyond, and i think each folder listed on %PATH% is checked in order, not sure if it's starting with the first or the last); i don't see why a similar approach couldn't work under Linux.
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#92
Originally Posted by RFS-81 View Post
- accessing/modifying registry from shell scripts is *not* fun
It fully agree with you - the biggest advantage of Unix was a capability to explore and modify of all system objects via a regular file system tools.

Unfortunately, it is near gone now...
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#93
Originally Posted by wmarone View Post
Which is a disaster, since you need to go through the step of exporting it to a file.
it's jsut one or two steps more than looking for the right file to send


Originally Posted by wmarone View Post
...


Certainly more complex than opening and reading/writing from a text file. And the registry isn't human readable without using the registry editor or first exporting to a .reg file.

Linux is not Windows. It is really that simple.
From what i remember, to read you called a system function specifying the path of the key, and to write it was the same, but you also specified the type of data and the contents.
 
Posts: 1,746 | Thanked: 2,100 times | Joined on Sep 2009
#94
Originally Posted by TiagoTiago View Post
Things that are shared, could go under their own subfolder insider a folder dedicated for shared things, no need to pile everything.
But why? Why bother doing that when you have software with its own database designed to track things automatically?

The only reason this is necessary under windows is due to the total disconnect between software vendors who end up using the exact same names for their executables and libraries. As it stands, anything program specific is parted out into its own directory.

In messy situations where one program needs one version and the other program needs another version and the thing they need different versions wasn't designed to have more than one version in the system, with Windows we just use the order where things are looked for, first in the folder where the executable is, and then in %PATH% (there are probably some other steps in between and perhaps beyond, and i think each folder listed on %PATH% is checked in order, not sure if it's starting with the first or the last); i don't see why a similar approach couldn't work under Linux.
Because in Windows it is a disaster due to everything shoving .dll after .dll in System32 to the point that they had to create WinSxS to get around the DLL hell that pops up constantly.

Do you really think we are unfamiliar with the way things are done in Windows?

Originally Posted by TiagoTiago View Post
it's jsut one or two steps more than looking for the right file to send
After digging up the right key and exporting it to a file. In *nix I just hop into /etc and SCP the file to the machine I want. And it works with no extra steps.

From what i remember, to read you called a system function specifying the path of the key, and to write it was the same, but you also specified the type of data and the contents.
Right, whereas a plaintext config file in *nix needs little more than fopen() and fscanf() to parse the contents (and it works across multiple platforms!) You can always use more complicated libraries, but generally they aren't necessary.

Last edited by wmarone; 2010-10-12 at 19:15.
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#95
Originally Posted by TiagoTiago View Post
Things that are shared, could go under their own subfolder insider a folder dedicated for shared things, no need to pile everything.
Basically, you recreate a something like Unix file system tree in registry. Windows registry just separates two basic functions via link layer here - file place allocation and file search. For both some tree-like structure is needed.

There are advantage in this approach, yes, but it also has big disadvantages - consistency (because a new link layer) and accessibility - Unix approach gives you a way to use a generic file system search/list/modify tools but a separate registry approach has a lot of restrictions here.

In messy situations where one program needs one version and the other program needs another version and the thing they need different versions wasn't designed to have more than one version in the system, with Windows we just use the order where things are looked for, first in the folder where the executable is, and then in %PATH% (there are probably some other steps in between and perhaps beyond, and i think each folder listed on %PATH% is checked in order, not sure if it's starting with the first or the last); i don't see why a similar approach couldn't work under Linux.
Hm-m, that is a different story and I agree with you on word 'messy' here. I wrote about just plain example then only one version is installed and it was for case of search file via registry which could have different key locations for both versions.
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#96
What is the point of having thigns actually be just files in the filesystem if it's just a mess of things piled up in the same place? If there is a whole layer of software making that mess not be a mess, then whats the point of using the file system ?


The point is having things be organized, if there is need to always know where somthing is, don't hardcode a path, use a way that no matter where the things is, you know it (like an environment variable, or identifying the path for the thing somewhere, be it a registry, or a filesystem abstraction like symlinks that always have the same name, under a folder that is always the same etc). Hardcoding values that people might have some reason (even reasons you can't think off) to want to change, is a bad habit.




Regarding messing with the registry with Visual Basic, a quick google search led me to this: http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx ; i don't think that was the approach i used at the time, it involved a few more steps to have things set up, but either way, it's somthing quite simple, about as simple as messing with text files in arbitrary paths.

Last edited by TiagoTiago; 2010-10-12 at 19:34.
 
ZogG's Avatar
Posts: 1,389 | Thanked: 1,857 times | Joined on Feb 2010 @ Israel
#97
anyway i feel like really good trolling here, you don't like it (or don't get it) just don't use it. people here gave u a lot of options(LFS or gentoo or self compiling e.g.). btw there is project to make all programs executables without installing them at all so u can put them anywhere(google for it). and once again after first 1-2 pages i think it's trolling. don't feed the troll
 
ZogG's Avatar
Posts: 1,389 | Thanked: 1,857 times | Joined on Feb 2010 @ Israel
#98
Originally Posted by TiagoTiago View Post
What is the point of having thigns actually be just files in the filesystem if it's just a mess of things piled up in the same place? If there is a whole layer of software making that mess not be a mess, then whats the point of using the file system ?


The point is having things be organized, if there is need to always know where somthing is, don't hardcode a path, use a way that no matter where the things is, you know it.
that's the point, and if i come to visit you and i want to use your comp i wouldn't need to use find tools to get programs running and so on. that's why there is simple universal things that are made for everyone so it would be easy.
 
Posts: 1,522 | Thanked: 392 times | Joined on Jul 2010 @ São Paulo, Brazil
#99
If someone comes visit me and asks to use my computer, i ask them what they want and either do it for them, or put it on the site they want before leaving the chair, or boot up my secondary machine.... ¬.¬
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#100
Originally Posted by TiagoTiago View Post
What is the point of having thigns actually be just files in the filesystem if it's just a mess of things piled up in the same place? If there is a whole layer of software making that mess not be a mess, then whats the point of using the file system ?
It is easy to do a mess with registry too. Registry just creates some order but this order has it's own problems.


The point is having things be organized, if there is need to always know where somthing is, don't hardcode a path, use a way that no matter where the things is, you know it (like an environment variable, or identifying the path for the thing somewhere, be it a registry, or a filesystem abstraction like symlinks that always have the same name, under a folder that is always the same etc). Hardcoding values that people might have some reason (even reasons you can't think off) to want to change, is a bad habit.
Good point about order.

However, the hardcoded path problem does exist only in N900. The messy file location may be a problem too but I suspect you just don't know yet the reason why this file is put in that place.

And again - messy environment is easy to do with registry too. It is just M$ who maintain some order in Windows registry, without them it could be a bigger mess (I just remember the early days of Windows).
 
Reply

Tags
nerd rage, whatthef?


 
Forum Jump


All times are GMT. The time now is 17:44.