Re: [Jprogramming] J for iOS
Yes, that does seem to be the case. I suspect you are right - in the case of an app like a game, the app remembers all of my history through all updates. I have often thought that you could define a "workspace" that would keep the current session as a history, then when restarting the app (even after killing it, or not using it for a long time), the session in progress would still be live. I think a lot of people would like that. Of course, there should be a way to }clear the session --- I am not proposing to revert to something like the WS structure in APL - but it is really nice to have the input log carry over from session to session. I make a LOT of use in that when using jconsole in Apple Terminal. So, I deleted J and did a clean install from the App Store (the J download is tiny compared to most...) - then i see jjget_jj_ 3 : 0 y jjget~ (y i:'/'){.y : target=. x [ source=. y st=. 'ftype y'jjdo source 'source is not a file or folder'assert 0~:st mkdir_j_ target 'target is not a folder'assert 2=ftype target t=. target,(source i:'/')}.source if. 1=st do. d=. 'fread y' jjdo source 'write to target failed'assert (#d)=d fwrite t else. 'tar y'jjdo 'c';TAR;source;'' d=. 'fread y' jjdo TAR d fwrite TAR tar 'x';TAR;t end. 'OK' ) quite different from the previous result. Also jj 0 jjset 'ip:port pswd' [target] jjget source [target] jjput source '...'jjdo y source is .../FILE or .../FOLDER to put in target folder elided target is ... from source NB. seems to be what you were expecting. Although I recall seeing the load of jj.ijs in an earlier instance... >nl_jj_ &,> 0 3 TAR URL jjdo jjget jjput jjset posttemplate test test_jj_ 3 : 0 mkdir_j_'~temp/jj' ferase {."1 fdir'~temp/jjx*' ferase {."1 fdir'~temp/jjy/*' ferase {."1 fdir'~temp/jjz/*' 'abc'fwrite'~temp/jjx/a' '~temp/jj/b'jjput'~temp/jjx/a' '~temp/jj/c'jjget'~temp/jjx/b' assert fexist (<'~temp/jjx/'),each ;:'a b c' '~temp/jjy'jjput'~temp/jjx' assert fexist (<'~temp/jjy/'),each ;:'a b c' '~temp/jjz'jjget'~temp/jjy' assert fexist (<'~temp/jjz/'),each ;:'a b c' ) ~~~ Now I want to go reinstall my start.ijs and some working files that I had in place - fortunately, having iExplorer makes that reasonably easy. So, progress is being made. > On 2017Aug 9, at 19:01, Eric Iversonwrote: > > That is the jjget_jj_ from the previous j701 install. To get the new bundle > docs you will have to go through the steps I gave earlier. The did work for > Patrick, but had the nasty side effect of loosing his other data. > > I am starting to understand what the problem is and should be able to fix > it the next time around. > > If you really do not want to do the delete and clean install you could see > if jjget and jjput work as dyads. That is, > > '~temp/t.txt' jjget '~temp/t.txt' > > But the new version is much cleaner and I hope you can manage to do the > delete and clean install. > > > On Wed, Aug 9, 2017 at 9:19 PM, Joey K Tuttle wrote: > >> Actually not too tedious, the copy paste across devices combined with your >> jsetcb '... avoided having to retype everything. >> >> Some added thoughts about this - I started from a clean start (if not >> install) by killing the J task then restarting it. Then, I did - >> >> untable >nl_jj_ &.> 0 3 >> TAR URL posttemplate >> jjdojjget jjput jjset >> >> NB. This was without loading jj.ijs, so _jj_ locale seems to have already >> been there. That followed by - >> >> jjget_jj_ >> 4 : 0 >> target=. x [ source=. y >> select. 'ftype y'jjdo source >> case. 1 do. >> d=. 'fread y' jjdo source >> mkdir_j_ (target i: '/'){.target NB. ensure path >> 'write to target failed'assert (#d)=d fwrite target >> case. 2 do. >> 'tar y'jjdo 'c';TAR;source;'' >> d=. 'fread y' jjdo TAR >> d fwrite TAR >> mkdir_j_ target >> tar 'x';TAR;target >> case. do. >> 'source is not a file or folder'assert 0 >> end. >> ) >> >> May be what you were requesting. >> >> A thought occurred to me that you will notice my own tool from profile >> (unable) that is loaded on startup across all my j installations. My >> thought was that perhaps your "clean install" didn't have to contend with >> an existing start.ijs script file. But the first line in above would seem >> to indicate that it isn't necessary in this case. >> >> Oh, there was one somewhat tedious bit that I don't understand (but is >> probably one of those "thousands of settings" you mentioned) I could not >> simply use jsetcb '... and then past into this email. I had to first paste >> it into Pages on the iPhone (probably could have used some other app >> dealing with text, but I didn't try others). Also, to be forthright, I >> haven't yet been able to reverse the process (to take things from OS X back >> into iOS) - computers are often a puzzle... >> >> - joey >> >>> On 2017Aug 9, at 16:47, Eric Iverson
Re: [Jprogramming] J for iOS
Actually not too tedious, the copy paste across devices combined with your jsetcb '... avoided having to retype everything. Some added thoughts about this - I started from a clean start (if not install) by killing the J task then restarting it. Then, I did - untable >nl_jj_ &.> 0 3 TAR URL posttemplate jjdojjget jjput jjset NB. This was without loading jj.ijs, so _jj_ locale seems to have already been there. That followed by - jjget_jj_ 4 : 0 target=. x [ source=. y select. 'ftype y'jjdo source case. 1 do. d=. 'fread y' jjdo source mkdir_j_ (target i: '/'){.target NB. ensure path 'write to target failed'assert (#d)=d fwrite target case. 2 do. 'tar y'jjdo 'c';TAR;source;'' d=. 'fread y' jjdo TAR d fwrite TAR mkdir_j_ target tar 'x';TAR;target case. do. 'source is not a file or folder'assert 0 end. ) May be what you were requesting. A thought occurred to me that you will notice my own tool from profile (unable) that is loaded on startup across all my j installations. My thought was that perhaps your "clean install" didn't have to contend with an existing start.ijs script file. But the first line in above would seem to indicate that it isn't necessary in this case. Oh, there was one somewhat tedious bit that I don't understand (but is probably one of those "thousands of settings" you mentioned) I could not simply use jsetcb '... and then past into this email. I had to first paste it into Pages on the iPhone (probably could have used some other app dealing with text, but I didn't try others). Also, to be forthright, I haven't yet been able to reverse the process (to take things from OS X back into iOS) - computers are often a puzzle... - joey > On 2017Aug 9, at 16:47, Eric Iversonwrote: > > Joey, > > This will be tedious, but could you please do: > > jjget_jj_ > > and give me the the first 3 or 3 lines (at least in summary). > > On Wed, Aug 9, 2017 at 7:39 PM, Eric Iverson > wrote: > >> Patrick, >> >> You give 192.168.0.19:65001 which is exactly what the wiki page gives by >> way of an example. This could be true on your system, but is unlikely, The >> jjset arg should be the one reported in the init_jjserver_ on the JHS >> server. >> >> However. the other problems you and Joey report remains. >> >> >> >> On Wed, Aug 9, 2017 at 7:01 PM, J. Patrick Harrington >> wrote: >> >>> Eric, >>> I get the same results as Joey. In addition, >>> names_jj_ 0 >>> PASS SERVER TAR URL >>> posttemplate >>> >>> and PASS has the password I entered and SERVER has >>> 192.168.0.19:65001 >>> >>>Patrick >>> >>> >>> On Wed, 9 Aug 2017, Joey K Tuttle wrote: >>> VERSION_j_ 701.1 2 jj |value error: jj explicitly doing load '~system/util/jj.ijs' NB. executes with no complaint (and, of course, no result shown) NB. but then when (as suggested in http://code.jsoftware.com/wiki /Guides/iOS ) I do - jjset '10.1.1.23:65001 pswd' NB. for my local network (again no result appears) but jjget '~addons/math/miax' |domain error: jjget_jj_ | jjget'~addons/math/misc' > nl_jj_ 3 jjdo jjget jjput jjset NB. So things look like they are almost working, but something is tripping me up. ~~ a couple of aside observations... typing paths with the greatly improved keyboard is almost as painful as it used to be in the older version (because of having to shift to ! keyboard for / ...) Retyping the stuff above makes me resolve to find a way to disable spell checking in Apple mail client more easily (and may have "corrected" things that I didn't notice - if so, please read as what you think it should be. - joey On 2017Aug 9, at 14:19, Eric Iverson wrote: > > Strange. As we always say, it works for me. > > What is the value of VERSION_j_ ? It should be '701.1 2'. > > But that has to be right as you indicate the backspace key repeats if > you > hold it down. > > Is there any chance you are trying jj in the previous j701 version? > > I also just realized that I probably need to update the JHS addon. > > I will look at this later tonight if you can give me a little more info. > > All that jj does is to: > load'~system/util/jj.ijs' > > > > > On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: > > Eric, >> >> Bravo on the keyboard change and the repeating keys (just really nice >> to >> have them!) >> >> I think your setup for j to j is exciting news too, but am disappointed >> after starting the new release getting - >> >> jj 0 >> |value error:
Re: [Jprogramming] J for iOS
Joey, I agree with you re / on keyboard. In next version I will squeeze in a few more 'important' keys. My current set is / and ~ On Wed, Aug 9, 2017 at 7:55 PM, Eric Iversonwrote: > Joey, Patrick, > > It looks as if you have the new j701 binary, but don't have the new data > bundle (scripts). You are seeing the scripts from the earlier j701 release > before the jj stuff was cleaned up. > > I think the bundle at the app store is good based on the fact that when I > do a clean install I get what I expect. > > My guess is that somehow doing an update to an existing install doesn't > update the bundle. > > I have probably got some setting wrong (out of a few thousand) and will > dig into it. > > Please try the following: > > 1. make sure j701 is not running - double tap home key and discard (up > swipe) any j701 stuff > 2. delete the j701 app - press and hold, tap the x button in the corner, > press the home key > 3. get it again from the app store > 4. try jj et. al. again > > > > On Wed, Aug 9, 2017 at 7:47 PM, Eric Iverson > wrote: > >> Joey, >> >> This will be tedious, but could you please do: >> >>jjget_jj_ >> >> and give me the the first 3 or 3 lines (at least in summary). >> >> On Wed, Aug 9, 2017 at 7:39 PM, Eric Iverson >> wrote: >> >>> Patrick, >>> >>> You give 192.168.0.19:65001 which is exactly what the wiki page gives >>> by way of an example. This could be true on your system, but is unlikely, >>> The jjset arg should be the one reported in the init_jjserver_ on the JHS >>> server. >>> >>> However. the other problems you and Joey report remains. >>> >>> >>> >>> On Wed, Aug 9, 2017 at 7:01 PM, J. Patrick Harrington >> > wrote: >>> Eric, I get the same results as Joey. In addition, names_jj_ 0 PASS SERVER TAR URL posttemplate and PASS has the password I entered and SERVER has 192.168.0.19:65001 Patrick On Wed, 9 Aug 2017, Joey K Tuttle wrote: > > VERSION_j_ > 701.1 2 > jj > |value error: jj > > explicitly doing > > load '~system/util/jj.ijs' > > NB. executes with no complaint (and, of course, no result shown) > NB. but then when (as suggested in http://code.jsoftware.com/wiki > /Guides/iOS ) I do - > > jjset '10.1.1.23:65001 pswd' NB. for my local network (again no > result appears) but > jjget '~addons/math/miax' > |domain error: jjget_jj_ > | jjget'~addons/math/misc' > > >nl_jj_ 3 > jjdo > jjget > jjput > jjset > > > NB. So things look like they are almost working, but something is > tripping me up. > > ~~ a couple of aside observations... > > typing paths with the greatly improved keyboard is almost as painful > as it used to be in the older version (because of having to shift to ! > keyboard for / ...) > > Retyping the stuff above makes me resolve to find a way to disable > spell checking in Apple mail client more easily (and may have "corrected" > things that I didn't notice - if so, please read as what you think it > should be. > > - joey > > > On 2017Aug 9, at 14:19, Eric Iverson wrote: >> >> Strange. As we always say, it works for me. >> >> What is the value of VERSION_j_ ? It should be '701.1 2'. >> >> But that has to be right as you indicate the backspace key repeats if >> you >> hold it down. >> >> Is there any chance you are trying jj in the previous j701 version? >> >> I also just realized that I probably need to update the JHS addon. >> >> I will look at this later tonight if you can give me a little more >> info. >> >> All that jj does is to: >> load'~system/util/jj.ijs' >> >> >> >> >> On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: >> >> Eric, >>> >>> Bravo on the keyboard change and the repeating keys (just really >>> nice to >>> have them!) >>> >>> I think your setup for j to j is exciting news too, but am >>> disappointed >>> after starting the new release getting - >>> >>> jj 0 >>> |value error: jj >>> >>> The suggested scripts in desktop JHS seem to work in setting up the >>> connection. >>> >>> Maybe I'm missing a script update on the iOS side? or ?? >>> >>> - joey >>> >>> >>> On 2017Aug 9, at 12:28, Eric Iverson wrote: An updated J is available at the Apple App Store. This fixes a few minor problems with the release on July 4th, adds a bell and whistle, and provides a new way to move scripts and data between your device and >>> desktop >>>
Re: [Jprogramming] J for iOS
Joey, Patrick, It looks as if you have the new j701 binary, but don't have the new data bundle (scripts). You are seeing the scripts from the earlier j701 release before the jj stuff was cleaned up. I think the bundle at the app store is good based on the fact that when I do a clean install I get what I expect. My guess is that somehow doing an update to an existing install doesn't update the bundle. I have probably got some setting wrong (out of a few thousand) and will dig into it. Please try the following: 1. make sure j701 is not running - double tap home key and discard (up swipe) any j701 stuff 2. delete the j701 app - press and hold, tap the x button in the corner, press the home key 3. get it again from the app store 4. try jj et. al. again On Wed, Aug 9, 2017 at 7:47 PM, Eric Iversonwrote: > Joey, > > This will be tedious, but could you please do: > >jjget_jj_ > > and give me the the first 3 or 3 lines (at least in summary). > > On Wed, Aug 9, 2017 at 7:39 PM, Eric Iverson > wrote: > >> Patrick, >> >> You give 192.168.0.19:65001 which is exactly what the wiki page gives by >> way of an example. This could be true on your system, but is unlikely, The >> jjset arg should be the one reported in the init_jjserver_ on the JHS >> server. >> >> However. the other problems you and Joey report remains. >> >> >> >> On Wed, Aug 9, 2017 at 7:01 PM, J. Patrick Harrington >> wrote: >> >>> Eric, >>> I get the same results as Joey. In addition, >>> names_jj_ 0 >>> PASS SERVER TAR URL >>> posttemplate >>> >>> and PASS has the password I entered and SERVER has >>> 192.168.0.19:65001 >>> >>> Patrick >>> >>> >>> On Wed, 9 Aug 2017, Joey K Tuttle wrote: >>> VERSION_j_ 701.1 2 jj |value error: jj explicitly doing load '~system/util/jj.ijs' NB. executes with no complaint (and, of course, no result shown) NB. but then when (as suggested in http://code.jsoftware.com/wiki /Guides/iOS ) I do - jjset '10.1.1.23:65001 pswd' NB. for my local network (again no result appears) but jjget '~addons/math/miax' |domain error: jjget_jj_ | jjget'~addons/math/misc' >nl_jj_ 3 jjdo jjget jjput jjset NB. So things look like they are almost working, but something is tripping me up. ~~ a couple of aside observations... typing paths with the greatly improved keyboard is almost as painful as it used to be in the older version (because of having to shift to ! keyboard for / ...) Retyping the stuff above makes me resolve to find a way to disable spell checking in Apple mail client more easily (and may have "corrected" things that I didn't notice - if so, please read as what you think it should be. - joey On 2017Aug 9, at 14:19, Eric Iverson wrote: > > Strange. As we always say, it works for me. > > What is the value of VERSION_j_ ? It should be '701.1 2'. > > But that has to be right as you indicate the backspace key repeats if > you > hold it down. > > Is there any chance you are trying jj in the previous j701 version? > > I also just realized that I probably need to update the JHS addon. > > I will look at this later tonight if you can give me a little more > info. > > All that jj does is to: > load'~system/util/jj.ijs' > > > > > On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: > > Eric, >> >> Bravo on the keyboard change and the repeating keys (just really nice >> to >> have them!) >> >> I think your setup for j to j is exciting news too, but am >> disappointed >> after starting the new release getting - >> >> jj 0 >> |value error: jj >> >> The suggested scripts in desktop JHS seem to work in setting up the >> connection. >> >> Maybe I'm missing a script update on the iOS side? or ?? >> >> - joey >> >> >> On 2017Aug 9, at 12:28, Eric Iverson >>> wrote: >>> >>> An updated J is available at the Apple App Store. This fixes a few >>> minor >>> problems with the release on July 4th, adds a bell and whistle, and >>> provides a new way to move scripts and data between your device and >>> >> desktop >> >>> called jj (j to j). >>> >>> See http://code.jsoftware.com/wiki/Guides/iOS for more information. >>> >>> -- >>> For information about J forums see http://www.jsoftware.com/forum >>> s.htm >>> >> >> >> -- >> For
Re: [Jprogramming] J for iOS
Joey, This will be tedious, but could you please do: jjget_jj_ and give me the the first 3 or 3 lines (at least in summary). On Wed, Aug 9, 2017 at 7:39 PM, Eric Iversonwrote: > Patrick, > > You give 192.168.0.19:65001 which is exactly what the wiki page gives by > way of an example. This could be true on your system, but is unlikely, The > jjset arg should be the one reported in the init_jjserver_ on the JHS > server. > > However. the other problems you and Joey report remains. > > > > On Wed, Aug 9, 2017 at 7:01 PM, J. Patrick Harrington > wrote: > >> Eric, >> I get the same results as Joey. In addition, >> names_jj_ 0 >> PASS SERVER TAR URL >> posttemplate >> >> and PASS has the password I entered and SERVER has >> 192.168.0.19:65001 >> >> Patrick >> >> >> On Wed, 9 Aug 2017, Joey K Tuttle wrote: >> >>> >>> VERSION_j_ >>> 701.1 2 >>> jj >>> |value error: jj >>> >>> explicitly doing >>> >>> load '~system/util/jj.ijs' >>> >>> NB. executes with no complaint (and, of course, no result shown) >>> NB. but then when (as suggested in http://code.jsoftware.com/wiki >>> /Guides/iOS ) I do - >>> >>> jjset '10.1.1.23:65001 pswd' NB. for my local network (again no >>> result appears) but >>> jjget '~addons/math/miax' >>> |domain error: jjget_jj_ >>> | jjget'~addons/math/misc' >>> >>> >nl_jj_ 3 >>> jjdo >>> jjget >>> jjput >>> jjset >>> >>> >>> NB. So things look like they are almost working, but something is >>> tripping me up. >>> >>> ~~ a couple of aside observations... >>> >>> typing paths with the greatly improved keyboard is almost as painful as >>> it used to be in the older version (because of having to shift to ! >>> keyboard for / ...) >>> >>> Retyping the stuff above makes me resolve to find a way to disable spell >>> checking in Apple mail client more easily (and may have "corrected" things >>> that I didn't notice - if so, please read as what you think it should be. >>> >>> - joey >>> >>> >>> On 2017Aug 9, at 14:19, Eric Iverson wrote: Strange. As we always say, it works for me. What is the value of VERSION_j_ ? It should be '701.1 2'. But that has to be right as you indicate the backspace key repeats if you hold it down. Is there any chance you are trying jj in the previous j701 version? I also just realized that I probably need to update the JHS addon. I will look at this later tonight if you can give me a little more info. All that jj does is to: load'~system/util/jj.ijs' On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: Eric, > > Bravo on the keyboard change and the repeating keys (just really nice > to > have them!) > > I think your setup for j to j is exciting news too, but am disappointed > after starting the new release getting - > > jj 0 > |value error: jj > > The suggested scripts in desktop JHS seem to work in setting up the > connection. > > Maybe I'm missing a script update on the iOS side? or ?? > > - joey > > > On 2017Aug 9, at 12:28, Eric Iverson wrote: >> >> An updated J is available at the Apple App Store. This fixes a few >> minor >> problems with the release on July 4th, adds a bell and whistle, and >> provides a new way to move scripts and data between your device and >> > desktop > >> called jj (j to j). >> >> See http://code.jsoftware.com/wiki/Guides/iOS for more information. >> >> -- >> For information about J forums see http://www.jsoftware.com/forum >> s.htm >> > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm >>> >>> -- >>> For information about J forums see http://www.jsoftware.com/forums.htm >>> >> -- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] J for iOS
Patrick, You give 192.168.0.19:65001 which is exactly what the wiki page gives by way of an example. This could be true on your system, but is unlikely, The jjset arg should be the one reported in the init_jjserver_ on the JHS server. However. the other problems you and Joey report remains. On Wed, Aug 9, 2017 at 7:01 PM, J. Patrick Harringtonwrote: > Eric, > I get the same results as Joey. In addition, > names_jj_ 0 > PASS SERVER TAR URL > posttemplate > > and PASS has the password I entered and SERVER has > 192.168.0.19:65001 > > Patrick > > > On Wed, 9 Aug 2017, Joey K Tuttle wrote: > >> >> VERSION_j_ >> 701.1 2 >> jj >> |value error: jj >> >> explicitly doing >> >> load '~system/util/jj.ijs' >> >> NB. executes with no complaint (and, of course, no result shown) >> NB. but then when (as suggested in http://code.jsoftware.com/wiki >> /Guides/iOS ) I do - >> >> jjset '10.1.1.23:65001 pswd' NB. for my local network (again no >> result appears) but >> jjget '~addons/math/miax' >> |domain error: jjget_jj_ >> | jjget'~addons/math/misc' >> >> >nl_jj_ 3 >> jjdo >> jjget >> jjput >> jjset >> >> >> NB. So things look like they are almost working, but something is >> tripping me up. >> >> ~~ a couple of aside observations... >> >> typing paths with the greatly improved keyboard is almost as painful as >> it used to be in the older version (because of having to shift to ! >> keyboard for / ...) >> >> Retyping the stuff above makes me resolve to find a way to disable spell >> checking in Apple mail client more easily (and may have "corrected" things >> that I didn't notice - if so, please read as what you think it should be. >> >> - joey >> >> >> On 2017Aug 9, at 14:19, Eric Iverson wrote: >>> >>> Strange. As we always say, it works for me. >>> >>> What is the value of VERSION_j_ ? It should be '701.1 2'. >>> >>> But that has to be right as you indicate the backspace key repeats if you >>> hold it down. >>> >>> Is there any chance you are trying jj in the previous j701 version? >>> >>> I also just realized that I probably need to update the JHS addon. >>> >>> I will look at this later tonight if you can give me a little more info. >>> >>> All that jj does is to: >>> load'~system/util/jj.ijs' >>> >>> >>> >>> >>> On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: >>> >>> Eric, Bravo on the keyboard change and the repeating keys (just really nice to have them!) I think your setup for j to j is exciting news too, but am disappointed after starting the new release getting - jj 0 |value error: jj The suggested scripts in desktop JHS seem to work in setting up the connection. Maybe I'm missing a script update on the iOS side? or ?? - joey On 2017Aug 9, at 12:28, Eric Iverson wrote: > > An updated J is available at the Apple App Store. This fixes a few > minor > problems with the release on July 4th, adds a bell and whistle, and > provides a new way to move scripts and data between your device and > desktop > called jj (j to j). > > See http://code.jsoftware.com/wiki/Guides/iOS for more information. > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm >>> -- >>> For information about J forums see http://www.jsoftware.com/forums.htm >>> >> >> -- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > -- > For information about J forums see http://www.jsoftware.com/forums.htm > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] J for iOS
Eric, I get the same results as Joey. In addition, names_jj_ 0 PASS SERVER TAR URL posttemplate and PASS has the password I entered and SERVER has 192.168.0.19:65001 Patrick On Wed, 9 Aug 2017, Joey K Tuttle wrote: VERSION_j_ 701.1 2 jj |value error: jj explicitly doing load '~system/util/jj.ijs' NB. executes with no complaint (and, of course, no result shown) NB. but then when (as suggested in http://code.jsoftware.com/wiki/Guides/iOS ) I do - jjset '10.1.1.23:65001 pswd' NB. for my local network (again no result appears) but jjget '~addons/math/miax' |domain error: jjget_jj_ | jjget'~addons/math/misc' >nl_jj_ 3 jjdo jjget jjput jjset NB. So things look like they are almost working, but something is tripping me up. ~~ a couple of aside observations... typing paths with the greatly improved keyboard is almost as painful as it used to be in the older version (because of having to shift to ! keyboard for / ...) Retyping the stuff above makes me resolve to find a way to disable spell checking in Apple mail client more easily (and may have "corrected" things that I didn't notice - if so, please read as what you think it should be. - joey On 2017Aug 9, at 14:19, Eric Iversonwrote: Strange. As we always say, it works for me. What is the value of VERSION_j_ ? It should be '701.1 2'. But that has to be right as you indicate the backspace key repeats if you hold it down. Is there any chance you are trying jj in the previous j701 version? I also just realized that I probably need to update the JHS addon. I will look at this later tonight if you can give me a little more info. All that jj does is to: load'~system/util/jj.ijs' On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: Eric, Bravo on the keyboard change and the repeating keys (just really nice to have them!) I think your setup for j to j is exciting news too, but am disappointed after starting the new release getting - jj 0 |value error: jj The suggested scripts in desktop JHS seem to work in setting up the connection. Maybe I'm missing a script update on the iOS side? or ?? - joey On 2017Aug 9, at 12:28, Eric Iverson wrote: An updated J is available at the Apple App Store. This fixes a few minor problems with the release on July 4th, adds a bell and whistle, and provides a new way to move scripts and data between your device and desktop called jj (j to j). See http://code.jsoftware.com/wiki/Guides/iOS for more information. -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] J for iOS
VERSION_j_ 701.1 2 jj |value error: jj explicitly doing load '~system/util/jj.ijs' NB. executes with no complaint (and, of course, no result shown) NB. but then when (as suggested in http://code.jsoftware.com/wiki/Guides/iOS ) I do - jjset '10.1.1.23:65001 pswd' NB. for my local network (again no result appears) but jjget '~addons/math/miax' |domain error: jjget_jj_ | jjget'~addons/math/misc' >nl_jj_ 3 jjdo jjget jjput jjset NB. So things look like they are almost working, but something is tripping me up. ~~ a couple of aside observations... typing paths with the greatly improved keyboard is almost as painful as it used to be in the older version (because of having to shift to ! keyboard for / ...) Retyping the stuff above makes me resolve to find a way to disable spell checking in Apple mail client more easily (and may have "corrected" things that I didn't notice - if so, please read as what you think it should be. - joey > On 2017Aug 9, at 14:19, Eric Iversonwrote: > > Strange. As we always say, it works for me. > > What is the value of VERSION_j_ ? It should be '701.1 2'. > > But that has to be right as you indicate the backspace key repeats if you > hold it down. > > Is there any chance you are trying jj in the previous j701 version? > > I also just realized that I probably need to update the JHS addon. > > I will look at this later tonight if you can give me a little more info. > > All that jj does is to: > load'~system/util/jj.ijs' > > > > > On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttle wrote: > >> Eric, >> >> Bravo on the keyboard change and the repeating keys (just really nice to >> have them!) >> >> I think your setup for j to j is exciting news too, but am disappointed >> after starting the new release getting - >> >> jj 0 >> |value error: jj >> >> The suggested scripts in desktop JHS seem to work in setting up the >> connection. >> >> Maybe I'm missing a script update on the iOS side? or ?? >> >> - joey >> >> >>> On 2017Aug 9, at 12:28, Eric Iverson wrote: >>> >>> An updated J is available at the Apple App Store. This fixes a few minor >>> problems with the release on July 4th, adds a bell and whistle, and >>> provides a new way to move scripts and data between your device and >> desktop >>> called jj (j to j). >>> >>> See http://code.jsoftware.com/wiki/Guides/iOS for more information. >>> -- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> >> -- >> For information about J forums see http://www.jsoftware.com/forums.htm > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Fractional parts
Bo said: v=(<.v)+(1|v) NB. number = integer part + fractional part? Yes! True. However, if ]v=:2%(3r19-%1 2 3 245 246 247 248) _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 And we define the fractional part of v your way: 1|v 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 I contend that 0.0625 is NOT the fractional part of _2.375, at least not in my eyes. It may be the residue of a division by one, but that isn't what I call a fractional part of a negative number (except maybe in 2s complement binary) Also, using your definition of the integer part: ]v=:2%(3r19-%1 2 3 245 246 247 248) _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 <. v _3 _6 _12 13 13 13 12 _3 _6 _12 isn't the integer part of _2.375 _5.84615 _11.4 However, as you say: v=(<.v)+(1|v) 1 1 1 1 1 1 1 So my test for finding the correct fractional and integer parts of a number by adding the two parts together are not sufficient to determine if the ip and fp are the correct values. Skip -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] J for iOS
Strange. As we always say, it works for me. What is the value of VERSION_j_ ? It should be '701.1 2'. But that has to be right as you indicate the backspace key repeats if you hold it down. Is there any chance you are trying jj in the previous j701 version? I also just realized that I probably need to update the JHS addon. I will look at this later tonight if you can give me a little more info. All that jj does is to: load'~system/util/jj.ijs' On Wed, Aug 9, 2017 at 4:11 PM, Joey K Tuttlewrote: > Eric, > > Bravo on the keyboard change and the repeating keys (just really nice to > have them!) > > I think your setup for j to j is exciting news too, but am disappointed > after starting the new release getting - > >jj 0 > |value error: jj > > The suggested scripts in desktop JHS seem to work in setting up the > connection. > > Maybe I'm missing a script update on the iOS side? or ?? > > - joey > > > > On 2017Aug 9, at 12:28, Eric Iverson wrote: > > > > An updated J is available at the Apple App Store. This fixes a few minor > > problems with the release on July 4th, adds a bell and whistle, and > > provides a new way to move scripts and data between your device and > desktop > > called jj (j to j). > > > > See http://code.jsoftware.com/wiki/Guides/iOS for more information. > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] J for iOS
Eric, Bravo on the keyboard change and the repeating keys (just really nice to have them!) I think your setup for j to j is exciting news too, but am disappointed after starting the new release getting - jj 0 |value error: jj The suggested scripts in desktop JHS seem to work in setting up the connection. Maybe I'm missing a script update on the iOS side? or ?? - joey > On 2017Aug 9, at 12:28, Eric Iversonwrote: > > An updated J is available at the Apple App Store. This fixes a few minor > problems with the release on July 4th, adds a bell and whistle, and > provides a new way to move scripts and data between your device and desktop > called jj (j to j). > > See http://code.jsoftware.com/wiki/Guides/iOS for more information. > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Fractional parts
Why so? Did I miss a non-scalar verb somewhere? Thanks, Louis > On 9 Aug 2017, at 14:47, Raul Millerwrote: > > I think you have assumed that the user will use these with "0 or only > on atomic numbers? > > Thanks, > > -- > Raul > > >> On Wed, Aug 9, 2017 at 3:39 PM, Louis de Forcrand wrote: >> A few handy tests which are good to know: >> >> N=: GI *. 1 0 e.~ * NB. naturals >> Z=: GI *. R NB. integers >> R=: = + NB. reals >> C_R=: + = - NB. pure imaginaries (C-.R) >> GI=: = <. NB. gaussian integers >> >> These were made to accept any J number. They could be optimised if one knows >> that they are working only with real numbers, for example. In that case >> >> 1 0 e.~ * >> >> could be replaced by >> >>> :&0 >> >> and the test for reals can be skipped in Z. >> >> In addition, these work with the mathematical definitions of the different >> number sets, not with J's internal storage types. >> >> Louis >> >>> On 9 Aug 2017, at 11:42, Skip Cave wrote: >>> >>> Martin, >>> >>> The original problem I was working on was a post on Quora ( >>> https://goo.gl/NrZde2). I use these Quora math questions to help sharpen my >>> J skills. I try to see if I can "brute force" the solutions using J, while >>> most other posters try to solve these things by algebraic manipulation. My >>> answer to that question is here: (https://goo.gl/FhdJAg). There are several >>> Quora problems that I have posted J solutions for, mostly to show how >>> simple a brute force solution can be when using an array language. You can >>> find those posts by searching for my name ("Skip Cave") in Quora >>> >>> In this problem all I really needed to do was to find all the results from >>> the equation that were integers, so I used the 0=1|| scheme to find them. >>> >>> Our discussion on the J forum got me thinking about finding both the >>> fractional part and the integer part of numbers, and I thought the pair of >>> verbs (fp, ip) would be a nice addition to the Phrases doc, which is >>> defined as listing phrases "useful to beginners in learning the language, >>> and of continuing use to practical programmers." >>> >>> Also, when I obtained the fractional part, I wanted to keep the fact that >>> the fractional part came from a negative number, hence the attempt to have >>> negative fractional parts. >>> >>> Skip >>> >>> Skip Cave >>> Cave Consulting LLC >>> On Wed, Aug 9, 2017 at 9:35 AM, Martin Kreuzer wrote: From what I've gathered so far is, that people seem to not mind that much, when extracting the fractional part from a (negative) float, they use (1&|) _8.11 0.89 or
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Quite right. Henry Rich On Aug 9, 2017 20:46, "Raul Miller"wrote: > Well, since it's encoded as an integer (which I would have noticed if > I had read Bob Therriault's original post more closely), and not [like > I was thinking] a float, I agree that dropping the .3 is better than > adding a 1. > > That said, I guess we also should not object too loudly if > .3 were instead encoded the same as > +0.3 gets encoded. > > Thanks, > > -- > Raul > > On Wed, Aug 9, 2017 at 3:25 PM, Henry Rich wrote: > > Surely integer 999...9 is a better value than 1000...0 . > > > > Henry Rich > > > > On Aug 9, 2017 18:33, "Raul Miller" wrote: > > > >> It's not a bug, it's an artifact of the 64 bit floating point standard. > >> > >>2 ^. > >> 53.1508 > >> > >> https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats > >> > >> The binary64 format has 53 binary digits or 15.95 decimal digits. This > >> means ".16#'9' cannot be represented exactly using this format. > >> > >> And, we do not use exact representation of large numbers by default > >> because that's too slow for large datasets. Put differently, if you > >> want exact representation and are willing to take the performance hit, > >> you should specify that. For example: ".'x',~16#'9' or > >> ".'3r10+','x',~16#'9' > >> > >> Thanks, > >> > >> -- > >> Raul > >> > >> On Wed, Aug 9, 2017 at 12:05 PM, Henry Rich > wrote: > >> > This is a bug, since 999...9.3 should become 999...9 rather than > >> 100...0. > >> > I'm away from home now, but I think what's happening is this: > >> > > >> > 999...9 is converted to integer > >> > > >> > . is encountered and turns it to float > >> > > >> > It's rounded to the nearest float which is 100...0 > >> > > >> > As a final step the JE checks to see if the value is exactly integral, > >> > which it is, and it is converted back to integer. > >> > > >> > If you add this to Interpreter/Bugs I'll fix it when i get back. > >> > > >> > Henry Rich > >> > > >> > On Aug 9, 2017 16:16, "bill lam" wrote: > >> > > >> > I think this is the difference between 32 and 64-bit, > >> > > >> >9!:14'' > >> > j602/2008-03-03/16:45 > >> >3!:0[ .3 > >> > 4 > >> > > >> > In J32 > >> > > >> >a.i. 2 fc .3 > >> > 0 128 224 55 121 195 65 67 > >> >a.i. 2 fc 1e16 > >> > 0 128 224 55 121 195 65 67 > >> > > >> > the number has the same bit pattern as 1e16 (an integer) > >> > which can be represented as a 64-bit integer. I guess > >> > J64 is correct since .3 and 1e16 is the > >> > same number in ieee fp and J prefers integer to floats, > >> > eg > >> > 3!:0 [ 2.0 > >> > 4 > >> > > >> > Ср, 09 авг 2017, robert therriault написал(а): > >> >> Hi Pascal, > >> >> > >> >> I see the same behaviour in j806 as j805. Do you see something > >> different? > >> >> > >> >> JVERSION > >> >> Engine: j806/j64avx/darwin > >> >> Beta-4: commercial/2017-06-27T12:55:06 > >> >> Library: 8.06.03 > >> >> Qt IDE: 1.5.3/5.6.2 > >> >> Platform: Darwin 64 > >> >> Installer: J806 install > >> >> InstallPath: /users/bobtherriault/j64-806 > >> >> Contact: www.jsoftware.com > >> >>(; datatype) 999.3 > >> >> ┌┬┐ > >> >> │1e15│floating│ > >> >> └┴┘ > >> >>(; datatype) .3 > >> >> ┌─┬───┐ > >> >> │1│integer│ > >> >> └─┴───┘ > >> >>(; datatype) 9.3 > >> >> ┌──┬───┐ > >> >> │10│integer│ > >> >> └──┴───┘ > >> >>(; datatype) 99.3 > >> >> ┌───┬───┐ > >> >> │100│integer│ > >> >> └───┴───┘ > >> >>(; datatype) 999.3 > >> >> ┌┬┐ > >> >> │1e19│floating│ > >> >> └┴┘ > >> >> > >> >> Cheers, bob > >> >> > >> >> > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < > >> > programm...@jsoftware.com> wrote: > >> >> > > >> >> > in j806,.31 probably the j805 > >> > behaviour is preferred. If only for consistency. But there may be a > >> good > >> > reason for change. > >> >> > > >> >> > From: robert therriault > >> >> > To: Programming forum > >> >> > Sent: Wednesday, August 9, 2017 10:40 AM > >> >> > Subject: [Jprogramming] Integer-floating type change for large > numbers > >> > in j805 and j806 > >> >> > > >> >> > I am guessing that the following has something to do with > precision of > >> > large numbers in j805 and is also true for j806. > >> >> > > >> >> > (; datatype) 999.3 > >> >> > ┌┬┐ > >> >> > │1e15│floating│ > >> >> > └┴┘ > >> >> > (; datatype) .3 > >> >> > ┌─┬───┐ > >> >> >
Re: [Jprogramming] Fractional parts
I think you have assumed that the user will use these with "0 or only on atomic numbers? Thanks, -- Raul On Wed, Aug 9, 2017 at 3:39 PM, Louis de Forcrandwrote: > A few handy tests which are good to know: > > N=: GI *. 1 0 e.~ * NB. naturals > Z=: GI *. R NB. integers > R=: = + NB. reals > C_R=: + = - NB. pure imaginaries (C-.R) > GI=: = <. NB. gaussian integers > > These were made to accept any J number. They could be optimised if one knows > that they are working only with real numbers, for example. In that case > > 1 0 e.~ * > > could be replaced by > >>:&0 > > and the test for reals can be skipped in Z. > > In addition, these work with the mathematical definitions of the different > number sets, not with J's internal storage types. > > Louis > >> On 9 Aug 2017, at 11:42, Skip Cave wrote: >> >> Martin, >> >> The original problem I was working on was a post on Quora ( >> https://goo.gl/NrZde2). I use these Quora math questions to help sharpen my >> J skills. I try to see if I can "brute force" the solutions using J, while >> most other posters try to solve these things by algebraic manipulation. My >> answer to that question is here: (https://goo.gl/FhdJAg). There are several >> Quora problems that I have posted J solutions for, mostly to show how >> simple a brute force solution can be when using an array language. You can >> find those posts by searching for my name ("Skip Cave") in Quora >> >> In this problem all I really needed to do was to find all the results from >> the equation that were integers, so I used the 0=1|| scheme to find them. >> >> Our discussion on the J forum got me thinking about finding both the >> fractional part and the integer part of numbers, and I thought the pair of >> verbs (fp, ip) would be a nice addition to the Phrases doc, which is >> defined as listing phrases "useful to beginners in learning the language, >> and of continuing use to practical programmers." >> >> Also, when I obtained the fractional part, I wanted to keep the fact that >> the fractional part came from a negative number, hence the attempt to have >> negative fractional parts. >> >> Skip >> >> Skip Cave >> Cave Consulting LLC >> >>> On Wed, Aug 9, 2017 at 9:35 AM, Martin Kreuzer wrote: >>> >>> From what I've gathered so far is, that people seem to not mind that much, >>> when extracting the fractional part from a (negative) float, they use >>> >>> (1&|) _8.11 >>> 0.89 >>> >>> or >>> >>>
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Well, since it's encoded as an integer (which I would have noticed if I had read Bob Therriault's original post more closely), and not [like I was thinking] a float, I agree that dropping the .3 is better than adding a 1. That said, I guess we also should not object too loudly if .3 were instead encoded the same as +0.3 gets encoded. Thanks, -- Raul On Wed, Aug 9, 2017 at 3:25 PM, Henry Richwrote: > Surely integer 999...9 is a better value than 1000...0 . > > Henry Rich > > On Aug 9, 2017 18:33, "Raul Miller" wrote: > >> It's not a bug, it's an artifact of the 64 bit floating point standard. >> >>2 ^. >> 53.1508 >> >> https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats >> >> The binary64 format has 53 binary digits or 15.95 decimal digits. This >> means ".16#'9' cannot be represented exactly using this format. >> >> And, we do not use exact representation of large numbers by default >> because that's too slow for large datasets. Put differently, if you >> want exact representation and are willing to take the performance hit, >> you should specify that. For example: ".'x',~16#'9' or >> ".'3r10+','x',~16#'9' >> >> Thanks, >> >> -- >> Raul >> >> On Wed, Aug 9, 2017 at 12:05 PM, Henry Rich wrote: >> > This is a bug, since 999...9.3 should become 999...9 rather than >> 100...0. >> > I'm away from home now, but I think what's happening is this: >> > >> > 999...9 is converted to integer >> > >> > . is encountered and turns it to float >> > >> > It's rounded to the nearest float which is 100...0 >> > >> > As a final step the JE checks to see if the value is exactly integral, >> > which it is, and it is converted back to integer. >> > >> > If you add this to Interpreter/Bugs I'll fix it when i get back. >> > >> > Henry Rich >> > >> > On Aug 9, 2017 16:16, "bill lam" wrote: >> > >> > I think this is the difference between 32 and 64-bit, >> > >> >9!:14'' >> > j602/2008-03-03/16:45 >> >3!:0[ .3 >> > 4 >> > >> > In J32 >> > >> >a.i. 2 fc .3 >> > 0 128 224 55 121 195 65 67 >> >a.i. 2 fc 1e16 >> > 0 128 224 55 121 195 65 67 >> > >> > the number has the same bit pattern as 1e16 (an integer) >> > which can be represented as a 64-bit integer. I guess >> > J64 is correct since .3 and 1e16 is the >> > same number in ieee fp and J prefers integer to floats, >> > eg >> > 3!:0 [ 2.0 >> > 4 >> > >> > Ср, 09 авг 2017, robert therriault написал(а): >> >> Hi Pascal, >> >> >> >> I see the same behaviour in j806 as j805. Do you see something >> different? >> >> >> >> JVERSION >> >> Engine: j806/j64avx/darwin >> >> Beta-4: commercial/2017-06-27T12:55:06 >> >> Library: 8.06.03 >> >> Qt IDE: 1.5.3/5.6.2 >> >> Platform: Darwin 64 >> >> Installer: J806 install >> >> InstallPath: /users/bobtherriault/j64-806 >> >> Contact: www.jsoftware.com >> >>(; datatype) 999.3 >> >> ┌┬┐ >> >> │1e15│floating│ >> >> └┴┘ >> >>(; datatype) .3 >> >> ┌─┬───┐ >> >> │1│integer│ >> >> └─┴───┘ >> >>(; datatype) 9.3 >> >> ┌──┬───┐ >> >> │10│integer│ >> >> └──┴───┘ >> >>(; datatype) 99.3 >> >> ┌───┬───┐ >> >> │100│integer│ >> >> └───┴───┘ >> >>(; datatype) 999.3 >> >> ┌┬┐ >> >> │1e19│floating│ >> >> └┴┘ >> >> >> >> Cheers, bob >> >> >> >> > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < >> > programm...@jsoftware.com> wrote: >> >> > >> >> > in j806,.31 probably the j805 >> > behaviour is preferred. If only for consistency. But there may be a >> good >> > reason for change. >> >> > >> >> > From: robert therriault >> >> > To: Programming forum >> >> > Sent: Wednesday, August 9, 2017 10:40 AM >> >> > Subject: [Jprogramming] Integer-floating type change for large numbers >> > in j805 and j806 >> >> > >> >> > I am guessing that the following has something to do with precision of >> > large numbers in j805 and is also true for j806. >> >> > >> >> > (; datatype) 999.3 >> >> > ┌┬┐ >> >> > │1e15│floating│ >> >> > └┴┘ >> >> > (; datatype) .3 >> >> > ┌─┬───┐ >> >> > │1│integer│ >> >> > └─┴───┘ >> >> > (; datatype) 9.3 >> >> > ┌──┬───┐ >> >> > │10│integer│ >> >> > └──┴───┘ >> >> > (; datatype) 99.3 >> >> > ┌───┬───┐ >> >> > │100│integer│ >> >> > └───┴───┘ >> >> > (;
Re: [Jprogramming] Fractional parts
A few handy tests which are good to know: N=: GI *. 1 0 e.~ * NB. naturals Z=: GI *. R NB. integers R=: = + NB. reals C_R=: + = - NB. pure imaginaries (C-.R) GI=: = <. NB. gaussian integers These were made to accept any J number. They could be optimised if one knows that they are working only with real numbers, for example. In that case 1 0 e.~ * could be replaced by >:&0 and the test for reals can be skipped in Z. In addition, these work with the mathematical definitions of the different number sets, not with J's internal storage types. Louis > On 9 Aug 2017, at 11:42, Skip Cavewrote: > > Martin, > > The original problem I was working on was a post on Quora ( > https://goo.gl/NrZde2). I use these Quora math questions to help sharpen my > J skills. I try to see if I can "brute force" the solutions using J, while > most other posters try to solve these things by algebraic manipulation. My > answer to that question is here: (https://goo.gl/FhdJAg). There are several > Quora problems that I have posted J solutions for, mostly to show how > simple a brute force solution can be when using an array language. You can > find those posts by searching for my name ("Skip Cave") in Quora > > In this problem all I really needed to do was to find all the results from > the equation that were integers, so I used the 0=1|| scheme to find them. > > Our discussion on the J forum got me thinking about finding both the > fractional part and the integer part of numbers, and I thought the pair of > verbs (fp, ip) would be a nice addition to the Phrases doc, which is > defined as listing phrases "useful to beginners in learning the language, > and of continuing use to practical programmers." > > Also, when I obtained the fractional part, I wanted to keep the fact that > the fractional part came from a negative number, hence the attempt to have > negative fractional parts. > > Skip > > Skip Cave > Cave Consulting LLC > >> On Wed, Aug 9, 2017 at 9:35 AM, Martin Kreuzer wrote: >> >> From what I've gathered so far is, that people seem to not mind that much, >> when extracting the fractional part from a (negative) float, they use >> >> (1&|) _8.11 >> 0.89 >> >> or >> >>
[Jprogramming] J for iOS
An updated J is available at the Apple App Store. This fixes a few minor problems with the release on July 4th, adds a bell and whistle, and provides a new way to move scripts and data between your device and desktop called jj (j to j). See http://code.jsoftware.com/wiki/Guides/iOS for more information. -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Surely integer 999...9 is a better value than 1000...0 . Henry Rich On Aug 9, 2017 18:33, "Raul Miller"wrote: > It's not a bug, it's an artifact of the 64 bit floating point standard. > >2 ^. > 53.1508 > > https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats > > The binary64 format has 53 binary digits or 15.95 decimal digits. This > means ".16#'9' cannot be represented exactly using this format. > > And, we do not use exact representation of large numbers by default > because that's too slow for large datasets. Put differently, if you > want exact representation and are willing to take the performance hit, > you should specify that. For example: ".'x',~16#'9' or > ".'3r10+','x',~16#'9' > > Thanks, > > -- > Raul > > On Wed, Aug 9, 2017 at 12:05 PM, Henry Rich wrote: > > This is a bug, since 999...9.3 should become 999...9 rather than > 100...0. > > I'm away from home now, but I think what's happening is this: > > > > 999...9 is converted to integer > > > > . is encountered and turns it to float > > > > It's rounded to the nearest float which is 100...0 > > > > As a final step the JE checks to see if the value is exactly integral, > > which it is, and it is converted back to integer. > > > > If you add this to Interpreter/Bugs I'll fix it when i get back. > > > > Henry Rich > > > > On Aug 9, 2017 16:16, "bill lam" wrote: > > > > I think this is the difference between 32 and 64-bit, > > > >9!:14'' > > j602/2008-03-03/16:45 > >3!:0[ .3 > > 4 > > > > In J32 > > > >a.i. 2 fc .3 > > 0 128 224 55 121 195 65 67 > >a.i. 2 fc 1e16 > > 0 128 224 55 121 195 65 67 > > > > the number has the same bit pattern as 1e16 (an integer) > > which can be represented as a 64-bit integer. I guess > > J64 is correct since .3 and 1e16 is the > > same number in ieee fp and J prefers integer to floats, > > eg > > 3!:0 [ 2.0 > > 4 > > > > Ср, 09 авг 2017, robert therriault написал(а): > >> Hi Pascal, > >> > >> I see the same behaviour in j806 as j805. Do you see something > different? > >> > >> JVERSION > >> Engine: j806/j64avx/darwin > >> Beta-4: commercial/2017-06-27T12:55:06 > >> Library: 8.06.03 > >> Qt IDE: 1.5.3/5.6.2 > >> Platform: Darwin 64 > >> Installer: J806 install > >> InstallPath: /users/bobtherriault/j64-806 > >> Contact: www.jsoftware.com > >>(; datatype) 999.3 > >> ┌┬┐ > >> │1e15│floating│ > >> └┴┘ > >>(; datatype) .3 > >> ┌─┬───┐ > >> │1│integer│ > >> └─┴───┘ > >>(; datatype) 9.3 > >> ┌──┬───┐ > >> │10│integer│ > >> └──┴───┘ > >>(; datatype) 99.3 > >> ┌───┬───┐ > >> │100│integer│ > >> └───┴───┘ > >>(; datatype) 999.3 > >> ┌┬┐ > >> │1e19│floating│ > >> └┴┘ > >> > >> Cheers, bob > >> > >> > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < > > programm...@jsoftware.com> wrote: > >> > > >> > in j806,.31 probably the j805 > > behaviour is preferred. If only for consistency. But there may be a > good > > reason for change. > >> > > >> > From: robert therriault > >> > To: Programming forum > >> > Sent: Wednesday, August 9, 2017 10:40 AM > >> > Subject: [Jprogramming] Integer-floating type change for large numbers > > in j805 and j806 > >> > > >> > I am guessing that the following has something to do with precision of > > large numbers in j805 and is also true for j806. > >> > > >> > (; datatype) 999.3 > >> > ┌┬┐ > >> > │1e15│floating│ > >> > └┴┘ > >> > (; datatype) .3 > >> > ┌─┬───┐ > >> > │1│integer│ > >> > └─┴───┘ > >> > (; datatype) 9.3 > >> > ┌──┬───┐ > >> > │10│integer│ > >> > └──┴───┘ > >> > (; datatype) 99.3 > >> > ┌───┬───┐ > >> > │100│integer│ > >> > └───┴───┘ > >> > (; datatype) 999.3 > >> > ┌┬┐ > >> > │1e19│floating│ > >> > └┴┘ > >> > JVERSION > >> > Engine: j805/j64/darwin > >> > Release: commercial/2016-12-11T08:17:56 > >> > Library: 8.05.14 > >> > Qt IDE: 1.5.4/5.6.2 > >> > Platform: Darwin 64 > >> > Installer: J805 install > >> > InstallPath: /applications/j64-805 > >> > Contact: www.jsoftware.com > >> > > >> > Further investigation shows me it was not this way with the 32 bit > > version of j701, so it may be an artifact of moving to 64 bit? > >> > > >> > (; datatype) 999.3 > >> > ┌┬┐ > >>
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Though not quite the same issue but is this related to the behavior listed at http://geocar.sdf1.org/numbers.html ? On Wed, Aug 9, 2017 at 2:17 PM, robert therriaultwrote: > I was more surprised by the type change within a certain numeric range. > > That just seemed a little...odd. > > I guess that even though it feels strange to have a constant change type > just by being > entered, it's not really any different than these examples. > > (; datatype) 3j0 > ┌─┬───┐ > │3│integer│ > └─┴───┘ >(; datatype) 3.0 > ┌─┬───┐ > │3│integer│ > └─┴───┘ >(; datatype) 3.6j0 > ┌───┬┐ > │3.6│floating│ > └───┴┘ >(; datatype) 3r5j0 > ┌───┬┐ > │0.6│floating│ > └───┴┘ > > Cheers, bob > > > On Aug 9, 2017, at 10:33 AM, Raul Miller wrote: > > > > It's not a bug, it's an artifact of the 64 bit floating point standard. > > > > 2 ^. > > 53.1508 > > > > https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats > > > > The binary64 format has 53 binary digits or 15.95 decimal digits. This > > means ".16#'9' cannot be represented exactly using this format. > > > > And, we do not use exact representation of large numbers by default > > because that's too slow for large datasets. Put differently, if you > > want exact representation and are willing to take the performance hit, > > you should specify that. For example: ".'x',~16#'9' or > > ".'3r10+','x',~16#'9' > > > > Thanks, > > > > -- > > Raul > > > > On Wed, Aug 9, 2017 at 12:05 PM, Henry Rich > wrote: > >> This is a bug, since 999...9.3 should become 999...9 rather than > 100...0. > >> I'm away from home now, but I think what's happening is this: > >> > >> 999...9 is converted to integer > >> > >> . is encountered and turns it to float > >> > >> It's rounded to the nearest float which is 100...0 > >> > >> As a final step the JE checks to see if the value is exactly integral, > >> which it is, and it is converted back to integer. > >> > >> If you add this to Interpreter/Bugs I'll fix it when i get back. > >> > >> Henry Rich > >> > >> On Aug 9, 2017 16:16, "bill lam" wrote: > >> > >> I think this is the difference between 32 and 64-bit, > >> > >> 9!:14'' > >> j602/2008-03-03/16:45 > >> 3!:0[ .3 > >> 4 > >> > >> In J32 > >> > >> a.i. 2 fc .3 > >> 0 128 224 55 121 195 65 67 > >> a.i. 2 fc 1e16 > >> 0 128 224 55 121 195 65 67 > >> > >> the number has the same bit pattern as 1e16 (an integer) > >> which can be represented as a 64-bit integer. I guess > >> J64 is correct since .3 and 1e16 is the > >> same number in ieee fp and J prefers integer to floats, > >> eg > >> 3!:0 [ 2.0 > >> 4 > >> > >> Ср, 09 авг 2017, robert therriault написал(а): > >>> Hi Pascal, > >>> > >>> I see the same behaviour in j806 as j805. Do you see something > different? > >>> > >>>JVERSION > >>> Engine: j806/j64avx/darwin > >>> Beta-4: commercial/2017-06-27T12:55:06 > >>> Library: 8.06.03 > >>> Qt IDE: 1.5.3/5.6.2 > >>> Platform: Darwin 64 > >>> Installer: J806 install > >>> InstallPath: /users/bobtherriault/j64-806 > >>> Contact: www.jsoftware.com > >>> (; datatype) 999.3 > >>> ┌┬┐ > >>> │1e15│floating│ > >>> └┴┘ > >>> (; datatype) .3 > >>> ┌─┬───┐ > >>> │1│integer│ > >>> └─┴───┘ > >>> (; datatype) 9.3 > >>> ┌──┬───┐ > >>> │10│integer│ > >>> └──┴───┘ > >>> (; datatype) 99.3 > >>> ┌───┬───┐ > >>> │100│integer│ > >>> └───┴───┘ > >>> (; datatype) 999.3 > >>> ┌┬┐ > >>> │1e19│floating│ > >>> └┴┘ > >>> > >>> Cheers, bob > >>> > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < > >> programm...@jsoftware.com> wrote: > > in j806,.31 probably the j805 > >> behaviour is preferred. If only for consistency. But there may be a > good > >> reason for change. > > From: robert therriault > To: Programming forum > Sent: Wednesday, August 9, 2017 10:40 AM > Subject: [Jprogramming] Integer-floating type change for large numbers > >> in j805 and j806 > > I am guessing that the following has something to do with precision of > >> large numbers in j805 and is also true for j806. > > (; datatype) 999.3 > ┌┬┐ > │1e15│floating│ > └┴┘ > (; datatype) .3 > ┌─┬───┐ > │1│integer│ > └─┴───┘ > (; datatype) 9.3 > ┌──┬───┐ >
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
I was more surprised by the type change within a certain numeric range. That just seemed a little...odd. I guess that even though it feels strange to have a constant change type just by being entered, it's not really any different than these examples. (; datatype) 3j0 ┌─┬───┐ │3│integer│ └─┴───┘ (; datatype) 3.0 ┌─┬───┐ │3│integer│ └─┴───┘ (; datatype) 3.6j0 ┌───┬┐ │3.6│floating│ └───┴┘ (; datatype) 3r5j0 ┌───┬┐ │0.6│floating│ └───┴┘ Cheers, bob > On Aug 9, 2017, at 10:33 AM, Raul Millerwrote: > > It's not a bug, it's an artifact of the 64 bit floating point standard. > > 2 ^. > 53.1508 > > https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats > > The binary64 format has 53 binary digits or 15.95 decimal digits. This > means ".16#'9' cannot be represented exactly using this format. > > And, we do not use exact representation of large numbers by default > because that's too slow for large datasets. Put differently, if you > want exact representation and are willing to take the performance hit, > you should specify that. For example: ".'x',~16#'9' or > ".'3r10+','x',~16#'9' > > Thanks, > > -- > Raul > > On Wed, Aug 9, 2017 at 12:05 PM, Henry Rich wrote: >> This is a bug, since 999...9.3 should become 999...9 rather than 100...0. >> I'm away from home now, but I think what's happening is this: >> >> 999...9 is converted to integer >> >> . is encountered and turns it to float >> >> It's rounded to the nearest float which is 100...0 >> >> As a final step the JE checks to see if the value is exactly integral, >> which it is, and it is converted back to integer. >> >> If you add this to Interpreter/Bugs I'll fix it when i get back. >> >> Henry Rich >> >> On Aug 9, 2017 16:16, "bill lam" wrote: >> >> I think this is the difference between 32 and 64-bit, >> >> 9!:14'' >> j602/2008-03-03/16:45 >> 3!:0[ .3 >> 4 >> >> In J32 >> >> a.i. 2 fc .3 >> 0 128 224 55 121 195 65 67 >> a.i. 2 fc 1e16 >> 0 128 224 55 121 195 65 67 >> >> the number has the same bit pattern as 1e16 (an integer) >> which can be represented as a 64-bit integer. I guess >> J64 is correct since .3 and 1e16 is the >> same number in ieee fp and J prefers integer to floats, >> eg >> 3!:0 [ 2.0 >> 4 >> >> Ср, 09 авг 2017, robert therriault написал(а): >>> Hi Pascal, >>> >>> I see the same behaviour in j806 as j805. Do you see something different? >>> >>>JVERSION >>> Engine: j806/j64avx/darwin >>> Beta-4: commercial/2017-06-27T12:55:06 >>> Library: 8.06.03 >>> Qt IDE: 1.5.3/5.6.2 >>> Platform: Darwin 64 >>> Installer: J806 install >>> InstallPath: /users/bobtherriault/j64-806 >>> Contact: www.jsoftware.com >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e15│floating│ >>> └┴┘ >>> (; datatype) .3 >>> ┌─┬───┐ >>> │1│integer│ >>> └─┴───┘ >>> (; datatype) 9.3 >>> ┌──┬───┐ >>> │10│integer│ >>> └──┴───┘ >>> (; datatype) 99.3 >>> ┌───┬───┐ >>> │100│integer│ >>> └───┴───┘ >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e19│floating│ >>> └┴┘ >>> >>> Cheers, bob >>> On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < >> programm...@jsoftware.com> wrote: in j806,.31 probably the j805 >> behaviour is preferred. If only for consistency. But there may be a good >> reason for change. From: robert therriault To: Programming forum Sent: Wednesday, August 9, 2017 10:40 AM Subject: [Jprogramming] Integer-floating type change for large numbers >> in j805 and j806 I am guessing that the following has something to do with precision of >> large numbers in j805 and is also true for j806. (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌─┬───┐ │1│integer│ └─┴───┘ (; datatype) 9.3 ┌──┬───┐ │10│integer│ └──┴───┘ (; datatype) 99.3 ┌───┬───┐ │100│integer│ └───┴───┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ JVERSION Engine: j805/j64/darwin Release: commercial/2016-12-11T08:17:56 Library: 8.05.14 Qt IDE: 1.5.4/5.6.2 Platform: Darwin 64 Installer: J805 install
Re: [Jprogramming] Fractional parts
Continued fractions come immediately to mind as an application, per http://code.jsoftware.com/wiki/Essays/Continued_Fractions Suggestions here might be suitable to remove restrictions mentioned in that essay. Continued fractions themselves are applied in at least the ways stated in https://math.stackexchange.com/questions/585675/what-are-the-applications-of-continued-fractions I am working a bit with Diophantine equations, so they seem like a natural tool to me. Sent from Mail for Windows 10 From: Skip Cave Sent: Wednesday, August 9, 2017 1:09 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Fractional parts Markus, Actually, yes, I looked at using extended precision, and here's what happened: v=:2%(3r19-%x:1 2 3 245 246 247 248) v _19r8 _76r13 _57r5 4655r358 9348r719 13 9424r725 fp=. * * 1|| fp v _3r8 _11r13 _2r5 1r358 1r719 0 724r725 ip=: * * <.@| ip v _2 _5 _11 13 13 13 12 So our original definitions would work with extended precision, but the fractional parts would be rational rather than decimal. Extended precision still keeps the negative signs on the fractions. I'm not so sure about Martin's approach with extended precision: mfp1 =: 1&| NB. Martin's first suggestion for fractional part mfp1 v 5r8 2r13 3r5 1r358 1r719 0 724r725 mfp2 =:
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
It's not a bug, it's an artifact of the 64 bit floating point standard. 2 ^. 53.1508 https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats The binary64 format has 53 binary digits or 15.95 decimal digits. This means ".16#'9' cannot be represented exactly using this format. And, we do not use exact representation of large numbers by default because that's too slow for large datasets. Put differently, if you want exact representation and are willing to take the performance hit, you should specify that. For example: ".'x',~16#'9' or ".'3r10+','x',~16#'9' Thanks, -- Raul On Wed, Aug 9, 2017 at 12:05 PM, Henry Richwrote: > This is a bug, since 999...9.3 should become 999...9 rather than 100...0. > I'm away from home now, but I think what's happening is this: > > 999...9 is converted to integer > > . is encountered and turns it to float > > It's rounded to the nearest float which is 100...0 > > As a final step the JE checks to see if the value is exactly integral, > which it is, and it is converted back to integer. > > If you add this to Interpreter/Bugs I'll fix it when i get back. > > Henry Rich > > On Aug 9, 2017 16:16, "bill lam" wrote: > > I think this is the difference between 32 and 64-bit, > >9!:14'' > j602/2008-03-03/16:45 >3!:0[ .3 > 4 > > In J32 > >a.i. 2 fc .3 > 0 128 224 55 121 195 65 67 >a.i. 2 fc 1e16 > 0 128 224 55 121 195 65 67 > > the number has the same bit pattern as 1e16 (an integer) > which can be represented as a 64-bit integer. I guess > J64 is correct since .3 and 1e16 is the > same number in ieee fp and J prefers integer to floats, > eg > 3!:0 [ 2.0 > 4 > > Ср, 09 авг 2017, robert therriault написал(а): >> Hi Pascal, >> >> I see the same behaviour in j806 as j805. Do you see something different? >> >> JVERSION >> Engine: j806/j64avx/darwin >> Beta-4: commercial/2017-06-27T12:55:06 >> Library: 8.06.03 >> Qt IDE: 1.5.3/5.6.2 >> Platform: Darwin 64 >> Installer: J806 install >> InstallPath: /users/bobtherriault/j64-806 >> Contact: www.jsoftware.com >>(; datatype) 999.3 >> ┌┬┐ >> │1e15│floating│ >> └┴┘ >>(; datatype) .3 >> ┌─┬───┐ >> │1│integer│ >> └─┴───┘ >>(; datatype) 9.3 >> ┌──┬───┐ >> │10│integer│ >> └──┴───┘ >>(; datatype) 99.3 >> ┌───┬───┐ >> │100│integer│ >> └───┴───┘ >>(; datatype) 999.3 >> ┌┬┐ >> │1e19│floating│ >> └┴┘ >> >> Cheers, bob >> >> > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < > programm...@jsoftware.com> wrote: >> > >> > in j806,.31 probably the j805 > behaviour is preferred. If only for consistency. But there may be a good > reason for change. >> > >> > From: robert therriault >> > To: Programming forum >> > Sent: Wednesday, August 9, 2017 10:40 AM >> > Subject: [Jprogramming] Integer-floating type change for large numbers > in j805 and j806 >> > >> > I am guessing that the following has something to do with precision of > large numbers in j805 and is also true for j806. >> > >> > (; datatype) 999.3 >> > ┌┬┐ >> > │1e15│floating│ >> > └┴┘ >> > (; datatype) .3 >> > ┌─┬───┐ >> > │1│integer│ >> > └─┴───┘ >> > (; datatype) 9.3 >> > ┌──┬───┐ >> > │10│integer│ >> > └──┴───┘ >> > (; datatype) 99.3 >> > ┌───┬───┐ >> > │100│integer│ >> > └───┴───┘ >> > (; datatype) 999.3 >> > ┌┬┐ >> > │1e19│floating│ >> > └┴┘ >> > JVERSION >> > Engine: j805/j64/darwin >> > Release: commercial/2016-12-11T08:17:56 >> > Library: 8.05.14 >> > Qt IDE: 1.5.4/5.6.2 >> > Platform: Darwin 64 >> > Installer: J805 install >> > InstallPath: /applications/j64-805 >> > Contact: www.jsoftware.com >> > >> > Further investigation shows me it was not this way with the 32 bit > version of j701, so it may be an artifact of moving to 64 bit? >> > >> > (; datatype) 999.3 >> > ┌┬┐ >> > │1e15│floating│ >> > └┴┘ >> > (; datatype) .3 >> > ┌┬┐ >> > │1e16│floating│ >> > └┴┘ >> > (; datatype) 99.3 >> > ┌┬┐ >> > │1e18│floating│ >> > └┴┘ >> > (; datatype) 999.3 >> > ┌┬┐ >> > │1e19│floating│ >> > └┴┘ >> > JVERSION >> > Engine: j701/2011-01-10/11:25 >> > Library: 7.01.088 >> > Platform:
Re: [Jprogramming] Fractional parts
Markus, Actually, yes, I looked at using extended precision, and here's what happened: v=:2%(3r19-%x:1 2 3 245 246 247 248) v _19r8 _76r13 _57r5 4655r358 9348r719 13 9424r725 fp=. * * 1|| fp v _3r8 _11r13 _2r5 1r358 1r719 0 724r725 ip=: * * <.@| ip v _2 _5 _11 13 13 13 12 So our original definitions would work with extended precision, but the fractional parts would be rational rather than decimal. Extended precision still keeps the negative signs on the fractions. I'm not so sure about Martin's approach with extended precision: mfp1 =: 1&| NB. Martin's first suggestion for fractional part mfp1 v 5r8 2r13 3r5 1r358 1r719 0 724r725 mfp2 =:
Re: [Jprogramming] Fractional parts
Martin, The original problem I was working on was a post on Quora ( https://goo.gl/NrZde2). I use these Quora math questions to help sharpen my J skills. I try to see if I can "brute force" the solutions using J, while most other posters try to solve these things by algebraic manipulation. My answer to that question is here: (https://goo.gl/FhdJAg). There are several Quora problems that I have posted J solutions for, mostly to show how simple a brute force solution can be when using an array language. You can find those posts by searching for my name ("Skip Cave") in Quora In this problem all I really needed to do was to find all the results from the equation that were integers, so I used the 0=1|| scheme to find them. Our discussion on the J forum got me thinking about finding both the fractional part and the integer part of numbers, and I thought the pair of verbs (fp, ip) would be a nice addition to the Phrases doc, which is defined as listing phrases "useful to beginners in learning the language, and of continuing use to practical programmers." Also, when I obtained the fractional part, I wanted to keep the fact that the fractional part came from a negative number, hence the attempt to have negative fractional parts. Skip Skip Cave Cave Consulting LLC On Wed, Aug 9, 2017 at 9:35 AM, Martin Kreuzerwrote: > From what I've gathered so far is, that people seem to not mind that much, > when extracting the fractional part from a (negative) float, they use > >(1&|) _8.11 > 0.89 > > or > >
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Thank you Henry, I reported it here. http://code.jsoftware.com/wiki/System/Interpreter/Bugs/Errors#Error_in_float_representation_between_1e15_and_1e19 Let me know if you had somewhere else in mind. Cheers, bob > On Aug 9, 2017, at 9:05 AM, Henry Richwrote: > > This is a bug, since 999...9.3 should become 999...9 rather than 100...0. > I'm away from home now, but I think what's happening is this: > > 999...9 is converted to integer > > . is encountered and turns it to float > > It's rounded to the nearest float which is 100...0 > > As a final step the JE checks to see if the value is exactly integral, > which it is, and it is converted back to integer. > > If you add this to Interpreter/Bugs I'll fix it when i get back. > > Henry Rich > > On Aug 9, 2017 16:16, "bill lam" wrote: > > I think this is the difference between 32 and 64-bit, > > 9!:14'' > j602/2008-03-03/16:45 > 3!:0[ .3 > 4 > > In J32 > > a.i. 2 fc .3 > 0 128 224 55 121 195 65 67 > a.i. 2 fc 1e16 > 0 128 224 55 121 195 65 67 > > the number has the same bit pattern as 1e16 (an integer) > which can be represented as a 64-bit integer. I guess > J64 is correct since .3 and 1e16 is the > same number in ieee fp and J prefers integer to floats, > eg > 3!:0 [ 2.0 > 4 > > Ср, 09 авг 2017, robert therriault написал(а): >> Hi Pascal, >> >> I see the same behaviour in j806 as j805. Do you see something different? >> >>JVERSION >> Engine: j806/j64avx/darwin >> Beta-4: commercial/2017-06-27T12:55:06 >> Library: 8.06.03 >> Qt IDE: 1.5.3/5.6.2 >> Platform: Darwin 64 >> Installer: J806 install >> InstallPath: /users/bobtherriault/j64-806 >> Contact: www.jsoftware.com >> (; datatype) 999.3 >> ┌┬┐ >> │1e15│floating│ >> └┴┘ >> (; datatype) .3 >> ┌─┬───┐ >> │1│integer│ >> └─┴───┘ >> (; datatype) 9.3 >> ┌──┬───┐ >> │10│integer│ >> └──┴───┘ >> (; datatype) 99.3 >> ┌───┬───┐ >> │100│integer│ >> └───┴───┘ >> (; datatype) 999.3 >> ┌┬┐ >> │1e19│floating│ >> └┴┘ >> >> Cheers, bob >> >>> On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < > programm...@jsoftware.com> wrote: >>> >>> in j806,.31 probably the j805 > behaviour is preferred. If only for consistency. But there may be a good > reason for change. >>> >>> From: robert therriault >>> To: Programming forum >>> Sent: Wednesday, August 9, 2017 10:40 AM >>> Subject: [Jprogramming] Integer-floating type change for large numbers > in j805 and j806 >>> >>> I am guessing that the following has something to do with precision of > large numbers in j805 and is also true for j806. >>> >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e15│floating│ >>> └┴┘ >>> (; datatype) .3 >>> ┌─┬───┐ >>> │1│integer│ >>> └─┴───┘ >>> (; datatype) 9.3 >>> ┌──┬───┐ >>> │10│integer│ >>> └──┴───┘ >>> (; datatype) 99.3 >>> ┌───┬───┐ >>> │100│integer│ >>> └───┴───┘ >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e19│floating│ >>> └┴┘ >>> JVERSION >>> Engine: j805/j64/darwin >>> Release: commercial/2016-12-11T08:17:56 >>> Library: 8.05.14 >>> Qt IDE: 1.5.4/5.6.2 >>> Platform: Darwin 64 >>> Installer: J805 install >>> InstallPath: /applications/j64-805 >>> Contact: www.jsoftware.com >>> >>> Further investigation shows me it was not this way with the 32 bit > version of j701, so it may be an artifact of moving to 64 bit? >>> >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e15│floating│ >>> └┴┘ >>> (; datatype) .3 >>> ┌┬┐ >>> │1e16│floating│ >>> └┴┘ >>> (; datatype) 99.3 >>> ┌┬┐ >>> │1e18│floating│ >>> └┴┘ >>> (; datatype) 999.3 >>> ┌┬┐ >>> │1e19│floating│ >>> └┴┘ >>> JVERSION >>> Engine: j701/2011-01-10/11:25 >>> Library: 7.01.088 >>> Platform: Darwin 32 >>> Installer: j701a_mac_intel.dmg >>> InstallPath: /Applications/j701 >>> >>> Cheers, bob >>> >>> >>> >>> -- >>> For information about J forums see http://www.jsoftware.com/forums.htm >>> >>> >>> -- >>> For information about J forums see http://www.jsoftware.com/forums.htm >> >>
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
This is a bug, since 999...9.3 should become 999...9 rather than 100...0. I'm away from home now, but I think what's happening is this: 999...9 is converted to integer . is encountered and turns it to float It's rounded to the nearest float which is 100...0 As a final step the JE checks to see if the value is exactly integral, which it is, and it is converted back to integer. If you add this to Interpreter/Bugs I'll fix it when i get back. Henry Rich On Aug 9, 2017 16:16, "bill lam"wrote: I think this is the difference between 32 and 64-bit, 9!:14'' j602/2008-03-03/16:45 3!:0[ .3 4 In J32 a.i. 2 fc .3 0 128 224 55 121 195 65 67 a.i. 2 fc 1e16 0 128 224 55 121 195 65 67 the number has the same bit pattern as 1e16 (an integer) which can be represented as a 64-bit integer. I guess J64 is correct since .3 and 1e16 is the same number in ieee fp and J prefers integer to floats, eg 3!:0 [ 2.0 4 Ср, 09 авг 2017, robert therriault написал(а): > Hi Pascal, > > I see the same behaviour in j806 as j805. Do you see something different? > > JVERSION > Engine: j806/j64avx/darwin > Beta-4: commercial/2017-06-27T12:55:06 > Library: 8.06.03 > Qt IDE: 1.5.3/5.6.2 > Platform: Darwin 64 > Installer: J806 install > InstallPath: /users/bobtherriault/j64-806 > Contact: www.jsoftware.com >(; datatype) 999.3 > ┌┬┐ > │1e15│floating│ > └┴┘ >(; datatype) .3 > ┌─┬───┐ > │1│integer│ > └─┴───┘ >(; datatype) 9.3 > ┌──┬───┐ > │10│integer│ > └──┴───┘ >(; datatype) 99.3 > ┌───┬───┐ > │100│integer│ > └───┴───┘ >(; datatype) 999.3 > ┌┬┐ > │1e19│floating│ > └┴┘ > > Cheers, bob > > > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > > > > in j806,.31 probably the j805 behaviour is preferred. If only for consistency. But there may be a good reason for change. > > > > From: robert therriault > > To: Programming forum > > Sent: Wednesday, August 9, 2017 10:40 AM > > Subject: [Jprogramming] Integer-floating type change for large numbers in j805 and j806 > > > > I am guessing that the following has something to do with precision of large numbers in j805 and is also true for j806. > > > > (; datatype) 999.3 > > ┌┬┐ > > │1e15│floating│ > > └┴┘ > > (; datatype) .3 > > ┌─┬───┐ > > │1│integer│ > > └─┴───┘ > > (; datatype) 9.3 > > ┌──┬───┐ > > │10│integer│ > > └──┴───┘ > > (; datatype) 99.3 > > ┌───┬───┐ > > │100│integer│ > > └───┴───┘ > > (; datatype) 999.3 > > ┌┬┐ > > │1e19│floating│ > > └┴┘ > > JVERSION > > Engine: j805/j64/darwin > > Release: commercial/2016-12-11T08:17:56 > > Library: 8.05.14 > > Qt IDE: 1.5.4/5.6.2 > > Platform: Darwin 64 > > Installer: J805 install > > InstallPath: /applications/j64-805 > > Contact: www.jsoftware.com > > > > Further investigation shows me it was not this way with the 32 bit version of j701, so it may be an artifact of moving to 64 bit? > > > > (; datatype) 999.3 > > ┌┬┐ > > │1e15│floating│ > > └┴┘ > > (; datatype) .3 > > ┌┬┐ > > │1e16│floating│ > > └┴┘ > > (; datatype) 99.3 > > ┌┬┐ > > │1e18│floating│ > > └┴┘ > > (; datatype) 999.3 > > ┌┬┐ > > │1e19│floating│ > > └┴┘ > > JVERSION > > Engine: j701/2011-01-10/11:25 > > Library: 7.01.088 > > Platform: Darwin 32 > > Installer: j701a_mac_intel.dmg > > InstallPath: /Applications/j701 > > > > Cheers, bob > > > > > > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 -- For information
Re: [Jprogramming] Fractional parts
No space saving for 64 bit integers. -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Skip Cave Sent: Tuesday, August 8, 2017 23:48 To: programm...@jsoftware.com Subject: Re: [Jprogramming] Fractional parts Don, You're right. Your approach achieves the same result when re-combining the fractional and integer part: ]v=:2%(3r19-%1 2 3 245 246 247 248) ]'i f'=:|:0 1#:v _3 _6 _12 13 13 13 12 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 i _3 _6 _12 13 13 13 12 f 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 v = i+f 1 1 1 1 1 1 1 However, datatype f floating datatype i floating Where as the original fp/ip verbs give: datatype fpv floating datatype ipv integer So either approach will work, but ip returns integers, while your approach returns floats in both i & f cases. The fact that I originally called the verb the "integer part" probably led to the initial integer solution from the group. I'm not sure what advantages either approach would have, other than a space savings for pure integers. Skip Skip Cave Cave Consulting LLC On Tue, Aug 8, 2017 at 8:04 PM, Don Guinnwrote: > There are many ways to handle the fractional part of a number, > depending on the problem at hand. The real difficulty seems to be > handling negative numbers. I like this, which rounds down negative > numbers. But others might want a different way. > >]'i f'=:|:0 1#:1.2 3.7 _2.1 > 1 3 _3 > 0.2 0.7 0.9 >i > 1 3 _3 > >f > 0.2 0.7 0.9 >i+f > 1.2 3.7 _2.1 > > On Tue, Aug 8, 2017 at 3:56 PM, Skip Cave wrote: > > > The purpose of the "negative fractional part" is to satisfy the > > identity condition when the two parts are added back together: > > > >]v=:2%(3r19-%1 2 3 245 246 247 248) NB. Create some long > > fractional parts. > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > fp=. * * 1|| NB. The fractional part verb > > > > ip=: * * <.@| NB. The integer part verb > > > > > > ]fpv =: fp v NB. Save the fractional part > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > ]ipv =: ip v NB. Save the integer part > > > > _2 _5 _11 13 13 13 12 > > > > > > > > ]sm =: ipv + fpv NB. Add the two parts back together > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > NB. The result of adding the two parts should be identical to the > original > > vector. > > > > > > sm = v > > > > 1 1 1 1 1 1 1 > > > > Skip Cave > > Cave Consulting LLC > > > > On Tue, Aug 8, 2017 at 2:14 PM, 'Bo Jacoby' via Programming < > > programm...@jsoftware.com> wrote: > > > > > The integer part a and the fractional part b of a number x > > > is > such > > > that x=a+b and a is an integer and 0<:b and b<1 . I do know of no > > use > > > of a "negative fractional part". > > > > > > Den 20:39 tirsdag den 8. august 2017 skrev Raul Miller < > > > rauldmil...@gmail.com>: > > > > > > > > > I think we've mostly been using the wiki for live documents. (I'm > > > not sure what all would be involved in changing the phrase book.) > > > > > > Thanks, > > > > > > -- > > > Raul > > > > > > > > > On Tue, Aug 8, 2017 at 2:35 PM, Skip Cave > > > > > wrote: > > > > It looks like we have a reliable solution to find a fractional > > > > part > of > > a > > > > floating point number, while maintaining the sign: > > > > > > > >v > > > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > >fp=. * * 1||NB. Thanks to Martin > > > > > > > >fp v > > > > > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > > > > > > > Credit should also go to the people who suggested the building > blocks, > > > e.g. > > > > > > > > (1|y) Raul -- (1||y) Pascal -- (*y) Raul > > > > > > > > It is also nice to have the companion verb - integer part: > > > > > > > >ip=: * * <.@| NB. Thanks to Louis > > > > > > > >ip v > > > > > > > > _2 _5 _11 13 13 13 12 > > > > > > > > > > > > I have needed these functions more than once in my enginering > > > > work. I believe that these two verbs need to be inserted > > > > somewhere in the > > > "Numbers" > > > > section of the J Phrases doc. Maybe under "8A-Numbers & > > > > Counting", or 8C-Representations", or "8D-Arithmetic". > > > > > > > > > > > > How do we get them in the document? What section do they fit the > > > > best > > in? > > > > Can I edit the Phrases doc? > > > > > > > > Skip Cave > > > > Cave Consulting LLC > > > > > > > > > > > > > > > >> > > > >> > > > > > -- > > > > For information about J forums see http://www.jsoftware.com/ > forums.htm > > > -- > > > For information about J forums see > > > http://www.jsoftware.com/forums.htm > > > >
Re: [Jprogramming] Fractional parts
Skip, have you considered to use extended precision? In your example only small fraction are used, and the methods discussed would apply as well without precision problems. v=:2%(3r19-%x:1 2 3 245 246 247 248) I haven’t read the whole thread, so sorry if this contribution doesn’t fit. Markus -Ursprüngliche Nachricht- Von: Programming [mailto:programming-boun...@forums.jsoftware.com] Im Auftrag von Martin Kreuzer Gesendet: Mittwoch, 9. August 2017 16:35 An: programm...@jsoftware.com Betreff: Re: [Jprogramming] Fractional parts From what I've gathered so far is, that people seem to not mind that much, when extracting the fractional part from a (negative) float, they use (1&|) _8.11 0.89 or
Re: [Jprogramming] Boxed verbs as alternate gerunds
I guess somehow we both miss this: System/ReleaseNotes/J806 New features: u@n (where n is a noun) is now allowed, and executes u on the value of n, ignoring any arguments (equivalent to u@(n"_)) u :: n (where n is a noun) is now allowed, and gives the result n if u fails (equivalent to u :: (n"_)) http://code.jsoftware.com/wiki/System/ReleaseNotes/J806#New_features: On Wed, Aug 9, 2017 at 8:46 AM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > :: noun > is equivalent to :: (noun"_)? > > From: Henry Rich> To: Programming forum > Sent: Wednesday, August 9, 2017 5:25 AM > Subject: Re: [Jprogramming] Boxed verbs as alternate gerunds > > :: 0 > > Is a j8.06 feature. > > Henry Rich > > On Aug 8, 2017 23:42, "Jose Mario Quintana" > > wrote: > > > "I still like the @.] test." > > > > What am I doing wrong? I have tried several times and I keep getting, > > > >JVERSION > > Engine: j805/j64/windows > > Release: commercial/2016-12-11T08:02:16 > > Library: 8.05.11 > > Qt IDE: 1.5.3/5.7.0 > > Platform: Win 64 > > Installer: J805 install > > InstallPath: c:/program files/j > > Contact: www.jsoftware.com > > > > > >IsGerund=: 3 : 0 :: 0 > > y@.] > > 1 > > ) > > |domain error > > | IsGerund=:3 :0::0 > > |[-4] > > > > > > Anyway, I was able to write it in Win Jx and it should not make any > > difference, > > > > IsGerund=: 3 : 0 :: 0 > > y@.] > > 1 > > ) > > > > Assuming I got it right, this how does your test compare to Roger's and > > Pascal's for testing ;:'+/' , > > > >test=. gerundYN ; isgerund ; IsGerund > > > >test ;:'+/' > > ┌─┬─┬─┐ > > │1│1│0│ > > └─┴─┴─┘ > > > > In my mind, ;:'+/' is both, a gerund and a valid train, > > > >(;:'+/')`:6 > > +/ > >(;:'+/')@.0 1 > > +/ > > > > > > On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand > > wrote: > > > > > @.] should be used, not @.0 : > > > > > >v > > > |value error: v > > >v123 > > > |value error: v123 > > >v`''@.] > > > v@.] > > >v123`''@.] > > > v123@.] > > > > > > I still like the @.] test. > > > > > > Louis > > > > > > > On 07 Aug 2017, at 19:26, Jose Mario Quintana < > > > jose.mario.quint...@gmail.com> wrote: > > > > > > > > No joke was intended, undefined names are regarded as verbs in the > > > context > > > > of adverbs and conjunctions. Why? Because it allows for writing > verbs > > > in a > > > > top-down fashion if one so desires. (Bill, I know you know most of > > this, > > > > if not all; but I am putting some context for the potential benefit > > > members > > > > of the forum who might not.) > > > > > > > > An error thrown by @.0 does not necessarily mean that the argument > is > > > not > > > > a gerund or that it is a nonsensical gerund; I would assume we both > > agree > > > > that even if v is undefined v`'' is still a gerund. Either way, > > both > > > > Roger's and Pascal's tests agree on this, > > > > > > > > v > > > > |value error: v > > > > > > > > gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0: > > > > isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0: > > > > > > > > gerundYN v`'' > > > > 1 > > > > isgerund v`'' > > > > 1 > > > > > > > > Yet, > > > > > > > > v`'' @.0 > > > > |value error: v > > > > > > > > However, > > > > > > > > v`'' @.0 / > > > > v/ > > > > > > > > So, is the literal noun 'v' a gerund or not? A hint follows after > > > > several blank lines, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > v > > > > |value error: v > > > > > > > > v123 > > > > |value error: v123 > > > > > > > > > > > > gerundYN 'v' > > > > 1 > > > > gerundYN 'v123' > > > > 0 > > > > > > > > isgerund 'v' > > > > 0 > > > > isgerund 'v123' > > > > 0 > > > > > > > > What is happening? > > > > > > > > > > > > > > > > On Sun, Aug 6, 2017 at 8:34 PM, Bill wrote: > > > > > > > >> I am not sure if I understand your question. If you asked something > > > >> undefined is a gerund or not. I checked by executing v@.0 '' and > the > > J > > > >> interpreter said value error. Sounds like an empty array joke to me. > > > >> > > > >> Sent from my iPhone > > > >> > > > >> On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana < > > > >> jose.mario.quint...@gmail.com> wrote: > > > >> > > > >>> I am not hoping to change people's minds; nevertheless, I would > like > > to > > > >>> explain, to some degree, my rationale regarding my current notion > of > > > >> what a > > > >>> gerund is. > > > >>> > > > >>> The Dictionary is famous (or infamous according to some?) for its > > > >>> terseness. It is not really surprising to me that different people > > > have > > > >>> different understandings even regarding the very important
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
I think this is the difference between 32 and 64-bit, 9!:14'' j602/2008-03-03/16:45 3!:0[ .3 4 In J32 a.i. 2 fc .3 0 128 224 55 121 195 65 67 a.i. 2 fc 1e16 0 128 224 55 121 195 65 67 the number has the same bit pattern as 1e16 (an integer) which can be represented as a 64-bit integer. I guess J64 is correct since .3 and 1e16 is the same number in ieee fp and J prefers integer to floats, eg 3!:0 [ 2.0 4 Ср, 09 авг 2017, robert therriault написал(а): > Hi Pascal, > > I see the same behaviour in j806 as j805. Do you see something different? > > JVERSION > Engine: j806/j64avx/darwin > Beta-4: commercial/2017-06-27T12:55:06 > Library: 8.06.03 > Qt IDE: 1.5.3/5.6.2 > Platform: Darwin 64 > Installer: J806 install > InstallPath: /users/bobtherriault/j64-806 > Contact: www.jsoftware.com >(; datatype) 999.3 > ┌┬┐ > │1e15│floating│ > └┴┘ >(; datatype) .3 > ┌─┬───┐ > │1│integer│ > └─┴───┘ >(; datatype) 9.3 > ┌──┬───┐ > │10│integer│ > └──┴───┘ >(; datatype) 99.3 > ┌───┬───┐ > │100│integer│ > └───┴───┘ >(; datatype) 999.3 > ┌┬┐ > │1e19│floating│ > └┴┘ > > Cheers, bob > > > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming > >wrote: > > > > in j806,.31 probably the j805 behaviour > > is preferred. If only for consistency. But there may be a good reason for > > change. > > > > From: robert therriault > > To: Programming forum > > Sent: Wednesday, August 9, 2017 10:40 AM > > Subject: [Jprogramming] Integer-floating type change for large numbers in > > j805 and j806 > > > > I am guessing that the following has something to do with precision of > > large numbers in j805 and is also true for j806. > > > > (; datatype) 999.3 > > ┌┬┐ > > │1e15│floating│ > > └┴┘ > > (; datatype) .3 > > ┌─┬───┐ > > │1│integer│ > > └─┴───┘ > > (; datatype) 9.3 > > ┌──┬───┐ > > │10│integer│ > > └──┴───┘ > > (; datatype) 99.3 > > ┌───┬───┐ > > │100│integer│ > > └───┴───┘ > > (; datatype) 999.3 > > ┌┬┐ > > │1e19│floating│ > > └┴┘ > > JVERSION > > Engine: j805/j64/darwin > > Release: commercial/2016-12-11T08:17:56 > > Library: 8.05.14 > > Qt IDE: 1.5.4/5.6.2 > > Platform: Darwin 64 > > Installer: J805 install > > InstallPath: /applications/j64-805 > > Contact: www.jsoftware.com > > > > Further investigation shows me it was not this way with the 32 bit version > > of j701, so it may be an artifact of moving to 64 bit? > > > > (; datatype) 999.3 > > ┌┬┐ > > │1e15│floating│ > > └┴┘ > > (; datatype) .3 > > ┌┬┐ > > │1e16│floating│ > > └┴┘ > > (; datatype) 99.3 > > ┌┬┐ > > │1e18│floating│ > > └┴┘ > > (; datatype) 999.3 > > ┌┬┐ > > │1e19│floating│ > > └┴┘ > > JVERSION > > Engine: j701/2011-01-10/11:25 > > Library: 7.01.088 > > Platform: Darwin 32 > > Installer: j701a_mac_intel.dmg > > InstallPath: /Applications/j701 > > > > Cheers, bob > > > > > > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > > For information about J forums see http://www.jsoftware.com/forums.htm > > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Boxed verbs as alternate gerunds
:D It is so natural that I did not even notice it. I guess I was already ready for it; thank you. On Wed, Aug 9, 2017 at 5:25 AM, Henry Richwrote: > :: 0 > > Is a j8.06 feature. > > Henry Rich > > On Aug 8, 2017 23:42, "Jose Mario Quintana" > > wrote: > > > "I still like the @.] test." > > > > What am I doing wrong? I have tried several times and I keep getting, > > > >JVERSION > > Engine: j805/j64/windows > > Release: commercial/2016-12-11T08:02:16 > > Library: 8.05.11 > > Qt IDE: 1.5.3/5.7.0 > > Platform: Win 64 > > Installer: J805 install > > InstallPath: c:/program files/j > > Contact: www.jsoftware.com > > > > > >IsGerund=: 3 : 0 :: 0 > > y@.] > > 1 > > ) > > |domain error > > | IsGerund=:3 :0 ::0 > > |[-4] > > > > > -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
Hi Pascal, I see the same behaviour in j806 as j805. Do you see something different? JVERSION Engine: j806/j64avx/darwin Beta-4: commercial/2017-06-27T12:55:06 Library: 8.06.03 Qt IDE: 1.5.3/5.6.2 Platform: Darwin 64 Installer: J806 install InstallPath: /users/bobtherriault/j64-806 Contact: www.jsoftware.com (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌─┬───┐ │1│integer│ └─┴───┘ (; datatype) 9.3 ┌──┬───┐ │10│integer│ └──┴───┘ (; datatype) 99.3 ┌───┬───┐ │100│integer│ └───┴───┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ Cheers, bob > On Aug 9, 2017, at 7:54 AM, 'Pascal Jasmin' via Programming >wrote: > > in j806,.31 probably the j805 behaviour > is preferred. If only for consistency. But there may be a good reason for > change. > > From: robert therriault > To: Programming forum > Sent: Wednesday, August 9, 2017 10:40 AM > Subject: [Jprogramming] Integer-floating type change for large numbers in > j805 and j806 > > I am guessing that the following has something to do with precision of large > numbers in j805 and is also true for j806. > > (; datatype) 999.3 > ┌┬┐ > │1e15│floating│ > └┴┘ > (; datatype) .3 > ┌─┬───┐ > │1│integer│ > └─┴───┘ > (; datatype) 9.3 > ┌──┬───┐ > │10│integer│ > └──┴───┘ > (; datatype) 99.3 > ┌───┬───┐ > │100│integer│ > └───┴───┘ > (; datatype) 999.3 > ┌┬┐ > │1e19│floating│ > └┴┘ > JVERSION > Engine: j805/j64/darwin > Release: commercial/2016-12-11T08:17:56 > Library: 8.05.14 > Qt IDE: 1.5.4/5.6.2 > Platform: Darwin 64 > Installer: J805 install > InstallPath: /applications/j64-805 > Contact: www.jsoftware.com > > Further investigation shows me it was not this way with the 32 bit version of > j701, so it may be an artifact of moving to 64 bit? > > (; datatype) 999.3 > ┌┬┐ > │1e15│floating│ > └┴┘ > (; datatype) .3 > ┌┬┐ > │1e16│floating│ > └┴┘ > (; datatype) 99.3 > ┌┬┐ > │1e18│floating│ > └┴┘ > (; datatype) 999.3 > ┌┬┐ > │1e19│floating│ > └┴┘ > JVERSION > Engine: j701/2011-01-10/11:25 > Library: 7.01.088 > Platform: Darwin 32 > Installer: j701a_mac_intel.dmg > InstallPath: /Applications/j701 > > Cheers, bob > > > > -- > For information about J forums see http://www.jsoftware.com/forums.htm > > > -- > For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806
in j806, .31 probably the j805 behaviour is preferred. If only for consistency. But there may be a good reason for change. From: robert therriaultTo: Programming forum Sent: Wednesday, August 9, 2017 10:40 AM Subject: [Jprogramming] Integer-floating type change for large numbers in j805 and j806 I am guessing that the following has something to do with precision of large numbers in j805 and is also true for j806. (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌─┬───┐ │1│integer│ └─┴───┘ (; datatype) 9.3 ┌──┬───┐ │10│integer│ └──┴───┘ (; datatype) 99.3 ┌───┬───┐ │100│integer│ └───┴───┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ JVERSION Engine: j805/j64/darwin Release: commercial/2016-12-11T08:17:56 Library: 8.05.14 Qt IDE: 1.5.4/5.6.2 Platform: Darwin 64 Installer: J805 install InstallPath: /applications/j64-805 Contact: www.jsoftware.com Further investigation shows me it was not this way with the 32 bit version of j701, so it may be an artifact of moving to 64 bit? (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌┬┐ │1e16│floating│ └┴┘ (; datatype) 99.3 ┌┬┐ │1e18│floating│ └┴┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ JVERSION Engine: j701/2011-01-10/11:25 Library: 7.01.088 Platform: Darwin 32 Installer: j701a_mac_intel.dmg InstallPath: /Applications/j701 Cheers, bob -- For information about J forums see http://www.jsoftware.com/forums.htm -- For information about J forums see http://www.jsoftware.com/forums.htm
[Jprogramming] Integer-floating type change for large numbers in j805 and j806
I am guessing that the following has something to do with precision of large numbers in j805 and is also true for j806. (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌─┬───┐ │1│integer│ └─┴───┘ (; datatype) 9.3 ┌──┬───┐ │10│integer│ └──┴───┘ (; datatype) 99.3 ┌───┬───┐ │100│integer│ └───┴───┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ JVERSION Engine: j805/j64/darwin Release: commercial/2016-12-11T08:17:56 Library: 8.05.14 Qt IDE: 1.5.4/5.6.2 Platform: Darwin 64 Installer: J805 install InstallPath: /applications/j64-805 Contact: www.jsoftware.com Further investigation shows me it was not this way with the 32 bit version of j701, so it may be an artifact of moving to 64 bit? (; datatype) 999.3 ┌┬┐ │1e15│floating│ └┴┘ (; datatype) .3 ┌┬┐ │1e16│floating│ └┴┘ (; datatype) 99.3 ┌┬┐ │1e18│floating│ └┴┘ (; datatype) 999.3 ┌┬┐ │1e19│floating│ └┴┘ JVERSION Engine: j701/2011-01-10/11:25 Library: 7.01.088 Platform: Darwin 32 Installer: j701a_mac_intel.dmg InstallPath: /Applications/j701 Cheers, bob -- For information about J forums see http://www.jsoftware.com/forums.htm
Re: [Jprogramming] Fractional parts
From what I've gathered so far is, that people seem to not mind that much, when extracting the fractional part from a (negative) float, they use (1&|) _8.11 0.89 or (1
Re: [Jprogramming] Fractional parts
v=. 0 1e_40 _1e_40 v=(<.v)+(1|v) 1 1 0 each version of integer part needs a matching fractional part. On Aug 9, 2017 10:06 PM, "'Bo Jacoby' via Programming" < programm...@jsoftware.com> wrote: v=(<.v)+(1|v) NB. number = integer part + fractional part? Yes! 1 1 1 1 1 1 1 Den 7:00 onsdag den 9. august 2017 skrev Don Guinn: True for 32 bit integers, but for 64 bit j integers and floats are the same size. On Aug 8, 2017 10:48 PM, "Skip Cave" wrote: > Don, > > You're right. Your approach achieves the same result when re-combining the > fractional and integer part: > > ]v=:2%(3r19-%1 2 3 245 246 247 248) > >]'i f'=:|:0 1#:v > > _3 _6 _12 13 13 13 12 > > 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 > > i > > _3 _6 _12 13 13 13 12 > > f > > 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 > > v = i+f > > 1 1 1 1 1 1 1 > > > However, > > >datatype f > > floating > >datatype i > > floating > > > Where as the original fp/ip verbs give: > > >datatype fpv > > floating > >datatype ipv > > integer > > > So either approach will work, but ip returns integers, while your approach > returns floats in both i & f cases. The fact that I originally called the > verb the "integer part" probably led to the initial integer solution from > the group. > > > I'm not sure what advantages either approach would have, other than a space > savings for pure integers. > > > Skip > > Skip Cave > Cave Consulting LLC > > On Tue, Aug 8, 2017 at 8:04 PM, Don Guinn wrote: > > > There are many ways to handle the fractional part of a number, depending > > on the problem at hand. The real difficulty seems to be handling negative > > numbers. I like this, which rounds down negative numbers. But others > might > > want a different way. > > > >]'i f'=:|:0 1#:1.2 3.7 _2.1 > > 1 3 _3 > > 0.2 0.7 0.9 > >i > > 1 3 _3 > > > >f > > 0.2 0.7 0.9 > >i+f > > 1.2 3.7 _2.1 > > > > On Tue, Aug 8, 2017 at 3:56 PM, Skip Cave > wrote: > > > > > The purpose of the "negative fractional part" is to satisfy the > identity > > > condition when the two parts are added back together: > > > > > >]v=:2%(3r19-%1 2 3 245 246 247 248) NB. Create some long fractional > > > parts. > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > fp=. * * 1||NB. The fractional part verb > > > > > > ip=: * * <.@| NB. The integer part verb > > > > > > > > > ]fpv =: fp vNB. Save the fractional part > > > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > > > > ]ipv =: ip vNB. Save the integer part > > > > > > _2 _5 _11 13 13 13 12 > > > > > > > > > > > > ]sm =: ipv + fpv NB. Add the two parts back together > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > NB. The result of adding the two parts should be identical to the > > original > > > vector. > > > > > > > > > sm = v > > > > > > 1 1 1 1 1 1 1 > > > > > > Skip Cave > > > Cave Consulting LLC > > > > > > On Tue, Aug 8, 2017 at 2:14 PM, 'Bo Jacoby' via Programming < > > > programm...@jsoftware.com> wrote: > > > > > > > The integer part a and the fractional part b of a number x is > > such > > > > that x=a+b and a is an integer and 0<:b and b<1 . I do know of > no > > > use > > > > of a "negative fractional part". > > > > > > > >Den 20:39 tirsdag den 8. august 2017 skrev Raul Miller < > > > > rauldmil...@gmail.com>: > > > > > > > > > > > > I think we've mostly been using the wiki for live documents. (I'm > not > > > > sure what all would be involved in changing the phrase book.) > > > > > > > > Thanks, > > > > > > > > -- > > > > Raul > > > > > > > > > > > > On Tue, Aug 8, 2017 at 2:35 PM, Skip Cave > > > wrote: > > > > > It looks like we have a reliable solution to find a fractional part > > of > > > a > > > > > floating point number, while maintaining the sign: > > > > > > > > > >v > > > > > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > >fp=. * * 1||NB. Thanks to Martin > > > > > > > > > >fp v > > > > > > > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > > > > > > > > > > Credit should also go to the people who suggested the building > > blocks, > > > > e.g. > > > > > > > > > > (1|y) Raul -- (1||y) Pascal -- (*y) Raul > > > > > > > > > > It is also nice to have the companion verb - integer part: > > > > > > > > > >ip=: * * <.@| NB. Thanks to Louis > > > > > > > > > >ip v > > > > > > > > > > _2 _5 _11 13 13 13 12 > > > > > > > > > > > > > > > I have needed these functions more than once in my enginering > work. I > > > > > believe that these two verbs need to be inserted somewhere in the > > > > "Numbers" > > > > > section of the J Phrases doc. Maybe under "8A-Numbers & Counting", > or > > > > > 8C-Representations", or "8D-Arithmetic". > > > > > > > > > > > > > > >
Re: [Jprogramming] Fractional parts
v=(<.v)+(1|v) NB. number = integer part + fractional part? Yes! 1 1 1 1 1 1 1 Den 7:00 onsdag den 9. august 2017 skrev Don Guinn: True for 32 bit integers, but for 64 bit j integers and floats are the same size. On Aug 8, 2017 10:48 PM, "Skip Cave" wrote: > Don, > > You're right. Your approach achieves the same result when re-combining the > fractional and integer part: > > ]v=:2%(3r19-%1 2 3 245 246 247 248) > > ]'i f'=:|:0 1#:v > > _3 _6 _12 13 13 13 12 > > 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 > > i > > _3 _6 _12 13 13 13 12 > > f > > 0.625 0.153846 0.6 0.0027933 0.00139082 0 0.998621 > > v = i+f > > 1 1 1 1 1 1 1 > > > However, > > > datatype f > > floating > > datatype i > > floating > > > Where as the original fp/ip verbs give: > > > datatype fpv > > floating > > datatype ipv > > integer > > > So either approach will work, but ip returns integers, while your approach > returns floats in both i & f cases. The fact that I originally called the > verb the "integer part" probably led to the initial integer solution from > the group. > > > I'm not sure what advantages either approach would have, other than a space > savings for pure integers. > > > Skip > > Skip Cave > Cave Consulting LLC > > On Tue, Aug 8, 2017 at 8:04 PM, Don Guinn wrote: > > > There are many ways to handle the fractional part of a number, depending > > on the problem at hand. The real difficulty seems to be handling negative > > numbers. I like this, which rounds down negative numbers. But others > might > > want a different way. > > > > ]'i f'=:|:0 1#:1.2 3.7 _2.1 > > 1 3 _3 > > 0.2 0.7 0.9 > > i > > 1 3 _3 > > > > f > > 0.2 0.7 0.9 > > i+f > > 1.2 3.7 _2.1 > > > > On Tue, Aug 8, 2017 at 3:56 PM, Skip Cave > wrote: > > > > > The purpose of the "negative fractional part" is to satisfy the > identity > > > condition when the two parts are added back together: > > > > > > ]v=:2%(3r19-%1 2 3 245 246 247 248) NB. Create some long fractional > > > parts. > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > fp=. * * 1|| NB. The fractional part verb > > > > > > ip=: * * <.@| NB. The integer part verb > > > > > > > > > ]fpv =: fp v NB. Save the fractional part > > > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > > > > ]ipv =: ip v NB. Save the integer part > > > > > > _2 _5 _11 13 13 13 12 > > > > > > > > > > > > ]sm =: ipv + fpv NB. Add the two parts back together > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > NB. The result of adding the two parts should be identical to the > > original > > > vector. > > > > > > > > > sm = v > > > > > > 1 1 1 1 1 1 1 > > > > > > Skip Cave > > > Cave Consulting LLC > > > > > > On Tue, Aug 8, 2017 at 2:14 PM, 'Bo Jacoby' via Programming < > > > programm...@jsoftware.com> wrote: > > > > > > > The integer part a and the fractional part b of a number x is > > such > > > > that x=a+b and a is an integer and 0<:b and b<1 . I do know of > no > > > use > > > > of a "negative fractional part". > > > > > > > > Den 20:39 tirsdag den 8. august 2017 skrev Raul Miller < > > > > rauldmil...@gmail.com>: > > > > > > > > > > > > I think we've mostly been using the wiki for live documents. (I'm > not > > > > sure what all would be involved in changing the phrase book.) > > > > > > > > Thanks, > > > > > > > > -- > > > > Raul > > > > > > > > > > > > On Tue, Aug 8, 2017 at 2:35 PM, Skip Cave > > > wrote: > > > > > It looks like we have a reliable solution to find a fractional part > > of > > > a > > > > > floating point number, while maintaining the sign: > > > > > > > > > > v > > > > > > > > > > _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 > > > > > > > > > > fp=. * * 1|| NB. Thanks to Martin > > > > > > > > > > fp v > > > > > > > > > > _0.375 _0.846154 _0.4 0.0027933 0.00139082 0 0.998621 > > > > > > > > > > > > > > > Credit should also go to the people who suggested the building > > blocks, > > > > e.g. > > > > > > > > > > (1|y) Raul -- (1||y) Pascal -- (*y) Raul > > > > > > > > > > It is also nice to have the companion verb - integer part: > > > > > > > > > > ip=: * * <.@| NB. Thanks to Louis > > > > > > > > > > ip v > > > > > > > > > > _2 _5 _11 13 13 13 12 > > > > > > > > > > > > > > > I have needed these functions more than once in my enginering > work. I > > > > > believe that these two verbs need to be inserted somewhere in the > > > > "Numbers" > > > > > section of the J Phrases doc. Maybe under "8A-Numbers & Counting", > or > > > > > 8C-Representations", or "8D-Arithmetic". > > > > > > > > > > > > > > > How do we get them in the document? What section do they fit the > best > > > in? > > > > > Can I edit the Phrases doc? > > > > > > > > > > Skip Cave > > > > > Cave Consulting LLC > > > > > > > > > > > >
Re: [Jprogramming] Boxed verbs as alternate gerunds
Oh I was wrong, thank you for pointing it out. Sent from my iPhone On 9 Aug, 2017, at 6:28 AM, Jose Mario Quintanawrote: > Inline comments follow... > >> I would say neither gerundYN or isgerund is correct, they should report > value error. Even J interpreter itself does not know if undefined name is a > verb or not, J can only assume it is a verb but it can be wrong since > unbound name is free to be assigned to any value. Your question should be > -- should an undefined name assumed to be a gerund. But I think this is > implementation dependent. BTW undefined name can also be regarded as noun > or domain error in implementation and still be compatible with J > dictionary, although it will be then become quite inconvenient to use. > > I am not sure about that; the Dictionary does not cover some implementation > details but apparently it covers this one: "The executions in the stack are > confined to the first four elements only, and eligibility for execution is > determined only by the class of each element (noun, verb, etc., an > unassigned name being treated as a verb), as prescribed in the following > parse table." [0] > > (I forgot to mention the odd word copula which in this context is , of > course, key for writing verbs in top-down fashion.) > >> Please don't get me wrong, I didn't mean Jx is incorrect. On the > contrary, Jx is enlightening. only that it is not the old J that I am > familiar with. > > I did not get you wrong Bill; however, I really appreciate your entire > comment, thanks for making it. > > > [0] E. Parsing and Execution >http://www.jsoftware.com/help/dictionary/dicte.htm > > > On Mon, Aug 7, 2017 at 8:20 PM, Bill wrote: > >> I would say neither gerundYN or isgerund is correct, they should report >> value error. Even J interpreter itself does not know if undefined name is a >> verb or not, J can only assume it is a verb but it can be wrong since >> unbound name is free to be assigned to any value. Your question should be >> -- should an undefined name assumed to be a gerund. But I think this is >> implementation dependent. BTW undefined name can also be regarded as noun >> or domain error in implementation and still be compatible with J >> dictionary, although it will be then become quite inconvenient to use. >> >> Please don't get me wrong, I didn't mean Jx is incorrect. On the >> contrary, Jx is enlightening. only that it is not the old J that I am >> familiar with. >> >> Sent from my iPhone >> >> On 8 Aug, 2017, at 7:26 AM, Jose Mario Quintana < >> jose.mario.quint...@gmail.com> wrote: >> >>> No joke was intended, undefined names are regarded as verbs in the >> context >>> of adverbs and conjunctions. Why? Because it allows for writing verbs >> in a >>> top-down fashion if one so desires. (Bill, I know you know most of this, >>> if not all; but I am putting some context for the potential benefit >> members >>> of the forum who might not.) >>> >>> An error thrown by @.0 does not necessarily mean that the argument is >> not >>> a gerund or that it is a nonsensical gerund; I would assume we both agree >>> that even if v is undefined v`'' is still a gerund. Either way, both >>> Roger's and Pascal's tests agree on this, >>> >>> v >>> |value error: v >>> >>> gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0: >>> isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0: >>> >>> gerundYN v`'' >>> 1 >>> isgerund v`'' >>> 1 >>> >>> Yet, >>> >>> v`'' @.0 >>> |value error: v >>> >>> However, >>> >>> v`'' @.0 / >>> v/ >>> >>> So, is the literal noun 'v' a gerund or not? A hint follows after >>> several blank lines, >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> v >>> |value error: v >>> >>> v123 >>> |value error: v123 >>> >>> >>> gerundYN 'v' >>> 1 >>> gerundYN 'v123' >>> 0 >>> >>> isgerund 'v' >>> 0 >>> isgerund 'v123' >>> 0 >>> >>> What is happening? >>> >>> >>> >>> On Sun, Aug 6, 2017 at 8:34 PM, Bill wrote: >>> I am not sure if I understand your question. If you asked something undefined is a gerund or not. I checked by executing v@.0 '' and the J interpreter said value error. Sounds like an empty array joke to me. Sent from my iPhone On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana < jose.mario.quint...@gmail.com> wrote: > I am not hoping to change people's minds; nevertheless, I would like to > explain, to some degree, my rationale regarding my current notion of what a > gerund is. > > The Dictionary is famous (or infamous according to some?) for its > terseness. It is not really surprising to me that different people >> have > different understandings even regarding the very important concept of > gerund. Personally, I use Dictionary as the
Re: [Jprogramming] Boxed verbs as alternate gerunds
:: noun is equivalent to :: (noun"_)? From: Henry RichTo: Programming forum Sent: Wednesday, August 9, 2017 5:25 AM Subject: Re: [Jprogramming] Boxed verbs as alternate gerunds :: 0 Is a j8.06 feature. Henry Rich On Aug 8, 2017 23:42, "Jose Mario Quintana" wrote: > "I still like the @.] test." > > What am I doing wrong? I have tried several times and I keep getting, > > JVERSION > Engine: j805/j64/windows > Release: commercial/2016-12-11T08:02:16 > Library: 8.05.11 > Qt IDE: 1.5.3/5.7.0 > Platform: Win 64 > Installer: J805 install > InstallPath: c:/program files/j > Contact: www.jsoftware.com > > > IsGerund=: 3 : 0 :: 0 > y@.] > 1 > ) > |domain error > | IsGerund=:3 :0 ::0 > |[-4] > > > Anyway, I was able to write it in Win Jx and it should not make any > difference, > > IsGerund=: 3 : 0 :: 0 > y@.] > 1 > ) > > Assuming I got it right, this how does your test compare to Roger's and > Pascal's for testing ;:'+/' , > > test=. gerundYN ; isgerund ; IsGerund > > test ;:'+/' > ┌─┬─┬─┐ > │1│1│0│ > └─┴─┴─┘ > > In my mind, ;:'+/' is both, a gerund and a valid train, > > (;:'+/')`:6 > +/ > (;:'+/')@.0 1 > +/ > > > On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand > wrote: > > > @.] should be used, not @.0 : > > > > v > > |value error: v > > v123 > > |value error: v123 > > v`''@.] > > v@.] > > v123`''@.] > > v123@.] > > > > I still like the @.] test. > > > > Louis > > > > > On 07 Aug 2017, at 19:26, Jose Mario Quintana < > > jose.mario.quint...@gmail.com> wrote: > > > > > > No joke was intended, undefined names are regarded as verbs in the > > context > > > of adverbs and conjunctions. Why? Because it allows for writing verbs > > in a > > > top-down fashion if one so desires. (Bill, I know you know most of > this, > > > if not all; but I am putting some context for the potential benefit > > members > > > of the forum who might not.) > > > > > > An error thrown by @.0 does not necessarily mean that the argument is > > not > > > a gerund or that it is a nonsensical gerund; I would assume we both > agree > > > that even if v is undefined v`'' is still a gerund. Either way, > both > > > Roger's and Pascal's tests agree on this, > > > > > > v > > > |value error: v > > > > > > gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0: > > > isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0: > > > > > > gerundYN v`'' > > > 1 > > > isgerund v`'' > > > 1 > > > > > > Yet, > > > > > > v`'' @.0 > > > |value error: v > > > > > > However, > > > > > > v`'' @.0 / > > > v/ > > > > > > So, is the literal noun 'v' a gerund or not? A hint follows after > > > several blank lines, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > v > > > |value error: v > > > > > > v123 > > > |value error: v123 > > > > > > > > > gerundYN 'v' > > > 1 > > > gerundYN 'v123' > > > 0 > > > > > > isgerund 'v' > > > 0 > > > isgerund 'v123' > > > 0 > > > > > > What is happening? > > > > > > > > > > > > On Sun, Aug 6, 2017 at 8:34 PM, Bill wrote: > > > > > >> I am not sure if I understand your question. If you asked something > > >> undefined is a gerund or not. I checked by executing v@.0 '' and the > J > > >> interpreter said value error. Sounds like an empty array joke to me. > > >> > > >> Sent from my iPhone > > >> > > >> On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana < > > >> jose.mario.quint...@gmail.com> wrote: > > >> > > >>> I am not hoping to change people's minds; nevertheless, I would like > to > > >>> explain, to some degree, my rationale regarding my current notion of > > >> what a > > >>> gerund is. > > >>> > > >>> The Dictionary is famous (or infamous according to some?) for its > > >>> terseness. It is not really surprising to me that different people > > have > > >>> different understandings even regarding the very important concept of > > >>> gerund. Personally, I use Dictionary as the primary source but > > >>> complemented by other official documents, forum information > > (particularly > > >>> opinions and statements from certain people), third party sources, > and > > >>> first and foremost the "real thing", the interpreter(s) which it is, > > >> after > > >>> all, where programs and utilities for writing programs, some of which > > are > > >>> very important to me, run. > > >>> > > >>> Let me start with the (current version of the) Dictionary, this is > how > > I > > >>> perceive it, given its terseness, the statement "Verbs act upon > nouns > > to > > >>> produce noun results..." is generally interpreted as "Verbs act upon > > >> nouns > > >>> [and only nouns] to produce noun [and only noun] results..." and > other > > >>> supporting evidence clearly confirm that is the intention. > > >>>
Re: [Jprogramming] Boxed verbs as alternate gerunds
:: 0 Is a j8.06 feature. Henry Rich On Aug 8, 2017 23:42, "Jose Mario Quintana"wrote: > "I still like the @.] test." > > What am I doing wrong? I have tried several times and I keep getting, > >JVERSION > Engine: j805/j64/windows > Release: commercial/2016-12-11T08:02:16 > Library: 8.05.11 > Qt IDE: 1.5.3/5.7.0 > Platform: Win 64 > Installer: J805 install > InstallPath: c:/program files/j > Contact: www.jsoftware.com > > >IsGerund=: 3 : 0 :: 0 > y@.] > 1 > ) > |domain error > | IsGerund=:3 :0 ::0 > |[-4] > > > Anyway, I was able to write it in Win Jx and it should not make any > difference, > > IsGerund=: 3 : 0 :: 0 > y@.] > 1 > ) > > Assuming I got it right, this how does your test compare to Roger's and > Pascal's for testing ;:'+/' , > >test=. gerundYN ; isgerund ; IsGerund > >test ;:'+/' > ┌─┬─┬─┐ > │1│1│0│ > └─┴─┴─┘ > > In my mind, ;:'+/' is both, a gerund and a valid train, > >(;:'+/')`:6 > +/ >(;:'+/')@.0 1 > +/ > > > On Mon, Aug 7, 2017 at 8:40 PM, Louis de Forcrand > wrote: > > > @.] should be used, not @.0 : > > > >v > > |value error: v > >v123 > > |value error: v123 > >v`''@.] > > v@.] > >v123`''@.] > > v123@.] > > > > I still like the @.] test. > > > > Louis > > > > > On 07 Aug 2017, at 19:26, Jose Mario Quintana < > > jose.mario.quint...@gmail.com> wrote: > > > > > > No joke was intended, undefined names are regarded as verbs in the > > context > > > of adverbs and conjunctions. Why? Because it allows for writing verbs > > in a > > > top-down fashion if one so desires. (Bill, I know you know most of > this, > > > if not all; but I am putting some context for the potential benefit > > members > > > of the forum who might not.) > > > > > > An error thrown by @.0 does not necessarily mean that the argument is > > not > > > a gerund or that it is a nonsensical gerund; I would assume we both > agree > > > that even if v is undefined v`'' is still a gerund. Either way, > both > > > Roger's and Pascal's tests agree on this, > > > > > > v > > > |value error: v > > > > > > gerundYN=: 0 -. @ e. 3 : ('y (5!:0)';'1')"0 :: 0: > > > isgerund =: 0:`(0 -. @ e. 3 : ('y (5!:0)';'1')"0)@.(0 < L.) :: 0: > > > > > > gerundYN v`'' > > > 1 > > > isgerund v`'' > > > 1 > > > > > > Yet, > > > > > > v`'' @.0 > > > |value error: v > > > > > > However, > > > > > > v`'' @.0 / > > > v/ > > > > > > So, is the literal noun 'v' a gerund or not? A hint follows after > > > several blank lines, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > v > > > |value error: v > > > > > > v123 > > > |value error: v123 > > > > > > > > > gerundYN 'v' > > > 1 > > > gerundYN 'v123' > > > 0 > > > > > > isgerund 'v' > > > 0 > > > isgerund 'v123' > > > 0 > > > > > > What is happening? > > > > > > > > > > > > On Sun, Aug 6, 2017 at 8:34 PM, Bill wrote: > > > > > >> I am not sure if I understand your question. If you asked something > > >> undefined is a gerund or not. I checked by executing v@.0 '' and the > J > > >> interpreter said value error. Sounds like an empty array joke to me. > > >> > > >> Sent from my iPhone > > >> > > >> On 7 Aug, 2017, at 5:23 AM, Jose Mario Quintana < > > >> jose.mario.quint...@gmail.com> wrote: > > >> > > >>> I am not hoping to change people's minds; nevertheless, I would like > to > > >>> explain, to some degree, my rationale regarding my current notion of > > >> what a > > >>> gerund is. > > >>> > > >>> The Dictionary is famous (or infamous according to some?) for its > > >>> terseness. It is not really surprising to me that different people > > have > > >>> different understandings even regarding the very important concept of > > >>> gerund. Personally, I use Dictionary as the primary source but > > >>> complemented by other official documents, forum information > > (particularly > > >>> opinions and statements from certain people), third party sources, > and > > >>> first and foremost the "real thing", the interpreter(s) which it is, > > >> after > > >>> all, where programs and utilities for writing programs, some of which > > are > > >>> very important to me, run. > > >>> > > >>> Let me start with the (current version of the) Dictionary, this is > how > > I > > >>> perceive it, given its terseness, the statement "Verbs act upon > nouns > > to > > >>> produce noun results..." is generally interpreted as "Verbs act upon > > >> nouns > > >>> [and only nouns] to produce noun [and only noun] results..." and > other > > >>> supporting evidence clearly confirm that is the intention. > > >>> > > >>> Therefore, assuming that the Dictionary is consistent, then the > > statement > > >>> related to the to the entry Tie (Gerund), > > >>> " > > >>> More generally, tie produces gerunds as follows: u`v is au,av , where