Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Roger Hui
Yes, but do you think Ken could have read the C code and verify that that's what he intended? :-) More power to you. On Sat, Mar 9, 2019 at 5:28 PM Henry Rich wrote: > I think you would be pleased to see the current parser implementation. > The parsing table is transposed, so that each part of

Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Henry Rich
I think you would be pleased to see the current parser implementation.  The parsing table is transposed, so that each part of speech indicates which lines of the parse table it matches.  This fits into 8 bits, so the information for the 4 columns of the parse table fit into a single 32-bit word

Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Roger Hui
It is unusual to make assignment an array with an internal datatype. But it was all driven by the needs of the parser (see Dictionary, Section II.E), and the J interpreter is built around the parser. See file t.c, and search for ASGN, CASGN, and CGASGN. (The latter two in the value parts, instea

Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Henry Rich
I never knew that.  I was relying on the ID byte. I now use upper flag bits of the type to distinguish ASGN as private/public, and to-name/to-noun. I needed to distinguish named private assignments in explicit definitions, because I preallocate symbols for them in a symbol table that I also

Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Roger Hui
ASGN is an internal type; in the value part (the ravel) of a scalar with that type, there is a 0 or 1, indicating whether is local assignment (=.) or global assignment (=:). On Sat, Mar 9, 2019 at 2:52 PM Henry Rich wrote: > Aaaghh, you caught me. That was one of the first changes I made when I

Re: [Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Henry Rich
Aaaghh, you caught me.  That was one of the first changes I made when I was learning the J Engine.  I knew it would print wrong, but I didn't know how to make it right, and I hoped no one would ever notice. I guess I have to go back and fix it, but I understand the system better now, so maybe

Re: [Jprogramming] 50 shades of J, chapter 32.

2019-03-09 Thread Jan-Pieter Jacobs
Right. So I see I've not used J for far too long. It's indeed only ever used directly, i.e. not in derived verbs. Thanks Henri! Op za 9 mrt. 2019 om 17:34 schreef Henry Rich : > Reassigning N affects later execution of mod but not verbs created > previously by mod: > > mod =: 1 : 'N&|@:x' >

[Jprogramming] Curiosity about an error report evolution

2019-03-09 Thread Joey K Tuttle
jkt@set1:~$ /usr/local/lib/j64-801/bin/jconsole JVERSION Engine: j701/2011-01-10/11:25 Library: 8.01.028 Platform: Linux 64 Installer: j801 install InstallPath: /usr/local/lib/j64-801 +a=.'huh' |domain error | +a=.'huh' exit 0 jkt@set1:~$ ja JVERSION Engine: j807/j64nonavx/linux

[Jprogramming] Possible bug in 'convert/pjson' addon

2019-03-09 Thread Nimp O
Hello everyone, I think I have found a bug in 'convert/pjson'. load 'convert/pjson' dec_pjson_ '"\\f\\b"' \ \ I believe double backslashes should be escaped first, as in: dec_pjson_ '"\\f\\b"' \f\b I fixed the issue on my end by moving the double backslash to the first substitution:

Re: [Jprogramming] 50 shades of J, chapter 32.

2019-03-09 Thread Henry Rich
Reassigning N affects later execution of mod but not verbs created previously by mod: mod =: 1 : 'N&|@:x'  N =: 5 mod5double =: +: mod mod5double 4 3 N =: 7 mod5double 4 3 mod7double =: +: mod mod5double 4 3 mod7double 4 1 Henry Rich On 3/9/2019 10:32 AM, J

[Jprogramming] 50 shades of J, chapter 32.

2019-03-09 Thread Jan-Pieter Jacobs
Hi! There's a fairly substantial problem with chapter 32 of FSOJ, as it uses this definition for mod: mod=: adverb : 'n&|@x' Aside the fact that using it as defined yields a domain error (easily solved using N instead of n), there is a problem where afterwards the article seems to assume that r