[Jprogramming] IXML grammar for parse J

2023-10-05 Thread LdBeth
I'm planning to make a literate programming tool for J, and the first step is to make a parser that can tokenlize J. https://gist.github.com/LdBeth/8277950958b964d0778d70ffd3d998de Almost everything except multi line explicit definitions are supported, including multi line direct defin

Re: [Jprogramming] Issue with dual/under

2023-10-13 Thread LdBeth
an important reason was that Roger Hui wasn’t a big fan of the >> proposed extension known as “structural under” ldbeth -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Issue with dual/under

2023-10-14 Thread LdBeth
I feel similar feature is covered by @ (At) from Dyalog APL, as I can think of the definition for monadic "structural under" using APL could roughly be r←(f sunder g)y;i i←,g⍳⍴y r←(f@i)y (⌽sunder,) 3 3⍴⍳9 9 8 7 6 5 4 3 2 1 ldbeth >>>>> In >>>&

Re: [Jprogramming] A Dot-Graph Rotator?

2023-11-16 Thread LdBeth
The keyword you would need to looking for is "affine transformation" https://en.wikipedia.org/wiki/Affine_transformation Where image rotation is just a special case [ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 00 1 ] And you can combine with other linear tr

Re: [Jprogramming] String replacement question

2023-12-02 Thread LdBeth
A very clever gimmick I saw from https://xpqz.github.io/AoC-day1/ is replace the following composite words: 'oneight' 'eightwo' 'nineight' 'twone' 'sevenine' 'eighthree' by '18' '82' '98' '21' '79' '83' And it totally works XD > In > David Pinchbeck wrote: > I'm trying to improve

[Jprogramming] AoC Day5 part2

2023-12-05 Thread LdBeth
While I know the most efficient way would be implement something like an interval set, I'm just too lazy so instead I trust J can be efficient enough and I can write efficient enough J program to solve by brutal force. It spent about 30 minute to get the result up to the fourth pair, that is 2714

[Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread LdBeth
igher dimension cases, how to implement this in J? LdBeth -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread LdBeth
thank to everyone who presented their answer. LdBeth >>>>> In >>>>> "'Viktor Grigorov' via Programming" wrote: Viktor> A fully tacit solution would encapsulate the predicate too, Viktor> here parenthesized for emphasis: Viktor>   

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-19 Thread LdBeth
n ^ Page 40, "5 Registered names for globals and functions" avoid confiction among names is to ^ I'll continue to explore the program and may send more feedbacks. LdBeth >>>>> In <9cf51392-f6c2-4726-88d1-bb22f903d...@smccak

Re: [Jprogramming] Index of item in table

2023-12-26 Thread LdBeth
This is related to the question I asked several days ago, http://jsoftware.com/pipermail/programming/2023-December/062994.html My suggestion would be 8 (($@])#:[i.~,@]) A 1 3 Although you might want to an alternative behavior when there are multiple matches. LdBeth :) >>

Re: [Jprogramming] Bug in sorting?

2023-12-28 Thread LdBeth
0 0 1 1 0 1 0 0 0 p /: p JE has crashed, likely due to an internal bug. Please report the code which caused the crash, as well as the following printout, to the J programming forum. LdBeth >>>>> In <9d48c6be-8497-4dfd-8b17-415a135c1...@students.mimuw.edu.pl> >&g