Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Bo Jacoby
Correct Linda. That is a bug in the translation from BASIC to J. - Bo > > Fra: Linda Alvord >Til: programm...@jsoftware.com >Sendt: 1:54 fredag den 30. november 2012 >Emne: Re: [Jprogramming] Translating BASIC into J > >J701 with Vista agree on the results f

Re: [Jprogramming] Arc consistency in J

2012-11-29 Thread Linda Alvord
I finally wrote f without @ ]A=:?3 3$3 0 0 2 0 0 0 0 2 1 f=: 13 :'(0mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord Sent: Sunday, November 11, 2012 1:56 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Arc consistency in J Mike, I changed f a

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Alex Giannakopoulos
I agree that all this needs more and *clear* and *visible* explanation! It was the first question I asked, and in the two+ years (on-and-off) that I have been mucking around with J I have seen asked on this forum umpteen times. I have also seen it debated at length (and breadth and depth). By expe

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Linda Alvord
J701 with Vista agree on the results for 0 and 00 pray 0 CREDO CONFITEOR ET EXPECTO AMEN pray 00 CREDO CONFITEOR ET EXPECTO AMEN Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Bo Jacoby S

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Raul Miller
I apologize for the slow response -- I have not been dealing with email much last week or this week. Anyways, here's an untested translation to J: credo=:3 :0 A=. <;._2]1!:1 <'CREDO' Apat=. ( [: ({.~ * i. _1:) _48 + 3 u: ])&> A Atxt=. (' ', ] (}.~ * i. _1:) _48 + 3 u: ])&> A while. 0

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Linda Alvord
Isn't the issue related to / (+:@+)/ 3 4 5 42 (+:@:+)/ 3 4 5 42 ([:+:+)/ 3 4 5 42 All the promises about @ and @: and [: seem to do as promised. Where you put the / is what matters. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailt

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Bo Jacoby
Ian, The link    http://www.nationmaster.com/encyclopedia/Ordinal-fraction    contains my deleted wikipedia article. I wonder how it ended there! I am not familiar with Frege's Begriffschrift. On this link    http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archives/Mathematics/2010_July

Re: [Jprogramming] Documentation in J REPL

2012-11-29 Thread Y-01
That's it! On Thu, Nov 29, 2012 at 8:05 PM, Dan Bron wrote: > Use nl from the standard library. > >'bs*' nl noun > +-+--+ > |bsome|bsome2| > +-+--+ >'bs*' nl verb > +---+ > |subsets| > +---+ >

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Dan Bron
I can't disagree with your contention about how people (try to) approach J or other programming languages. For my part, when I started J, I found the DoJ impenetrable and eschewed it for the first year or two of my career. I learned J through the collective wisdom and generosity of these For

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Ian Clark
> What provoked your doubt? In learning J, I've stumbled from one false assumption to another. Mainly about verb composition. Were I to be the only person to experience this, it could be put down to a weak intellect. But if my experience is not uncommon, it points to a need for J documentation to

Re: [Jprogramming] Documentation in J REPL

2012-11-29 Thread Dan Bron
Use nl from the standard library. 'bs*' nl noun +-+--+ |bsome|bsome2| +-+--+ 'bs*' nl verb +---+ |subsets| +---+ 'bs*' nl noun,verb +-+--+---+ |bsome|bsome2|subsets|

Re: [Jprogramming] Documentation in J REPL

2012-11-29 Thread bob therriault
Have you used either Find or Find in Files… under the Edit menu? If you want to use wild cards such as * this becomes a little more difficult since they could be a valid part of the string. Hope this helps. Cheers, bob On 2012-11-29, at 11:54 AM, Y-01 wrote: > New questions about documentatio

Re: [Jprogramming] Documentation in J REPL

2012-11-29 Thread Y-01
New questions about documentation-releated things) How can we find all defined symbols by pattern? *example: A1=: i.10 bsome =: 2 bsome2 =: bsome + A1 find 'bs*' bsome bsome2 so, we need smth like 'find'. On Wed, Nov 28, 2012 at 8:41 PM, Zachary Elliott wrote: > a few quic

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Ian Clark
Bo, Is this a numerical encoding of (say) Frege's Begriffschrift? That's what it looks like to me, from your all-too-brief description. You'll need to write it up somewhere, because nobody can experiment with it for themselves otherwise. Should I be looking at your Göteborg paper? How about airin

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread km
Here is a comment from Chapter 40 of J for C Programmers: The verb [:, which we met as a way to cause an error, has a special meaning in a fork. As the leftmost verb of the fork, [: means 'ignore the left branch'. So, Nx ([: V1 V2) Ny is V1 Nx V2 Ny and ([: V1 V2) Ny is V1 V2 Ny . In both ca

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Dan Bron
Right. For this reason (or similar ones, like when g is a train), I phrase the identity as ([: f g) ↔ f@:(g) . As to where this is stated: well, it's recorded informally in innumerable documents and J learning materials. If you're looking for formal guarantees in canonical material (the DoJ),

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Ian Clark
Thanks Dan. What I'm hearing reassures me. I'm in the final testing phase of an explication utility. It assumes the production: ([: f g) ==> f@:(g) . I just had a panic attack and wondered if (and whereabouts) this was guaranteed. IanClark

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Ian Clark
Thanks for alerting me to this possibility, Bob. Fortunately it seems, in the situation it's arising in, I can be confident the tacit code coming to my utility is fully-parenthesised. Or at least, appropriately parenthesised. Viz (+:@:+)/ as opposed to: +:@:(+/) On Thu, Nov 29, 2012 at 5:00 PM,

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Bo Jacoby
Ian, Note that pray '0' and pray '00' is not the same thing. 0: CREDO CONFITEOR ET EXPECTO AMEN 00: CREDO IN DEUM ET IN JESUM ET IN SPIRITUM ET ECCLESIAM CONFITEOR BAPTISMA ET EXPECTO RESURRECTIONEM ET VITAM AMEN The linenumbers in the database may be padded to the right with zeroes, but not t

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Dan Bron
Right. For this reason (or similar ones, like when g is a train), I usually say the identity is ([: f g) <==> f@:(g) . As to where this is stated: well, it's recorded informally in innumerable documents and J learning materials. If you're looking for formal guarantees in canonical material (t

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread Ian Clark
Yup, that's my Bible for it too. It's the sort of fact you have to know before you can look it up. On Thu, Nov 29, 2012 at 5:18 PM, km wrote: > Oh Ye Of Little Faith, > > The only sources I know are the Vocabulary entries for Atop @ and At @: plus > the Dictionary reference for Trains. In part

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread km
Oh Ye Of Little Faith, The only sources I know are the Vocabulary entries for Atop @ and At @: plus the Dictionary reference for Trains. In particular the comment in the latter that the ranks of fork and hook are infinite. Kip Murray Sent from my iPad On Nov 29, 2012, at 10:49 AM, Ian Clark

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread bob therriault
Thinking it through, I guess that this example is really (v a) where v is +:@:+, and the a is / , although it might look like u is +: and v is + to my (untrained) human eye. Cheers, bob On 2012-11-29, at 9:00 AM, bob therriault wrote: > HI Ian, > > If your v includes an adverb such as / the

Re: [Jprogramming] @: and capped fork

2012-11-29 Thread bob therriault
HI Ian, If your v includes an adverb such as / the long left reach of conjunctions could get you into trouble. That would be part of the parsing rules for verbs vs conjunctions. (+:@:+/) 3 4 5 42 ([:+:+/) 3 4 5 24 Cheers, bob On 2012-11-29, at 8:49 AM, Ian Clark wrote: > Department of Sud

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Ian Clark
clear'' ...oops, that was a swab left in the patient! Your coclass suggestion is exactly what I'd do if releasing the code as a utility in JAL. And I'd make the (go) method public by having this sentence in the script: go_z_=: go_credo_ It ruins a nice snappy name like 'go' to have to write

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Linda Alvord
Hi Mini, מינה היי, חשבתי שאתה רוצה באתר זה. מעולם לא ראיתי אותו לפני אמצע הלילה אתמול בלילה! Wierd צירוף מקרים. לינדה In case this is not clear, try http://translate.google.com/#auto/en/%E3%83%9E%E3%82%B8%E3%81%A9%E3%81% 86%E3%82%82%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%94%E3%81%96%E3%81% 8

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Ian Clark
Bo, I am so sorry for slagging off your program! Had I known it was yours, I wouldn't have written what I did. I assumed this was an educational curio you came across (as I often used to do in hobby magazines) and hadn't quite known how it worked -- because you had claimed you didn't know how to

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread John Baker
Good fun. Ian I'd suggest changing the preamble of your script to coclass 'credo' CREDO=: (<;._2) 0 : 0 1 CREDO 11 IN 111 UNUM ... that clear'' cleans one's base - then credo starts with go_credo_ '' On Thu, Nov 29, 2012 at 4:52 AM, Bo Jacoby wrote: > Ian, you did an amazing job! Thank yo

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Bo Jacoby
Ian, you did an amazing job! Thank you very much! You write about my BASIC program: "Like many amateur programs, it thoroughly mixes up input, processing and output. Even in the 1960s when BASIC was invented (Kemeny & Kurtz, 1964) this was recognised to be a bad thing". Yes, everybody knew how

Re: [Jprogramming] Translating BASIC into J

2012-11-29 Thread Linda Alvord
He might enjoy some of these thoughts once he finishes his code. *@:(-/~)i._5 0 1 1 1 1 _1 0 1 1 1 _1 _1 0 1 1 _1 _1 _1 0 1 _1 _1 _1 _1 0 |:*-/~ i.5 0 1 1 1 1 _1 0 1 1 1 _1 _1 0 1 1 _1 _1 _1 0 1 _1 _1 _1 _1 0 f=: 13 :'*@:(-/~)i.y' f [ *@:(-/~) i. g=: 13