Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread 'Pascal Jasmin' via Programming
from my extensions at https://github.com/Pascal-J/jpp I use cut on ` for "everything" replacing any native ` with named conjunctions that  build gerunds with a more complete spec. as many of you know, you can build a multiline sentence with a a list of boxed strings.  bb =: 1 : 'dltb each (''`

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread Henry Rich
I don't see much downside to implementing a sentence delimiter, except for a nagging feeling that the good Lord left that space for you to put commentary in. Take a moment to consider what is the best delimiter.  I prefer >:: to .. or ... because it shows the left-to-right order. Henry Rich

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread 'Pascal Jasmin' via Programming
An alternative is to create modifiers for each of your examples take =: (*@[ * |@[ <. #@:]) {. ] forfirst =: 2 : '(v }. ]) ,~^:(0 < #@[) [ u v take ]' -@] forfirst (1) 1 2 3 _1 2 3 3 - forfirst (4) 1 2 3 2 1 0 there is a definition for the obverse of {. (though it seems useless, as the co

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Marshall Lochbaum
Yes, not all structural functions can be recognized (I use "well defined" in the mathematical sense meaning that the definition never allows two conflicting results for the same arguments; it's actually sort of a complement to "defined"). In practice recognizing structural functions isn't difficul

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Raul Miller
Your concept of a structural function might be well defined mathematically, but it's not clear to me that recognizing structural functions could be efficiently implemented for the general case of user defined structural functions. I think this means that you wind up requiring the user to declare w

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Raul Miller
This breaks existing uses of under, which means that you would need a different token (or word) to represent structural under. And, if you're doing that, it would make sense to define a new word to represent "structural under". But, also, this gets into issues of rank and depth and what is intend

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread Raul Miller
Well... it's easy enough to model: l2r=:{{0!:0;,&LF@(;:inv)&.><;._1;:'.. ',y}} l2r 'echo 1+1 .. echo 2+2 .. echo 3+3' 2 4 6 Note that if this model were presumed to be strict, this would mean that sentences separated by .. would not implicitly return values. I am not sure if this matches your

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Marshall Lochbaum
I'm the inventor(?) of structural Under. I won't comment on whether it makes sense for J but can offer a little more context. The operation is well defined: here's a specification with proof. It's pretty difficult because it needs to support arbitrary paths into a nested array, but would be much s

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Elijah Stone
On Mon, 26 Jul 2021, Raul Miller wrote: I think that the problem here would be in defining vu to work in your examples. I definitely don't think that's the problem! Here are some definitions; untested, but hopefully illustrative: ',': $@>@{. $ >@{: '{.': >@{: , }.@>@{. '}.': {.@>@{. , >

Re: [Jprogramming] Feature proposal: structural under

2021-07-26 Thread Raul Miller
I think that the problem here would be in defining vu to work in your examples. If you could do that, I think you would have something. Without that, though, we would need a different approach. Thanks, -- Raul On Mon, Jul 26, 2021 at 3:57 PM Elijah Stone wrote: > > 'Structural under' is an e

[Jprogramming] Feature proposal: structural under

2021-07-26 Thread Elijah Stone
'Structural under' is an extension to under (&. &.:) that allows it to operate on otherwise uninvertible structure-changing verbs. It is implemented in dzaima/apl (https://github.com/dzaima/APL/). For example: -&.{. 1 2 3 4 NB. take the head, negate it, reaffix it to the rest of the body

Re: [Jprogramming] initial version of tangentstorm/j-kvm

2021-07-26 Thread Michal Wallace
Microsoft's console has traditionally been limited to 16 colors. Some time ago they decided to support a wider range of features that make it work more like xterm on Linux. It also gives you 24 bit color and multiple console tabs on the same window. You can get it for free from the Microsoft store

Re: [Jprogramming] initial version of tangentstorm/j-kvm

2021-07-26 Thread 'Michael Day' via Programming
Thanks. Your "readme" file says: *    Note:*on windows, you need the stock|jconsole.exe|that comes with J,/and/you need to run it through the"new" Windows terminal . The ' "new" Windows terminal ' is indeed news to me.  I realise you provide a link to "

[Jprogramming] initial version of tangentstorm/j-kvm

2021-07-26 Thread Michal Wallace
The initial version of the 'j-kvm' terminal driver is here: https://github.com/tangentstorm/j-kvm It provides keyboard, video, and mouse support for console mode applications on windows and linux, (and maybe OSX, if anyone with a mac cares to test it...) It kind of does what ncurses does (le

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread 'Michael Day' via Programming
APL lives/d with the diamond separator,  which works from left to right,  in addition to left tack and right tack (in Dyalog anyway) which are similar to J's [  and  ]  . So this modification might help recruit any APL-ers still averse to or unaware of J. Cheers, Mike On 26/07/2021 14:47,

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread Eric Iverson
Michal, I slightly favor having a statement separator. Others are violently opposed. You have started an interesting discussion that might take a while to pick up steam. Don't give up yet! There are some complicating issues, such as debug. On Mon, Jul 26, 2021 at 4:57 AM Michal Wallace wrote: >

Re: [Jprogramming] github addons vs 'main' branch

2021-07-26 Thread Michal Wallace
Actually... It should probably try 'main' and then switch to 'master' as a backup, since people may switch to 'main' but leave an old 'master' branch lying around... On Mon, Jul 26, 2021 at 8:58 AM Michal Wallace wrote: > > Github no longer uses 'master' as the default branch name for new > repo

[Jprogramming] github addons vs 'main' branch

2021-07-26 Thread Michal Wallace
Github no longer uses 'master' as the default branch name for new repositories. The new standard default branch is 'main'. It does look like you can say : install 'github:user/repo@main' Perhaps if the branch is left blank and 'master' doesn't exist, it could try 'main' instead?

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-26 Thread Michal Wallace
Come on... :) Obviously I know how to write the code I wrote. :D Yes, I can write the whole thing like this: puts@']' fgc@9 puts 4 {. s=.1|.s [ fgc@15 puts@'[' goxy xy [ bgc 4 [ fgc 9 I'm just saying it looks backwards and awkward to me. This thing draws a string on the screen that looks like