World: r3wp
[!REBOL3-OLD1]
older newer | first last |
BrianH 7-Jan-2009 [9301] | At least for the last few years. |
Steeve 7-Jan-2009 [9302] | not in the version i use, sigh... |
btiffin 7-Jan-2009 [9303] | Maxim; And let cunning linguists write some scripts that tally the amount of WTF! information in wikipedia. ;) |
BrianH 7-Jan-2009 [9304] | What platform are you on? If Windows or Linux, use 2.7.6. |
Chris 7-Jan-2009 [9305] | wtf! and associated query: wtf? |
BrianH 7-Jan-2009 [9306] | If you are doing one comparison, IF, UNLESS or EITHER is fastest. For 2 to 6ish comparisons, CASE is faster. Anything above that use SWITCH. Profile your code patterns to see which is best in your case. |
Maxim 7-Jan-2009 [9307] | I can already see it... >> to-wtf |
Steeve 7-Jan-2009 [9308] | currently, i tested with the first alpha, switch is faster than case |
Maxim 7-Jan-2009 [9309] | make WTF! none |
Steeve 7-Jan-2009 [9310] | BRIAN !!!!! |
btiffin 7-Jan-2009 [9311] | I can see Brian's and Gabriele's point. Clear, concise REBOL is power. But so is letting non-techies use the console. Power in numbers. And it's sooo close already. |
BrianH 7-Jan-2009 [9312x2] | Steeve, do you mean: >> to-wtf none == "BRIAN !!!!!" |
:) | |
Maxim 7-Jan-2009 [9314] | hahahha |
xavier 7-Jan-2009 [9315] | lolllll |
Steeve 7-Jan-2009 [9316] | >>a: 1 >> t loop 1000000 [case [block? a [] integer? a []]] tt 0:00:00.534 >> t loop 1000000 [switch type?/word a [block! [] integer! []]] tt 0:00:00.433 |
Chris 7-Jan-2009 [9317] | BT: It should at least be a separate function, but I suggest separate from the language too. a) it's too much baggage, and b) the scope for recognising string patterns could better be handled in a more open way. |
BrianH 7-Jan-2009 [9318] | I did say that errors should complain loudly, but I didn't mean complain to me personally :) |
Steeve 7-Jan-2009 [9319] | so what did you profile Brian ? |
btiffin 7-Jan-2009 [9320] | Too much baggage for the pros, yes. Just right for a Professor of Geography or home user, imho. Don't fear those that don't normally program, help them. No? |
Chris 7-Jan-2009 [9321] | Too much baggage for the language. Perhaps it could be incorporated into a beginner's binary? I understand the need, even for pros too... |
BrianH 7-Jan-2009 [9322] | I look forward to R3 modules - then we won't have to be as picky about what gets included because it won't all get loaded by default. |
btiffin 7-Jan-2009 [9323] | I still don't see how a lexical foreign! would be that expensive. Am I just not getting it? Again, you cant ADD email! url! but they are valid types. Make foreign! a valid type and then REBOL loads anything and series! operations can operate freely. |
BrianH 7-Jan-2009 [9324] | Adding a lexical foreign! means you add the overhead of checking for valid syntax to *all* REBOL code, not just LOAD. It removes your ability to trust that what comes out of LOAD is valid. That is a huge overhead to all REBOL code, and would be the source of most REBOL bugs in the future. It is a horrible thing to do to the community. |
btiffin 7-Jan-2009 [9325x2] | Well, what do you mean by valid? foreign! would be valid, no? |
It becomes a new datatype! with the semantics of junk. | |
BrianH 7-Jan-2009 [9327] | No, it wouldn't, it would be meaningless. It would be like #[unset!]. |
Maxim 7-Jan-2009 [9328] | I agree that allowing junk to linger, would mean that all code needs to handle junk... which can be sort of awkward |
BrianH 7-Jan-2009 [9329] | It can't throw an error, or you wouldn't be able to parse it to get anything ot of it. If it is another string type you'd have to check for it at every evaluation, because you aren't getting a nice error to escape out of yor code. It's either useless or a nightmare. |
btiffin 7-Jan-2009 [9330] | Yes, meaningless; but there would be less syntax errors. And once in a block, cleaning could be done, but wouldn't have to be. That would be up to the domain problem at hand. I may never be convinced that having rules for what can be added would be that much different if REBOL were allowed to make foreign! |
Steeve 7-Jan-2009 [9331] | it depends how rebol handles junked newline in code |
btiffin 7-Jan-2009 [9332] | Maxim; I don't think so, no more than what junk is handled now by forcing pros to use string! parsing to get round human input foibles. |
BrianH 7-Jan-2009 [9333] | You *want* syntax errors. It's the only way to trust your input. |
Steeve 7-Jan-2009 [9334] | IMHO, commas sh |
btiffin 7-Jan-2009 [9335] | No *you* want syntax errors. I want to load %kingjames.txt and call sort. ;) |
Steeve 7-Jan-2009 [9336] | ...should be hendled like newline in code |
BrianH 7-Jan-2009 [9337] | This is why I prefer the fallback method, so the errors can be handled right away before they corrupt your data. |
Steeve 7-Jan-2009 [9338] | ...appearing only when molded |
btiffin 7-Jan-2009 [9339] | What corruption? $10,000,000.00 handled as foreign! is not that much different than do [abcd] when abcd has no value, no? |
BrianH 7-Jan-2009 [9340] | Right, and that throws an error. |
btiffin 7-Jan-2009 [9341] | so do [$10,000,000.00] throws, but a: [$10,000,000.00] is accepted as foreign! |
BrianH 7-Jan-2009 [9342] | If it throws an error, you can't parse it. |
Steeve 7-Jan-2009 [9343] | (ok i'm in a big trouble now, my bottle of whisky is empty) |
btiffin 7-Jan-2009 [9344] | Yeah, but throw on do, not on make. No? |
BrianH 7-Jan-2009 [9345] | I have a variety of booze here, and thanks for reminding me Steeve :) |
btiffin 7-Jan-2009 [9346] | Can't you see how cool it would be to let a person load %textfile.txt and do analysis? With foreign! sitting there ready to trigger if evaluated? |
BrianH 7-Jan-2009 [9347x2] | Errors throw on eval. |
How about letting them do load/else %textfile.txt 'string | |
btiffin 7-Jan-2009 [9349] | Absolutely. And ship that with Core. I'll stop whining and whinging. ;) |
BrianH 7-Jan-2009 [9350] | That is what I mean by the fallback approach. We could even provide a transform function argument :) |
older newer | first last |