Re: [Jprogramming] Complex tolerant comparison

2022-02-23 Thread Hauke Rehr
this juxtaposition of words is incomprehensible to me _ is one exact value: the limit of any sequence growing unboundedly this one exact value is equal to itself no matter the sequence adding sequences diverging towards _ and __ doesn’t lead to a single defined result → NaN, same goes for

Re: [Jprogramming] Complex tolerant comparison

2022-02-23 Thread Hauke Rehr
, and they should perhaps compare equal, but they are also clearly distinct in some sense.  -E On Wed, 23 Feb 2022, Hauke Rehr wrote: this juxtaposition of words is incomprehensible to me _ is one exact value: the limit of any sequence growing unboundedly this one exact value is equal to itself

Re: [Jprogramming] plot: units ratio

2022-03-22 Thread Hauke Rehr
There is some value in convenience, and this question didn’t come up for the first time. It’s not to be expected to be the last time either unless an easy solution is provided. Taking the “white pixels” approach, there could be something like pd 'crop xmin xmax ymin ymax' NB. or 'borders' in

Re: [Jprogramming] Verb concatenation

2022-04-02 Thread Hauke Rehr
How about foo0`foo1`foo2`foo3 `:0 '' ? Am 02.04.22 um 19:42 schrieb Devon McCormick: Hi, I have a group of monadic verbs for which I want the concatenated result, e.g. foo0=: 3 : '0' foo1=: 3 : '1' foo2=: 3 : '2' foo3=: 3 : '3' allfoo=: foo0,foo1,foo2,foo3 allfoo '' 0 1 2

Re: [Jprogramming] named noun internals

2022-04-05 Thread Hauke Rehr
Thanks for the enlightening insights into some detail of the workings of JE internal address management. Much appreciated. Am 05.04.22 um 04:29 schrieb Henry Rich: I should have said 'the J symbol AREA is a contiguous array...'  The symbol tables are separate structures (closed-address

Re: [Jprogramming] RFC: unicode

2022-03-22 Thread Hauke Rehr
Sure. Most J programmers can’t tell nouns and adjectives apart. We don’t even have a type function returning grammar terms indicating what part of speech our entities are. Poor us! We should have been “more careful.” Am 22.03.22 um 01:00 schrieb Raul Miller: Be careful here -- "implementation"

Re: [Jprogramming] plot: units ratio

2022-03-22 Thread Hauke Rehr
do they? looks all good to me Am 21.03.22 um 22:47 schrieb Elijah Stone: (A side note: does anyone know why when I post REPL session transcriptions, they become misaligned?) -- -- mail written using NEO neo-layout.org

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-01 Thread Hauke Rehr
Personally, I’m fine with the little syntax highlighting I get in vim. Much could be improved but I don’t feel I need it. But there doesn’t seem to be a pygments lexer for J. I find an APL lexer, though [1] Has anyone tried to provide one already? @Michal: could you talk about the way you did

Re: [Jprogramming] Sierpinski triangle

2022-02-01 Thread Hauke Rehr
You already understood that some kinds of brackets don’t come in balanced pairs. But parentheses () nearly always do, the exceptions being inside of strings, obviously, and closing ) on a line of its own (which doesn’t occur here, so I won’t explain that). (oh, and {{…}} introduced another

Re: [Jprogramming] Syntax highlighting WAS: Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-01 Thread Hauke Rehr
-study to inform the design of a serviceable dictionary feature for J. On Tue, 1 Feb 2022 at 19:49, Hauke Rehr wrote: Personally, I’m fine with the little syntax highlighting I get in vim. Much could be improved but I don’t feel I need it. But there doesn’t seem to be a pygments lexer for J. I

Re: [Jprogramming] Sierpinski triangle

2022-02-01 Thread Hauke Rehr
another approach that could be helpful with respect to that question: try removing that , and rearranging )@{:)^:y to become )^:y)@{: in the definition what does it compute now? Sierpinski =: {{ (((72#:~8#2){~3#.\0,],0:)^:y)@{: ,: 1 y} (>:+:y) $ 0 }} ' #'{~ Sierpinski"0 i.>:15 This gives

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-01 Thread Hauke Rehr
So there was some kind of misunderstanding. Perceived point of view: There should be a total ordering on the (in theory) infinite set of J values. Fine. And maybe more than one (Elijah already pointed at <. vs /:) in different contexts. This again drives us to the question: Do we actually want

Re: [Jprogramming] Find nth duplicate in vector

2022-01-27 Thread Hauke Rehr
I wonder why there’s still so much traffic on this thread (okay, I’m to blame for quite some of it) I thought xash published the best correct solution. Am I wrong? Am 27.01.22 um 18:42 schrieb 'Mike Day' via Programming: Pawel Jakubas has moved on to something else in his correspondence,

Re: [Jprogramming] Report on the J wiki meeting of January 27, 2022

2022-01-31 Thread Hauke Rehr
I’d rather have the shape with respect to the topmost other kind. First axis numeric: the numeric shape below which the first symbolic one occurs first axis symbolic: vice versa you may need to check the return value of the adjusted implementation of the datatype primitive for those “other kind”

Re: [Jprogramming] Report on the J wiki meeting of January 27, 2022

2022-01-31 Thread Hauke Rehr
I also long time wanted to try it. I had no urgent need of it, so time just went by … boxed list of columns if we want mixed datatypes which would be necessary for a drop-in replacement of dataframes the list of column names imo should not be separated but those are implementation concerns

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-01 Thread Hauke Rehr
Same here. Let J be free to arrange at will. Conceptually having an order on the domain means talking about yet another kind of ds. (in the integral case, that’s good old arrays) Am 01.02.22 um 08:55 schrieb Elijah Stone: I still do not think of maps as having order. -- --

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
Where “null” is specified as _. right? Am 08.02.22 um 05:27 schrieb 'Pascal Jasmin' via Programming: set function is a combination of JP's set or delete functionality with k/q's upsert, with "merge" oriented optimizations for bulk oriented upserts.  To get JP's upsert or delete functionality,

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
To be honest, I’m a bit confused by the stated difficulty. I haven’t worked much with that value (yet) but this is what I thought it was meant to/would want it to work like: I got to know _. as a value that may be present in data, usually not first occurring as the result of a computation other

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
As long as it’s represented by different float values, that is. It shouldn’t have been a float to start with in my opinion. And I’d say _. -: _. _. in keeping with what I had been writing before. Am 08.02.22 um 20:52 schrieb Raul Miller: On Tue, Feb 8, 2022 at 2:43 PM Hauke Rehr wrote

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
don’t see a supporting rationale for this behavior (but again, I don’t have experience using it – maybe I just don’t know enough about it?) Am 08.02.22 um 20:55 schrieb Hauke Rehr: As long as it’s represented by different float values, that is. It shouldn’t have been a float to start with in my

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
Raul Miller: On Tue, Feb 8, 2022 at 2:55 PM Hauke Rehr wrote: _. -: _. Here, we're relying on floating point hardware. We don't use lookup tables to determine equality -- we use a machine instruction which tests values for equality. -- -- mail written using NEO neo

Re: [Jprogramming] _. WAS A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
Just for the sake of pointing out what my idea was, it would work like this (answers embedded): Am 09.02.22 um 00:02 schrieb Jan-Pieter Jacobs: The biggest problem I see is finding a good use for such null value. In many cases where a null value would make sense, J/APL found a different way of

Re: [Jprogramming] _. WAS A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
answeres below Am 08.02.22 um 21:12 schrieb Henry Rich: Generalities may spur the imagination, but to use _. we would need a detailed spec for what every verb would do given indeterminate input. Where would it appear in the collating sequence? Collating: maybe I’m naive but I thought it

Re: [Jprogramming] A new bind conjunction WAS: Dictionaries

2022-02-08 Thread Hauke Rehr
Intel® Core™2 CPU T9550 I understand that may be the problem. All zeros is quite sane (much better than all ones). Am 08.02.22 um 21:15 schrieb Henry Rich: I get 0 0 0 0 0 as I expected.  What's your CPU? Henry Rich On 2/8/2022 3:07 PM, Hauke Rehr wrote: As I said, I haven’t been using

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-06 Thread Hauke Rehr
I’d love having lua (and metalua), too. But I also doubt it fits well with J. Its tables make for a neat data description language, too, imo. I like them better than the JSON/yaml/whathaveyou style (whereas for most purposes other than config files, I prefer either a db or csv files). Am

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-06 Thread Hauke Rehr
namespaces are a general need in programming objects orientation has its niches where it actually makes sense even Guido van Rossum’s extremist object oriented language says $>python Python 3.9.4 (default, Apr 16 2021, 23:37:41) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or

Re: [Jprogramming] Table operations in J

2022-02-06 Thread Hauke Rehr
The indices were off by one in my solution wrt your python indices. You may use these instead: mat =: (+1=#\)"1 mat and mat =: (+3=#\) mat Am 06.02.22 um 20:35 schrieb Hauke Rehr: One way to achieve that would be mat =: (+0=i.@#)"1 mat and mat =: (+2=i.@#) mat Am 06.02.22 um 20:

Re: [Jprogramming] Table operations in J

2022-02-06 Thread Hauke Rehr
Where to start? Maybe work your way up to building that set of indices and then just use them for amending, maybe something like this mat =: _ (<"1 ,.~ i. # mat) } mat for the \ diagonal and mat =: __ ({ ;~ (#~ 2|>:) i.# mat) } mat for the even indices (even wrt python indices? replace >: by ]

Re: [Jprogramming] Table operations in J

2022-02-06 Thread Hauke Rehr
One way to achieve that would be mat =: (+0=i.@#)"1 mat and mat =: (+2=i.@#) mat Am 06.02.22 um 20:24 schrieb Andrew P: - Add 1 to each value in the first column x[:,1] += 1 - Add 1 to each value in the third row x[3,:] += 1 -- -- mail written using NEO neo-layout.org

Re: [Jprogramming] repeat n function

2022-01-27 Thread Hauke Rehr
2. you could try echo 'this' and smoutput 'that' 3. look up the definition of dyadic # (and $) (or just try it) 4. I don’t know exactly which behavior you want could you give some example in- and output of the more general function you’re after? Am 27.01.22 um 14:23 schrieb Pawel Jakubas: Dear

Re: [Jprogramming] repeat n function

2022-01-27 Thread Hauke Rehr
One way to get the simple repeat function is this: ] d =: >: i.3 1 2 3 f =: [ ;@# {.@] 1 f d;d 1 2 3 2 f d;d 1 2 3 1 2 3 3 f d;d 1 2 3 1 2 3 1 2 3 If you don’t call f with d;d but simply with d, then you can just define f =: ;@# which I consider an answer to your question 3.

Re: [Jprogramming] repeat n function

2022-01-27 Thread Hauke Rehr
Is something like this what you want? repeat =: 4 : 0 rshowx =. 'This is x inside repeat:',LF, ": x rshowy =. 'This is y inside repeat:',LF, ": y f =. [;@#{.@] d =. y rshowf =. 'These are x and y for f; and its result:',LF,,LF,.":x (;;f) d;d rshowx,LF,rshowy,LF,rshowf ) 3

Re: [Jprogramming] repeat n function

2022-01-27 Thread Hauke Rehr
Thanks Julian, this is Good Advice™ My cloumsy answer was meant to say “that’s not the J way” without actually spelling that out. But maybe it didn’t come across. Sometimes the best answer to “how?” is just “don’t!” Am 27.01.22 um 15:44 schrieb Julian Fondren: J doesn't have lexical scope so

Re: [Jprogramming] Programming question

2022-01-17 Thread Hauke Rehr
I didn’t do it much differently, conceptually. But instead of binary search (bisection) I split it up in ten buckets (dekasect). Apologies for the bad naming: another greek-latin hybrid, oh my … I split that way because I wanted to evaluate ones more often on small inputs than large. Didn’t

Re: [Jprogramming] Programming question

2022-01-17 Thread Hauke Rehr
This is a working solution. Not pretty, but it gets the job done. onesList =: (0<{.)`($:@}. + ((10 ^ <:@#) * 1<{.) + ((1 + 10 #. }.) * 1={.) + <:@# * {. * 10 ^ 2 -~ #)@.(1<#) ones =: 10 onesList@:(#.^:_1)"0 ] NB. tests ones 30 521 13 213 That was easy. Now for the “inverse:”

Re: [Jprogramming] composition

2022-01-22 Thread Hauke Rehr
I don’t quite get it; or rather, I disagree with most of it: Am 22.01.22 um 14:07 schrieb Raul Miller: This difference could be prevented by preventing names from being updated. And, languages have been implemented with that characteristic (for example, Haskell). (And, of course, quite a lot

[Jprogramming] }::

2022-01-19 Thread Hauke Rehr
mainly @HR what do you think about curlyrtcoco =: {{ m x} y }}"0 _ (2 0;1 1) 1 curlyrtcoco i. 3 3 0 1 2 3 4 5 1 7 8 0 1 2 3 1 5 6 7 8 ? Would this be worth adding as a primitive? I had some use for it, but not all too frequently. } can be viewed as a three noun argument function, but you

Re: [Jprogramming] }::

2022-01-20 Thread Hauke Rehr
} would be a more general solution. Henry Rich On 1/19/2022 9:53 PM, Hauke Rehr wrote: mainly @HR what do you think about    curlyrtcoco =: {{ m x} y }}"0 _    (2 0;1 1) 1 curlyrtcoco i. 3 3 0 1 2 3 4 5 1 7 8 0 1 2 3 1 5 6 7 8 ? Would this be worth adding as a primitive? I had som

Re: [Jprogramming] Programming question

2022-01-23 Thread Hauke Rehr
ones1 reads better than the original. factoring out {. and }. really helps. even though it means pairs of factors are “distributed” and one doesn’t immediately see which one is corresponding. if it hadn’t been for having it fit on one line, I had kept the recursive call separate, though. Am

Re: [Jprogramming] Programming question

2022-01-23 Thread Hauke Rehr
golfing a bit more, just for fun (but it may improve performance a tiny bit, too) ones1=: (1(,,<,=){.) +/@:* (0:`$:@.(0<#),X)@}. where XX…XX is either of (*10^<:)@#,(10^#),1+10#.] (,&1*10^(,~<:))@#,1+10#.] (,&1*10^_1

Re: [Jprogramming] composition

2022-01-22 Thread Hauke Rehr
But you can. Malbolge no doubt is a language. Am 22.01.22 um 15:45 schrieb Hauke Rehr: Wrong. Informed by an implementation means: this is a cooperative thing so there’s no point in mixing random syntax and semantics. -- -- mail written using NEO neo-layout.org

Re: [Jprogramming] Rank, transpose

2022-01-23 Thread Hauke Rehr
In that case: I stand corrected. Am 24.01.22 um 06:06 schrieb Elijah Stone: When I said 'harder to implement performantly', I was thinking of virtual nouns for verbs _without_ IRS/ITS.  But it occurs to me that it is not actually significantly more work, though you do need a new array

Re: [Jprogramming] Rank, transpose

2022-01-23 Thread Hauke Rehr
Asked for thoughts, so here they go: How many operations can be optimized to not actually bring it to the front? (special combinations wrt the t. family) Not that many, I think. So it’s better to actually 1. prepare your data layout and =: the result 2. apply an easily understood algorithm to

Re: [Jprogramming] wordle

2022-01-24 Thread Hauke Rehr
fun game – third try was correct but I guess the fun’ll wear off soon which is good because I don’t need another time sink ;) but there’s an interesting question: how exactly to prune depending on the feedback? at first, we don’t want to repeat any letters we already used in previous guesses

Re: [Jprogramming] Find nth duplicate in vector

2022-01-26 Thread Hauke Rehr
As Henry pointed out, do take a look at [1] for how to approach this in J If you want to understand my solution, just try it step by step. I repeat it here, with a bit of litter removed: f =: {{ (,~ {) {. I. (>: x) e."1 +/\ =/~ y }} NB. where does each number occur? =/~ d 1 0 0 0 0 0 0 0

Re: [Jprogramming] Find nth duplicate in vector

2022-01-26 Thread Hauke Rehr
Maybe this is what you want (but it’s not elegant) f =: {{ (,~ {) {. I. ( (>: x)"1) +/\ =/~ y }} 1 f d 2 5 2 f d 3 11 just a quick and dirty working solution (if 2 5 is the correct answer to 1 f d) Am 26.01.22 um 19:37 schrieb Pawel Jakubas: Dear J enthusiasts, I wonder how to

Re: [Jprogramming] Find nth duplicate in vector

2022-01-26 Thread Hauke Rehr
I don’t understand why it’s index 2 (first occurrence of 2) but 11 (third occurrence of 3) Am 26.01.22 um 19:37 schrieb Pawel Jakubas: Dear J enthusiasts, I wonder how to elegantly implement dyad f that takes as x=1,2,3... and y vector and returns nth duplicate value with index of that

Re: [Jprogramming] ArrayFire addon

2022-01-26 Thread Hauke Rehr
rows says: the first entry in col x is the n-th entry in values row 0 0th (if any) row 1 2nd (if any) (so in row 0 we had 2 values) row 2 3rd (if any) (so in row 1 we had 1 value) row 3 5th (if any) (so in row 2 we had 2 values) row 4 5th (if any) (so in row 3 we had 0 values) etc. Am 26.01.22

Re: [Jprogramming] ArrayFire addon

2022-01-26 Thread Hauke Rehr
should have read the first entry in row x … where x is the index of the number in list rows, and n is that number Am 27.01.22 um 01:25 schrieb Hauke Rehr: rows says: the first entry in col x is the n-th entry in values -- -- mail written using NEO neo-layout.org

Re: [Jprogramming] debian package

2022-01-14 Thread Hauke Rehr
I’m on a Debian based system and I can’t remember having installed J using a package manager, ever. [though maybe that’s only my bad memory] If there is a package, however, I’d prefer that. Am 14.01.22 um 15:24 schrieb Raoul Schorer: Hi, I noticed that j903 doesn't come as a Debian package

Re: [Jprogramming] NuVoc page for debug

2022-04-07 Thread Hauke Rehr
Yes, but this No, y is ignored, except when it produces an error. reads like y may produce an error /inside/ rather than before. As if y would not be evaluated (and maybe throw) outside. I’d expect that actually y isn’t ignored in that case but the call doesn’t occur at all because the

Re: [Jprogramming] If utility

2022-04-13 Thread Hauke Rehr
talking about conjunctions @. is much more like conventional if and works for multiple else-cases (like a switch) eg *:`+:`-@.(3|>./)("1) 3 2 $ i. 6 0 2 4 9 _4 _5 Am 13.04.22 um 15:05 schrieb Jan-Pieter Jacobs: I think your looking for power (^:), a conjunction though. +: ^:

Re: [Jprogramming] Google Bard question.

2023-08-30 Thread Hauke Rehr
But Skip seems to want feedback on the question (see subject). The question is fine, only the answer is flawed. Flawed in a way to be expected when directing such a question at Bard. Am 30.08.23 um 03:13 schrieb Devon McCormick: Try asking Bard about APL and matrix computations, then point out

Re: [Jprogramming] [Jbeta] J904 multithreading

2022-04-10 Thread Hauke Rehr
why not have a command line argument providing a default number? $USER may know better what they consider a good default Am 11.04.22 um 00:31 schrieb Raul Miller: It would be nice, I imagine, if we eventually had a mechanism like

Re: [Jprogramming] Help required

2022-04-08 Thread Hauke Rehr
not too efficient but something to start with one =: 3 3 $ 'abcdefghi' other =: 5 6 $ 'abceeedefabcabcdefghidef' find =: #~ one *./"1@:e.~ , $~ 2 3 ,~ */@:$ % 6: find other defabc abcdef ghidef Am 08.04.22 um 16:21 schrieb Richard Donovan: Hi J programmers I need help to discover

Re: [Jprogramming] Help required

2022-04-08 Thread Hauke Rehr
yes I’m stupid :) Am 08.04.22 um 16:32 schrieb Henry Rich: 2 3&$"1 -- -- mail written using NEO neo-layout.org -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
but with (9!:19) 1e_11 I get ({.e.}.)"1 w 0 0 0 1 1 Am 17.05.22 um 16:40 schrieb Hauke Rehr: oops, ignore that one – I see my mistake now Am 17.05.22 um 16:37 schrieb Hauke Rehr: I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)&q

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 so you would need a tolerance greater than that if you want to get at least one 1 with a sane value for tolerance, a 1 is not to be expected so what do you want to achieve, what do

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
oops, ignore that one – I see my mistake now Am 17.05.22 um 16:37 schrieb Hauke Rehr: I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 so you would need a tolerance greater than that if you want to get at least one 1

Re: [Jprogramming] comparison

2022-05-17 Thread Hauke Rehr
) 1e_11 I get ({.e.}.)"1 w 0 0 0 1 1 Am 17.05.22 um 16:40 schrieb Hauke Rehr: oops, ignore that one – I see my mistake now Am 17.05.22 um 16:37 schrieb Hauke Rehr: I didn’t revisit pe80 (its been quite some time I last looked at pe) but I get <./ ({.>./@:|@:-}.)"1 w 0.539284 s

Re: [Jprogramming] J path syntax for the current file's folder

2022-05-30 Thread Hauke Rehr
I usually have some similar prelude to some of my scripts. And I dislike it. I always thought there are better ways I am unaware of and have been too lazy to look up/ask here. Am 30.05.22 um 18:37 schrieb Raul Miller: Well... you could use the approach used here (lines 11 through 17):

Re: [Jprogramming] Visualizations WAS: Problem with @ (Atop)

2022-07-03 Thread Hauke Rehr
the parts visualizing @ etc to the respective pages, maybe linking back to an overview assembling all of these illustrations. Then I’ll be looking forward to your ideas for further improvement. Eg, I remember Ian not being satisfied with my presentation. Hauke Am 28.06.22 um 02:32 schrieb Hauke

Re: [Jprogramming] Problem with < (box) and > (open)

2022-07-02 Thread Hauke Rehr
(><]) value can be expanded to (> value) < (] value) which yields 0 (“false”) for any unboxed real value (> (<])) value can be expanded to (value > (<])) value and in turn to value > (<]) value and finally to value > value < ] value but value < ] value evaluates to the same as (><]) value above

Re: [Jprogramming] Problem with @ (Atop)

2022-06-27 Thread Hauke Rehr
But ←→ is used in maths, too. In the realm of logic, let φ and ψ be formulæ. If φ ←→ ψ is a tautology (in semantic parlance “is always true”) then φ and ψ may always be substituted for each other regardless of “circumstances” or “surrounding constraints.” So using that symbol (I don’t know to

Re: [Jprogramming] question about an other wikipedia entry...

2022-07-06 Thread Hauke Rehr
If you put something like export PATH=/home/username/jcurrent/bin/:$PATH into your .bashrc¹ and keep that symlink jcurrent, well, current, (which is a good idea in the first place) then you can just say #!/usr/bin/env jconsole instead. ¹ ~ in place of /home/username won’t do in this case!

Re: [Jprogramming] J Playground - linking to a website

2022-06-06 Thread Hauke Rehr
I’d love to see more hackers here, and there already are quite some. the press/the media abused that term hackers are usually good people it’s malicious people one has to defend against That being said, I agree as well. Am 06.06.22 um 22:07 schrieb Henry Rich: I agree. If we attract users,

Re: [Jprogramming] NYCJUG: Thinking in an Array Language

2022-07-19 Thread Hauke Rehr
Tom did, in the very post starting this thread: (1+i. 4 3) +/ . * 1+i. 3 4 38 44 50 56 83 98 113 128 128 152 176 200 173 206 239 272 Am 19.07.22 um 20:10 schrieb Devon McCormick: I'm puzzled why no one has used the basic matrix multiplication expression in J. matmul3 ([: +/ *)"1

Re: [Jprogramming] LaTeX question: J-boxed display

2022-07-18 Thread Hauke Rehr
I agree. (late to the party, I’ve been away for about a week) My first approach would have been to let J provide not only the boxed display (a string) with | replaced by space but also the tree structure and shapes of representations in boxes. `$@":` Then I’d first print the contents with lines

Re: [Jprogramming] Wiki update video and revised promo video

2022-07-29 Thread Hauke Rehr
+1 for 'code search' even if it’s a misnomer, strictly speaking at some point in their J journey, they’ll need/want to try it and they’ll learn soon enough what it does and doesn’t that’s my 2¢ Am 29.07.22 um 16:38 schrieb 'robert therriault' via Programming: Not butting in at all Viktor, It

Re: [Jprogramming] Problem with adverbs

2022-07-18 Thread Hauke Rehr
An adverb only evaluates once it is given a noun/verb left argument. (adverb adverb) is a form of speech that doesn’t get evaluated, just like verbal trains (verb verb verb) Put another way: what shall 'u' be in advsuc when you say 'advsuc applyto1'? 'u' always comes in from the left but there

Re: [Jprogramming] unwind protect

2022-05-01 Thread Hauke Rehr
which seems to have been done before or came up independently in D, you have slightly more fine-grained options scope(exit){} scope(success){} scope(failure){} a spontaneous reaction: In J, I’d like to use generators like fileworker =. workfile thatone 'exitstatus result' =.

Re: [Jprogramming] Extended precision question

2022-04-28 Thread Hauke Rehr
rewrite it from scratch. :-) ) Ed *Crutch n. A thing used for support or reassurance. May hold you back in the long term. Ed Sent from my iPad On Apr 27, 2022, at 7:01 PM, Hauke Rehr wrote: What keeps you from writing your comments vertically‽ Am 27.04.22 um 14:50 schrieb Ed Gottsman

Re: [Jprogramming] Extended precision question

2022-04-28 Thread Hauke Rehr
Smarter than emacs? Vim. :) editor wars aside, I’m having a hard time imagining any editor smarter than these two They may call themselves “smarter” but mostly that translates to “more cumbersome”. folds are natural in any coding editor, and I guess Tim Pope would come up with a solution

Re: [Jprogramming] Extended precision question

2022-04-28 Thread Hauke Rehr
Ed, no apology required :) For the first approach: If you want that, you can just start using it. LEO came to my mind but you could as well support it in another editor. Write a function stripping your code off those comments and feeding the remaining code to J. Not much of a hassle except for

Re: [Jprogramming] Extended precision question

2022-04-27 Thread Hauke Rehr
What keeps you from writing your comments vertically‽ Am 27.04.22 um 14:50 schrieb Ed Gottsman: If J were written vertically, it might be easier to comment. -- -- mail written using NEO neo-layout.org --

Re: [Jprogramming] x:

2022-08-18 Thread Hauke Rehr
TL/DR version: no, I haven’t I remember repeated squaring¹ of an integer matrix where I had wanted to use extended for not losing the exact precision. Don’t know for sure the results mostly exceeded 2^63 but I think so. Those matrices have not been all that “large” however so maybe this is not

Re: [Jprogramming] Plot a Squircle in J

2022-08-15 Thread Hauke Rehr
This should obviously be (equivalent but easier to read) minmax =: r % 4%:2 Am 15.08.22 um 15:34 schrieb Hauke Rehr:    minmax =: 4%: -: r ^ 4 NB. minimum maximal coordinate -- -- mail written using NEO neo-layout.org

Re: [Jprogramming] Plot a Squircle in J

2022-08-15 Thread Hauke Rehr
But in case those “means of nearest points” are actually needed, the 2D case is easily generated: require'plot' r =: 4 NB. some radius minmax =: 4%: -: r ^ 4 NB. minimum maximal coordinate X =: minmax+(r-minmax)*1000%~i.1001 Y =: X -~&.:*: X %~ *:r NB. this is quick and dirty,

Re: [Jprogramming] Hilbert Curve error

2022-07-31 Thread Hauke Rehr
works perfectly well here JVERSION Engine: j903/j64/linux Beta-r: commercial/2021-09-26T14:44:24 Library: 9.03.08 Platform: Linux 64 Installer: J903 install InstallPath: /home/hauke/j903 Contact: www.jsoftware.com Am 31.07.22 um 13:24 schrieb Razetime: On this rosetta code page for the

Re: [Jprogramming] Poll questions: new refcard

2022-08-04 Thread Hauke Rehr
+1 for a landscape version ☺ Am 04.08.22 um 18:18 schrieb Don Guinn: How about a landscape layout? To see it on a computer screen requires scrolling unless the text is very small. And the printed version should be just as easy to use.

Re: [Jprogramming] Poll questions: new refcard

2022-08-04 Thread Hauke Rehr
1. I found c. easiest to use wrt footnotes But is this the main question? I find the other ones easier to use in general: the footnotes are not the most frequently looked up parts! 2. c. 3. c. 4. rather c. but I dislike the bold face parts I could argue about color choice but it’s quite good

Re: [Jprogramming] Poll questions: new refcard

2022-08-04 Thread Hauke Rehr
contrary to the answer I gave, I agree: the names are actually used already so they had better put on the refcard And I also agree that some verbs don’t need any explanation. I thought about putting them in groups more like it’s done in NuVoc – otoh, if I want to see those relationships, I can

Re: [Jprogramming] Draft reference card for J9.04

2022-08-09 Thread Hauke Rehr
Again, I’d like to see a version of the document, maybe 1.0.0-draft220809 now. The headers should align vertically, e.g. \phantom yScalar monadic verbs\phantom y (same for Selection, Adverbs etc) and the footnote mark after Scalar should in both cases be followed by a ›\ ‹ please use colors

Re: [Jprogramming] Draft reference card for J9.04

2022-08-09 Thread Hauke Rehr
There’s a table for Complex Numbers, and | is \|•\| in that context. As a Scalar Monadic Verb on non-complex arguments, however, | is usually learned as |•|, or in J | -: (* *) saying | means \|•\| might lead people to believe 5 = | 3 4 even though the heading says /Scalar/ Monadic Verbs Second

Re: [Jprogramming] Draft reference card for J9.04

2022-08-09 Thread Hauke Rehr
That’s been pretty much negative (but hopefully constructive) critique. But I also want to thank Viktor et al for the work they put into it. It will be a good and valuable resource once you decide it’s not a draft version any more. Am 09.08.22 um 22:13 schrieb Henry Rich: Viktor Grigorov has a

Re: [Jprogramming] Draft reference card for J9.04

2022-08-09 Thread Hauke Rehr
+1 for using subscripts, also in explanations of hooks and forks, and in the Modifier Trains table regarding footnotes b and c in the Scalar Dyadic Verbs table, I read c as explaining the /inflection/, and b the attempt at translating to known semantics in the middle column So I don’t think it’s

Re: [Jprogramming] (A n) new train. was: more fun with parallelism

2023-01-10 Thread Hauke Rehr
Very interesting indeed, all of this thread. I think annotation both of nouns and verbs would be useful. Do we also need a way of de-annotation? Probably not but I haven’t thought it through. I don’t like the literal approach. I’d rather have J know about constants ASSOC. and SORTED. and the

Re: [Jprogramming] (A n) new train. was: more fun with parallelism

2023-01-11 Thread Hauke Rehr
not exactly what I had in mind so we don’t want no bloat, right how about simply assigning numbers? magic numbers are about as readable as magic letters we already define sugar in english.ijs so some name could be added for associativity which might be 2⁰=2¹-1 (all four currently known

Re: [Jprogramming] Verbs returning verbs

2023-01-18 Thread Hauke Rehr
Nice troll ;) Generally speaking, in life contexts, “dark” is orthogonal to “useful”. Which might be related to why Dark Matter is looked up on, by some in the Physics community — it seems that it Matters too much. But if the problem is that brightness is insufficiently constrained, why should

Re: [Jprogramming] [EXTERNAL] Re: Closures; WAS: Verbs returning verbs

2023-01-18 Thread Hauke Rehr
Giving an answer in spite of not having been addressed because I just criticized the reasoning that I thought was based on that word’s meaning (dispute resolved privately): Two vectors are orthogonal if the projection of one onto the other is 0. In colloquial terms, it means “there is no part of

Re: [Jprogramming] Problem with capped fork ?

2023-05-25 Thread Hauke Rehr
rank error confirmed JVERSION Engine: j903/j64/linux Beta-w: commercial/2021-12-05T18:24:21 Library: 9.03.08 Platform: Linux 64 Installer: J903 install Am 25.05.23 um 20:12 schrieb Martin Kreuzer: Dear all - Thought I had succeeded in deducing step by step the tacit verb for factorial,

Re: [Jprogramming] Syntax Highlighting: Special Combinations

2023-07-30 Thread Hauke Rehr
just a short follow-up As I know its maintainer in person, I had to try GeSHi as well. Not overwhelming, but working fine ootb. Am 30.07.23 um 19:42 schrieb Hauke Rehr: my 2 cents I’m quite satisfied with the highlight I get when writing J in Vim; and with the highlight I get when typesetting

Re: [Jprogramming] Syntax Highlighting: Special Combinations

2023-07-30 Thread Hauke Rehr
my 2 cents I’m quite satisfied with the highlight I get when writing J in Vim; and with the highlight I get when typesetting J in TeX with minted. Neither do custom handling of Special Combinations, though. IIRC, Michal rolled his own for his jprez stuff (editor part). @Michal: Did you consider

[Jprogramming] Fwd: Differentiation

2023-07-22 Thread Hauke Rehr
Sorry, maybe was there a wrong replyto address, or maybe I just mistyped. Weitergeleitete Nachricht Betreff: Re: [Jprogramming] Differentiation Datum: Sat, 22 Jul 2023 18:05:02 +0200 Von: Hauke Rehr An: programming@forums.jsoftware.com In other words, a =: 5

Re: [Jprogramming] Search

2023-05-09 Thread Hauke Rehr
You are right, C is an ususable language. I think noone uses it. You cannot search. This thread is silly. J is one of single letter names. It’s fine. Am 09.05.23 um 22:56 schrieb Richard Donovan: One of the most frustrating things about J is its name! For example, on Stack Exchange code

Re: [Jprogramming] Search

2023-05-10 Thread Hauke Rehr
invented this remarkable language didn’t foresee this problem in the first place! On 9 May 2023, at 22:47, Hauke Rehr wrote: You are right, C is an ususable language. I think noone uses it. You cannot search. This thread is silly. J is one of single letter names. It’s fine. Am 09.05.23 um

Re: [Jprogramming] Search

2023-05-10 Thread Hauke Rehr
In case you are still using a badly designed keyboard. Am 10.05.23 um 16:34 schrieb Michael Dykman: I second Harvey's suggestion: 'jkl' It is very easy to type On Wed, May 10, 2023, 04:14 HH PackRat wrote: I may be completely mistaken (and I didn't have time to double check the history),

Re: [Jprogramming] Search

2023-05-10 Thread Hauke Rehr
No, I don’t think there’s as much junk regarding J. Am 10.05.23 um 18:51 schrieb Raul Miller: Has anyone written that content for the J community? Thanks, -- -- mail written using NEO neo-layout.org --

Re: [Jprogramming] Search

2023-05-10 Thread Hauke Rehr
Dear God, why did you take the name of “Richard Donovan” to tell me about your omniscient wisdom regarding other people’s ignorance? Am 10.05.23 um 19:02 schrieb Richard Donovan: They haven’t realised the benefits yet! From: Programming on behalf of Hauke Rehr

Re: [Jprogramming] Roger Hui referenced in TAOCP Volume 4

2023-12-29 Thread Hauke Rehr
Thanks for the information. Much appreciated. I didn’t get the chance to converse all that much with him. Still, I miss his humor. On 29/12/2023 18:07, Eric Iverson wrote: Don Knuth's current work in progress is: "The Art of Computer Programming Volume 4 Fascicle 7" with publication expected in

<    1   2   3   4   5   >