Re: [Jprogramming] Got stuck...

2022-07-07 Thread Raul Miller
On Thu, Jul 7, 2022 at 1:17 PM Gilles Kirouac wrote: > Once you have a working explicit definition, > > myfn=: 4 : 'y #~ (0=x|y)'NB. 4 for dyadic def > 3 myfn 3 5 6 > 3 6 > > the interpreter can help you get the tacit form with 13 : def > > myfn=: 13 : 'y #~ (0=x|y)' > myfn > ]

Re: [Jprogramming] Got stuck...

2022-07-07 Thread tuxic
Hi Giles, hereby I officially declare the J interpreter and with it the J programming language as the most friendly programming tools available! While other compilers and interpreters spit errors and warning towards me, the J interpreters says: "Hey bro, I've a suggestion for you here, bro. Try t

Re: [Jprogramming] Got stuck...

2022-07-07 Thread Gilles Kirouac
Meino Once you have a working explicit definition, myfn=: 4 : 'y #~ (0=x|y)'NB. 4 for dyadic def 3 myfn 3 5 6 3 6 the interpreter can help you get the tacit form with 13 : def myfn=: 13 : 'y #~ (0=x|y)' myfn ] #~ 0 = | ~ Gilles Le 2022-07-07 à 10:57, 'robert therriault' via P

Re: [Jprogramming] Got stuck...

2022-07-07 Thread tuxic
On 07/07 07:57, 'robert therriault' via Programming wrote: Hi Bob, somehow I feared ;) that such an answer would exist... :) On Rosetta Code I compared listings of COBOL, C++, and J with each other solving the same task: Merging two inputs. The COBOL program was...something like the extended vers

Re: [Jprogramming] Got stuck...

2022-07-07 Thread 'robert therriault' via Programming
Hi Meino, Since forks can be extended into trains, the extra parenthesis around 0=| are not required in the solution. 3 (] #~ (0=|)) 2 5 6 7 9 11 12 6 9 12 3 (] #~ 0=|) 2 5 6 7 9 11 12 6 9 12 Cheers, bob > On Jul 7, 2022, at 07:45, tu...@posteo.de wrote: > > Hi Devon, > > your h

Re: [Jprogramming] Got stuck...

2022-07-07 Thread tuxic
Hi Devon, your help is very appreciated ! :) I found this page very helpful: https://code.jsoftware.com/wiki/Help/JforC/Forks,_Hooks,_and_Compound_Adverbs I think, I need more loops in my brain..hihihihihi Cheers! Meino On 07/07 10:23, Devon McCormick wrote: > I approached it this way: >

Re: [Jprogramming] Got stuck...

2022-07-07 Thread Devon McCormick
I approached it this way: 3 ([|]) 2 5 6 7 9 11 12 NB. x modulus of y 2 2 0 1 0 2 0 3 (0=[|]) 2 5 6 7 9 11 12 NB. Which moduli are zero? 0 0 1 0 1 0 1 3 (]#~0=[|]) 2 5 6 7 9 11 12NB. Reduce y by above result. 6 9 12 On Thu, Jul 7, 2022 at 8:45 AM wrote: > Hi xash, > >

Re: [Jprogramming] Got stuck...

2022-07-07 Thread tuxic
Hi xash, WHOW! Thanks a lot! I will "dissamble" this with trace and dissect. I never heard of a "trident" before and will feed this into the J wiki search engine. Cheers! Meino On 07/07 01:32, xash wrote: > In a tacit definition you can access x and y with [ and ]. So in your > example, y (

Re: [Jprogramming] Got stuck...

2022-07-07 Thread xash
In a tacit definition you can access x and y with [ and ]. So in your example, y (0=|) x gets your current output, and y (] #~ 0=|) x gets your wanted output, as it will be parsed as (] #~ (0 = |)), so two forks. On Thu Jul 7, 2022 at 1:24 PM CEST, wrote: > Hi, > > as a first step into the "land

[Jprogramming] Got stuck...

2022-07-07 Thread tuxic
Hi, as a first step into the "land of J" I tried to build a fork(?) to get a list of those numbers from a list, which can be devided by one given number . x is the one given number y is the list of numbers to check/test The whole thing should work like this x y What I have so far is 0 = 3