Oh dear! What shall I do? Shall I restore /labs/labs/lablist.txt --and try again? (Does it need restoring? Won't it just get rebuilt afresh?)
On Mon, Sep 17, 2012 at 5:49 AM, bill lam <bbill....@gmail.com> wrote: > Sorry, I was not precise enough. I meant updating the manifest.ijs of > labs/labs by increasing its version number in order to trigger a > new built for labs/labs (not the zulu). > > Пнд, 17 Сен 2012, Ian Clark писал(а): >> Right, Bill, ... >> >> In j64-701 I've used Package Manager to download the 2 addons: zulu >> and zulu-lite. >> Then I've added to my local copy of: ~addons/labs/labs/lablist.txt >> the following lines (in the correct place, which is obvious) ... >> >> Format;Strings conversion package;~addons/format/zulu/zulu.ijt >> Format;Strings conversion package: LITE >> version;~addons/format/zulu-lite/zulu-lite.ijt >> >> Having done that, I now see the new Labs in JGTK, and can run them. >> They run to completion -- which has validated the 2 addons also under JGTK. >> (In j602 the new labs appear to get installed automatically by Package >> Manager.) >> >> But this won't have updated everyone else's lablist.txt ... !!? >> >> So I've carried out the following task using svn: >> >> ian-clarks-imac:~ ianclark$ svn checkout >> http://www.jsoftware.com/svn/addons/trunk/ jaddons >> Checked out revision 3771. >> [...At this point I alter /jaddons/labs/labs/lablist.txt -to >> identify the 2 new labs, inserting the 2 extra lines that have worked >> for me...] >> ian-clarks-imac:~ ianclark$ svn commit jaddons -m "try to update j701: >> lablist.txt" >> Sending jaddons/labs/labs/lablist.txt >> Transmitting file data . >> Committed revision 3772. >> >> ...and the following has appeared in: >> http://www.jsoftware.com/jwiki/JAL/Build%20Log >> 2012 9 17 4 28 47 addons no change >> >> I hope I've done right...? >> ...But there should be enough information here to back out anything >> I've done wrong. >> >> Ian >> >> On Mon, Sep 17, 2012 at 3:09 AM, bill lam <bbill....@gmail.com> wrote: >> > For J7 jgtk, you need to add a new entry for your lab in the file >> > labs/lablist.txt and update manifest.ijs to release an updated labs >> > addon. (untested) >> > >> > Not sure how it works in jhs. >> > >> > Пнд, 17 Сен 2012, Ian Clark писал(а): >> >> @Emir >> >> A big Thank-you for your set of sample tasks from a bona-fide J >> >> beginner. They come at the right time for me. >> >> >> >> I have just released a new addon: "format/zulu". This offers a >> >> "sandbox" for experimenting with strings in J. It also installs a new >> >> "Lab". See (in j602): >> >> Menu: Studio > Labs... > Category: format > Strings conversion package >> >> ...which puts the sandbox through its paces. >> >> (Sorry, I can't see the Lab in J701. Maybe it's because I can't see >> >> any "format" category. So you may have to install and run j602 instead >> >> of j701.) >> >> >> >> Near the end of the Lab, viz at: >> >> ── (31 of 39) TASKS >> >> there's a set of sample tasks with boxed strings. They're much like >> >> yours. Plus my own solutions. (But, I have to admit, my solutions are >> >> not as slick as Raul's.) >> >> >> >> Nevertheless "zulu" might be of help to you. I offer it to you (and >> >> other beginners) in that vein. Your feedback will help me to improve >> >> the Lab. >> >> >> >> @Raul >> >> Thank you for your solutions to Emir's tasks. Most timely. >> >> As a result I'm going to use some of them in zulu.ijt, if you don't mind. >> >> And if you get time to cast your eye over "format/zulu" I'd welcome >> >> your suggestions. >> >> (Other J-ers, too, especially those teaching J to beginners.) >> >> >> >> NB. "format/zulu" is very much aimed at beginners, especially its Lab. >> >> I expect a Jmaster will die of boredom working thru it. >> >> >> >> On Sun, Sep 16, 2012 at 9:01 PM, Raul Miller <rauldmil...@gmail.com> >> >> wrote: >> >> > s =: ' ';'this';'is';'a';'sentence' >> >> > (<'is') 0} s >> >> > ┌──┬────┬──┬─┬────────┐ >> >> > │is│this│is│a│sentence│ >> >> > └──┴────┴──┴─┴────────┘ >> >> > 4 ({.,(<'sample'),}.) s >> >> > ┌─┬────┬──┬─┬──────┬────────┐ >> >> > │ │this│is│a│sample│sentence│ >> >> > └─┴────┴──┴─┴──────┴────────┘ >> >> > 1 }. s >> >> > ┌────┬──┬─┬────────┐ >> >> > │this│is│a│sentence│ >> >> > └────┴──┴─┴────────┘ >> >> > (2 {. s), 3 }.s >> >> > ┌─┬────┬─┬────────┐ >> >> > │ │this│a│sentence│ >> >> > └─┴────┴─┴────────┘ >> >> > (<'the') (I. s = <,'a')} s >> >> > ┌─┬────┬──┬─┬────────┐ >> >> > │ │this│is│a│sentence│ >> >> > └─┴────┴──┴─┴────────┘ >> >> > (<'the') (I. s = <'a')} s >> >> > ┌─┬────┬──┬───┬────────┐ >> >> > │ │this│is│the│sentence│ >> >> > └─┴────┴──┴───┴────────┘ >> >> > s -. <'is' >> >> > ┌─┬────┬─┬────────┐ >> >> > │ │this│a│sentence│ >> >> > └─┴────┴─┴────────┘ >> >> > >> >> > In other words: >> >> > >> >> > 1) yes >> >> > 2) yes >> >> > 3) yes, but be careful >> >> > >> >> > In this case, your s contained five boxes. Four of those boxes where >> >> > character sequences. One of them was just a character. In the >> >> > general case, you need to be aware of the distinction between a >> >> > character (rank 0) and a sequence of characters (rank 1), and you >> >> > especially need to be aware of the distinction between a character and >> >> > a sequence of characters of length 1. They're different but seem to >> >> > be the same. >> >> > >> >> > This is analogous to the distinction between >> >> > 2 >> >> > and >> >> > 3 4 5 >> >> > >> >> > The first is just a number, the second is a sequence of numbers... >> >> > And you can have sequences of numbers of length 1, but that's not >> >> > quite the same thing as the number by itself. >> >> > >> >> > -- >> >> > Raul >> >> > >> >> > On Sun, Sep 16, 2012 at 3:30 PM, Emir Ustamujic <emir_...@yahoo.com> >> >> > wrote: >> >> >> Hello, >> >> >> >> >> >> As I'm often working with boxes of strings I have identified several >> >> >> things that I would like to do with boxed strings but haven't figured >> >> >> how to do yet as I'm still learning J. >> >> >> >> >> >> [I hope the boxes in the examples don't turn out garbled...] >> >> >> >> >> >> >> >> >> 1. If there is a list of boxed words(strings) how to replace >> >> >> individual items with another string ? >> >> >> >> >> >> For example I have : >> >> >> ] s =: ' ';'this';'is';'a';'sentence' >> >> >> ┌─┬────┬──┬─┬────────┐ >> >> >> │ │ this│ is│a│ sentence│ >> >> >> └─┴────┴──┴─┴────────┘ >> >> >> but would like to use something like: 0 boxitemreplace s; 'is' (to >> >> >> replace the first element which can be a space with 'is) >> >> >> and get this result : >> >> >> ┌──┬────┬──┬─┬────────┐ >> >> >> │is │this │is │a │sentence │ >> >> >> └──┴────┴──┴─┴────────┘ >> >> >> or something like 2 boxitemreplace s;' ' (to replace the third element >> >> >> with a space) >> >> >> ┌──┬────┬──┬─┬────────┐ >> >> >> │ │this │ │a │sentence │ >> >> >> └──┴────┴──┴─┴────────┘ >> >> >> >> >> >> 2. Insert and Remove >> >> >> >> >> >> For example using the same s =: ' ';'this';'is';'a';'sentence': >> >> >> would it be possible to somehow insert a word at a specific index so: >> >> >> 4 inserttobox s;'sample' >> >> >> would yield >> >> >> ┌─┬────┬──┬─┬──────┬────────┐ >> >> >> │ │this │is │a │sample │sentence │ >> >> >> └─┴────┴──┴─┴──────┴────────┘ >> >> >> or remove nth item such as 0 removeitemfrombox s;' ' >> >> >> ┌────┬──┬─┬──────┬────────┐ >> >> >> │this │is │a │sample │sentence │ >> >> >> └────┴──┴─┴──────┴────────┘ >> >> >> >> >> >> >> >> >> 3. And consequently would it be also possible to replace all >> >> >> occurences of one string value within s with another string and remove >> >> >> all occurences of one string from a boxed list such as s ? >> >> >> >> >> >> I more or less know how to do this with regular strings such as s=: >> >> >> 'this is a sentence' but my problem is when dealing directly with >> >> >> boxed strings and when they contain spaces. >> >> >> >> >> >> >> >> >> Thanks &Regards, >> >> >> Emir >> >> >> ---------------------------------------------------------------------- >> >> >> 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 >> > ---------------------------------------------------------------------- >> > 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 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm