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

2022-02-01 Thread ethiejiesa via Programming
Henry Rich wrote: > I think I agree with all your statements, but you are not responding to > my questions, which will help focus the discussion: > > 1. What is a Dictionary, EXACTLY? FWIW, I find myself confused by this question. Maybe I am just failing to pick up on an implicit convention

Re: [Jprogramming] Where, oh where have my indices...

2021-10-28 Thread ethiejiesa via Programming
Henry Rich wrote: > RE: #:, with multiple dots, creates a list. #. creates an atom. Yeah, AFAICT there's not really a "system" to the dot usage, per se, so much as an art: ". converts into a (single) number/array ": splits into (multiple) boxes |. works on the lower level, i.e.

Re: [Jprogramming] how to determine valency of a conjunction

2021-10-24 Thread ethiejiesa via Programming
FWIW, this alternate phrasing of the rt verb is also possible. rt=: (%: -)~ * ^@(%~ 0j1p1+0j2p1*i.)@] Elijah Stone wrote: > - is always a verb, which negates its right argument. -1 0 1 is - (1 0 > 1), or _1 0 _1; so p. solves -x^2 - 1 = 0. I expect you want _1 0 1. > > -E > > On Sun,

Re: [Jprogramming] sorting up and up

2021-10-22 Thread ethiejiesa via Programming
Henry Rich wrote: > Offset binary. > > /:~&.(22 b.&16b8000) > Cute! But I think the mask needs to be negative. INT_MAX is all f's. /:~&.(22 b.&16b8000) i:10 _1 _2 _3 _4 _5 _6 _7 _8 _9 _10 10 9 8 7 6 5 4 3 2 1 0 /:~&.(22 b.&_16b8000) i:10

Re: [Jprogramming] sorting up and up

2021-10-22 Thread ethiejiesa via Programming
Sort and rotate? (|.~ +/@:<&0)@(/:~) _10+10?.@$20 4 6 6 6 9 _5 _4 _4 _2 _2 Elijah Stone wrote: > This is not terrible, though the >: rankles: > > (/: ] + 0&> * [: >: >./ - <./) i: 10 > 0 1 2 3 4 5 6 7 8 9 10 _10 _9 _8 _7 _6 _5 _4 _3 _2 _1 > > I am sure somebody else has a

Re: [Jprogramming] Roger Hui - 1953 - 2021

2021-10-19 Thread ethiejiesa via Programming
Man. Meeting The Hui was one of the top items I had on my bucket list... It approaches midnight here as I sit and contemplate the vastness of Roger's causal ripples, ever expanding into spacetime. Listening to the recapitulations of his peers, indeed many of these ripples sound more like

Re: [Jprogramming] Noob question

2021-10-03 Thread ethiejiesa via Programming
"John Dell'Aquila" wrote: > Hi all, > > I just discovered J a few months ago and have decided to take it up > seriously. I wish I'd found it 20 years ago. You folks keep a seriously low > profile on the internet :-) Welcome John! The low profile here is definitely counterbalanced by the

Re: [Jprogramming] J903-beta-r

2021-09-29 Thread ethiejiesa via Programming
BTW, it looks like GitHub is missing the j903-beta-r tag. Eric Iverson wrote: > J903-beta-r is available for windows/linux/macos. > > !!! > The tacit-modifier language from early versions of J has been reinstated. > Old J books are once again valid. > !!! > > If you already run J903-beta, then

Re: [Jprogramming] New in beta-r: old stuff

2021-09-27 Thread ethiejiesa via Programming
@Pascal Thanks for going out on limb and starting this discussion. Personally, I find the current modifier train parsing table relatively intuitive, but you definitely got me wondering *why* I do. FWIW, the proposal you share seems to mostly just save parentheses, which at first blush, feels to

Re: [Jprogramming] New in beta-r: old stuff

2021-09-26 Thread ethiejiesa via Programming
Henry Rich wrote: > And because they're cool. So much yes! Extremely pumped about this! -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] cross product

2021-09-22 Thread ethiejiesa via Programming
Late to the party, but what about simply thinking of (map) as indexing into the cartesian product ({'abc';'ABCD')? (({'abc';'ABCD') {~ $ <@#: I.@,) map ┌──┬──┬──┬──┐ │aA│aD│bB│bC│ └──┴──┴──┴──┘ -- For

Re: [Jprogramming] what libraries are necessary to show output of 'plot' on screen? qt?

2021-06-16 Thread ethiejiesa via Programming
On 2021年6月16日 18:07:54 JST, 'Rudolf Sykora' via Programming wrote: >Hello, > > >>> what libraries are actually needed to get an output of 'plot' on >>> screen? >>> Is qt needed for that? > >Julian Fondren writes: > >> system/main/stdlib.ijs has a list of commands that it tries in >>

Re: [Jprogramming] depth vector APL translation

2021-05-25 Thread ethiejiesa via Programming
While we're on this thread, I might as well share the couple pieces I have laying around: NB. Output a random depth vector of length y rv=: <:@(1&= # +/\)@(|.~ >:@(i: <./)@(+/\))@(A.~ ?@!@x:@#)@($&1 , $&_1@<:) NB. Pretty print a tree representation, given a depth vector (inspired by xash) TM=: 3

Re: [Jprogramming] depth vector APL translation

2021-05-24 Thread ethiejiesa via Programming
Raoul Schorer wrote: > Dear all, > > I am struggling with the translation of the following APL dyad to J: > > ∊ 0 {(⊢,(⍺+1)∇⊣)/⌽⍺,1↓⍵} y > > which is the expression to yield a depth vector from a tree in record > format (drawn from Dr. Hsu's thesis). Demo: Oh cool! I have been (very

[Jprogramming] ^:n always returning atoms for n<_1

2021-05-21 Thread ethiejiesa via Programming
9!:14'' j902-b/j64avx2/linux/release/GPL3/guix.gnu.org/1970-01-01T00:00:00/clang-9-0-1/SLEEF=1 +&1^:_1 i.3 _1 0 1 +&1^:_2 i.3 _2 $$ +&1^:_2 i.3 0 Similar results for other negative exponents smaller than _1. My beta is a bit behind, but I see the

Re: [Jprogramming] How to choose characters with a boolean mask?

2021-04-15 Thread ethiejiesa via Programming
Is monadic # what you're looking for? mask # chars BEG HH PackRat wrote: > Hello, all! > > I have a list of characters and a boolean list of 1s and 0s. I > thought that I could use the boolean list as a "mask" to choose > characters by using "and" (*.). But the definition in NuVoc

Re: [Jprogramming] Farewell for now!

2021-04-14 Thread ethiejiesa via Programming
On 2021年4月14日 16:18:07 JST, Emir U wrote: >Hi Ian, Python is an example of a language with solid package >management and repository (Pypi), FFI, parallelism support (e.g. Dask), >and data structures. Julia is another. They also both have extensive >eco-systems for data science oriented tasks.

[Jprogramming] Just sharing: The Edges of Our Universe

2021-04-10 Thread ethiejiesa via Programming
Hello J, "The Edges of Our Universe" is a nice and very accesible paper by Toby Ord that discusses different natural "edges" to the universe that arise in General Relativity (and in particular the ΛCDM model) and some futurist implications. https://arxiv.org/abs/2104.01191 Anyway, the tail end

Re: [Jprogramming] JE contributions WAS: J903-beta-c

2021-02-07 Thread ethiejiesa via Programming
Henry Rich wrote: > IF you want to get yourself in shape to make JE changes, I have a > starter project for you: replace the extended-integer and rational > support with GMP (or some other equally-good library).  The current code > is serviceable but sized for 32-bit machines, and lacks fast

Re: [Jprogramming] J903-beta-c

2021-02-01 Thread ethiejiesa via Programming
Raul Miller wrote: > https://github.com/jsoftware/jsource/commits/master might interest you... Indeed, I have the repo cloned locally! However, when digging through old bug reports, I find it quite challenging to match up the "fixed" notices with the corresponding code commits. In cases with a

Re: [Jprogramming] J903-beta-c

2021-02-01 Thread ethiejiesa via Programming
Such a quick turnaround on bug reports, as always, Henry! I'm invariably interested in the code fixes themselves. Would it be a hassle to include some tidbit about how you solved the issue? Even just including the `git log -p -` output (where the fix is spread over n commits) might be nice for

Re: [Jprogramming] Multiple rotations

2020-10-31 Thread ethiejiesa via Programming
me studying to understand, but that is exactly > what I needed. Thanks so much! > > Skip > > > Skip Cave > Cave Consulting LLC > > > On Sat, Oct 31, 2020 at 1:33 AM ethiejiesa via Programming < > programm...@jsoftware.com> wrote: > > > What about so

Re: [Jprogramming] Multiple rotations

2020-10-31 Thread ethiejiesa via Programming
What about something like this? (|.~ ,.@i.@#)&.> n ┌─┬─┬───┬───┐ │1 2 3│4 5 6 7 8│8 6│3 5 7 9│ │2 3 1│5 6 7 8 4│6 8│5 7 9 3│ │3 1 2│6 7 8 4 5│ │7 9 3 5│ │ │7 8 4 5 6│ │9 3 5 7│ │ │8 4 5 6 7│ │ │ └─┴─┴───┴───┘

[Jprogramming] Fields of 1!:0

2020-09-14 Thread ethiejiesa via Programming
Right now, NuVoc documents that the rows returned by (1!:0) have 5 fields, but I am seeing 6 in my version and platform: 1!:0 '.' ┌─┬──┬───┬───┬──┬──┐ │.│2019 9 14 10 51 16│264│rwx│-h--d-│drwxr-xr-x│ └─┴──┴───┴───┴──┴──┘

Re: [Jprogramming] 0!:0 and private namespaces

2020-09-08 Thread ethiejiesa via Programming
Oh! Duh. I was confused. (0!:0) directly executes the string (or file). Much clearer now. Thank you. Raul Miller wrote: >example=: 3 :'echo 1' >0!:0'example' >0!:0'example 0' > 1 > > Put different: when you evaluate a bare name which references a verb, > the result of that execution

[Jprogramming] 0!:0 and private namespaces

2020-09-08 Thread ethiejiesa via Programming
Say we have a file ~home/script.jis with the following contents: a=. 'bar' and start a J session: a=. 'foo' verb=. 0 :0 a=. 'baz' ) a foo 0!:0 http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Code smells in J

2020-08-21 Thread ethiejiesa via Programming
Bo Jacoby wrote: > How to de-smell this: > 3([* i.@#@,@[ ^/ i.@>:@])~ 0 0 1 1 1 3 (]* ((^/ >:)~ #)) 0 0 1 1 1 Maybe? That comes from just a little mechanical algebra: > 3([* i.@#@,@[ ^/ i.@>:@])~ 0 0 1 1 1 First notice the repeated (i.) on either argument of (^/). There is a general

Re: [Jprogramming] Code smells in J

2020-08-21 Thread ethiejiesa via Programming
Bo Jacoby wrote: > How to remove the smell (the "[" and the "]") from >    3(i.@>:@[ ^/~ ])2 3 4 > ? 3 (^/ i.@>:)~ 2 3 4 In general, when you want to "preprocess" only one argument of a dyad, a hook probably does what you want. Cheers

[Jprogramming] Code smells in J

2020-08-20 Thread ethiejiesa via Programming
What are some classes of code smell in J? For clarity, "code smell" means any characteristic of source code that indicates a potentially deeper problem. These are anti-patterns that occur at the source code level. The canonical example is probably duplicated code, which indicates a potential for

Re: [Jprogramming] Given a depth vector, pretty print its tree

2020-08-11 Thread ethiejiesa via Programming
x...@xn--wxa.land wrote: > For your original format, with a transition matrix to simplify finding > "catenaries" for each column: > > tm=:3 4 $ 0 1 0 1 2 2 2 2 3 1 3 1 > start=: 0,~ = + 2*(=>:) NB. same height = 1, direct children = 2, others > = 0 > step=: {::@, NB. apply

Re: [Jprogramming] Given a depth vector, pretty print its tree

2020-08-11 Thread ethiejiesa via Programming
> Alternative (slightly more compact) implementation of tv: > >tv=: (0 = {.) *./@, (0 < {:), 1 >: +/\inv Nice way to factor out the (*./) redundancy. Thanks. > Meanwhile, this is probably a bit long (almost 100 characters) to be > called a one line implementation, but it seems to be in the

Re: [Jprogramming] Given a depth vector, pretty print its tree

2020-08-07 Thread ethiejiesa via Programming
Thanks for the thoughts! > not as pretty, but simpler and pretty enough? > > (":"0@i.@# (,~ #&'-')"1 0 ]) 0 1 2 2 1 1 2 2 3 > > 0 > > -1 > > --2 > > --3 > > -4 > > -5 > > --6 > > --7 > > ---8 This is sort of in between the raw depth vector and the graph representation. It's probably

[Jprogramming] Given a depth vector, pretty print its tree

2020-08-07 Thread ethiejiesa via Programming
Do you know a slick way of pretty-printing a tree given its depth vector representation? A vector represents a tree if and only if it satisfies the following: NB. Tree valid? First node is root node (depth 0), only one root node, NB. and all nodes are exactly one deeper than their

Re: [Jprogramming] Floor of infinity

2020-08-02 Thread ethiejiesa via Programming
Oops. > Let <. : R+ -> Z+ where (<.r) is defined to be the extended integer such > that there exists a real number s in the interval [0,1) and ((<.r)=|s-r). ((<.r)=|s-r) should be ((<.r)=r-s). -- For information about J

Re: [Jprogramming] Floor of infinity

2020-08-02 Thread ethiejiesa via Programming
> So J is saying that the floor of infinity is infinity (and the ceiling of > infinity is also infinity). Since infinity is not a number, it would seem > that an error should be generated when taking the floor of infinity, or > perhaps NAN, or a zero? In any case, this messes up my nice

Re: [Jprogramming] Standard library version of statistical "mode"?

2020-07-26 Thread ethiejiesa via Programming
John, > You can encapsulate mode, median and mean in a single formula. Suppose y is > a data vector and t is a scalar. The a value of t which minimizes > +/ (|y-t)^i [with special meaning for x^0: see below] is > - A mode of y if i=0. > -A median of y if i=1. > -The mean of y if i=2. Neat!

Re: [Jprogramming] uniform random numbers

2020-07-16 Thread ethiejiesa via Programming
Bayes' Theorem. For let k=:?p, then for every integer i in i.p P(k=i) = 1/p. We can then model your selective keeping process with a posterior distribution on this pdf. For every i in i.q, P(k=i|k wrote: > A question for the statisticians and mathematicians among us. > > Suppose I

Re: [Jprogramming] "Lazy evaluation" of verbs in

2020-07-16 Thread ethiejiesa via Programming
ssary. > > > > > > This leaves some details unspecified -- like should you use ". or 5!:5 > > > or 3!:1 or map_jmf_ in the process of generating the 'o' files? > > > > > > But, anyways, if you defined the interface you could use it. > > > >

Re: [Jprogramming] "Lazy evaluation" of verbs in

2020-07-16 Thread ethiejiesa via Programming
Responding to you with a good bit of lag: > > My first approach was to "lazy load" by making all p1, p2, etc. strings > > and > > evaluating with > > > > 0!:111 ".&> (#~ 0 = 4!:0) 'p'&,&.> ARGV > > > > However, this strikes me as a bit ugly. It also makes it a bit awkward > > to > >

[Jprogramming] "Lazy evaluation" of verbs in

2020-07-02 Thread ethiejiesa via Programming
Hey J, Wanted to share this and see what you think. For Project Euler solutions in J, I have a single file and run it like this: $ ./project-euler.ijs <1> [ ..] # output answers to problem n, m, ... Initially, I had a scheme where all solutions are named like p1, p2, etc. with the

Re: [Jprogramming] j901-release-f available

2020-06-11 Thread ethiejiesa via Programming
Excellent! Can we push a release tag on the GitHub repo? Looks like it's missing at the moment: https://github.com/jsoftware/jsource/releases Eric Iverson wrote: > j901-release-f fixes the serious bug reported by James Kozianski a few days > ago. > > All j901 users should upgrade! > > start

Re: [Jprogramming] Iterate at most n times

2020-05-26 Thread ethiejiesa via Programming
ds, Anton Wallgren > On 26 May 2020, 10:39 +0200, ethiejiesa via Programming > , wrote: > > Hey Anton, > > > > Welcome to the J-verse! > > > > FWIW, the question as stated makes me suspect that you're (unconsciously) > > trying to fit J into an imperative pro

Re: [Jprogramming] Iterate at most n times

2020-05-26 Thread ethiejiesa via Programming
Hey Anton, Welcome to the J-verse! FWIW, the question as stated makes me suspect that you're (unconsciously) trying to fit J into an imperative programming paradigm. I would venture that you'd get better answers by more directly sharing what you're trying to accomplish and the problems thus

Re: [Jprogramming] How to convert list of phrases to list of boxed phrases?

2020-05-18 Thread ethiejiesa via Programming
Not Skip, but let me take a crack at an explanation. I agree that NuVoc's wording makes it sound like monadic { doesn't work on unboxed lists. However... {1 2 3 ┌─┐ │1 2 3│ └─┘ {<1 2 3 ┌─┬─┬─┐ │1│2│3│ └─┴─┴─┘ So { certainly does *something* to

Re: [Jprogramming] run debug on stopped line, then stop immediately

2020-04-01 Thread ethiejiesa via Programming
Brian Schott wrote: > All, > I think Bill's solution works for my question: dbover'' (13!:20). > In contrast to Gilles, I think dbinto'' (13!:21) works as designed, because > changing the value of t to 99 does not change the code in line [0], which > it then executes with dbinto or dbover. > >

Re: [Jprogramming] generate integers from a to be with a step

2020-03-29 Thread ethiejiesa via Programming
Rudolf Sykora wrote: > Dear all, > > > how do you usually generate a sequence of integers from 'a' to 'b' with > a step 's'? > > If I ignore the step, yesterday I wrote > >interval=.{.+(i. @ >: @ ({:-{.)) >interval 5 19 > 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 > > but that seems

Re: [Jprogramming] Bug in new vocabulary &: page

2020-03-28 Thread ethiejiesa via Programming
Raul Miller wrote: > Another possible way to emphasize what's going on here might be to > split 'v' up into multiple instances (one for each cell) in the & > case. (Though, there, drawing a box around the 'v' part, to show the > scope of the verb and distinguish the definition from the

Re: [Jprogramming] Iteration

2020-03-24 Thread ethiejiesa via Programming
This was me. Very nice to hear that someone found it helpful. Thanks for going out of your way to say thanks! Jim Russell wrote: > Who do I thank tor this? It is a particularly clear and helpful exclamation. > Thank you! > > > On Mar 13, 2020, at 3:56 AM, ethiejiesa

Re: [Jprogramming] Iteration

2020-03-13 Thread ethiejiesa via Programming
|: } > but being aware of what it does for you will make > you find it’s useful in many more cases. > > hope this helps > > > Am 13.03.20 um 08:55 schrieb ethiejiesa via Programming: > > I'll contribute a little prose. Hopefully, it's helpful. > > > > I

Re: [Jprogramming] Iteration

2020-03-13 Thread ethiejiesa via Programming
I'll contribute a little prose. Hopefully, it's helpful. In this particular case, notice that > transforms your list of boxes into a 5x6 table: > (6?55);(6?55);(6?55);(6?55);(6?55) 13 4 19 43 3 52 10 1 4 46 52 11 38 12 48 50 54 45 36 54 39 35 53 50 44 1 7 54 11 41

Re: [Jprogramming] Derivatives

2020-02-04 Thread ethiejiesa via Programming
NuVoc notes what replaces D. and d. on their respective pages. In particular, from the math/calculus addon, we have * deriv_jcalculus_ to replace d. and * pderiv_jcalculus_ to replace D. Skip Cave wrote: > In "Fifty Shades of J" chapter 23, the Newton Raphson algorithm is > described thusly: >

Re: [Jprogramming] j901-release-e

2020-01-30 Thread ethiejiesa via Programming
Fair enough. Thank you for the clarity. Henry Rich wrote: > My build setup depends on considerations that transcend this > discussion.  Take it as given. > > Henry Rich > > On 1/30/2020 10:43 PM, ethiejiesa via Programming wrote: > > Hrm. That's quite odd. > > &g

Re: [Jprogramming] j901-release-e

2020-01-30 Thread ethiejiesa via Programming
-agnostic build systems. What build setup are you using? Henry Rich wrote: > The funny includes are required on the build system I use.  If you put > your source under a /jsource directory you will be able to use the files > as is. > > Henry Rich > > On 1/29/2020 11:

Re: [Jprogramming] j901-release-e

2020-01-29 Thread ethiejiesa via Programming
Compilation on linux breaks for me: ../../../../jsrc/cip.c:6:10: fatal error: ../../jsource/jsrc/j.h: No such file or directory 6 | #include "../../jsource/jsrc/j.h" | ^~~~ It looks like `jsrc/cip.c' includes paths that back all the way out of

Re: [Jprogramming] Permutations, primes and modular arithmetic

2020-01-28 Thread ethiejiesa via Programming
This is a beautiful list! Thank you for sharing. Regarding your 3) and 6) versions with modulo arithmetic, happily, this is a standard result from number theory. You should be able to find the relevant background and theorem itself near the beginning of any introductory Number Theory book. IIRC,

Re: [Jprogramming] 901-release-c

2020-01-14 Thread ethiejiesa via Programming
Beautiful. Just FYI, but it looks like the github mirror still isn't picking up git tags from the parent, so the github source releases are out of date. Eric Iverson wrote: > j901-release-c is available for windows/linux/macos > > It has bug fixes to the previous release. > > Please upgrade

Re: [Jprogramming] Base 2 on empty array

2019-12-18 Thread ethiejiesa via Programming
FWIW, my non-avx system doesn't reproduce the crash: #. 0$0 0 9!:14'' j901/j64/linux/release/GPL3/voidlinux.org/2019-12-15T23:11:06 Ben Gorte wrote: > Hi J, > > Base 2 on an empty array gives 0 , which I guess makes sense: > #. '' NB. array with no characters > 0

Re: [Jprogramming] J901 pacman

2019-12-18 Thread ethiejiesa via Programming
Oh wow. Just stumbled across this myself. FWIW, doing the dumb thing by copying the url and changing 807 to 901 does work. Arnab Chakraborty wrote: > I must be missing something obvious, but I do not seem to be able to find > jandroid.apk for j901. All I get is j807. Please help. > > Thanks a

Re: [Jprogramming] J901 release available

2019-12-16 Thread ethiejiesa via Programming
ould see the tag "j901-release-a1" for > the commit which was used for the current 901 builds. > > On Sun, Dec 15, 2019 at 7:19 PM ethiejiesa via Programming < > programm...@jsoftware.com> wrote: > > > Excellent news! And congratulations to all the developers. > >

Re: [Jprogramming] Algebraic identities of J primitives

2019-12-16 Thread ethiejiesa via Programming
com/wiki/Essays/Queens_and_Knights > Harder version of the n-queens problem. > See also the pages in the "See also" section. > > etc. > > On Thu, Dec 12, 2019 at 6:37 PM ethiejiesa via Programming < > programm...@jsoftware.com> wrote: > > > Hello

Re: [Jprogramming] J901 release available

2019-12-15 Thread ethiejiesa via Programming
Excellent news! And congratulations to all the developers. Can we expect the github repository to reflect the update soon? It seems to be quite out of date. I am the J package maintainer for Void Linux, and this distro doesn't accept pre-built packages in general. Eric Iverson wrote: > We are

[Jprogramming] Algebraic identities of J primitives

2019-12-12 Thread ethiejiesa via Programming
Hello J, Using J primitives, what are some nice algebraic identities you know of? I recently acquired a copy of "At Play with J" and in the process of mulling over chapter 7's permutation representations, I stumbled upon this nice one, which I assume is already well known: /: -: /:@/:@/:

Re: [Jprogramming] Selecting trains with m@.v

2019-12-07 Thread ethiejiesa via Programming
──┴───┴────┘ > > > > On Fri, Dec 6, 2019 at 9:54 PM ethiejiesa via Programming < > programm...@jsoftware.com> wrote: > > > Am I just doing something silly? Or does @. really not support building > > trains > > when the right operand is a verb? H

[Jprogramming] Selecting trains with m@.v

2019-12-06 Thread ethiejiesa via Programming
Am I just doing something silly? Or does @. really not support building trains when the right operand is a verb? Here is an overly minimal example of what I want: (1:)`+`(1:)@.(0 1 2) 0 2 (1:)`+`(1:)@.(0 1 2"_) 0 |rank error | (1:)`+`(1:)@.(0 1 2"_)0 This is an

Re: [Jprogramming] Strange(?) behavior of J

2019-11-06 Thread ethiejiesa via Programming
It's basically a consequence of the parsing rules: https://www.jsoftware.com/help/dictionary/dicte.htm In this case, when given 'abc' by itself, your J session tries to return the value, finds none, so produces an error. However 'xyz abc' parses as a hook, so the "value" returned is its linear

[Jprogramming] Result types of ^

2019-10-15 Thread ethiejiesa via Programming
Playing around with type bounds, I just discovered these things about ^ that I don't recall seeing in the documentation: 9!:14 '' j807/j64nonavx/linux/release/GPL3/voidlinux.org/2019-09-30T12:27:01 2&^ 1023 1024 8.98847e307 _ (3!:0)@^&>/~ 0;1;2 4 4 8 4 4 8

[Jprogramming] Difference between complex literals and complex numbers produced by j.

2019-10-11 Thread ethiejiesa via Programming
I assume this is well known by the cognoscenti, but I just ran into a newbie surprise: <. _1e_14j0 _1 <. _1e_14 j. 0 0 This came about as I was learning about and playing with the complex floor. Apparently, the differing behaviour traces back to how tolerance is handled

Re: [Jprogramming] Question regarding J lexing rules

2019-10-09 Thread ethiejiesa via Programming
Thank you for the thoughtful and lucid reply. If you don't mind, let me check my understanding. So, essentially, we keep forefront the general concept of numeric words requiring speculative tokenization in the sense you describe. Is the following true? Let sj be the state table as defined in

Re: [Jprogramming] Question regarding J lexing rules

2019-10-06 Thread ethiejiesa via Programming
for a subsequent ev() to be emitted at all, much less one when r = 6. Forgive me if I'm just being obtuse here. On Sun, Oct 06, 2019 at 08:46:53AM -0400, Raul Miller wrote: > On Sat, Oct 5, 2019 at 9:21 PM ethiejiesa via Programming > wrote: > > > What would it emit instead? >

Re: [Jprogramming] Question regarding J lexing rules

2019-10-06 Thread ethiejiesa via Programming
I seem to be having troubles with the mailing list. Please forgive the overlapping replies with similar content. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Question regarding J lexing rules

2019-10-06 Thread ethiejiesa via Programming
you > then have to change the parser ( > http://www.jsoftware.com/help/dictionary/dicte.htm) to handle two or more > numbers juxtaposed. > > > > On Thu, Oct 3, 2019 at 11:57 PM ethiejiesa via Programming < > programm...@jsoftware.com> wrote: > > > Just begin

Re: [Jprogramming] Question regarding J lexing rules

2019-10-06 Thread ethiejiesa via Programming
r Hui wrote: > > emits no vectors > > What would it emit instead? If you emit individual scalar numbers, you > then have to change the parser ( > http://www.jsoftware.com/help/dictionary/dicte.htm) to handle two or more > numbers juxtaposed. > > > > On Th

Re: [Jprogramming] Question regarding J lexing rules

2019-10-06 Thread ethiejiesa via Programming
in the behaviour? > > Cheers, bob > > > On Oct 5, 2019, at 6:21 PM, ethiejiesa via Programming > > wrote: > > > >> What would it emit instead? > > Words that just happen to contain spaces. > > > > I just realized, however, that my origin

Re: [Jprogramming] Question regarding J lexing rules

2019-10-05 Thread ethiejiesa via Programming
> What would it emit instead? Words that just happen to contain spaces. I just realized, however, that my original email example lets number words contain trailing spaces. So, I agree that the cell "0 5" in the state table needs to be what it is. However, if we're in state num and encounter a

[Jprogramming] Question regarding J lexing rules

2019-10-04 Thread ethiejiesa via Programming
Just beginning to learn J this week, I find myself binging the documentation and have some questions regarding J lexing. In particular, my question is about the sample J lexer presented in the dyadic ;: entry of the dictionary: https://www.jsoftware.com/help/dictionary/d332.htm Essentially,