I might be the only person that likes J's OOP system, but here are the key resources:
http://www.jsoftware.com/help/learning/25.htm http://www.jsoftware.com/help/jforc/modular_code.htm#_Toc191734482 The key takeaways are that: conew just creates an empty numbered locale, and inserts the class name in its path. You can create an "object" from any locale. conew is just like any regular J verb. There is no "engine" interaction. The create method is only slightly magic. It interacts with conew that expects it to exist. There is no J system magic that treats create special. There is advice to create a destroy method, but there is no default interactions with any other method in the "profile" (J's startup execution verb definitions), so nothing will call destroy if you don't. To like J's OOP system, you have to figure out a way to work with lists of objects filtered in a J way. After you understand the above introductions, you might look at the OOP parts of this essay. http://www.jsoftware.com/jwiki/PascalJasmin/OOP%20scheduler%20and%20ZeroMQ ----- Original Message ----- From: Yike Lu <yikelu.h...@gmail.com> To: programm...@jsoftware.com Cc: Sent: Friday, February 28, 2014 12:18:44 PM Subject: [Jprogramming] Intro; Learning J Feedback Hey everybody, I'm new to the forum. I got involved with vector languages when I had to learn q for a job. I have since moved on from that job and lost q, so I've been looking for a suitable replacement ever since. I tried J here and there, but the things I learned never really stuck. I went to one or two meet ups at the NYJUG (met Devon there). My programming background includes C++, R, q, python, and a sprinkling of Scheme. I decided to pick up learning J again. I have some feedback on the first few hours that I went through, hopefully it's useful information and others have the same problems: 1. I wanted to tackle a problem I already had, or already have solved. Data being what it is, that usually means a pre-existing data set, often in CSV format. 2. I found the csv package, quite nice. 3. For some reason my Qt IDE broke. So I had to use jconsole and pacman. This took me longer than expected to find. Until then, I was just praying the IDE would come back so I could use the package manager. 4. JDB specifically -- no mention of the JMF dependency? Bad call. I was confused for 20 minutes. 5. load operator syntax and path -- where is this documented? I figured out the JHOME/addons directory is part of it. Can I add to or change it the path? 6. How to load a script? load confused me because the syntax suggested it loads the whole directory (although I later found out this wasn't the case). I eventually found http://www.jsoftware.com/docs/help701/learning/26.htm 7. Locales? A lot of the packages use more advanced features like OOP and locales, and it's very disorienting at first, especially with the non standard Name__Locale syntax. At the end of the day, my use case and learning approach can be summed up as follows: * I have a pre existing problem that I have solved. I would like to be able to use J to solve it, potentially more quickly or more elegantly. * In theory, this should require a simple mapping of basic concepts from one language to another, plus a generous helping of library functions. * How do I do it in J? Take a direct, focused approach to getting the basics handled (data loading and selection for example). This gets me to a stable point of reference. * What can I do next in J? This is more exploratory learning. I have the data loaded and I know how to do basic operations. Build on this knowledge. The wiki documentation so far makes this unnecessarily painful. Remember we don't have a meaningful StackOverflow presence or easily Google-able answers. There's a million tutorials on how to do basic array manipulations, and they're all front and center. The OO, script loading, locales seemed to be buried further back. Also, my general feeling reading through the docs is that they're pretty scattered on those topics. I've started a github repo where I'm keeping some utilities I'm developing around table manipulation: https://github.com/yikelu/j_table ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm