Re: [Jprogramming] Where to find "checkrequire"

2014-07-16 Thread bill lam
(please post to j general forum) You should run qtdemo instead. menu | help | studio | qt demos Чт, 17 июл 2014, Jerrold написал(а): > I am new to J and am going through the demos trying to get a better > understanding of the language. So far I can execute (and study) all of the > demos (excep

[Jprogramming] Where to find "checkrequire"

2014-07-16 Thread Jerrold
I am new to J and am going through the demos trying to get a better understanding of the language. So far I can execute (and study) all of the demos (except plot.ijs) via the following: loadfile =: (0!:1) & < loadfile 'C:\Users\Owner\j64-802\addons\demo\datetime.ijs' that dem

Re: [Jprogramming] trains

2014-07-16 Thread Rob Hodgkinson
Examples ... Forgive iphone typos... Open, close of prices and range... nos=.2 3 5 8 13 21 openclose=.{. , {: range=.>./ - <./ openclose nos 2 21 range nos 19 Statistics (original courtesy of Keith Smillie, these are broken down) am =: +/ % # NB. Arithmetic mean gm =: # %: */

Re: [Jprogramming] speaking of amend...

2014-07-16 Thread neitzel
'Pascal Jasmin' asked: >what verb v (or I guess adverb is ok) could I use to get > >    i.2 3 2 > 0 1 > 2 3 > 4 5 > > 6 7 > 8 9 >10 11 > >0 1 1 v i. 2 3 2 >0  1 >8  9 >10 11 So you want some bastard item merged out from the original ones. This is exactly what monadic } will do, the

Re: [Jprogramming] trains

2014-07-16 Thread Marshall Lochbaum
A nice one is histogram: hist =: ~. ,. #/.~ hist 4 2 5 4 2 6 1 5 2 6 2 4 2 2 4 5 2 6 2 1 1 It's weird to ask for an example of a train since forks are such a common part of J. If you look at almost any substantial piece of code you'll be swimming in them in short order. Marshall On Wed, J

Re: [Jprogramming] trains

2014-07-16 Thread Linda Alvord
Dan, How about the the forks in the function to delete blanks which Erling provided recently: f=:[: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:) }. ]) ([: (] +. $ {. 1 , }:) ' ' ~: ]) # ] 5!:4 <'f' -- [: │ -- ' ' │-+-

Re: [Jprogramming] trains

2014-07-16 Thread 'Pascal Jasmin' via Programming
({.,&< }.) ;/ i.4 ┌───┬───┐ │┌─┐│┌─┬─┬─┐│ ││0│││1│2│3││ │└─┘│└─┴─┴─┘│ └───┴───┘ ,&< provides a consistent result whether or not argument is boxed items. Which made me wonder, why is split defined as with ,&< instead of the simpler ; -- or so it seems? --

Re: [Jprogramming] trains

2014-07-16 Thread Nollaig MacKenzie
last1=: $ #: , i: 1: bar 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 last1 bar 1 2 2 On 2014.07.16 13:26:38, you, the extraordinary 'Dan Baronet' via Programming, spake thus: > I am looking for good examples of use of trains. > Apart from the class

Re: [Jprogramming] trains

2014-07-16 Thread Joe Bogner
It can be useful for testing equivalency (({.;}.) -: split) 'abcd' 1 (({.;}.) -: split) (1 2 3 4) 1 (({.;}.) -: split) (i. 2 3 4) 1 Which made me wonder, why is split defined as with ,&< instead of the simpler ; -- or so it seems? @Raul - the intersect example was quite interesting to m

Re: [Jprogramming] trains

2014-07-16 Thread 'Dan Baronet' via Programming
I don't care. Good example. /D On Wednesday, July 16, 2014 6:29:48 PM, Raul Miller wrote: Do you care what the trains are used for? One of the classic trains is set intersection: intersect=: [ -. -. Thanks, -- Raul On Wed, Jul 16, 2014 at 4:26 PM, 'Dan Baronet' via Programming wrote

Re: [Jprogramming] a zoom function (doubling points accross rows and columns)

2014-07-16 Thread Raul Miller
Yes, I got as far as 2#2#"1#: dfh;.1 ' FF 81 BD A5 A5 BD 81 FF' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0

Re: [Jprogramming] a zoom function (doubling points accross rows and columns)

2014-07-16 Thread 'Pascal Jasmin' via Programming
spoiling quiz with answer already, neat short fork. zoom =: [ # #"1 - Original Message - From: 'Pascal Jasmin' via Programming To: Programming forum Cc: Sent: Wednesday, July 16, 2014 6:08:28 PM Subject: [Jprogramming] a zoom function (doubling points accross rows and columns)

Re: [Jprogramming] trains

2014-07-16 Thread Raul Miller
Do you care what the trains are used for? One of the classic trains is set intersection: intersect=: [ -. -. Thanks, -- Raul On Wed, Jul 16, 2014 at 4:26 PM, 'Dan Baronet' via Programming wrote: > I am looking for good examples of use of trains. > Apart from the classic +/ % #, I can't thin

[Jprogramming] a zoom function (doubling points accross rows and columns)

2014-07-16 Thread 'Pascal Jasmin' via Programming
there are too many ways to write this function, and there is probably a way that is better than what I could think of.  #. inv dfh &> ' 'cut  'FF 81 BD A5 A5 BD 81 FF' 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1

Re: [Jprogramming] trains

2014-07-16 Thread Alex Giannakopoulos
Sorry, in the above post, I was referring to forks. Although most seem to be fond of forks, I have found hooks to be more useful and subtle (for my needs anyway). Tracy gave a great example. Basically the monadic case of the hook can be thought of as any variable combined with itself in some way

Re: [Jprogramming] trains

2014-07-16 Thread Devon McCormick
How about "split": {. ,&< }. ? On Wed, Jul 16, 2014 at 5:12 PM, Alex Giannakopoulos < aeg...@blueyonder.co.uk> wrote: > I suppose the most useful, from a beginner's point of view, is the cap > fork, e.g. > [: *: sin > which allows composition, and is equivalent to > *: @ sin > Some people pre

Re: [Jprogramming] trains

2014-07-16 Thread Alex Giannakopoulos
I suppose the most useful, from a beginner's point of view, is the cap fork, e.g. [: *: sin which allows composition, and is equivalent to *: @ sin Some people prefer this former notation as clearer than the latter. So, sin =: 1&o. cos =: 2&o. (([: *: sin) + [: *: cos) 9876543210 1 Basic

Re: [Jprogramming] trains

2014-07-16 Thread Tracy Harms
Among my favorites is filter, a.k.a. copy-where. It's any hook where the left tine is Reflexive Copy and the right is a qualifying boolean test. There are many examples at jsoftware.com retain_odd =: #~ 2&| -- T On Jul 16, 2014 4:26 PM, "'Dan Baronet' via Programming" < programm...@jsoftware.com>

Re: [Jprogramming] trains

2014-07-16 Thread 'Pascal Jasmin' via Programming
I love forks, and they are useful for everything to use a traditional language example a =. (x) f y  NB. function of 1 or 2 arguments passed to function. assign to temp var a b =. (x) g y  NB. Other function using passed arguments c =.  b h a NB. combine the above 2 results with h function.

[Jprogramming] trains

2014-07-16 Thread 'Dan Baronet' via Programming
I am looking for good examples of use of trains. Apart from the classic +/ % #, I can't think of many more. Anyone with some examples? They can be of any length. /Dan -- For information about J forums see http://www.jsoftware.com/f

[Jprogramming] Bug Reports

2014-07-16 Thread chris burke
Dear All Please do not use the programming forum for bug reports, see http://www.jsoftware.com/jwiki/System/BugReports. Thanks. Chris -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] qt hangs

2014-07-16 Thread chris burke
Responded on general... On Wed, Jul 16, 2014 at 6:11 AM, Björn Helgason wrote: > I have been working with qt forms and a strange behaviour happened with the > editor - w8 64 bit. > > If I open a file it seems to go into a loop. > > It seems to be related to snap/.snp/ > > Can I delete

Re: [Jprogramming] Lapack error on android

2014-07-16 Thread bill lam
It is mentioned in manifest of lapack but perhaps it cannot be shown in android. It should offer advice as what you suggested. If you installed addons inside qt demo, it will execute that command for you. pacman lacks post-installation script to execute extra commands. On Jul 16, 2014 8:53 PM,

[Jprogramming] qt hangs

2014-07-16 Thread Björn Helgason
I have been working with qt forms and a strange behaviour happened with the editor - w8 64 bit. If I open a file it seems to go into a loop. It seems to be related to snap/.snp/ Can I delete those lines? -- For informat

Re: [Jprogramming] Lapack error on android

2014-07-16 Thread Jan-Pieter Jacobs
Thanks for the suggestion, that indeed fixed it! I don't remember doing this before, maybe I have a physical memory leak… Even so, shouldn't this be handled by the installation of the package, or at least have a more user-friendly suggestion, instead of just crashing? Kind regards, Jan-Pieter On 1

Re: [Jprogramming] Design goals readability and write, ability?

2014-07-16 Thread Linda Alvord
Kip and Erling wrote f and g . Both are written in simple J . Now work backwards to provide the explicit expressions to provide each one. A=:' ads sd s ' g=: 2 }. [: (#~ ((' ' ~: {:) ,~ [: -. ' ' -:"1 }: ,. }.)) 'z ' , ] f=:[: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:

Re: [Jprogramming] Moving to J on android phone

2014-07-16 Thread bill lam
> /data/data/com.jsoftware.android.qtide/bin/jconsole ~addons/ide/jhs/core.ijs > -js " init_jhs_'' " You should first install an app (if not yet) called "android terminal emulator". Type inside that terminal, or it has an option to set it as the first command line. On Wed, Jul 16, 2014 at 5:23

Re: [Jprogramming] Moving to J on android phone

2014-07-16 Thread Linda Alvord
Is this what I would enter in chrome? /data/data/com.jsoftware.android.qtide/bin/jconsole ~addons/ide/jhs/core.ijs -js " init_jhs_'' " Linda Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam Sent: Tu

Re: [Jprogramming] Design goals readability and write, ability?

2014-07-16 Thread Erling Hellenäs
i. i. DropRedundantBlanksM [: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:) }. ]) ([: (] +. $ {. 1 , }:) ' ' ~: ]) # ] /Erling On 2014-07-15 22:43, David Lambert wrote: Each j verb (unless locked, I presume) tells its definition. One of my favorite j features. f'' hi world! hi world! hi world!