27;5 (4 : ''C'' + 4 : ''C'' + 4 : ''C'' + * 3 : ''C=: y''@:+
***) >: i.1000'
2.5e_5 63232
the 2nd line uses M. which doesn't seem to create an improvement in this case.
- Original Mes
exploring i: with j parameters is very impressive.
it creates equal intervals from -xj to xj.
even jy will include 0 in the interval list.
i: 10j3
_10 _3.3 3.3 10
i: 10j4
_10 _5 0 5 10
I can understand not including a i. definition, bc if you wanted
0 5 10
should you call i. 1
f I ask for a step size which clips
off the ending point, I will not see it in my results. And, there's nothing
really wrong with using i. directly. Still, this kind of thing can be fun
to play with.
Thanks,
--
Raul
On Fri, Mar 21, 2014 at 9:11 AM, Pascal Jasmin wrote:
> explori
one of the comments at your link is
> Update: even access to enclosing function's local vars is not always correct:
J cannot access local vars from outside a function, and local vars only exist
in functions. module level (locale) vars exist within that scope.
J's function parameters are fixed b
in step 2, can you tell us what J sees as the y argument for 1 command and 2+
commands?
it sounds like the output of that function the full sequence of moves? (using
cached previous moves)?
- Original Message -
From: Brian Schott
To: Programming forum
Cc:
Sent: Saturday, March 22, 2
> how would J know how to parse the multiplecommands differently from the way
>it is presently
you could have a ; separator for commands?
';' cut 'fd 20 ;rt 55'
+--+-+
|fd 20 |rt 55|
+--+-+
';' cut 'fd 20 '
+--+
|fd 20 |
+--+
in terms of overall design, having js rend
appologies if I misunderstand,
If your js paint event took the full list of commands, then you wouldn't have
these problems, IMO, and would solve the issue of general repaints being
sometimes required for other reasons.
If I understand your design, if the jhrajax received a list, updated the js
so you are sending 3 js draw events with fd 10 each. If you sent a list of
commands just once, you'd agree the problem would go away?
maybe you are parsing the text box in js, and then sending individual commands
to J instead of letting J parse the text input? If you did the latter, it
should
Here are additions I've made to datetime.ijs (addons/type)
utcnow_z_ '' returns utc time tested on mac and windows.
a question about 6!:0 ... when DST changes, will it report the changes without
reloading J? Some OS change the time automatically, while others ask to change
clock, or do they all
date{"1 tzinfo NB. read SYSTEMTIME structures
tzinfo=. tmp (
To: "programm...@jsoftware.com"
Cc:
Sent: Tuesday, March 25, 2014 8:48:44 PM
Subject: Re: [Jprogramming] datetime utc mod
there should be some api in libc or windows dll to get utc time directly IIRC.
26.03.2014, в
ture date and will need a
database to store previous years' timezone and daylight records.
26.03.2014, в 9:02, Pascal Jasmin написал(а):
> oops I forgot to include the windows dll call.
>
> this approach calculates the offset to utc once on load, and the uses the
> offset as an adj
l?
Don Kelly
On 25/03/2014 5:48 PM, bill lam wrote:
> there should be some api in libc or windows dll to get utc time directly IIRC.
>
> 26.03.2014, в 2:30, Pascal Jasmin написал(а):
>
>> Here are additions I've made to datetime.ijs (addons/type)
>>
>> utcnow_
f =: 1 0 1
list =: 2;'a';3
as a simple example verb, +: is used. The verb is of no actual interest. Only
the adverb.
I would like an adverb that produces
4 1 6 -: 1 0 1 +: adv 2 1 3
1
or more advanced,
4 ;'a'; 6 -: 1 0 1 +: adv 2;'a'; 3
1
It is NOT AN OPTION to query the list as part
found it:
1 0 1 (+:@:])^:[ each 4;'a'; 6
┌─┬─┬──┐
│8│a│12│
└─┴─┴──┘
1 0 1 ]`(+:@:])@.[ "0 ] 4 1 6
8 1 12
- Original Message -----
From: Pascal Jasmin
To: Programming forum
Cc:
Sent: Thursday, March 27, 2014 8:17:06 PM
Subject: [Jprogramming] apply verb t
Some utilities for using base128 encoding to compress numeric lists. For
extended precision numbers, this achieves 20x+ space efficiency, and is
reasonably fast, so its something that is at least appropriate for internet
transmission, and near breakeven for intranet and disk transmission. It c
well done,
the tacit version:
(] !"1 +/~) i.11
- Original Message -
From: Bo Jacoby
To: "programm...@jsoftware.com"
Cc:
Sent: Friday, March 28, 2014 3:23:06 AM
Subject: Re: [Jprogramming] Applied APL - How to think like an APL
programmer?
"his table on page 105 looks interest
Interesting how it doesn't work for sparse arrays. I thought it was impossible
to have boxed elements in sparse arrays, but: (j7)
<@afd"0 $. 0 0 4 0 3
2 │ ┌─┐
4 │ │\004│
│ ├─┤
│ │\003│
│ └─┘
it compresses to an answer, but that answer seems wrong. You can use
compresslr on the sparse
the difficlty I was having was that @.1 0 1 or ^:1 0 1 are errors or weird,
even when I try to turn the noun into a verb that should produce identical
result to [.
+:^:(1 0 1"_ 1) 2 1 3
4 2 6
2 1 3
4 2 6
Its hard to understand the magic of ^:[ , but a side effect is that a dyadic u
(that
Jqt uses menlo as default font. Printing binary data over 127 all produce
identical "not found" glyphs. Is it a font issue? and is there a fixed width
font that would display extended ascii as this list (or as much of it as
possible)? iso-latin 1? Is there some informal code page that shows
ll print at
the bottom of each cell).
Thanks,
--
Raul
On Fri, Mar 28, 2014 at 9:48 AM, Pascal Jasmin wrote:
> Jqt uses menlo as default font. Printing binary data over 127 all produce
> identical "not found" glyphs. Is it a font issue? and is there a fixed
> width font
ave a
lot to do with why we are using ascii instead of ebcdic.
Thanks,
--
Raul
On Fri, Mar 28, 2014 at 11:04 AM, Pascal Jasmin wrote:
> thank you Raul,
>
> On further thought, it appears to be impractical to use larger than base
> 128 for binary encoding.
>
> A friendlier
game is evil timewaster. Some thoughts were here:
http://stackoverflow.com/questions/22342854/what-is-the-optimal-algorithm-for-the-game-2048.
The key implementation detail is that new tiles are in a random location with
90% probability of 2 and 10% of 4.
heuristics that work:
keep largest
cannot distinguish between textual and binary data, meaning the
sum scan would displayed as
+/\\ i.5
29.03.2014, в 0:11, Pascal Jasmin написал(а):
> J stores the full 8 bits of binary data. There very well may be a great
> reason not to provide a friendly display for binary data, I just don&
is another issue.
How j ide interpret and display box characters is yet another issue.
29.03.2014, в 10:53, Pascal Jasmin написал(а):
> j7 (gtk) displays octal for binary data it decides that it can't print. J8
> and jhs shows a pretty glyph in the same font, but its the same glyph
? -display binary data
I cannot understand your problem, you said lucida console workes
and then said it cannot display extended ascii. May be you can
show some J script with envioronment detail to reproduce the
problem and post screen-shots some where else.
Пт, 28 мар 2014, Pascal Jasmin писал(а
rather than something that appeared to be
valid. ymmv.
29.03.2014, в 12:35, Pascal Jasmin написал(а):
> 4 64 $ a.
>
> does not display extended ascii with any font.
>
> u: 4 64 $ a.
>
> does with the default font and many others.
>
>
> - Original Message --
encoding
-tries to explain unicode and utf-8 in beginners' terms. But even there I
see a mistake: it occasionally uses the word "glyph" when it should be
using "grapheme".
Still, it's a start.
On Fri, Mar 28, 2014 at 4:11 PM, Pascal Jasmin wrote:
> J stores the full 8
not tested, but see layout (bin) params near top of this page
http://www.jsoftware.com/jwiki/Guides/Window%20Driver/Command%20Reference
bin s 1 should stretch controls with form?
- Original Message -
From: Lippu Esa
To: 'Programming forum'
Cc:
Sent: Saturday, March 29, 2014 10:16:28
f J stops you displaying a string of possible superasciis, S,
in latin-1. Just use (u: S).
On Sat, Mar 29, 2014 at 3:21 PM, Pascal Jasmin wrote:
> Your explanation is very helpful, Ian, but if I may question its accuracy
> for a moment:
>
> utf8 displays "extended ascii"
} is an adverb.
~ is a demon from hell for errors in that it can do one of 3 things (passive,
reflex, evoke), and often its one of the other 2 than you intended. (here you
were assuming it would do passive). I'm not 100% positive which of the other 2
it actually gets parsed at here.
-
Pascal invoked Astaroth
Astaroth was invoked by Pascal
[do not try this at home]
[1] "Why was ~ on a dyadic verb named "passive"?
http://www.jsoftware.com/pipermail/general/2007-May/030070.html
Sent from my iPhone
> On Mar 30, 2014, at 8:31 AM, Pascal Jasmin wrote:
>
> } i
literally invisible) way.
To let adverbs and conjunctions and adverbs operate piecewise (in a
straightforward way), we'd need some kind of meta-" that could take operators
as arguments, but currently no wordclass in J has higher precedence (binding
power) than adverbs and conjunctio
straightforward, non-intrusive (often
> literally invisible) way.
>
> To let adverbs and conjunctions and adverbs operate piecewise (in a
> straightforward way), we'd need some kind of meta-" that could take
> operators as arguments, but currently no wordclass in J has higher
tion of how rank applies "within" an operator, and this
expectation does not match the (current) implementation of J. That's what I was
driving at when I related them.
For example, compare:
{ b. 0. NB. Left rank zero: treat each box or atom on the left independently
1 0 _
(+:@:
nt definition allows us to express u@{`[`] } , but
> redefining v0`v1`v2} as (v0 v1 ])`v1} would preclude us from writing
> everything the current definition permits, which would be a loss of
> generality I (personally) would not accept.
>
> PPS: the confusion on both ^:(1 0 1"
a better candidate for the
interpretation of the monadic verb m} with a comparison of benefits and
drawbacks, or a really strong argument for why m}y should be changed to an
error. Any change at all (redefinition or "de"-definition) would have to be
worth breaking backwards compatibility -
that is pretty cool. Maybe a better name than fn is def.
Something I use a lot is 3 : 'MYNOUN or expression that doesn't use y' in order
to be evaluated only when called. (which I see you have incorporated)
You can probably also do
( : 0) fn
expression
)
your definition would fail for '+ y
on related note, the installer lab fails even in J602 on windows (executable
can't find J.exe), but it gets much less far in j QT, as the project doesn't
open/get created.
in Jqt, an annoyance, project manager will also close all open source files.
As best as I understand it (probably very litt
Jqt, an annoyance, project manager will also close all open source
files.
What do you mean?
There are menu items to close all open files, as well as open all source
files.
On Fri, Apr 4, 2014 at 9:26 AM, Pascal Jasmin wrote:
> on related note, the installer lab fails even in J602 on w
. You want the editor state to be preserved
and reinstated with the project, and should not want the previous tabs
preserved when opening a project. It is easy to flip back and forth between
projects, and hence between different sets of open files.
On Fri, Apr 4, 2014 at 11:44 AM, Pascal Ja
the key to understanding &. is to first understand & , which has separate monad
and dyad understandings.
2 +&+: 3
10
2 +&.+: 3
5
the vi part can be called as v inv
2 + (2 : (':';'v inv (v x) u v y')) +: 3
5
it gets more complicated with nested ones, but you don't understand it t
if I modify the windows jqt.cmd file last line to:
start bin\jqt.exe %* (adding %*) (saving to jqt2.cmd)
trying to get consistent behaviour with
http://jsoftware.com/help/user/cmdline.htm
the line:
jqt2 "D:\j64-801\addons\demos\gldemo\basic1.ijs"
will correctly load the file after profile
apply does not work with dyadic verbs, and cannot produce modifiers. Consider
the following simple looking eval function.
eval =: 1 : ' a: 1 : m'
2 '+' eval 1 2 3
3 4 5
+ '/' eval 1 2 3
6
'+/' eval(+:@) 1 2 3
12
+:@+'/' eval 1 2 3
22
+: +'/' eval 1 2 3
12
(+: '
5
+ '3&' eval +'/' eval 1 2 3
9
so its not quite a true tacit expression in that its evaluated as a non train.
Can be interesting and/or easily avoided/made standard:
+: + '3&' eval +'/' eval 1 2 3
18
+: + '3&' eval
$ +`''
1
$ + ar=: 1 : '5!:1 <''u'''
EMPTY
what applications make `'' more useful than ar?
--
For information about J forums see http://www.jsoftware.com/forums.htm
y, April 5, 2014 7:30:23 PM
Subject: Re: [Jprogramming] jqt command line
It is the responsibility of your script file to handle arguments in ARGV.
In linux, it should be something like (untested)
#!/bin/sh
jqt "$@"
05.04.2014, в 22:48, Pascal Jasmin написал(а):
> if I modify the w
cmdline parameters should agree with the documentation.
>
> IMO AIO installer is more suitable for idiotic windows users
> like myself. ymmv.
>
> Сб, 05 апр 2014, Pascal Jasmin писал(а):
> > Without the change to jqt.cmd (adding %*) jqt doesn't see any ARGV.
> >
- Original Message -
From: bill lam
To: "programm...@jsoftware.com"
Cc:
Sent: Sunday, April 6, 2014 9:03:51 AM
Subject: Re: [Jprogramming] jqt command line
I suggest you install (if not yet) to see how it works.
06.04.2014, в 21:57, Pascal Jasmin написал(а):
> If I u
if the last line in the script is pname '' then it will run automagically on
load.
- Original Message -
From: Ray Zhao
To: programm...@jsoftware.com
Cc:
Sent: Sunday, April 6, 2014 9:23:47 AM
Subject: [Jprogramming] Need help on "super simple" keyboard input.
After learning J really s
, it works for
both version. You may try.
Вс, 06 апр 2014, Pascal Jasmin писал(а):
> It places the qt dlls in the bin folder, and so doesn't need to "find them",
> and leaves the qt folder nearly blank. The other version puts them in qt
> folder, and the only purpose o
regarding the downsides, Henry's immex trick solves the startup issues. If we
assume that the user is running the program on his own computer, then the
issues of potentially not following instructions are moot, since he could
refuse to run any program.
The upside to this approach is that the s
evocation f goal was to express the
utility
The idea
> On Apr 5, 2014, at 1:26 PM, Pascal Jasmin wrote:
>
> apply does not work with dyadic verbs, and cannot produce modifiers.
> Consider the following simple looking eval function.
>
> eval =: 1 : ' a: 1 : m'
>
veral
arguments), for example,
2 ('+/' apply ,) 3
5
PPS. For the record: perhaps apply (128!:2) should not produce adverbs or
conjunctions (or verbs); but, it can.
On Sat, Apr 5, 2014 at 1:26 PM, Pascal Jasmin wrote:
> apply does not work with dyadic verbs, and canno
Its very cool to develop routines to treat delimited files as data. This can
make sense as large read only reference data, or generally low priority
"discardable" data. Your example might be a file that is generated by an
"expensive" other query process and will be replaced next time it is run
3 5 (0=|)"0 1 i.10
1 0 0 1 0 0 1 0 0 1
1 0 0 0 0 1 0 0 0 0
3 5 (0 ([: +./ =) |"0 1) i.10
1 0 0 1 0 1 1 0 0 1
3 5 (] #~ 0 ([: +./ =) |"0 1) i.10
0 3 5 6 9
+/ 3 5 (] #~ 0 ([: +./ =) |"0 1) i.1000
233168
- Original Message -
From: Jon Hough
To: "programm...@jsoftware.c
anks,
>
> --
> Raul
>
>
> On Mon, Apr 7, 2014 at 7:41 PM, Raul Miller wrote:
>
> > Note that you quoted this text:
> >
> > 2 ('+/' apply ,) 3
> > 5
> >
> > ;)
> >
> > Thanks,
> >
> > --
> > Raul
> >
If we define app as .ijs files, I assume its straightforward to place and run
.ijs files on android?
From: bill lam
To: "programm...@jsoftware.com"
Sent: Saturday, April 12, 2014 8:22:03 PM
Subject: Re: [Jprogramming] Can I write an Android App in J?
creati
install 'all' will do what you want. it's using packman. There is no upgrade
command, but I assume install also upgrades.
- Original Message -
From: Devon McCormick
To: J-programming forum
Cc:
Sent: Sunday, April 13, 2014 12:20:08 PM
Subject: [Jprogramming] Unable to get addons for
this gives consistent results accross 64 bit versions of J on windows (default
Mersenne Twister)
? 10 $ 100 [ 9!:1 ] 79 233 122
99 45 95 82 5 12 75 0 88 21
does it also give the same result on 64bit android osx linux?
On J6-32, there is a different result.
I notice that 9!:44 structure ap
Joe Bogner
To: programm...@jsoftware.com
Cc:
Sent: Wednesday, April 16, 2014 11:05:53 AM
Subject: Re: [Jprogramming] 32 and 64 bit compatibility for ? and 9!:1
Android results are different
? 10 $ 100 [ 9!:1 ] 79 233 122
69 66 18 2 40 41 94 12 72 87
On Apr 16, 2014 10:51 AM, "Pascal
$ 100 [ 9!:1 ] 79 233 122
99 45 95 82 5 12 75 0 88 21
It does look like there is different logic for 64 vs 32 bit:
https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/vrand.c#L204
vrand.c, look for: jtmt_init_by_array
On Wed, Apr 16, 2014 at 11:11 AM, Pascal Jasmin
here is code for rsa signing that uses CRT. Its not J-pretty because you/I
want to precalculate each of the CRT params. invmod is especially expensive.
nbSign =: 4 : 0
'pub priv' =. x
'pE N' =. pub
'd p q dp dq qi' =. priv
e=. N |s256 bighash ^:(2=3!:0) (3!:1)^:((0< L.) +. 1 < #) y
e1=. dp p&
inl_z_ =: (cocurrent@] ".@] [)"1 0
nv_z_ =: 3 : 'if. L. y do. ''(> ; 5!:5 )"0 nl 0'' inl y else. (] , [: < [: ,.
[: cutLF 5!:5)"0 nl y end.'
nv 0 1 2 3
will list in base locale 2 column boxed names with values or definitions.
nv_j_ 3
will list all verbs in the j locale (names and defs)
}:^:(a: = {:) 3 ; i.0
┌─┐
│3│
└─┘
(1 = $) }:^:(a: = {:) 3 ; i.0
1
(i.0) -: ${. }:^:(a: = {:) 3 ; i.0
1
so far so good, but:
${.^: (1 = $) }:^:(a: = {:) 3 ; i.0
1
why is shape not empty here?
--
For information a
ict adverb and that `a:` is
its argument that is not even used until eval is executed. I am pretty sure
that is right, because I tried to redefine eval as follows, as an
experiment, and got the undesirable, but informative result I show below.
Notice that I replaced a: with eval, and the final result o
=: 4 : ('(x) =: y eval';'1')
cols=: 'FName';'LName';'Age';'Company'
( (') # ]',~ '(= ' ,]) evalassign~ '_eq' ,~ ]) each cols
┌─┬─┬─┬─┐
│1│1│1│1│
└─┴─┴─┴─┘
FName_eq
eval(1 : '(=
that is much better than the defaults, but the sample is still misaligned
slightly in JHS and J6 (haven't tried other platforms)
- Original Message -
From: June Kim (김창준)
To: Programming forum
Cc:
Sent: Saturday, April 26, 2014 8:22:37 PM
Subject: Re: [Jprogramming] Unicode boxed disp
Unicode boxed display
There is a verb for translating a boxed data into a html table, though
incomplete yet, as I remember(I haven't been using it for a while). You may
want to search here or the jwiki.
sent from an android phone
2014. 4. 27. 오전 8:11에 "'Pascal Jasmin' via Prog
hi again everyone,
I seem stuck in how to do the following:
update a list of boxes y at field 0 with list of replacement values x.
The closest I've gotten is:
( 1 2 3) (0})("0 1) L:0 (0 1 ; 2 3 ; 4 5)
That produces a 3 x 3 array of boxes, with the diagonal the right answer. The
result I wa
13 12:19:36 PM
Subject: Re: [Jprogramming] updating a list of boxes
( <"0]1 2 3) (0})("0 1) L:0 (0 1 ; 2 3 ; 4 5)
+---+---+---+
|1 1|2 3|3 5|
+---+---+---+
On Mon, Aug 19, 2013 at 10:10 AM, Pascal Jasmin wrote:
> hi again everyone,
>
> I seem stuck in how to do the f
apologies if this issue is well known,
If you use a bivalent verb definition such as
v =: 3 : 0
(default; params) v y NB. just delegates to dyadic implementation
:
dyadic implementation
)
then calling it monadically is 1000x+ slower than calling it dyadically, or by
changing the definition t
Aug 23, 2013 at 9:11 PM, bill lam wrote:
> Can you give a detail account of how you tested the performance?
>
> Пт, 23 авг 2013, Pascal Jasmin писал(а):
> >
> >
> > apologies if this issue is well known,
> >
> > If you use a bivalent verb definit
looking at the code for this lab
http://jsoftware.com/jwiki/JWebServer/EventHandler
there is a line like:
('in',":server)=: 'httpAccept ',":server
which I understand builds into something like:
in0 =: 'httpAccept 0'
which will later be fed to ". (do) to run, and seems fairly clever. Its not
at data are probably best kept as parallel arrays or
table elements.
From: Raul Miller
To: Programming forum
Sent: Sunday, September 1, 2013 6:05:57 PM
Subject: Re: [Jprogramming] OOP programming - building method/field access
On Sun, Sep 1, 2013 at 12:08 AM, Pascal
I'm trying to get sha256 from microsoft's library working.
MS documentation on the last call in my function:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa379947(v=vs.85).aspx
The problem is that the 3rd param to CryptGetHashParam is a pointer to a byte
array, and should hold the ha
p; cd
>> err =. CryptCreateHash (>
>> and I don't understand why this doesn't give an error on parameters a
>> and h. They correspond to *i descriptors, but they are scalar boxes. I
>> thought they needed to be scalars, so I would use
>>
>> err =. Cry
CryptCreateHash ( >>
> >> and I don't understand why this doesn't give an error on parameters a
> >> and h. They correspond to *i descriptors, but they are scalar boxes. I
> >> thought they needed to be scalars, so I would use
> >>
> >> err =.
om
Cc:
Sent: Friday, September 6, 2013 11:44:44 AM
Subject: Re: [Jprogramming] SHA 256
I googled found that sha256 needs aes provider. I'm not sure if
that will need privilege, please try it by yourself.
[1]
http://nagareshwar.securityxploded.com/2010/10/22/cryptocode-generate-sha1sha256-ha
│c2│
├──┼──┼──┼──┼──┼──┼──┼──┤
│b7│65│44│8c│86│35│fb│6c│
└──┴──┴──┴──┴──┴──┴──┴──┘
- Original Message -
From: Pascal Jasmin
To: "programm...@jsoftware.com"
Cc:
Sent: Friday, September 6, 2013 12:40:56 PM
Subject: Re: [Jprogramming] SHA 256
Thank you bill and joe and ever
I noticed that there is no special code for any of the following: (J7-64)
a =. ? 1e6 # 256
ts '2 2 2 2 2 2 2 2 #: a'
0.124369 6.71107e7
ts '4 2 4 2 4 2 #: a'
0.0943141 6.71105e7
a2 =.? 1e6 # 256^2
ts '8 8 4 2 4 2 4 2 #: a2'
0.144685 6.71107e7
a3 =.? 1e6 # 1-~256^4
a2 =.? 1e6
One improvement especially if you don't need the full unpacked byte results:
ts '1 2 4 8 16 32 64 128 (17 b.)"0 1 a'
0.0612363 6.71123e7
ts '12 32 128 (17 b.)"0 1 a'
0.0217824 3.35572e7
ts '12 (17 b.) a'
0.00643105 8.39066e6
----- O
Surely not a good reason :) ty for pointer.
- Original Message -
From: Roger Hui
To: Programming forum
Cc:
Sent: Wednesday, September 11, 2013 10:20:05 PM
Subject: Re: [Jprogramming] bit fields
Do you avoid monadic #: for some reason?
--
An essay on boxed vs unboxed table data.
http://www.jsoftware.com/jwiki/PascalJasmin/Boxed%20vs%20unboxed%20data .
The results might surprise most of you since there's been signficant
performance tuning in J (around boxing) since its earlier days, and jmf and
3!:1 supports boxed data too now
882e7
>
> Things that can influence timing include the version of the
> interpreter, the make of the cpu and the amount of available memory
> (compared to what's being used in the timing). Here, though, we're
> only using 10MB for intermediate results, which is relativ
; ts '0 1{"1 ] 10 10 $ a'
>> 0.00194 1.04882e7
>>
>> Things that can influence timing include the version of the
>> interpreter, the make of the cpu and the amount of available memory
>> (compared to what's being used in the timing). He
tacit almost always relies on hooks and forks. The word almost can probably be
removed.
[: is still part of a train (hook or fork) even if it lets you "break out of
the fork parsing rules". @: or @ is the most common way to apply 2 verbs
together, but the whole u@:v is still part of a "fork s
I updated that essay today.
Looking at something like histogram=: <: @ (#/.~) @ (i.@#@[ , I.)
To get you started,
is it a fork or a hook? (its a 3 verb fork)
Is it meant to be called monadically or dyadically? (I see a [ so probably
dyad.. though it could still produce something interest
(( 3 : 'smoutput ] y') 'asd'), 'asdf'
asd
asdf
I was expecting:
(( 3 : ' y') 'asd'), 'asdf'
asdasdf
j7-64.
--
For information about J forums see http://www.jsoftware.com/forums.htm
7;smoutput ] y') 'asd'), 'asdf'
asd
1 4
FYI,
--
Raul
On Mon, Sep 16, 2013 at 8:47 AM, Pascal Jasmin wrote:
> (( 3 : 'smoutput ] y') 'asd'), 'asdf'
>
> asd
> asdf
>
>
> I was expecting:
>
> (( 3 : ' y')
6 (3}"1) i.4 5
0 1 2 6 4
5 6 7 6 9
10 11 12 6 14
15 16 17 6 19
+: (3}"1) i.4 5
6 16 26 36
I'd wish for the result to return the full row/table as the first amend. I'd
also like the code to the left of the amend to not know how many rows there
are. There is possibly a gerund appr
Cc:
Sent: Thursday, September 19, 2013 2:00:16 PM
Subject: Re: [Jprogramming] Amend trickiness
On Thu, Sep 19, 2013 at 12:02 PM, Pascal Jasmin wrote:
> 4 5 $ (+:@(3&{)"1 sel} ,) i. 4 5
> 0 1 2 6 4
> 5 6 7 16 9
> 10 11 12 26 14
> 15 16 17 36 19
>
> is t
programm...@jsoftware.com
Cc:
Sent: Thursday, September 19, 2013 12:42:25 PM
Subject: Re: [Jprogramming] Amend trickiness
perhaps this one
3 (<"1@(,.~i.@{.@$)+:@{`[`]} ])i. 4 5
or this one
3 +:@{`[`]}&.|: i. 4 5
On 19-09-13 18:02, Pascal Jasmin wrote:
> 6 (3}"1) i.4 5
> 0 1
havior of 2 3&{ in this context might be a bit
surprising if you have oversimplified your understanding of 0 1&{
--
Raul
On Thu, Sep 19, 2013 at 2:25 PM, Pascal Jasmin wrote:
> Thank you Raul,
>
> The other challenge... placing in column 3 the result of op on first 2
>
no.
----- Original Message -
From: Pascal Jasmin
To: "programm...@jsoftware.com"
Cc:
Sent: Thursday, September 19, 2013 12:02:43 PM
Subject: [Jprogramming] Amend trickiness
6 (3}"1) i.4 5
0 1 2 6 4
5 6 7 6 9
10 11 12 6 14
15 16 17 6 19
+: (3}"1) i.4 5
6 16
ing forum
Cc:
Sent: Friday, September 20, 2013 3:40:38 PM
Subject: Re: [Jprogramming] Amend trickiness part 2
On Fri, Sep 20, 2013 at 3:37 PM, Pascal Jasmin wrote:
> I would have hoped that the right approach was:
>
> 3 [L:0(2})`1:`]} |: <"1 |: i. 5 3
> ┌─┐
> │3│
> └
-+---+
|0 3 6 9 12|1 4 3 10 13|2 5 8 11 14|
+--+---+---+
Still... for these numbers, I think I'd much prefer something like:
|:3 (<2 1)} i.5 3
0 3 6 9 12
1 4 3 10 13
2 5 8 11 14
(It's just so much easier when you'
data, you might
consider using different names to hold the different pieces, rather
than putting it all in one array. The distinction is largely a matter
of taste, of course, but from my point of view simplicity is a virtue.
Does this help?
Thanks,
--
Raul
On Fri, Sep 20, 2013 at 4:42 PM,
{`} sides which
could be for example {"1`}"1 or {L:0`}L:0
Thank you Raul and Aai for your help.
- Original Message -
From: Raul Miller
To: Programming forum
Cc:
Sent: Saturday, September 21, 2013 12:50:48 AM
Subject: Re: [Jprogramming] Amend trickiness part 2
On Fri, Sep
dt 2 _1: amdt ]) amdt i. 5 5
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
_2 16 _1 18 19
20 21 22 23 24
3 4 5 ((-&32)&.(a.&i.)) amdt 'abcdefgh'
abcDEFgh
On Sun, Sep 22, 2013 at 8:48 AM, Pascal Jasmin wrote:
> Here is what seems to me a much easier/saner version of amend to use
I noticed that some of you have been looking for or talked about a YAML
implementation. J actually has a great portable format built in with 5!:5,
though maybe there needs a human readable output that could be as simple as
indenting after <.
Here are some verbs for working with key,value data
201 - 300 of 1942 matches
Mail list logo