search for: destructuring

Displaying 14 results from an estimated 14 matches for "destructuring".

Did you mean: restructuring
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
...> language, i.e. that all statements are expressions and have a value. How about reframing this feature request from multiple assignment (which does go contrary to "everything has only one value, even if it's sometimes invisible(NULL)") to "structured binding" / "destructuring assignment" [*], which takes this single single value returned by the expression and subsets it subject to certain rules? It may be easier to make a decision on the semantics for destructuring assignment (e.g. languages which have this feature typically allow throwing unneeded parts of the ret...
2023 Mar 11
2
Multiple Assignment built into the R Interpreter?
...possible to get fairly close to your proposed semantics using the existing metaprogramming facilities in R. I put together a prototype package here to demonstrate: https://github.com/kevinushey/dotty The package exports an object called `.`, with a special `[<-.dot` S3 method which enables destructuring assignments. This means you can write code like: .[nr, nc] <- dim(mtcars) and that will define 'nr' and 'nc' as you expect. As for R CMD check warnings, you can suppress those through the use of globalVariables(), and that can also be automated within the package. The '...
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
...e. that all statements are expressions and have a value. > > How about reframing this feature request from multiple assignment > (which does go contrary to "everything has only one value, even if it's > sometimes invisible(NULL)") to "structured binding" / "destructuring > assignment" [*], which takes this single single value returned by the > expression and subsets it subject to certain rules? It may be easier to > make a decision on the semantics for destructuring assignment (e.g. > languages which have this feature typically allow throwing unnee...
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
...a value. > > > > How about reframing this feature request from multiple assignment > > (which does go contrary to "everything has only one value, even > if it's > > sometimes invisible(NULL)") to "structured binding" / "destructuring > > assignment" [*], which takes this single single value returned by the > > expression and subsets it subject to certain rules? It may be > easier to > > make a decision on the semantics for destructuring assignment (e.g. > > languages which...
2023 Mar 11
3
Multiple Assignment built into the R Interpreter?
...nts are expressions and have a value. > > > > How about reframing this feature request from multiple assignment > > (which does go contrary to "everything has only one value, even if it's > > sometimes invisible(NULL)") to "structured binding" / "destructuring > > assignment" [*], which takes this single single value returned by the > > expression and subsets it subject to certain rules? It may be easier to > > make a decision on the semantics for destructuring assignment (e.g. > > languages which have this feature typically...
2023 Mar 12
2
Multiple Assignment built into the R Interpreter?
...our proposed semantics > using the existing metaprogramming facilities in R. I put together a > prototype package here to demonstrate: > > https://github.com/kevinushey/dotty > > The package exports an object called `.`, with a special `[<-.dot` S3 > method which enables destructuring assignments. This means you can > write code like: > > .[nr, nc] <- dim(mtcars) > > and that will define 'nr' and 'nc' as you expect. > > As for R CMD check warnings, you can suppress those through the use of > globalVariables(), and that can also be a...
2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
...; prototype package here to demonstrate: > > https://github.com/kevinushey/dotty > <https://github.com/kevinushey/dotty> > > The package exports an object called `.`, with a special > `[<-.dot` S3 > method which enables destructuring assignments. This means you can > write code like: > > ? ? .[nr, nc] <- dim(mtcars) > > and that will define 'nr' and 'nc' as you expect. > > As for R CMD check warnings, you can suppress those through the > use...
2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
...to demonstrate: > > > > https://github.com/kevinushey/dotty > > <https://github.com/kevinushey/dotty> > > > > The package exports an object called `.`, with a special > > `[<-.dot` S3 > > method which enables destructuring assignments. This means you > can > > write code like: > > > > .[nr, nc] <- dim(mtcars) > > > > and that will define 'nr' and 'nc' as you expect. > > > > As for R CMD check warnings, you can suppres...
2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
...> > ??????? https://github.com/kevinushey/dotty > > > ??????? <https://github.com/kevinushey/dotty> > > > > > > ??????? The package exports an object called `.`, with a special > > > ??????? `[<-.dot` S3 > > > ??????? method which enables destructuring assignments. This > > > means you > > can > > > ??????? write code like: > > > > > > ???????????? .[nr, nc] <- dim(mtcars) > > > > > > ??????? and that will define 'nr' and 'nc' as you expect. > > > > >...
2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
...???? https://github.com/kevinushey/dotty >>>> ??????? <https://github.com/kevinushey/dotty> >>>> >>>> ??????? The package exports an object called `.`, with a special >>>> ??????? `[<-.dot` S3 >>>> ??????? method which enables destructuring assignments. This >>>> means you >>> can >>>> ??????? write code like: >>>> >>>> ???????????? .[nr, nc] <- dim(mtcars) >>>> >>>> ??????? and that will define 'nr' and 'nc' as you expect. >>&...
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
...and have a value. > > > > > > How about reframing this feature request from multiple assignment > > > (which does go contrary to "everything has only one value, even if it's > > > sometimes invisible(NULL)") to "structured binding" / "destructuring > > > assignment" [*], which takes this single single value returned by the > > > expression and subsets it subject to certain rules? It may be easier to > > > make a decision on the semantics for destructuring assignment (e.g. > > > languages which have thi...
2018 Sep 21
3
backup of tdb files
Hi, how would I go about dumping tdb files in a “neutral” format, preferably JSON? The goal is to have a domain member functional after restoring from a backup without re-joining. Ideally, the backed up version does not depend on the tdb because of concerns about the stability of the format. A backup set must remain usable despite a multi-major version Samba update happening in between. By
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
On 11/03/2023 9:54 a.m., Sebastian Martin Krantz wrote: > Thanks Duncan, > > I know about list2env(), in fact a previous version of collapse::`%=%` > was coded as > > "%=%" <- function(lhs, rhs) { > ?? if(!is.character(lhs)) stop("lhs needs to be character") > ?? if(!is.list(rhs)) rhs <- as.vector(rhs, "list") > ?? if(length(lhs)
2018 Sep 21
0
backup of tdb files
On Fri, 2018-09-21 at 11:29 +0200, Philipp Gesang via samba wrote: > Hi, > > how would I go about dumping tdb files in a “neutral” format, > preferably JSON? > > The goal is to have a domain member functional after restoring > from a backup without re-joining. Do take care that the password is changed by winbindd regularly.  It might not work any more. > Ideally, the