Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Quickest way home using bitsets...

From: Rebolinth::nodep::dds::nl at: 14-Oct-2003 22:10

Hello All, After discovering the world of bitsets (they must have eaten Kellogs that morning at rebol ;-) I was wondering how crispy it could get? What im trying to accomplish is to reverse a bitset! Or better.. to extract to complete contence from a bitset! Bitsets are pritty hard on the mind and thow should not work on it all day :-) ..Still i was not able to lauch a trick to do a reverse bitset.. Assume this is the bitset: make bitset! #{ 00000000010000000000000032D19C0000000000000000000000000000000000 } How do i get back its contents? Shifting my way back through all 256 bits? I cant believe thats the only way to do it...uhum.. For those who dont know how bitsets work: a bitset is always a multiply of length? 8 (they all go by eight those little drawfs..) dwarf: make bitset! 8 will become #{00} To be able to insert some dwarfs in the bitset you can use 'insert like: insert dwarf 0 (that is, dwarf 0 is the smalest and 7 is the talest in a range of 8 dwarfs..) will result in #{01} insert dwarf 7 (after inserting a 1 into the dwarf..will become) #{81} etc...etc... can become even more fun when ending up doing upto lengths of 256 ;-) try the trick at home or in your mind "128 64 32 16 8 4 2 1" for length 8 Anyway im wandering again off the path, I know there are some real guru's here sniffing those bitsets for over more then 4 years now :-) In the land where myself is only a "urug" trying to find my way back through the bitsets and by bread is almost gone during roaming the forests. Who has help, i mean on the bitsets :-) Mmmm sounds like I eat too much kellogs ... (R)egards, Norman. -- Conversation/lunch: "How do you Eat your Rebol in the Morning?"