Somewhat off topic - how do we update the app to 22-02-20 - or is it not
necessary if the
J engine is J901 beta-k? I'm loth to uninstall/reinstall & lose the
stuff I set up last Autumn/Fall.
This is on my wife's more up-to-date iPad running iOS 14.7.1. (I've got
an Android phone,
but it's strapped for memory even without J of any kind!)
Somewhat more relevant, the phrase
1!:0 (2!:5'HOME'),'/Documents/j/*'
does of course work on Liz's iPad with J901, running the app version
dated 2021-10-15 .
However, on my older iPad (now iOS 12.5.1) running J701, while
2!:5'HOME'
does produce a similar longwinded path to that in J901, running
1!:0 (2!:5'HOME'),'/Documents/j/*' , or similar variants,
doesn't crash, fortunately, but produces an empty result, with shape 0 6
.
Cheers,
Mike
On 22/02/2022 08:42, Ian Clark wrote:
I read Devon's link on Patrick's work with interest. Was Patrick using
j701
or j901?
Assuming j901, I too would encourage J users to "explore the limits of J
on
your phone". It may look a tiny device but it's absurdly powerful. A lot
of
the "limits" you may come across may be easy to relax, or circumvent,
without either jailbreaking or sideloading dodgy apps. PM me with the
things you want to do, but can't. I need sample tasks I can test
solutions
for.
I was compelled to disable support for several potentially nice features
just to be sure of getting j901 past App Store review. Particularly ways
to
port J code to-and-from other devices (…just use iCloud Drive). The
trouble
is, I don't own an iPhone, and had to do all the development of j901
using
either the Simulator or an up-to-date iPad. So I don't know what doesn't
work on an iPhone, even if it does on an iPad. Please tell me.
Oh, and I can't do much for obsolete phones, i.e. ones which won't
upgrade
to the latest iOS version. To do so I would need to run a back-level of
Xcode on a dedicated Mac to develop and maintain an entirely independent
clone of j901 – way beyond my limited resources. I'd recommend users of
devices as old as 4S to revert to j701. It's still downloadable from App
Store and you can run both apps simultaneously (though I haven't tested
this extensively). The apps have different bundle IDs, and use different
technologies.
As for the phone going to sleep during a long calculation, don't let the
app go into background mode. Plug in the charger, scroll the text, stroke
the screen, tap a "safe" menu – whatever keeps it awake. iOS will kill
the
app if it judges it's using too much energy, but nobody knows how much is
too much. All Apple really wants your app to do in background is play
music, or update its internal data from the web. You can put off the evil
hour by quitting all apps except J (…double-click the Home button, then
dismiss all unwanted apps by swiping upwards.)
On Tue, 22 Feb 2022 at 04:20, Devon McCormick <[email protected]>
wrote:
Patrick, are you going to get your photoionization models of planetary
nebulae working on your new phone?
https://code.jsoftware.com/wiki/NYCJUG/2013-07-09#Astronomical_Calculations_on_a_Phone
On Mon, Feb 21, 2022 at 8:06 PM bill lam <[email protected]> wrote:
/j/... sandbox works well if files are accessed from J itself. However
if
it needs to pass the name of the file to external programs or shared
libraries, then the full path is needed.
On Tue, 22 Feb 2022 at 7:53 AM Ian Clark <[email protected]>
wrote:
Bill wrote:
Nevertheless you can hack using the HOME environment variable
Yes, in j901 for iOS …
JVERSION
Engine: j903/j64/iOS
beta-k: GPL3/2022-02-20T16:48:50
Platform: iOS/iPadOS
Version: 901.2 50
Installer: App Store
Contact: www.jsoftware.com
…you can indeed enter:
2!:5'HOME' NB. gets a shadowy long-path...
/Users/ianclark/Library/Containers/BFFFA6CA-80AD-4BF7-A281-B0244C5DA3AD/Data
1!:0 (2!:5'HOME'),'/Documents/j/*'
┌──────┬──────────────────┬───┬───┬──────┬──────────┐
│temp │2022 2 20 16 48 52│96 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│tools │2022 2 20 16 48 52│320│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│test │2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│config│2022 2 20 16 48 52│96 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│addons│2022 2 20 16 48 52│576│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│user │2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│slate │2022 2 20 16 48 52│64 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│system│2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│assets│2022 2 20 16 48 52│832│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│plotf │2022 2 20 16 48 52│64 │rwx│----d-│drwxr-xr-x│
└──────┴──────────────────┴───┴───┴──────┴──────────┘
But that is an unnecessarily roundabout route. The following is
equivalent:
1!:0 'j/*'
┌──────┬──────────────────┬───┬───┬──────┬──────────┐
│temp │2022 2 20 16 48 52│96 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│tools │2022 2 20 16 48 52│320│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│test │2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│config│2022 2 20 16 48 52│96 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│addons│2022 2 20 16 48 52│576│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│user │2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│slate │2022 2 20 16 48 52│64 │rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│system│2022 2 20 16 48 52│160│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│assets│2022 2 20 16 48 52│832│rwx│----d-│drwxr-xr-x│
├──────┼──────────────────┼───┼───┼──────┼──────────┤
│plotf │2022 2 20 16 48 52│64 │rwx│----d-│drwxr-xr-x│
└──────┴──────────────────┴───┴───┴──────┴──────────┘
j901 will recognize a "short path" -which is capable of reaching
anything
in its sandbox:
1!:0 '*'
┌─────────┬───────────────────┬────┬───┬──────┬──────────┐
│j │2022 2 21 22 40 47 │384 │rwx│----d-│drwxr-xr-x│
└─────────┴───────────────────┴────┴───┴──────┴──────────┘
Note that using a long-path doesn't get round Apple's security. To
combat
"jailbreaking", iOS polices long-paths, and intervenes to defeat the
user's
efforts to do anything clever with them, such as string-processing or
use
of ../ . There are (of course) no published rules as to how long-paths
are
munged, or when.
…but see:
https://www.nextofwindows.com/how-to-browse-your-ios-devices-file-system-on-windows
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
…(The presence of /archive/ warns you that the page may be out of
date,
or
no longer represent best practice.)
Yes, as with macOS there is a "bundle" containing the app code and
associated files, but it lies outside the app's sandbox, and iOS
defends
it
creatively. If you try hunting for an "~install" path, you'll be
chasing
shadows.
You can, however, copy files and folders into the /Documents/ folder
as
siblings of j/ , since that's still in your sandbox.
On Mon, 21 Feb 2022 at 13:06, bill lam <[email protected]> wrote:
iOS apps are supposed to run inside sandbox and leaking file system
info
is
discouraged. Nevertheless you can hack using the HOME environment
variable.
try the following
2!:5'HOME'
1!:0 (2!:5'HOME'),'/*'
1!:0 (2!:5'HOME'),'/Documents/*'
1!:0 (2!:5'HOME'),'/Documents/j/*'
On Mon, 21 Feb 2022 at 8:11 PM Richard Donovan <
[email protected]>
wrote:
On my iPhone…
jpath'~install'
~install
Which isn’t much help’
________________________________
From: General <[email protected]> on behalf of
bill
lam <[email protected]>
Sent: Monday, February 21, 2022 4:37:15 AM
To: [email protected] <[email protected]>
Subject: Re: [Jgeneral] J903 on Pixel 6 Pro (Android)
the install folder on any platform can be found by
jpath'~install'
on android it is
/storage/emulated/0/Android/data/com.jsoftware.j.android/files
On 20 Feb 2022, at 1:58 AM, J. Patrick Harrington <[email protected]>
wrote:
I just recently replaced my old iPhone (a 6 Plus) with a new
Google
Pixel 6 Pro.
It seems to be an impressive phone with a great camera. One of my
motivations for not getting a newer iPhone was my desire to escape
the
increasingly locked-down Apple philosophy. I had problems moving
files
back
and forth between my linux computer and the phone. I'm glad to
report
that
I had no particular difficulty installing J903 on the Pixel 6. The
file
locations are cumbersome; you need something like
Apath=:
'/storage/emulated/0/Android/data/com.jsoftware.j.android/files/'
in your startup profile. But the good news is that you just need
a
USB
C
cable between your Pixel and computer and you just drag and drop
files
to
transfer them back and forth. I used to test the speed of J on
phones
by
inverting a 500 x 500 matrix -- on my old iPhone it took 0.5 sec,
but
on
this Pixel it's down to 0.046 sec. (Need to use a larger matrix,
e.g.
1000
x 1000 -> 0.37 sec.) It took a bit of fussing to install the Dykman
keyboard but now its there and works great. I noticed there was a
2nd
keyboard available but I haven't tried it. How does it differ? I
must
say
that though I ran J programs on the iPhone, I seldom developed
anything
on
it. But J903 on this Pixel 6 is so smooth that I've started writing
(short)
routines on it and copying them back to the laptop.
My real reason for writing this report is ask for pointers to any
discussions regarding J on android phones. The android OS is
completely
new
to me. One glitch I encountered was when I modified a J routine
with
a
text
editor I'd installed on the Pixel. I got a strange file read error.
It
looked like the editor did something invisible to the file that
ruined
the
J session -- all my definitions were gone and I had to kill J and
restart.
But if I made the file changes on the laptop and ported the file
over,
it
was fine. Any suggestions for a good text editor for android? (I'm
an
old
school vi guy, but I've not found a good plane vi.)
Anyway, I appreciate any pointers of discussions of J on
android...
Patrick
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Devon McCormick, CFA
Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm