« first day (2983 days earlier)      last day (797 days later) » 

12:48 AM
C has an absolutely terrible multi-line (or line-continuing) string feature. "abc" "def" is the same as "abcdef". This means if you're making an initializer list with one string per line, and forget a comma, two consecutive lines get merged into the same string.
 
1:09 AM
@rgchris Here is an offering which hopefully will get you more interested in experimenting with the impressive implementation of generalized escaping (of which scanning is, as I say, a trivial matter of just *picking a character...nothing compared to the technical accomplishment itself). On the scanning side, apostrophe works as before, and it means you don't have to use QUOTE with SET-WORD!, etc.
>> block: copy []
>> append/only block '(1 + 2)
== [(1 + 2)]
    >> a: 10

    >> foo: function [] [set 'a: 20 | print ["a is" a]]

    >> foo
    a is 20

    >> print ["a is" a]
    a is 10
I can see both sides of it. To quote myself: "when you look at a lot of average-case code, the near-equivalence of 'foo and foo becomes a feature instead of a bug:". But something still makes me uncomfortable about it.
But I'd say after trying backslash, apostrophe is not looking as bad as it did. Backslash is bothering me.
@giuliolunati ^-- you say you do not like %. Do you like apostrophe?
I think I'm basically set to veto backslash. Can't get myself to like it, despite it having arguable merit in various intellectual ways.
My radical proposal, which I almost didn't mention: foo: function [] [set "a:" 20 | print [{a is} a]]
 
1:35 AM
One angle of attack here, is shortening "I mean literally that" to lit instead of quote. [set lit a: 20] feels different from [set quote a: 20].
 
 
1 hour later…
2:35 AM
What types can be LIT'ed? I presume any type that changes upon evaluation ANY-WORD!/PATH!, GROUP! ?
 
@rgchris Anything. It's neutral, so that you can use it as a generalized escaping for anything you don't want evaluated. You may not know if the thing you're dealing with is evaluative or not, just want to make sure it doesn't.
And in the case of PARSE, it helps e.g. to distinguish in the dialect between a literal block and a parse rule.
>> did parse [[a] [a]] [some '[a] end]
== true
The thing is, once you have such a thing existing, now it becomes part of the vocabulary of things you want to talk about. That's why generalized escaping is so cool, and the way I've done it is (I assure you) super clever.
>> did parse ['[a] '[a]] [some ''[a] end]
== true
>> did parse ['''''[a] '''''[a]] [some '''''[a] end]
== true
General rule to know for those interested in implementation details is that any escaping level 3 or fewer is cheap; as cheap as any cell.
@rchris In other news, are we not feeling any regrets over "parse doesn't fail unless it hits a rule it can't match, and returns a position"?
I have no regrets at this point. (regarding that)
 
3:04 AM
@rgchris When I say "You may not know if the thing you're dealing with is evaluative or not, just want to make sure it doesn't.", I mean as in usages of what is right now called UNEVAL, which adds a level of quoting into a value... as opposed to literals. This comes up in the console and is very important in the API.
>> x: lit (foo)
== (foo)

>> uneval/depth x 10
== \\\\\\\\\\(foo)
I don't like backslash, but the reason I don't want to just go change this to apostrophe right now is I want a good solid reasoning of why that's the only choice. I like having essays that show thought was put into every angle.
 
How would one PARSE a generic LIT-value? Say to replace: parse ['foo][lit-word!]
 
Currently, KIND OF for any escaped literal is LITERAL!. But TYPE OF returns the type augmented with the number of levels of escaping it has.
Right now, that means your only option in plain code to match types fetched through words is uneval uneval block! = type of first [\\[1 + 2]]
 
How about parse ['foo][literal word!] or parse [''foo][literal literal word!]
 
Close, I think this should work with quote quote word!: why I think we need to make QUOTE mean UNEVAL and LIT mean what QUOTE means
UNEVAL is a puzzling word and it sounds like it's doing something impossible, like...reversible computing. QUOTE is cleaner, rebQ is a nice API not contentious with anything else, and LIT is shorter as in my example above ([set lit a: 20] vs. [set quote a: 20])
did parse [((1 + 2))] [lit ((1 + 2)) end] => true
did parse [[1 + 2]] [quote ((collect [keep 1 keep '+ keep 2])) end]
 
 
8 hours later…
11:42 AM
@HostileFork Yes I feel ' better than %
Maybe we can enable spaces after apostrophes, to improve readibility? ' "lit text" ' 'double-lit-word ?
 
12:23 PM
There is also &. Not better than %, but unused.
 
12:36 PM
Sometimes I need to break a loop, returning a value instead of NULL. I wonder if BREAK could accept a return value as optional arg, as RETURN does: forever [... if condition1 [break value] .... if condition2 [break] ...]
 
1:06 PM
@giuliolunati The only loop that allows this is CYCLE, with a distinct operation: STOP. That's on purpose.
CYCLE is a better name for "FOREVER" for almost any loop, I think, because it's not forever if it terminates!
@giuliolunati That doesn't work with the idea of single apostrophe needing to be the notation for an escaped null...
@giuliolunati If you want to get a value out of other loops use catch [... while [...] [... if condition [throw ...]]]. It's important to keep the hard rule in the system that if loops break, they return null, so from the outside you know if they broke or not. This has many advantages, one of which is being able to implement a loop in terms of several other loops, and correctly implement break in your new composite loop without a lot of trouble.
 
1:37 PM
@giuliolunati @HostileFork and there's §, which is totally used, even though it is in a prominent shifted position, at least on german keyboards :-)
 
@ingo If we were allowing for Unicode, there's probably a lot of interesting choices...
if word = ⊡isn't [...]
Jeez, who picked some of these: ⍼
 
 
2 hours later…
3:23 PM
@HostileFork ok, CYCLE is perfect.
 
3:37 PM
@rgchris If you're in the apostrophe fan club, a variation of my radical proposal to make them stand out more would be to use apostrophe on both ends of things. if word = 'foo' [...] or group: '(1 + 2)'
I dunno. If we're going to get to Beta/One in this millenium then it may be time to give up and let apostrophe win. If PARSE and regular evaluation have LIT, you can say if word = lit isn't instead of if word = 'isn't, or parse [isn't] [lit isn't end] instead of parse [isn't] ['isn't end] and call it a day.
I think that LIT shuffling with QUOTE makes me more comfortable with this.
 
3:55 PM
In fact, under these rules, quote quote lit a would be ''a (same as quote/depth lit a 2), you don't need to use apostrophe at all to get these things.
 
 
2 hours later…
5:29 PM
Well, perhaps time to let grudges of the past go, and have a New Years drink with apostrophe. :-) I'm off for a bit, Happy New Year all!
 
 
5 hours later…
10:00 PM
@HostileFork The apostrophe on both ends would be a big help for syntax hightighting in editors, That single single-quote is something they cannot handle well.
Happy new year to all. ( one hour of 2018 to go here, See you in 2019! )
 
 
2 hours later…
11:42 PM
Happy New Year everyone. Nice 2018, it's very gratifying to see such good/interesting progress taking place in Ren-C land. 2019 should be a corker with Beta/One.
4
 

« first day (2983 days earlier)      last day (797 days later) »