[REBOL] How to obtain a 64-bit IEEE754 representation of a decimal number
convert: func [ x /local y ] [ y: make struct! compose/deep [x [(type?/word x)]] reduce [x] third y ] Usage: convert 0.2 ; == #{9A99C93F} this is a big endian form of the number (in Windows). If you prefer a little endian form, which is more (human) readable, use: head reverse convert 0.2 ; == #{3FCA} -Ladislav -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: How to obtain a 64-bit IEEE754 representation of a decimal number
Hi Ladislav, convert: func [ x /local y ] [ y: make struct! compose/deep [x [(type?/word x)]] reduce [x] third y ] OK, this one has me stumpted. For us mere mortals, could you explain: help y Y is a struct of value: make struct! [x [decimal!]] [0.2] first y == [x [decimal!]] second y == [0.2] third y == #{9A99C93F} how and why this works, in particular where third y comes from? Also, how does one reverse the conversion (i.e. get 0.2 from #{9A99C93F} )? I assume this is another useful spinoff from the rounding project? ;) Regards, Ashley -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: How to obtain a 64-bit IEEE754 representation of a decimal number
Hi Ashley, On Monday, February 2, 2004, 2:32:09 PM, you wrote: AT how and why this works, in particular where third y comes from? I think it is documented in the struct! docs... AT Also, AT how does one reverse the conversion (i.e. get 0.2 from #{9A99C93F} AT )? s: make struct! [val [decimal!]] [0] change third s #{9A99C93F} == #{} s/val == 0.2 Regards, Gabriele. -- Gabriele Santilli [EMAIL PROTECTED] -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/ -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: How to obtain a 64-bit IEEE754 representation of a decimal number
Hi Ashley, convert: func [ x /local y ] [ y: make struct! compose/deep [x [(type?/word x)]] reduce [x] third y ] OK, this one has me stumpted. For us mere mortals, could you explain: help y Y is a struct of value: make struct! [x [decimal!]] [0.2] first y == [x [decimal!]] second y == [0.2] third y == #{9A99C93F} how and why this works, in particular where third y comes from? Also, how does one reverse the conversion (i.e. get 0.2 from #{9A99C93F} )? This is a library interface, which is documented in: http://www.rebol.com/docs/library.html , where I found the informations needed to write the above function as well as: http://www.compkarori.com/vanilla/display/peek_and_poke.r reverse-conversion: func [ x [binary!] type [word!] ] [ y: make struct! compose/deep [x [(type)]] none change third y x y/x ] Usage: reverse-conversion #{9A99C93F} 'decimal! ; == 0.2 I assume this is another useful spinoff from the rounding project? ;) Not exactly, it is mostly independent. Regards, Ashley -L -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] [REBOL.org] Recent changes
[REBOL] [REBOL.org] Recent changes This is an automatic email from REBOL.org, the REBOL Script Library to notify you of recent changes to the Library. ===changes=== dragbar.r --change: new script --title: Titlebar Replacement garmin-protocol.r --change: new script --title: garmin gps protocol get-stock.r --change: new script --title: Download stock data ieee.r --change: new script --title: IEEE-32 ngbg.r --change: updated script --change: discussion post(s) made --title: National Geographic Image of the Day Downloader ===additional information=== new and updated scripts: http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?special-filter=recent recent discussion: http://www.rebol.org/cgi-bin/cgiwrap/rebol/cpt-active-posts.r ===end=== --The Library People --2-Feb-2004 -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Full text indexing
Hello Graham and rebolers, I did full text indexing in rebol back in 1999 or 2000 as one of my first rebol learning projects. (This is an old bunch of rebol code and I have not updated it since then.) You can see the result here: http://vvn.net/bible/ (Works with rebol 2.x.x and up I think.) If you want the source, I can dig it up and ship it to you or re-package the basic functions for use by rebol.org. This full text indexer parses all the words in the body of text first and produces the index file (one time) and then compares query requests to index before displaying the actual text. - Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Graham Chiu Sent: Sunday, February 01, 2004 2:59 PM To: [EMAIL PROTECTED] Subject: [REBOL] Full text indexing Has anyone done any full text indexing in Rebol, or implemented the Burrows Wheeler transform for searching? -- Graham Chiu http://www.compkarori.com/cerebrus -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Full text indexing
Hello Doug, You wrote: === I did full text indexing in rebol back in 1999 or 2000 as one of my first rebol learning projects. If you want the source, I can dig it up and ship it to you or re-package the basic functions for use by rebol.org. This full text indexer parses all the words in the body of text first and produces the index file (one time) and then compares query requests to index before displaying the actual text. I think this would be a welcome addition to get the sources here to be put into the rebol.org as you suggested. Many people would probably learn much by comparing the current search algorithms with any existing code that accomplish this task. Thanks, Gerard -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Full text indexing
REBOL.org does full word indexing on all contributed scripts. All the code is in the download, of you want a look: http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-librarian.r The indexing programs are: librarian/support/make-header-idx.r librarian/support/make-words-idx.r Though this part of the site is due for an overhaul -- it has some limitations now there are over 500 scripts. I'd be interested at looking at alternatives, Sunanda. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Full text indexing
Vos, Doug wrote.. apparently on 2-Feb-2004/13:07:44-5:00 If you want the source, I can dig it up and ship it to you or re-package the basic functions for use by rebol.org. Hi Doug, that would be great if you could do this. This full text indexer parses all the words in the body of text first and produces the index file (one time) and then compares query requests to index before displaying the actual text. Can the index file be updated? I know the Bible is immutable ... -- Graham Chiu http://www.compkarori.com/cerebrus -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: Full text indexing
The rebol source for this project is on another archive right now, so I will have to upload in next 24 hours. Can the index file be updated? I know the Bible is immutable ... This system works best when the complete length of text is known at the beginning. In the case of the Biblical text, it started as 6 megs and compressed to 1.5 megs. (Also uses rebol compress/decompress -- compresses a chapter at a time for fastest decompression). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Graham Chiu Sent: Monday, February 02, 2004 2:08 PM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Full text indexing Vos, Doug wrote.. apparently on 2-Feb-2004/13:07:44-5:00 If you want the source, I can dig it up and ship it to you or re-package the basic functions for use by rebol.org. Hi Doug, that would be great if you could do this. This full text indexer parses all the words in the body of text first and produces the index file (one time) and then compares query requests to index before displaying the actual text. Can the index file be updated? I know the Bible is immutable ... -- Graham Chiu http://www.compkarori.com/cerebrus -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject. -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Re: This is dumb (don't do it!)
Dixit [EMAIL PROTECTED] (18.29 30.01.2004): Hi Hallvard, [...] I tried to find a foolproof way of doing this for something we needed or REBOL.org. I failed. [...] If you find a better solution, please let me know! Well, I don't know if this will work, it's only an idea: You keep two CGI scripts, C1 and C2. C1 redirects to C2 with a 302 HTTP header. Now if C1 is unaffected by the browser suddenly giving up and passing on to somewhere else, it may quietly do its background task without anyone waiting. What the other end user will see is only what is written by C2. Does web servers somehow detect if requesting browsers no longer listen? And if so, do they kill CGI child processes? I wouldn't believe so. Just a thought HY Prætera censeo Carthaginem esse delendam -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.
[REBOL] Proposal: REBOL Documentation indexing system for newbies
Hello Rebolers, I finally thought of some structure to help index all the REBOL related Documentation available, be it to any existing format from paper to various electronic ones (HTML, XML, PDF, FLASH, script). And this includes the many sources too : Existing and to come paper and electronic books, tutorials and scripts, mailing list archives, past and current articles and discussions held into Forums, chats, wikis, vanilla, AltMe and IOS sites, and every other we could think of. I don't pretend to index all individual pieces but instead the many active and latent sources where REBOL is discussed in some way - trying to classify the many contributions by attributing them keywords and enabling some full text search over these keywords. Like is currently done for ML archives and scripts contained into the Official Library. But I will need some help for deciding the many categories to be finally used since they could also be used for the Library and any other REBOL related similar work. I tried at some of them in the enclosed documents but the list is neither definitive or exhaustive. It's work in progress. Try to think of it at it as being a cross indexing tool for the many following POVs that our community members share : As a newcomer that has questions to ask related to those general aspects : Where can I find help about something, Where to start, Where to get, What can be done with, How to download, install, configure, What if, How-to applied to each phase of the software development cycle (individual language construct learning oriented, task based oriented, problem-solving oriented, debug or test oriented, doc oreinted) and the most hard to answer Why does REBOL do that this way or How is REBOL doing this (can even relate to the internal mechanisms or structure of REBOL or some Dialect like Draw, VID and View - and many of them are missing or must be found the hard way by studying at the REBOL sources which already implies some advanced knowledge of the language constructs). As a more advanced programmer that has to develop some quality code to be shared with other community members or even external programmers when contracting, put code into some library, test it and ensure it to be reusable. Use all the toolkit the pros use : compression/decompression, encode/decode, loader, distributed programming and the like. May be some models are no more necessary when programmers arrived at this level come from another programming environment/language where they have already learned to use all these tools but some demo is nevertheless needed for others that didn't follow these usual tracks so they can't get any help from other sources than the REBOL World itself since they don't know any other language or existing tool and often don't even know the techniques that go hand in hand with these. As a teacher who wants to put together most of these questions and try to answer them with his own limited knowledge of the REBOL language with its internals and his own limitation as a programmer so he must also refer to some documented (or live as here) knowledge somewhere to put some script to work and help newcomers and intermediate programmers too. But this fact must also reflect into the indexing and documentation I plan to produce. Here is the first try I did to put together a global indexing system for all the doc about REBOL that a newbie can find anywhere - to be referred to a new source must be known to me and must acknowledge its content to be shared by others too. Enclosed are 2 files of my first general index for review and comment. The first is the .txt that was used by make-doc-pro to produce the other HTML output. Except if you don't think it's a good idea or don't like the complete proposed structure of the document - in the case which you can suggest another one, I'd like to receive annotations about individual sections only. Don't send back the complete .txt document since it would be too long for me to locate the part of the text which was modified by the submitter. After compiling all the data received - if any - I will send the revised document. It is possible that I go to the codeur.org forum to submit it there for review and discussion too since Didec and Jason offered me to help. However I wanted everybody to know what was our work basis. Feel free to suggest any add-on to any current section. We'll take every submission into account and we'll see if each one can be kept or not. We'll advise and explain any submitter when his submission can't be taken into account. Regards, Gerard -- HTML Attachment decoded to text by Ecartis -- -- File: REBOL-Doc-Structure.html @media screen { h1,h2,h3,h4,h5,p,a,br,li,td, .underline {font-family:Arial;text-align:justify} hr {text-align:center} p,table {margin-left: 10px;margin-right:10px} .defword {white-space:nowrap} .deftable{border-style:none;vertical-align:top} .deftablefaq