I have created two images named First and Second.
require 'viewmat'
viewmat (%:(i:160)>./i:160);'First'
viewmat (*:(i:160)>./i:160);'Second'
How can I use the code mentioned in the viewmat lab to save them as
"First.bmp" and "Second.bmp" to the temp file?
Here are the hints I
I needed to run J from the unix command line, and I didn't find anything up
on jsoftware.com that seemed to fit the bill.
So I added a J entry to rosettacode that illustrates some of the concepts:
http://rosettacode.org/wiki/Multiline_shebang#J
Hypothetically speaking you could build J scripts t
One thing I'd keep in mind is that errors do have utility. (Programmers use
errors to help focus their attention on parts of the code that need
attention.)
So when you change the language to eliminate an error case you need to make
sure that you're adding something useful.
That could easily be th
Ok.
4 :0
1y2x
:
0
)
4 :0 ignores the monadic part of the definition.
Here's another oddity:
F=:3 :0
1
:
2
:
3
)
Predict:
F 'c'
'a' F 'b'
Thanks,
--
Raul
On Tue, Mar 18, 2014 at 9:08 PM, Henry Rich wrote:
> That's silly enough, but I meant that one of the lines read by the : t
The (a v) train was an idea from Viktor Cerovski that I believe was mainly
motivated by the desire for a tacit "dynamic rank". See
http://www.jsoftware.com/pipermail/programming/2010-November/021108.htmlfor
the discussion.
Pascal is correct, the parsing rules can get "unintuitive" although the
rul
You may also try 2!:1 that is also being used in Michael's built.
type inside your Term window
android_exec_host_z_=: 2!:1
then see if browse_j_ or menu help can work. If success, add
this definition to your ~config/startup.ijs
menu help remote might not work because it hardcoded to use am
star
Chris, I am unable to post to the General Forum.
I have just downloaded J801 and can run jqt
JVERSION
Engine: j701/2011-01-10/11:25
Library: 8.01.025
Qt IDE: 1.0.24/4.8.5
Platform: Win 32
Installer: j801 install
InstallPath: c:/users/kip murray/j801
I need step-by-step instructions for running
That's silly enough, but I meant that one of the lines read by the :
that defined the verb was 1y2x.
(in your example, the : that defines the verb doesn't read lines from
the script).
Henry Rich
On 3/18/2014 7:59 PM, Raul Miller wrote:
Here's one way:
F=: 3 :(0 :0-.LF)
x+y
NB.
1
Not J, but that reminds me that I set up a scheme interpreter on my
Kindle 3G a few years back:
http://www.mobileread.com/forums/showthread.php?t=56
With J on my android phone and tablet, I can't think of when I'd use
it on a kindle. The 3G physical keyboard could be novel idea.
Theoretically
Here's one way:
F=: 3 :(0 :0-.LF)
x+y
NB.
1y2x
)
(This presumes that "One the lines" meant "One of the lines").
Thanks,
--
Raul
On Tue, Mar 18, 2014 at 7:12 PM, Henry Rich wrote:
> I wrote the explicit definition of a verb. It used : 0 to read lines from
> the script it was defi
please also post what are the output of
2!:5'TMP'
for both old and new devices.
19.03.2014, в 2:17, Paul Jackson написал(а):
> I ran your tests in jqt on an old machine, where Help and browse_j_ work.
>
> 2!:0 'which am'
> |interface error
> | 2!:0'which am'
>
> 2!:0 'am start -a
Michael Dykman's version does not use 2!:0'am ...' to run other android apps.
What are model and spec of your android devices that failed to run 2!:0'am
' ?
19.03.2014, в 2:17, Paul Jackson написал(а):
> I ran your tests in jqt on an old machine, where Help and browse_j_ work.
>
> 2!:0
I wrote the explicit definition of a verb. It used : 0 to read lines
from the script it was defined in. One the lines, encountered before
the end-of-verb delimiter ), was
1y2x
(just the 4 characters). Yet, the definition was created without error.
How is this possible?
Henry Rich
--
Has anyone looked at trying to get J on a Kindle Paperwhite? Apparently
it's a Linux OS and easily rootable.
--
Devon McCormick, CFA
--
For information about J forums see http://www.jsoftware.com/forums.htm
Thanks, fixed now in 8.01.025.
BTW - pacman now properly supports dependencies, which were ignored before.
The bug in pacman console was introduced in this code.
On Wed, Mar 19, 2014 at 3:17 AM, Tomei L. wrote:
> After last update of base library (8.01.024), I have problems with
> pacman.ijs
>
Have a look at the diagrams for Hook and Fork in
http://www.jsoftware.com/docs/help801/dictionary/dictf.htm
--Kip Murray
Sent from my iPad
> On Mar 18, 2014, at 2:15 PM, Pascal Jasmin wrote:
>
> to be clear, I am in no way asking for how to double a product.
>
> what the function is actually
After last update of base library (8.01.024), I have problems with
pacman.ijs
Using jpkg verb, I cannot install / upgrade addons from jconsole or jhs.
jqt package manager seems ok.
--
For information about J forums see http://www
to be clear, I am in no way asking for how to double a product.
what the function is actually equivalent to, though is: (*+*)
What seems interesting about the function is it is doing something I previously
thought was impossible. Saving and reusing intermediate (noun) results in a
tacit func
Here's another function which achieves that end:
test9=: 2 * *
One interesting thing though, when comparing different expressions which
accomplish the same end, has to do with how their components can be used
differently.
And there's something to be said for having a wide variety of components.
I ran your tests in jqt on an old machine, where Help and browse_j_ work.
2!:0 'which am'
|interface error
| 2!:0'which am'
2!:0 'am start -a android.intent.action.VIEW -d "http://www.google.com";
-t text/html'
Starting: Intent { act=android.intent.action.VIEW
dat=http://www.google.co
interesting function, Raul, but not quite what I was doing:
test8 =: 4 : 'c' + [ 4 : 'c =: x * y' ]
function simply multiplies x and y and then doubles result. Its a 5 element
train where the : conjunctions makes single train elements. The point is
doing this with potntial side effects an
It's not clear to me what you want to accomplish here - no sample data, no
results. Also note that while this is, in a sense, tacit, you'll get some
... interesting (and probably unintended) behaviors if you try using your 3
: and/or 4 : verbs with rank.
I've got some code I'm working on which use
There must be some major difference because on the old version I'm using on
this machine:
JVERSION
Engine: j701/2011-02-23/15:25
Library: 7.01.068
Platform: Android 32
Installer: j701a_linux32.sh
InstallPath: /data/data/org.dykman.j.android/app_jconsole
browse_j_'http://www.google.com'
works
If we refuse to understand .* there is also
marginPct=: (1 - [: %~/ [: +/ *)
100 5 (1 - [: %~/ [: +/ *) _2 ]\ 10 3 7.5 2
0.701205
- Original Message -
From: Devon McCormick
To: J-programming forum
Cc:
Sent: Tuesday, March 18, 2014 12:07:28 PM
Subject: Re: [Jprogramming] J as a ca
Quite consistent:
2!:0 'which am'
|interface error
| 2!:0'which am'
2!:0 'am start -a android.intent.action.VIEW -d "http://www.google.com";
-t text/html'
|interface error
| 2!:0'am start -a android.intent.action.VIEW -d "
http://www.google.com"; -t text/html'
2!:0 'am start -
Here is a neat way to get intermediate results within a tacit expression. Many
drawbacks, but it is possible. Drawbacks include global variables, and dyad
vs. monad must be known prior to access:
3 : 'c' + [ 4 : 'c =: x * y' ]
That may not look very tacit, but it is :P intermediate result c
Note that
marginPct=: 1 - [: %~/ [ +/ .* ]
can be simplified:
marginPct=: 1 - [: %~/ +/ .*
(Balanced square brackets around what would be the right most verb of a
train are redundant.)
Thanks,
--
Raul
On Tue, Mar 18, 2014 at 12:07 PM, Devon McCormick wrote:
> I thought of this too.
I thought of this too. Also, at some point you may want to name it (here
incorporating the suggestion to move the pairing out of the concept):
marginPct=: 1 - [: %~/ [ +/ .* ]
100 5 marginPct 10 3,: 7.5 2
0.701205
On Tue, Mar 18, 2014 at 11:02 AM, Pascal Jasmin wrote:
> the only things I
the only things I'd change:
use ] instead of [ to be able to work in a dyadic verb
then make a verb, and probably assign it so as to be able to do the calc
another day or with other data.
13 : '1- %~/ +/ x * _2]\ y'
1 - [: %~/ [: +/ [ * _2 ]\ ]
100 5 (13 : '1- %~/ +/ x * _2]\ y')
If you are willing to enter longer lists using ,: , the following is pretty
concise and requires no use of ,s .
1- %~/ 100 5 +/ .* |:10 7.5,:3 2
--
(B=)
--
For information about J forums see http://www.jsoftware.com/forums.
thank you,
defining myadverb =: ( 0 :) 1 : 0
...
)
has the added benefit of keeping syntax highlighting in the multiline
definition for
def =: 0 myadverb
...
)
- Original Message -
From: Jan-Pieter Jacobs
To: programm...@jsoftware.com
Cc:
Sent: Tuesday, March 18, 2014 9:01:37 AM
S
the only things I'd change:
use ] instead of [ to be able to work in a dyadic verb
then make a verb, and probably assign it so as to be able to do the calc
another day or with other data.
13 : '1- %~/ +/ x * _2]\ y'
1 - [: %~/ [: +/ [ * _2 ]\ ]
100 5 (13 : '1- %~/ +/ x * _2]\ y') 10 3
Thanks for the ideas Brian and Raul.
On Tue, Mar 18, 2014 at 10:27 AM, Raul Miller wrote:
> Of course, technically the parenthesis are unnecessary, and are just there
> for emphasis. But another way of emphasizing would emphasize that you are
> working with pairs:
>
>10 3,:7.5 2
>
> Note that
I might be tempted to rephrase the price and cost part of this.
One variant pulls the _2[\ into the parenthesis, because it's a part of the
structure of your numbers:
(_2[\ 10 3 7.5 2)
Of course, technically the parenthesis are unnecessary, and are just there
for emphasis. But another way of
No way to have a single word, since a single word is just a value and is
not executed.
And I can't find a way to do it on 2 words when one is an adverb.
Henry Rich
On 3/18/2014 8:42 AM, Pascal Jasmin wrote:
from
http://www.jsoftware.com/jwiki/PascalJasmin/Multiline%20tacit%20expressions%20wi
1- %~/ 100 5 +/ .* _2]\10 3 7.5 2
0.701205
On Tue, Mar 18, 2014 at 9:50 AM, Brian Schott wrote:
> I cannot beat that, but the parentheses are unnecessary.
>
>
>
>
> --
> (B=)
>
--
(B=) <-my sig
Brian Schott
--
For
I cannot beat that, but the parentheses are unnecessary.
--
(B=)
--
For information about J forums see http://www.jsoftware.com/forums.htm
I'm trying to use J more in my daily calculations in addition to programming.
I was working with some simple margin % calculations in a one liner
1- %~/ +/ (100 5) * _2[\ (10 3 7.5 2)
I'd like any ideas on how others would do this type of 'spreadsheet'
calculation. I'm pretty happy with it, but
Since you'd want to have the verb as return value, you'd want to have an
adverb or conjunction. They both need operands to do a job.
I tried this with } instead of Tacify, but I guess it will just work as
well:
>foo =: (0 :) }
>
>0 foo
>123
>)
>(49 50 51 10{a.)}
I think this should equal
from
http://www.jsoftware.com/jwiki/PascalJasmin/Multiline%20tacit%20expressions%20with%20macros
test =: 0 : 0 Tacify
( +/
x % y 13 MACdef NB.macro that will call 13 : x % y and return %
#)
NB. blank line with comment next without comment
@:>
)
produces
+/ % #)@:>
and is
40 matches
Mail list logo