« first day (3152 days earlier)      last day (628 days later) » 

2:40 AM
posted on June 18, 2019 by @hostilefork Brian Dickens

@hostilefork wrote: Datatypes have a couple of problems. One is that there's no clear representation for them literally: rebol2>> word? first [integer!] == true rebol2>> type? 10 == integer! rebol2>> word? type? 10 == false So we're on the cusp of having to use some notation for datatypes like #[datatype! "integer!"] -or- perhaps s

 
3:02 AM
Invasion of the @s :(
 
@rgchris The !s are not terribly aesthetic. You prefer #[datatype! "integer!"]?
We're seeking a sweet spot of the number of parts. I noticed a very real problem, e.g. that #123 making ANY-WORD!s wasn't good mojo. I think it's better to let the @s mean something clear, by being in the ANY-WORD! family and following their rules, and to have a clear meaning for what their distinct evaluator behavior is, e.g. no behavior. They are their literal value.
Then ISSUE!s can be strings again, which I would think would be favorable.
 
Am still in favour of @'s at least being of the email type.
 
Not sure if email is in the long tail of "important things".
If it is, it could probably be mailto:foo@bar.com
 
I think we have a difference of opinion here.
 
In any case, no one suggested taking email away.
It's another syntax, that would be like saying that because colons are in SET-WORD! they can't be in URL! too
 
3:10 AM
Yep, but I'd like @thing as a string construct. Long held wish.
 
Well, you'd probably like #thing as a string construct.
 
Yep.
 
Win some, lose some. :-)
 
I agree. I'd suffer a clunkier 'symbol!' type for it.
 
There was a reasonable motivation I think behind the desire to have an inert ANY-WORD! type.
 
3:12 AM
#<symbol> !symbol $symbol etc.
 
And I think we're better off with inerting all the types, including GROUP! and BLOCK! and PATH!, via @.
 
i like the idea
 
And letting ISSUE!s be full-bandwidth strings, numbers, etc.
@JacobGood1 I'm only 0x2C but I'm going to an 'old coders meetup' (> 0x30) (I got an exemption due to my history)
 
oh thats cool
 
Well, that's my preference, #issue @email $something-else-for-symbol. We may never agree, and it's not really my call.
 
3:19 AM
@rgchris Well I might be convinced, though this would kind of push the $4 is a MONEY! and $a is a LIT-WORD! or what-not.
if $integer = type of 1 [print "It's a possibility..."]
 
Given that ["$" integer!] will always be money and words never begin with integers (though some paths might, though no money value will have a "/" character), it does leave that open.
 
aesthetically I prefer @, however, I have no objective argument for the preference
 
It's a bit Perl/PHPish, but I value the ability to represent @values in data.
 
... (...) .../... [...]
...: (...): .../...: [...]:
:... :(...) :.../... :[...]

$... $(...) $.../... $[...]
@... @(...) @.../... @[...]
I dunno. I like fail @blame "the quoted blame location as word"
If it weren't a word, it wouldn't have a binding.
fail $blame "..." doesn't have the same ring to me.
Being able to point at a binding has value.
 
ill leave it up to you two, artistic arguments are not my cup of joe
2
i like lisp after all =P
 
3:25 AM
fail 'blame "..." still works for me :)
 
Either way, the question remains, about whether an inert word-like thing can replace DATATYPE!. Call it what you will... evaluator-inert, extensible, ANY-WORD! and we just forget the idea that some ill-defined non-sensibly-rendered DATATYPE! type exists.
@rgchris Well then are you an advocate of integer!: 'integer
 
I know you're not smitten, but I kind of like the idea of a trailing ! indicating a datatype. Whatever datatypes are, still goes back to a long-held question you had about hard-coded English words in the language.
(see also, logic literals)
 
if 'false [print "This would be bad if this did not print, I think..."]
@rgchris I am more willing to accept hard coded English words I guess, if the other option is random-seeming numbers.
@rgchris I really do prefer fail @blame. I think the @ usage as arising is looking good, the missing "inert" modifier to complement leading : and trailing :
 
One other suggestion that I don't think conflicts lexically would be - (minus) and would have some analog in shell options and could be doubled up: fail -blame "Thing" | if --false [thing]
Though I recall you don't want to make the operators (+ - = < /) exceptions to word specs...
 
3:47 AM
@rgchris I do think we need this addition to the SET-XXX and GET-XXX class, and I think we see the gravity and intuition saying an INERT-XXX is needed for those cases.
It feels like the missing piece, and it's unfortunate you don't like @ for it.
 
Just to be clear, I'm not against the idea of an inert word type.
 
@rgchris You just want to be able to say @9214 ? :-P
 
Indeed.
 
There's @[9214], or @("9214"), or various options. And I've mentioned how I think we need to learn more about this notion of structural escaping-within-the-system.
But that's unexplored territory
We have to understand how alternate "escaped" notations like that fit into notions of equality when used as keys in maps, etc.
JavaScript does it, but Rebol's stronger typing means it's not notational when you use a map key with spaces in it and quotes...you're actually changing the type of the key.
 
@HostileFork my-api [ping @[rgchris]] doesn't exactly look so great.
 
3:57 AM
@rgchris If you don't need escaping don't use escaping. JS key names that don't need to be in quotes (no spaces or don't start with numbers etc) tend not to be.
The question is, if we say to text! whatever will it do the right thing for @[rgchris] and @rgchris, and maybe it can.
 
I think I misunderstood what you were suggesting.
my-api [send @false "a message"]
 
Would Fred Alse get that message?
 
@rgchris if not @false [print "I don't think I've gone as far as suggesting this print."] e.g. @false is not LOGIC! false.
 
I think I'm even more set on @ being a NAME! type (since BrianH isn't around any more, perhaps I can refer to it being a HANDLE! again). Twitter-style: @rgchris or with spaces: @"Chris RG". Sort of like FILE!.
 
4:14 AM
@rgchris Well, the $ is an option I suppose, we can discuss it, but I feel like you should be happy you are getting ISSUE! back in form as you would like. :-)
 
I am. Forgive my greediness :)
 
I feel like a lot of things will be covered reasonably, this is where we get to the "push back" against complexity.
You can say "but...but...some IDs or Twitter handles don't fit into valid WORD!s" and we say "so don't call it that" -or- you must use an escaping mechanism. That's just how it is. Put spaces in your filenames, suffer the consequences. Why not have a bit of prescriptivism? Rebol is very liberal in general with what's allowed in identifiers relative to other languages.
I've shifted my thought here.
I realize @["9214"] is not ideal but if we are smart about it, we can let this idea of "escaping" be a kind of default, for the to text! conversions, so your dialect gets it by default unless you have another intent for that.
And you can see that we're avoiding #[name! "9214"], instead pushing into reusable and interesting parts with clear definition.
If all you want from an @ type slot is a string, we should be able to get it out for you.
 
4:48 AM
My own preference for the symbol type I think is 'minus'. I know it has its flaws, but is more discreet than @ (which aside my other stated reasons, I find a bit jarring for that purpose). It's not without flaws (can precede integer!, decimal!, time!, money!), and is currently a legal word opener, but I think it could work and look good.
parse [1 -integer 2] [-integer '-integer -integer]
 
5:14 AM
I recognise that it might not work so well with inert blocks though: -[not quite as distinctive]
 
 
6 hours later…
11:37 AM
@rgchris I've gotten rather attached to -- as being a dumping construct, and the idea of modified forms (--net) being WORD! and dispatching as one appeals to me. In terms of balancing greed :-) I feel subtlety already has a win in its column with apostrophe for generic quoting...
 
I don't see any reason why -- shouldn't continue being a word.
In that small class of words without letters.
I'd rather have that small quirky group than throwing out a useful semantic construct.
 
What do you believe is thrown out?
I could more easily be convinced of $ for the inert markup than - ... but still, I do not think on balance it's as good as @.
 
11:55 AM
If inert words are going to be common constructs (for datatype representation alone), I think @ or $ are going to be a heavy cognitive, visual toll for that.
 
@rgchris It need be no different, in terms of INTEGER! mapping to @integer for convenience. The difference will be if you evaluate it, but I don't think that's a heavier visual load than #[datatype! "integer!"] or what have you.
 
I'm not proposing #[].
 
I'd say having the xxx! aliases helps not just abstracting the code for potentially redefining types, but also addresses the "too many @" you might be concerned about in source.
It is unfortunate that @[...] and @.../... and @(...) would likely not be used in PARSE for other purposes than datatypes, but OTOH it means we might have a building block for more complex type expressions.
@[integer 50x50] as the type of a 2D array, or something like that.
@integer/[50x50] I dunno. Point is, there would be options there.
 
 
5 hours later…
5:10 PM
@rgchris One upside of @integer! being an ANY-WORD! might be that if the traditional rules of equality apply (considering SET-WORD! equal to a WORD! for comparison purposes, unless you use a strict equality) then @integer! would = integer!. So even if you said switch type of first ['''1] [lit '''integer! [...]] it would compare equal, as '''integer! would = '''@integer!
Eliminating DATATYPE! and using an inert word class for the result of TYPE OF does feel like it might be a win. This would allow for "typesets" to generalize as well, to being sets of words (and maybe some internal compaction would get that particularly efficient if you draw from the pool of low-numbered words (e.g. datatypes, they get the lowest symbol numbers)
Then Redbol should be able to do a pretty good emulation; because it didn't have these inert forms of word, it can assume any appearance must be meant as a DATATYPE!. So there won't be ambiguity if previously you had a function hat took either WORD! or DATATYPE!. And the equality operator for Redbol can be adjusted to whatever comparison rules are desired.
 
 
2 hours later…
7:31 PM
I'll be giving a little intro talk to Rebol to the "Philly Lambda Group" next Tuesday... @rgchris, if you know anyone to invite. (The Derek fellow we met at the open house for instance if you can find his card, I can't find the one he gave me.)
 
8:22 PM
I have it, I'll forward it.
 
@HostileFork will you record it?
 
@JacobGood1 That talk, no. But I'll be using slides that will be in the conference talks.
 

« first day (3152 days earlier)      last day (628 days later) »