« first day (1959 days earlier)      last day (1821 days later) » 

12:00 AM
@Ladislav The mold foo => "make foo! [...]" syntax needs to go anyway, because you don't want to mold one element out and get something that loads as 3. So it needs to use construction syntax. In theory the construction syntax could say whatever it wanted, but having its contents appear loadable is a reasonable goal anyway, as that way it can use the same machinery.
So CONSTRUCT as a word might be a good candidate for the new 2-arity OBJECT constructor, with HAS as the arity-1 (as proposed). HAS is fairly intuitive once you get used to it, as a parallel to DOES, and isn't much typing. CONSTRUCT isn't used very much today, and you can give it /ONLY to make it not do evaluation.
This way the noun OBJECT can be kept around as a single-arity constructor for legacy, but if everyone switches to HAS you don't have trouble naming arguments object [object!] or object: construct spec-or-parent-or-whatever body or object: has body
I'm not sure how valuable make some-object [x: 10] cueing off type-of some-object and being equivalent to make object! [x: 10] really is, but that behavior could be made to happen. Would be less accident prone to say that MAKE and TO have a first argument that is always a datatype, and get rid of the exemplar idea, to avoid accidents where people thought that would still cause inheritance.
If new code for the time being at least promises not to use make some-object ..., then the legacy mode can run that as inheritance. And if all new make object! [[...] [...]] have two blocks like that, the legacy mode can also run a make object! that isn't done like that through the CONSTRUCT code path. For whatever that's worth.
 
 
3 hours later…
3:17 AM
posted on March 12, 2016 by qtxie

FEAT: added BITWISE-OP for binary! datatype by qtxie

 
 
6 hours later…
8:54 AM
@HostileFork I am not sure I know what you are after, but the make some-object ... convention is used both for single inheritance as well as for the multiple inheritance, and inheritance is needed for object-oriented programming.
 
@Ladislav I am after whatever needs to be done in that area not using MAKE's first argument to accomplish its goal.
So separate the feature from a love of it being the first argument to make.
Incidentally, I do not believe that it's a good idea to deep copy function values because they happen to live inside of an object, rebinding the body each time. That means if your object has 10 methods, and each method has nested blocks, each instance gets a full copy of the nested blocks of all 10 methods just for the sake of being able to rebind the locals.
(rebind the locals => rebind the members)
 
 
1 hour later…
10:06 AM
@HostileFork @MarkI @johnk @Brett and others interested in Emscripten: improved user interaction (text field instead of input dialog). Please test it!
 
@giuliolunati Works here in Chrome, Konqueror, Safari... looking better!
 
@HostileFork Very good! Sound very promising...
 
>> first []
 
; Brought to you by: try.rebol.nl
== none
; Brought to you by: try.rebol.nl
== none
 
Er, that was foo: [] :foo/1. I'll just mention that the question has been raised if a way of dealing with the "friendly" as well as the "real story" divide would be if :foo/1 there might return an unset (non-reifiable), while foo/1 would return the "easier to work with, but not completely honest" NONE!
If it is such that you can never have an unset in a block (because they can only exist transiently as an evaluation product), then that seems to be an interesting compromise. It builds on the existing understanding that foo and :foo are understood to be able to behave differently, with the latter telling you "what's really there".
This raises the more general question, of whether all bound items should report NONE when they're unset unless you really care about the difference enough to ask.
You already know that when you're copying an unknown value from point A to point B you can't just use the word alone, because if it were a function then you'd be calling it.
This is a world where non-reified unsets do exist, do cause errors when used... e.g. x: () or if print "Hello" [...] is an error. But if not check-set x: () [print x] would unset x, yet the ordinary word fetch of x would cover for it as a NONE!. But if not check-set x: () [print :x] would be an error.
Of course, it is not necessary to couple the idea that x: [] x/1 being NONE! with x: [] :x/1 being "void"/"unset" with the idea that unset 'x x is NONE! and unset 'x :x is "void"/"unset". You could have different rules for variable lookup than you use for picking elements out of blocks and maps. But there might be an appeal to having the symmetry. A lot of code doesn't actually care about the difference.
Note this is still distinct from how unbound values are dealt with. Today, the "bind anything" logic of the REPL as opposed to the isolate mode of modules is very loose.
>> print variable + 1
 
10:29 AM
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-no-value.html
    *** ERROR
** Script error: variable has no value
** Where:
** Near: try load/all join %/users/try-REBOL/data/ system/script/args...
 
>> all [:varablle true]
 
; Brought to you by: try.rebol.nl
== true
 
Also, if UNSET? becomes a question you ask of a word instead of a value, it makes a lot more sense. (In the transitional period, UNSET? would be undefined except in legacy mode to avoid confusion, and you'd say not set? 'word or not set? 'some/path, then VOID? for direct questioning of a fetched value as void? :word or void? :some/path). Hence you really could get unset? 'x to be true, and write unless x [print "this would print"], while unless :x [...] errors.
 
11:04 AM
But all irrelevant, because I think the reality is that the future is Emojicode
 
 
1 hour later…
12:31 PM
It looks like OBJECT does some special things with set-words, probably to allow object [a: b: c: none] to work.
>> object [a: quote b: b: quote c:]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               set-word! b:
   b               set-word! c:
   c               none!     none
 
The fact that C ends up as a member of that object may be seen as a bug.
There are workarounds though:
>> object [a: (quote b:) b: (quote c:)]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               set-word! b:
   b               set-word! c:
 
The binding of the C is not to that object, of course, it has "escaped" to the outer context.
Which may also be seen as a bug -- some may have wanted it bound to the object but unset.
 
>> source object
 
12:41 PM
; Brought to you by: try.rebol.nl
object: make function! [[
    "Defines a unique object."
    blk [block!] "Object words and values (modified)"
][
    make object! append blk none
]]
 
Yeah, I checked that, the none has nothing to do with it.
 
That's the only thing OBJECT does specially.
 
All my examples work (or fail) identically if you replace OBJECT with MAKE OBJECT!.
 
What happens in MAKE OBJECT! is that it gathers top-level set words.
 
As I suspected. That may be too crude however.
 
12:43 PM
Historically it implicitly added SELF. In the phasing of SELF out as a keyword, I moved it so that MAKE OBJECT! would add SELF as a hidden-but-user-mode key. Now, with this non-evaluative version and shifting constructors about, both the top-level scanning and the selfing are moved to generators.
As with the foundational-and-sneaky FUNC having various optimizations that make it lighter than a fully usermode FUNC that had to write MAKE FUNCTION! code, it is possible for the HAS and CONSTRUCT generators to do tricks so long as they are only performance optimizations over what a usermode HAS or CONSTRUCT that called MAKE OBJECT! could do.
So it's likely most people wouldn't be writing MAKE OBJECT! [[...][...]] code directly, preferring to use the generators. But, if you really wanted to, you could and achieve any of the same effects.
It would be possible to have the generators say that something like has [a: b: c:] is legal, and gives you NONE! for all 3 fields. But it works by binding and then running the evaluator, so I guess the question is whether you really want to have it act "unusually".
Larger issues are that there's this permutation of "scant construction", which allows you to say [a: b: 1 + 2 c: 3] and gives you a: 1 b: 1 c: 3, because it throws out data and allows chained assignments... and it also turns 'lit-word => lit-word, and none => #[none] and true/yes/on => #[true] and false/no/off => #[false]. Then there's the real "as-is" construction that gives you exactly what's there.
I feel like I'd rather say that if you are using something you know to be unevaluated (like a script header) that it really just be as-is. What you put there is what gets processed. You use a SET-WORD! in every other slot and so no Rebol [Title: Description: "This is both title and description"]
Having a routine that recognizes YES and TRUE and ON by their symbol IDs and turns them into #[true] is not very satisfying. I think _ is shaping up as a pretty satisfying literal for NONE!. In addition to being better than #[none] for practical usage if you want to bypass evaluation, it can be better than none when evaluation is an option.
 
1:13 PM
I don't know what value there is in morphing a fixed list of words into a value like that, because essentially, you're saying that the words are your dialect... it's not an expandable set. You have TRUE and ON and YES, but having a new word that is uh-huh: #[true] won't work. If you aren't fetching the value in a generic way, why build a non-general conversion step? Just say those are the symbols your dialect supports.
This may be a place to make a stand, that there has to be a symbolic true and false. _|_ would be a good one for false, but ^|^ would be about the closest you could get for true. :-/
The + and - are the other way to go, but in terms of practical literals I don't really like #[+] and #[-] because I don't think any of the natural literals should be starting with # and brackets like that. Lexical space is already so consumed. All the neat looking symbol things already have meaning, be they (+) or (o) or whatever.
 
 
5 hours later…
6:14 PM
@hostilefork now I wish to slim down emscripten code. Do you have some guidelines about what and how I should cut away?
 
6:40 PM
@giuliolunati There's a lot of ways to answer that question. :-/ One thing you could look into if you are inclined that would be generally beneficial is to figure out how to get it down to one PNG decoder/encoder and one copy of Zlib. Rebol had a PNG decoder it originally used in u-png.c but apparently this was old and had some bugs and Saphirion added in lodePNG.
I'd say that if you don't have an immediate priority on size to "wait" on the prioritization of it. Making it smaller is a noble goal, but from my own perspective I see the project's purpose as to sort out the Big Technical Questions, e.g. should you be able to have #[unset!] and put it in a block... just to pick a recently mocked example.
 
 
3 hours later…
10:12 PM
@HostileFork I sincerely appreciate your work on BTQ, only too hard for me.
I can help in other less hard areas, as get rid of superfluous code :-)
And to shrink size in Emscripten build is to reduce startup time. On my phone take about 15s on localhost.
 
10:42 PM
@giuliolunati If you're interested in reducing the size, one thing to do might be to work on getting a good picture of what is taking up the space. Some kind of pie chart or graph or statistics...
That helps no matter what
I'd hoped earl would have stayed around and gotten motivated to keep pushing on a modular build system for the components, to tick the features you want and then build with them... maybe even a website where you could check off the features and it makes the right Rebol for you and on your platform (if not already cached)
 
@HostileFork maybe can start looking at size of objects.
And write down a list of optional features
 

« first day (1959 days earlier)      last day (1821 days later) »