r-lib / ansistrings

Manipulation of ANSI colored strings
Other
9 stars 5 forks source link

Ansi Aware `strwrap` #1

Open brodieG opened 7 years ago

brodieG commented 7 years ago

Will rely on ansi_substr or related fun.

gaborcsardi commented 7 years ago

:+1:

brodieG commented 7 years ago

Okay, so I have an initial "kinda works" version, but it only works based on my modified version of rematch2, so I'm not proposing to merge it yet. Really I just took the sources from strwrap and subbed in the functions that you wrote. You can see how it works by running the code in the test file, although clearly this is not quite right yet. Before proceeding further I'd like some feedback on what to do about the rematch issue.

Also, @gaborcsardi, let me know if you're okay with what I did to the DESCRIPTION file

Finally, sorry for all the comments/edits.

gaborcsardi commented 7 years ago

Unfortunately we cannot copy large chunks form base R, because that would make our package GPL, and I prefer a more permissive license. So I am afraid that we need to do strwrap from scratch.

Personally I think that code is too difficult, anyway.

brodieG commented 7 years ago

Ok, makes sense, sorry for failing to notice that license incompatibility. I'll do a new version.

As an aside (and has no relevance for any of this), for the life of me I can't figure out how any R package can be licensed as anything other than GPL2+ given that's what R is licensed under. I get that R Core wants to allow other licenses, but I can't figure any reading of GPL-2 that actually allows it. For example, the difference between using strwrap in my source vs copying the source of strwrap and using that strikes me as legally tenuous. That said, I'm certainly no lawyer and even if I'm right it seems like everyone is happy looking the other way.

gaborcsardi commented 7 years ago

Thanks!

R is a programming language and an interpreter. The fact that the R interpreter and the standard (base) R library is in GPL does not influence the license of the programs written in R.