RosettaCodeUnimplemented.frink

Download or view RosettaCodeUnimplemented.frink in plain text format



/** This looks at the Rosetta Code list of "pages with the most categories"
    and finds the tasks that do or don't have Frink implementations. */


url = "https://rosettacode.org/w/index.php?title=Special:MostCategories&limit=1000&offset=0"

file = read[url]
// DUDE, I couldn't figure out why this didn't match but there's a hidden
// couple of Unicode right-to-left and then left-to-right markers before the
// (123 categories) part.  Nuckin futs.
// \u200f\u200e (63 categories)

printPreamble[]
println["<TABLE BORDER=1>"]
for [url, title, text, count] = file =~ %r/<li><a href="(.*?)" title="(.*?)">(.*?)<\/a>.*?\((\d+) categories\)/igm
{
   print["<TR>"]
   newURL = url["https://rosettacode.org/", url]
   print["<TD><A HREF=\"$newURL\" TARGET=\"_blank\">$title</A><TD>$count"]
   body = read[newURL]
   if body =~ %r/Frink/i
      print["<TD><A HREF=\"$newURL#Frink\" TARGET=\"_blank\">Frink</A>"]

   println[]
}
println["</TABLE>"]
printPostamble[]

printPreamble[] :=
{
   print["""<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<HTML LANG="en">
 <HEAD>
  <TITLE>Rosetta Code Solutions in Frink</TITLE>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
  <META HTTP-EQUIV="Default-Style" CONTENT="APE Airy">
  <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
  <LINK REL="StyleSheet" HREF="apeairy.css" TYPE="text/css"
   TITLE="APE Airy">
  <LINK REL="Alternate StyleSheet" HREF="spaceship.css" TYPE="text/css"
        TITLE="Spaceship">
  <LINK REL="Alternate StyleSheet" HREF="style.css" TYPE="text/css"
        TITLE="APE Classic">
  <LINK REL="Alternate StyleSheet" HREF="style2.css" TYPE="text/css"
        TITLE="Compact" MEDIA="screen,print">
  <LINK REL="icon" HREF="images/futureboyicon.png" TYPE="image/png">
  <LINK REL="canonical" HREF="https://frinklang.org/">
 </HEAD>
 
 <BODY>
   <H1>Rosetta Code Solutions in Frink</H1>
  <P CLASS="CENTER">
   <A HREF="whatsnew.html">What's&nbsp;New</A> *
   <A HREF="faq.html">FAQ</A> *
   <A HREF="#JavaWebStart">Download</A> *
   <A HREF="FrinkApplet.html">Frink&nbsp;Applet</A> *
   <A HREF="/fsp/frink.fsp">Web&nbsp;Interface</A> *
   <A HREF="/fsp/samples.fsp">Sample&nbsp;Programs</A> *
   <A HREF="fspdocs.html">Frink&nbsp;Server&nbsp;Pages</A> *
   <A HREF="android.html">Frink&nbsp;on&nbsp;Android</A> *
   <A HREF="donate.html">Donate</A>
  </P>

   <P>The following are the most-solved problems on <A HREF="https://rosettacode.org/">Rosetta Code</A> with links to solutions in Frink.</P>
"""]
}

printPostamble[] :=
{
   print["""<HR>
  <P>
   Please send comments or questions to
   <A HREF="mailto:eliasen@mindspring.com">Alan Eliasen</A>.
  </P>
 </BODY>
</HTML>"""]
}


Download or view RosettaCodeUnimplemented.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20217 days, 23 hours, 19 minutes ago.