« first day (2675 days earlier)      last day (500 days later) » 

11:33 AM
I knew you would. ;)
I'm glad you saw it as an attempt at humor too. I was a bit concerned it seemed 'too serious', but it was too good to pass up.
 
 
2 hours later…
1:10 PM
@BrodieG I mean the environment associated with each argument: the caller environment (i.e. parent frame) is something different. Here's a small example: gist.github.com/hadley/2b0a03727b2c884dfb97de66266a539a - h() has three arguments, all with expression x
@coatless thank you for the detailed critique of tidy eval - I appreciate that you care enough about this topic to think so much about it, and to carefully put your thoughts in writing
I think you are mainly concerned about two things: that the tidyverse is changing too fast, and, generally, it's moving in a direction that requires greater understanding of the language?
I agree with you that it's misleading to judge adoption based on downloads
 
1:42 PM
CRAN continues to purge and clean up. By my (CRANberries-reading) count the company that starts with R and ends with udio now has two packages labelled ORPHANED.
 
2:12 PM
@hadley Thanks for the example, I figured you meant something of the sort. As noted previously oshka isn't trying to solve the universe of NSE problems. Further, it is great that rlang is. That problem does require tracking environments and would have to be handled similarly in oshka as in base (as is the case with forwarding NSE arguments).
My concern with the rlang approach is that it is overkill for what, in my experience, is the most common use case for "programmable" NSE: a user composing an NSE expression from pieces and passing it to a single-layer NSE function. The decision to favor a "pure" (e.g. don't auto-unquote) and non-R semantic approach (which may be required for the comprehensive solution) means that both new and experienced users (in base R NSE) have a hard time coming to grips with rlang (in my experience).
What @coatless is suggesting is that what is crystal-clear and "the right way" to you, @lionel, etal., is anything but to many of the others who haven't spent considerable time immersed in the problem.
2
 
2:35 PM
@BrodieG my concern with the oshka approach is that it introduces a third set of semantics (ie. base R, tidy eval, oshka) that people need to learn about
We tried a partial solution with lazyeval and in my opinion, it ended up creating too much confusion relative to the payoff
I agree that tidyeval is complex, but I think the payoff is worth it
And I totally agree that we haven't done a good job of explaining tidy eval yet
I think we chiefly disagree on where the problem is: I think you and @coatless believe that it's because tidy eval is too complex; Lionel and I believe it's because we haven't yet figured out how to teach it well
Part of the reason that I believe this is that I struggled for >5 years to explain tidy data to other people. It was very obvious to me how you should arrange your data, but I couldn't explain it to anyone else
 
3:01 PM
@hadley I would call it second ;). Joke aside (and ignoring that oshka will never see broad adoption), the point of oshka is that it purposefully sticks as close as possible to existing R semantics (warts and all). It adds one new function and otherwise re-uses existing semantics. The symbol resolution is even the same as with normal values (once you accept symbols that point to language are expanded). Of course, the limitations remain too.
As a result, I bet I could teach users familiar with R how to use subset2 in seconds with programmable NSE with no cognitive dissonance.
Teaching how to program subset2 is a little harder, but still fine. Where rlang clearly pulls away is if we need to forward NSE arguments.
By subset2 I mean the oshka version from the README.
 
3:20 PM
Also, to be clear, I think it is possible to have something that has the rlang level of functionality that sticks much closer to existing R semantics too. So it isn't the "what" rlang is doing that in my mind is the source of the confusion, but rather that it does it in away that is purposefully different from existing semantics (for defensible reasons, certainly).
 
@hadley yes, I agree with the statement of: "the tidyverse is changing too fast, and, generally, it's moving in a direction that requires greater understanding of the language." I disagree with the notion that all issues can be resolved with improved teaching resources as the interface is fundamentally being blurred here. I think the target audience that rlang benefits are those who have spent considerably time already in the 'verse.
To emphasize why this is a bad interface let me take you back in time to pre-Rcpp Attributes. To construct a function within C++ you needed substantial "mark up" and casting knowledge. With attributes, the problems reduce greatly to focusing on the function definition.
I've made this argument in length after seeing one too many questions on inline: thecoatlessprofessor.com/programming/…
Again, I think no-one is disagree that rlang is useful....
2
I think its just the sharp change to the interface of existing analytical tools that is bad.
2
 
If only the language had something like a Core group that looked out for it....
 
 
1 hour later…
4:41 PM
@hadley LOL. Never thought that adding semantics would be of concern to you :-) People don't "have to" learn about it, but I agree that the increasing number of semantics (also data.table and other packages) makes understanding code and teaching R more demanding compared to 5 years ago. Which is not necessarily a bad thing as an extensive toolset allows for more power. But it doesn't make life easier..
@DirkEddelbuettel true words. But then again, R needs a lot stricter approach to things due to back-compatibility. Added semantics like the data.table package or an entire suit of new objects like the Bioconductor approach have their merits as well. Regarding rlang I am still making up my mind whether it can be useful outside a tidyverse-programming context.
@hadley If it's difficult to explain, then it is complex. If I compare tidy data 5 years ago with now, you also would agree that 5 years ago it was a labyrinth to navigate through, whereas it matured into something that is teachable. Which is the reason why it's not in R for Dummies yet, but I do teach it. With pleasure.
 
 
1 hour later…
6:11 PM
@JorisMeys adding semantics is very much a concern to me. That's why I want one consistent approach to NSE throughout the tidyverse, and why I regret that ggplot2 uses + and not the pipe
@coatless Can you explain what you mean by "interface being blurred" in more detail? In my mind, tidy eval actually makes interfaces more distinct because it surfaces and makes precise the ideas of quoting and unquoting. For example, oshka feels more blurry to me because sometimes the first argument is quoting (i.e. you pass an expression like a == b) and sometimes it is not (i.e. you pass quote(a == b))
 
7:12 PM
@hadley I imagine that is a concern with base R NSE generally as opposed to oshka? As in:
> f <- function(x) eval(substitute(x), list(a=1, b=1))
> f(a == b)
[1] TRUE
> f(quote(a == b))
a == b
Or perhaps I misunderstand your point.
 
@BrodieG I'm trying to understand what @coatless is getting at
 
@hadley But do you mind clarifying if the blurriness you perceive in oshka is really the blurriness in the above base-R only example, or if you're thinking of something else?
 
@BrodieG I don't see any blurriness in that R code example - f() always quotes its argument
 
@hadley I think we might have some misunderstanding here. oshka does not do any quoting. That is up to the user to do. The only thing oshka does is takes a language object (captured via substitute or whatever means`), and expands the symbols in a provided frame, returning a language object for the user to evaluate.
The capture and evaluation mechanics are pure base-R, so I'm not sure how oshka introduces any blurriness in the treatment of a == b vs quote(a == b).
> x <- quote(a + b)
> y <- quote(quote(a + b))
> oshka::expand(x)
a + b
> oshka::expand(y)
quote(a + b)
Sorry, let's try with a non-trivial example:
> b <- quote(d * e)
> x <- quote(a + b)
> y <- quote(quote(a + b))
> oshka::expand(x)
a + d * e
> oshka::expand(y)
quote(a + d * e)
 
7:36 PM
@BrodieG it's not oshka per se, it's the interface that you are presumably creating with it like your subset2()
 
@hadley But the interface is just eval(substitute(x)), basically. That's why I'm so confused that you think my f example 3 replies back is consistent, but subset2 isn't:
subset2 <- function(x, subset) {
  sub.exp <- expand(substitute(subset), x, parent.frame())
  sub.val <- eval(sub.exp, x, parent.frame())
  x[!is.na(sub.val) & sub.val, ]
}
Obviously you have thought a lot more about this stuff than I have, so I'm probably missing a subtlety, and in the meantime I'm just confused.
 
I don't know how to express it - it just feels blurry to me to treat symbols differently depending on whether or not they're bound to an expression
I think a general principle is that the less context you need to predict the output of a line of code in isolation, the easier it is to read and understand that code
You can't predict the output of (e.g.) expand(quote(x + y)) without knowing the complete history of the code - the behaviour changes if x or y has been assigned to an expression previously
Blurriness is probably not a great way to describe that
 
7:52 PM
@hadley You can make that argument of x + y. If you don't know what x and y are.
 
But the intent is clear - you are adding together two numbers
 
@hadley But what if x is an environment?
 
With expand(quote(x + y)) you don't know if the intent is to create the expression x + y, or expand x, or expand y
You can't add a number to an environment? I think I'm missing your point.
 
@hadley The intent is to add two things. Which could be 1 + 1, or (3 * 8 + 1:10) + (10:1).
Nothing oshka does changes that initial intent.
From the perspective that you are adding two things, why do you care whether one of them is the result of a complex expression vs the other just a scalar?
 
But doesn't that imply you're changing the semantics of the language? quote(x) + y does not equal x + y
 
7:57 PM
@hadley I agree. I don't see the connection though.
If x resolves to language, then oshka would convert the two respectively to quote(language) + y and language + y.
That's assuming you started with those two expressions quoted.
If you didn't you'd get an evaluation error in both cases.
 
I have given you the reasons that I can articulate. I realise that they are unsatisfying, but my gut intuition (from many years writing R code) is that it's not a suboptimal approach. I wish I could explain better
 
@hadley Well, thanks for taking the time to engage. It's useful to get a more detailed view on your perspectives.
Let me leave you with one last thing, which will take me a minute to compile.
z <- 1
w <- 2

x <- z + w
y <- 2 * w

x + y
## [1] 7

x.q <- quote(z + w)
y.q <- quote(2 * w)

oshka::expand(quote(x.q + y.q))
## z + w + 2 * w
eval(.Last.value)
## [1] 7
If you pretend that all assignments are lazy, then you can see that what oshka is doing is exactly the same thing the evaluator is doing: finding the symbols, expanding out the expressions until there are only values left, and evaluating.
 
8:30 PM
In case 1 you can tell that you want to add two things together. Same in case 2. In neither case do you know what you're adding together without additional context. It turns out that you're adding together the same things.
Yes, you don't know which or whether x.q or y.q will be expanded, but that's not much different than knowing whether x and y can be added. In both cases you need additional context. In both cases it will be done if it can be.
 
Well, this is... interesting signaling.
New CRAN Repository Policy rev3838 posted, history at https://github.com/eddelbuettel/crp/tree/master/txt #rstats
> CRAN hosts packages in publication quality and is not a development platform. A package's contribution has to be non-trivial.
 
8:49 PM
Yes, happened 24 hours ago, but CRAN/Uwe had a mishap so I emailed him to confim/clean up page. Repo was at r3838, page still said r3815,
He replied yesterday afternoon, so I then told Mark to correct his tweet (he had overlooked the change at first). And Uwe was caustic and said something along the lines of very poor quality packages uploaded recently.
But I am happy to see that the Twitter population is busy speculating about it.... without knowing anything either.
 
@DirkEddelbuettel So you are saying that Uwe intends to walk back this wording? cran.r-project.org/web/packages/policies.html
Just trying to clarify what you mean by "mishap", etc.
 
It is all in my first line. Henrik B and I / my cronjob noticed a half-done change. A (few) commits, a changed policy page, but an old revision entry (id'ing the policy revision). This last sentence describes the mishap. Nobody is walking anything back or forth as best as I can tell. Uwe fixed the page, it now shows r3838 as it should.
 
9:12 PM
I wonder how they will decide if a package is non-trivial
 
The phrase "I know it when I see it" is a colloquial expression by which a speaker attempts to categorize an observable fact or event, although the category is subjective or lacks clearly defined parameters. The phrase was used in 1964 by United States Supreme Court Justice Potter Stewart to describe his threshold test for obscenity in Jacobellis v. Ohio. In explaining why the material at issue in the case was not obscene under the Roth test, and therefore was protected speech that could not be censored, Stewart wrote: I shall not today attempt further to define the kinds of material I understand...
Nobody knows, which doesn't stop anyone from offering their opinions about just [...insert term here...] it is.
 
 
1 hour later…
10:20 PM
Oh, and regarding the earlier comment about ORPHANED: we are looking at 35 packages total.
R> db <- setDT(as.data.frame(tools::CRAN_package_db()))
R> db[Maintainer=="ORPHANED",.(Package, Version, substr(Author,1,50))]
 
11:08 PM
@DirkEddelbuettel As someone who works LITERALLY HERE and is constantly harping on about reproducible examples to anyone who will listen, the whole copying-to-the-clipboard thing for reprex orphaning felt like a real kick in the pants.
 
@JuliaSilge I heard that argument before, and I still do not buy it as I happen to like the "Achim rule" of showing the R prompt (borrowed from the JSS style guide). So just mentally add a regular expression which removes a leading R> .
 
@DirkEddelbuettel Oh, I wasn't complaining about your code, or its presentation, here. I was mourning whatever is happening with the powers that be that has led to reprex being orphaned: cran.r-project.org/web/packages/reprex/index.html
I am happy to be corrected, but I understand that the problem is the fact that this package copies to the clipboard.
 
@JuliaSilge Oh, sorry, I was on the wrong page then. My bad! Well and that story is part of a pending blog post on dependencies I have been meaning to write for a few weeks now.
 
As someone who talks a lot about reproducible examples and how to make that easier for users of various stripes, I see this as a step backwards.
 
See this comment by Jenny (after I mentioned the amusing-to-me orpahning of a *verse package to Barry and a few others over slack).
 
11:48 PM
@JuliaSilge the way orphaning is handled is particular unpleasant at the moment - typically you find out secondhand, and unfortunately the tone often gives a sense of glee in your misfortune
 

« first day (2675 days earlier)      last day (500 days later) »