Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Erling Hellenäs
Hi all! It seems there are some more possibilities with your solutions. You are doing some kind of program generation? It has similarities with having functions as primary citizens, but it is not the same because it does not happen at runtime? What is passed is ascii representations of function

Re: [Jprogramming] Partitions

2017-10-25 Thread Linda Alvord
OK in jqt, but not in android. f=:]I.~[:+/\[*[:#] g=: ' 4 :'(x f y) wrote: Skip, not sure the status of a solution for this yet (Raul’s was last closest I believe ?). I thought through the following analysis over the weekend, more around combinatorics. Problem is to split a list of objects o,

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
I think you've introduced some false dichotomies here. First off, it's true that the J implementation is an interpreter, and it does not compile J to native code. Instead, it compiles J to an intermediate form which includes some ascii and some data structures. The displayed form represents those

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Erling Hellenäs
Hi all ! This post describes what I call the ascii representation. http://www.jsoftware.com/pipermail/programming/2017-October/049324.html An example:    ((<('+';'/');'%';'#'))(`:6) 1 2 3 2    ((<('+';'/');'%';'#')) ┌───┐ │┌─┬─┬─┐│ ││┌─┬─┐│%│#││ │││+│/││ │ ││ ││└─┴─┘│ │ ││ │└─

[Jprogramming] stop manager in j602

2017-10-25 Thread adam dunne
Has it been disabled? -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
Yes, sort of, you are building atomic representations there. Note also that the box drawing characters are used to represent structure - you did not supply them as literals. But, take a look at t.c in the J engine source code to see an initial hint about what I am really talking about. Note also t

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
RM> That said, describing the purpose of hg (and why one would want to use RM> hg instead of av) is eluding me at the moment. Maybe when I wake up RM> some more I would be better prepared to address this. The hg specification states that the argument for the workhorse verb is the atomic representa

Re: [Jprogramming] Partitions

2017-10-25 Thread 'Skip Cave' via Programming
Raul got it right with his nparts verb. In my original example of par, I constructed the required output of par by hand. In that process, I overlooked the majority of the possible combinations of the ways that 5 items could be separated into 3 containers. That caused confusion in the various attemp

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
On Wed, Oct 25, 2017 at 12:23 PM, Jose Mario Quintana wrote: > RM> That said, describing the purpose of hg (and why one would want to use > RM> hg instead of av) is eluding me at the moment. Maybe when I wake up > RM> some more I would be better prepared to address this. > > The hg specification s

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Erling Hellenäs
Hi all! It does not seem picky about the representation.    atomic =:[: 5!:1 <    boxed =: [: 5!:2 <    f=: +/ % #    (atomic'f') `:6 +/ % #    (boxed'f') `:6 +/ % #    atomic'f' ┌─┐ │┌─┬─┐│ ││3│┌───┬─┬─┐││ ││ ││┌─┬───┐│%│#│││ ││ │││/│┌─┐││ │ │││ ││ │││ ││+│││ │ │

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
It is, in fact, picky but yes: your example here does not illustrate that pickiness. Also, (`:6) supports parsing sequences of representations and also supports representations of the result of parsing those sequences. This is similar to how both 1+1 and 2 can represent the same value in mathemat

Re: [Jprogramming] Partitions

2017-10-25 Thread Lippu Esa
Hello, I get the following with the partition verb I posted last Thursday (J8.06 and 4 core 2.9GHz CPU and 16GB RAM): par2=: 4 : 0 a=.(y#x) #: i. x^y sort ~.((x=#@~."1 a)#a) mailto:[email protected]] On Behalf Of 'Skip Cave' via Programming Sent: Wednesday, October 25, 20

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Erling Hellenäs
   ('+';'/';'%';'#') `:6 +/ % #    ('+';'/';'%';'#') `:6[ 1 2 3 2    ('+';'/';'%';'#') ┌─┬─┬─┬─┐ │+│/│%│#│ └─┴─┴─┴─┘ /Erling On 2017-10-25 20:25, Raul Miller wrote: It is, in fact, picky but yes: your example here does not illustrate that pickiness. Also, (`:6) supports parsing sequences of rep

[Jprogramming] Jd update

2017-10-25 Thread Eric Iverson
J database addon has been updated. This release continues to accept old style commercial and non-commercial keys. New users require a new style key. See http://code.jsoftware.com/wiki/Jd/License for info on the new keys. A big change is that evaluation and non-commercial use is no longer free.

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
Hi EH> EH> It seems there are some more possibilities with your solutions. You are Not necessarily, explicit adverbs can do whatever a (v hg) adverb can; however, (v adv) can do things that explicit adverbs are not allowed to do. EH> doing some kind of program generation? Usually, I am. EH> It

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
"Atomic representation is structurally similar to J's internal representation, though, and as it is an executable form (albeit one that needs a bit more interpretation than the internal representation), it also qualifies as an intermediate form. Converting from atomic representation to internal for

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
On Wed, Oct 25, 2017 at 4:51 PM, Jose Mario Quintana wrote: > Not necessarily, explicit adverbs can do whatever a (v hg) adverb can; > however, (v adv) can do things that explicit adverbs are not allowed to do. Are you sure? If by "do" you mean something about the details of how the adverb is st

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
" Consider, for example, using the 0: and 1: verbs as placeholders in a gerund and substituting in a verb for the 0: argument and a boxed copy of a noun for the 1: argument in this gerund template: 0:&.>/\.&.(,&1:)&.|.&.(<"_1) a0 hg gives us a way of defining these transformations as verbs, but we

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
The key word is "allowed." For example, * X) 3 6 Of course, they can break the rules, t3=. 1 : 'x wrote: > On Wed, Oct 25, 2017 at 4:51 PM, Jose Mario Quintana > wrote: > > Not necessarily, explicit adverbs can do whatever a (v hg) adverb can; > > however, (v adv) can do things that e

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
Sure, here's one example: s0=: 1 :'m"_^:((<''0:'')=])"0 L:1' s1=: 1 :'m"_^:((<''1:'')=])"0 L:1' template=: 0:&.>/\.&.(,&1:)&.|.&.(<"_1) a0 t0=:1 :0 tC0 m ) tC0=:2 :0 : ((<(0;1;0){::( wrote: > " > Consider, for example, using the 0: and 1: verbs as placeholders in a > gerund and substituting

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
Ok, but this gets into the question of whether constructs mixing tacit and explicit mechanisms are tacit or explicit. Thanks, -- Raul On Wed, Oct 25, 2017 at 5:47 PM, Jose Mario Quintana wrote: > The key word is "allowed." For example, > > >* ┌─┐ > │*│ > └─┘ >X=. * >2 (>X) 3 >

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Jose Mario Quintana
A tacit version of the adverb t0 can easily be produced via hg. However, it would be a faithful alternative, meaning it will produce tC0 with a bonded argument, just as t0 does. If the goal is to do the whole thing tacitly that would be another matter. It could get messy because tC0 is a conjunc

Re: [Jprogramming] Trains: past, present and ...

2017-10-25 Thread Raul Miller
I agree. (Well, ... except that modifying words like "easily" are not actually quantifiable and tend to refer to concepts which are highly variable.) Thanks, -- Raul On Wed, Oct 25, 2017 at 8:06 PM, Jose Mario Quintana wrote: > A tacit version of the adverb t0 can easily be produced via hg.

[Jprogramming] stop manager in j602

2017-10-25 Thread adam dunne
Has stop manager in j602 been disabled? -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] stop manager in j602

2017-10-25 Thread bill lam
I don't think so. What makes you to think that? On Oct 26, 2017 11:41 AM, "adam dunne" wrote: Has stop manager in j602 been disabled? -- For information about J forums see http://www.jsoftware.com/forums.htm ---

Re: [Jprogramming] Partitions

2017-10-25 Thread 'Skip Cave' via Programming
Lippu, Yes, your par2 is MUCH faster than Raul's nparts. If I have some time, I will put together a time/space test for all the proposed solutions. Skip Skip Cave Cave Consulting LLC On Wed, Oct 25, 2017 at 1:58 PM, Lippu Esa wrote: > Hello, > > I get the following with the partition verb I p