the new version.
Henry Rich
On 4/21/2019 2:57 PM, Eric Iverson wrote:
J901-beta-d is available as a zip install package for windows/mac/linux.
Get your zip install package:
https://code.jsoftware.com/wiki/System/Installation/Zips
After your first install of J901 beta you will be able to do
Have a look at
/. 4 4 $ 'abcdefghijklmnop'
Henry Rich
On 7/10/2012 10:16 AM, Rudi Mann wrote:
Ian,
thanks for the solution!
Devon,
the CRLFs come from the fact that the data source was a text editor. I
imported the file as string and wanted to reshape it into a character
matrix
The problem with
2 : 'u@:v : (u v)'
is that it repeats u and v . If you are try to build a big bivalent
verb, u and v may themselves include 2 : 'u@:v : (u v)', and after a few
levels of this repeated doubling you get very long verbs indeed.
Henry Rich
On 7/9/2012 11:00 AM, Andrew Nikitin
You defined a conjunction that produces only a monadic valence. Try
toy =: 2 : 0
:
z =: u v ''
x + y
)
Henry Rich
On 7/7/2012 2:38 PM, Max Harms wrote:
toy =: 2 : 0
z =: u v ''
x + y
)
--
For information about J forums
Here's a session log
toy =: 2 : 0
:
z =: u v ''
x + y
)
[ toy ]
[ (2 : 0) ]
:
z=:u v''
x+y
)
5 [ toy ] 7
12
You gotta put in the colon :
Henry Rich
On 7/7/2012 3:18 PM, Max Harms wrote:
Tried it. Didn't work. Same result. (Perhaps because I'm using 701?)
- Max
On Sat, Jul 7
That's my 'bivalent':
u^:(1:`(]v))
Henry Rich
On 7/6/2012 7:13 PM, Don Guinn wrote:
It's always bugged me that nl ignored x and y. So, for the fun of it, I
thought I would try to make nl handle x and y. I pulled a lot of the code
of nl into a tacit expression so x and y would be handled
If you look at names you see
list_z_@nl
and if you look at nl there is a line
nms=. (4!:1 y) -. ;: 'x y x. y.'
So names doesn't report the names x and y. Seems reasonable.
Henry Rich
On 7/5/2012 4:20 PM, ed bierly wrote:
NB. http://www.jsoftware.com/docs/help701/learning/24.htm
(0
I think your theorem is true.
Same idea for in_tetrahedra, but using determinants to check sign:
int=:4 :'(-: 1|.)@(0!.0 *_1 1 _1 1)@(1((-/ .*)\.))2 ({ -1x)/ y'
Use intolerant comparison for sign checks to help make unique assignment
to cells on boundaries.
Henry Rich
On 7/3/2012 10:02
Regex version:
dolsub =: '\$[A-Z]*'(.@}. rxapply)
This just uses the current locale.
Henry Rich
On 7/2/2012 11:52 AM, Raul Miller wrote:
Some programming languages (unix shell, perl, php) provide a $
substitution mechanism where a literal string may contain embedded
variable references
To run a verb, you have to give it an operand, even if it doesn't use
one. Try
print ''
Henry Rich
On 6/29/2012 2:43 AM, Charles Pechacek wrote:
Hello
I have been trying to get a handle on the 'for.' control command, using a
little program taken from a
Pascal book, of which I have
I mean
humbug ''
Henry Rich
On 6/29/2012 2:43 AM, Charles Pechacek wrote:
Hello
I have been trying to get a handle on the 'for.' control command, using a
little program taken from a
Pascal book, of which I have written a script as follows:
load 'print'
humbug=: 3 : 0
for. : i.3 do
Go to
http://www.jsoftware.com/jwiki/Essays/Combinations
and use R. E. Boss's version, which appears just above the pretty
pictures. This gives combinations, not permutations, but there are 210
of them.
Henry Rich
On 6/26/2012 12:14 PM, ed bierly wrote:
what is the best way to get
Take the time to ponder R. E. Boss's version (in the Wiki). It is
beautiful, and I have tried without success to make any improvement.
$ 12 comb 24
2704156 12
In about 1 second.
Henry Rich
On 6/26/2012 8:54 PM, Linda Alvord wrote:
I wrote a book called Probability in APL many years ago
On 6/11/2012 9:34 PM, Raul Miller wrote:
-/ .* performs only one multiply.
Keep in mind that -/ .* is nothing like DET. It uses rules of linear
algebra to calculate a result in far less than O(!n) time.
Henry Rich
, rather than requiring a new DET?
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
to 4x4 matrices it won't get out of hand.
LAPACK is 3x faster for 4x4s, on my machine, 1e7x faster for 12x12.
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
will send you what I have if you like. The main point is, doing many
eigenvalue calculations in parallel may be a winner.
Henry Rich
On 6/12/2012 11:08 AM, Raul Miller wrote:
On Tue, Jun 12, 2012 at 10:41 AM, Henry Richhenryhr...@nc.rr.com wrote:
That may be. But no way do you do a determinant
matrix
ev =: 1 {:: p.@cpoly
This is going to run in time O(!n), in other words, small matrices only.
(It's barely faster than the boxed version and takes a little less
space, but neither version takes much space)
Henry Rich
On 6/10/2012 11:26 PM, Marshall Lochbaum wrote:
It looks like
Oh, that's the asymmetry of ; again! You'd have to use
(0;1;a:) { i. 2 2 3
Henry Rich
On 6/1/2012 2:38 AM, Steven Taylor wrote:
Thanks bob. That makes sense now.
(0;1;1) { i. 2 2 3
2
(0;1;1) { i. 2 2 3
3 5
(0;1;(0 2)) { i. 2 2 3
3 4 5
(0;1;(0 2)) { i. 2 2 3
3 5
I don't know that it has an official name. I called it multiple
assignment in JfC.
We have also the multiple AR assignment
'`plus minus' =. +`-
and the indirect assignment
names =. ;: 'one two'
(names) =. 1 2
Henry Rich
On 5/31/2012 12:24 PM, Steven Taylor wrote:
Hi,
just looking
Be it noted that u;.3 and u;._3, which are useful for filtering, should
be applied at rank 2 or lower, to avoid the construction of an expensive
intermediate table.
Henry Rich
On 5/30/2012 5:40 PM, Devon McCormick wrote:
Hi -
this is much clearer but I'm still not quite sure about
Yes, by design. It's so
1;2;3;4
produces what you want. There you don't need to box the last element
explicitly. Alternatives are (, ) and , . ; is midway between those.
Henry Rich
On 5/24/2012 1:48 AM, Steven Taylor wrote:
it's always puzzled me why it is necessary to box the last item
I have tracked this down to numeric dyad E. which seems to cause wild
stores to memory, sometimes wiping out data, sometimes scripts.
In our new open-source environment, how do bugs get fixed and released?
Henry Rich
On 4/24/2012 9:52 PM, Henry Rich wrote:
Working on R. E.'s latest problem, I
. this is the culprit -- y E. z
y
)
jtree =: ([: ~.@; joinroutes)/
If I uncomment the indicated line, I get a loop. That implicates
numeric dyad E. .
Henry Rich
On 4/25/2012 9:54 PM, Joey K Tuttle wrote:
Henry,
I get different errors from different versions of j (e.g. 32 vs 64 bit
J7
Can the graph contain a cycle? If so, what should be done?
Henry Rich
On 4/24/2012 11:47 AM, R.E. Boss wrote:
I would like to know other solutions.
And perhaps learn why it took me so long.
R.E. Boss
-Oorspronkelijk bericht-
Van: programming-boun...@jsoftware.com
Working on R. E.'s latest problem, I hit an interpreter bug. The
session log is
load 'C:\JPrograms\temp\interpbug.ijs'
jtree G
|domain error: jtree
| jtree G
X
10 12
Y
12 15
(10 12) joinroutes (12 15)
┌──┐
│┌┐│
││10 12 15││
│└┘│
└──┘
Source =. 'a';'bcd';'e';'g'
Target =. 'e';'a';'bcd';'f'
getIndex =: i.~ NB. not e.
shouldReturn =. 1 2 0 4 NB. 'not found' for i. is #x
assert (Source getIndex Target)-:shouldReturn NB. -: not =
Henry Rich
On 4/23/2012 7:13 AM, Joe Bohart wrote:
Hi J'ers,
I'm trying
That convenience would also obtain (in J) if the 'not found' result were
_1; and then the 'not found' entry would be known in advance and we
wouldn't have to calculate it.
Henry Rich
On 4/23/2012 5:28 PM, Devon McCormick wrote:
The convenience of index returning one more than the maximum
No error; the modifier is ALWAYS evaluated before its x and y operands: see
http://www.jsoftware.com/help/jforc/verb-definition_revisited.htm#_Toc191734405
http://www.jsoftware.com/help/jforc/writing_your_own_modifiers.htm#_Toc191734495
Henry Rich
On 4/10/2012 11:48 PM, Paul Jackson wrote
Or better,
'' ($ ,) data
(special code)
Henry Rich
On 3/29/2012 6:46 AM, Simon Barker wrote:
The old APL idiom was
'' {reshape} data
which translates as
'' $ , data
In J.
-Original Message-
From: programming-boun...@jsoftware.com
[mailto:programming-boun
Just use
=:(,L:0)
instead of
=
and it will do what you want.
stringequal =: =:(,L:0)
Henry Rich
On 3/29/2012 8:59 PM, PackRat wrote:
Devon McCormick wrote:
So is this an accurate, if simplified, representation of what you want to do?
str0=. ,.'A';'B';'NG';'Yow
I should add, you still can't use select. unless you do what I suggested
earlier.
Henry Rich
On 3/29/2012 8:59 PM, PackRat wrote:
Devon McCormick wrote:
So is this an accurate, if simplified, representation of what you want to do?
str0=. ,.'A';'B';'NG';'Yow'
col2search
Oops, for some reason I thought you wanted even and odd digits. To get
first and last, you can use
a=.10 #.^:_1 .@o.10x^199
'first last' =. (.-:#a) ({. ; }.) a
first
3 1 4 1 5 ...
last
9 8 2 1 4 ...
On 3/25/2012 10:29 AM, Henry Rich wrote:
a=..@o.10x^199
'evendig
Cute! J version:
'radar' plot 0 2p1;'1 + (cos 3*y) + *: sin 3*y'
Henry Rich
On 3/21/2012 5:55 AM, Boyko Bantchev wrote:
FWIW, the cleanest mathematical / programmable trefoil that
I know of is the following (I am too lazy to do it in J, so Gnuplot):
set size ratio 1.08
set parametric
set
Agreed.
Henry Rich
On 3/19/2012 9:05 AM, Dan Bron wrote:
Though not my usual position on J development, I'd support decommissioning 13
: .
I see its function as more appropriate to a standard library than a
primitive. For one thing, libraries are easier to change than primitives
u =. 1 { u
u 5
stack error
u =. 1 (0}) u
crash
J602.
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
There's nothing wrong with the explicit form, except the verbosity.
And, in this case, the tacit form is 100 times faster (that's unusual).
Henry Rich
On 3/17/2012 8:45 PM, David Ward Lambert wrote:
In this experiment the tacit expression runs faster in less space than
the explicit verb
Yeah, I can do that (in fact, that was the first thing I did, to cover
up the problem). I was hoping to fix the problem, but if the code is
ugly and not going to change, I'll just assume the error is in the
message handling in j.exe.
Henry Rich
On 3/3/2012 7:04 PM, bill lam wrote:
I
The rank of (:@?) is 0; the rank of ([::?) is _ . So g creates fill
BEFORE :, f does it AFTER :.
g1=: 13 :'([::?)0~:i.# y'
g1 'abcde'
1 0 0 0 0
2 1 0 0 0
3 2 1 0 0
4 1 3 2 0
3 1 4 2 5
Henry Rich
On 2/28/2012 7:57 PM, Linda Alvord wrote:
Henry, I have hit a snag in how
@ has its uses.
tree =. (] ; ;/@,.)' ' ;@({~ |.)1 :@?~@:@i.@#
tree 'abcde'
a
b a
b a c
b c a d
d b a e c
Henry Rich
On 2/27/2012 9:31 PM, Kip Murray wrote:
Here is how I would now do it, borrowing sh and the idea of using |.
from you, Linda.
sh
Thanks. Your problem is the old 'x ; boxed y' error.
(0;sj;mj2) ;: y
+---+--+-+--+---+-+-+-+-+-+---+-+---+-+
|sum|=.|(|i.|3 4|)|+|/|.|*|0j4|+|pru|4|
+---+--+-+--+---+-+-+-+-+-+---+-+---+-+
Henry Rich
On 2/24/2012 11:58 PM, Don Guinn wrote:
d332 for ;: in J Vocabulary. I didn't want
Where is this help, where sj and mj are defined?
Henry Rich
On 2/24/2012 7:25 PM, Don Guinn wrote:
I've lost track of the number of times I have tried to make dyadic ;: work.
I read it, understand it (I think), but I can't get it to work. The general
description has m, the input mapping
I use wd 'wait' as a lightweight way to get something like a password.
Henry Rich
On 2/21/2012 5:17 AM, bill lam wrote:
I guess these are really ancient codes. the wd'wait' is rarely used in
modern J base libary or addons code, and the gtkwd does not support
it. And wd'q' will raise domain
|+--+--+||
|| ||+-+---+|* ||$:|:|||
|| |||/|+-+|| |+--+--+||
|| ||| ||+||| |||+-+---+|
|| ||| |+-+|| ||| |
|| ||+-+---+| ||| |
|| |+---+-+|| |
|+--+---+| |
++---+
Henry Rich
On 2/20/2012 9:39 AM, Don Guinn wrote:
Perhaps I was just being a little picky in the distinction. But the
distinction between adverbs and conjunctions is important. It is similar to
the distinction
If you use 0!:100 rather than . you can do it more easily:
0!:100 'copyoflist=.', 5!:5'list_z_'
copyoflist
3 : 0
w=.{.wcsize''
...
)
0!:100 is multi-line . with only side-effects, no return value.
Henry Rich
On 2/18/2012 3:10 PM, Raul Miller wrote:
In another thread, I was struggling
I think Dan has it right. A gerund is an atomic representation of a
verb. Could be a scalar (I use them that way a lot).
Henry Rich
On 2/18/2012 1:10 PM, Dan Bron wrote:
I'm not sure gerunds are defined anywhere.
But if they were, the phrasing might be arrays of atomic representations
I personally use 'gerund' to mean 'array (or atom) of atomic
representations of verbs' and 'atomic representation' (or 'AR') to mean
'a scalar box containing a description of an entity'.
I think this matches the usage of Ye Dic.
Henry Rich
On 2/18/2012 2:37 PM, Dan Bron wrote:
Raul wrote
not, properly double quotes?
Henry Rich
On 2/12/2012 9:40 AM, R.E. Boss wrote:
The (input) string should be considered as one group (of chars).
Quoting is needed if the first or the last (or both) is not a quote, all
inside quotes should be doubled if they are not.
R.E. Boss
Questions:
0. Even if we can detect an ill-formed string, what do you mean,
'repair' it?
1. In what context is the string to be valid? In particular, are
control words allowed?
2. Is the string '2!:55 $0' a valid string? What about 'each_z_=:$0'?
Henry Rich
On 2/11/2012 1:04 PM, R.E
They shouldn't agree, and they are both correct.
u@:v y is u v y
([: u v) y is u v y
u@v y is u@:vv y
which differs in rank: |:@:*:*: is not the same as |:@::
Henry Rich
On 2/5/2012 11:00 PM, Linda Alvord wrote:
Shouldn't these agree?
(|: @ *:)i. 2 2
0 1
4 9
Agreed, and note that solving the characteristic polynomial is NOT used
for finding eigenvalues of any but the smallest systems. *Numerical
Recipes*, which generally thinks that any citizen can write their own
code to do almost anything, suggests that you leave eigenvalues to LAPACK.
Henry
There has to be some a priori knowledge of the two teams' strengths.
Henry Rich
On 1/31/2012 4:46 AM, Linda Alvord wrote:
Challenge 5 Super Bowl Supposition PLEASE DO NOT RESPOND UNTIL 2/6/2012 12
am EST
As the Super Bowl approaches, suppose it will be decided like baseball. Four
Does anyone have a J suite that sends messages using DLL calls to the
OpenSSL library?
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
,: ]) 0 3 0.3 3.2 0.6 2 2.3 2.6 3
0 7 2 7 2 7 7 7 7
0 3 0.3 3.2 0.6 2 2.3 2.6 3
Henry Rich
On 1/16/2012 2:37 PM, Roger Hui wrote:
You can use : as part of the hashing function and yes you do have to hash
x*1-t and x%1-t .
On Mon, Jan 16, 2012 at 11:19 AM, Raul Millerrauldmil
Yeah, I was solving the wrong problem. Never mind.
Henry Rich
On 1/17/2012 12:19 PM, Roger Hui wrote:
In 0.2 tidr x=:0 3 0.3 3.2 0.6 2 2.3 2.6 3, an index of 8 as the index of 3
seems an usual result.
On Tue, Jan 17, 2012 at 4:49 AM, Henry Richhenryhr...@nc.rr.com wrote:
Does this work
You can sort the lists and then compare adjacent values; find
superfluous ones; then i.!.0 to find them in the original list.
A tricky part is that proximity is not a transitive property. If the
tolerance is 2, and the data is
1 2 3 4 5 6 7
what should the result of the i.~ be?
Henry Rich
- t .
Sum to get total for the hand.
Henry Rich
On 1/9/2012 11:33 PM, Nick Simicich wrote:
Many years ago, I wrote a constrained bridge hand generator. This is the
problem:
Bridge is an interesting game. You play and you learn clues about the
other hands. These clues become constraints
Another way, not better:
(~.@{. ]`[`(a: #~ :@{:@[)} /./) DATA
Henry Rich
On 1/10/2012 11:30 AM, Devon McCormick wrote:
Beginner questions are welcomed. Here's one way to include empty boxes for
keys without any values:
] DATA=: 0 0 1 1 1 1 2 2 2 2 2 4 4 4 5 5,: 5 0 7 8 9 2 2 5 5 5 3
To be precise,
f.:g y [image: $\leftrightarrow$] gi f g y
x f.:g y [image: $\leftrightarrow$] gi (g x) f (g y)
and
f.g [image: $\leftrightarrow$] f.:gmg
where mg is the monadic rank of g.
I would change the Wiki page if it didn't seem heretical to correct Roger.
Henry Rich
On 1/6/2012 6:21
I'm still on 602 but if I ever moved to J7 I would certainly need the
timer to work, with the blocking problem fixed.
Henry Rich
On 1/5/2012 3:17 PM, Eric Iverson wrote:
Just realized wd'timer' keeps firing and if that is what you want then you
might be able to ignore the block and simply get
that the machines be on the same local
network or machine. Sockets are completely general.
Henry Rich
On 1/2/2012 2:38 PM, Ian Clark wrote:
Thanks, Raul. I'll look again at the sockets solution.
Some time since I ran that lab, but I seem to recall it had a timer to
poll the link hidden
Well, Java doesn't use the Iverson bracket, so if they say
return x 20;
it means something different (it returns a boolean). That's a different
battle to fight.
Henry Rich
On 12/25/2011 10:42 PM, Marshall Lochbaum wrote:
Actually I think the Java (which was in fact Java rather than C
be turned into a
single compound verb.
In addition to avoiding the ,: there is the greater payoff of performing
in-place operation when you have the form
name =: q} a,:name
Similar arguments apply. The given variant is in-place, while the
equivalent
name =: a q}@:,: name
is not.
Henry Rich
the Special Code page.
Henry Rich
On 12/21/2011 11:43 AM, Marshall Lochbaum wrote:
A more obvious way is to use (c { b,.a) . The key is to realize that saying
(if c then a else b) is just selection: if c is 0, we pick b, and if c is
1, we pick a. So we rephrase as (c { b,a), and J's implicit rank
will note my use of the dice/toss thread.
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
of a different distribution etc. But I never expected so
many to do so well.
Henry Rich
On 12/17/2011 5:52 PM, Björn Helgason wrote:
It is interesting to know how long you had been teaching them.
These assignments were not that easy to solve.
2011/12/17 Henry Richhenryhr...@nc.rr.com
Kids
choose it.
The name of the course is Programming For Scientists And Engineers, and
in the description I bill the course as programming for people who need
to write their own code that they will use for their own projects,
rather than code that other people will run.
Henry Rich
On 12/17/2011 10:17
different. Here,
I disagree. There need to be two variants, one treating the bits as
signed, one as unsigned. Since that seems inconvenient, we need to pick
one variant, and the unsigned one seems clearly more useful.
Henry Rich
On 12/12/2011 9:31 AM, Raul Miller wrote:
Ok...
This, combined
I like your leading-digit-negative idea better too. Rather than
prepending a leading _1, you could just change the high-order 1 to _1 .
Henry Rich
On 12/12/2011 5:57 PM, Marshall Lochbaum wrote:
Those are some very good arguments. Personally, I think my version is
mathematically more well
is anomalous.
And you can do |@:#: if you don't like the negative sign bit.
Still differs from 2#:, though.
Henry Rich
On 12/12/2011 7:44 PM, Marshall Lochbaum wrote:
You can't, unfortunately. _10, for example, is #._1 0 1 1 0 , which is the
shortest possible representation for it. In fact, my code only
? What 'uniqueness' do you mean? With only the MSB made negative, there
is a unique representation of any value in n bits. It is true that _3 is
_1 0 1
_1 1 0 1
_1 1 1 0 1
etc, depending on the length of the representation.
Henry Rich
On 12/12/2011 8:44 PM, Marshall Lochbaum wrote:
So
Maybe not an improvement, but this is how I would have done back in my
hardware-design days:
hcinv =. -~/@:#.@:(~:/\)@:((,1),:)1
Quite a bit more elegant in wires than in J!
Henry Rich
On 12/10/2011 1:01 AM, Kip Murray wrote:
Now we need an inverse for Raul's improved #: (hash colon
Same idea, better implementation
hcinv =. -/@:#.@:(,: +:@(1{.))1
Henry Rich
On 12/10/2011 10:48 AM, Henry Rich wrote:
Maybe not an improvement, but this is how I would have done back in my
hardware-design days:
hcinv =. -~/@:#.@:(~:/\)@:((,1),:)1
Quite a bit more elegant in wires than
-save
adder, and the building blocks to use for it.
You could emulate any or all of that, but I'm not sure it's interesting
to do so.
Henry Rich
On 12/10/2011 7:48 PM, Kip Murray wrote:
Cool. I think it is an improvement because it neatly avoids a case
statement. Now I wonder if we could
very useful (though the MH instruction in S\360
worked that way). nxn-2n is more useful.
Henry Rich
On 12/10/2011 9:25 PM, Kip Murray wrote:
What do you recommend for the high-order bit? I am off my reservation
here. Thought there might be a clever way to add positive numbers using
/ so
of machines that used other forms
of number-representation.
Henry Rich
On 12/10/2011 10:02 PM, Kip Murray wrote:
Let us add 1 1 0 and 0 1 0 in a simple-minded way working from right to
left, and writing carries above the addition:
1 1 0-- these are carries
1 1 0
0 1 0
didn't see that trick in the special code.
Henry Rich
--
For information about J forums see http://www.jsoftware.com/forums.htm
If you are OK with @: , then we agree. @ is hard for beginners.
u@v is equivalent to u@:vv or ([: u v)v
u@v@w is u@:vv@:ww or ([: ([: u v)v w)w
Let us use [: u vor u@:v as we like, and specify a rank when we
need one.
Henry Rich
On 12/5/2011 9:57 PM, Linda Alvord wrote
|
+---+---+---+---+---+---+---+---+---+---+
|o o|o |o o|o |o |o o|o |o o| |o o|
|o o| o |o o| o | |o o| |o o| o |o o|
|o o| o|o o| o| o|o o| o|o o| |o o|
+---+---+---+---+---+---+---+---+---+---+
Henry Rich, whose @ will be pried from his cold dead fingers
On 12/1/2011 6:25 PM, Linda Alvord wrote:
I was curious
. There is no way to write a single
word that produces different results when you repeat it.
toss''is as close as you get.
Henry Rich
On 12/1/2011 8:05 PM, Linda Alvord wrote:
I pasted the line together so 'o' looked ok. It was where the line broke in
my message. I tried it a couple
the problem is just a quirk of 18!:4. Someday I'll learn the
source enough to explain what's happening.
Henry Rich
On 11/28/2011 9:12 PM, bill lam wrote:
invoke dyad cocurrent should already raise by segmentation fault.
''cocurrent'base'
Втр, 29 Ноя 2011, Ian Clark писал(а):
Yes, it doesn't
'
┌─┬┬──┬─┐
│a│list│of│boxes│
└─┴┴──┴─┘
setboxforemail 1
;: 'a list of boxes'
+-++--+-+
|a|list|of|boxes|
+-++--+-+
Then you have to hope the reader is using a fixed-width font.
Henry Rich
On 11/26/2011 4:56 AM, Linda Alvord wrote
Or
(`(@$:);.1~ ~:/\inv@:(={.))
but that's window dressing. This is a brilliant, beautiful solution
that Dan found.
Henry Rich
On 11/25/2011 9:01 AM, Raul Miller wrote:
Note that
(]`(@$:);.1~ [: ~:/\inv {. = ]) 1 1 2 2 3 3 4 2 3 4 4 1 2 2 2 1
also works.
On Fri, Nov 25, 2011 at 8:54
I have put printf in as an addon, as format/printf. This version
supports the '0' flag (fixing a longstanding deficiency). I have
downloaded it to my J602 system but I would appreciate it if someone
verified that it works on J7. A test script is included.
Henry Rich
of ] .
Henry Rich
On 11/24/2011 1:44 AM, Roger Hui wrote:
This does not apply for the first example, nor for the general case of the
third example. Not sure about the second example. In any case you can get
answers to these questions yourself by doing some experiments and checking
Well... there is a section of JfC mentioning this stuff. But a Wiki
page would be good, especially if Roger can explain what subtleties gave
him pause.
Henry Rich
On 11/24/2011 2:30 PM, Marc Simpson wrote:
On Thu, Nov 24, 2011 at 7:11 PM, Ric Sherlocktikk...@gmail.com wrote:
That's great
Of course, I see now, when you copy you have to update the reference
counts in each atomic box. That explains the performance of a great
many expressions that I couldn't understand before. Thanks.
I'll be at the conference!
Henry Rich
On 11/24/2011 8:08 PM, Roger Hui wrote:
The logic
Also, there is an implicit
y =. argument
to begin every explicit verb, and it would be a pity if that required a
copy of the data.
Henry Rich
On 11/23/2011 9:36 AM, Roger Hui wrote:
Names are reference-counted so that if you say a=:b=: 123 the reference
counts for a and b are each one more
))\))^:(~:/@}.)^:_ (0,y,y)
which would set p to the place where the cycle was detected, and v to
the value detected. Then carry on as required.
Henry Rich
On 11/22/2011 6:16 AM, David Vaughan wrote:
I see that the algorithm you suggested only works on linked lists. Is there a
way to model linked lists
So {.!.v would do what you want.
Would also be nice if fill could be a non-atomic array.
Henry Rich
On 11/17/2011 3:52 PM, Raul Miller wrote:
shift=: 4 :0
fill=. {.0#,y
x |.!.fill y
)
For example: 2 shift i.5 5
Oh, I mistyped. I meant
|.!.v where that would be defined as
|.!.(v y) or |.!.(x v y)
which would allow, for example, shift using the first element as fill.
but if all you want is 0-fill, you have |.!.0
Henry Rich
On 11/17/2011 4:41 PM, Raul Miller wrote:
No.
But
shift
The noun must be a literal list, and the path to the file must exist.
(The file itself need not exist)
Henry Rich
On 11/17/2011 8:09 PM, David Vaughan wrote:
How do I write a noun to a file? I'm trying to use
noun 1!:2'file'
but I'm just getting rank and domain errors with all the things
Nor does anything else, in general. Google the Halting Problem. My
favorite version is
http://ebiquity.umbc.edu/blogger/2008/01/19/how-dr-suess-would-prove-the-halting-problem-undecidable/
Henry Rich
On 11/10/2011 8:54 PM, Marshall Lochbaum wrote:
Look at the code and scratch your head. J
Just a quibble with terminology: 'item' means _1-cell. That concept
does not apply here. If you define 'l-cell' to be the left rank of the
verb, and 'r-cell' the right rank, you could say
...it loops through all the l-cells of x, then for each of those, all
the r-cells of y...
Henry Rich
I had the hardest time learning how dyad u/ works, but I was very proud
to figure out ul rl _ . Now that I get u/, I use ul r/ instead.
Henry Rich
On 11/4/2011 10:28 AM, Roger Hui wrote:
When table x f/y was introduced (at the very beginning) we did not
fully comprehend the power of the rank
Henry Rich
On 11/4/2011 11:25 PM, Raul Miller wrote:
|..:^:2: 123450245060x
--
For information about J forums see http://www.jsoftware.com/forums.htm
OK, I want to port printf to J7.01 (there shouldn't be any changes). I
see a Wiki page for Addons/Developers. But I can't find where the
addons are in the path at Jsoftware. Is there a page that tells me what
to do to publish my script after I have added the header?
Henry Rich
On 10/31
I'll try to fix that long-standing deficiency when I port to 7.01. In
the meantime, use %2.2d (it does support width, just not the 0 flag).
Henry Rich
On 11/1/2011 5:20 PM, Andrew Pennebaker wrote:
I'd also like to see width specifiers in printf/sprintf, a la C. That would
let printf do %02d
OK, but suppose what you really wanted was
This user has 05 credits left from a starting total of 097
Henry Rich
On 11/1/2011 9:51 PM, Ric Sherlock wrote:
I would've turned to:
'r02.0' (8!:0) 5
┌──┐
│05│
└──┘
On Wed, Nov 2, 2011 at 2:35 PM, Raul Millerrauldmil...@gmail.com wrote
'0123456789ABCDEF' {~ 16 (#.^:_1) 456
1C8
x #: y converts y to base x, mod */x (with exceptions if x contains
zeros). If you want to have an unlimited number of digits, use #.^:_1
as shown above.
Henry Rich
On 10/30/2011 8:50 AM, David Vaughan wrote:
How could I convert decimal numbers
1 - 100 of 771 matches
Mail list logo