« first day (1931 days earlier)      last day (1849 days later) » 

9:00 AM
@rgchris - I just checked github.com/ladislav/rebol.net/blob/master/wikipedia/… , and it is yet another article that is missing a majority of its text.
Do you think there is a way to get a more complete version?
 
 
4 hours later…
12:38 PM
@rgchris - sorry, the problem I mentioned above was caused by me not remembering correctly the title of the article I wanted to check. It was this one: github.com/ladislav/rebol.net/blob/master/wikipedia/…
 
 
1 hour later…
1:42 PM
@Ladislav Might I inquire of you if you have any strong feelings about whether or not blocks should be allowed in paths?
 
@MarkI what would it do?
 
@rebolek I have no idea really, but it could work just as a literal. Certainly other behaviours could be designed, but I have no big desires there yet.
So |> x: [[a] 1] 1 == x/[a] would be true, and like that.
 
I see.
 
The question really has more to do with path syntax than it does path semantics.
Currently strings, blocks, and comments are not syntactically allowed in paths, but they easily could be, so I am curious as to reasoning.
 
You can use paren, so theoretically, why no block. OTOH, how would it be useful.
 
1:50 PM
Motivating example of the day was matrix access. m/[row column]
 
@rebolek Exactly. And you can enclose a block, string, or even a comment, inside a paren in a path, and get the behaviour I showed.
But I don't think that's the real reason they are forbidden, though I can't be sure of course.
 
@HostileFork Why not m/row/column ? Makes more sense.
 
One of the ideas is that dialect authors are supposed to have a spectrum of notational options, and I think path has been classically fairly weak.
Every combination doesn't have to be given meaning in the base evaluator if it's more confusing than helpful, but it's fine to just error on things you don't like yet still allow them to be constructed.
 
Argument against block (and also paren) is that it makes the code less readable. You can write object/( ...tons of lines here... )/something and it could be hard to spot.
 
There's not really much of a way to outlaw unreadable code.
If you can find cases where it makes things shorter and more readable, and some cases where it doesn't, that's par for the course.
Use it when it's good, don't when it's bad, etc.
 
1:55 PM
@rebolek Yes. It's also the only way paths can ever span multiple source lines, but I don't know whether that's an argument for or against them.
 
2:12 PM
The main thing that sucks about groups in paths is that it opens the doors to arbitrary evaluation, making it harder to just "sniff" a path to know what it's going to do without having side-effects. It certainly does complicate matters across the board...including auto completion, etc.
I don't know that wishing it away is the right answer, because certainly people find it annoying to have to type temp: x + 1 | array/:temp when even C lets you write array[x + 1]
 
2:25 PM
@rebolek @HostileFork @MarkI I tried matrix indexing with blocks m/[x y] and works well. Implementing m/x/y requires that PD_Vector() can see all successive items in path, not only 1st. Is that possible?
 
@giuliolunati So you cannot pick just a row out of a matrix, as an independent REBVAL?
Path selection at a "sub-REBVAL" granularity is very ad-hoc at the moment. I did a pass through and documented what was there about how it is done. You will see two examples, one in PD_Struct and another in PD_Gob
It's not a very "rigorous" answer, I explain what they were doing here
In both cases, the "read" case gives you back a value that changing will not change the original.
So it's only the SET-PATH! moment that can write it.
 
@HostileFork Yes, that's possible. But I think of semantic variants that could benefit of knowing all items at once
 
Not sure what that would mean...
 
Me neither! ;-)
 
@giuliolunati Well don't worry too much about pleasing other people with the matrices, I guess the main thing I'd ask is to make sure you are happy and that it's as little code to maintain as possible (!) .
 
2:39 PM
However, m/r/c syntax cannot yield a *column* vector. For that I need m/[* c] (or m/[0 c] ?)
But m/*/c seems bad, if you need define an intermediate entity m/*
 
m/[| c] :-)
 
Good!
 
Or none. m/[none c]
 
Less good
 
Speaking of whether we're having fun or not, specific binding is truly a far-reaching deep-digging change, and one of those things that's not easy to graft on after-the-fact. While I am pleased at coming up with it, I am definitely not having fun implementing it. Not having fun = Low productivity. So I have to figure a way past that.
 
2:44 PM
My goal is implementing as much as code is needed to define matrix arithmetic + - * /
@HostileFork you mean another goal for you?
 
Well, just figure out a way to be having fun. I will work on that.
Coding in C and working with Rebol has been a real throwback and weird...leading to different ways of thinking about problem solving, all very bit-twiddly...and even thinking about the 80 column count and how code looks on a page.
 
Object customization? Iterators? Or totally other not-Rebol not-coding task? :-)
 
I could probably use some not-Rebol not-coding tasks for a while...
User-defined objects and types are an area that does still need solving.
And what I'd like to see is things like the matrix or vector code able to be modularized behind a user-defined type as an extension
 
Well, I wish you have fun!
 
Me too :-)
 
 
3 hours later…
6:17 PM
@RebolBot
o: make object! [f: func [x] ['x]]
p: make o []
same? o/f 1 p/f 1
 
; Brought to you by: try.rebol.nl
== false
 
@redbot
o: make object! [f: func [x] ['x]]
p: make o []
same? o/f 1 p/f 1
 
; Brought to you by: try.rebol.nl
== true
 
I've said before that the idea of copies or makes of objects "reaching in" to functions and changing their bindings to match the object is an idea that is probably dangerous, and definitely wasteful. It is not a good path forward for how to implement member functions.
If that were the way it were done, then creating 10,000 instances of an object with 20 member functions would create 20,000 deep copies of those member function bodies and have 20,000 functions...it's not a good answer.
@RebolBot do/2
o: make object! [f: func [x] ['x]]
p: make o []
same? o/f 1 p/f 1
 
; Brought to you by: try.rebol.nl
== false
 
6:35 PM
If you have 10 000 objects each with 20 member functions, then you have bad Rebol code. You should rewrite it to be Rebol-like, or, if you don’t want to, use some class-based OOP language that is designed to work this way.
 
 
2 hours later…
8:38 PM
Specific binding is showing its first signs of life today
I've wondered how it might be applicable to other problems, like the copying of the body of for-each loops each time you call them, so they can rebind the words. There are other attacks to that (like using a local you are already bound to, e.g. the proposed notation for-each 'x [1 2 3] [print x], where there'd be no need to copy [print x] because for-each would just reuse the existing variable).
 
 
2 hours later…
10:30 PM
@MarkI Well, we already do have parens, and they are not far from blocks. I am slightly for it, although I am rather unsure what semantics we should support.
 
@Ladislav Thank you. And you have echoed my sentiments.
 
@Ladislav @HostileFork @rebolek @MarkI I need your opinion about this syntactic decision: how to get dimension of a matrix?
1: width-of m (via reflect?)
2: m/width (like image/size)
3: other ?
 
@giuliolunati I like 2, but I would not use 'width', 'shape' is better. And it should return a block of sizes of length n where n is the number of dimensions.
 
10:47 PM
@MarkI thank you. And maybe also /width /height /depth individually ...
 
@giuliolunati m/width looks OK to me
 
@Ladislav thank you!
 
11:05 PM
@giuliolunati look also at github.com/rebol/rebol-issues/issues/1961 , please
 
11:30 PM
Right, pick m 'shape should work also.
 
@rebolek I don't suppose you or @moliad have made any progress on concretely explaining the "great and foundational breakages I've made to Rebol over the course of a year--in light of my complete lack of understanding of the language".
(Oh well, no need to justify yourselves. I'll be waiting for both of your epic contributions to Red, and I will shudder in awe--after all, you have such solid technical track records and consistency.)
 

« first day (1931 days earlier)      last day (1849 days later) »