[Rd] Halfway through writing an "IDE" with support for R; Proof of concept, and request for suggestions.

2019-06-10 Thread Abby Spurdle
I've written what I refer to as an "Integrated Console Environment".
Similar to an IDE, but more console oriented, so suitable for running
scripts and dynamic programming languages.
Also, it's designed to be congruent with the file system.

Obviously, I want to support R.
However, the long term plan is to make the core system relatively language
neutral, and to support R via a plugin.

Here's my (early, partially complete) prototype:
https://sites.google.com/site/spurdlea/java/symbyont

And I have some screenshots, which give the general idea:
https://sites.google.com/site/spurdlea/java/symbyont/screenshots

This biggest problem is that I don't have a fully functional console (or
terminal).
I don't know how this works under Windows, but I have found some
information on how it works under Linux.
If anyone would like to contribute or make suggestions in this area, please
email me.

Currently, I'm simply forking child processes, which works most of the
time, including the Windows command prompt.
There are some complications running R this way.
However, running "R --vanilla --ess" produces a reasonable result.

Also, I'm interested to hear what people would like to see in an R user
interface.

Any suggestions are welcome.
However, here are some specific questions that I have:
(1) What would people teaching R, like to see?
(2) If running multiple versions of R at the same time, are there any
GUI-level features that would be desirable?
(3) What should an outline viewer for R, look like and do?
(4) Should there be a data editor, and if so, should it be able to edit R
objects directly?

Noting that point (4) is contrary to the principle of being console
oriented.

Other notes:
(1) It's written in Java, and Swing.
This was the easiest way to create a cross platform user interface.
(2) Currently, it only supports Windows, very sorry.
I'm planning to have it working on Fedora, in the near future.
Then after that, we'll see...
(3) It's dual licensed under GPL 2 and GPL 3.
(4) I wrote most of this in 2006 and 2007.
I pulled it out of my personal archives at the end of April.
(5) It's badly written, and has some bugs and other problems.
Please don't email me and tell me it's badly written or has bugs, because I
know.
(6) I'm planning to completely rewrite it.
I'm likely to do one or two updates before I start rewriting it.
And hopefully, I'll have most of the problems solved, very soon.

It would be good to get suggestions *before* I start rewriting it.


Abs

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] Open a file which name contains a tilde

2019-06-10 Thread Frank Schwidom
Hi,

to get rid of any possible filename modification I started a little project to 
cover my usecase:

https://github.com/schwidom/simplefs

This is my first R package, suggestions and a review are welcome.

Thanks in advance
Frank Schwidom

On 2019-06-07 09:04:06, Richard O'Keefe wrote:
>How can expanding tildes anywhere but the beginning of a file name NOT be
>considered a bug?
>On Thu, 6 Jun 2019 at 23:04, Ivan Krylov <[1]krylov.r...@gmail.com> wrote:
>
>  On Wed, 5 Jun 2019 18:07:15 +0200
>  Frank Schwidom <[2]schwi...@gmx.net> wrote:
>
>  > +> path.expand("a ~ b") 
>  > [1] "a /home/user b"
>
>  > How can I switch off any file crippling activity?
>
>  It doesn't seem to be possible if readline is enabled and works
>  correctly.
>
>  Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
>  calls R_ExpandFileName_readline [4], which uses libreadline function
>  tilde_expand [5]. tilde_expand seems to be designed to expand '~'
>  anywhere in the string it is handed, i.e. operate on whole command
>  lines, not file paths.
>
>  I am taking the liberty of Cc-ing R-devel in case this can be
>  considered a bug.
>
>  --
>  Best regards,
>  Ivan
>
>  [1]
>  
> [3]https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/names.c#L807
>
>  [2]
>  
> [4]https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/platform.c#L1915
>
>  [3]
>  
> [5]https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-unix.c#L147
>
>  [4]
>  
> [6]https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-std.c#L494
>
>  [5]
>  
> [7]https://git.savannah.gnu.org/cgit/readline.git/tree/tilde.c?h=devel#n187
>
>  __
>  [8]r-h...@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>  [9]https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide
>  [10]http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>
> References
>
>Visible links
>1. mailto:krylov.r...@gmail.com
>2. mailto:schwi...@gmx.net
>3. 
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/names.c#L807
>4. 
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/platform.c#L1915
>5. 
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-unix.c#L147
>6. 
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-std.c#L494
>7. https://git.savannah.gnu.org/cgit/readline.git/tree/tilde.c?h=devel#n187
>8. mailto:r-h...@r-project.org
>9. https://stat.ethz.ch/mailman/listinfo/r-help
>   10. http://www.r-project.org/posting-guide.html

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] Open a file which name contains a tilde

2019-06-10 Thread Richard O'Keefe
?path.expand
Expand a path name, for example by replacing a leading tilde by
the user's home directory (if defined on that platform).

*A* path name.  The argument is a character vector.
If multiple path names are passed, they are passed

On most builds of R *A LEADING* "~user" will be replaced...

Nothing is said in the R documentation about *multiple* or
*non-leading* tildes being replaced.

The actual behaviour is inconsistent with the documentation.
SOMETHING is a bug.

It's not clear to me why this is in any way dependent on
readline.  I've implemented tilde expansion several times
and always without readline.
It sounds as though R might be calling tilde_expand()
when it *should*, to be consistent with the documentation,
be calling tilde_expand_word().



as separate elements of the character vector.



On Sat, 8 Jun 2019 at 04:10, Berry, Charles  wrote:

>
>
> > On Jun 6, 2019, at 2:04 PM, Richard O'Keefe  wrote:
> >
> > How can expanding tildes anywhere but the beginning of a file name NOT be
> > considered a bug?
> >
> >
>
> I think that that IS what libreadline is doing if one allows a whitespace
> separated list of file names.
>
> As reported in R-help,
>
> https://www.mail-archive.com/r-help@r-project.org/msg254116.html
>
> path.expand seems to expand tildes beginning whitespace separated strings
> that could be filenames, but not other tildes.
>
> Thus,
>
> > path.expand("~/.newsrc ~/.R/*")  # expands both tildes
> [1] "/Users/cberry/.newsrc /Users/cberry/.R/*"
> > path.expand("~/.newsrc~/.R/*")   # expands only the first
> [1] "/Users/cberry/.newsrc~/.R/*"
> >
>
> This could be a feature if what one wanted was to pass the result to a
> system command that will process multiple file arguments, e.g.
>
> > system(paste( "wc", path.expand("~/.newsrc ~/.R/*"))) # run wc on some
> files
>
> I doubt that this was intended by R-core, but perhaps the readline devs
> had this in mind.
>
> Chuck
>
>
> > On Thu, 6 Jun 2019 at 23:04, Ivan Krylov  wrote:
> >
> >> On Wed, 5 Jun 2019 18:07:15 +0200
> >> Frank Schwidom  wrote:
> >>
> >>> +> path.expand("a ~ b")
> >>> [1] "a /home/user b"
> >>
> >>> How can I switch off any file crippling activity?
> >>
> >> It doesn't seem to be possible if readline is enabled and works
> >> correctly.
> >>
> >> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
> >> calls R_ExpandFileName_readline [4], which uses libreadline function
> >> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
> >> anywhere in the string it is handed, i.e. operate on whole command
> >> lines, not file paths.
> >>
> >> I am taking the liberty of Cc-ing R-devel in case this can be
> >> considered a bug.
> >>
> >> --
> >> Best regards,
> >> Ivan
> >>
> >> [1]
> >>
> >>
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/names.c#L807
> >>
> >> [2]
> >>
> >>
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/main/platform.c#L1915
> >>
> >> [3]
> >>
> >>
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-unix.c#L147
> >>
> >> [4]
> >>
> >>
> https://github.com/wch/r-source/blob/12d1d2d232d84aa355e48b81180a0e2c6f2f/src/unix/sys-std.c#L494
> >>
> >> [5]
> >>
> https://git.savannah.gnu.org/cgit/readline.git/tree/tilde.c?h=devel#n187
> >>
> >> __
> >> r-h...@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >
> >   [[alternative HTML version deleted]]
> >
>
>
>

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel