Makes sense
Patched:
JVERSION
Engine: j701/2011-02-23/15:25
Library: 7.01.045
Platform: Win 64
Installer: unknown
InstallPath: c:/users/joe bogner/downloads/jsrc/build
>./ ? 1e7 # 2 1e7
999
>./ ?. 1e7 # 2 1e7
999
Or
# ~. ?. 1e7 # 2 1e7
6321511
# ~. ? 1e7 # 2 1e7
63198
I think a more persuasive test to show the presence or absence
of the bug is to roll over one million times something like
>./ ? 1e7 # 2 1e7
1
>./ ?. 1e7 # 2 1e7
1
Чт, 17 дек 2015, Joe Bogner написал(а):
> Sorry - I meant to add as a test case New code on 64-bit bit
>
>JVERSION
>
Sorry - I meant to add as a test case New code on 64-bit bit
JVERSION
Engine: j701/2011-02-23/15:25
Library: 7.01.045
Platform: Win 64
Installer: unknown
InstallPath: c:/users/joe bogner/downloads/jsrc/build
?. 16 # 2 2 2 16
0 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0
Yes, this bug is worth fixing.
But it's much less serious than many others: x E. y numeric, or x f@:e.
y, ,&.>/ y, etc.; see
http://code.jsoftware.com/wiki/System/Interpreter/Bugs/Errors
and
http://code.jsoftware.com/wiki/System/Interpreter/Bugs/Crashes
We don't need a fix for this bug: we nee
looks like the problem likes in
https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/vrand.c#L726
It looks like it checks to see if the first number in the list is 2
and if so, it uses the roll2 implementation
RZ(w=vi(w)); m=*AV(w);
if( 2==m)RZ(z=roll2 (w,&b));
It also app
These are the results you should get in a fresh version of JHS or jqt. If
you use ?. you will insure repeated exact results in a session. In all cases
the length of the list is 64 elements so there should be enough 2's.
?. 16 # 2 2 2 16
1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 1
Might be a relevant time to ask for an update on the git repo for J
GPL source: http://www.jsoftware.com/pipermail/chat/2015-June/006648.html
I haven't heard anything since June. Is there an update?
On Thu, Dec 17, 2015 at 10:26 PM, bill lam wrote:
> I think this bug is serious. If anyone can pr
I think this bug is serious. If anyone can provide a patch
based on the j701 GPL source and related test script,
then I can merge the fix into the next release.
Чт, 17 дек 2015, Henry Rich написал(а):
> ? (32$2) , 32 $ 1000
>
> 1 1 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1
? (32$2) , 32 $ 1000
1 1 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1
0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
The chance of getting that with no bug is about 1 in 10^86. There's a bug.
The question is, Why can't we just fix it? If I wanted to put in t
How about no parentheses.
h=: 13 :'|:i.~&> y'
h i
0 0
1 0
2 2
0 0
1 4
2 2
2 6
2 2
1 2
2 6
h
[: |: i.~&>
Linda
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam
Sent: Thursday, December 17, 2015
I think there are already enough evidences to call for
further investigation to prove or disprove the bug.
Чт, 17 дек 2015, Raul Miller написал(а):
> On Thu, Dec 17, 2015 at 12:40 PM, 'Pascal Jasmin' via Programming
> wrote:
> > ?. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
I found the reason why convert/misc/md5 didn't work on the 64-bit
architecture.
The failures came from the rot function -- it was ok for 32-bit ints, but
wrong for 64-bit.
This is what works ok:
rot=: 16b and sh or ] sh~ 32 -~ [ NB. (y << x) | (y >> (32 - x))
I saved it in https://github.
I am working on a minor new release of JHS right now (improvements to
simple project managed execution) so the timing might be fortuitous.
If it is trivial to add menu commands for cut/copy/paste, I will do
so.
But first, I wonder how you do the hard part, which is selecting text?
If you can selec
Yes Eric, you are right. I meant to say editing windows opened with jfile
or a ijs editing window; even highlighting text on the jijx window using
the watered-down version of SkipStone is an issue but I could switch to
using Midori instead.
The Kindle Touch default (on screen) keyboard is very li
Its very similar to how you would brute force a solution with (eval func)
"1^:_ on rows of input ; score
after each iteration, sort on score, keep some cutoff portion (say 20), and
generate some new inputs based on qualities of top scoring ones (say 10 per
each top 20 scoring one). Can memoiz
Note that that rosetta task asks for a "mitosis" genetic algorithm. If
someone wanted to draft up a "meiosis" rosetta task, that would be
great.
Thanks,
--
Raul
On Thu, Dec 17, 2015 at 4:48 PM, Ric Sherlock wrote:
> I have done some work using Differential Evolution (see the math/deoptim
> ad
I have done some work using Differential Evolution (see the math/deoptim
addon). Another simple example would be the rosettacode task:
http://rosettacode.org/wiki/Evolutionary_algorithm#J
On Fri, Dec 18, 2015 at 9:52 AM, Devon McCormick wrote:
> Has anyone done work in J on genetic algorithms?
My version. I didn't want to enumerate all the cases, in case part 2
doubled the number of jugs:
NB. Read in data, convert to list
i =: ".;._2 (#~ (LF,LF) -.@:E. ]) wd 'clippaste'
NB. Integer knapsack problem.
iknapsack =: 4 : 0
reachable =. > (] +. |.!.0)&.>/\.&(,&(<(>:y) {. 1)) (<"0-x)
num
I have posted an Essay for the Integer Knapsack Problem and added to the
one on Parenthesis Matching, coming from the advent problems. I agree
that a full collection would be a great resource, especially for teaching.
Henry Rich
On 12/17/2015 1:22 PM, chris burke wrote:
The advent puzzles wo
Has anyone done work in J on genetic algorithms? I'm thinking of coding
up something along these lines as I don't find any relevant hits for this
on the J wiki.
--
Devon McCormick, CFA
Quantitative Consultant
--
For informati
Yes, it appears so. And the trailing 16s or 64s can be 0 or 1 or 3 or
whatever and the answer remains incorrect.
On 12/17/2015 1:40 PM, robert therriault wrote:
Seems to be a combination of having more than 31 leading 2's and the magic
length of 64 items in the argument :-)
Cheers, bob
random bug does not sound good
--
For information about J forums see http://www.jsoftware.com/forums.htm
Seems to be a combination of having more than 31 leading 2's and the magic
length of 64 items in the argument :-)
Cheers, bob
?. (30#2),34#64
0 0 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 1 54 30 39 63 23 28
21 14 18 32 21 13 19 23 16 37 16 56 52 14 51 1 22 14 26 63 13 37 54 2 3
On Thu, Dec 17, 2015 at 12:40 PM, 'Pascal Jasmin' via Programming
wrote:
> ?. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
> 2 2 2 2 2 2 2 2 2 2 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
> 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1
The advent puzzles would be an excellent addition to the wiki. Could I
encourage someone to post up the problems and solutions, perhaps under
code.jsoftware.com/wiki/Puzzles/Advent. Let me know if you need help
getting this organized.
On 1 December 2015 at 11:02, Thomas Costigliola wrote:
> htt
mine:
NB. from http://www.jsoftware.com/pipermail/chat/2013-October/005405.html
c=: 0 1{~((#x)#2)#:i.2^#x
d=: (150 = c+/ .*x)#c
smoutput pt1=:# d
min=: <./ +/"1 d
smoutput pt2=: +/ min = +/"1 d
On Thu, Dec 17, 2015 at 9:47 AM, 'Pascal Jasmin' via Programming
wrote:
>
>
> combT =: ([: ; ([ ; [:
?. 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1
1 1 1 0 0 1 1 1 8 9 6 8 14 7 12 9 1 15 2 15 3 13 3
?. 2 2 2 2 2 2 2 2
It looks like it may have more to do with the 16#16 at the end of the string
?.(16 # 2 2 2),16
0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1
1 1 0 0 1 1 1 0 9
?.(16 # 2 2 2),16#16 NB. odd that this produces a different pattern over the
first 48 as well, i
Consider
?.2 2 2 32
0 1 0 18
Thanks,
--
Raul
On Thu, Dec 17, 2015 at 12:13 PM, 'Pascal Jasmin' via Programming
wrote:
>
>
>
> ?. 16 # 2 2 2 16
>
>
> result is same as
>
> ?. 16 # 2 2 2 2
>
> ignores the request for 0-15 range random numbers.
>
>
> - Original Message -
> From: Raul
?. 16 # 2 2 2 16
result is same as
?. 16 # 2 2 2 2
ignores the request for 0-15 range random numbers.
- Original Message -
From: Raul Miller
To: Programming forum
Sent: Thursday, December 17, 2015 12:10 PM
Subject: Re: [Jprogramming] bug in ?
On Thu, Dec 17, 2015 at 11:49 AM, 'P
On Thu, Dec 17, 2015 at 11:49 AM, 'Pascal Jasmin' via Programming
wrote:
> ?. 16 # 2 2 2 16
> 0 1 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1
> 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1
>
>
> ?. 16 # 3 2 2 16
> 0 2 1 0 2 1 1 1 2 1 0 2 1 2 1 2 1 0 1 1 1 1 1 1
if the first few numbers in a list argument to ? are 2, then all seem to be 2.
?. 16 # 2 2 2 16
0 1 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0
1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1
?. 16 # 3 2 2 16
0 2 1 0 2 1 1 1 2 1 0 2 1 2 1 2 1 0 1 1 1 1 1 1 0 0 1
Thanks. I can see your expression is
|:@:>@(i.~L:0 ])
which gives the same x i. x as suggested by Roger.
Чт, 17 дек 2015, jprogramming написал(а):
> I have
>
>
>
> nubi =. ({~ each"_ 1 ~.@|:@:>@((i."_ _1~) leaf~)) f.
>
>
>
> keyi =. (i."_ _1~)@:(|:@:>@((i."_ _1~) leaf~))f.
>
>
>
> still
Чт, 17 дек 2015, Roger Hui написал(а):
> ... questions of identity on x can often be answered more efficiently on
> x⍳x than on x itself.
I promise to remember this. Thanks.
--
regards,
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkey
I have
nubi =. ({~ each"_ 1 ~.@|:@:>@((i."_ _1~) leaf~)) f.
keyi =. (i."_ _1~)@:(|:@:>@((i."_ _1~) leaf~))f.
still gives same unique indexes, just not contiguous.
(i."_ _1 ])@:(|:@:>@((i."_ _1 ]) leaf ])) i
0 1 2 0 4 2 6 2 8 6
- Original Message -
From: bill lam
To: jprogrammi
Apply |:@:(i.~&>) to an inverted table and work with that. Quoting from
http://www.jsoftware.com/papers/amuse-bouches.htm#3 ,
... questions of identity on x can often be answered more efficiently on
x⍳x than on x itself.
On Thu, Dec 17, 2015 at 7:21 AM, bill lam wrote:
> I want an effecient me
I want an effecient method of finding nub and key of a
inverted table (rank-1 box array with equal number of
items in each cells). eg.
]i=. (,.0 2 1 0 2 1 1 1 2 1);10 2$'bbbabbbababb'
+-+--+
|0|aa|
|2|aa|
|1|ba|
|0|aa|
|2|ab|
|1|ba|
|1|bb|
|1|ba|
|2|ba|
|1|bb|
+-+--+
NB. nub of i
i
combT =: ([: ; ([ ; [: i.@>: -~) ((1 {:: [) ,.&.> [: ,&.>/\. >:&.>@:])^:(0 {::
[) ( cutLF wdclippaste ''
4 5 6 7 8 +/@:(150 = a +/@:{~"1 combT )"(0) 20
(itemized results that give solution to part2 as well.)
these versions do it without comb
a +/@:((150 = +/@:#~)"1) (20#2) #: i. 2^20
a +/@
I use the verbs readnoun and writenoun to store J arrays as *.ijn files.
NB. reads a J binary noun file
readnoun=:3!:2@(1!:1&(]`<@.(32&>@(3!:0
NB. writes a J noun file
writenoun=:([: 3!:1 [) (1!:2 ]`<@.(32&>@(3!:0))) ]
a=. 'this';'is';(i. 2 3);'an array eh'
a writenoun 'c:/temp/a.ijn'
39 matches
Mail list logo