"^A". I don't have a great solution, since MOLDing would make the output for normal names less readable, so maybe just something to note in the docs.===group=== CRC32 tests --test-- FAILED************** --test-- FAILED************** --test-- FAILED************** --test-- ^~ FAILED**************
error? try [...]?--assert error? try [tb-e1-t: -1:-1:-0] won't compile because it's a syntax error now, so it seems you have to test for loadabilty.compose approach better here Steeve?error? try[]. I'm not sure that this is the correct approach but it is practical. Most of the Red tests were written before Red had any error handling. (Each error check needed a separate compile which wasn't practical so most Red tests have no error checking.]
try and putting all the lexer tests in the same file is the best option.run-all.
run-allthat the team and travis (and people with Rebol installed) can run,
first not working on time! yet, should I leave those in and raise issues, or put try around them so they don't crash?>> help "time!" Found these related words: abs action! Returns the absolute value. absolute action! Returns the absolute value. even? action! Returns TRUE if the number is even. lib object! [end! unset! none! logic! integer! decimal! p... mod function! Compute a nonnegative remainder of A divided ... modulo function! Wrapper for MOD that handles errors like REMA... negate action! Changes the sign of a number. negative? native! Returns TRUE if the number is negative. odd? action! Returns TRUE if the number is odd. pick action! Returns the value at the specified position. positive? native! Returns TRUE if the value is positive. round action! Rounds a numeric value; halves round up (away... sign? function! Returns sign of number as 1, 0, or -1 (to use... time! datatype! time of day or duration to-time function! Converts to time! value. wait native! Waits for a duration, port, or both.
abs at all yet.zero? needed too.min/maxabsolute.sign? versions in the mezz group some time back. Did you want that at the mezz level, or native?sign? func working, but I really have **no** idea what I'm doing in /System. :pensive: I know others are doing stuff, and I did somehow get checksum done, but I just cast about (no pun intended) without any real idea of how it all ties together. Is there a secret primer somewhere? For example, I had no idea there was an init at the end of %natives.reds, not sure where order is important in lists or not.zero? is a mezzanine right now. Just FYI. zero? should be moved to a native at some point.within? would also be a good candidate, since I use it extensilvely in my text-area widget. Notice, there is nothing urgent, perfs are good as they are in interpreted mode (nothing is compiled), and a lot of things are not optimized in my code currently.sign? func working, but I really have **no** idea what I'm doing in /System. :pensive: I know others are doing stuff, and I did somehow get checksum done, but I just cast about (no pun intended) without any real idea of how it all ties together. Is there a secret primer somewhere? For example, I had no idea there was an init at the end of %natives.reds, not sure where order is important in lists or not.dyn-stack branch will be completed.sign? is ~10x faster as a native when compiled, so will be worth it eventually. Depends, too, on whether you think they'll be called in tight loops. Sign? could be, but you have to get to 100K iterations before the difference would start to show. Even at 1M, it would be plenty for interactive. Not game engine speed of course. :^)switch cases return their result, I can just box that directly, right?switch result, though, you need to know that R/S makes a difference between statements and expressions, and in the early days, they were strictly separated (switch or either were pure statements). Since then, that was relaxed a little, but the compiler still has some issues sometimes generating the right code. So as a rule of thumb, you can safely assign the returned value, but don't pass those statements as arguments to function calls.case as an expression, so went this way.case by manipulating the negative bit directly from the integer or float values./make-in or /make-at, but they are lower-level as they require you to provide the destination slot pointer as argument. There are also the /push functions (mostly used by the compiler), which are handy, but they will pile up the boxed value on the stack, while the /box functions will store it at stack/arguments, which represents the first stack entry of the current function call frame. That slot is also used for the returned value, so you'll see it used extensively pretty much everywhere in the Red runtime code.sign? some more, but can't see a performance win from a few different approaches. They all time out virtually the same (~.25s-.27s fro 10M calls):not approach working that I found for C (the language). Missing some detail.case is the most readable, even if it takes more vertical space. It's virtually impossible to misunderstand, even at a glance.sign?, you should use something like loop 10M [sign? -123 sign? 0 sign? 123] and compile it (to minimize the overhead of unrelated parts, like the interpreter). Anyway, it doesn't matter much for now, as we'll take the time to optimize the runtime library before 1.0.switch or either were pure statements). Since then, that was relaxed a little, but the compiler still has some issues sometimes generating the right code.unused, in the latest source. Could you elucidate?unused local variables are used in specific code patterns for float! values, to workaround issues with Intel x87 FPU (namely, the terrible stack management required by x87). This will be removed once we add support for SSE units.Red [] tb3-t: 2147483645:59:59 print [tb3-t/hour] print [tb3-t/minute] print [tb3-t/second]
Compiling /Users/peter/VMShare/Code/Red/test.red ... ...compilation time : 591 ms ...output file : /Users/peter/VMShare/Red/red/test ./test -3 -1 -1.0``` In the console:text
`