« first day (1854 days earlier)      last day (1926 days later) » 

1:13 AM
@RebolBot do/2
STR: "abcdefghijklmopqrz"
print delta-time [loop 100000 [all [pos: find STR "n" pos: index? pos]]]
print delta-time [loop 100000 [attempt [index? find STR "n"]]]
 
; Brought to you by: try.rebol.nl
0:00:00.209532
0:00:01.049687
 
@MarkI That might be another explanation for my answer. Note the tags on the question are "string" "rebol" "rebol2" "red"
@RebolBot
STR: "abcdefghijklmopqrz"
print delta-time [loop 100000 [all [pos: find STR "n" pos: index? pos]]]
print delta-time [loop 100000 [attempt [index? find STR "n"]]]
 
; Brought to you by: try.rebol.nl
0:00:00.217929
0:00:00.265917
 
@redbot
STR: "abcdefghijklmopqrz"
print delta-time [loop 100000 [all [pos: find STR "n" pos: index? pos]]]
print delta-time [loop 100000 [attempt [index? find STR "n"]]]
 
; Brought to you by: try.rebol.nl
*** Script error: delta-time has no value
*** Where: print
*** Stack: do-console all not unset? set do first head reduce do* _execute if all not unset? set do first head reduce do* print
 
2:06 AM
@HostileFork new error based on the last commits from our friendly bot
r3: ../src/core/c-do.c:419: Do_Path_Throws: Assertion `!(((((((out))->flags.bitfields.opts)) & (1u << (OPT_VALUE_THROWN))) != 0))' failed.
It fails in the load-json call, so I do not have a one-line reproduction of the issue yet
This certainly reproduces it:
>> import http://reb4.me/r3/altjson
>> loop 50000 [ load-json {{"abc": "test"}}]
I've got to run now so won't have time to come up with a better example for a day or two
 
@johnk Gah, that one. I've been trying to figure out what the deal is. The thing is, as you probably may know, paren evaluation was sort of "tacked on" after the fact to path evaluation. In general, there was no systemic design for throws, it evolved. So I've been trying to nail down every case.
@johnk NP, one repro is enough if it repros...thanks!
 
@HostileFork no worries. Good luck. ttyl
 
@johnk That's not a thrown error, that's outright memory corruption of some kind
Which is good. Easier to fix I bet. :-)
Not kidding, give me a (100% reproducible) memory corruption error any day, commodity tools find those
(The 100% reproducible being an important part of the statement.)
 
2:26 AM
The loop 50000 makes it reproducible. I had it fail after just 1 or 2 calls as well. It may be just as likely to fail with loop 10
 
@johnk Good enough for me, I'll figure it out...likely not tonight but soon...
 
 
20 hours later…
10:31 PM
So I just reclaimed a bit that existed on every REBVAL, the infamous and much-disliked OPT_VALUE_REEVALUATE
Which reminded me that in the space of a bit that I think probably should exist on every value, it would be LIT. That reclaims two of the < 64 types: LIT-WORD! and LIT-PATH!
And then, very simply: lit-word!: lit word!. And you're done, now you have it back.
So type-of quote 'foo => '#[datatype! word!], however we elect to notate that (today word! the datatype and word! the word looking the same is rather untenable, so imagine whatever solution that is...just lit'd)
And as I said to those asking me "what good is a lit block, if the block has no evaluator behavior" I believe that my answer holds water: namely that a lit only suppresses evaluation and vanishes on types that would have evaluated in the first place. So if 1 < 2 '[print "foo"] => [print "foo"] precisely because IF itself would make that as a dialecting decision. It got a lit block! in, and since it evaluated blocks it gives a BLOCK! back, as that's a decision the author of IF gets to make.
As already mentioned, lit parens come in incredibly handy for compose. Also as already mentioned, I think that having the option of putting the lits at the end as well as the beginning can help keep things straight, and I might even suggest making it a rule for the blocks and parens.
 
10:51 PM
The technical barrier to why this isn't something that could be done instantly is that in one way of looking at it, this "doubles the number of types". And the typesets we have today are bitsets exactly 64-bits in size. So there's no way to express 128 types in that 64-bit bitset for function parameters.
 
11:01 PM
But with user defined types, we already know that this "magic 64 types you can specify" is a dead-end; it should be only an optimization for the most common fundamental types.
 

« first day (1854 days earlier)      last day (1926 days later) »