I've had a quick look - on this PC, not my iPad!
No doubt you posted a minimal version of the script, but I think I'd
avoid having
the bare, un-commented, line "main years" there - it takes half a minute
on this laptop
to run "main 1", so one doesn't know for some time whether the load
(and run "main years") is working.
Further, to my taste, I'd just have main's last line be either
''
or
#data
As listed in your mail, below, it's trying to show the value of data in
the terminal screen, and
that's more than 18 thousand lines of output for 2 years of decoded csv
data.
The space reported for that data is 55 MB on this PC. The undecoded
data, ie that
before applying "fixcsv" each, is much smaller, at about 3 MB.
So - the iPad _might_ be objecting to trying to display too much in the
terminal screen, or
taking forever to try to display it.
Have you tried running on the iPad without the fixcsv line?
Also, there seems to be a lot of redundancy, or repetition, in the
data. Each
month looks much the same, except for the odd items of actual readings.
You
presumably know the format you're getting, so it might be worth removing
the repeated material.
But you've probably considered all these points ad nauseam....
Cheers,
Mike
On 20/11/2018 00:44, Robert Cyr wrote:
The following will extract hourly weather information for each month of a
given number of years from a weather station from my region. You fill
receive one file for each month in a given number of years including the
curent year. Results will be ok on your PC but incomplete on the iPad.
Your iPad file system will also become confused.
---------------------------------------------------------------------------------------------------------------------------------
require '~addons/web/gethttp/gethttp.ijs'
require '~addons/tables/csv/csv.ijs'
years =: 2 NB. years of hourly climate data
main=: 3 : 0
NB. y: years of hourly climate data for weather station 27377 (Ste-Foy ,
Laval university, Canada)
get=:,/(":,.,/({.6!:0'')-|.i.y),"(1)/'&Month=',"(1)(":,.1+i.12),"1('&Day=14&timeframe=1')
get=: '
http://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID=27377&Year=',"
(1) get
get=:(#~1-' '=])&.><"(1)get NB. NO blank spaces in the request
data =: gethttp each get
data=: ,/>fixcsv &.> data
)
main years
--------------------------------------------------------------------------------------------------------------------------------
Available space on my iPad is close to 8 Gigs, well in excess of the
required 2.2 MB.
This is a segment of my script for estimating the energy saving for
various brands of heat-pumps for witch I have obtained sufficiently
detailed specs. Now that I have made my choice, I can verify that the
energy savings agree with the maker's promisses, taking into account local
weather conditions.
Robert Cyr
On Mon, Nov 19, 2018 at 1:35 PM 'Mike Day' via General <
[email protected]> wrote:
I tend to take the iPad out with me after updating the script I'm
working on
with a jjget from the less mobile laptop. I tweak the script a bit
perhaps, and
jjput the newer version. There are minor problems with the editing
process,
but worth it for the mobility.
The trouble with your mail is that it sounds dangerous to try to emulate
your
problem - no trouble with the mail itself, that is, but I don't want to
zap my J
installation on the iPad, any more than you want to zap yours!
My iPad is a bit short of storage - too many photos and videos! - is
that perhaps
a feature of yours, too?
Anyway, it might be useful if you could provide a concrete example or two.
Cheers,
Mike
On 19/11/2018 05:19, Robert Cyr wrote:
A request for 90K of CSV data only retrieves a fraction of this, varying
from 0.8 K to 15K.
This error probably caused another problem. My script often contains
about
100 such requests, and is fine in Windows 10. When it runs on my 2016
iPad
Pro no error is reported, but J's file system appears to become
completely
useless. The J icon in the screen's bottom row is grayed and clicking on
the regular J icon starts J almost normally but without access to any of
its files. It happens every time, I then download a new copy of J and
re-transfer all my useful addons along with all my other scripts with
jj.
It would be nice but perhaps not urgent for this problem to be fixed as
the iPad is great for fiddling with a new concept in a few lines of
compact
code, but maybe it is not too efficient for a more involved project.
Your experience may differ, but my smallish project involving 100 lines
of
code written on my laptop and the iPad progressed at least twice as fast
on the PC as the iPad.
----------------------------------------------------------------------
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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm