« first day (1853 days earlier)      last day (1927 days later) » 

12:42 AM
#[_] for none?
@MarkI ^-- It looks like a "blank"
Then if #[] was illegal you couldn't get it mixed up with #[ ]
#[_] => NONE!
#[?] => UNSET!
#[+] => LOGIC! true
#[-] => LOGIC! false
 
 
15 hours later…
4:15 PM
posted on November 27, 2015 by hostilefork

This is a sweeping, "simplifying", and broadly enabling change that eliminates the overhead of proxying state between the internals of the evaluator and a separate idea of a "call frame", by making the fixed size portion of all call frames equivalent to the input/output/state vars of the very Do process itself. In addition to the changes, there are copious comments explaining what the pa

 
^-- To be clear, that is Reb_Call the internal call frame, not the piping to the os CALL native.
Also to be clear, the above is going to be very... big (as in important, notable)...I believe we will see very soon...
 
 
2 hours later…
6:32 PM
Should case/all and switch/all process BREAK and CONTINUE?
Probably not, but I just wanted to. But I think I just have to think about using throw and catch more readily.
>> catch throw 10
 
; Brought to you by: try.rebol.nl
 
Hm. Well, it says no catch for throw here. But interestingly, it would be technically possible to recognize that particular construct, and as catch is system privileged it might be worth it to not have to set up a block if you didn't feel like it.
Basically if a frame is being filled and the frame is being filled for the catch native, don't treat that the way you would other functions where it stops them and abandons the function call. It is catch, after all... what else would you have meant?
Creates a slight dilemma on catch/with... however, if the first expression throws and you keep going and then the second expression throws too before it can give you your /with's function or block or what have you. Or the /name. Now you've got three throws. Which one do you bubble up?
 
7:18 PM
posted on November 27, 2015 by Arie

Is there a rebol3 version of rebgui available?

 
@giuliolunati You reading up on the new evaluator design? :-)
The Do loop exposes its state through a struct, and that struct is fixed size. That struct is now used as the "call frame" also. So there is less redundancy...and it's easier to pass a pointer and pass the whole "state of the machine"
 
 
3 hours later…
9:55 PM
@HostileFork I tried, but difficult for me to understand ... I have insufficient insight into that code. But I'm sure you are doing good work :-)
 
@giuliolunati Well it is just the routine that implements DO and DO/NEXT. That routine long ago was broken into a lot of parts, and it would package things up from one place and send them to another. Each function had its own separate variables, it didn't move in a "straight line". It was hard to know what was going on.
 
Hmm, Red seems to be "fighting" some newcommer's worries ...
 
Over time as it has been locked down, extended, commented, asserts etc... it became more or less one long function that you could see.
 
@HostileFork seems very good!

Opened new branch `mold-stack`, obtained some good crashes ;-)
 
@giuliolunati So what that is about is about taking the local variables of that routine and instead of being local they are in a structure. Then the current state of the evaluator can be given out, for others to do work with... or take advantage of aspects of the state (like protection of some variables from garbage collection it isn't using during a function call)... anyway, it's documentation.
@pekr Well, it will be difficult I will say for Red to have language credibility if the "big problems" aren't given a serious treatment. I have a lot of maps up now. And with this latest change, expect to see some interesting stuff...
 
10:01 PM
Well, recent problem seems to be the insufficient Rebol level error handling
Incorrect idnex? usage?
It's not about Red, but about Rebol languages in general ... in comparison to Clojure, etc.
 
@pekr I think that it is difficult to play a game on other people's turf. The unset changes are showing new and interesting things, FAIL and company are good...
But the problem I have said is that until you can show someone the why and then show the why working, I think it's a house of cards.
 
agreed
 
@pekr Did you read my COLLECT thing?
Function Changes on Rebol3 Porting Guide ("Ren/C" branch)
# Rebol2 / R3-Alpha foo: func [a /b] [ probe type? b print [a b] ] >> foo 10 none! 10 none >> foo/b 20 logic! 20 true >> ref: 'only >> ap...
 
well, not yet ..
 
Well, I think if you can get these examples... the working ones, through people's heads...
Interest will ensue. I think playing the small game is interesting but only sort of interesting, as we saw with Forth there are people who say "you call THAT small..." and then a lot of people who don't care. And if it's a sandbox people are willing to draw all kinds of sandbox lines. Some people will just use an iPhone, @giuliolunati develops on an IDE on his cellphone and builds APKs...
So to me the real love here has to be with DSL creation that really works. That means you can't show someone something as cool as a tiny COLLECT/KEEP and then go "oh, but it doesn't work if you return"
Just Another Broken Thing, Nothing To See Here...
 
10:24 PM
>> STR: "abcdefghijklmopqrz" delta-time [loop 100000 [all [pos: find STR "n" pos: index? pos]]]
 
; Brought to you by: try.rebol.nl
== 0:00:00.217392
 
>> STR: "abcdefghijklmopqrz" delta-time [loop 100000 [attempt [index? find STR "n"]]]
 
; Brought to you by: try.rebol.nl
== 0:00:00.266064
 
And that's Rebol 3 alpha still ...
 
@MarkI I don't recall now what the tests I did, but they are here in the log if you look, of whatever the two comparisons I thought were appropriate. Search by date if you like.
 
10:25 PM
Difference ratio is comparable, but my Win box pegs those numbers near 1/4 of that size, interestingly
 
I can try an optimized Ren-C to tell you what I get at this moment...
 
Coolio
 
(compared to the rebolsource 64-bit download, which is O2 gcc)
Hum, something slow right now in this version I'm working on apparently. :-/ I will look at that. But yes, regardless of that a difference of about 1/4 overhead it seems.
The overhead of a series allocation on every function call is high, but it could be lowered, and if it were lowered then it would be a systemic benefit.
My idea of the series node being able to serve as the data up to a point when it then outsources, while keeping the pointer stable, seems reasonable; and especially for function frames which are a constant size over their lifetime.
So basically - have pools of variant sized REBSERs.
 
11:03 PM
I think I may have figured it out. Tell me what you think of my detective skills HF:
@RebolBot
count: 100000
all-code: [all [pos: find STR "n" pos: index? pos]]
attempt-code: [attempt [index? find STR "n"]]
STR: "abcdefghijklmopqrz"
print ["Straight ALL:" delta-time [loop count all-code]]
print ["Straight ATTEMPT:" delta-time [loop count attempt-code]]
print ["Sequence ALL first:" delta-time [loop count all-code] delta-time [loop count attempt-code]]
print ["Sequence ATTEMPT first:" delta-time [loop count attempt-code] delta-time [loop count all-code]]
 
; Brought to you by: try.rebol.nl
Straight ALL: 0:00:00.221422
Straight ATTEMPT: 0:00:00.268493
Sequence ALL first: 0:00:00.220276 0:00:00.268107
Sequence ATTEMPT first: 0:00:00.268572 0:00:00.220291
 
Fascinating! Not what my box reports at all, not even close!
This is what I see:
Straight ALL: 0:00:00.045903
Straight ATTEMPT: 0:00:00.064142
Sequence ALL first: 0:00:00.043161 0:00:00.031371
Sequence ATTEMPT first: 0:00:00.063372 0:00:00.023288
Hence my theory that you ran the final example, but said theory is looking rather quashed right now.
I think that my examples are not properly accounting for something about how Rebol loads code.
For the record, I cut-n-pasted each of the 8 lines, one at a time, into a r3-g25033f8 console on my box.
Unfortunately, I don't think this is a good question for SO, I would like to post it.
@RebolBot
count: 1'000'000
all-code: [all [pos: find STR "n" pos: index? pos]]
STR: "abcdefghijklmopqrz"
print ["Straight ALL:" delta-time [loop count all-code]]
print ["Straight ALL second time:" delta-time [loop count all-code]]
 
11:24 PM
; Brought to you by: try.rebol.nl
Straight ALL: 0:00:02.221658
Straight ALL second time: 0:00:02.218949
 
I don't think there's enough in that to tell anything.
Straight ALL: 0:00:00.051103
Straight ALL second time: 0:00:00.023528
Is what my box says when I do both with one line of code entered at the console, a difference of over 100%.
 
@MarkI Well look up the date for whatever test it was.
 
The difference only starts showing up when count is 100'000 or bigger.
 
>> delta-time [loop 1000000 [do [3]]]
 
@HostileFork That's very interesting.
; Brought to you by: try.rebol.nl
== 0:00:00.78505
 
11:30 PM
>> delta-time [loop 1000000 [attempt [3]]]
 
; Brought to you by: try.rebol.nl
== 0:00:00.781247
 
Perhaps it was a failing attempt.
>> delta-time [loop 1000000 [attempt [1 / 0]]]
 
; Brought to you by: try.rebol.nl
== 0:00:05.509341
 
Probably that's what it was, I was saying something like how the cost of trapping an error vs not causing the error in the first place.
It was probably something about how you could test for none and avoid the trap, or take the trap hit and avoid the test, and I said it was a factor of 3 or so.
 
Your comment to the "attempt" answer is where I started from.
But I am now trying to track down why my box behaves so radically differently from RebolBot.
If I can't trust my own tests, I am severely worried.
@HostileFork Exactly. A factor my tests are not showing, neither here nor through RebolBot. (attempt-code takes the trap hit every time)
 
11:52 PM
My world makes sense again. I understand now what you were saying in the comment.
What my tests seem to be showing is that the overhead of the all is actually pretty high too. Not quite as high as a trap hit.
 
@MarkI Feel free to comment for clarification if you feel so inclined on the post
 
Sure.
 

« first day (1853 days earlier)      last day (1927 days later) »