3 ms·
J seems like a language I should learn using flash cards. Make a flash card for each character, for each operation, and just learn all the operators, and then I
by Buttons840 6y ago
J seems like a language I should learn using flash cards. Make a flash card for each character, for each operation, and just learn all the operators, and then I will know J.
Any truth to this?
I suppose it might be like telling someone, "you know conditionals and loops, now you know how to program!"
- gmfawcett 6y agoIn my experience -- flash cards might help a little, but writing code is the only way to internalize it. Read the books/tutorials and follow along until your feet are a little wet. Keep in mind that it's not just about the verbs (operators) in isolation, it's also about sentence structure. While you can get quite far in the language without learning how to write a fork or a hook (two related ways of combining verbs), it will be near impossible to read someone else's code until you practice these forms yourself. Having said that, if you're anything like me you will have the NuVoc page [1] open basically all the time while writing or reading J. It's hard to keep them all straight, esp. the verbs that you don't use very often. [1] https://code.jsoftware.com/wiki/NuVoc https://code.jsoftware.com/wiki/NuVoc
- Jtsummers 6y agoI've been experimenting with flashcards that prompt me to write or solve some problem, versus the more common memorization usage. Not necessarily solving the same problem (write FizzBuzz in SomeLang) but maybe more complex (select a public web API with a JSON source, get the data, process it, and make a simple report). A way to reinforce understanding of different libraries or tools. I haven't figured out the scheduling on that in Anki yet, though. The same ratings can still be applied, even if it takes an hour to do it it's "how easy was that hour?" Did I have to pull open a lot of language and library references? Was I able to, without much effort, create the basic project template and start filling it out? Or did I have to look up the details on defpackage again? Then combine that with more explicit memorization/recall cards like I use for Spanish. "In Common Lisp what non-destructive function filters a sequence based on a predicate?" "remove-if". I think this should work well as a way to develop an understanding when paired with books/tutorials on the language and its libraries.
- gmfawcett 6y agoGood luck, I hope it works! Consider adding some flash cards with grammatical forms to mix in with your "character" cards. e.g. a monadic hook "(f g) y" is equivalent to "y f g y". And some short idiomatic phrases, e.g. "(#~ f) y" means -- approximately! -- "copy the values y_i of y wherever (f y_i) is true." You can find examples of these little phrases on the J wiki.
- Jtsummers 6y agoThanks. It's still an experiment, and about to be restarted (was going to be learning modern C++ and some APIs for work, but direction shifted and I'm now on a Java project, which I haven't used in a long time). I'd actually like to try this for J, but work and Spanish (to speak with the in-laws) are my personal priorities right now. Perhaps in October I'll start studying J to use for this next Advent of Code. I have been getting the itch to relearn it. I learned a large chunk of it circa 2010, but haven't touched it since, then APL in 2015 or 2016. I've never used either professionally or for a major project so a lot of things have been forgotten. I'm basing my experiment on what I learned using Anki for language learning. Much like you said, you need larger statements and to develop an understanding of them. For Spanish I have some loose writing/speaking prompts and some reading prompts (not copying the text, but a prompt to go to today's newspapers and read some articles and explain them to my wife or to read some paragraphs from a book). How well I can complete these without needing a dictionary or to ask for assistance determines how I mark the cards. It seems to work decently, they come up almost like pop quizzes in school classes since the spaced repetition system means I don't see the same prompts each day. I think it should work to have project prompts for programming languages in the same manner.
- scottlocklin 6y agoDefinitely no; I tried something similar with the J dictionary. The right way to learn is to go through "J for C programmers" (it comes with the language), or just grab NuVoc[0] and start writing code for something non trivial. Labs can also help for areas you're not familiar with. Its the composition in J which carries meaning; and stuff like hooks and forks (more or less, writing J AST's directly) make it non-obvious in early days. [0] https://code.jsoftware.com/wiki/NuVoc https://code.jsoftware.com/wiki/NuVoc
- recursive 6y agoI couldn't find "J for C programmers" in my installation, but there seems to be more info here. https://code.jsoftware.com/wiki/Books#J_for_C_Programmers https://code.jsoftware.com/wiki/Books#J_for_C_Programmers
- scottlocklin 6y agoMemory failing me; it used to be part of the IDE, with a copy of it and the dictionary stored on local storage, but I guess J has changed enough recently it needed to go up on the wiki where it can be changed. You can always find it from nuvoc. Usr Pri JfC LJ Phr Dic Voc !: All these are interesting; some primers, some the old version of the dictionary (I think it's depreciated for now). I end up !: a lot for the foreigns.
- kd0amg 6y agoIt would be a lot like that. There's a mindset shift to thinking of arrays as geometric objects to manipulate in space instead of as boundaries on valid indices. One of my favorite examples is computing a moving average over some vector of input data. Instead of thinking about looping over each sub-range to find its average, and having that nested inside a loop over possible sub-ranges, you can build a 2D array whose rows are time-shifted versions of the original 1D array. Sum that column-wise and divide by the number of rows to get your answer. Understanding how you can build that iteration space as reified data gives you a lot more expressive power than you get from remembering that `|.` means "rotate." It's easy to look up which symbol corresponds to a chosen operation (and you'll memorize the ones you use a lot anyhow).