Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Brian Schott
For me one of the killer apps for J was the beauty of the code, in particular I have been enamored of being able to write code that looks like natural sentences and writing sentences that look declarative in the sense that they don't have loops, but may have sub sentences. That is why I tried to wr

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Murray Eisenberg
Distractions are probably good in a promotional video only to the extent that one wishes to divert attention from the product being promoted. Certainly relevant music can add to the impact of a presentation by suggesting a mood, etc. But adding _irrelevant_ music is pointless. On Fri, 7 Mar 20

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread PMA
I'm surprised that the music discussion continues. I took its instigation as a joke assuming that _any_ music in this context would be distracting at best. PMA wrote: Maybe Stockhausen's _Klavierstuck IX_? It's based on the Fibonacci series. Roger Hui wrote: (1) There is perhaps a generation

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Linda Alvord
Could you please explain with an example what your code will do that needs all the definitions that you include. o=: @: ar=: 5!:1@< Cloak=: (0:`)(,^:) Cloak=: (ar'Cloak')Cloak 'evoke tie'=: < o Cloak "0 o ;: '`: `' g2v=: evoke&6 o tie f. ( +/`'' (evoke&6

[Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
I have successfully drawn gl.LINES in my adaptation of Eric's demogl1.ijs, but each time I draw a new line that the user's command produces (for example, say `forward 2` produces a line from 0,0,0 to 0,2,0) all of the graphics on the incumbent canvas are erased, and that line (from 0,0,0 to 0,2,0)

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Pascal Jasmin
I was using mean as a simple placeholder (J's tutorial fork) verb that was being created by gerunds.  I was looking for a solution for taking the result of a function that produces gerunds to convert that into a verb (train) from that same function.  The problem with:    (+/`''  ( 4 : 'x ` y')

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Raul Miller
That's certainly one way of looking at it. https://en.wikipedia.org/wiki/Positioning_(marketing) might be another way of looking at this. Look... if *all* you show is your product - no background, no context, no fun, then you might be quite successful at preaching to the choir (that would be us).

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Raul Miller
That said... if someone wants to put together a gloomy (or downtempo) promo for J? We could use, those, also. Thanks, -- Raul On Sat, Mar 8, 2014 at 2:49 PM, Raul Miller wrote: > That's certainly one way of looking at it. > > https://en.wikipedia.org/wiki/Positioning_(marketing) might be a

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Dan Bron
I know you've mentioned this capability before - can you refresh my memory? Short of passing in strings and evoking them, how would you get an explicit verb to "see" an adverb (or conjunction) as an argument? What name does it get assigned to (if it is possible for y and/or x to not have namecla

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Yike Lu
Re: Raul's point about harsh self criticism, I don't think any of this so far has been overly harsh. I certainly didn't mean my comment about the music to be much, other than an observation, perhaps a recommendation for the next time. Re: rest of the comments. Remember as far as "code beauty" and

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Raul Miller
On Sat, Mar 8, 2014 at 3:00 PM, Yike Lu wrote: > To reframe the question of the killer app: What common computing problem > does J uniquely solve, or solve uniquely better? Again, I honestly do not > know. I'm actively trying to come up with reasons to slip it into my daily > routine (which is ab

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Raul Miller
Explicit verbs can refer to things by name. Thanks, -- Raul On Sat, Mar 8, 2014 at 3:00 PM, Dan Bron wrote: > I know you've mentioned this capability before - can you refresh my memory? > > Short of passing in strings and evoking them, how would you get an > explicit verb to "see" an adverb

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Dan Abell
First of all, bravo to Martin for putting in the time and effort to make that video. I think it does a very good job of showing a newbie why it might be worth learning J. So please---please---take the following criticism as constructive. Concerning the music: I felt the music's emotional content v

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Raul Miller
Am I the only one that liked the music? Maybe my tastes are just strange... Thanks, -- Raul On Sat, Mar 8, 2014 at 3:34 PM, Dan Abell wrote: > First of all, bravo to Martin for putting in the time > and effort to make that video. I think it does a very > good job of showing a newbie why it

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Joe Bogner
Hi Brian - It sounds like it should work if you are evaluating a drawLines call after each ajax request and not refreshing the whole page. Can you post the full code or at least the part that handles the ajax response to better diagnose? On Mar 8, 2014 2:18 PM, "Brian Schott" wrote: > I have suc

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Tom Arneson
I, too like the music. -Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Raul Miller Sent: Saturday, March 08, 2014 14:44 To: Programming forum Subject: Re: [Jprogramming] J in 5 minutes Am I the only one that

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread PMA
Music tends to commandeer my attention, either to listen (if I "like" it) or to shut it out (if I "don't"). Paying attention to something else -- e.g., J -- at the same time is just out of possibility. Still, I gather that not everybody is so-afflicted. Raul Miller wrote: Am I the only one tha

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread greg heil
On 8 March 2014 12:00, Yike Lu wrote: ... >>TouchQuery looks really cool, but it's not a killer app, it's a great tool. I >>mean -- have you ever switched to a language because the IDE was awesome? >i would likely turn that around and ask myself: what languages have i avoided >because they were

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Dan Bron
A verb's "argument" refers to the values used to invoke it. Therefore names fixed in its definition are not arguments (excepting y and x which are defined to refer to its argument(s)). Yes, it is possible to invoke verbs with strings or other nouns which directly or indirectly name non-nouns (

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread EelVex
I've found J is a powerful *thinking tool* like no other. In Python, R, Ruby and others you're writing an algorithm to solve the problem at hand. In J you transform your data, step after step, squeezing the solution out of them. On Sat, Mar 8, 2014 at 10:00 PM, Yike Lu wrote: > Re: Raul's point

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Roger Hui
> In J you transform your data, step after step, squeezing the solution out of them. In APL, what flashes through your mind is a cascade of operations: chasing data through arrays, out of the other end of which come — limping and bruised, you know — seven numbers. After having built up arrays of r

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Raul Miller
Point taken. Might be in his modified J interpreter though. Thanks, -- Raul On Sat, Mar 8, 2014 at 4:27 PM, Dan Bron wrote: > A verb's "argument" refers to the values used to invoke it. Therefore > names fixed in its definition are not arguments (excepting y and x which > are defined to re

Re: [Jprogramming] J in 5 minutes

2014-03-08 Thread Joe Bogner
On Mar 8, 2014 3:00 PM, "Yike Lu" wrote: > > I'm actively trying to come up with reasons to slip it into my daily > routine (which is about 95% Python), and I keep failing. I would have to > spend probably a month or two of off-hours development to get my small > j-table project up to par with Py

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Dan Bron
The statement "Explicit verbs can take adverbs and conjunctions as arguments because I've modified the language to allow explicit verbs to take adverbs and conjunctions as arguments" would also be trivial. Mr. Quintana is not given to making trivial statements (though I would not be surprised if

[Jprogramming] J in 5 minutes

2014-03-08 Thread David Lambert
The music excited me. Long scrolls through application code bored me. I agree with the suggestion of examples involving literals. I used j to parse html. Due to errors in the html my j program worked whereas the python html parser I had initially tried failed. I used a lot of box cuts with

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
Joe, Thanks for the offer. I have put the code here. https://dpaste.de/qJge Believe it or not it is dumbed down, even though it is long. The main trick I used to trim it was to replace the usual user input, which is something like `fd 20`, with the suggested jhrajax input. Let me know if there is

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Joe Bogner
Brian, it definitely looks like it's something with the webgl code instead of what you are doing with J. I am not familiar with webgl so I will need to read up on it. I can say it's webgl/javascript because I get the same behavior of wiping out the canvas if I just paste lines like this into the j

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Raul Miller
First, the simplest way to do what I think you are asking is gl = canvas.getContext('webgl', {preserveDrawingBuffer: true}); Second, after visiting http://127.0.0.1:65001/tgsj I noticed that arrow keys were inert (and I did not explore the option of typing a command). Hopefully this just reflec

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
Raul, With regard to changing the definition of gl, it did not seem to accomplish anything. I never heard of that option, though. Maybe I have something else tricked up to outsmart that option? I had to disable the keys because that feature was undermining my ability to read the user's inputs. I

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
Oops, I meant in the second paragraph, that I have *not* been able to reinstate ... On Sat, Mar 8, 2014 at 8:28 PM, Brian Schott wrote: > Raul, > > With regard to changing the definition of gl, it did not seem to > accomplish anything. I never heard of that option, though. Maybe I have > someth

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Raul Miller
Can you tell me the steps you are using to get the behavior you do not want (and what you want to happen instead)? Thanks, -- Raul On Sat, Mar 8, 2014 at 8:28 PM, Brian Schott wrote: > Raul, > > With regard to changing the definition of gl, it did not seem to accomplish > anything. I never

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
When I click enter on the text field and press enter, even with the phony text that is presently in it, the drawing disappears, instead of staying and a new line appearing. When there is real information in the text field, a turtle command moving the turtle forward by n steps, the drawing disappear

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Raul Miller
With function init() { try { var canvas = document.getElementById("glcanvas"); gl = canvas.getContext('webgl', {preserveDrawingBuffer: true}); if ( ! gl ) { throw "Could not create WebGL context."; } I cannot reproduce this. With function init() {

[Jprogramming] Oddities in Bond including ,:

2014-03-08 Thread Linda Alvord
Why is the display of f different than g , h and I ? NB. m&v y is defined as m v y NB. u&n y is defined as y u n f=: 13 :'4&*y' g=: 13 :'4*&y' h=: 13 :'y&*4' i=: 13 :'y*&4' f 4&* g 3 : '4*&y' h 3 : 'y&*4'

[Jprogramming] J Extensions

2014-03-08 Thread Jose Mario Quintana
The patches, a Windows 32-bit DLL, a cheatsheet, 32 and 64 bit Unix libraries are found at: http://www.2bestsystems.com/foundation/j/ For more details and demonstration code, see the article in the Journal of J: http://journalofj.com/index.php/vol-2-no-2-october-2013 (only the definition of

Re: [Jprogramming] J Extensions

2014-03-08 Thread bill lam
Will it change current J semantics or break existing code? If it is compatible with current J701 engine, I'll try to add it into android libj.so which is also GPL licensed. Is there any test suite for the extensions? Actually I don't understand those extensions, sorry to be slow. Сб, 08 мар 2

Re: [Jprogramming] Oddities in Bond including ,:

2014-03-08 Thread Raul Miller
In f, the noun you are bonding to the verb is the number 4. In g and h, the noun you are bonding to the verb is the parameter y. In i you are implementing a syntax error. The trees for g, h and i represent explicit definitions. Thanks, -- Raul On Sat, Mar 8, 2014 at 11:33 PM, Linda Alvord

Re: [Jprogramming] Oddities in Bond including ,:

2014-03-08 Thread km
A suggestion: where do the understood parentheses go in 4&*y and in 4*&y ? --Kip Sent from my iPad > On Mar 8, 2014, at 10:33 PM, "Linda Alvord" wrote: > > Why is the display of f different than g , h and I ? > > > >NB. m&v y is defined as m v y > > > > NB. u&n y is

Re: [Jprogramming] jhs webgl array_buffer

2014-03-08 Thread Brian Schott
Raul, Perhaps, by mistake, I added the phrase `,{preserveDrawingBuffer: true}` in the `if (!gl)` clause instead of the original `gl=` clause, and the drawing worked correctly. I think on my computer the experimental-webgl is more important that the webgl, and that's why your clause really worked f

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Jose Mario Quintana
I do not recall mentioning this before. I do remember saying that an adverb could take an adverb or a conjunction as an argument in a previous version of the interpreter, J4, I think (this also happens in our permissive version of the interpreter). My guess is that there is a guard checking the e

Re: [Jprogramming] `: 6 binding to verb

2014-03-08 Thread Jose Mario Quintana
"Mr. Quintana" ? :D On Sat, Mar 8, 2014 at 5:17 PM, Dan Bron wrote: > The statement "Explicit verbs can take adverbs and conjunctions as > arguments because I've modified the language to allow explicit verbs to > take adverbs and conjunctions as arguments" would also be trivial. Mr. > Quintana