From: "Booker C. Bense" Date: 2005-01-27T03:40:50+09:00 Subject: Re: When little languages grow... -----BEGIN PGP SIGNED MESSAGE----- In article <20050126175623.GB35232@topi.cc>, why the lucky stiff wrote: >Hugh Sasse Staff Elec Eng (hgs@dmu.ac.uk) wrote: >> The application is immaterial at the moment, but the problem is that >> I need to do more than can be done with a simple case statement, and >> if I were to use case statements managing the problem would get too >> big. >> >> ... >> >> So the next possibility is to use something like >> >> input = nil >> File.open("input.txt"){|f| >> input = f.read >> } >> Thread.new(input){|source| >> $SAFE=5 >> instance_eval source >> }.value >> >> or something, and actually make the commands in the language methods >> of some Ruby object. > >I hear ya. I wish there was a way to open a jailed namespace. It'd be >like chroot'ing into a module. The sandbox module would be addressable >from ::Object, but would only include a limited set of modules when >offered under chroot. > _ This is the one place that Tcl ( at least circa 1994 Tcl ) absolutely fits like a glove. There was a client/server program called sysctl written by some guys at IBM that allowed you to assign ACL's to every command in the language. I've never seen any other secure distributed scripting system that comes close. _ Of course it was vast overkill for 99% of what you need to do with that kind of system. As much as I dislike Tcl for other reasons, it is a very good language for extending applications via simple scripting. Adding your own specialized commands is fairly straightforward. I know quite a few scientific groups that are using Python to do similar things these days. _ Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBQffjDWTWTAjn5N/lAQFKYwQAi4pUuXmOO4gMR4Ul1+Ncw7d6CjShbLmG Kw+mdnot3lZ0/TDgk/O4ufwCyZFoVPDzqFAdI6HYEuV+3cOaaRYaErYvwElc7yo8 mGzbMuLMBZSFR9wT2/LybOUt3ct8ZOUqhTaHZH3sdsQCjs/kx3THPJ4DzYITmxlt w2P12rsJUCs= =mQrp -----END PGP SIGNATURE-----