jsoftware / jsource

J engine source mirror
Other
645 stars 91 forks source link

Obverse in Locale #107

Open jip opened 2 years ago

jip commented 2 years ago

Originally reported in [1]. Also discussed in [2]. New J9 features u. and v. doesn't help, too:

   cocurrent 'thing'
   Base=:     #.
   Antibase=: #:
   conj=:     2 : 'u. :. v.'
   verb2=:    Base conj Antibase
   cocurrent 'base'
   0 verb2_thing_ 0
0
   0 verb2_thing_^:_1: 0
|value error: Antibase
|   0     verb2_thing_^:_1:0

References:

  1. Jforum: Locale of Obverse, Mark D.Niemiec, Tue Sep 19 14:04:34 HKT 2000
  2. [Jprogramming] why won't this work (bug in :: ?), Pascal Jasmin, Sun Jun 22 02:29:49 UTC 2014
  3. [JWiki] User:Pascal Jasmin/modifiers in locales, Pascal Jasmin, Fri Aug 15 03:18 UTC 2014
  4. [JWiki] System/Interpreter/Bugs/Errors, Igor Zhuravlov, Tue Jan 28 02:27 UTC 2020
  5. [Jbeta] Bug? locale + inverse, Henry Rich, Thu Mar 25 00:09:26 UTC 2021

-- Igor Zhuravlov (talk) 02:26, 28 January 2020 (UTC), edited 02:02, 12 April 2024 (UTC)

This is not an error, but it may be something that should be changed. The rule is that the locale changes when a locative is executed. verb2thing is a locative, but verb2thing^:_1: is not.

-- Henry Rich (talk) 02:58, 28 January 2020 (UTC)

jip commented 3 months ago

@HenryHRich,

   0 verb2_thing_^:1: 0
0

So, verb_thing_^:1 is a locative, but verb_thing_^:_1 is not (?).