« first day (1732 days earlier)      last day (2048 days later) » 

12:23 AM
@Freezerburn Hey there, I believe you said you were interested in building/helping... managed to build Ren/C yet?
 
1:14 AM
One school of thought might say that DO should only take a BLOCK! or PAREN!, because that means DO is single arity. And for clarity, perhaps all other value evaluation should be done with REDUCE.
It doesn't make a lot of sense to say x: 10 y: do x. I guess one might argue that then it wouldn't make sense to say x: 10 y: do [x]. But at least there, you have a potential for a sequence of operations.
But especially given that DO of a file name or URL doesn't just return the value, it seems like a bad idea to make it do integers and return their values. People might think it's a REDUCE replacement for non-block types, and it isn't.
So how about take BLOCK!, PAREN!, FILE!, and URL! for now and leave it at that?
 
1:47 AM
Realizing that break returns an unset (and not none) by default, I'm wondering if return should be zero arity and return an UNSET! by default, and have them both provide a /WITH refinement for giving a value.
So this is a spin on what @rgchris suggested with a default of NONE!, except unifying them under a default of UNSET!.
It's elegant for the reason of ducking the question of how to pass an UNSET! to either of these routines. You don't, that's their default behavior. And if idiomatically one usually does not invoke a return on the last line of a function but assumes it's the result, then the only time you would put a return would be to generate an unset at the end to suppress the last value from leaking.
return/with and break/with look nice and translate into english in a non-awkward fashion. "What value did you break the loop with?"
"with" is one of those words you usually wouldn't use as a variable name, so things like return/value and break/value don't wind up leading you to write return/value value which is a mess.
And I've mentioned my lack of love for break/return which looks like an "either-or" sort of statement. "Well, you're in that loop and I guess... however you get out if it with your break/return/what-have-you..." Junky.
Anyway, just comes on the heels of realizing that break returns unset, and that I think that's the right decision, which makes me think "hmm, well that sure is convenient..."
@MarkI C'mon, opinions here! I know you have one!
Were Rebol not a language that just evaluated to whatever was in the last part of the chain, I might be troubled by how "wordy" it is to have to use a refinement to do a return. But I think the bias is actually the other way... to make it short and succinct to suppress a value being returned!
If one were to argue from a standpoint of backwards compatibility, then, this would suggest making a definitionally-scoped EXIT, adding a refinement, and then deprecating RETURN.
(It might further suggest that QUIT/WITH would fit in all right in this set.)
GoogleRank survey... "exit language keyword" gets the predominant expected hits for exiting a program completely. First-couple-pages-disagreement from PL/SQL and "xojo" where it's for exiting loops (their break). Something called Oxygene uses it to exit methods, and I've never heard of that.
Perhaps obviously, "return language keyword" has a lot more hits and it's what you'd think.
One question to be asked is "if RETURN were reclaimed, what might it be for?" and one answer is that it could just be the ^M character. So [space tab newline return]. Keeps people from spelling out "carraige-return"
I think the cognitive block I have is with the severity of the word EXIT, and its connotations. You think of emergency exits on planes; a very radical state of being, while you "return to your seat". Something about the word just sounds "big" and exit signs are big and red.
Well, some are.
Well, we don't want keywords. So make function! needs to be parameterized to let you pick another word to serve RETURN's function. It probably shouldn't even pick a default.
It would then be the function generators that give us the imposition of RETURN: by default, or EXIT:, or whatever.
 
2:40 AM
On the one hand it seems like "what word to use for RETURN" should fit in the spec, but it creates complexities if you do. It might be out of the spec, like make function! [[x [integer!]] [return x] return]
Wedging it into the spec creates complexities for the generators, who would have to do things like process to see if you already had a return set in the spec and not override the default, etc. Gets very messy.
 
 
1 hour later…
4:05 AM
Thinking further on the distinction, I'm wondering if EXIT is actually more about leaving a mode. So for instance, instead of hitting double escape in Ren Garden to quit shell mode, exit could be used to do that. While QUIT would mean "really, leave the program"; a bit more like "shutdown".
Both could be single arity and follow the /WITH convention for passing values. And if the top level caught an EXIT it would say "no mode to exit, use 'QUIT' to shut down the program. Use 'QUIT/WITH integer' to return an exit status to the invoking process."
Of course me saying "use 'quit/with integer' to return an exit status" suggests how ingrained thinking of it as an "exit status" is. It's not a "quit status"
 
5:01 AM
@JacobGood1 Well, since your avatar is around and I'm talking to myself... what do you think about all these words? RETURN, EXIT, QUIT, BREAK? What if all these went to arity zero and had /WITH refinements, yet had distinct meanings as beginning to be outlined?
@earl I'm not sure exactly what I did that made this error "work", but Rebol3 is choking on the construction syntax here for Rebol2 of #[function! [] []] because it's supposed to be #[function! [[] []]]. And I think it can be convincingly argued that the right thing to do when you hit a scanning error of malformed syntax is to not hand back the result of the load anyway.
The existence of a couple of those aren't necessarily a good argument for getting rid of the Rebol2 tests altogether, but it suggests drawing the line at being concerned about construction syntax differences. :-/ So I'm going to strike that one.
 
5:29 AM
@HostileFork good questions. If we had a better way of creating an unset! would that help? To me it seems that return should return something by default
 
@johnk As mentioned, that makes sense in other languages more than in Rebol...due to the implicit returning mechanic. One thing that I worry about is how code reads, and I think the good news here is that someone coming to the language would be able to read code because it wouldn't make suggestions that return should be returning something. It would probably stand on its own line, or at the end of a block... ... return]
Then, return/with would be fairly obvious.
So your remaining risk is people who are authoring new code, who try return x and it doesn't work, giving them unset.
The silver lining on that being that they won't get a result, and if they help return they should see the issue that they have to use /with. I've written about the usability / learnability distinction.
In terms of that, I always get tempted to put returns on the end of functions even though they're not needed, because if they're not there I feel like I need to put a comment saying ;-- this is the return value
But I think if the story is coherent, and if you can really come out and say "No. Don't do that. This is a core principle...expressions evaluate to their last value. You need to know this principle and apply it, and read for it. It's non-negotiable..." then that paves the way to tell a solid story about why all the breaking constructs are zero arity and need a /with for a value.
 
5:54 AM
@earl Technically I guess one doesn't have to axe the construction syntaxes, just use LOAD on a string from within the test, so it only crashes that one test instead of all of them.
Hm, it looks like there's supposed to be a handler for that, I guess it doesn't try to LOAD directly...wonder why the handler stopped working.
 
6:46 AM
@earl Don't know, it started working again. Mystery. I'll keep an eye out for what's going on with that if I can reproduce the case again.
 
posted on July 29, 2015 by fork

[Issue] PROTECT 'FOO and PROTECT FOO are different; one protects a word from being used to change the variable to which it is bound, and the other protects the value itself. So for protecting the value: >> foo: [a [b c] d] >> protect foo >> append foo 'muhaha ** Script error: protected value or series - cannot modify ** Where: append ** Near: append foo 'muhaha >> foo: 10 == 10 In contrast

 
I feel the above is a bug --^ but nevertheless, it's used in the tests to protect/deep the word 'blk in the user context. Yet it's not unprotected, and soon a test tries to overwrite blk. Ren/C correctly honors the protection now, so several tests appear to fail.
Unless I'm missing something where it's supposed to create a new context for each test and I've broken something locally so it does not...which I will now look just to find out, despite being pretty tired. It would seem they wouldn't want to leak into each other, so maybe there's an issue with that.
[x: 10] "failed, not a logic value"
[x == 10] "succeeded"

system/version: 2.101.0.4.40
code-checksum: #{C746F43DB2DB37F5C9B759848C1B9DECC9EC1DD7}
test-checksum: #{18E4A9892ADEA717919E3618528D0CF8AE3176FB}
Total: 2
Succeeded: 1
Test-failures: 1
Crashes: 0
Dialect-failures: 0
Skipped: 0
That's with a rebolsource r3, so I'm guessing the tests aren't isolated into their own contexts. Okay, with that... I'm going to have to call it a day on this stuff and go do some of the other stuff I do sometimes. :-)
 
7:19 AM
But first, argh, I figured what I was doing wrong. I was trying to run core-tests.r and not run-recover.r !!! Sigh.
This is one of those cases where being named core-tests.ren, indicating it was data and not something with a header that was executable, would be helpful...or where Rebol refusing to run things without a Rebol header is important, at least.
 
 
2 hours later…
9:17 AM
posted on July 29, 2015 by Geomol

New version of The World Programming Language is out. This is a major alpha release with lots of new stuff. Check group #World here in REBOL4 @ AltME.

 
 
3 hours later…
12:33 PM
Geomol adds: "I'm very happy with this release, as it solves some issues, I've struggled with for years.

Previously known issue with how to implement the path! datatype is one of them. I've worked on this almost from the beginning of World, but especially the last couple of years, and I finally think, I've found a good combination of early and late binding, so path! is useful. It's not quite like in Rebol, but with recompilation to the virtual machine in World, the more exotic Rebol behaviours should be possible."
@HostileFork pity World is not open sourced, as you might to look into how it treats the Path datatype - afaik it is a deep topic here, sometimes :-)
 
@pekr In the absence of source code to browse, meaningful examples to study, or technical documents to read... I'm very skeptical of the value of trying to reverse engineer whatever path novelties it contains.
 
Yes, I can understand.
 
He has the Bozo bit set in my book, and un-setting that would require doing a lot of things, including not defining ? as printing "Hello World", nor using a picture of the Earth as the language logo, etc. But certainly open sourcing and having some reasoned technical arguments would be in there somewhere.
 
John has already stated few times, that he's not going to open source World.
 
Yup. And nothing of value was lost.
 
12:43 PM
Do you think that there's no value in World language?
 
In the meantime... paths forward toward StableStack. Back to the non-crashing test suite, more progressions than regressions, following up on some regressions.
Hard to say. There's no documentation to read, no source to browse, and I didn't get the impression it would be a factory for good ideas. I guess there are so many good and interesting things being done and shared by people globally that one weirdo's secretive and poorly documented system isn't on my radar. I did click through the GitHub and saw nothing of note being tested.
There was a "unary minus test" where it said -1 = - 1 and I'm not really sure without context what the deal with that is.
Like, is that in the language somehow... overriding minus? Or is arity-2 minus replaced just for that test to show you can? Who knows. Who cares.
That said... I will of course listen to any good ideas that someone manages to mine out of it, if they are there.
Hm. I wonder if Rebol needs a keyword to do what PATH! does, but on a block. Something like chain [a b c] evaluating to the same thing as a/b/c
The alternative would be reduce to-path [a b c], which mechanically speaking works out to be less efficient because you have to copy the series to do it, and it's also wordy.
Blocks are just easier to work with, and if you're trying to do something pathy to get the path eval vs. writing source where you are using the paths for expression, you might prefer blocks as being clearer.
 
1:20 PM
@HostileFork You left out FUNCTION!. That's a big regression if that's what you intended ...
@HostileFork I know I will have one. I don't yet.
I will say that reading / as either-or is an English usage that one had better learn quickly doesn't suit Rebol code.
 
@MarkI Well specifically the issue of FUNCTION! has to do with the variable arity "bounce" that we're wondering about. Should it be the exception.
(I left of STRING! and BINARY! also, but those were accidental)
Anyway, I don't think DO should reduce "whatever's left over", it should be an error and reserved for future expansion. x: "1 + 2" y: do x vs. x: <1 + 2> y: do x, for instance.
Today the first will give you 3, the second will give you <1 + 2>, and that is silly.
What might DO of a TAG! do? Who knows. Maybe it's a module naming system. do <matrix>
So it could go through some directory service to get the URL of the module.
 
1:37 PM
As usual, I have no idea where you are going with this or why. EMAIL! is a string type that self-evaluates, is that also bad?
 
I'm complaining that DO picks K out of N types to give special interesting behaviors to, and then it just REDUCEs the leftovers.
 
@HostileFork I would say REDUCE calls DO, not the other way around.
 
No, DO is not the evaluator. DO "1 + 2" is not the same as DO ["1 + 2"]. It does things the core evaluator simply doesn't.
 
I admit that "just memorize them" is a bit annoying when you want to find out what types DO is non-self-evaluating on, but, the only help possible for that is to make them as intuitive as possible, not making up (or leaving out) bizarre ways to execute strings.
 
No the help is to make the entry points that do not have special behaviors errors, until you think of a good use for it that fits with the other sensible entry points.
Hm, can you use DO/NEXT on a string?
 
1:43 PM
You lost me at "DO is not the evaluator". Are you saying there are three evaluation dialects, DO, REDUCE, and "the evaluator"?
 
That is technically the case.
 
Because you don't want REDUCE to fail to self-evaluate strings, for example.
 
You can use DO/NEXT on a string, and you get a position in the loaded block back. Hmmm.
Anyway, point for thought. I was just provoked into thinking about it from looking at the test cases and staring to wonder "Hm, wait... what does do (quote x:) 10 do?
Off for now though, TTYL
 
Enjoy your well-deserved break HF.
 
2:19 PM
-1
Q: My input text has changed color

Jack WahrmanEvery place I type in any web page, the text is now RED instead of black. Even this text box is typing in RED. I don't know what changed. How do I get it back to black?

 
 
2 hours later…
3:49 PM
@HostileFork I like the idea of using words instead of key binds for every thing. Key binds could be bound to the words... double esc would launch the QUIT command. In short, I like your idea =)
 
 
2 hours later…
6:07 PM
@HostileFork WRT SER_BARE, I am using it to designate a series not containing REBVALs
and that's what the GC uses to avoid going through deep into the series
I'm also using the flag SER_EXT to designate the external memory used in a struct!
so the Free_Series_Data can avoid free'ing its memory
 
 
1 hour later…
7:29 PM
@ShixinZeng Hm, well IS_BLOCK_SERIES was in sys-value.h (albeit used only by a debug routine) and is a useful test to know independent of the GC behavior. For instance, the word series of functions and objects does contain REBVALs, yet you tell the GC not to go deep into it as an optimization. I was going to make it so the debug version did go deep on SER_BARE to check that you weren't lying, and that really there were no series...
So it's good to have a separate test to know the two different things. I'll look into what the right formulation is, but I guess it just means we'll be getting rid of that size check as the determiner. (I already thought it was sketchy)
 
7:42 PM
@HostileFork sorry, I still don't get it. What I am proposing is to change current IS_BLOCK_SERIES(ser) to (SERIES_WIDE(s) == sizeof(REBVAL) && !IS_BARE_SERIES(series) && !IS_EXT_SERIES(series))
It just makes IS_BLOCK_SERIES do what its name suggests
 
@ShixinZeng That's a fairly convoluted check, and I think it would be simpler if we just had a bit on the series. And for the bit-twiddling performance concern, quicker to check. (I'm not really concerned about that bit, just the desire for simplicity.)
Series would feel better designed if it weren't deciding anything based on the size, basically.
 
Sure, we can introduce a new flag, which I think will obsolete SER_BARE basically
SER_BLK?
 
It wouldn't in the case of word lists for objects or functions, because they will still be blocks...and still be debug dumpable as blocks. But as I said, not marking recursively into them need not be a product of being marked by SER_BARE, rather that the when it sees REB_OBJECT (or similar) that the value marker itself doesn't go deeply into it (unless a Debug build to assert that it doesn't have series)
SER_VALUES
So with that change, yes, it would replace SER_BARE.
Things like SER_BARE and doing the sizeof check are just in that bag of "the kinds of things that don't feel like they have good quality". I don't like the "just trust me" logic of SER_BARE; if there's some optimization claimed about a series we should always be able to double-check it in a debug build.
 
Yep, I think it's a good idea to introduce another flag for this purpose
right now, we just assume it's a block if the size of its elements is right
and then check for exceptions
 
Okay then, I'll come up with a patch for that relative to the GC commit
Soon-ish :-)
 
7:54 PM
Great
 
Regarding the math issue, I agree that using the builtin math is better, but part of the "selling point" of Rebol is that it can work without dependencies, and right now that multiplication thing is failing. Do you know what the change you made was supposed to do, or how the original code worked?
 
I haven't looked into the mathematics yet.
Looking into it
 
@ShixinZeng Cool, thanks. And like I said, you should just ignore the REDUCE/INTO thing, I'm redoing that anyway. Just wanted you to know what's going on w/the tests.
 
@HostileFork Thanks for that
@HostileFork for the integer math operations, I think I've basically rewritten them to avoid overflow at all
The original implement basically does the math and check the result to check for overflow
which is undefined if the math overflows
 
8:16 PM
@ShixinZeng Should multiply -1 0 be defined?
 
I am just trying to give you some history about this code
 
 
1 hour later…
9:36 PM
@ShixinZeng Great, ok thanks for the fix. It seems that what we might need is to generate a file full of tests of math operations with their results, using a known good math engine. Then just include that big file of tests. That way the tests could still be independent of running some third party executable.
Just a fuzz test, with random numbers all over the magnitude spectrum, combined arithmetically in various ways.
 
10:16 PM
posted on July 29, 2015 by zsx

As pointed out by hostilfork: I'm having a problem with multiply -1 0 not working: multiply -1 0 ** Math error: math or number overflow ** Where: multiply ** Near: multiply -1 0 Took a look, got here. REB_U64_MUL_OF gives back p as zero which we expect, and p is an unsigned 64-bit quantity (superfluous cast). sgn is true because x is -1, and it says sgn = x < 0. So the condition on

posted on July 29, 2015 by zsx

As pointed out by hostilfork: I'm having a problem with multiply -1 0 not working: multiply -1 0 ** Math error: math or number overflow ** Where: multiply ** Near: multiply -1 0 Took a look, got here. REB_U64_MUL_OF gives back p as zero which we expect, and p is an unsigned 64-bit quantity (superfluous cast). sgn is true because x is -1, and it says sgn = x < 0. So the condition on

 
@rgchris Since every PR generates an issue, wouldn't it be easy to get the feeds to not duplicate by doing issues only?
 

« first day (1732 days earlier)      last day (2048 days later) »