« first day (2277 days earlier)      last day (1503 days later) » 

5:00 AM
@HostileFork to be frank, <arg_modification> is kinda cool. At least so far
 
@GeekyI Thanks for the feedback. The goal is to not have keywords; MAKE FUNCTION! uses a different notation for the same properties, but FUNC is higher-level and knows things like RETURN: and <opt>
ANY-VALUE! is, I think, better than ANY-TYPE! (which sounds like it would be INTEGER! or BLOCK! or "any other type"), and I like that void is not included or thought of as a "value"
Current leaning is to potentially build type checking entirely as an optimization of what would otherwise be written in the function body.
 
@HostileFork regards ANY-VALUE i.e syntactically speaking?
 
e.g. func [x [integer!] y [block!] [...] => make function! [[x y return:] [x: ensure integer! take frame-of 'x | y: ensure block! take frame-of y | return: make function! [...] | ...], stuff like that
@GeekyI I was saying that (a) ANY-VALUE! is a better name for the concept previously named ANY-TYPE!, and (b) it's good to separate that from optionality, e.g. void tolerance.
 
I'm still kind of a Redbol newbie, so I wouldn't know if a feature is an old Rebol2 one or a Rebol3, or even Ren-C
@HostileFork yes
 
@GeekyI Well, ask if you're curious. It's my personal opinion that R3-Alpha will become basically irrelevant; it never gained wide usage, most people kept using Rebol2, and R3-Alpha's key users are all spoken for as either done with Rebol or switching to whatever Ren-C becomes.
So "Rebol 3" has effectively never been released.
 
5:09 AM
@HostileFork ANY-TYPE! is now TYPE! ? That makes more sense, taking into consideration I'm not that thorough with the rebol type hierarchy
 
@GeekyI DATATYPE! is what you might think of as meaning "any datatype". ANY-TYPE! meant "this value may have any type". It could be [a b c] or 1.3 or INTEGER! etc.
I said that was confusing, and prefer ANY-VALUE!
It may be that TYPE! is retaken. But testing if something was a type would be done by type? in that case, which Rebol2 and Red use to mean type-of
Things ending with ? return LOGIC! in Ren-C
 
@HostileFork yeah, I mixed up stuff
@HostileFork I see, so that would bring some consistency to the datatype that is returned. I'd like that
But then I was not so happy that /refinements can change what is returned
I do think now that it may be an acceptable compromise
A balance between purity and a simpler interface or api. Also as an alternative to some use cases of key words
 
@GeekyI In Ren-C, if/? condition [branch] changes the return result to a LOGIC! of whether the branch was taken, e.g. you get back TRUE? condition as opposed to what branch evaluated to (or void if not taken).
This is specialized as if?: specialize 'if [?: true]
 
5:33 AM
Wow, ren-c has a greater mezz / native ratio than I thought
I like that you can even see the source for make
 
@GeekyI Well, that MAKE is a bridge.
It's designed to help with compatibility for the lower-level make.
 
@HostileFork better than nothing
 
We have talked about being able to use source to get the C source from GitHub for the version you built.
 
@HostileFork Yes we have
 
See for instance, if I didn't send before, the source code for loop
 
5:36 AM
I in general like it when things are more introspectable
 
The build process mines the Rebol data for the spec out of the C comment.
Ren-C is attacking serious problems, such is if-not: func [condition code] [if not condition code] working as expected. If you try that in Rebol2, R3-Alpha, or Red then if not flag [return x] will not act the same as if-not flag [return x].
But in Ren-C, they will act the same.
In addition to attacking foundational serious problems, the goal is to keep the dependency footprint small...including the toolchain dependency footprint to build the artifact itself.
 
 
4 hours later…
9:18 AM
posted on January 24, 2017 by Sam

Here's a whack idea. Could R3 use RED's DSL to compile R3 programs? If I understand correctly the compiler, linker, etc, are just a DSL of Rebol. Also the view and VID of RED are just DSL's of Rebol so couldn't R3 be used to jump start RED on various platforms? The idea being that R3 is all C code which you can compile now anywhere, supposedly, in theory. Hostile fork has said he's cleaned up a

 
9:28 AM
There is a largely compatible (though less coherent) subset of Ren-C which is shared with Red...if you adjust some of Ren-C's definitions.
It is called Red. :-P
I think the most likely interesting crossover application is to use Red/System in user natives, vs a string of C text.
 
 
2 hours later…
11:18 AM
So sieht die zugehörige Darstellung der Messwerte des #BME280 Sensors im #WebUI von PiTS-It! aus.#RaspberryPi,#Rebol https://t.co/JuH4lazP1b
 
 
2 hours later…
1:14 PM
@HostileFork Just to be clear for everyone, the action only differs in the TRUE? case (obviously) and the problem does not occur without the RETURN.
Rebol's version of goto: "RETURN considered harmful".
 
 
3 hours later…
4:17 PM
posted on January 24, 2017 by Steven White

Not an urgent problem because memory is cheap and plentiful, but just wondering... Let's say that I have a large text file and I want to make a lookup table out of some of the data in it. I read the file in to a block of lines with 'read/lines.'  For example, 'RAW-DATA: read/lines %datafile.txt'. Then I go through each line of RAW-DATA, extract some stuff, and store it in some othe

 
 
1 hour later…
5:23 PM
@GrahamChiu Sorry to reply to such an old message, but on the question of can Rebol enable non-programmers, I am still very much trying to do that.
A question I am struggling with however is the balance between language design simplicity versus language use simplicity.
I want the maximum number of people to be able to use the language.
Even better, I want the maximum number of people able to understand, just by looking at it, what a block of code in Rebol actually does.
So that's totally a non-programmer, or at least doesn't (and shouldn't) have to be one.
Everyone should be able to, any time they are asked a question by a program, enter debugging mode and see what code is being run -- and if that code is not instantly understandable as to what question was being asked and for what purpose, and I was that person, I would stop running that program.
Some of this is not even in the hands of language designers of course, but application designers (particularly in choice of variable names, but other things too).
But what is, is documentation and description of the language itself.
I'll start with a very simple example of the problem I am talking about.
The computer science field is full of discussions (and I mean ad nauseum) of when to use "parameter" and when to use "argument" in the documentation of functions.
I have a very simple answer to propose to all of them: NEVER, sorry for shouting.
And I feel that going for "formal arg/parm" versus "actual arg/parm" is even more of a cop-out.
Who's going to know which is which better because of that? No-one who didn't know it already.
What is going on, and what the user needs to know therefore, is that something (what's passed in) is accessible to some actor by name (what holds it).
Now instead of "how arguments are passed" we can talk about "how values are passed in",
and instead of "how parameters work" we can talk about "what values will be held".
Seems much more natural, and a lot less frightening, to me. And that's the place I want to end up being at.
 
5:45 PM
@MarkI Doesn't seem worth parametering over at this point in time.
 
However, in the meantime, I have to continue to use "parameter" and "argument" and all the other formal crap (like the gobbledygook I published) until the design has settled down enough to be able to be expressed in those (both more correct and more useful) kinds of phrases without confusion.
@HostileFork Ah, you anticipated my denouement again HF!
I just wanted to make sure everyone was aware that I am not trying to complexify the language by forcing difficult terminology on everyone.
As in, for my purposes in describing the language syntax, I have a category named "numerics" for Rebol's eight measurement-based types.
But by no means am I suggesting that "numeric" be a termed used by language users, or even language describers.
In those cases semantic terms should be used, for example, "amounts" and "measurements", respectively.
In fact, I want Rebol use documentation to only be about amounts, names, text, and series of them. Period.
"Block" is actually a semantic type, but it is a syntactic term. Semantically, documentation should not refer to blocks, but to the code or data they represent.
Again, just saying, it's a goal, I'm not fighting for anything to change right now.
 
 
2 hours later…
7:36 PM
@HostileFork I was wrong yesterday saying that user natives still work without adding symbols manually. I only tested fib.r, which doesn't require any symbols from the exe. I tested another one that referenced Intern_UTF8_Managed, and it failed on Windows and worked on Linux.
 
@ShixinZeng Hum. Too bad. Might be possible to get at those symbols on Windows somehow, just TCC isn't set up to do it.
The same table could be used for both purposes (a macro-based substitution if the symbols didn't work on a platform for library loading, and for TCC)
 
@HostileFork Yep, I was able to get the symbol by addr = GetProcAddress(GetModuleHandle(NULL), name);, but it failed later on
 
@ShixinZeng It might only require a small TCC patch, then, to get it to work.
 
It might, I just tried, and couldn't get it working, so I'll leave the table solution there
@HostileFork for LOCK, can it be absorbed to PROTECT as a refinement if it just makes the protection permanent?
 
7:53 PM
@ShixinZeng In the plan as I see it, LOCK would be something you would do rather often to generated source once you were done with building it, so brevity is important for the command. It wouldn't change the implementation fact that the bits for it need to be distinct or handled distinctly.
Since protect of an object protects all of its keys, it seems unnecessary to apply the key-based bit as well. So the issue of lock not locking keys can be addressed by having key modification check both the object bits and the individual key bit.
 
I was thinking that LOCK just needs to add another bit (say PERMANENT) in addition to PROT, and everything then will be taken care of by PROTECT, it's only UNPROTECT that needs to check the PERMANENT bit, and refuses it if it's set.
The implementation would be much simpler
The PERMANENT bit only needs to be set by PROTECT and checked by UNPROTECT
 
@ShixinZeng To match the current PROTECT implementation it would have to have a typeset bit as well as a series bit. Typeset bits are in very short supply, and the per-key permanent lock is not a necessary feature.
The implementations are already parallel. All 3 types of lock bits are checked in the same bit test operation on series.
 
8:08 PM
I don't see why a typeset bit is needed for the permanent lock, as a context is backed by a series, the bit only needs to set on the underlying series of the context.
 
Well, the PROTECT command let you protect whole objects or just one key. That is why there is a typeset bit and a series bit for PROTECT.
The problem you observed was that the PROTECT command, when applied to an object, would go through and not only protect the series but loop through and protect each typeset key.
Hence, it was assumed that when a value was modified in an object, it was sufficient to check the typeset bit. This meant you could protect an object, then unprotect each of its keys, and if you did that you could modify any of the keys but just not append to the object.
 
Since permanent locking didn't add the key bits, and nothing but key bits were checked when modifying a value, you saw that it was legal to modify the values.
I'd suggest modifying any object's value should check the object's array status. This means just protecting an object should be enough without protecting each individual key, also.
For now, since R3-Alpha had it, though...we'll keep the per-key protect also.
 
Well, I think the values in the object only need to have PROTECT bit set. It's the job of UNPROTECT to check if any of the parent context is locked
I mean any ancestor context
 
@ShixinZeng Technical note just to have it said: because REBVALs get copied from place to place...and you don't want their protectedness to go with them to the value they are copied to...the per-object-key protect bit doesn't live in the "varlist" values. It must live in the "keylist" bits.
 
8:20 PM
understand that
 
@ShixinZeng I don't really understand what the point is you want to make about this, so you're going to have to explain--perhaps from a motivation point ("e.g. why do you care")
 
Let me dig more into PROTECT and LOCK, and then try to explain to you my point
 
@ShixinZeng Okay, but envision a Fail_If_Array_Is_Read_Only() (or whatever that was called) on the varlist of the object when vars are modified.
Which I was going to add in, which would take care of the problem you saw.
 
@HostileFork I was wondering if there could be a way to prevent the user script from calling a native directly: for some of the helper natives, it would require less code to validate the input, if only system functions can call them.
 
@ShixinZeng Interesting question...purposefully "unsafe" natives. Haven't really thought about it. Just in terms of protecting things, keeping things from finding things for binding (module public vs. private and perhaps even PROTECT/HIDE is) about as far as anything has gone. The idea that you take INTEGER! but you knowingly crash the system if someone passes you 5 is a different idea though.
But the FFI allows it
@ShixinZeng There might be an apply-unsafe which you must use if you are going to call a function that is marked <unsafe>, or something.
But I wouldn't worry all that much about it for now.
 
8:39 PM
My current need is that, LOAD-EXTENSION native would return an object, which will be passed back to UNLOAD-EXTENSION. Because it's an object passed in by the user script, a lot of validation needs to be done inside UNLOAD-EXTENSION
 
@ShixinZeng There are other examples of this; you can muck internally with a PORT! in ways that will cause crashes.
It's good to be concerned, but I'd suggest it's not a new problem. A light validation should catch accidents, and there's not a lot the system can do against intentional malice right now.
 
But if only a system function can call UNLOAD-EXTENSION, the validation can happen there, resulting in less code in C.
 
Rebol language and now Red programming language, ( thanks to ICON programming language ?? ) remain very much alive… https://twitter.com/i/web/status/823992943635820544
 
 
2 hours later…
10:24 PM
@HostileFork here is what I was talking about PROTECT and LOCK: when a context/series is locked, both the PROTECTED and FROZEN flags are set on the varlist/series; when a context/series is UNPROTECTed, check if the FROZEN flag is set, if it is, raise an error; when a word is UNPROTECTED, check if its context has FROZEN flag, if it is, raise an error.
This has minimal changes to current implementation, and fixed the issue I saw.
Here is my proposed patch:
diff --git a/src/boot/errors.r b/src/boot/errors.r
index c43b443..e38398a 100644
--- a/src/boot/errors.r
+++ b/src/boot/errors.r
@@ -257,6 +261,9 @@ Access: [
     series-frozen:      {series is source or permanently locked, can't modify}
     series-running:     {series temporarily read-only for running (DO, PARSE)}

+    word-frozen:        [{variable} :arg1 {is permanently locked}]
+    context-frozen:     [{context is permanently locked}]
+
     hidden:             {not allowed - would expose or modify hidden values}
 
@ShixinZeng I see. Well, that's slightly cheaper, in that object field modifications only need to check one place. It leverages the fact that having an independent bit for protect stops mattering after freezing happens. Makes sense.
Pushes the cost to unprotect, which is less performance critical than assignment.
 
Right
 
Ok, sounds good to me.
 
The patch could be even smaller, if there is a way to get the context from a key
is there?
 
No; keylists may be shared by multiple contexts, though that complicates protect and unprotect.
Actually, that's a problem with your suggestion.
Protecting an individual key in an object requires touching that parameter, and if that parameter is shared by multiple objects, you'd be affecting all objects sharing that keylist.
Whereas if you can freeze merely by touching the varlist of an object, then that does not affect the other instances of that object's keylist.
 
10:31 PM
Isn't that also a problem with current PROTECT, then?
 
R3-Alpha:
>> o: make object! [a: 10]
== make object! [
    a: 10
]

>> o2: make o [a: 20]
== make object! [
    a: 20
]

>> protect 'o/a
== o/a

>> o/a: 30
** Script error: protected variable - cannot modify: a

>> o2/a: 30
** Script error: protected variable - cannot modify: a
@ShixinZeng Yup. :-/ It can be fixed by doing a keylist detachment when you protect a key, which is already what happens to have to do if a keylist is shared and you append a field.
But likely a bad idea to address the freezing issue for saving the second (fast) check
Still, it was a good thought :-)
 
Yes, it is
I don't understand this: "
But likely a bad idea to address the freezing issue for saving the second (fast) check", what do you mean?
 
@ShixinZeng I mean that PROTECT of an individual key, as opposed to an entire object, is a fringe feature unrelated to the reason the "freezing" is being introduced.
It will be more pervasive, and it would be nice if it didn't inhibit keylist sharing.
 
I'd almost rather get rid of the per-key protecting, but, it's handy at minimum for debugging.
 
10:39 PM
I think that's the cost one needs to pay if he/she chooses to protect a key
 
You're calling out that object as somehow distinct, so, yes...the information has to go somewhere.
 
OK, I think I'm done for the day, talk to you later.
 
K, TTYL
 
10:57 PM
Was trying to grasp some GC oddities and realized it was because the "emit buffer" was holding onto things between LOADs. Making me wonder "what the heck is this emit buffer anyway?" Basically a less-efficient data stack with bad properties. die, emit buffer
 
11:36 PM
@HostileFork Truly awesome work, thank you very much.
 

« first day (2277 days earlier)      last day (1503 days later) »