Hello,
I use state machines a lot in my programs (in other
languages). I am trying to understand how I can use J for
those purposes. I have read the Sequential Machines and
Huffman Coding labs. But I am unable to see how to solve this
toy problem (without using regexp):
Input al
Hi,
I have a list of boxes like
m=. 1; 2 3 5; 4 5
All the boxes contain lists whose items have the same shape. So it is
meaningful to make a combined list, eg convert m to
n=.1, 2 3 5, 4 5
As the individual lists differ in length, using >"0 produces unwanted
padding.
The brute force app
Yes, that's precisely what I was looking for! Thanks!
On 18 Feb 2018 19:32, "Raul Miller" wrote:
>n=: ;m
>
> Thanks,
>
> --
> Raul
>
>
> On Sun, Feb 18, 2018 at 4:02 AM, Arnab Chakraborty
> wrote:
> > Hi,
> >
> >I have a
~2~:/\]))
>>(O-:g) I
>> 1
>>
>>
>> Or use no boxes, but this idea depends on your actual application. Accept
>> the fill and remove it later.
>>
>>h=: ' ' -.~ [: , ((('alpha'"_)`('beta'"_)`]@.('abc'
~:/\ ])
>>>(O -: f) I
>>> 1
>>>
>>> We can mash it together
>>>g=: [: ; (<@(('alpha'"_)`('beta'"_)`]@.('abc'i.{.));.2~ (1,~2~:/\]))
>>>(O-:g) I
>>> 1
>>>
>>>
>
eria, like which one looks simpler to me.]
>
> That's all that I can think of that might be relevant...
>
> Thanks,
>
> --
> Raul
>
>
> On Mon, Feb 19, 2018 at 9:56 PM, Arnab Chakraborty
> wrote:
> > Hello Raul,
> >
> >I have been able to
Hi Henry,
Indeed when I wrote the verb
sm=.4 :'s=:s sf y ] s of y'
I first wanted to write the verb so that
sm/ 2 3 4
runs the machine on input 2 3 4. But I could not manage this, because I
need to preserve the output from each cell, but only the final state. So I
seem to need u/ and u/\.
Hi,
I am curious about HOW the following is handled by J:
+/\. i.10
As the dict says, +/ is applied to all the suffixes *starting with* the
entire i.10
and working down to just 9. The efficient way is of course the other way
around.
So what does J actually do?
--
Hi,
If f is a dyad, then
f/ 2 4 5
means
2 f 4 f 5
where the rightmost occurence of f is invoked first. I am wondering if
there is a smart way to recognize this first invocation separately from the
rest. This will enable me to perform some initialization inside f. By
"smart" I mean something
Thanks, friends, for all the helpful suggestions. I am yet to try to out
all of them. Shall get back once I do.
Thanks and regards,
Arnab
On Sat, Mar 3, 2018 at 12:39 AM, 'Pascal Jasmin' via Programming <
programm...@jsoftware.com> wrote:
> The usefulness of the F. F: family (there will proba
Hi all,
There should really be an easy answer to this, but I don't seem to find
it.
How to make a scatterplot in j? That is, a plot of (x_i,y_i)'s as separate
points. Also, it will be helpful to make a scatterplot from two columns of
numbers stored in a file. Any idea?
Thanks a lot.
Arnab
---
Hi Bo,
Thanks, but when I try
plot (i.8) j. i.8
I get a line, and not just 8 points.
On 13 Apr 2018 22:13, "'Bo Jacoby' via Programming" <
programm...@jsoftware.com> wrote:
> plot x j. y
>
>
> Den 17:58 fredag den 13. april 2018 skrev Arnab Chakrabo
i.8
>
>
> but you hardly see the points (using jqt), and therefore:
>
>
> 'pensize 2; type point' plot (i.8) j. i.8
>
>
>
>
> On Sat, Apr 14, 2018 at 10:12 AM, Arnab Chakraborty
> wrote:
>
> > Hi Bo,
> >
> > Thanks, but when I tr
or more spaces the following would
> work:
>
>data=: _999 ". > cut;._2 freads 'myfile.txt'
>'point; pensize 2' plot ;/ |:data
>
>
>
> On Sat, Apr 14, 2018 at 5:48 PM, Arnab Chakraborty
> wrote:
>
> > Thanks, Ben. That's wha
arse your 2-column file will depend on the actual format.
Assuming the fields are separated by one or more spaces the following would
work:
data=: _999 ". > cut;._2 freads 'myfile.txt'
'point; pensize 2' plot ;/ |:data
On Sat, Apr 14, 2018 at 5:48 PM, Arnab Chakr
Oops,Ric, it was a mistake on my part. Your code works fine.
On 16 Apr 2018 15:39, "Arnab Chakraborty" wrote:
> Hi Ric,
>
> You have written:
>
> data=: _999 ". > cut;._2 freads 'myfile.txt'
>
> But it produces error. I removed the ;.
> an
Hi,
I cannot understand the behavior of the following code that I have written:
f =: adverb define
y
:
x
)
I expected this adverb to convert any verb to one that as a monad is same
as identity function, and as a dyad is just [
It produces syntax error when called like
(sin f) 1
or
2 (+
> )
>
> On Sat, Aug 24, 2019, 10:07 PM Arnab Chakraborty
> wrote:
>
> > Hi,
> >
> > I cannot understand the behavior of the following code that I have
> written:
> >
> > f =: adverb define
> >y
> > :
> > x
> > )
> >
Dear Henry,
Ironically, I did read that page while trying to solve the mystery. But I
had still missed the point!
Anyway, I have created a "baby tutorial" by jotting down the steps I
took to produce an adverb for creating 3D obj files.
The problem is eminently suited for the J language, and
Dear all,
Thanks for the comments. I shall update the tutorial accordingly. My love
for =. stems from an advice that I got from a C instructor: Always declare
variables in the smallest scope possible.
Of course, I am not supposed to mix C philosophy with J philosophy...
Thanks and regards,
Ar
Dear all,
I am trying to implement a state machine in J. I shall be happy if I can
manage to take milage out of the J primitive ;: rather than use explicit
coding.
The input consists of a sequence of alphanumeric characters. However,
certain pairs and triples are considered as single entities
Thanks for the lead. I shall explore the idea.
On Wed, 11 Sep 2019, 01:36 Raul Miller, wrote:
> On Tue, Sep 10, 2019 at 3:51 PM 'Pascal Jasmin' via Programming
> wrote:
> > ;: can do this. Look at the handling for NB. in the J sentence example
> state machine (vocabulary entry).
>
> Sure, but
I just want to report a minor inconsistency in the NuVoc page for
sequential machine:
In the example for recognizing C hex strings, we have
We see that the input characters are in 4 classes
- the character 0
- the character x
- the hexadecimal characters *0*123456789abcdefABCDEF
- al
Hi,
How to produce a 2d plot with aspect ratio 1? I mean a plot where all
angles are shown correctly.
Thanks and regards
--
For information about J forums see http://www.jsoftware.com/forums.htm
27; plot data
>
>
> On Sat, Oct 26, 2019, 8:11 AM Arnab Chakraborty,
> wrote:
>
> > Hi,
> >
> > How to produce a 2d plot with aspect ratio 1? I mean a plot where all
> > angles are shown correctly.
> >
> > Thanks and regards
> > ---
20:05 Arnab Chakraborty, wrote:
> No, aspect 1 merely produces a plot that is a square, but the plotted
> region may not be a square. See the attachment.
>
> On Sat, 26 Oct 2019, 19:19 Michael Dykman, wrote:
>
>> I suspect that the simple solution that you are seeking is
t; helpful?
>
> Also
>
> https://code.jsoftware.com/wiki/Plot/Options
>
> On Sat, Oct 26, 2019 at 10:48 AM Arnab Chakraborty
> wrote:
>
> > No, Raul's idea also seems to fail for me.
> > My samsung galaxy j7 nxt has 16:9 aspect ratio. I am holding the phone in
> >
t i.5
>Gxywh_jwplot_
> 26 34 434 301
>
> On Sun, Oct 27, 2019 at 8:01 PM Arnab Chakraborty
> wrote:
>
> > Yes, Boss, that is a good idea. However, I am trying to plot the
> > perspective projection of a somewhat complex 3d scene, and hence I need
> > multiple
Dear all,
why am I getting this?
require 'debug/dissect'
dissect '(i.4) + i.4'
domain error
|domain error: wd
| wd DISSECT
Error during initial display
My pacman tells me I have the latest dissect 4.6.39/4.6.39
Thanks and regards
v 4, 2019, 8:15 PM Arnab Chakraborty wrote:
>
> > Dear all,
> >
> > why am I getting this?
> >
> >require 'debug/dissect'
> >dissect '(i.4) + i.4'
> > domain error
> > |domain error: wd
> > | wd DISSECT
>
Thanks, Henry.
On Mon, 4 Nov 2019, 21:07 Henry Rich, wrote:
> It sounds like you might be planning to look into running dissect on
> android. I will support you as much as I can. Let me know what you find.
>
> Henry Rich
>
> On 11/4/2019 8:29 AM, Arnab Chakraborty wrote:
>
I got error in
wd DISSECT
In fact, there is nothing called DISSECT.
Produces value error if I type just DISSECT.
But DISSECT is indeed defined in line 1160 of dissect.ijs, and then updated
in line 1230.
How can this be?
On Tue, 5 Nov 2019, 17:28 Arnab Chakraborty, wrote:
> Thanks, He
Dear all,
Here is a behavior that I noticed only recently, and it puzzles me a
lot:
Let's say abc and xyz are not defined in my J session, and type just abc
by itself in a line. Of course, I get a value error. But if I type
xyz abc
then J does not produce any error, but simply echos back
Thank you so much. Now I understand.
On Wed, 6 Nov 2019, 22:38 Henry Rich, wrote:
> Even without recursion during execution, defined inverses naturally need
> to refer to undefined names:
>
> action =: (...) :. inverse
> inverse =: (...) :. action
>
> Henry Rich
>
> On 11/6/2019 12:03 PM, Raul M
, 5 Nov 2019, 18:48 Henry Rich, wrote:
> You need to learn about J Locales.
> https://code.jsoftware.com/wiki/Vocabulary/Locales
>
> DISSECT is defined in the locale dissect, so you would look at it with
>
> DISSECT_dissect_
>
> dissect uses locales and paths exten
locale and which eventually run wd'pc ...'
>
> Users can't call wd'pc ...' directly to create a new form.
>
> On Thu, Nov 7, 2019 at 1:49 PM Arnab Chakraborty
> wrote:
> >
> > I now have a better understanding of locales, and can poke around more
> >
Dear all,
I am trying to implement a geometric algebra system in J. I have done
much of the stuff, but is getting stuck at one point. Hence this email.
Basically, I have a list of boxes like
v1=: (<2.3; 2 3 4), (<3.9; 1 2), <3.1; 2 3 4
This represents a (multi)vector whose math representatio
s pairs. It seems
> to me that a table of two columns would be a more natural expression
> of that, if that's the case.
>
> Thanks,
>
> --
> Raul
>
>
> On Mon, Nov 25, 2019 at 11:12 AM Arnab Chakraborty
> wrote:
> >
> > Dear all,
> >
> >
Thank you all so much for all your excellent suggestions. In fact, Bo's
idea was what I started with. But two things (not mentioned in my original
mail) prevented me from using that approach. First, my vector space has 32
dimensions, and most of my vectors will be sparse. Second, I have a
somewhat
Dear all,
I am about to teach a course on numerical analysis to freshmen. I planned
on using Jandroid as a classroom calculator for demonstration purposes that
the students can use along with me.
My (not so deep) knowledge of J is based on version 8 only. As I understand
J901 is quite different f
on't be any more update to j807 jandroid therefore it is
> better migrating to j901 to get bug fixes of j engine.
>
> That said I'm not familiar with the calculus part, so that you better check
> and discuss with others first you decide.
>
> On Sun, Dec 15, 2019, 3:15
t;
> >> if that helps. We'll need a jandroid expert - Bill?
> >>
> >> Henry Rich
> >>
> >>
> >> On 12/15/2019 10:05 AM, Arnab Chakraborty wrote:
> >>> Thanks to everybody for the encouraging words. I tried to install
> >>>
Dear all,
Started migrating to j901 in Android.
Uninstalled earlier version, installed 901. Perfect! Typed i.9 It worked as
expected.
Went to Tools>Pacman and oops
|file name error
| ((p2+{.p1)}.pp)1!:2http://www.jsoftware.com/forums.htm
Moving to 901.
On Mon, 16 Dec 2019, 22:41 Henry Rich, wrote:
> So, Arnab, does your phone have an old regex addon lying around? Sounds
> like you should delete it if so.
>
> Henry Rich
>
> On 12/16/2019 11:35 AM, chris burke wrote:
> > regex was changed to PCRE2 in j807.
> >
> > jregcomp is fro
gt;
> On Tue, Dec 17, 2019, 4:15 PM Arnab Chakraborty wrote:
>
> > Dear all,
> >
> > Started migrating to j901 in Android.
> > Uninstalled earlier version, installed 901. Perfect! Typed i.9 It worked
> as
> > expected.
> > Went to Tools>Pacman and
I checked from my laptop:
I start from www.jsoftware.com > Get started > Installation > J901 release
> J901 link > apk link > Jandroid instructions link > jandroid.apk link has
URL
http://www.jsoftware.com/download/*j807*/install/jandroid.apk
On Tue, Dec 17, 2019 at 2:34
I must be missing something obvious, but I do not seem to be able to find
jandroid.apk for j901. All I get is j807. Please help.
Thanks a lot.
On 17 Dec 2019 16:51, "Arnab Chakraborty" wrote:
I checked from my laptop:
I start from www.jsoftware.com > Get started > Installatio
Programming, <
> > programm...@jsoftware.com> wrote:
> >
> > > Oh wow. Just stumbled across this myself.
> > > FWIW, doing the dumb thing by copying the url and changing 807 to 901
> does
> > > work.
> > >
> > > Arnab Chakraborty wrote:
> &g
Dear all,
I want to find the position (i,j) of the min entry in a n by n matrix.
My current solution is
((=<./),mat )#"1 2,/(i.n),"0/i.n
Is there a smarter method?
--
For information about J forums see http://www.jsoftware.com/
wow!
On Thu, 26 Dec 2019, 10:43 Henry Rich, wrote:
> argmin =: $ #: (i. <./)@,
>
> This is a standard APL idiom.
>
> Henry RIch
>
> On 12/26/2019 12:01 AM, Arnab Chakraborty wrote:
> > Dear all,
> >
> > I want to find the position (i,j) of the min en
;argminall =: $ #: I.@(= <./)@,
> >argminall 3 3$5
> > 0 0
> > 0 1
> > 0 2
> > 1 0
> > 1 1
> > 1 2
> > 2 0
> > 2 1
> > 2 2
> >
> >
> >
> > On Thu, Dec 26, 2019 at 8:23 PM Arnab Chakraborty
> >
The best source of info on special code or Combinations that I know of is
> here:
>
> https://code.jsoftware.com/wiki/Vocabulary/SpecialCombinations
>
> On Sun, Dec 29, 2019 at 1:59 AM Raul Miller wrote:
>
> > On Sat, Dec 28, 2019 at 7:38 AM Arnab Chakraborty
> > wr
Dear all,
load 'plot'
plot i. 7
CRASH!
--
For information about J forums see http://www.jsoftware.com/forums.htm
Did a fresh Uninstall download install cycle. Tried tools>pacman
got
|limit error: fixlibs
| siz=.<&>0".(ndx+1)}.&>fls
On Wed, 1 Jan 2020, 11:02 bill lam, wrote:
> it works for me. what's your JVERSION?
>
> On Wed, Jan 1, 2020, 1:13 PM A
commandline doesn't help, either:
load'pacman'
install 'math/calculus'
Updating server catalog...
|limit error: fixlibs
| siz=.<&>0".(ndx+1)}.&>fls
On Wed, 1 Jan 2020, 13:13 Arnab Chakraborty, wrote:
> Did a fresh Uninstall download in
, 13:16 Arnab Chakraborty, wrote:
> commandline doesn't help, either:
>
> load'pacman'
>install 'math/calculus'
> Updating server catalog...
> |limit error: fixlibs
> | siz=.<&>0".(ndx+1)}.&>fls
>
> On Wed, 1 Jan
jal/j901/revision.txt'
a2=: 11!:4000'http://www.jsoftware.com/jal/j901/jal.tar.gz'
then check
a1
234
$a2
16104
128!:6 a2
75c5a3de1aee72870518799ab72d129dcd8ea9ab
Wed, 01 Jan 2020, Arnab Chakraborty написал(а):
>JVERSION
> Engine: j901/j32/android
> Re
can
check.
On Wed, 1 Jan 2020, 15:23 bill lam, wrote:
> Does this succeed in a fresh session?
>
> load'pacman'
> 'update'jpkg''
>
> Wed, 01 Jan 2020, Arnab Chakraborty написал(а):
> > Thanks for helping me, Bill.
> >
> > a1, a2 ok.
&g
jandroid.apk
https://drive.google.com/file/d/1-RnK3suQNJnXdg4qpSbhI1KrTXuiCdjL/view?usp=drivesdk
On Wed, 1 Jan 2020, 15:39 Arnab Chakraborty, wrote:
> I did file>exit in j session, started a new session :
>
> load'pacman'
>'update'jpkg''
k into it.
>
> Wed, 01 Jan 2020, Arnab Chakraborty написал(а):
> > I did file>exit in j session, started a new session :
> >
> > load'pacman'
> >'update'jpkg''
> > Updating server catalog...
> > |limit error: fix
Thank you SO MUCH, Bill! The update is working fine now.
You have really given a happy new year to me!
Happy new year!
On Fri, Jan 3, 2020 at 12:33 PM bill lam wrote:
> An update of jandroid j901 available to fix armv7
> issue reported. Please update using
> tools > check new version
>
> work
Dear Skip,
Creating a file called startup.ijs in the
~config folder works for me.
Best.
Arnab
On Wed, 8 Jan 2020, 07:02 Skip Cave, wrote:
> Where is the Jandroid startup file located, how do I access it, and how do
> I edit it?
>
> Also, the latest Jandroid install was simple & painless. Ku
.
On Wed, 8 Jan 2020, 14:59 Arnab Chakraborty, wrote:
> Dear Skip,
>
> Creating a file called startup.ijs in the
> ~config folder works for me.
>
> Best.
>
> Arnab
>
> On Wed, 8 Jan 2020, 07:02 Skip Cave, wrote:
>
> > Where is the Jandroid startup file lo
My first idea was to use ^: . But I am unable to get a solution. None of
the posted solutions use ^: either. Just wondering whether ^: can help here.
On Thu, 16 Jan 2020, 12:36 'robert therriault' via Programming, <
programm...@jsoftware.com> wrote:
> It is too late, considering the result is not
Dear all,
After loading calculus etc,
(]*]) deriv 1
works fine. But
(*~) deriv 1
gives domain error. Same error whenever the function to be differentiated
has ~ in it.
Is this a bug?
Thanks.
--
For information about J forums
y opinion. Well, as has
> > been said, this code is now in the library and if any of us can
> > provide a correct implementation, please to do so.
> >
> > On 1/23/20 7:00 AM, programming-requ...@forums.jsoftware.com wrote:
> >> Date: Thu, 23 Jan 2020 16:
Dear all,
sin deriv 1
works fine. So do
sin deriv 9
though the output is horrendously complex.
sin deriv 40
gives domain error. Last, but not the least,
sin deriv 10
crashes after some delay.
JVERSION
Engine: j901/j32/android
Release-c: commercial/2020-01-12T21:36:27
Library: 9.01.19
J An
One of the students in my class is facing the same problem. J901, Android
5, crash on start.
On 2 Feb 2020 22:24, "bill lam" wrote:
It is very difficult to diagnosis for crash on start.
There is logcat output but users usually can't see it.
You may search for logcat in Google Play.
Sun, 02 Feb
2. Android version 5.0
> >> 3. Api level 21
> >> 4. Kernel architecture: armv7l
> >>
> >>
> >> 04.02.2020 10:25, bill lam пишет:
> >>> Can you run CPU-Z or similar to check the following,
> >>>
> >>> cpu model
> >>>
Dear all,
For my class of about 30 students armed with JAndroid 901, I had planned to
use ?. to generate a random matrix which should be same for everybody. To
start with, I asked everybody to try
?. 100
Some got 46, others got 93. No other values. Next, someone noticed that if
they repeatedly t
;
> > > On 7 Feb 2020, at 12:14 am, 'Pascal Jasmin' via Programming <
> > programm...@jsoftware.com> wrote:
> > >
> > > The initial seed is the same each time you start J.
> > > ?. differs on 32 and 64 bit systems, with default generator.
Dear all,
Just wondering if the correct defn of sin shouldn't be
sin=:1&o."0
instead of
sin=:1&o.
which has rank infinity.
With the rank infinity definition +/@sin behaves just like +/@:sin
But, ideally, +/@sin 4 5 should be a list of two numbers, while +/@:sin
should be their sum.
Just
oop.
> >>>>>>
> >>>>>> +"n does not have IRS. +"n"n2 does need a rank loop.
> >>>>>>
> >>>>>> +/@:*"1 has IRS, but +/@:* does not - that's how they're coded.
> >>>>
Dear all,
While teaching numerical analysis using J for half a semester (then
COVID started), I have amassed some J code chunks that do something useful,
while avoiding J magic as much as possible. I thought I would turn them
into a simple J tutorial that might benefit other newcomers like myse
tps://arnabc74.github.io/jsoft/j2.html has
> somehow been truncated (or, at least, it seems to end with an
> incomplete sentence).
>
> But I suppose these pages are still drafts? After all "It is still
> growing."...
>
> Thanks,
>
> --
> Raul
>
> On Mon, Ja
I could not find any doc on {{ and }} as Raul has used. Any pointer?
On Tue, 19 Jan 2021, 22:26 Raul Miller, wrote:
> insertbefore=:{{
> 'a b'=. y
> (x{.b),a,x}.b
> }}
>
> insertafter=: {{ (x+1) insertbefore y }}
>
> 2 insertafter "1 [ 10;"1 n
> 0 1 2 10 3 4
> 5 6 7 10 8 9
>
> FYI,
>
> -
n
>
> On Wed, 20 Jan 2021, 22:32 Arnab Chakraborty, wrote:
>
> > I could not find any doc on {{ and }} as Raul has used. Any pointer?
> >
> > On Tue, 19 Jan 2021, 22:26 Raul Miller, wrote:
> >
> > > insertbefore=:{{
> > > 'a b
ee it appears to be correctly linked from the website and
> I have it installed.
>
> On Thu, 21 Jan 2021, 00:54 Arnab Chakraborty, wrote:
>
> > Aha, nice feature. However, J902 is still not available for Android.
> >
> > On Wed, 20 Jan 2021, 17:14 Ric Sherlock, wrote:
Now I have 902 in phone. Thanks
On Wed, 20 Jan 2021, 19:16 Arnab Chakraborty, wrote:
> Oops. I have j901 in my phone. When I tap Tools > Check new version, it
> says 'already up to date'. I did not check the website directly. Should
> have.
>
> Thanks for pointing
79 matches
Mail list logo