Talk:Topological sort: Difference between revisions

m
→‎J implementation: fix <lang J> tags (now <syntaxhighlight lang=J>)
m (→‎J implementation: fix <lang J> tags (now <syntaxhighlight lang=J>))
 
(4 intermediate revisions by 2 users not shown)
Line 5:
These are brief notes, and do not attempt to document the language itself.
 
<langsyntaxhighlight lang=J>dependencySort=: monad define
parsed=. <@;:;._2 y
names=. {.&>parsed
Line 12:
assert.-.1 e. (<0 1)|:depends
(-.&names ~.;parsed),names /: +/"1 depends
)</langsyntaxhighlight>
 
<code>parsed</code> is a list of lines. Each line is a boxed list of words. Each word is a boxed list of characters.
Line 95:
Here's that alternate implementation. The algorithm remains unchanged -- I have just represented the dependencies using a different data structure.
 
<langsyntaxhighlight lang=J>depSort=: monad define
parsed=. <@;:;._2 y
names=. {.&>parsed
Line 102:
assert.-.1 e. (i.@# e.S:0"0 ])depends
(-.&names ~.;parsed),names /: #@> depends
)</langsyntaxhighlight>
 
In other words, instead of using a connection matrix, we use lists of name indices. In other words, the result of <code>names i.L:1 parsed</code> is
Line 152:
 
:: What about leaving it here, making sure some of the good notes above (i.e it's about more than just sorting) are in the task description as background (excuse me if they already are), and giving a redirect? Or perhaps just wait till the new SMW code is in and we can find it through sorting if we like. --[[User:Dgamey|Dgamey]] 03:02, 30 August 2011 (UTC)
 
== External link and Captcha problem ==
 
I am trying to add a Forth entry to the Topological sort page. Even if I just add the header for the Forth section to the Erlang section, the system tells me that I have added a new external link and I have to solve a captcha.
 
I first tried without JavaScript: After solving the picture puzzle, the captcha tells me to copy something to an empty box, but there is no empty box, only a filled box; and I also don't see a way to tell the system that I am done.
 
Then I tried with JavaScript enabled: I have to click on a box and it gives me the green check mark (in one case I had to solve a picture puzzle first), but the page is not saved yet. When I press "Save Page" again, I get another message about a new link and again a captcha.
 
I am not sure that this is the right place for such user-interface issues, but I did not find anything that looked more appropriate, and the problem about reporting new links that are not there seems to be specific to this page (it has not occured on other pages I edited).
 
: I have added a stub Forth entry to the page for you to fill in. (Thanks) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 21:44, 22 February 2016 (UTC)
 
Thanks, I have now added the content to the entry.
6,951

edits