« first day (1958 days earlier)      last day (1822 days later) » 

12:03 AM
Here is another thought: If objects had specs the way functions do, then absence or presence could come from the spec and not the values. make object! [[x y] [x: 10 y: 20]] vs. make object! [[x y] [y: 20]]. Though as long as there's a VALUES-OF function that's expected to give back a block of values in order matching the WORDS-OF you have a problem if there's no reified unsets. But if there were no VALUES-OF and you had to use a FOR-EACH, that could work.
 
@giuliolunati Great to see. Firefox said there was a javascript error, IE went into an infinite loop with a message box with the word undefined within it. Had to kill it with task manager faster than it could respawn.
 
I typed a few expressions, and then hit cancel, and when I hit cancel it evaluated (Chrome)
 
Edge allowed me to evaluate using the Cancel and hitting escape multiple times I could quit the message box loop.
@HostileFork How's your sabbatical going?
Any insights from your reflections?
 
@Brett Well I briefly came back to work on some things then got annoyed at some forwarded AltME remarks rather quickly, and kind of regretted coming back to think about things.
 
I can see that would be demotivating.
 
12:15 AM
Haskell is cool in a lot of ways. But something about coming into it and then a world-wide-web of information and time that passes, you see how hard it is to get started with things...that all systems that change in an ecology-type way really go in wild directions, formal or not.
 
scope creep gone wild?
 
The fact that so much of what is worked on here in R&R really rather unsophisticated made me increasingly confident that what bit of sophistication and creativity there is that I've worked on--things like the definitional returns and specific binding--are non-negotiable. I cite that example of function [x] [y: 10 | return function [z] [x + y + z]]. Haskell can do those kinds of things, heck Javascript can do it.
 
Rebol has taught me a lot, but I've noted that it has gaps. I have appreciated it's simplicity and practicality to get things done, but the world is moving on and I wonder whether I can use it to get stuff done to contemporary expectations.
 
I never used Lisp or Forth so it's been sort of a time to absorb those influences.
 
I'd come across Forth before rebol because I could put it on a little personal organiser (forget the name of the thing), but didn't take it up. Was impressed at it's speed on a little underpowered device though and the fact it didn't have to be compiled. Haven't tried lisp, lots of brackets :)
Though I appreciate the fact that the brackets are foundational.
 
12:30 AM
I think one thing that I somewhat avoid thinking about is Rebol's indexes in series, and how informal they are... in terms of the relationship between ANY-SERIES! values you've stored in one place w.r.t. modifications
And that's a really big black hole, which ties into other things where I really have to remind myself this is the mechanical-pencil sort of engineering tool... not the CAD sort of engineering tool.
It's tempting to think of it as something that can be "fixed up", but when you realize it cannot really, you wonder why you bother to fix any part.
 
Now emscripten build accepts input (useful, eh? ;-). But you must stop repeating input window before to see result :-/
 
I guess it depends on what "fixed up" ultimately means. I think you've been exploring what the boundaries of Rebol should be.
@giuliolunati It's is a little awkward - but I'm pleased to see it running!
So when can we building apps with it ;-)
 
The most important thing to me is the malleability, the "game of nomic" aspect...to say that a relatively amateur programmer can have an idea for a language abstraction and implement it. It may not compose all that well, but if they're the only person writing the script it can work and be literate in the way they want.
Without having to be any kind of language expert, to create an abstraction that's as powerful as the language authors themselves could have made.
 
@Brett Sure much awkward, is default emscripten I/O interface... but I'll can change it, I hope! :-)
 
Haskell and Lisp are both examples which achieve this by more-or-less crippling the syntax to the point where sure--you can make just about anything that looks just like the "default" constructs.
 
12:43 AM
@giuliolunati Exciting
@HostileFork That aspect of rebol is great, I think it's why when thinking on a problem my brain thinks of it in Rebol terms.
I also like that you get something fairly literate without being forced through lots of ceremony.
Well that's the initial impression, even if you end up thinking up lots of schemes to make the initial impression work!
Maybe that's your mechanical pencil part that you refer to.
 
Anyway, the world is definitely out of control. I dunno. It gets easier and easier to see why someone might want to ask that things step back and slow down and build from a more solid foundation before moving ahead.
 
1:03 AM
I suspect the world is moving to a scattergun experiment with everything approach and see what pans out. As an individual, I still want to have some amount of ability to control/use my information wherever it may reside in a straightforward way, but that may be a forlorn hope.
Then again I don't have time or skills to write a new language for everything I touch so I guess I will muddle on.
 
Well, I have to find some motivation, in a place where there's not something to kill it every 24 hours
Software right now is a difficult environment to feel good about. I don't feel good about the state of software or the forces driving it.
It feels too much like biology
 
How so?
Lack of design?
 
Just all the networks, weak links, layers of abstraction, hacking, viruses... things get messed up and your computer might as well have gotten cancer.
format and start over
 
Yes well I feel that after my recent system ssd crash and no ability to restore it. I couldn't get over the fact that the system allowed me to make a "successful backup" with no ability to restore it.
I still have consequences to deal with over that debacle.
There should have been no way I could get to that point.
 
I have a RAID that's supposedly a redundant backup of my main drive, but who knows what trouble it would be if I actually had to restore it.
It's there, the files look like they're there, but... probably a headache to get all the applications back and working as they were again. Something would go wrong
 
1:16 AM
With windows, for what I know, testing the system backup ain't so simple.
I don't have the redundancy of hardware to do such things anyway.
I recently got a Surface. It appears the backup approach is of your files. You can make a system recovery drive, but the idea is you just have to install everything from scratch then restore your data.
I can't afford to buy another Surface to test the restore theory (or make a better system) :-)
 
This is why I try and do everything in VMs
Host machine for web browsing only
So...on the Rebol topic...any thoughts on unsets? I'm trying to deal with this annoying issue of "in the object but not set" vs. "not in the object" and wondering if there's a way to have type-of () != none! and yet still get rid of the idea of "in the object but not set".
If you let functions like type-of () exist, then that type-of is getting something as a parameter, and that parameter is effectively a field in an object (the FRAME! of the function call)
Today, that means you get make frame! [value: #[unset]] as the frame for TYPE-OF when it's called.
To allow this, you have to specially mark the function as optionally taking an unset. It's not legal by default.
But some way of perceiving unsets...and differentiating them from NONE!...must be possible if you want there to be behaviors that discern them.
 
Hmm.
 
One possibility is to act like it's not there. The frame could report make frame! [] and the existing bound value in the function body could look up with :value as unset.
That hampers new bindings, so if you tried to use that frame and bind another :value to it, it wouldn't see anything and give you an unbound error...even though you used a get-word!
Another possibility is to get some kind of wrapped type, e.g. a VARARGS!. This would offer you EMPTY?/TAIL? to test for no value...and a TAKE to extract.
It's a little ugly. But functions that take optional arguments are not the common case, and it could reasonably be argued that if it makes the whole system more comprehensible to equate unsetness with absence of a value in an object, then it's those functions that pay the price.
And it's not actually that hard. If you write something that is append-like [a b c] () and you want to have it be a no-op on value being unset, you could say:
append-like: function [series [any-series!] value [<opt> any-value!]] [
    if empty? value [return series]
    value: take value
    ;-- do stuff with value, return...
]
Basically, you'd be getting a VARARGS! regardless of what the input type was.
It's not that bad. You'd be sort-of guarded from some usages of the VARARGS! due to type checking, e.g. if you said [<opt> integer!] and then tried to do integery things with the varargs you'd get an error.
 
1:37 AM
"It's not that bad." convincing me or yourself? ;-)
 
Both :-)
The thing I find most disappointing about it is that it can't be chained. Consider varargs? () and varargs? some-varargs
if varargs? spec is [value [<opt> any-value!]] then you'd have to wrap even a varargs in a varargs for it.
 
Just mulling it over. Wondering, if you came from another language what would your expectation be?
 
If I came from another language, I'd probably not expect you to be able to handle void results.
By definition
Which seems to be what Ladislav suggested for Topaz, above.
But we've gotten a bit used to things like all [1 print "Hello" 2] => 2...and if you have such features then the constructs implementing them need ways to accomplish it.
 
Still mulling (could be a while) :)
 
It's one of those sticky problems where once you introduce any kind of thing for talking about it, you run the risk of that thing running amok. Even if you were to say there was a special kind of value for denoting the optional state of a function argument...which (say) doesn't cause an error if you access it with a normal word...
Now you've got this optional! thing, which can live in a frame...get pulled out. The moment you try to make it possible to test for optional? now you get the same problem again. So as ugly-ish as the wrapping idea (varargs or otherwise) may seem, it's kind of the way to break the loop vs having another value type you try to prohibit as an argument. There needs to be some kind of container that can contain an instance of itself, to differentiate foo() from foo(foo)
Because VARARGS! and its interface already exists for other reasons, it makes it feel better than introducing a specialized OPTIONAL! type. Because really it sort of is a variable number of args. 0 or 1
 
1:56 AM
Do you get the feeling that the varargs solution will also run amok?
In the sense of suddenly lots of functions needing to be test with empty? and use Take
But as you say it's not the common case.
I haven't had my head in this for a bit, can you remind me what the overall goal/push here is?
To not have a reified unset?
I'd just like to be clear in my mind about it, then go away and think on it for a bit.
 
2:19 AM
@Brett I don't think the varargs situation would run amok, no.
It makes the routines a bit ugly. However, if that were the mechanical answer, and people had other ideas for how to interface with it, they could build it into the function abstraction.
You could--for instance--make a kind of label for an argument that means "make this function a no-op if this argument is unset"
My bigger concern would be about the question of what other parts of the system rely upon reified unsets, besides just optional function arguments, and what would break and how well would the workarounds deal.
>> reduce [1 + 2 () 3 + 4]
 
; Brought to you by: try.rebol.nl
== [3 unset! 7]
 
Every abstraction is free to choose its behavior. Maybe REDUCE would consider preservation of N expressions => N values to be more important than erroring or omitting an expression with no result, so give you back [3 _ 7].
 
2:41 AM
It's certainly tough when there is already one "nothing" value, to try and come up with another "nothing" value that can be handled as data...inevitably that creeps through and you're going to wind up with another problem. Maybe we're being too casual about it and some-function () needs to be illegal. You can't write your own THROW or CATCH native--they're foundational parts...and maybe conditional processing of unsets always needs a special native.
earl's check-set would be a candidate for such a construct. It took a quoted word and an expression. One could imagine a world in which that function--and only that function--was allowed to take an UNSET!.
That rules out discernments like append [a b c] _ => [a b c _] with append [a b c] () => [a b c]. But it does not rule out compose [1 () 2] => [1 2]. You'd have the check-set wedge to control behavior of unsets when your abstraction was calling the evaluator.
But I think I like the VARARGS! answer better than that. Letting people do something they might want to do and saying "well, it could be a little ugly looking" is preferable to saying "the system does this magic thing you could never do yourself"...unless there's a particularly good reason.
 
3:04 AM
With the varargs solution for optional arguments, it seems to me that one could build a world without reified unsets. x: 999 | if check-set x: () [...won't run due to () being unset...] ...x was set to NONE!, not "unset!" here.... It means you get a hot potato of unsetness that you can use to make decisions, but cannot store. There are lots of ways to store an optional value, you can use a block that's either empty or has a value in it...or make up your own representation of an unset.
But generally speaking the best representation of not set is just "not being there". And one reified "there but not there" as NONE! would seem to be enough, because every number more than one just asks why there isn't another to escape that. none! not-even-none! really-unset-i-mean-it!
In this proposed world, VOID? is a function that takes an optional any-value!... but VOID! is not a data type. type-of () would be _, a none value... not the none! type. It would simply not have a type. switch type-of () [_ [print "it was void"] #[integer!] [print "it was an integer"]] etc.
 
3:25 AM
github.com/blog/… - Add Reactions to Pull Requests, Issues, and Comments
 
Making spam icons slightly less spammish is good, I guess.
One downside to an end to reified unsets would be the end of the unset default to unused refinement arguments. What's kind of bad about that is that it pushes back to breaking chaining through revocation if you actually allow NONE! values as the refinement arguments. The good news is that since then, APPLY chaining has gotten much better and is generally much clearer to read.
 
4:08 AM
>> make object! [a: 'a]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               word!     a
 
>> mold make object! [a: 'a]
 
; Brought to you by: try.rebol.nl
== "make object! [^/    a: 'a^/]"
 
>> mold make object! [a: quote 'a]
 
; Brought to you by: try.rebol.nl
== "make object! [^/    a: 'a^/]"
 
4:10 AM
>> make object! [a: quote 'a]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               lit-word! 'a
 
@RebolBot
obj: make object! []
bind/new 'x obj
mold obj
 
; Brought to you by: try.rebol.nl
== "make object! [^/    x: unset!^/]"
 
>> make object! [x: #[unset!]]
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-need-value.html
    *** ERROR
** Script error: x: needs a value
** Where: make
** Near: make object! [x: unset!]
 
4:15 AM
A lot of foundational problems demonstrated right there, above. Perhaps the train of thought I had about specs has merit here. At least make object! [[x] []] can mechanically be made to work, to give you an object in which x is present but not set.
When I last thought about this, MAKE OBJECT! [[...] [...]] was a low-level concept that required the spec to explicitly name the fields. Then OBJECT would be a FUNCTION-like gathering construct, picking out the top-level set-words and poking them into the spec (optimized as a native, likely, but could be written easily in user code also)
This may be the solution that eliminates the need for varargs for optional, saves unset refinement args, and leans in support of other features that have been needing specs for objects anyway. It kills VALUES-OF as a means of extracting a parallel ordered list of object values matching WORDS-OF. Can't think of anything else offhand it ruins, but it would ruin things like that.
 
4:32 AM
That world would give a means to separate presence or absence in an object from setness or unsetness. You can get back a truthy value from find obj 'field, even if void? get in obj 'field. Equivalent to today, but with no need for reified unset!.
 
4:54 AM
@Brett --^ I guess I have talked myself into the idea that one way or another, the above should be the way it works.
And MAKE OBJECT! shouldn't be reducing anything. I already believed that, but am reminded of it, and that it should be fixed before trying to think too hard about anything else.
So even today's make object! [x: 'a] should have x as a lit-word!, not as a word!... what OBJECT does can be entirely different, but when you're at the LOAD/mechanical level it has to be as-is
 
5:16 AM
In such a world, c: 10 | make object! [[a b] [a: b: b: c:]] would be an object with two fields a and b, in which a was the set-word! b: (bound into the object itself) and b was the set-word c: bound from the enclosing context.
@RebolBot
c: 10
obj: make object! [a: quote b: b: quote c:]
mold obj
 
; Brought to you by: try.rebol.nl
== {make object! [
    a: b:
    b: c:
    c: none
]}
 
>> make object! [a: b: b: c: c: none]
 
; Brought to you by: try.rebol.nl
== RESULT is an object of value:
   a               none!     none
   b               none!     none
   c               none!     none
 
While make object! [[a b] [a: b: b: c:]] might be a little weird-looking, at least it would work in the round-trip (modulo binding, as always with mold--though it would maintain the internal vs. external binding bit in this particular case) instead of die in flames like that.
Clearer if it's multi-line as in the mold.
 
 
9 hours later…
2:45 PM
Hi everyone if I have a function name (defun find-closest-in-grid (radar type pos-x pos-y) like this so that i can declare a label like this
(labels ((distance (x y)
(+ (abs (- x pos-x))
(abs (- y pos-y)))))
How can I change my function to like this (defun find-closest (list) but i would still want to create the label later on. Thanks.
 
 
4 hours later…
6:20 PM
-1
Q: Why are there anomalies in UPPERCASE

BranglesSpecifically hex 9A, 9D, 9E, FF in the code below are all treated as uppercasable letters even though they show up as blanks in the rebol console. for m 0 255 1 [ if (uppercase to-char m) <> (to-char m) [ print [to-hex m to-char m uppercase to-char m ]]]

 
 
3 hours later…
9:45 PM
@HostileFork That looks like USE. I think that it is a flexible and acceptable low-level specification if #[unset!] is not a Rebol (reified) value. The low-level form still allows the use of a higher-level object specification dialect similar to the one used in R2.
 
10:30 PM
Taking into account that
#[object! [
    a: #[unset!]
]]
would not be loadable anyway, it is a good idea to improve it.
 

« first day (1958 days earlier)      last day (1822 days later) »