last day (15 days later) » 

16:54
1
A: Produce a m*n table in HTML

GrahamAPL+WIN, 68 63 bytes 5 bytes saved thanks to Adám Prompts for number of columns followed by number of rows and outputs non-closure option: h←⊂'<th>A'⋄r←⊂'<td>A'⋄t←⊂'<tr>'⋄'<table>'t(n⍴h)t,,((⎕-1),n←⎕)⍴r

@Adám Too trigger happy I am afraid. Looks OK now?
Yes, but you don't need the or the trailing parens: t,,((⎕-1),n←⎕)⍴r or the first two commas.
@Adám Thanks. Its not my day must be the heat (28C)!
Merge h and r into the main expression: '<table>'t(n⍴⊂'<th>A')t,,((⎕-1),n←⎕)⍴⊂'<td>A'
Something isn't right. You only insert one <tr> for the body. Each row needs a <tr>.
@Adám Check your last suggested mod nowhere is t defined which I had as <tr>. My expression above yields:
@Adám Check your last suggested mod nowhere is t defined which I had as t←⊂'<tr>'. My expression above yields <table><tr><th>A<th>A<th>A<tr><td>A<td>A<td>A which looks remarkably like <table><tr><th>A<th>A<th>A<tr><td>A<td>A<td>A for the 2 3 example given in the question.
16:57
@Graham I didn't mean to change the statement defining t, only the main statement (while removing the first two).
OK but I still do not see what is wrong with the code as it gives the same answer as the example
I think I now see the issue. The example is only a two line table.
It looks like a comma problem around the second t. Does ),,t,( fix it?
@Adám See my comments in response to yours. This is the first time I have used chat and did not realise the potential need for @ in a one to one.
17:19
@Graham Welcome to chat.
@Graham Where does the ),,t,( go (use markup n chat too!)?
@Adám Take a look at my answer on the main page where I have built it in to your last suggestion.
@Graham Doesn't quite look right by me. What does it give for 3 and 4 by you?
@Graham Also, you can use TIO in your answer. Almost everything is compatible with APL+Win.
17:36
@Adám It does not look like my day. The input order is the wrong way round. Correcting it gives <table><tr><th>A<th>A<th>A<tr><td>A<td>A<td>A<tr><td>A<td>A<td>A<tr><td>A<td>A<t‌​d>A
for a 4x3
17:49
@Graham Looks good now. I've added a TIO link for you.
@Adám. Thanks for that. APL2000 went super commercial a long while back and froze out us amateurs. I am still using V5. Dyalog are much more enlightened. I keep meaning to make the switch but I have so much stuff in APL+WIN and it does more or less what I need. In ⎕ML←3 mode how close does it come to APL+WIN?
@Graham Regarding the language itself, for anything you'd use in code golf, I think 100%, but I can't find any APL+Win documentation at all, so it is a bit hard to know. The IDE is obviously very different, and some of the advanced system functions may have different names, have somewhat different behaviour, or be absent. We do have a library of APLX drop-ins, which may fit some of your needs. I'll also be happy to help with any issues arising.
18:14
@Adam Thanks for that and the offer. Once Dyalog is available on Android I make be tempted to experiment. I have failed the intelligence test with TIO at the first hurdle. How do you get it to take a character matrix. Take for example my answer to the enklaction question and the qick brown fox example. In APL+WIN I would enter the input as a 4x11 character matric following the prompt
@Graham The Input area is essentially your session, so the first line of the session would be just f to call your program, and then the next line is the response to the -prompt, e.g. 2 3⍴'abcdef' or ↑'abc' 'def'. The third line may be the answer to a second -prompt, etc.
@Graham Yeah, I keep saying we should launch on Android. The problem isn't getting the interpreter to run on Android, but rather that we need an interface that can both run there and is suitable for small screens.
@Adám Thanks for the first tip that worked. Hopefully I can now include TIO in my answers. As for Android I had in mind developing apps on the dessktop/laptop and just running them on small screen devices. I had not envisaged developing on the phone.
18:34
@Graham If you ever need help about APL on TIO or APL+Win/Dyalog compatibilty, ping me in The APL Orchard. I'll keep pushing for Android…
18:44
@Adám, Thanks I will keep that in mind. I think I am just about there as I have managed to get the enklaction answer working on TIO using Dyalog Classic as it gets the same byte count as APL+WIN. I have also modified the link to say (courtesy of Dyalog Classic) as I am piggybacking someone else's efforts.

last day (15 days later) »