https://groups.google.com/forum/?hl=is#!topic/j-programming/wfCE14PzFIU
2011/11/18 Alexander Epifanov <[email protected]> > Hello, > > Its the third time I am trying to move from K to J without success. > Stopped and the 8th chapter of "Learning J", because its the half of > the book, but I cannot read and understand other programs, also cannot > write simple program. > > Let me provide an example. on K I split IP-string: 1_'(0,&"."=" ",s)_ > " ",s:"192.168.1.1" > I was trying to rewrite it on J, but I did not find _ (cut) or > something like that, which splits list by indexes. > > I found another cut in J, so the solution is '.'cut'192.168.1.1', but > I have to understand it. > cut > ' '&$: :([: -.&a: <;._2@,~) > > Do I understand correct that function makes train of verbs without > round brackets? > So its (f g) where f =: ' '&$: and g =: :([: -.&a: <;._2@,~) > But it does not work: > g '192.168.1.1' > |syntax error > > Why, how to read J expression? In K I just cut expression from let and > see all imtermediate results, in J it does not work. > Also, I cannot find anonymous function {} in K, but if I understand > correct in J it is prefferable to compose verbs. > > Thank you. > > -- > Regards, > Alexander. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: [email protected] gsm: +3546985532 twitter: @flugfiskur http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) ♖♘♗♕♔♙ `. )----' (")_(") ☃☠ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
