« first day (3505 days earlier)      last day (275 days later) » 

1:43 AM
I retract my questions. I looked up "clinical recovery" and found out what it means and what it doesn't mean. I was also inundated with "information" about how one of the biggest problems facing survivors is "mental trauma" from having to stay in a "hospital". I totally just give up. I want to know, but it is literally physically impossible to, because the methods of finding out what is known are too unreliable, jaded, and/or politically slanted. I really, really, REALLY hate modern news.
 
 
8 hours later…
9:42 AM
I've come to the general conclusion that the world wasn't ready for the Internet. Others agree, as a search on that statement turns up.
As far as media goes, be prepared for things to get much, much worse.
 
 
1 hour later…
11:17 AM
R3-Alpha introduced a polymorphism in GET which I did not like much (Rebol2 and Red don't have it), where if it wasn't a type it thought it could GET, it would just return the thing itself:
r3-alpha>> x: 10
== 10

r3-alpha>> get x
== 10
However, sometimes this kind of thing is useful. Such as if you're looking for an ACTION! but you accept WORD! or PATH! as well from which to get that action (Ren-C does this in things like SPECIALIZE and ENCLOSE, to help preserve name information which would be lost if you used a GET-WORD! or GET-PATH! yourself). But you wind up writing if not action? :thing [thing: get thing].
Perhaps a new operation is in order. thing: deduce action! :thing?
But this is perhaps a more general need. I've seen that COMPOSE is another example, where if you are working with a thing that may be a WORD! or PATH! that you don't want to be evaluating every time you GET or SET it...making it desirable to be able to make COMPOSE of a WORD! a no-op. But these "conveniences" start to confuse things.
 
11:35 AM
I muse about enfix manipulations where you could write something in the style of thing: get when [word! path!] :thing where WHEN could be enfix, look at the operation on the left and then provide the parameters on the right. But to generically suppress arguments for arbitrary left hand functions you would have to know their arity without running them, or put it args in a block, e.g. [:thing] :-(
Speaking of which, there's going to have to be a decision on whether APPLY soft-quotes or not. apply append [...] or (apply 'append [...] / apply :append [...]). I'm wondering if the best idea is to make the defaults clear about what is evaluated or unevaluated, and let people make their own decisions to tweak it.
This idea of the very "personal" language...where the understanding is that you bending the tool to your will exceeds concern for sharing code between projects...would invite the idea of saying "my APPLY doesn't need the tics" and making that change in one line is a cool premise.
 
 
2 hours later…
 
2 hours later…
4:08 PM
Does anyone have any recommended reading material for how errors are typically handled in Rebol?
 
@RobertHencke I can make some up. :-) ERROR!s are variations of OBJECT!s which used to be more significantly different in Rebol2, which had "value-active" errors. e.g. if you invoked a value without a GET-WORD! that contained an error it would trigger it. This had to be DISARM'd to get an alias of the error as an OBJECT!.
That decision was reversed in R3-Alpha and AFAIK Red has also embraced it. So really, ERROR!s are "just objects", though they tend to carry some common format data ...tracking the callstack ("where") and a copy of a neighborhood of symbols ("near").
@RobertHencke, Beyond that... here are some code comments of historical relevance about the difference between CATCH and TRAP (TRY in R3-Alpha/Red)
 
@HostileForksaysdonttrustSE got it, thanks. :) So errors are not special, per se, just another data type? Let's say I am writing a function that may encounter an error condition. Would the appropriate thing be to return the error value? Throw it?
 
Stackless Ren-C is about to change things, to where error handling--even with just setjmp/longjmp as the underlying implementation--will be able to maneuver the whole stack. e.g. the "trampoline" which pumps stack levels (at a "single depth" of C) will have just one setjmp/longjmp in it
 
(I am writing a C extension in Ren-C and musing the best way to represent if my C function returns some error, for context. The simplest thing to do would just be to return the integer verbatim but that seems a bit too raw)
 
@RobertHencke Not a lot of great guidance besides those comments, but THROW is kind of something you would think of as using just in your control flow.
 
4:19 PM
@HostileForksaysdonttrustSE Thanks, reading over that!
 
Don't THROW... but whether you use FAIL or return an error code gets you into one of those philosophical "is exception handling a bad idea in the first place" arguments.
Note that if you are using the libRebol API and try to cross an API call boundary, you run into the problem of crossing your C code stacks. There's a lot of unresolved territory there. But in stackless you should be able to return usermode code sequences from your native that run after your natives are off the stack.
For today, there is an assumption that if you FAIL and don't trap it, your C code can accept a longjmp across it. THROWs that aren't caught at the API boundary are converted to longjmp-based "no catch for throw" failures.
This is all pretty standard for a CPython type thing. But matters are going to get shaken up as Ren-C gets the ability to unwind/rewind itself.
 
@HostileForksaysdonttrustSE when you say things are going to get shaken up, what form do you see that taking?
 
Today JavaScript has rebPromise(...), which lets you get back an asynchronous "Promise" object that you can AWAIT on or chain code to be called back to. If you are unfamiliar with this, see On Giving libRebol JS more powers than JavaScript
I foresee a rebPromise(...) analogue for the C library, where you can get stackless with the "usermode" API (instead of having to write your code as a state machine to the low level as the natives are having to be done)
Which isn't actually that hard (the underlying implementation is...*...very*, but writing something like WHILE or whatever isn't.)
 
@HostileForksaysdonttrustSE That makes a lot of sense. So basically representing things with a Promise-like API in Rebol, to represent futures/promises?
 
Yes, though unless you're using C++ you won't have lambdas or whatever to easily inline your .then() clauses.
 
4:30 PM
@HostileForksaysdonttrustSE while it's not an official C standard, both GCC and clang support 'blocks' which might be useful here
 
@RobertHencke Could be. I've never used that.
 
@HostileForksaysdonttrustSE They were introduced when Apple was developing Grand Central Dispatch as their mechanism for dealing with all things concurrent. At the time, Apple was still using GCC, so it was submitted to GCC and included as an extension. Then Apple switched to clang, so clang got it too.
 
(Sidenote: In other news, stackless COMPOSE --^ now working... step by step it plods along...)
2
@RobertHencke Indeed, news to me that existed. But you've probably heard of C++11 lambdas
If you don't do any captures, you can use a lambda as a raw C-like function pointer.
 
@HostileForksaysdonttrustSE oh, nice. That's a very handy benefit.
 
4:45 PM
@RobertHencke I'll point out that I've been pushing for more and more stuff to be taken care of in usermode. So it's not necessarily either/or...you can make your underlying routines do the grunt interface work, and have pre-and-post processing. One of the (I think) super clever bits of that is how CALL handles BLOCK!s vs. TEXT!
@RobertHencke See the usermode Rebol assists to the more mechanical CALL implementations.
So there are two helpers... one for when POSIX gets a string, and another where Windows gets a block... all more easily maintained as Rebol.
@RobertHencke I forgot to mention a thought, which is if you are looking for ideas for things in lieu of any good documentation, the tests might be a place to search in. They're a mess, but better than nothing.
 
 
1 hour later…
6:18 PM
I have to come up with a way that named arguments in a path that aren't optional will push them to the back of the line. e.g. append/series 'd [1 2 3] => [a b c d]. This would be a prelude to a generic argument reordering adapter. I don't think it will be hard (well, not impossibly hard) now that refinements are their own arguments... e.g. we "already have" reorderable arguments, in a sense.
 
6:51 PM
I've suggested the idea before of making a game mechanic which is actually a simplification of the Ren-C evaluator. Like, you lay out graphical objects that represent BLOCK!s, GROUP!s, ACTION!s, WORD!s, etc. But you pare it down to where like "words" can only be single letters in a circle, and where "quoting" levels are concentric circles around it that get "blasted" off one at a time by evaluation.
I'm thinking a puzzle game something along the aesthetics of Opus Magnum, but that underhandedly teaches you about the workings and limits of the evaluation model.
 

« first day (3505 days earlier)      last day (275 days later) »