Re: [Jprogramming] Bug? in qtide.

2014-02-20 Thread Jan-Pieter Jacobs
It is basically after closing the file you just opened. So when no files are open, the run button (and possibly others) should disappear or be deactivated. Jan-Pieter 2014-02-21 0:54 GMT+01:00 chris burke : > I cannot reproduce this. > > Do you only get the error when the file is empty? Do you

Re: [Jprogramming] What does this do?

2014-02-20 Thread Linda Alvord
I wondered if this really was a table or just a bunch of lines, but it really is a table. ]M=:(h"0) 1+i.7 1 0 0 0 0 0 0 1 2 0 0 0 0 0 1 2 1.5 0 0 0 0 1 2 1.5 1.7 0 0 0 1 2 1.5 1.7 1.6 0 0 1 2 1.5 1.7 1.6

Re: [Jprogramming] What does this do?

2014-02-20 Thread Linda Alvord
The tables show what is happening quite nicely. g=: 13 :'(+%)/\ y $ 1x' (g"0) 1+i.7 1 0 0 0 00 0 1 2 0 0 00 0 1 2 3r2 0 00 0 1 2 3r2 5r3 00 0 1 2 3r2 5r3 8r50 0 1 2 3r2 5r3 8r5 13r8 0 1 2 3r2 5r3 8r5 13r8 21r13 h=:

Re: [Jprogramming] What does this do?

2014-02-20 Thread Linda Alvord
WOW! This is quite impressive! {|.(+%)/\100$1x 573147844013817084101r354224848179261915075 0{|.(+%)/\200$1x 453973694165307953197296969697410619233826r280571172992510140037611932413038 677189525 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:p

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Pascal Jasmin
" I doubt non like-for-like substitutions (in terms of word class) will ever work; at least not in general." I understand that the source template still has to parse before and after substitutions.  Candidates for the placeholders would be: _: for verbs The difficulty for adverbs and conjuncti

Re: [Jprogramming] What does this do?

2014-02-20 Thread Don Guinn
Adjacent terms approach the golden ratio. 0j5":2%~/\% 1 +. (+%)/\ 20$1x 1.0 2.0 1.5 1.7 1.6 1.62500 1.61538 1.61905 1.61765 1.61818 1.61798 1.61806 1.61803 1.61804 1.61803 1.61803 1.61803 1.61803 1.61803 > --

Re: [Jprogramming] What does this do?

2014-02-20 Thread Linda Alvord
It is the first definition I've seen of the Fibonacci series which allows an explicit verb to be translated into a tacit expression. f=: 13 :'% 1 +. (+%)/\ y $ 1x' f 7 1 1 2 3 5 8 135 f [: % 1 +. [: (+ %)/\ 1x $~ ] 5!:4 <'f' 5!:4 <'f' -- [:

Re: [Jprogramming] What does this do?

2014-02-20 Thread Roger Hui
If you want just the n-th term, you can do as follows, (+%)/ instead of (+%)/\ % 1 +. (+%)/ 100$1x 354224848179261915075 On Thu, Feb 20, 2014 at 6:48 PM, Linda Alvord wrote: > It allows you to find the 100th term in a Fibonacci series. > > 0}|.% 1 +. (+%)/\ 100 $ 1x > 35422484817926191

Re: [Jprogramming] What does this do?

2014-02-20 Thread Raul Miller
It also can help to think about this if you realize that adjacent numbers in the fibonacci sequence are relatively prime. Thanks, -- Raul On Thu, Feb 20, 2014 at 9:04 PM, elton wang wrote: > Two building blocks are needed for this: one is you already know the > relationship of continued frac

Re: [Jprogramming] What does this do?

2014-02-20 Thread Linda Alvord
It allows you to find the 100th term in a Fibonacci series. 0}|.% 1 +. (+%)/\ 100 $ 1x 354224848179261915075 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Roger Hui Sent: Thursday, February 20,

Re: [Jprogramming] What does this do?

2014-02-20 Thread elton wang
Two building blocks are needed for this: one is you already know the relationship of continued fractions and Fibonacci  numbers, and another is that you know (+%)/ is for  continued fractions. In the same vein, we can also try this (1&(+%)^:_)1 ( = 1.61803, golden ratio) On Thursday, Febru

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Raul Miller
This would be more fun if you provided definitions for tie and rank (and others you use) in an addon. Without that, it feels like deus ex machina (and does not execute for me like it does for you). Thanks, -- Raul On Thu, Feb 20, 2014 at 6:06 PM, Jose Mario Quintana < jose.mario.quint...@gmai

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Raul Miller
I'd use an explicit adverb to do: linrep substitute eval assign return assigned value. I'm not sure if we have a prebuilt routine to substitute a sequence of strings into repeats of the same pattern - if not, that would be the "complex" part of this. Thanks, -- Raul On Thu, Feb 2

Re: [Jprogramming] user in JQT Editor

2014-02-20 Thread greg heil
Chris >In the left panel of the Edit window there are three icons. The first icon is >labeled "Refresh" and appears to that. The third is "Set path from document" >and does that. The middle is labeled "Home" and seems to be hardwired (in my >case) to "D"/Users/temp". >However in the Term windo

Re: [Jprogramming] What does this do?

2014-02-20 Thread PMA
I see -- thanks. Roger Hui wrote: With 10 elements it doesn't matter. When you get to higher number of elements, you run out of precision in 64-bit floats and would need the extended precision arithmetic that comes with 1x. On Thu, Feb 20, 2014 at 1:37 PM, PMA wrote: Why 'x'? (I get the s

Re: [Jprogramming] What does this do?

2014-02-20 Thread PMA
I see - thanks. Roger Hui wrote: With 10 elements it doesn't matter. When you get to higher number of elements, you run out of precision in 64-bit floats and would need the extended precision arithmetic that comes with 1x. On Thu, Feb 20, 2014 at 1:37 PM, PMA wrote: Why 'x'? (I get the

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Dan Bron
Adverb and conjunction templates are straightforward. Multiple substitutions won't be difficult, but will inflate our codebase a bit (the L: approach is well suited to single substitutions, but unless we insist on a distinct "blank token" for each substitution [like named parameters], we'll have

Re: [Jprogramming] user in JQT Editor

2014-02-20 Thread chris burke
When File|New or Open is selected in the editor, the directory shown initially is the current Project directory if any, otherwise if no Project is open, it is ~temp. HOME (or ~home) is not referenced here. On Fri, Feb 21, 2014 at 8:01 AM, Don Kelly wrote: > I set up a HOME directory and had pr

Re: [Jprogramming] user in JQT Editor

2014-02-20 Thread Don Kelly
I set up a HOME directory and had problems so I re-installed -letting the installer do its bit and it automatically put me into c:/users/don/j64-801 which it apparently assumed was "HOME" even though I still had a HOME directory. and have had no problem with the editor . Don Kelly On 19/0

Re: [Jprogramming] Bug? in qtide.

2014-02-20 Thread chris burke
I cannot reproduce this. Do you only get the error when the file is empty? Do you have write permission in the ~temp folder? On Fri, Feb 21, 2014 at 1:31 AM, Jan-Pieter Jacobs < janpieter.jac...@gmail.com> wrote: > Here , I see the same behaviour. > > Jan-Pieter > > > 2014-02-20 18:20 GMT+01:00

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Jose Mario Quintana
" Anyway, thought I'd share, and see if anyone else has useful tools for manipulating J code (metaprogramming). " Dan, I will try to show some meta-programming exercises soon. I am jumping into the darkness hoping that I will land well; so far, so good. In the meantime, the following is a F^4 un

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Pascal Jasmin
very cool.  To help people understand it, the requirements for the template are that it is an implicit definition, and that it parses ok, and also that it is a verb (modifiers don't play well as gerunds). with that in mind, here are some verbs to make things a bit easier: substit  =: [^:(__-:])

Re: [Jprogramming] What does this do?

2014-02-20 Thread Roger Hui
See also http://www.jsoftware.com/jwiki/Essays/Fibonacci%20Sequence It is another way to the "Why J?" (or "Why APL?") question. Because it allows, encourages, assists, ... you to think of 10 different ways of generating the Fibonacci numbers and other similar questions. Several factors come into

Re: [Jprogramming] What does this do?

2014-02-20 Thread Nollaig MacKenzie
Weird. You don't need a very big N for (+%)/ N $ 1 to be pretty close to the Golden Ratio (Phi): 2%~1+%:5 Maybe not so weird. Just looked at Huntley _The Divine Proportion_, and he has a chapter "Phi and Fibonacci". On 2014.02.20 12:42:00, you, the extraordinary Roger Hui, spake thus: > % 1

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Dan Bron
Sorry, I should have clarified the goal is to permit the user to supply the template as data. So we can do things like: '`round digits log'=:(0.5<.@:+])&.:(%&__)`(__&#.^:_1)`(__&^.) substit"0~ 0.01 10 1x1 round (0.5 <.@:+ ])&.:(%&0.01) digits 10&#.^:_1 log 2.7182818284590451&^. --

Re: [Jprogramming] What does this do?

2014-02-20 Thread Roger Hui
With 10 elements it doesn't matter. When you get to higher number of elements, you run out of precision in 64-bit floats and would need the extended precision arithmetic that comes with 1x. On Thu, Feb 20, 2014 at 1:37 PM, PMA wrote: > Why 'x'? (I get the same result without it.) > > - Pete

Re: [Jprogramming] What does this do?

2014-02-20 Thread PMA
Why 'x'? (I get the same result without it.) - Pete km wrote: Here is a hint: % 1 +. (+%)/\ 10 $ 1x 1 1 2 3 5 8 13 21 34 55 --Kip Murray Sent from my iPad On Feb 20, 2014, at 2:42 PM, Roger Hui wrote: % 1 +. (+%)/\ 100 $ 1x --

Re: [Jprogramming] What does this do?

2014-02-20 Thread Dan Abell
Indeed!! On 20 Feb 2014, at 14:27, Peter B. Kessler wrote: > The really interesting question is: How can I learn to think that way? -- Dan T. Abell :: dabell at txcorp dot com :: 303.444.2452 Tech-X Corp., 5621 Arapahoe Ave, Ste A, Boulder CO 80303 http://www.txcorp.com :: 303.748.6894/c 303.44

Re: [Jprogramming] What does this do?

2014-02-20 Thread Peter B. Kessler
A more interesting question is: Why did you think of doing it that way? The really interesting question is: How can I learn to think that way? ... peter On 02/20/14 12:42, Roger Hui wrote: % 1 +. (+%)/\ 100 $ 1x

Re: [Jprogramming] What does this do?

2014-02-20 Thread Lizanets Danylo
Fibonacci  numbers --- Original message --- From: "Roger Hui" < rogerhui.can...@gmail.com > Date: 20 February 2014, 22:42:12 % 1 +. (+%)/\ 100 $ 1x -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] What does this do?

2014-02-20 Thread km
Here is a hint: % 1 +. (+%)/\ 10 $ 1x 1 1 2 3 5 8 13 21 34 55 --Kip Murray Sent from my iPad > On Feb 20, 2014, at 2:42 PM, Roger Hui wrote: > > % 1 +. (+%)/\ 100 $ 1x > -- > For information about J forums see http://www.j

[Jprogramming] What does this do?

2014-02-20 Thread Roger Hui
% 1 +. (+%)/\ 100 $ 1x -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Generating code from templates

2014-02-20 Thread Raul Miller
This seems really simple, to me. Of course, it's hard to tolerate simplicity - it's kind of boring, so we like to discard features of the language. I think of this urge as a social artifact of our need for J subset compilers. Still, even if we had compilers, it might still make sense to start wit

[Jprogramming] Generating code from templates

2014-02-20 Thread Dan Bron
There was a question on StackOverflow today on generating constant functions from the items of an array. As in, 100 200 300 <==> 100"_`(200"_)`(300"_) . As a more general question, how can we specify code templates and then use them to dynamically produce gerunds for later execution? * Here's on

Re: [Jprogramming] Bug? in qtide.

2014-02-20 Thread Jan-Pieter Jacobs
Here , I see the same behaviour. Jan-Pieter 2014-02-20 18:20 GMT+01:00 Kenneth Lettow : > I came across this accidentally, I usually try to run code instead of > executing empty files. > > 1. run JQT > 2. File-> New Temp > 3. In edit window, close temp file/others so that there are no open file

[Jprogramming] Bug? in qtide.

2014-02-20 Thread Kenneth Lettow
I came across this accidentally, I usually try to run code instead of executing empty files. 1. run JQT 2. File-> New Temp 3. In edit window, close temp file/others so that there are no open files. 4. Press the run icon (Green arrow). 5. J crashes Problem signature: Problem Event Name: APPCRASH