World: r3wp
[Core] Discuss core issues
older newer | first last |
Anton 4-May-2007 [7796] | I think it was decided some function will be built into R3 which makes refinement and argument propagation easier. |
Gabriele 4-May-2007 [7797] | and that would be APPLY |
Henrik 6-May-2007 [7798] | A question: Does anyone know the ratio of mezzanine vs. native functions in a standard REBOL/View 1.3.2? I'm trying to use that as a statistical argument of how much of REBOL 2 is currently open source. :-) |
Sunanda 6-May-2007 [7799] | These two lines get you close to a answer help function! help native! May also need to count various things in the system object as available source (not quite *open* source) |
btiffin 6-May-2007 [7800] | Hi, I've been pondering electrical circuits. Should NOT none return none? low voltage NOT should be high, high voltage NOT should go low, but a zero voltage NOT should be no volts? No? |
Sunanda 6-May-2007 [7801] | REBOL has slightly wonky three-value logic: (not none) = (not false) == true >> none = false == false |
btiffin 6-May-2007 [7802] | Yeah, I was looking at that. The output wire I have on a NOT circuit is always lit. I have to test for "no input" along with the 1's and 0's. :) |
Gregg 6-May-2007 [7803] | I would say a zero voltage is zero volts which, in that domain, might be called a lack of voltage, or no voltage. i.e. a REBOL none value is not the same as no voltage, but you might have a NONE? func in that domain that means "zero? volts". |
btiffin 6-May-2007 [7804] | I'm coding an interactive half-adder circuit today. The NOT gate outputs are lit even if the "circuit" doesn't have any virtual power running through it. Easy to work round but this was more of a theoretical. :) In real life, a NOT gate doesn't go high for no-volts, only low-volts no? I don't know enough. :) |
Anton 7-May-2007 [7805x5] | Henrik: |
result: [] foreach word first system/words [ if value? in system/words word [ type: type?/word get in system/words word either blk: select result type [ append blk word ][ repend result [type reduce [word]] ] ] ] print ["actions:" length? result/action! "natives:" length? result/native! "funcs:" length? result/function!] | |
actions: 120 natives: 137 funcs: 238 | |
(and don't forget op!) | |
Brian, Gregg, in electronics, which of high and low voltage is considered "true" and "false" can be different in each circuit. | |
Henrik 7-May-2007 [7810x2] | anton, interesting, thanks |
does RENAME not support renaming dirs? | |
Pekr 7-May-2007 [7812] | RENAME - new name for Rebol :-) Rename your toolset :-) |
Maxim 7-May-2007 [7813x2] | I would have thought someone would have suggested Do |
cause you just want to DO stuff. | |
btiffin 7-May-2007 [7815] | Terminology question. For proper REBOL terms, now is a native! But is it a misnomer to say function? The question came up as I'm trying to describe now/time. Can I say function, or is it more properly the verbose "time refinement of the now native"? |
Sunanda 7-May-2007 [7816] | RT seem happy the word function in both cases: http://www.rebol.com/docs/dictionary.html Perhaps we have to distniguish two types: native and mezzanine. |
btiffin 7-May-2007 [7817x2] | I'm aiming a lot of the Usage docs at beginners, but I don't won't to pollute the purity of the terminology too soon in their careers. ;) |
In this case, (I'm doc'ing the timer and timing related scripts) I think I'll go verbose. | |
BrianH 7-May-2007 [7819x2] | As long as you don't elaborate on the differences between natives, actions and ops on every reference to functions of any of those types, then it is cool to use the term "native" to refer to all of those. The only things that matter about the difference between native and REBOL functions are the speed of natives and the available source code of REBOL functions. |
IMHO | |
btiffin 7-May-2007 [7821x2] | Thanks for the opinion Brian. Noted. |
I can usually get away with the expression 'utility' when doc'ing the library scripts, but I don't want to slip up too many times. :) | |
BrianH 7-May-2007 [7823] | I usually reserve "utility" for standalone scripts, not library functions. |
btiffin 7-May-2007 [7824x2] | A lot of the library scripts are "stand alone". Hopefully that situation will change as we progress. |
We (well some smarter guys) are hard at work defining a real library function library :) | |
BrianH 7-May-2007 [7826] | I don't mean scripts from the script library, I mean functions that are meant to be part of an API. |
btiffin 7-May-2007 [7827x2] | Yeah, understood. Right now I'm putting up Usage docs for the more 'fluffy' rebol.org entries. Meaty docs should start soon. |
Fluffy may me the wrong term. There is a lot to learn in the samples. | |
Chris 8-May-2007 [7829] | >> any-function? :now == true |
TimW 10-May-2007 [7830] | Well, I didn't know where to ask this, so maybe here is a good place. x: load/markup http://www.xanga.com/timwylie/588202056/item.html then look at x/211, It's a big chunk of tags. Why? The only issue I can see is that the first tag at 211 has two quotes in a row. Any help in fixing this problem? |
Henrik 10-May-2007 [7831x2] | looks like the double quotes are throwing load/markup off |
so it thinks the rest is a big string inside the tags | |
Gregg 10-May-2007 [7833] | If that's the case, check RAMBO and submit it if it isn't there already. |
Anton 10-May-2007 [7834x2] | We should try to isolate the problem first. |
A huge bunch of html isn't very useful. Can you make a small example of the problem. | |
Gregg 10-May-2007 [7836x3] | >> load/markup {<span id="xprofimg"">} == [{span id="xprofimg"">}] |
Looks like it can't load it, so just returns the whole thing, unparsed, as a string. | |
Because of the trailing open quote. Remove that and it parses. | |
Anton 10-May-2007 [7839] | Good Gregg. This issue came up years ago. Load/markup only accepts perfect input. |
TimW 10-May-2007 [7840] | Well, that's what I was afraid of. Thanks guys. I'll just have to parse it another way. |
Oldes 10-May-2007 [7841] | I never found load/markup useful for getting data from html content... using just parse is faster and safer |
btiffin 10-May-2007 [7842] | TimW; Haven't tried it, but check mdlparser.r in the rebol.org library. It make work round some of the problems. |
Anton 10-May-2007 [7843] | Yes, you can't rely on html to be well-formed. In my web data extractors, I found that brutish, direct methods required less code and were less brittle than methods that tried to parse each html tag correctly. |
TimW 10-May-2007 [7844] | Well, I guess I'll just parse the string. I'll check out the other script as well. Thanks. |
Anton 10-May-2007 [7845] | One of the problems is that the format of web pages changes often. Web developers don't hand out any guarantee that the format of their data in a html page is going to be in the same place all the time. eg. I can' t always go to the second table inside the fourth row of the third outermost table to get my data, because after all that navigation, they might just rearrange the data into the third table of the second row of the second outermost table. Arg! |
older newer | first last |