« first day (1803 days earlier)      last day (1977 days later) » 

12:02 AM
looks like a scheme
write [
    scheme: 'error
    code: 400
    type: 'math
    id: 'zero-divide
    near: [100 / 0]
]
what's wrong with this type of object or port creation?
 
@GrahamChiu Difficulty curve. fail [#tab-character-in-file "The file" filename: something "had a tab character in it"] is the sort of thing that makes good error messages easier to make. Dialecting is the raison d'etre
You can start from a string and move up from there as more information is needed.
For all these things I still pine for the idea that you're editing a graph and they have an identity at time of writing that you can use, and the added information just displays the relationship. But both the simple expression problem and the powerful tooling problem need to be solved, complexity management vs. complexity elimination
 
12:36 AM
well, you could have a string! and an object!
so if the string is insufficient, you can optionally add an error object!
 
1:02 AM
@HostileFork Made my comments @GrahamChiu.
@HostileFork Haven't seen @earl nor @ShixinZeng to see if they approve the new format...
Just about to test build, that I'd forgot about till just now.
 
@Brett Well, we need @earl for the issue repo so @johnk can bring that link up with him in the same outreach. Can open an issue with ShixinZeng with a GitHub issue on zsx/r3 to ask him to review it.
 
Ok. I'll do that.
 
Carl Sassenrath is celebrating 5 years at Roku
says Linkedin :)
 
1:22 AM
The overhead of separating out the error fields so that where, near, etc. aren't competitive isn't totally cheap. Perhaps where it is least cheap is the mental/visual cost at callsites having to say err/args/blah instead of err/blah. :-(
I think we should just put them in-band for now and get some experience with it.
Famous last words, but...putting them out of band isn't going to solve the "keyword" problem on the error fields anyway
 
 
1 hour later…
2:40 AM
@rgchris @Brett any experience with dialects where you use a string type to create something you intend to be a WORD!, e.g. you've taken word for something else and you need a word value so you say <tag-whose-name-will-become-a-word> ?
I wonder if the distinction between words and strings in a mechanical sense--as opposed to in an evaluator behavior sense--is semi-artificial. What if all strings had the option of binding?
 
2:54 AM
@Brett Oh, I wanted to mention... I think maybe we should do the arity-2 native with the sample code as a refinement probably, because foo: native [...] none looks weird with the line break. So foo: native/body [...] [...equivalent source...]? Something like that. In any case, what that means is there's no need to stick none on things like I suggested before...they'll just get a refinement and a body when that feature comes around.
 
3:51 AM
@HostileFork Hm. In a sense, tags and attributes in AltXML are good candidates for word types—indeed I've been contemplating changing the internal representation of XML to be words once again for efficiency (the API would still use tags—still a bit leery of the less-parseable nature of said internal representation), and of course the use of the tag! type as keys in AltJSON's /flat mode (although JSON's keys are strings, so...).
Can't think of any other instances—generally the availability of types obviates the need to make such compromises.
>> do reb4.me/r3/altjson load-json/flat {{"a b c":"d"}}
 
; Brought to you by: try.rebol.nl
== [
    <a b c> "d"
]
 
I'm not suggesting that object keys could be strings, just that the "spelling" could be bound like other word types.
 
(welcome back, @RebolBot)
If I remember rightly, Gregg's old Excel dialect used URLs to represent cells: goto cell b:6 set cell "Foo" (or something like that)
 
Oh my.
 
Heh, hit Fork's disgustometer!
 
4:04 AM
I'd suggest cell b/6 as more fitting. (With proper parens in paths you could even put expressions in there.) The idea of tolerating b as a WORD! way of saying a STRING! is line with my current idea
 
Either it also supported pairs, or I hacked a version to do so (back when I had enforced need of Excel) even if that didn't quite map to Excel's cell naming.
 
@rgchris There should be a summary of what ideas about these things are interesting or original. I think the untold story of Rebol is still "why care" because things made with it are hard for people to come to grips with. Trying to push it to the "here's why to care" and be able to tell a start-to-finish story without contradicting oneself is a puzzle... but I think a solvable one.
 
posted on October 08, 2015 by qtxie

Vector enhance by qtxie

 
4:33 AM
@HostileFork I know it crossed my mind some years ago, and I suspect it was around finding a representation of html/xml like Chris. It's probably not what you're asking about, but what's on my brain is tokens like C tokens. Perhaps foolishly, I want to parse a sequence (block) of them, yet each will have a string aspect and a word aspect, both useful for pattern matching.
When you mention strings with binding I'm not entirely sure what that means, but I start wondering whether string tokens can have their class/name/etc bound to them while maintaing a representation close to the original source.
BTW, is there some easy way to disable make-reb-lib.r from running so I can test compile ren/c with the new formats?
It chokes on the change of formats.
 
@HostileFork @HostileFork I don't think there's a language in the constrained ascii-delimited world that offers so much expressivity and versatility, yet be maintained within a tight little package that works with little prodding. Rebol being so freeform and with so few users, I don't think we've seen the best of how to hone dialects to span all the problems we know it capable of.
Yet occasionally in our code (and often at one's own hand—that is to say each of your own first-hand experiences), you encounter the sublime—a piece of code that sums up a problem domain the way no other language could. That's why we do it, that's why we want people to get it. Lego alligators for all!
 
@Brett you can just comment it out or put a quit in the file at the top...
 
@HostileFork Quit! of course.
Ta.
 
@rgchris The "no other language could" is where the challenge is, in the sense that to someone with a well-built alligator lego set every construction site looks like a toy-store...and you might see that as good or bad, depending on what you're trying to build.
 
@HostileFork FYI the ren-c bots are stable so far with no discernable memory leaks
 
4:39 AM
In looking at the unzip.reb I found myself feeling annoyed that binary parsing didn't feel a bit stronger.
@johnk Good! Well, nice to have more day to day test code going.
I did find myself enjoying catch and throw when thought of as something to use as a casual control construct. One thing about using it as such is because I've tweaked it so that it really is very light. The words have a "costly" association for exception handling, and they used to cost a bit more...but now very little. Could probably do some performance tests and show it to be fast relative to other approaches
 
4:54 AM
One thing about WORD! vs STRING! is that they are kept in UTF8, vs. expanded out into platform string format. The reasoning I would guess is storage efficiency; if you're not going to mutate, why bother decoding? But a lot of times strings probably aren't mutated either. That could be a general string facility to expand out to codepoints on-demand.
Or just forget it and say that if you have a WORD! that has more than Latin-8 characters you pay for it being in whatever string does with it, e.g. two-bytes-per.
Effectively, making words and strings share ability and both be able to bind has one major "hard" problem; which is that strings pay for identity management. ["foo" "foo"] makes two series. [foo foo] makes one symbol. If they are to share a mechanic, there must be a way that words don't end up suddenly costing a series per instance by default. Pretty much any stub object used for identity in copy-on-write...even it were lighter than stub series... would still cost too much.
 
@HostileFork It's difficult when there is a scarcity of library code available, but certainly in my experience a preponderance of library code might make short work of a task, but is still just lipstick on a pig [insert Cameron joke here]. Once you hit the bounds of what that library code does, you are still stuck with limited routines and clunky constructions to bind things together.
When it comes to it, I suppose we are the quirky few who are willing to work around that scarcity for the sake of trying to forge new ways of approaching things. I suspect there are more of us, but if we knew how to reach them we'd have done it. I still see things like StyleTalk as a way to appeal to one segment—others might have similar targets.
I'm not normally one for glorying in Internet points, but I'm killing at stars at the moment B)
 
5:14 AM
@rgchris So it seems. Well, I think that the story of Rebol is not told where it counts in a convincing way these days...the YouTubes, the web pages, etc. Rightly or wrongly, the things that tend to motivate people haven't been put together compellingly yet.
 
@HostileFork Yep. Not wanting to speak for anyone else, but I am certainly guilty of spending too large a percentage of time developing and not documenting. I think you've all called me on this before.
I'm not sure how to break the cycle—I start to contemplate documentation and spot one more thing that I'd like to have work that'd make the documentation make more sense.
 
The code medium will not weave together well with math invariants. It's not SolidWorks. But the question of "what if" about how fast you can imagine things really is the sketching model. Programs that you can draw in clear sharp lines and you don't care if you have to rewrite it all...you limit the interface to messages and can start again.
 
@rgchris you may find that all of your documentation ends up as SO answers!
 
@GrahamChiu Would that be so bad? :)
 
2
Q: Create JSON array using altjson library

johnkI am using this JSON library for Rebol http://ross-gill.com/page/JSON_and_REBOL and I am struggling to find the correct syntax to create JSON arrays. I tried this: >> to-json [ labels: [ [ label: "one" ] [ label: "two" ] ] ] == {{"labels":{}}} I was hoping for something like: == {{"labels": ...

It is bad when the regular users have some problems with using the code
 
5:23 AM
Hm:
>> do reb4.me/r3/altjson to-json [ labels: [ [ label: "one" ] [ label: "two" ] ] ]
 
; Brought to you by: try.rebol.nl
== {{"labels":[{"label":"one"},{"label":"two"}]}}
 
some docs with the code might be useful
 
I guess that works now...
 
which reminds, we need to put the help/doc documentation under our own control
I see you have help.rebol.info but I'm thinking that perhaps the text for that needs to come from a repo which can be contributed to by users
 
Thing is, when I work on something like AltJSON, it's usually because I'm working on something else that uses it (or am fixing something), and that something else needs to be finished. There's only one of me...
 
5:27 AM
copy rgchris: to end
 
@GrahamChiu help.rebol.info is a shell for a help system that draws on a source (or a source is pushed upon it) that is not a Rebol 3 binary...
The majority of the work was ensuring the URLs worked.
 
why not just use the code from help?
 
That's what it does for now.
See: help.reb and args.r (that calls help.reb)
 
5:49 AM
Fast and effective progress showing so far on error work. So @rgchris you might want to get ready to start thinking about how to make them better-er. The tools will be there.
 
6:26 AM
Ha! Interesting the errors you find when you add in asserts and start checking things. errors.r had a couple of ordinary words instead of set words as object keys. Because bootstrap loads the errors as structure and doesn't look up bindings, it didn't notice...and so the object formation just wound up a few keys short! The error messages thus out of alignment when looked up by integer in C code.
 
6:46 AM
Wonder how many errors are lurking in Rebol2
 
@GrahamChiu Tons I'm sure, but this isn't a great example as the errors were new. It's something over time someone would notice under inspection like "oh that's supposed to be a set-word not a word". But the thing is more about the absence of any checks.
The correct fix to such things is to enforce anything you can check that easily, especially during the build prep scripts.
 
7:09 AM
>> x: try [1 + [foo]]
== make error! [
    code: 309
    type: 'Script
    id: 'cannot-use
    message: ["cannot use" :operation "on" :datatype "value"]
    near: [:value1 :value2]
    where: [action! + trap either try]
    __FILE__: %../src/core/f-series.c
    __LINE__: 132
    operation: 'add
    datatype: block!
]

>> x/operation
== add

>> x/datatype
== block!
Something's up with the near but getting close. Note a new trick for the debug build... __FILE__ and __LINE__ for where the error came from in the C code.
@GrahamChiu @rgchris In any case, once this is tidied up a bit it raises the question of what to do about the "shared space" of words in the ERROR!. In fact, for this very example I first tried "datatype" but that was taken for the "error category" type.
One thing that sucks about doing it this way is if we are to act as if error IDs are all their own "namespaces" then you have to check the category and the ID before you can be sure you have a match. So it seems to make more sense to use something you can compare atomically. A path would be a possibility... if error/id = 'script/cannot-use [...]
It could be left in the hands of the author of the error to pick what they want to use for identification. URL, path, word, whatever.
 
7:26 AM
I hope not
I like to trap certain errors by id
 
It would still be an ID.
 
If errors are consistent across authors, it makes it easier to cope
Well, that's my gut feeling
 
What I like about using a URL is the idea that you might have hope of using it to locate some kind of help about said error when it happens.
error:script/cannot-use or similar could fulfill the wishes of those wanting to keep it more abstract.
So Rebol could have some kind of "error scheme" where contracted errors were looked up.
Requiring people to give an invariant ID to every error up front doesn't make a lot of sense, and leads to people not writing reasonably informative errors. The question is how much of "return result with data you might be interested in picking apart" winds up in an error that you trap.
 
 
2 hours later…
9:06 AM
This is a fairly daunting design space to jump into, so I'm going to start just by cleaning it up with the basic infrastructure that allows trying various decisions. Getting the expandable logic in allowed adding the FILE and LINE numbers and that's a reasonable feature in its own right.
Shouldn't change everything at once, anyway.
 
 
2 hours later…
10:47 AM
@HostileFork your last changes broke something -
>> print read https://google.com
Segmentation fault (core dumped)
 
@johnk Thanks, let me look...
 
https only, http worked fine
 
Hm, a leak'd thrown value. That... would indicate making a mistake in that Throws thing (it was an isolated-out change from something bigger, but how could I have messed it up?) guess I'll know if I look again, eh?
 
good luck hunting it down
 
11:33 AM
@johnk Ah, I bet I know what it is. I changed something to catch precisely this sort of trouble as a prelude to something I'd like to do in the future. What I did was bump the position of this field, so that the frame series of ANY-OBJECT!s isn't at the same offset as the non-frame series of ANY-SERIES!
Here's at least one place where it's hardcoded-ly assumed they're the same (in a way not linked or verified by assert): github.com/metaeducation/ren-c/blob/…
Which is being run afoul'd of. Hm. What's tough to do on an assertion regarding that is that you cannot include both the reb-ext.h header and the rebol headers at the same time, I don't think.
The RXT thing is definitely tangly and one of Ren/C's motivations was to dispense with all of that when writing native extensions, you link to the same API as Rebol. Hmm. Let me look and see how much of the R3/View code is tied up in that mess
All of it. Hmmm... well it would be I'm sure a relief to go through and rip it out, but maybe this suggests the dependency is still kind of entrenched. :-/ I will undo that change, add a purposeful assert that will trigger if it does move, and think more on it later.
 
12:10 PM
Thanks for keeping trying and keeping posted. So far the goal has been to keep the system as reliable as possible while still changing it... (though hard to compete with the reliability of something that never changes, if the definition of reliability is 'have nothing more broken than it was the day before')
 
1:13 PM
@HostileFork Only things I see right away are (1) make-http-error is defined twice and (2) long lines. Otherwise OK by me.
 
1:59 PM
@MarkI Another reviewable...me suggesting to cease with the auto-CR-throwaway and make CR-aware UTF8 something you have to request specially for both encode and decode. Zzzzz...
It's important to make some strong decisions if one is going to make a tool that's going to focus with an anti-complexity stance. It's not about making things impossible but making the comfort zone comfortable where all the carefulness is carved out to (ostensibly) remove concerns from your radar.
 
 
3 hours later…
4:52 PM
@HostileFork I understand where you are coming from on this one. I hate CRLF as much as the next guy. But I intensely do not want to force others to face the dreaded "upgrade your OS and then Rebol will work just fine" that I see and detest every day from other applications. AFAIAC making Rebol "POSIX-only" or even "non-POSIX OK if you stand on your head" would be a killer giant step backward.
Rebol can, and should, be smart enough to detect the platform standard and use it.
Everywhere, and always, unless specifically coerced to do otherwise.
Early MAC? CR only. Posix? LF only. Windows? CRLF only. So sayeth I ...
(Fortunately the scanner as designed works on all three under all three, and even efficiently so ...)
 
5:21 PM
Further thinking (always dangerous) points out a flaw in current Rebol if my plan is to be implemented.
As it stands, when Rebol scans a char string it converts LF to #"^/" and leaves CR alone.
This behaviour IMO should be changed to be platform-specific, i.e., change consecutive CR LF bytes to #"^/" but only on Windows, etc.
The way I am currently thinking, you would have to stick to binaries to avoid this, but I definitely need help thinking out all the ramifications.
 
 
4 hours later…
9:34 PM
thanks. There still seems to be another issue as well. This one-liner now hangs
to string! read https://stackoverflow.com/users/login
I need to read the ren-c porting guide and see if I can get rebolbot runnung properly trello.com/b/l385BE7a/rebol3-porting-guide-ren-c-branch
 
10:09 PM
@johnk sigh, if not one thing it's another... ok, I'll get on that momentarily
 
@HostileFork sounds good. Do you run the core tests as part of your builds? Do you want me to add a couple of https related tests to help to catch these?
 
@johnk I do run core-tests.r and there are a few complexities in terms of introducing a non-deterministic test, but sure... if you can think of a good list of things send a PR of the lines to github.com/metaeducation/ren-c-test
@johnk (Put them at the very end...)
It is about time to go through and break the tests off from rebolsource.net's copy...delete the Rebol2 entries (or at least break them out into a separate test of loading a body of Rebol2 code... remove all the failing tests and mandate zero failure, etc.
 
10:49 PM
@HostileFork which non-deterministic tests?
 
@GrahamChiu Some problems are easiest to check in on by doing a "tick count" of when they fail, basically keeping track of the number of evaluative steps the interpreter has taken before the problem happens and working backwards from there. On two successive runs the tick count will be different when you talk to an external source...timings and amount of data, etc.
It just suggests putting such tests at the end. There's no reason not to have the tests just because they can fail, e.g. timeouts should be working etc.
 
ah, you're talking about much more subtle errors then the ones I make :)
 
@johnk I think this problem has arisen from the change in logic for conversion from binary to integer, where it assumes signed based on high bit... e.g. to-integer #{FF} is -1. If you want to force unsigned decoding you prepend #{00} to any size quantity, to-integer #{00FF} will give you 255.
I'll look through the to-integer calls in prot-http...
chunk-size: to integer! to issue! to string! chunk-size what the heck is that
@GrahamChiu @Brett @rgchris --^ known idiom?
Hm, converting hexadecimal strings to integer I guess.
 
@HostileFork Looks familiar, pretty sure it's out of date though. What's it from?
 
@rgchris prot-http.reb ... there needs to be a better way to convert hex strings to binaries.
There's LOAD I guess
 
11:04 PM
debase
>> decafbad: probe debase/base "DECAFBAD" 16 to integer! decafbad
 
; Brought to you by: try.rebol.nl
#{DECAFBAD}
== 3737844653
; Brought to you by: try.rebol.nl
#{DECAFBAD}
== 3737844653
 
Thanks RB!
>> enbase/base #{DECAFBAD} 16
 
; Brought to you by: try.rebol.nl
== "DECAFBAD"
 
>> enbase/base to binary! 3737844653 16
 
; Brought to you by: try.rebol.nl
== "00000000DECAFBAD"
 
11:07 PM
More purposeful
At times I think I've fallen on the side of believing that ][ instead of ] [ is the way to go on lines where that is the only content of the line.
 
>> enbase #{decafbad}
 
; Brought to you by: try.rebol.nl
== "3sr7rQ=="
; Brought to you by: try.rebol.nl
== "3sr7rQ=="
 
@HostileFork Yay!
 
It has nothing to do with consistency, it's just about the look.
 
I guess Base 64 is the default for enbase/debase
 
11:11 PM
I do not think you should do it on the same line... foo x [a][b][c].
 
function [a b c][
 
I don't like that either.
I like seeing more clearly the separation to know "this line is being continued"
 
Well, we'll disagree on that one for now...
 
It's just that the ] [ gap adds a noise element. You might argue that there's a noise element in function [a b c] [ as well, but there I think the noise element isn't noise because it's information-adding
 
I like that it's an option. Go Plan -4!
 
11:16 PM
So I think my idea of making the TO-XXX functions not entirely useless may have merit... e.g. TO has no refinements but the TO-XXX can. And one thing TO-INTEGER could have as a refinement could be /UNSIGNED
It's also been pointed out that the TO-XXX functions can limit their typesets, which can be informative.
So basically what this model suggests is that when a TO-XXX function has no refinements it "decays" to behave as TO XXX! would
TO-INTEGER/UNSIGNED "-10" should raise an error not give back 10. If you want that you should be explicit as abs to-integer "-10". Less typing too.
Does this concept sound reasonable?
Then you could say to-integer/unsigned #{FF} and get 255. You could also do to-integer head insert #{FF} 0 if you wished, but that's more opaque.
I think enabling the former is a better fix than the latter. Put the real TO guts into its own function and expose as a native, then call it from the TO action with no args.
 
11:38 PM
@HostileFork I understand. Is using github.com as a "reliable" test site okay? (until we can quickly spawn an https cheyenne instance in the test suite :-)
 
@johnk As reliable as anything... Travis-CI depends upon cloning from Git so if it's down the tests wouldn't work there anyway (when we put the tests into the CI, which we will...)
I'll note another possibility is that MAKE INTEGER! could take options. To me that is what has emerged as MAKE's domain, to be the dialected form while TO is the "common converting case". It could even default to the opposite case...assuming you meant unsigned and then you would have to throw options into a block to get a signed conversion. make integer! [<signed> #{FF}]
"MAKE takes a spec. TO takes a value." That's vague but I think it does point to the idea that TO is more about reversibility. e.g. TO BINARY! some-int should give you back something that has a shot at giving you the same thing back via TO INTEGER!. As such, if a negative number produces binary bits B from TO then TO INTEGER! B should be able to produce a negative number back.
2
MAKE has no such rule. So perhaps MAKE INTEGER! #{FF} can return 255 while TO INTEGER! #{FF} returns -1. I'm not suggesting this is very clear, just pointing out the option exists in the design space.
(It's a lot better documentation to say TO-INTEGER/UNSIGNED than to rely on invisible defaults.)
 

« first day (1803 days earlier)      last day (1977 days later) »