« first day (3406 days earlier)      last day (374 days later) » 

12:23 AM
I was playing with the idea that UNDEFINED? SOME-WORD would check to see if that word was void (to distinguish the "unset" state of things being NULL). But I'm wondering if we are doing anyone any favors vs. saying NULLED? and VOIDED?
 
12:34 AM
I was sort of trying to get some parity with JavaScript where they called a datatype "undefined" (in sort of the same vein as UNSET!). Really, with the evolution of NULL, I'd say that if I'd known what was going to happen I probably wouldn't have bothered changing the name of UNSET! to VOID!... but now that we've gone through the whole sifting process it just doesn't make sense to have an ANY-VALUE! type called "UNSET!".
Because really, e.g. when you say something like make frame! :append, everything starts out as NULL. NULL is the default value of optional arguments that are not present. You don't want optional arguments that are not present to be VOID!/UNSET!/whatever...you want them to be NULL, the non value. This state is more deserving of the "unset?" moniker.
Anyway, not really second-guessing myself on the names NULL and VOID!, but just wondering about the question of if it's too obtuse to query for a variable's "voided" state via a routine called "undefined?", when "voided?" seems more learnable...and if that nod to JavaScript terminology is kind of pointless. Then that makes one wonder if SET? is weaker than NULLED?
The difference there being it's at least a short name, and it makes more sense. (VOIDED? is 3 characters shorter than UNDEFINED?, yet another advantage)
UNDEFINED? might then become a distinct term, which unifies either unbound or bound but to a VOID!
That sounds nice. I'm glad we had this talk. :-P
 
 
2 hours later…
2:58 AM
We had value? Before
 
@GrahamChiu I prefer VALUE? as its current meaning, which is a synonym for "not null?"
e.g. if value? x: select data item [...]. It's a shorthand for ANY-VALUE?
 
3:18 AM
There's certainly some negative consequences from my attempts to make it harder to make TEXT! with undesirable codepoints (like CR for starters), but not make it a hard and fast "rule". :-( If it's not a rule, then that means various optimizations can't work, like having a text that gets aliased as a binary be able to alias back to a text again without going through and checking all its codepoints.
This makes me wonder if the idea of subtyping it makes sense, to say that there's another classification between TEXT! and BINARY! that permits all codepoints but 0. Calling that UTF-8! doesn't sound too outrageous.
I noticed the problems in tests where I said as text! as binary! "a^M^/b", so there's a CR LF sequence, and I was hoping the AS TEXT! would default to erroring and you had to say as-text/relax as binary! "a^M^/b" to get it to work. But the problem is, that since that binary came from a text it assumes the byte sequence for the text is somewhere out there and forced to stay valid as UTF-8.
So the AS mechanic has an optimization to go "oh, I know you stayed as valid UTF-8 ever since the aliasing as a binary, so let's just shortcut and use the series". Sigh. Funny thing is that these optimizations didn't exist before UTF-8 everywhere so they wouldn't have come up as being lost.
 
@HostileForksaysdonttrustSE Um, just curious, wondering why you are considering "VOIDED?" and not "VOID?" ...
 
@MarkI Because VOID? checks a value. VOIDED? checks a word that looks up to the value. So void? get 'x vs. shorthand voided? 'x.
 
If I have a question related to algorithms in CS, which site should I direct it to - Computer Science or Theoretical Computer Science?
 
3:33 AM
My gut feeling on the CR issues and invisibles is that it may be a bridge too far to be mucking with TO and AS. If you use READ instead of LOAD with a text or Rebol codec, you might be on your own with those bytes.
@PetarIvanov Every site has a "what can I ask here" so look to see for a fit on those pages. e.g. cs.stackexchange.com/help/on-topic
 
Thank you!
 
@PetarIvanov See also the "what should I avoid asking" pages as well: cs.stackexchange.com/help/dont-ask
 
Will do!
 
I said "Because VOID? checks a value" when I guess what I should have said is that "VOID? checks an evaluation result", which may or may not be a value, as it can be NULL.
So I guess if you say as text! read some-file and you get CR or whatever codepoints, you got what you deserved. But if you said LOAD with a codec, either implicit or explicit, that deals in text like load %some-file.txt you get the filtration. And my near-term idea of using DELINE and ENLINE for this narrow issue seems workable. I just have to give up the idea of wider protection of random binaries you have, outside of the #{00} bytes, which I'm comfortable making a hard rule.
I might be more comfortable on the TO TEXT! of a BINARY! applying the rule by default, and needing TO-TEXT/RELAX, because you were making a copy anyway; so it's not like you weren't going to be running along all the bytes in memory. But it kills the performance of AS, and AS is basically a performance-oriented construct in the first place.
 
3:59 AM
Looking for more people to sign up to the chat to allow me to debug things
 
4:10 AM
At present it appears to require more than a passing knowledge of how to use public encryption :(
 
 
4 hours later…
8:15 AM
@GrahamChiu You can check off the "I think it's fair to add an obstacle" box.
 
8:51 AM
@Atomica well, @Adrian has managed to register
 
9:36 AM
@HostileForksaysdonttrustSE " I used to wonder at the programming skill of my seniors and mentors and marvel at how quickly they sized up codebases, at how well-developed their taste was. But now I look at them and think: “wow, they must’ve spent years acquiring all those patterns in their heads”." commoncog.com/blog/expertise-is-just-pattern-matching
 
 
2 hours later…
11:10 AM
Is there a way to react to user input during wait port ?
 
 
4 hours later…
3:25 PM
@giuliolunati User input is currently acquired in a pretty variant way; e.g. when we call Windows we are doing it through a monolithic call which takes care of the history mechanism and only inputs one line at a time. When we do it in POSIX we are doing it through "termios" (if it's supported) and are dealing with one keypress at a time...thus responsible for more of the process, including the history. (If we used "libreadline" or similar we'd be more like Windows)
 
3:40 PM
And as you know, on the web build, we go through a promise mechanism with threads to get the input... the Rebol interpreter is suspended in its stack waiting.
So that's 3 different mechanics :-( I've wanted to add a layer on top of it where they abstract the differences. Clearly that would mean we drop the use of the Windows monolithic input, and start going on a character-by-character management of the line editing logic (as we are doing in POSIX). We combine that with taking over the history as well--and we'd be building more of this in userspace (or at least libRebol-space)
Then figuring out how to bridge that with the Wasm is an open question, I'll have to look at how to hack that. But once we do all this, we may be able to convert all the editing to a unified method of a console "port"
@giuliolunati ^-- If we do that, then key events could be peer to network events etc. and handled one at a time asynchronously, so you'd be processing them during WAITs like other things. I do see this as a direction worth going in, but it's going to take some time to design.
The first step is ditching the Windows monolith and sharing code with POSIX on line editing, and I've been meaning to do it... @GrahamChiu was asking about file completion with tab (or what not) so if you want anything of the sort we can't be using the ConsoleReadLineW() or whatever it is. That API really sucks.
 
4:01 PM
Having slept on it: I think splitting the difference on my novel safety plan is probably the right angle. e.g. AS TEXT! defaults to taking your bytes verbatim while TO TEXT! is prescriptive in filtering out CR (at minimum). Then offer AS-TEXT/STRICT and TO-TEXT/RELAX for the edge cases (naming subject to discussion).
 
 
2 hours later…
5:37 PM
I've posted tests and more explanation on the DELINE thread, please read and comment.. I think it's clearly laid out why Rebol2/Red/R3-Alpha are practicing bad mojo. I'm hoping my ideas for addressing it are sound.
 
 
1 hour later…
6:40 PM
Hm. If WRITE is intolerant of CR-bearing strings by default, that creates a problem if ENLINE mutates strings to contain CR codepoints and returns a string when you do write enline str. The in-place modification is also kind of crappy if we're trying to generally keep CR out of strings, because you just mutated str to have the CR in it. :-(
(er, write %file.txt enline str, I mean.)
One answer could be that ENLINE makes a copy and gives back a BINARY! by default, which would avoid that. You'd write it out via binary protocol, and by copying it you don't corrupt your source string with the data. It's a bit of a shame to pay for it with a copy, so what you'd rather do would be to have a codec doing it for you.
Suggestion: keep ENLINE as it is, but offer ENLINED which makes a BINARY! that is also a copy. Have people do write %file.txt enlined str, that won't trigger the errors on CR-bearing strings because you are writing a binary -and- it will not poke CR bytes into your original string.
Then, allow write %file.txt enline str do as it would do today -except- we have a catch for the carelessness by noticing the CR bytes that throws an error. Then in the future there'd be a write codec where you say "yeah, I meant to do that". Or even better to just say write/options %file.txt str [mode: 'LF-to-CRLF] or something likethat.
 
7:05 PM
Maybe it's premature to be saying that ENLINED wouldn't give you a string, and we can punt with an adaptation of WRITE called WRITE-ENLINED.
 
@HostileForksaysdonttrustSE ok, thank you for the response
 
 
2 hours later…
9:11 PM
I don't recall this change
r2>> remove {"testing"}
== {testing"}
ren-c>> remove {"testing"}
== ""
 
9:43 PM
But
ho: "somestring" ho: next next next next ho remove ho head ho
gets
== " some"
same as clear
 
 
2 hours later…
11:40 PM
@GrahamChiu Looks like a bug, file as such. (A lot of things changed with UTF-8 Everywhere in the string handling, so looks like something that hadn't been tested for whatever reason...)
 
@HostileForksaysdonttrustSE done
>> googleapis.com/youtube/v3/videos?part=snippet&id={YOUTUBE_VIDEO_ID}&fields=items(id%2Csnippet)&key={YOUR_API_KEY}
** Syntax Error: invalid "word" -- "id%2Csnippet"
** Where: transcode if load trap ext-console-impl entrap console
** Near: (line 1) googleapis.com/youtube/v3/videos?part=snippet&id={YOUTUBE_VIDEO_ID}&fields=items(id%2Csnippet)&key={YOUR_API_KEY}
>> youtube.com?test=,
== youtube.com?test=,

>> youtube.com?test=(,)
** Syntax Error: invalid "word" -- ","
** Where: transcode if load trap ext-console-impl entrap console
** Near: (line 1) youtube.com?test=(,)
>> youtube.com?test=(snippet=1)
** Script Error: snippet=1 is VOID!
** Where: console
** Near: [snippet=1 ~~]
** Line: 1
 
@GrahamChiu A recent change made it so that { and } do not terminate URLs. But [ and ], ( and ) still do.
It is arguable that ( doesn't have to, but we'd be in a bit of trouble if [a b c (http://example.com)] tried to put the ) in the URL.
 
posted on February 27, 2020 by gchiu

>> remove a: {abcd} == "" >> head a == ""

 
We could play the middle ground and say that if you have paired parentheses in a URL where they open with a left they're part of it.
 
@HostileForksaysdonttrustSE yes!
So, I have oneboxing of images and youtube videos in rebol-chat
do we still need one boxing of stackoverflow since we're leaving?
I think it's time to remove some of the feeds that go into chat
 
11:51 PM
@GrahamChiu There are mixed questions in various documents on what exactly constitute "unsafe" characters that don't need escaping, and I think it would behoove us to sort of look at the trends and understand them.
@GrahamChiu Isn't that whole thing a protocol of some kind defined outside of StackOverflow?
 
@HostileForksaysdonttrustSE I mean do we need to one box SO questions?
or anything from stackexchange
 
@ingo gave me a citation on the { and } not needing escaping, though they are called "unsafe" other places.
@GrahamChiu Not specifically, but being open to the idea of HTML blobs being projected from a URL is cool...though I really feel the poster should have some control over this.
 
@HostileForksaysdonttrustSE I'll await a PR then
 
Skype's method which seems to be non-optional of giving you often garbage things sucks. Slack sucks but at least lets you delete it if you don't like it.
I feel like it should be an option on both sides...the viewer and the poster.
 
It's a long time since I used rebdev chat but I think you were inside an application loop
so you could type things like n to get the next message
do we need that?
I suspect we do ...
 
11:56 PM
That's pretty BBS-like. I would assume we're only interested in things that act like a chat.
But @giuliolunati raised the point that to do that we have to be able to be sitting at a prompt and have network interrupt you or vice versa. So I guess I'll raise the priority on that.
I really do want to consolidate everything across the POSIX/Win/Wasm REPLs. I want your same code for mucking with command history or tab completion or whatever to work, just as your same prompt-changing etc. can work today.
 
you mean you're waiting on an input and the system updates the display?
 
It's an ASK TEXT! now, remember.
But yes, we need a way to have a proper chat at the command line.
Only if you're forced through a readline or scanf() style interface should you need this "(N)ext" message stuff. We need to be able to do better, but that will require an async console.
 

« first day (3406 days earlier)      last day (374 days later) »