« first day (1965 days earlier)      last day (1815 days later) » 

1:30 AM
New Emscripten interface!
On my Samsung S2 Android 5 Emscripten with Dolphin looks faster than native!
 
 
3 hours later…
5:00 AM
@giuliolunati It's a bit of an improvement, though it clears the screen on the first evaluation for me. Are there any JS consoles that you like that don't have the "DO" button but let you type directly inline?
 
5:32 AM
It occurs to me--just thinking about it--that if Red doesn't have a GC, that means a lot more than just "the GC hasn't been written". It means that the code patterns in the system have not been vetted against GC bugs.
Which is to say--that if there is a pattern in coding that must be followed in order to properly guard and demarcate series on the stack as being in use or not in use, that pattern is either not being followed at all, or being followed and not checked up on.
 
6:07 AM
@giuliolunati I get this error on my phone "Uncaught range error: maximum can stack size exceeded" (Nexus 5 chrome browser)
 
7:01 AM
@HostileFork the Do button is an easy solution for multi-line input
 
@giuliolunati The repl.it solution of letting you use a large editor and then do "go" seems to be good. Then you have both. I'm just thinking more for tutorials, which is (so far) one of the big uses of emscripten builds of languages in the browser.
 
@johnk please try also old interface and tell me if it works for you
@HostileFork you mean to offer an experience closer to native build?
 
@giuliolunati Generally speaking it's just "slicker", yes...though perhaps on a phone you wouldn't think so. If all the ergonomics work like being able to hit ENTER and up and down cursor paging through the history, then I guess it would mostly just be traditional bias that favors the console-like experience.
So in terms of mission statement, I am wondering if it is time to ask the question of if the rule about the source code is that it can be reasonably read and compiled using only a C compiler, or read and compiled and edited safely using only a C compiler.
-or- if we might consider there to be a "tooling pass" which uses enhanced checking to find errors in the C code...where this tooling pass is essentially required in order to make correct changes to the sensitive core.
One would argue that if you make edits and do not run some kind of test, that is very risky and you are quite likely to screw things up. What if this "test" includes a tool that is neither Rebol nor a C compiler. Again: it's not required to build, but is nearly indispensible for diagnostic purposes.
 
7:35 AM
@johnk do you mean: "... maximum call stack size..." ?
 
 
2 hours later…
9:07 AM
>> foo: function [x code] [
    append code [print x]
    if x > 0 [
        probe code
        do code
        foo (x - 1) code
    ]
]

>> foo 2 []
[print x]
2
[print x print x]
2
1
Specific binding has now booted. And can run that. There you have the specificity of binding achieved without copying the body of the function.
(Well, without copying the body of function each time it is called the way closure had to. It is copied on the one initial time the function is made, as before.)
 
9:54 AM
(Long story short: goodbye CLOSURE!, closure, clos...)
2
 
 
4 hours later…
1:27 PM
To make sure I understand what you are doing - I assume that since the function does not copy its body between calls,

f: function [x] [[x]]

holds that

blk1: f 1

and

blk2: f 2

are, in fact, the same block. How, then, is it possible that

1 = do blk1

, while

2 = do blk2

?
 
@Ladislav The payload of the REBVAL holds the same series, and perhaps the same index. But they are distinguished by a third field in the payload. This third field is a "specifier"--it is a pointer to a frame.
 
So, am I to understand that blk1 and blk2 are not the same block?
 
They are the same REBSER, held in REBVALs that are made distinct by this third payload field.
The invariant is that at any given time, a REBVAL-containing REBSER (a REBARR or "rebol array") may only contain ANY-WORD! and ANY-ARRAY! REBVALs that are relative to at most one function.
At the time of function creation, when the body is deep copied and relativized, this is made true in the sense that any existing relative values are made specific during the copy...with relativism only reinstituted for the function being made.
And now imagine the system having type enforcement between RELVAL (a potentially relative value) and a REBVAL (a known fully-specified value) such that you cannot bit-copy a raw RELVAL to a REBVAL. You must have a specifier.
Making things a bit easier to debug and correct for mistakes, a specifier is a frame that knows which function it is for. So if you try to use a wrong specifier with a relative value, it will notice.
Recursive descents generally start with some specifier at the top, and then when they hit an array to descend into have to look to see if it is relative or specific. If it's relative, then continue using the specifier from the upper level of the recursion. If it's specific, then use the specifier it has for ensuing recursion going down.
 
1:55 PM
The frame itself is a REBSER. So there is 1 REBSER made per call. But firstly, we have agreed that the data should have indefinite extent by default... even JavaScript could do the equivalent of foo: function [x] [y: 20 return function [z] [x + y + z] and one might have a hard time claiming one's interpreted language is advanced and not be able to do that.
So the existence of that series is sort of a given anyway.
But not needed for natives (if you are debugging and ask for a frame of a native, however, a REBSER will be created on demand and directed to point into the stack for the variable data)
It should be noted that these stack-pointing REBSERs are able to take advantage of the trick of packing their single REBVAL of content into the REBSER node itself...there is no pooled allocation for the data pointer needed.
 
 
3 hours later…
5:28 PM
@RebolBot
z: false
print default 'z 100
print z
 
; Brought to you by: try.rebol.nl
100
false
 
Shouldn't the expression default 'z 100 give you z's value after the defaulting?
 
5:44 PM
@HostileFork I think that would make more sense
 
6:26 PM
@HostileFork when I think more about the saving objects and loading them, it seems to me that the new definitional changes could cause some difficulties. Because when we save the functions of the objects, we just saved the result of "mold function", which will be in the form of "make function! [[return:][...]]", and when they are loaded back in, they might become functionally equivalent, but will they consume more memory because of the extra definition of 'return' in each function?
As I see from the code, the definition of 'return' from functions generated by 'func' is actually shared.
 
@ShixinZeng I mentioned that. Yes, the reload does not notice the pattern and then account for it. It could--in that MAKE FUNCTION! could compare the structure of the body to the template, and if it matched make the optimized function. I'd still chalk it up to "probably one of the lesser problems of serialization in the grand scheme of things".
 
if "make function! []" is effectively "<no-return>", shouldn't we have a <return> tag?
In that case, the mold form can have "make function [<return>][]" and remove the definition of 'return' from the body-of
 
Contrary to the entire design. MAKE FUNCTION! is intended to have no keywords, and no concept of return
As I said, it would be possible to recognize the pattern such that if a function were serialized out of a Rebol and loaded back into the same version, it could get the advantage of the speedup/less-memory
That isn't really a problem.
The bigger problem is that if you are expecting MOLD-based serialization of functions to hold up, it won't. In fact, the very idea of definitional returns is that you can have multiple instances of the RETURN word in the body of the same function and go to different places.
 
6:41 PM
True, but our functions are not using any of those features/having returns/exits going to different places
 
I'd still discourage it as a model, and suggest serializing and deserializing some more controlled dialect instead. But it's not difficult to change Make_Function to deserialize the pattern--again, only recognizing the pattern if it originated from the same Rebol, because the template may change.
 
6:53 PM
Even we were to write our own function to serialize the function, how could that be different than MOLD? Getting rid of the definition of return?
 
@Morwenn I'd actually just noticed there was new Celldweller stuff on Spotify last night...
 
That one is from last year I think.
One the other hand, this one is new :p
 
@ShixinZeng I didn't mean specifically to this problem. I meant more as a general concept. Without knowing entirely what you're doing, it seems this code comes from one of two places: a user wrote it, or a generative process made it. If a user wrote it, then there's lots of things they can do which wouldn't serialize like this...so you probably want their source code in a normal module with a normal load process.
If a generative process made it, then the input to that process is likely the better thing to keep around.
@Morwenn That may be one where the energy is perhaps better left to the imagination... video is very low energy and low sync. But, one must start somewhere...
Drummer in slow motion.
 
7:09 PM
Yeah, the video sucks. But there is a floppy drive at the end :D
 
@HostileFork our application provides on-line editing function: a user can create/operate/modify/save a widget from inside the application, and the user can customize some of the widget functions
Right now, we just save all widgets in their MOLD form, which include the customized functions
 
@ShixinZeng Hm. Well, then if you comment you better do it with comment or it will be lost. I guess I'd always want to have that editing source, and then you push "go" and it loads from the source.
It would throw out all formatting
 
I think you do have a point, we should keep a copy of user input, even just for comments and formatting
 
@Morwenn I'm really not listening to much new, though have this on right at the moment
 
7:30 PM
@HostileFork I'm not really fond of the voices but it's otherwise pretty good :)
 
Wasn't passing much judgment one way or the other, just didn't really have anything else new or interesting to send :-)
 
You should listen more to Tibetan throat singing.
 
Or the Arch Enemy, the same voice, a bit more disturbing :-)
 
Or any voice seemingly altered by drugs in Shpongle :D
 
7:47 PM
Drugs alter the voice? I should stop drinking the coffee then :-)
 
Drugs alter how you hear the voices :D
 
8:04 PM
@RebolBot
obj: make object! [w: quote () x: 'a y: 10 z: quote foo:]
set/any 'obj/y #[unset!]
print mold obj
 
; Brought to you by: try.rebol.nl
make object! [
    w: ()
    x: 'a
    y: unset!
    z: foo:
    foo: none
]
 
@ShixinZeng ^-- Since you are looking at round-tripping issues with mold, take a look at that.
I have pending changes which solve this--and the way it solves it is by having MAKE OBJECT! not do any evaluation. Any evaluation is done by the generator.
So let's say we used a generator and not MAKE OBJECT! to make the object, then it would come back as:
make object! [
    [w x y z foo]
    [
        w: ()
        x: a
        z: foo:
    ]
]
That assumes the generator uses the scan-for-top-level-set-words rule, and adds them all to the object (including foo, despite not being assigned)
 

« first day (1965 days earlier)      last day (1815 days later) »