From: Ryan Leavengood Date: 2001-10-30T02:36:34+09:00 Subject: [ruby-talk:23735] RE: Some inspirations from REBOL > However, it's got some nice properties that my friend has been "hitting" > me with. Below is a summary of some REBOL niceties. I wrote it after > checking out the docs on the REBOL site and trying some very simple > scripts. I'm sure its a very incomplete description of REBOL's nice > features but anyway... I've also taken a cursory look at REBOL and agree that is has some neat features. > R2. Internet protocols can be used very easily > ---------------------------------------------- In our increasingly networked world I think this is very important. As already mentioned Ruby has this covered quite well in the Net modules, but I agree a view convenience methods to make it really easy would be nice. Adding easy-to-use support for some of the new protocols coming out (i.e. Web Services) would also be great. I'm sure Rich Kilmer agrees with me on that one :) > R3. All scripts have headers with meta-info > ------------------------------------------- [snip] > RF comment: > I think this is nice even if it shouldn't be mandatory. Similar to whats > been discussed in Raa.succ/RubyGems threads. Though this is nice at a per script level, I think in most cases the metadata really applies at a higher level (like an entire library or application consisting of many script files.) Therefore I think the RubyGems approach of bundling the metadata in a file along with the scripts it applies to is better. But I'm a bit biased in that regard :) But scripts could still use some standard documentation method, which is another huge issue we have yet to solve. > R4. Rebol can be specialized to a special domain by defining a dialect > ---------------------------------------------------------------------- [snip] > The included parser is nice since its so easy to use. You can probably do > most of it with Regexps and code or revert to a parser generator for more > complex stuff. Might be nice with a really simple convenience layer on > top of a parser gen. I plan to add something along these lines to Rockit > but its not high prio. I agree that changing the language syntax is not the way to go, but having an easy to use parsing system would be very nice. I need to take a look at Rockit... > R5. Visual Interface Dialect for writing GUI's > ---------------------------------------------- [snip] > RF comment: I think its a good thing to be able to create GUI's with a > minimal of effort. I don't know the existing GUI's for Ruby very well so > maybe something like this can already be done. If not it might be a good > candidate for the top-level GUI abstraction layer? Then GUI binding > authors can write classes that map the simply top-level stuff to their > specific GUI. This sounds quite similar to the Python AnyGUI project mentioned in [ruby-talk:23687]. I liked what I saw in the AnyGUI article and agree that this may be a good approach for solving the ever-present user interface issue. But I also like the idea of a native Ruby GUI (i.e. Swing for Ruby.) > R6. Compression built-in > ------------------------ > compressed_string: compress string > > to compress and > > decompress compressed_string > > to decompress > > RF comment: I think we need to add this ASAP. And written in Ruby not > in extension. We need portability. > > I think Ryan Leavengood has planned to add zlib's deflate > algorithm. That's probably good since its so common but I'd propose using > LZO since its the fastest when decompressing and still compresses almost > as good or sometimes even better than deflate. This can be important if > the gems can be compressed and needs to be decompressed by interpreters > when loaded. Look at > http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html. The license is GPL so not > a problem, or? My work on deflate has been postponed for some time while I work on RubyGems. I actually wasn't able to get the decompression working (nor the compression which I haven't even started on yet.) But I have the basic algorithm written. I think it is just a matter of the way I'm handling the bits. I took a quick look at the LZO page and it looks like an interesting alternative to deflate (though I agree that deflate support is still needed.) It might be easier for me to do LZO first since it sounds like an easier algorithm (though I haven't looked at the details yet.) Deflate is a little complicated since it combines Huffman coding with some LZW type stuff. In the long run I think having support for the major non-patented algorithms (deflate, LZO, bzip2) in pure Ruby would be great. Also, in a similar vein to the Net module convenience methods, making the compression as easy to use as in REBOL is a must. Probably by just adding compress and decompress methods to Object: require 'compress' # Theoretical name str = 'something long...' compressed_string = compress(str) # default to LZO? bzip2_string = compress(str, Compress::Bzip2) # decompress automatically determines the method to use str2 = decompress(compressed_string) str3 = decompress(bzip2_string) # str2 == str3 > R7. Encryption built-in > ----------------------- > Same as R6 but for encryption/decryption of data. I'm unsure which > algorithms they include. > > My comments are similar as in R6 but to me this is not as high on the > prio as compression. Probably choose one of the latest algorithms and > base on an existing implementation since there are pitfalls when doing > these things... This is also something I've considered doing. Probably with exactly the same design and use as the compression stuff. But after doing a compression library I may have had my share of bit-munging. > R8. Request broker Rugby > ------------------------ [snip] > RF comment: We almost have this in dRb, but again I think we could > simplify its use with some convenience methods. In the commercial version > of REBOL you can have security in the communication. When we have some > encryption routines written in Ruby it should be simple to add. Again it seems like REBOL just makes this a shade easier than Ruby does. But not much. It seems like the whole theme here is making things which can be really hard in other languages really easy in Ruby (which is part of the nature of the language.) We can take the examples we see in REBOL and make the same thing happen in Ruby. In most cases it seems to just involve adding a few convenience methods. Let's do it! Ryan Leavengood