« first day (2993 days earlier)      last day (787 days later) » 

2:15 AM
OMG. I just realized you can use quoting to get out of the "can't return an arbitrary value", efficiently. unquote case [a = b ['foo] c = d [']]
Because CASE voidifies nulls, to use null as the exclusive signal of "no match" But if you want to return a literal null just use a quoted null (plain ') and then unquote it outside the CASE!
@MarkI ^-- Woo!
More readable as unquote case [a = b ['foo] c = d [quote null]]
I did mention that this is efficient... for up to three quote levels, there are no allocations needed to do it.
Works with IF, SWITCH, and for that matter.. MATCH. Add a quote level onto your match and the matched thing, now you can throw in a test for if things are a null. unquote ((match '[<opt> integer!] quote thing) else [fail "no match"]) You can match a null, while still using null as the signal for else to know if you didn't match!
2
 
3:25 AM
That should have been [lit 'foo] or [''foo]. But you can use catch and throw, as well. catch [case [a = b [throw 'foo] c = d [throw null]]] Anyway, 99% of the time voidification is just fine, or just using blank and OPT-ing the result. But in those rare cases you really need to evaluate to something where null is a valid value, generalized quoting provides yet another avenue.
 
 
11 hours later…
2:39 PM
Will it be a good idea to split the rebmake.r file? Like the rebmake object will have an empty reference to for example visual-studio so that will become
visual-studio: _
and in a separate rebmake-vs.r file will be the
rebmake/visual-studio: make generator-class
code?
 
@iArnold I feel like the main direction I want to focus on is code simplification and reduction. It may be easier to do that if we keep things together in one file. -but- the Visual Studio XML file itself should certainly be its own file with escape sequences in it.
 
Actually I wanted to 'get rid' of all stuff that is not used in direct execution of compilation and reducing the size of code to print / minimize code that distracts when studying the code. Thus making it simpler to follow, cause when you use one compilation method you can focus on what is important to you.
 
Instead of unspaced [{<xml junk...>} rebol code {</xml junk>}] taking up all that space, it should be a standalone file like <xml junk...>$(somevar)</xml junk> and then the code just passes in those variables. So that certainly needs to be done.
 
 
1 hour later…
4:00 PM
@Edoc @rgchris For compatibility, I'm wondering...as good as evaluative switch is, might we call it CHOOSE and have SWITCH stay quoting?
It seems a shame as SWITCH is a preferable word, but the question being if the number of speedbump changes in Ren-C can be reigned back...mutability by default and you have to ask for the const protections, etc...if it would make a concrete difference in the acceptance of the language among a relevant audience.
On the other hand, if there's really no way to make people happy, is it worth it to bend on things vs. just saying it's a totally new standard. I guess my question is: what changes are people unhappy about. #1 seems to be the default immutability of series, and I have tried to make an argument for why a mutable default is not a very forward-looking choice for the language.
 
4:55 PM
@HostileFork That is so neat. I can't see ever using it, but cool to know it's there in case. Pun intended :)
 
I think generalized quoting is likely to be another one of these gifts-that-keep-on-giving things.
Sure, you could do it with BLOCK! or GROUP! before. As we know from other languages it's not like you even need blocks and groups distinctly. But the great thing is being able to escape in a way that shows that's what you're doing, and to have it fit in the cell (again, for up to 3 quoting levels)
It adds 64 to the type for each quoting level, before having to bump it to a REB_QUOTED base type with a payload. But interestingly, you can do a lot of things without modulo-64'ing it. e.g. a test for if something IS_WORD() in the evaluator loop doesn't want to treat a quoted word the same as a word (it doesn't dispatch enfix, etc) so you really can just test if the byte is the under-64 value. No slower than it was!
Significantly less cost than putting it in a block or group (though as I mention with this "mirrored type" trick, putting immutable 1-element blocks/groups in a single cell is possible...though its main intent is for refinement-style paths)
 
Ren-C Deep Lake project. Step 1: Dredge Lake. Step 2: Drain Lake. Step 3: Deepen Lake. Step 4: Refill Lake, restock with fishies.
@HostileFork I'm in favor of immutability by default, even if less convenient for dabbling around. I have no objection to CHOOSE.
Difficult to know/anticipate what the preferences will be. You can't make everyone happy.
 
5:10 PM
@Edoc One of my favorite quotes was always "I don't know what the secret to success is, but the secret to failure is trying to please everyone." I guess it is a good thing that it was only misattributed to Bill Cosby (actually Herbert Bayard Swope), so I shouldn't have to worry about still saying it. :-)
 
5:38 PM
Currently, CHOOSE is a non-branch-evaluating CASE. So choose [1 > 2 a 2 < 3 b] is just the WORD! b. You could do something like this with historical CASE, e.g. as case [1 > 2 'a 2 < 3 'b], but to be consistent with IF, CASE doesn't allow non-block branches (for all the same reasons IF was decided to not allow them)
I haven't really used CHOOSE, so it's sort of a solution in search of a problem at the moment. I guess the thing is, if we did something like make SWITCH historically compatible, and CHOOSE the evaluative form...is that kind of compromise going to move the needle anywhere for anyone's important decision?
If you told me "change that and Carl will designate Ren-C the official Rebol" then sure, it's one dumb word, why pick a fight over it? Quoting (soft quoting) SWITCH has its uses. It's not the end of the world to keep it that way, and call the evaluating form something else...even if it seems suboptimal.
 
 
2 hours later…
7:47 PM
For those wanting a desktop GUI, it looks like our best bet is for ren-c to be ported to Atronix's build.
3
 
8:33 PM
I want a version of the tagged COMPOSE trick for SWITCH. But in terms of positions of things, it has problems. e.g. switch <*> some-block [[a b] [<*> print "it's the [a b] block"] [print "hi"] [<*> print {it's the [print "hi" block]}]]
What's bad about that, is switch <a> [<a> [print "Now you can't do this"] ...]
So to avoid that, you'd have to have it after the thing you're switching on but before the block. switch some-block <*> [[a b] [<*> print "it's the [a b] block"] [print "hi"] [<*> print {it's the [print "hi" block]}]]
I guess that's not terrible. If you are in the kind of situation where you need it, that being a little bit awkward is probably the least of your concerns. You'll just be glad you had it!
Hrm... QUOTED! is the datatype for 'x, ''x, '''x, etc... and quoted? the test for it. Is there a good one word for not quoted?? Continuing with my terminology-reform train of thought, literal? seems bad, because you can write lit ''x and get ''x...it's a "double-quoted literal". unquoted? doesn't feel particularly smooth.
 

« first day (2993 days earlier)      last day (787 days later) »