Hit the nail on the head.
Pattern matching is more useful in languages with logic variables, or at
least lisp-style lists with heads and tails. I assume (hope anyway) that
WL has such, else why even bother.
Although I like the style of programming which supports such pattern
matching, I have neve
I just sent a report of this phenomenon to Bill and Chris. Hopefully we
can sort it out between us without too much trouble.
I'm not sure when that start-up bug crept in.
On Fri, Oct 11, 2013 at 12:37 PM, Björn Helgason wrote:
> thx
>
> I think you are right
>
> |domain error: cd
> | 'JNIV
surprisingly, the S:0 version is at least as fast as unboxed data (in j7-64)
(not counting potential savings in the test function.
, each/ |: 2 test /\ 4 3$ i.12
┌─┬─┬──┐
│0 1 2│3 7 5│6 13 8│
└─┴─┴──┘
10 ts ', each / |: 2 test /\ 1e4 3 $ (i.1e4)'
11.9259/sec 6.63258
I've used this code on large files - it's an adverb that applies an
arbitrary verb to sequential blocks in a file. The example usage "CTR [
((10{a.)&(4 : 'CTR=: CTR + x +/ . = >0{y')) doSomething ^:_ ] 0;1e6;(fsize
'bigFile.txt');'bigFile.txt' [ CTR=: 0" accumulates the number of lines in
a file i
Thanks very much. Useful in learning S:
There is a big savings in the full round trip in j764 but no difference in j632
, each / 2 test /\ |: <"0 S:1[ 1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
┌─┬──┬───┐
│1 2 3│6 8 10│┌─┬─┬─┐│
│ │ ││a│b│c││
│ │ │└─┴─┴─┘│
└─┴
thx
I think you are right
|domain error: cd
| 'JNIVM_z_ JNIENV_z_'=:,>}.'libj.so GetJavaVM i *x *x'&cd(,_1);,_1
18!:5 ''
and
18!:2 <'test'
|spelling error
| 18!:2 <'test'
| ^
18!:5 ''
|spelling error
|18!:5 ''
|^
The start always fails
this is in console from github.
I tested qt and it is not there.
console allows me to run jhs - actually not anymore since last update - but
the console works fine.
not so easy to use qt
On Oct 11, 2013 3:44 PM, "Michael Dykman" wrote:
> Hi Bjorn,
>
> Does it look like dirty locale loading on
Sorry. Here it is:
f=: % * 0&~:
f i.2 5
01 0.5 0.33 0.25
0.2 0.17 0.1428570.125 0.11
f 0
0
f 3j4
0.12j_0.16
On Fri, Oct 11, 2013 at 4:49 AM, Raul Miller wrote:
> You did not provide a definition for f.
>
> f=: *%]
>
> gives me this kind of resu
What locale are you in when you start J?
If you're in the z locale, then a=.4 is equivalent to a_z_=.4 and a_test_ will
(failing to find the name 'a' in test) return that value.
Try
18!:5 ''
and
18!:2 <'test'
If the result of the former is an element of the latter, then yo
Your solution could be shortened a bit to
<"1|:<"0 S:1[ 1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
+-+-+-+-+
|+-+-+---+|+-+-+---+|+-+-+---+|+-+-+---+|
||1|5|+-+|||2|6|+-+|||3|7|+-+|||4|8|+-+||
|| | ||a | ||b | ||c | ||d|||
|| | |+-+||| | |+-+||| | |+-+|||
Try power off the android and retry. If the bug? persists
please report again. Thanks.
Пт, 11 окт 2013, Björn Helgason писал(а):
> start j
> a=.4
> a_test_
> 4
> On Oct 11, 2013 2:59 PM, "bill lam" wrote:
>
> > I guess your session was dirty.
> >
> > Пт, 11 окт 2013, Björn Helgason писал(а):
Hi Bjorn,
Does it look like dirty locale loading on android. Are you using burke's
qt version or the j console for github? There seems to be some startup
conflict from an updated system.
I have consistently having problems with the JAL whereby , after running
updates, post install, I get startup
start j
a=.4
a_test_
4
On Oct 11, 2013 2:59 PM, "bill lam" wrote:
> I guess your session was dirty.
>
> Пт, 11 окт 2013, Björn Helgason писал(а):
> > al=: 3 : 0
> > 'a_vec_' al y
> > :
> > try.
> > (x)=:(".x),y
> > catch.
> > (x)=:y
> > end.
> > )
> >
> > 'a' al 1 2 3
> > 1 2 3
> >
> >al
I guess your session was dirty.
Пт, 11 окт 2013, Björn Helgason писал(а):
> al=: 3 : 0
> 'a_vec_' al y
> :
> try.
> (x)=:(".x),y
> catch.
> (x)=:y
> end.
> )
>
> 'a' al 1 2 3
> 1 2 3
>
>al 4 5 6
> 1 2 3 4 5 6
> a
> 1 2 3
> a_vec_
> 1 2 3 4 5 6
>
> I think this to be a bug
> a_vec_ sho
"a_vec_" is "4 5 6" on J7 under Windows.
On Fri, Oct 11, 2013 at 10:37 AM, Björn Helgason wrote:
> al=: 3 : 0
> 'a_vec_' al y
> :
> try.
> (x)=:(".x),y
> catch.
> (x)=:y
> end.
> )
>
> 'a' al 1 2 3
> 1 2 3
>
>al 4 5 6
> 1 2 3 4 5 6
> a
> 1 2 3
> a_vec_
> 1 2 3 4 5 6
>
> I think this t
al=: 3 : 0
'a_vec_' al y
:
try.
(x)=:(".x),y
catch.
(x)=:y
end.
)
'a' al 1 2 3
1 2 3
al 4 5 6
1 2 3 4 5 6
a
1 2 3
a_vec_
1 2 3 4 5 6
I think this to be a bug
a_vec_ should be 4 5 6
This I ran on the Android.
Have not tried anywhere else.
---
with 4 row 3 column inverted table
1 2 3 4 ; 5 6 7 8 ; <'a';'b';'c';'d'
┌───┬───┬─┐
│1 2 3 4│5 6 7 8│┌─┬─┬─┬─┐│
│ │ ││a│b│c│d││
│ │ │└─┴─┴─┴─┘│
└───┴───┴─┘
is there a way to scan through each record without doing this:
<"1 &.|: > <"0
Here's a clumsy one that works.
f =: %`0:@.(0=])"0
f i. 2 5
01 0.5 0.33 0.25
0.2 0.17 0.1428570.125 0.11
f 0
0
f 3j4
0.12j_0.16
--Kip Murray
Sent from my iPad
> On Oct 11, 2013, at 6:49 AM, Raul Miller wrote:
>
> You did not provide a def
If you can make a memory mapped file approach work for you, I expect
that it would be a lot faster than a buffered block approach, at least
on current machines.
Thanks,
--
Raul
On Fri, Oct 11, 2013 at 7:46 AM, Joe Bogner wrote:
> Ganesh - Thank you. That is very fast. It runs on 4 seconds on m
You did not provide a definition for f.
f=: *%]
gives me this kind of result:
(*%]) i.2 5
01 0.5 0.33 0.25
0.2 0.17 0.1428570.125 0.11
(*%]) 0
0
(*%]) 3j4
0.2j1.77636e_17
So I'm not sure how you got 0.12j_0.16
Hints?
Thanks,
--
Raul
On Fri, Oct
Ganesh - Thank you. That is very fast. It runs on 4 seconds on my machine
with a 9 million row sample string.
st =. 1 0 , 0 6 ,: 0 0
st =. st ,: 0 6 , 0 6 ,: 2 1
st =. st , 3 3 , 0 6 ,: 2 0
st =. st , 3 0 , 0 0 ,: 3 0
tab =. 9 { a.
secondcolumn =. (0;st;(< tab;LF))&;: NB. Boxed list of the se
21 matches
Mail list logo