Rosetta Code/Find unimplemented tasks: Difference between revisions

m
→‎{{header|Wren}}: Minor tidy and rerun
(Added Wren)
m (→‎{{header|Wren}}: Minor tidy and rerun)
(28 intermediate revisions by 14 users not shown)
Line 13:
{{libheader|AWS}}
Parsing XML with XMLAda from Adacore
<langsyntaxhighlight Adalang="ada">with Aws.Client, Aws.Messages, Aws.Response, Aws.Resources, Aws.Url;
with Dom.Readers, Dom.Core, Dom.Core.Documents, Dom.Core.Nodes, Dom.Core.Attrs;
with Input_Sources.Strings, Unicode, Unicode.Ces.Utf8;
Line 135:
("Numbers of tasks not implemented :=" &
Integer'Image (Last_Index ((All_Tasks))));
end Not_Coded;</langsyntaxhighlight>
=={{header|ARM Assembly}}==
{{works with|as|Raspberry Pi <br> or android 32 bits with application Termux}}
<syntaxhighlight lang ARM Assembly>
/* ARM assembly Raspberry PI */
/* program tasksearchRasp.s */
/* access RosettaCode.org and data extract */
/* use openssl for access to port 443 */
/* test openssl : package libssl-dev */
 
/* REMARK 1 : this program use routines in a include file
see task Include a file language arm assembly
for the routine affichageMess conversion10
see at end of this program the instruction include */
 
/*******************************************/
/* Constantes */
/*******************************************/
.include "../constantes.inc"
 
//.equ EXIT, 1
.equ TAILLEBUFFER, 500
 
.equ SSL_OP_NO_SSLv3, 0x02000000
.equ SSL_OP_NO_COMPRESSION, 0x00020000
.equ SSL_MODE_AUTO_RETRY, 0x00000004
.equ SSL_CTRL_MODE, 33
 
.equ BIO_C_SET_CONNECT, 100
.equ BIO_C_DO_STATE_MACHINE, 101
.equ BIO_C_SET_SSL, 109
.equ BIO_C_GET_SSL, 110
 
.equ LGBUFFERREQ, 512001
.equ LGBUFFER2, 128001
 
/*********************************/
/* Initialized data */
/*********************************/
.data
szMessDebutPgm: .asciz "Program 32 bits start \n"
szRetourLigne: .asciz "\n"
szMessFinOK: .asciz "Program end OK. \n"
szMessErreur: .asciz "Erreur !!!"
//szMessExtractArea: .asciz "Extraction = "
szMessConnectOK: .asciz "Connexion site OK.\n"
szMessInitOK: .asciz "Initialisation SSL OK.\n"
szMessReqOK: .asciz "Send requete OK.\n"
szNomSite1: .asciz "www.rosettacode.org:443" @ host name and port
szLibStart: .asciz "<query><categorymembers>" @ search string
szLibsearch1: .asciz "<cm pageid="
szLibsearch2: .asciz "title="
szNomrepCertif: .asciz "/pi/certificats"
szRequete1: .asciz "GET /w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=1000&format=xml HTTP/1.1 \r\nHost: rosettacode.org\r\nConnection: keep-alive\r\nContent-Type: text/plain\r\n\r\n"
szRequete2: .asciz "GET /w/api.php?action=query&list=categorymembers&cmtitle=Category:ARM%20Assembly&cmlimit=500&format=xml HTTP/1.1 \r\nHost: rosettacode.org\r\nConnection: keep-alive\r\nContent-Type: text/plain\r\n\r\n"
 
/*********************************/
/* UnInitialized data */
/*********************************/
.bss
.align 4
sBufferreq: .skip LGBUFFERREQ
sBufferreq1: .skip LGBUFFERREQ
szExtractArea: .skip TAILLEBUFFER
szExtractArea1: .skip TAILLEBUFFER
szTaskName: .skip 128
szTaskNamePgm: .skip 128
.align 4
stNewSSL: .skip 200
/*********************************/
/* code section */
/*********************************/
.text
.global main
main:
ldr r0,iAdrszMessDebutPgm
bl affichageMess @ start message
 
/* connexion host port 443 and send query */
ldr r0,iAdrszNomSite1
ldr r1,iAdrszRequete1
ldr r2,iAdrsBufferreq
bl envoiRequete
cmp r0,#-1
beq 99f @ error ?
 
ldr r0,iAdrszNomSite1
ldr r1,iAdrszRequete2
ldr r2,iAdrsBufferreq1
bl envoiRequete
cmp r0,#-1
beq 99f @ error ?
 
bl analyseReponse
 
ldr r0,iAdrszMessFinOK @ end message
bl affichageMess
mov r0, #0 @ return code ok
b 100f
99:
ldr r0,iAdrszMessErreur @ error
bl affichageMess
mov r0, #1 @ return code error
b 100f
100:
mov r7,#EXIT @ program end
svc #0 @ system call
iAdrszMessDebutPgm: .int szMessDebutPgm
iAdrszMessFinOK: .int szMessFinOK
iAdrszMessErreur: .int szMessErreur
iAdrszNomSite1: .int szNomSite1
iAdrszRequete2: .int szRequete2
iAdrszRequete1: .int szRequete1
iAdrsBufferreq: .int sBufferreq
iAdrsBufferreq1: .int sBufferreq1
/*********************************************************/
/* connexion host port 443 and send query */
/*********************************************************/
envoiRequete:
push {r2-r9,lr} @ save registers
mov r8,r0 @ save address site name
mov r9,r1 @ save address requete
mov r7,r2 @ save address buffer
@*************************************
@ openSsl functions use *
@*************************************
@init ssl
mov r0,#0
bl OPENSSL_init_crypto
bl ERR_load_BIO_strings
mov r2, #0
mov r1, #0
mov r0, #2
bl OPENSSL_init_crypto
mov r2, #0
mov r1, #0
mov r0, #0
bl OPENSSL_init_ssl
cmp r0,#0
blt erreur
bl TLS_client_method
bl SSL_CTX_new
cmp r0,#0
ble erreur
mov r6,r0 @ save ctx
ldr r1,iFlag
bl SSL_CTX_set_options
mov r0,r6
mov r1,#0
ldr r2,iAdrszNomrepCertif
bl SSL_CTX_load_verify_locations
cmp r0,#0
ble erreur
mov r0,r6
bl BIO_new_ssl_connect
cmp r0,#0
beq erreur
cmp r0,#-1
beq erreur
mov r5,r0 @ save bio
ldr r0,iAdrszMessInitOK
bl affichageMess
mov r0,r5
mov r1,#BIO_C_GET_SSL
mov r2,#0
ldr r3,iAdrstNewSSL
bl BIO_ctrl
ldr r0,iAdrstNewSSL
ldr r0,[r0]
mov r1,#SSL_CTRL_MODE
mov r2,#SSL_MODE_AUTO_RETRY
mov r3,#0
bl SSL_ctrl
mov r0,r5 @ bio
mov r1,#BIO_C_SET_CONNECT
mov r2,#0
mov r3,r8 @ site address
bl BIO_ctrl
mov r0,r5 @ bio
mov r1,#BIO_C_DO_STATE_MACHINE
mov r2,#0
mov r3,#0
bl BIO_ctrl
cmp r0,#0
blt erreur
ldr r0,iAdrszMessConnectOK
bl affichageMess
@ compute query length
mov r2,#0 @ init length
mov r1,r9 @ query address
1: @ loop compute length query
ldrb r0,[r1,r2]
cmp r0,#0
addne r2,#1
bne 1b
@ send query
mov r0,r5 @ bio
@ r1 = address query
@ r2 = length query
mov r3,#0
bl BIO_write @ send query
cmp r0,#0
blt erreur
ldr r0,iAdrszMessReqOK
bl affichageMess
2: @ begin loop to read datas
mov r0,r5 @ bio
mov r1,r7 @ buffer address
mov r2,#LGBUFFERREQ - 1
mov r3,#0
bl BIO_read
cmp r0,#0
ble 4f @ error ou pb server
mov r1,r7
add r7,r0
sub r2,r7,#6
ldr r2,[r2]
ldr r3,iCharEnd
cmp r2,r3 @ text end ?
beq 4f
mov r1,#0xFF @ delay loop
3:
subs r1,#1
bgt 3b
b 2b @ loop read other chunk
4: @ read end
//ldr r0,iAdrsBufferreq @ to display buffer response of the query
//bl affichageMess
mov r0, r5 @ close bio
bl BIO_free_all
mov r0,#0
b 100f
erreur: @ error display
ldr r1,iAdrszMessErreur
bl afficheerreur
mov r0,#-1 @ error code
b 100f
100:
pop {r2-r9,pc} @ restaur registers
iFlag: .int SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION
iAdrstNewSSL: .int stNewSSL
iAdrszNomrepCertif: .int szNomrepCertif
iCharEnd: .int 0x0A0D300A
iAdrszMessConnectOK: .int szMessConnectOK
iAdrszMessInitOK: .int szMessInitOK
iAdrszMessReqOK: .int szMessReqOK
/*********************************************************/
/* response analyze */
/*********************************************************/
analyseReponse:
push {r1-r6,lr} @ save registers
@ search start in task buffer
ldr r0,iAdrsBufferreq @ buffer address
mov r7,r0
ldr r1,iAdrszLibStart @ key text address
bl rechercheSousChaine
cmp r0,#-1
beq 99f
add r7,r7,r0 @ new search buffer address
mov r0,r7
@ search start in task buffer
ldr r0,iAdrsBufferreq11 @ buffer address
mov r5,r0
ldr r1,iAdrszLibStart @ key text address
bl rechercheSousChaine
cmp r0,#-1
beq 99f @ error ?
add r5,r5,r0
mov r0,r5
1: @ loop begin to find task in program buffer
mov r0,r5
ldr r1,iAdrszLibsearch1 @ text code task address
mov r2,#1 @ occurence key text
mov r3,#2 @ offset
ldr r4,iAdrszExtractArea1 @ address result area
bl extChaine
cmp r0,#-1
beq 99f @ error ?
mov r5,r0 @ new address to search
ldr r0,iAdrszExtractArea1
bl conversionAtoD @ conversion code task to numeric
mov r10,r0 @ save numeric code
mov r0,r5 @ search task name in pgm buffer @
ldr r1,iAdrszLibsearch2 @ key text address
mov r2,#1 @ occurence key text
mov r3,#2 @ offset
ldr r4,iAdrszTaskNamePgm @ address result area
bl extChaine
cmp r0,#-1
beq 99f
mov r5,r0 @ new address to search
2: @ loop search buffer tasks
mov r0,r7
ldr r1,iAdrszLibsearch1 @ key text address
mov r2,#1 @ occurence key text
mov r3,#2 @ offset
ldr r4,iAdrszExtractArea @ address result area
bl extChaine
cmp r0,#-1
beq 99f
mov r7,r0
mov r0,r7
ldr r1,iAdrszLibsearch2 @ key text address
mov r2,#1 @ occurence key text
mov r3,#2 @ offset
ldr r4,iAdrszTaskName @ address result area
bl extChaine
cmp r0,#-1
beq 99f
mov r7,r0 @ new search address in task buffer
ldr r0,iAdrszExtractArea
bl conversionAtoD @ conversion code task in numeric
cmp r10,r0 @ compere two task code
beq 10f @ search next codes if equals
ldr r0,iAdrszTaskName @ else display task name
bl affichageMess
ldr r0,iAdrszRetourLigne
bl affichageMess
add r0,r7,#4 @ search if end of task list
ldrb r2,[r0]
cmp r2,#'/'
bne 2b @ no -> loop
add r0,#1
ldrb r2,[r0]
cmp r2,#'c'
bne 2b @ no -> loop
b 100f @ yes -> list end
10:
add r0,r5,#4 @ search if end of pgm task list
ldrb r2,[r0]
cmp r2,#'/'
bne 1b
add r0,#1
ldrb r2,[r0]
cmp r2,#'c'
bne 1b
 
b 100f @ list pgm end
99:
ldr r0,iAdrszMessErreur1 @ error
bl affichageMess
mov r0, #-1 @ error return code
b 100f
100:
pop {r1-r6,pc} @ restaur registers
iAdrsBufferreq11: .int sBufferreq1
iAdrszLibStart: .int szLibStart
iAdrszLibsearch1: .int szLibsearch1
iAdrszLibsearch2: .int szLibsearch2
iAdrszTaskName: .int szTaskName
iAdrszTaskNamePgm: .int szTaskNamePgm
iAdrszExtractArea: .int szExtractArea
iAdrszExtractArea1: .int szExtractArea1
iAdrszRetourLigne: .int szRetourLigne
iAdrszMessErreur1: .int szMessErreur
/*********************************************************/
/* Text Extraction behind text key */
/*********************************************************/
/* r0 buffer address */
/* r1 key text to search */
/* r2 number occurences to key text */
/* r3 offset */
/* r4 result address */
extChaine:
push {r2-r8,lr} @ save registers
mov r5,r0 @ save buffer address
mov r6,r1 @ save key text
@ compute text length
mov r7,#0
1: @ loop
ldrb r0,[r5,r7] @ load a byte
cmp r0,#0 @ end ?
addne r7,#1 @ no -> loop
bne 1b
add r7,r5 @ compute text end
 
mov r8,#0
2: @ compute length text key
ldrb r0,[r6,r8]
cmp r0,#0
addne r8,#1
bne 2b
 
3: @ loop to search nième(r2) key text
mov r0,r5
mov r1,r6
bl rechercheSousChaine
cmp r0,#0
blt 100f
subs r2,#1
addgt r5,r0
addgt r5,r8
bgt 3b
add r0,r5 @ add address text to index
add r3,r0 @ add offset
sub r3,#1
@ and add length key text
add r3,r8
cmp r3,r7 @ > at text end
movge r0,#-1 @ yes -> error
bge 100f
mov r0,#0
4: @ character loop copy
ldrb r2,[r3,r0]
strb r2,[r4,r0]
cmp r2,#0 @ text end ?
moveq r0,#0 @ return zero
beq 100f
cmp r2,#'"' @ text end ?
beq 5f
cmp r0,#48 @ extraction length
beq 5f
add r0,#1
b 4b @ and loop
5:
mov r2,#0 @ store final zéro
strb r2,[r4,r0]
add r0,#1
add r0,r3 @ r0 return the last position of extraction
@ it is possible o search another text
100:
pop {r2-r8,pc} @ restaur registers
 
/******************************************************************/
/* search substring in string */
/******************************************************************/
/* r0 contains address string */
/* r1 contains address substring */
/* r0 return start index substring or -1 if not find */
rechercheSousChaine:
push {r1-r6,lr} @ save registers
mov r2,#0 @ index position string
mov r3,#0 @ index position substring
mov r6,#-1 @ search index
ldrb r4,[r1,r3] @ load first byte substring
cmp r4,#0 @ zero final ?
moveq r0,#-1 @ error
beq 100f
1:
ldrb r5,[r0,r2] @ load string byte
cmp r5,#0 @ zero final ?
moveq r0,#-1 @ yes -> not find
beq 100f
cmp r5,r4 @ compare character two strings
beq 2f
mov r6,#-1 @ not equal - > raz index
mov r3,#0 @ and raz byte counter
ldrb r4,[r1,r3] @ and load byte
add r2,#1 @ and increment byte counter
b 1b @ and loop
2: @ characters equal
cmp r6,#-1 @ first character equal ?
moveq r6,r2 @ yes -> start index in r6
add r3,#1 @ increment substring counter
ldrb r4,[r1,r3] @ and load next byte
cmp r4,#0 @ zero final ?
beq 3f @ yes -> search end
add r2,#1 @ else increment string index
b 1b @ and loop
3:
mov r0,r6 @ return start index substring in the string
100:
pop {r1-r6,pc} @ restaur registres
 
/***************************************************/
/* ROUTINES INCLUDE */
/***************************************************/
.include "../affichage.inc"
</syntaxhighlight>
{{Out}}
<pre>
Program 32 bits start
Initialisation SSL OK.
Connexion site OK.
Send requete OK.
Initialisation SSL OK.
Connexion site OK.
Send requete OK.
Abstract type
Accumulator factory
Active Directory/Connect
Active Directory/Search for a user
Active object
Add a variable to a class instance at runtime
Algebraic data types
</pre>
 
=={{header|AutoHotkey}}==
 
The GUI overkill version with comments.
<syntaxhighlight lang="autohotkey">
<lang AutoHotkey>
#NoEnv ; do not resolve environment variables (speed)
#SingleInstance force ; allow only one instance
Line 325 ⟶ 815:
ExitApp ; exit the script
Return
</syntaxhighlight>
</lang>
===Output===
Loads a list of all languages. Pick the language you would like to see the unimplemented tasks of, press the button, double click the selected task to launch in default browser. It will download the languages to file and redownload if older than 3 days (to save unnecessary bandwith).
 
[[Image:Ahk_find_unimplemented.png‎]]
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> SYS "LoadLibrary", "URLMON.DLL" TO U%
IF U% == 0 ERROR 100, "DLL not available in your OS"
SYS "GetProcAddress", U%, "URLDownloadToFileA" TO U%
 
Q$=CHR$34 : REM The quote
BlkSize%=256 * 1024 : REM 256k must be enough
DIM Blk% BlkSize% - 1 : REM Reserve memory block to load data into
 
PROCFetchData("Programming_Tasks")
 
REM Count number of tasks and declare and populate Task$() array.
P%=Blk%
REPEAT
I%=INSTR($$P%, "title")
IF I% Tasks%+=1 : P%+=I%
UNTIL I% == 0
DIM Task$(Tasks%-1)
P%=Blk%
FOR I%=0 TO Tasks% - 1
Task$(I%)=FNValue(P%, "title")
NEXT
 
PROCShowUnimplemented("BBC_BASIC")
PROCShowUnimplemented("C++")
END
 
REM -------------------------------------------------------------------------
REM Compare each task title against loaded language data in memory.
DEF PROCShowUnimplemented(language$)
LOCAL i%, j%, mem%, n%
 
PROCFetchData(language$)
mem%=Blk%
PRINT "Unimplemented tasks for the '" language$ "' programming language:"
FOR i%=0 TO Tasks% - 1
j%=INSTR($$mem%, Task$(i%))
IF j% THEN
mem%+=j%
ELSE
n%+=1
PRINT " -" Task$(i%)
ENDIF
NEXT
PRINT "Total is: ";n% '
ENDPROC
 
REM -------------------------------------------------------------------------
REM Stitch the pages for this category together in the memory block.
DEF PROCFetchData(category$)
LOCAL mem%, continue$, e%, f%, tempfile$, url$
 
tempfile$=@tmp$ + "result.json"
mem%=Blk%
REPEAT
url$="http://www.rosettacode.org/w/api.php?" +\
\ "action=query&list=categorymembers&cmtitle=Category:" + category$ +\
\ "&cmlimit=500&format=json&cmcontinue=" + continue$
SYS U%, 0, url$, tempfile$, 0, 0 TO e% : REM Get one page to a file
IF e% ERROR 100, "Can't get data from Rosetta API"
f%=OPENINtempfile$ : e%=EXT#f% : CLOSE#f% : REM Get file size
IF mem% - Blk% + e% > BlkSize% ERROR 100, "Insufficient memory to load data"
OSCLI "LOAD " + tempfile$ + " " + STR$~mem% : REM Append to previous
e%=mem% + e%
?e%=0 : REM Terminating 0x00
continue$=FNValue(mem%, "cmcontinue") : REM Loaded page contains this name?
mem%=e% : REM Advance memory pointer
UNTIL continue$ == ""
ENDPROC
 
REM -------------------------------------------------------------------------
REM Retrieve value for a JSON name from address p% and advance p% afterwards.
DEF FNValue(RETURN p%, name$)
LOCAL s%
 
name$=Q$ + name$ + Q$ + ":"
s%=INSTR($$p%, name$)
IF s% == 0 THEN =""
p%+=s% + LENname$
=LEFT$($$p%, INSTR($$p%, Q$) - 1)</syntaxhighlight>
{{out}}
<pre>
Unimplemented tasks for the 'BBC_BASIC' programming language:
-100 prisoners
-15 puzzle solver
-21 game
......
-Zhang-Suen thinning algorithm
-Zsigmondy numbers
-Zumkeller numbers
Total is: 697
 
Unimplemented tasks for the 'C++' programming language:
-Abelian sandpile model/Identity
-Achilles numbers
-Add a variable to a class instance at runtime
......
-Yahoo! search interface
-Zsigmondy numbers
-Zumkeller numbers
Total is: 172
</pre>
=={{header|C sharp|C#}}==
Using JSON (not parsed, just Regex.)
Line 336 ⟶ 930:
To help demonstrate paging, the cmlimit parameter has been omitted from the search query so that 10 rows are returned by default
 
<langsyntaxhighlight lang="csharp">using System;
using System.Collections.Generic;
using System.Linq;
Line 382 ⟶ 976:
foreach (string i in unimpl) Console.WriteLine(i);
}
}</langsyntaxhighlight>
 
=={{header|Clojure}}==
This uses a couple of core libraries, and a Java method for URL encoding.
<langsyntaxhighlight lang="clojure">(require
'[clojure.xml :as xml]
'[clojure.set :as set]
'[clojure.string :as string])
(import '[java.net URLEncoder])</langsyntaxhighlight>
 
The ''titles-cont'' function fetches and parses an XML response, and walks over it extracting titles. It also extracts the ''cmcontinue'' value, if present. Returns a pair ''[titles,cmcontinue]''.
<langsyntaxhighlight lang="clojure">(defn titles-cont [url]
(let [docseq (-> url xml/parse xml-seq)]
((juxt #(filter string? %), #(-> (filter map? %) first :cmcontinue))
Line 399 ⟶ 993:
(if (= tag :cm)
(attrs :title)
(-> content first :attrs))))))</langsyntaxhighlight>
 
The ''get-titles'' function has 1- and 2-argument versions. The former takes the name of a category, composes the appropriate URL query, and calls the 2-argument version. The 2-argument version gets a title list (with possible ''cmcontinue'' value), chaining further calls as necessary into the lazy sequence result.
<langsyntaxhighlight lang="clojure">(defn urlencode [s] (URLEncoder/encode s "UTF-8"))
(defn param [p v] (str p (urlencode v)))
 
Line 420 ⟶ 1,014:
(if continue
(lazy-cat titles (get-titles url continue))
titles))))</langsyntaxhighlight>
The ''unimplemented'' function gets a set of all titles and of language-implemented titles and returns the difference. It uses ''future'' in order to do the necessary URL requests in parallel.
<langsyntaxhighlight lang="clojure">(defn unimplemented [lang-name]
(let [title-set #(future (apply sorted-set (get-titles %)))
all-titles (title-set "Programming_Tasks")
Line 431 ⟶ 1,025:
(doseq [title titles] (println title))
(println "count: " (count titles)))
(shutdown-agents)</langsyntaxhighlight>
 
=={{header|E}}==
Line 437 ⟶ 1,031:
Using JSON.
 
<langsyntaxhighlight lang="e">#!/usr/bin/env rune
 
# NOTE: This program will not work in released E, because TermL is an
Line 443 ⟶ 1,037:
# If you build E from the latest source in SVN then it will work.
#
# Usage: rosettacode-cat-subtract.e [<langsyntaxhighlight lang="e">]
#
# Prints a list of tasks which have not been completed in the language.
Line 541 ⟶ 1,135:
# Whoops, something went wrong
stderr.println(`$p${p.eStack()}`)
}</langsyntaxhighlight>
 
=={{header|Erlang}}==
init_http/0 is used by many tasks. rosetta_code_list_of/1 is used by [[Rosetta_Code/Rank_languages_by_popularity]]
<syntaxhighlight lang="erlang">
<lang Erlang>
-module( find_unimplemented_tasks ).
-include_lib( "xmerl/include/xmerl.hrl" ).
Line 589 ⟶ 1,183:
xml_8211( 1052 ) -> $\s;
xml_8211( Character ) -> Character.
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 611 ⟶ 1,205:
=={{header|Go}}==
XML, stepping through the elements.
<langsyntaxhighlight lang="go">package main
 
import (
Line 684 ⟶ 1,278:
continueAt = req(taskQuery+"&cmcontinue="+continueAt, printUnImp)
}
}</langsyntaxhighlight>
 
=={{header|Haskell}}==
{{libheader|HTTP XML}} from [http://hackage.haskell.org/packages/hackage.html HackageDB]
 
<langsyntaxhighlight lang="haskell">import Network.Browser
import Network.HTTP
import Network.URI
Line 715 ⟶ 1,309:
xml = onlyElems $ parseXML allTasks
allxx = concatMap (map (fromJust.findAttr (unqual "title")). filterElementsName (== unqual "cm")) xml
mapM_ putStrLn $ sort $ allxx \\ langxx</langsyntaxhighlight>
 
With only standard libraries
<langsyntaxhighlight lang="haskell">import Network.HTTP
import Data.Text (splitOn, pack, unpack)
import Data.List
Line 732 ⟶ 1,326:
implTasks <- getTasks $ "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:" ++ lang ++ "&format=json&cmlimit=500"
allTasks <- getTasks "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&format=json&cmlimit=500"
mapM_ putStrLn $ allTasks \\ implTasks</langsyntaxhighlight>
 
=={{header|Icon}} and {{header|Unicon}}==
Line 738 ⟶ 1,332:
The following code only works in Unicon.
 
<langsyntaxhighlight lang="unicon">$define RCINDEX "http://rosettacode.org/mw/api.php?format=xml&action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500"
$define RCTASK "http://rosettacode.org/mw/index.php?action=raw&title="
$define RCUA "User-Agent: Unicon Rosetta 0.1"
Line 814 ⟶ 1,408:
close(page)
return text
end</langsyntaxhighlight>
 
Sample output (abridged):
Line 840 ⟶ 1,434:
=={{header|J}}==
'''Solution:'''
<langsyntaxhighlight lang="j">require 'strings web/gethttp'
 
findUnimpTasks=: ('Programming_Tasks' -.&getCategoryMembers ,&'/Omit') ([ #~ -.@e.) getCategoryMembers
Line 859 ⟶ 1,453:
uri=. url ,'?', buildqry urlencode y
catmbrs=. qrycont=. ''
whilst. #qrycont=. ,getCMcontquery jsondat do.
jsondat=. '-sL' gethttp uri , qrycont
catmbrs=. catmbrs, parseTitles jsondat
end.
catmbrs
)</langsyntaxhighlight>
 
Note that gethttp currently requires the '-sL' to follow redirects.
 
'''Example Usage:'''
<langsyntaxhighlight lang="j"> 4{. findUnimpTasks 'J' NB. get first 4 unimplemented tasks for J
┌────────────────┬────────────────────────┬──────────────────────────────────┬──────────────┐
+-------------+--------------+----------------+------------------------------+
│15 puzzle solver│Active Directory/Connect│Active Directory/Search for a user│Atomic updates│
|Active object|Atomic updates|Basic input loop|Call foreign language function|
└────────────────┴────────────────────────┴──────────────────────────────────┴──────────────┘</syntaxhighlight>
+-------------+--------------+----------------+------------------------------+</lang>
 
=={{header|JavaScript}}==
Line 878 ⟶ 1,474:
For the narrower context of a browser in which the 'not implemented' page has been fetched for a particular language, we can however, evaluate an XPath expression in JavaScript to generate an array of titles for the unimplemented tasks.
 
<langsyntaxhighlight JavaScriptlang="javascript">(function (strXPath) {
var xr = document.evaluate(
strXPath,
Line 900 ⟶ 1,496:
})(
'//*[@id="mw-content-text"]/div[2]/table/tbody/tr/td/ul/li/a'
);</langsyntaxhighlight>
 
Output begins with:
Line 932 ⟶ 1,528:
Find limit of recursion
...</pre>
 
=={{header|jq}}==
This script illustrates how jq interoperates with other command-line tools. It was tested in October, 2022
using both the C and Go implementations of jq.
 
The only pre-requisites other than bash are curl and jq, which is called at least five times.
 
<pre>
#!/bin/bash
# October 8, 2022
# https://rosettacode.org/w/index.php?title=Rosetta_Code/Find_unimplemented_tasks
 
# Syntax: $0 [--markdown] CATEGORY
 
# Fetch the Category:Programming_Tasks and Category:$category pages,
# then compute the differences in the lists of titles.
# If --markdown is specified, then some markdown suitable for RosettaCode.org is added.
 
BN=$(basename "$0")
JQ=jq
 
function die { echo "$BN: $@" >&2 ; exit 1 ; }
 
baseuri="https://rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:"
 
if [ "$1" = "--markdown" ] ; then
markdown="--argjson markdown true"
shift
else
markdown="--arg markdown false"
fi
 
category="$1"
test -z "$category" && die "Syntax: $0 [--markdown] CATEGORY"
 
for id in $category Programming_Tasks; do
id=/tmp/rosettacode.$id.titles.json
test -s "$id" && rm "$id"
done
 
function getall {
local cat="$1"
local cmcontinue="$2"
local tmpfile="/tmp/rosettacode.$cat.json.tmp"
# cmlimit=500 is the max allowed so use paging
curl -Ss "${baseuri}${cat}&format=json&cmlimit=500${cmcontinue}" > "$tmpfile"
if [ ! -s "$tmpfile" ] ; then return ; fi
 
$JQ '.query.categorymembers[].title' "$tmpfile" >> /tmp/rosettacode.$cat.titles.json
cmcontinue=$($JQ -r '.continue | if . then .cmcontinue else null end' "$tmpfile" )
 
if [ -z "$cmcontinue" -o "$cmcontinue" = "null" ] ; then return ; fi
echo $BN: fetching continuation page for $cat ...
getall "$cat" "&cmcontinue=$cmcontinue"
}
 
getall $category
getall Programming_Tasks
for id in $category Programming_Tasks; do
id=/tmp/rosettacode.$id.titles.json
test -s "$id" || die "unable to find $id"
done
 
$JQ -r -n $markdown --slurpfile tasks /tmp/rosettacode.Programming_Tasks.titles.json \
--slurpfile cat /tmp/rosettacode.$category.titles.json '
def mark: if $markdown then "* [[\(gsub(" ";"_"))|\(.)]]" else . end;
($tasks - $cat)[] | mark '
</pre>
 
=={{header|Julia}}==
<langsyntaxhighlight lang="julia">using HTTP, JSON
 
const baseuri = "http://www.rosettacode.org/mww/api.php?action=query&list=categorymembers&cmtitle=Category:"
const enduri = "&cmlimit=500&format=json"
queries(x) = baseuri * HTTP.Strings.escapehtml(x) * enduri
Line 967 ⟶ 1,632:
showunimp("Julia")
showunimp("C++")
</langsyntaxhighlight>{{out}}
<pre>
Unimplemented in Julia:
Line 1,092 ⟶ 1,757:
{{libheader|lua-requests}}
 
<langsyntaxhighlight lang="lua">local requests = require('requests')
local lang = arg[1]
 
Line 1,153 ⟶ 1,818:
for _, t in ipairs(open_tasks) do
io.write(string.format(' %s\n', t))
end</langsyntaxhighlight>
{{out}}
<pre>
Line 1,164 ⟶ 1,829:
 
=={{header|Maple}}==
<langsyntaxhighlight Maplelang="maple">#Example with the Maple Language
lan := "Maple":
x := URL:-Get(cat("http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_", StringTools:-SubstituteAll(lan, " ", "_")), output = content):
Line 1,172 ⟶ 1,837:
for problem in x do
printf("%s\n", StringTools:-SubstituteAll(StringTools:-Decode(StringTools:-StringSplit(problem, "\" title=")[1], 'percent'), "_", " "));
end do:</langsyntaxhighlight>
{{Out|Output}}
<pre>#10:09 AM 10/05/2018
Line 1,194 ⟶ 1,859:
=={{header|Mathematica}}/{{header|Wolfram Language}}==
Two implementations are considered, the first will use the API to get all the programming tasks, then the ones implemented for a certain language, and take the difference. The other will use the Tasks not implemented page and strip the html.
<langsyntaxhighlight Mathematicalang="mathematica">ClearAll[ImportAll]
ImportAll[lang_String] :=
Module[{data, continue, cmcontinue, extra, xml, next},
Line 1,214 ⟶ 1,879:
Cases[Flatten[data], HoldPattern["title" -> x_] :> x, \[Infinity]]
]
Complement[ImportAll["Programming_Tasks"], ImportAll["Mathematica"]]</langsyntaxhighlight>
which outputs a list of items not implemented:
{{out}}
<pre>{Abstract type,Active Directory/Connect,Active Directory/Search for a user,Address of a variable,<<139>>,Write to Windows event log,Xiaolin Wu's line algorithm,Zeckendorf arithmetic}</pre>
Another method is by getting the Tasks not implemented page:
<langsyntaxhighlight Mathematicalang="mathematica">url = "http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Mathematica";
html = Import[url, "XMLObject"];
pos = Position[html, XMLElement["div", {"class" -> "mw-content-ltr", "dir" -> "ltr", "lang" -> "en"}, ___]];
Line 1,231 ⟶ 1,896:
newb = data[[All, 1]];
data = Hyperlink @@@ data;
data // Column</langsyntaxhighlight>
{{out}}
<pre>Append a record to the end of a text file
Line 1,242 ⟶ 1,907:
 
=={{header|Nim}}==
<langsyntaxhighlight lang="nim">import httpclient, strutils, xmltree, xmlparser, cgi, os
 
 
Line 1,248 ⟶ 1,913:
 
var
name = "http://www.rosettacode.org/mww/api.php?action=query&list=categorymembers&cmtitle=Category:$#&cmlimit=500&format=xml" % encodeUrl(category)
cmcontinue = ""
client = newHttpClient()
Line 1,258 ⟶ 1,923:
 
cmcontinue.setLen(0)
for node in x.findAll("categorymemberscontinue"):
let u = node.attr("cmcontinue")
if u.len != 0: cmcontinue = u.encodeUrl()
Line 1,276 ⟶ 1,941:
for task in alltasks:
if task notin langTasks:
echo " ", task</langsyntaxhighlight>
 
{{out}}
Line 1,293 ⟶ 1,958:
 
By parsing XML and using an XPath-like mechanism:
<langsyntaxhighlight lang="oz">declare
[HTTPClient] = {Link ['x-ozlib://mesaros/net/HTTPClient.ozf']}
[XMLParser] = {Link ['x-oz://system/xml/Parser.ozf']}
Line 1,419 ⟶ 2,084:
in
%% show tasks not implemented in Oz
{ForAll {FindUnimplementedTasks "Oz"} System.showInfo}</langsyntaxhighlight>
 
=={{header|Perl}}==
<langsyntaxhighlight lang="perl">use LWP::UserAgent;
 
my $ua = LWP::UserAgent->new;
Line 1,432 ⟶ 2,097:
sub tasks {
my($category) = shift;
my $fmt = 'http://www.rosettacode.org/mww/api.php?' .
'action=query&generator=categorymembers&gcmtitle=Category:%s&gcmlimit=500&format=json&rawcontinue=';
my @tasks;
Line 1,445 ⟶ 2,110:
 
my %language = map {$_, 1} tasks shift || 'perl';
$language{$_} or print "$_\n" foreach tasks('Programming_Tasks'), tasks('Draft_Programming_Tasks');</langsyntaxhighlight>
 
'''See also:''' [[User:ImplSearchBot/Code]]
Line 1,454 ⟶ 2,119:
{{libheader|Phix/libcurl}}
{{trans|Go}}
<!--<syntaxhighlight lang="phix">(notonline)-->
<lang Phix>-- demo\rosetta\Find_unimplemented_tasks.exw
<span style="color: #000080;font-style:italic;">-- demo\rosetta\Find_unimplemented_tasks.exw</span>
constant language = "Phix",
<span style="color: #008080;">without</span> <span style="color: #008080;">js</span> <span style="color: #000080;font-style:italic;">-- (libcurl, file i/o, peek, progress..)</span>
base_query = "http://rosettacode.org/mw/api.php?action=query"&
<span style="color: #008080;">constant</span> <span style="color: #000000;">language</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"Phix"</span><span style="color: #0000FF;">,</span>
"&format=xml&list=categorymembers&cmlimit=100"
<span style="color: #000080;font-style:italic;">-- language = "Go",
 
-- language = "Julia",
include builtins\libcurl.e
-- language = "Python",
atom curl = NULL
-- language = "Wren",</span>
atom pErrorBuffer
<span style="color: #000000;">base_query</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"http://rosettacode.org/mw/api.php?action=query"</span><span style="color: #0000FF;">&</span>
include builtins\xml.e
<span style="color: #008000;">"&format=xml&list=categorymembers&cmlimit=100"</span>
 
function req(string url, integer rid)
if curl=NULL then
curl_global_init()
curl = curl_easy_init()
pErrorBuffer = allocate(CURL_ERROR_SIZE)
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, pErrorBuffer)
end if
curl_easy_setopt(curl, CURLOPT_URL, url)
object res = curl_easy_perform_ex(curl)
if integer(res) then
string error = sprintf("%d [%s]",{res,peek_string(pErrorBuffer)})
crash("Download error: %s\n",{error})
end if
if not string(res) then ?9/0 end if
object xml = xml_parse(res)[XML_CONTENTS]
res = xml_get_nodes(xml,"continue")
res = iff(res=={}?"":xml_get_attribute(res[1],"cmcontinue"))
xml = xml_get_nodes(xml,"query")[1]
xml = xml_get_nodes(xml,"categorymembers")[1]
xml = xml_get_nodes(xml,"cm")
for i=1 to length(xml) do
call_proc(rid,{xml_get_attribute(xml[i],"title")})
end for
return res
end function
 
sequence languages = {}
procedure store_lang(string language)
languages = append(languages,language)
end procedure
constant r_store_lang = routine_id("store_lang")
 
integer unimplemented_count = 0
procedure print_unimplemented(string language)
if not find(language,languages) then
printf(1,"%s\n",{language})
unimplemented_count += 1
end if
end procedure
constant r_print = routine_id("print_unimplemented")
 
procedure main()
-- get and store language members
string lang_query := base_query & "&cmtitle=Category:" & language,
continue_at := req(lang_query, r_store_lang)
while continue_at!="" do
continue_at = req(lang_query&"&cmcontinue="&continue_at, r_store_lang)
end while
<span style="color: #008080;">include</span> <span style="color: #000000;">builtins</span><span style="color: #0000FF;">\</span><span style="color: #000000;">libcurl</span><span style="color: #0000FF;">.</span><span style="color: #000000;">e</span>
-- a quick check to avoid long output
<span style="color: #004080;">atom</span> <span style="color: #000000;">curl</span> <span style="color: #0000FF;">=</span> <span style="color: #004600;">NULL</span>
if length(languages)==0 then
<span style="color: #004080;">atom</span> <span style="color: #000000;">pErrorBuffer</span>
printf(1,"no tasks implemented for %s\n", {language})
<span style="color: #008080;">include</span> <span style="color: #000000;">builtins</span><span style="color: #0000FF;">\</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">.</span><span style="color: #000000;">e</span>
return
end if
<span style="color: #008080;">function</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">url</span><span style="color: #0000FF;">,</span> <span style="color: #004080;">integer</span> <span style="color: #000000;">rid</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #000000;">curl</span><span style="color: #0000FF;">=</span><span style="color: #004600;">NULL</span> <span style="color: #008080;">then</span>
<span style="color: #7060A8;">curl_global_init</span><span style="color: #0000FF;">()</span>
<span style="color: #000000;">curl</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">curl_easy_init</span><span style="color: #0000FF;">()</span>
<span style="color: #000000;">pErrorBuffer</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">allocate</span><span style="color: #0000FF;">(</span><span style="color: #000000;">CURL_ERROR_SIZE</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">curl_easy_setopt</span><span style="color: #0000FF;">(</span><span style="color: #000000;">curl</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">CURLOPT_ERRORBUFFER</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">pErrorBuffer</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #7060A8;">curl_easy_setopt</span><span style="color: #0000FF;">(</span><span style="color: #000000;">curl</span><span style="color: #0000FF;">,</span> <span style="color: #004600;">CURLOPT_URL</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">url</span><span style="color: #0000FF;">)</span>
<span style="color: #004080;">object</span> <span style="color: #000000;">res</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">curl_easy_perform_ex</span><span style="color: #0000FF;">(</span><span style="color: #000000;">curl</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #004080;">integer</span><span style="color: #0000FF;">(</span><span style="color: #000000;">res</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">then</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">error</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">sprintf</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"%d [%s]"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">res</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">peek_string</span><span style="color: #0000FF;">(</span><span style="color: #000000;">pErrorBuffer</span><span style="color: #0000FF;">)})</span>
<span style="color: #7060A8;">crash</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"Download error: %s\n"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">error</span><span style="color: #0000FF;">})</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #008080;">if</span> <span style="color: #008080;">not</span> <span style="color: #004080;">string</span><span style="color: #0000FF;">(</span><span style="color: #000000;">res</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">then</span> <span style="color: #0000FF;">?</span><span style="color: #000000;">9</span><span style="color: #0000FF;">/</span><span style="color: #000000;">0</span> <span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #004080;">object</span> <span style="color: #000000;">xml</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">xml_parse</span><span style="color: #0000FF;">(</span><span style="color: #000000;">res</span><span style="color: #0000FF;">)[</span><span style="color: #000000;">XML_CONTENTS</span><span style="color: #0000FF;">]</span>
<span style="color: #000000;">res</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">xml_get_nodes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"continue"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">res</span> <span style="color: #0000FF;">=</span> <span style="color: #008080;">iff</span><span style="color: #0000FF;">(</span><span style="color: #000000;">res</span><span style="color: #0000FF;">=={}?</span><span style="color: #008000;">""</span><span style="color: #0000FF;">:</span><span style="color: #000000;">xml_get_attribute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">res</span><span style="color: #0000FF;">[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">],</span><span style="color: #008000;">"cmcontinue"</span><span style="color: #0000FF;">))</span>
<span style="color: #000000;">xml</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">xml_get_nodes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"query"</span><span style="color: #0000FF;">)[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]</span>
<span style="color: #000000;">xml</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">xml_get_nodes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"categorymembers"</span><span style="color: #0000FF;">)[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]</span>
<span style="color: #000000;">xml</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">xml_get_nodes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"cm"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">i</span><span style="color: #0000FF;">=</span><span style="color: #000000;">1</span> <span style="color: #008080;">to</span> <span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">do</span>
<span style="color: #7060A8;">call_proc</span><span style="color: #0000FF;">(</span><span style="color: #000000;">rid</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">xml_get_attribute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">xml</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">],</span><span style="color: #008000;">"title"</span><span style="color: #0000FF;">)})</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">for</span>
<span style="color: #008080;">return</span> <span style="color: #000000;">res</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
<span style="color: #008080;">function</span> <span style="color: #000000;">html_clean</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">ri</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`&quot;`</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`"`</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`&#039;`</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`'`</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"\xE2\x80\x99"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"'"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"\xC3\xB6"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"o"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%3A"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">":"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%E2%80%93"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"-"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%E2%80%99"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"'"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%27"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"'"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%2B"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"+"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%C3%A8"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"e"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%C3%A9"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"e"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%C3%B6"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"o"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%C5%91"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"o"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%22"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`"`</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">ri</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">substitute</span><span style="color: #0000FF;">(</span><span style="color: #000000;">ri</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%2A"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"*"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">return</span> <span style="color: #000000;">ri</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
<span style="color: #004080;">sequence</span> <span style="color: #000000;">titles</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{}</span>
<span style="color: #008080;">procedure</span> <span style="color: #000000;">store_title</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">title</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">titles</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">append</span><span style="color: #0000FF;">(</span><span style="color: #000000;">titles</span><span style="color: #0000FF;">,</span><span style="color: #000000;">title</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">procedure</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">unimplemented_count</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">0</span><span style="color: #0000FF;">,</span>
<span style="color: #000000;">task_count</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">0</span>
<span style="color: #008080;">procedure</span> <span style="color: #000000;">print_unimplemented</span><span style="color: #0000FF;">(</span><span style="color: #004080;">string</span> <span style="color: #000000;">title</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #008080;">not</span> <span style="color: #7060A8;">find</span><span style="color: #0000FF;">(</span><span style="color: #000000;">title</span><span style="color: #0000FF;">,</span><span style="color: #000000;">titles</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">then</span>
<span style="color: #000000;">title</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">html_clean</span><span style="color: #0000FF;">(</span><span style="color: #000000;">title</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%s\n"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">title</span><span style="color: #0000FF;">})</span>
<span style="color: #000000;">unimplemented_count</span> <span style="color: #0000FF;">+=</span> <span style="color: #000000;">1</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #000000;">task_count</span> <span style="color: #0000FF;">+=</span> <span style="color: #000000;">1</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">procedure</span>
<span style="color: #008080;">procedure</span> <span style="color: #000000;">main</span><span style="color: #0000FF;">()</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Loading implemented tasks list...\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #000080;font-style:italic;">-- get and store task itles</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">lang_query</span> <span style="color: #0000FF;">:=</span> <span style="color: #000000;">base_query</span> <span style="color: #0000FF;">&</span> <span style="color: #008000;">"&cmtitle=Category:"</span> <span style="color: #0000FF;">&</span> <span style="color: #000000;">language</span><span style="color: #0000FF;">,</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">:=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">lang_query</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">store_title</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">while</span> <span style="color: #000000;">continue_at</span><span style="color: #0000FF;">!=</span><span style="color: #008000;">""</span> <span style="color: #008080;">do</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">lang_query</span><span style="color: #0000FF;">&</span><span style="color: #008000;">"&cmcontinue="</span><span style="color: #0000FF;">&</span><span style="color: #000000;">continue_at</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">store_title</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">while</span>
<span style="color: #000080;font-style:italic;">-- a quick check to avoid long output</span>
<span style="color: #008080;">if</span> <span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">titles</span><span style="color: #0000FF;">)==</span><span style="color: #000000;">0</span> <span style="color: #008080;">then</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"no tasks implemented for %s\n"</span><span style="color: #0000FF;">,</span> <span style="color: #0000FF;">{</span><span style="color: #000000;">language</span><span style="color: #0000FF;">})</span>
<span style="color: #008080;">return</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<span style="color: #000080;font-style:italic;">-- get tasks, print as we go along</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Tasks:\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #004080;">string</span> <span style="color: #000000;">task_query</span> <span style="color: #0000FF;">:=</span> <span style="color: #000000;">base_query</span> <span style="color: #0000FF;">&</span> <span style="color: #008000;">"&cmtitle=Category:Programming_Tasks"</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">task_query</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">print_unimplemented</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">while</span> <span style="color: #000000;">continue_at</span><span style="color: #0000FF;">!=</span><span style="color: #008000;">""</span> <span style="color: #008080;">do</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">task_query</span><span style="color: #0000FF;">&</span><span style="color: #008000;">"&cmcontinue="</span><span style="color: #0000FF;">&</span><span style="color: #000000;">continue_at</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">print_unimplemented</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">while</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d unimplemented tasks found for %s.\n"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">unimplemented_count</span><span style="color: #0000FF;">,</span><span style="color: #000000;">language</span><span style="color: #0000FF;">})</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">full_tasks</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">unimplemented_count</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Draft tasks:\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #000000;">task_query</span> <span style="color: #0000FF;">:=</span> <span style="color: #000000;">base_query</span> <span style="color: #0000FF;">&</span> <span style="color: #008000;">"&cmtitle=Category:Draft_Programming_Tasks"</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">task_query</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">print_unimplemented</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">while</span> <span style="color: #000000;">continue_at</span><span style="color: #0000FF;">!=</span><span style="color: #008000;">""</span> <span style="color: #008080;">do</span>
<span style="color: #000000;">continue_at</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">req</span><span style="color: #0000FF;">(</span><span style="color: #000000;">task_query</span><span style="color: #0000FF;">&</span><span style="color: #008000;">"&cmcontinue="</span><span style="color: #0000FF;">&</span><span style="color: #000000;">continue_at</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">print_unimplemented</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">while</span>
<span style="color: #004080;">integer</span> <span style="color: #000000;">draft_tasks</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">unimplemented_count</span><span style="color: #0000FF;">-</span><span style="color: #000000;">full_tasks</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d unimplemented draft tasks found for %s.\n"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">draft_tasks</span><span style="color: #0000FF;">,</span><span style="color: #000000;">language</span><span style="color: #0000FF;">})</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d unimplemented tasks in total found for %s (out of %d).\n"</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">unimplemented_count</span><span style="color: #0000FF;">,</span><span style="color: #000000;">language</span><span style="color: #0000FF;">,</span><span style="color: #000000;">task_count</span><span style="color: #0000FF;">})</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">procedure</span>
-- get tasks, print as we go along
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span>
string task_query := base_query & "&cmtitle=Category:Programming_Tasks"
<!--</syntaxhighlight>-->
continue_at = req(task_query, r_print)
while continue_at!="" do
continue_at = req(task_query&"&cmcontinue="&continue_at, r_print)
end while
printf(1,"%d unimplemented tasks found for %s.\n",{unimplemented_count,language})
end procedure
main()</lang>
{{out}}
<pre>
Line 1,539 ⟶ 2,246:
 
=={{header|PicoLisp}}==
<langsyntaxhighlight PicoLisplang="picolisp">(load "@lib/http.l" "@lib/xm.l")
 
(de rosettaCategory (Cat)
Line 1,562 ⟶ 2,269:
(diff
(rosettaCategory "Programming_Tasks")
(rosettaCategory Task) ) )</langsyntaxhighlight>
 
=={{header|PowerShell}}==
I don't think this script follows the spirit of the task, but it works.
<syntaxhighlight lang="powershell">
<lang PowerShell>
function Find-UnimplementedTask
{
Line 1,587 ⟶ 2,294:
Select-String -Pattern "[^0-9A-Z]$" -CaseSensitive)
}
</syntaxhighlight>
</lang>
<syntaxhighlight lang="powershell">
<lang PowerShell>
$tasks = Find-UnimplementedTask -Language PowerShell
 
$tasks[0..5],".`n.`n.",$tasks[-6..-1]
Write-Host "`nTotal unimplemented Tasks: $($tasks.Count)"
</syntaxhighlight>
</lang>
{{Out}}
<pre>
Line 1,617 ⟶ 2,324:
=={{header|Python}}==
==={{libheader|mwclient}}===
<langsyntaxhighlight lang="python">"""
Given the name of a language on Rosetta Code,
finds all tasks which are not implemented in that language.
Line 1,649 ⟶ 2,356:
tasks = unimplemented_tasks('Python', url=URL, api_path=API_PATH)
print(*tasks, sep='\n')
</syntaxhighlight>
</lang>
 
==={{libheader|Requests}}===
<langsyntaxhighlight lang="python">"""
Given the name of a language on Rosetta Code,
finds all tasks which are not implemented in that language.
Line 1,710 ⟶ 2,417:
request_params=REQUEST_PARAMETERS)
print(*tasks, sep='\n')
</syntaxhighlight>
</lang>
 
==={{libheader|urllib}}===
====Python 2.x====
 
<langsyntaxhighlight lang="python">import xml.dom.minidom
import urllib, sys
Line 1,739 ⟶ 2,446:
for i in [i for i in alltasks if i not in lang]:
print i</langsyntaxhighlight>
 
====Python 3.x====
<syntaxhighlight lang="python">
#Aamrun, 3rd February 2023
 
import xml.dom.minidom
import sys, urllib.parse, urllib.request
def findrc(category):
name = "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:%s&cmlimit=500&format=xml" % urllib.parse.quote(category)
cmcontinue, titles = '', []
while True:
u = urllib.request.urlopen(name + cmcontinue)
xmldata = u.read()
u.close()
x = xml.dom.minidom.parseString(xmldata)
titles += [i.getAttribute("title") for i in x.getElementsByTagName("cm")]
cmcontinue = list(filter( None,
(urllib.parse.quote(i.getAttribute("cmcontinue"))
for i in x.getElementsByTagName("categorymembers")) ))
if cmcontinue:
cmcontinue = '&cmcontinue=' + cmcontinue[0]
else:
break
return titles
alltasks = findrc("Programming_Tasks")
lang = findrc(sys.argv[1])
for i in [i for i in alltasks if i not in lang]:
print(i)
</syntaxhighlight>
 
=={{header|R}}==
{{libheader|XML (R)}}
<langsyntaxhighlight Rlang="r">library(XML)
find.unimplemented.tasks <- function(lang="R"){
PT <- xmlInternalTreeParse( paste("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml",sep="") )
Line 1,758 ⟶ 2,497:
find.unimplemented.tasks(lang="Python")
langs <- c("R","python","perl")
sapply(langs, find.unimplemented.tasks) # fetching data for multiple languages</langsyntaxhighlight>
 
=={{header|Racket}}==
<syntaxhighlight lang="racket">
<lang Racket>
#lang racket
 
Line 1,789 ⟶ 2,528:
 
(show-unimplemented 'Racket) ; see all of the Racket entries
</syntaxhighlight>
</lang>
 
=={{header|Raku}}==
(formerly Perl 6)
{{works with|Rakudo|2018.04.1}}
<syntaxhighlight lang="raku" perl6line>use HTTP::UserAgent;
use URI::Escape;
use JSON::Fast;
Line 1,802 ⟶ 2,541:
 
my $client = HTTP::UserAgent.new;
my $url = 'httphttps://rosettacode.org/mww';
 
my @total;
Line 1,811 ⟶ 2,550:
 
say "Unimplemented tasks in $lang:";
.saymy for@unimplemented = (@total (-) @impl).keys.sort: *.&naturally;
.say for @unimplemented;
say "{+@unimplemented} unimplemented tasks";
 
sub get-cat ($category) {
Line 1,837 ⟶ 2,578:
}
 
sub uri-query-string (*%fields) { %fields.map({ "{.key}={uri-escape .value}" }).join("&") }</langsyntaxhighlight>
{{out}} ''As of Sept. 2, 2022''
<pre>Unimplemented tasks in Raku:
3d turtle graphics
15 puzzle game in 3D
Addition-chain exponentiation
Audio alarm
Audio frequency generator
Audio overlap loop
Binary coded decimal
Black box
Blackjack strategy
Boids
Catmull–Clark subdivision surface
Chess player
CLI-based maze-game
Compare sorting algorithms' performance
Compiler/AST interpreter
Compiler/Preprocessor
Compiler/syntax analyzer
Create an executable for a program in an interpreted language
Cross compilation
Cycles of a permutation
Diophantine linear system solving
Dominoes
Elevator simulation
Execute Computer/Zero
Free polyominoes enumeration
Generalised floating point multiplication
Hexapawn
Honeycombs
IRC gateway
Morpion solitaire
Number triplets game
OLE automation
OpenGL pixel shader
P-Adic square roots
Play recorded sounds
Red black tree sort
Remote agent/Agent interface
Remote agent/Agent logic
Remote agent/Simulation
Simple turtle graphics
Solve a Rubik's cube
Solving coin problems
Sorting algorithms/Tree sort on a linked list
Tamagotchi emulator
Tetris
Ukkonen’s suffix tree construction
Unicode polynomial equation
Uno (card game)
Use a REST API
Waveform analysis/Top and tail
Weather routing
WebGL rotating F
52 unimplemented tasks</pre>
 
=={{header|Ring}}==
<langsyntaxhighlight lang="ring">
# Project: Rosetta Code/Find unimplemented tasks
Line 1,900 ⟶ 2,696:
end
return sum
</syntaxhighlight>
</lang>
Output:
<pre>
Line 1,933 ⟶ 2,729:
 
Uses the <code>RosettaCode</code> module from [[Count programming examples#Ruby]]
<langsyntaxhighlight lang="ruby">require 'rosettacode'
require 'time'
 
Line 1,979 ⟶ 2,775:
]
end
</syntaxhighlight>
</lang>
 
Output for Ruby
Line 2,038 ⟶ 2,834:
Find tasks not implemented.
Select Language from DropDown and click [GO] or [Exit].
<langsyntaxhighlight lang="runbasic">WordWrap$ = "style='white-space: pre-wrap;white-space: -moz-pre-wrap;white-space: -pre-wrap;white-space: -o-pre-wrap;word-wrap: break-word'"
a$ = httpGet$("http://rosettacode.org/wiki/Category:Programming_Languages")
a$ = word$(a$,2,"mw-subcategories")
Line 2,080 ⟶ 2,876:
print "Total unImplemented Tasks:";c
[exit]
end</langsyntaxhighlight>
<table border=1>
<tr></tr>
Line 2,094 ⟶ 2,890:
 
=={{header|Rust}}==
<langsyntaxhighlight lang="rust">
use std::collections::{BTreeMap, HashSet};
 
Line 2,236 ⟶ 3,032:
}
}
</syntaxhighlight>
</lang>
{{out}}
<pre style="height: 32ex; overflow: scroll">
Line 2,594 ⟶ 3,390:
"com.softwaremill.sttp"%%"json4s"%"1.5.11")
 
<langsyntaxhighlight lang="scala">
import com.softwaremill.sttp.json4s._
import com.softwaremill.sttp.quick._
Line 2,621 ⟶ 3,417:
.foldRight(Set.empty[Task])((acc: Set[Task], ele: Set[Task]) => acc -- ele)
 
</syntaxhighlight>
</lang>
 
=={{header|Tcl}}==
Line 2,629 ⟶ 3,425:
 
{{tcllib|json}}{{tcllib|struct::set}}
<langsyntaxhighlight lang="tcl">package require Tcl 8.5
package require http
package require json
Line 2,727 ⟶ 3,523:
foreach lang {Perl Python Ruby Tcl} {
get_unimplemented $lang
}</langsyntaxhighlight>
 
=={{header|VBScript}}==
The program creates a dictionary with all tasks then adds the draft tasks to it then checks the language page and removes the tasks listed as implemented. At the end it prints a tab separed list of names and urls, ready to be cut and pasted in any spreadsheet. Changing the constant lang allows to check for other languages. Don't forget to run it with CScript!!
<syntaxhighlight lang="vb">
Set http= CreateObject("WinHttp.WinHttpRequest.5.1")
Set oDic = WScript.CreateObject("scripting.dictionary")
 
start="https://rosettacode.org"
Const lang="VBScript"
Dim oHF
 
gettaskslist "about:/wiki/Category:Programming_Tasks" ,True
print odic.Count
gettaskslist "about:/wiki/Category:Draft_Programming_Tasks",True
print "total tasks " & odic.Count
gettaskslist "about:/wiki/Category:"&lang,False
print "total tasks not in " & lang & " " &odic.Count & vbcrlf
For Each d In odic.keys
print d &vbTab & Replace(odic(d),"about:", start)
next
WScript.Quit(1)
 
Sub print(s):
On Error Resume Next
WScript.stdout.WriteLine (s)
If err= &h80070006& Then WScript.echo " Please run this script with CScript": WScript.quit
End Sub
 
Function getpage(name)
Set oHF=Nothing
Set oHF = CreateObject("HTMLFILE")
http.open "GET",name,False ''synchronous!
http.send
oHF.write "<html><body></body></html>"
oHF.body.innerHTML = http.responsetext
Set getpage=Nothing
End Function
 
Sub gettaskslist(b,build)
nextpage=b
While nextpage <>""
nextpage=Replace(nextpage,"about:", start)
WScript.Echo nextpage
getpage(nextpage)
Set xtoc = oHF.getElementbyId("mw-pages")
nextpage=""
For Each ch In xtoc.children
If ch.innertext= "next page" Then
nextpage=ch.attributes("href").value
': WScript.Echo nextpage
ElseIf ch.attributes("class").value="mw-content-ltr" Then
Set ytoc=ch.children(0)
'WScript.Echo ytoc.attributes("class").value '"mw-category mw-category-columns"
Exit For
End If
Next
For Each ch1 In ytoc.children 'mw-category-group
'WScript.Echo ">" &ch1.children(0).innertext &"<"
For Each ch2 In ch1.children(1).children '"mw_category_group".ul
Set ch=ch2.children(0)
If build Then
odic.Add ch.innertext , ch.attributes("href").value
else
if odic.exists(ch.innertext) then odic.Remove ch.innertext
End if
'WScript.Echo ch.innertext , ch.attributes("href").value
Next
Next
Wend
End Sub
 
</syntaxhighlight>
{{out}}
<small>
<pre>
15 puzzle solver https://rosettacode.org/wiki/15_puzzle_solver
2048 https://rosettacode.org/wiki/2048
21 game https://rosettacode.org/wiki/21_game
24 game https://rosettacode.org/wiki/24_game
24 game/Solve https://rosettacode.org/wiki/24_game/Solve
4-rings or 4-squares puzzle https://rosettacode.org/wiki/4-rings_or_4-squares_puzzle
9 billion names of God the integer https://rosettacode.org/wiki/9_billion_names_of_God_the_integer
Abbreviations, easy https://rosettacode.org/wiki/Abbreviations,_easy
.....
</pre>
</small>
 
=={{header|Wren}}==
Line 2,733 ⟶ 3,616:
{{libheader|Wren-pattern}}
An embedded program so we can use the libcurl library.
<syntaxhighlight lang="wren">/* Rosetta_Code_Find_unimplemented_tasks.wren */
<lang ecmascript>/* rc_find_unimplemented_tasks.wren */
 
import "./pattern" for Pattern
Line 2,774 ⟶ 3,657:
 
var findTasks = Fn.new { |category|
var url = "https://www.rosettacode.org/mww/api.php?action=query&list=categorymembers&cmtitle=Category:%(category)&cmlimit=500&format=xml"
var cmcontinue = ""
var tasks = []
Line 2,802 ⟶ 3,685:
for (task in tasks2) {
if (!langTasks.contains(task)) System.print(" " + task)
}</langsyntaxhighlight>
<br>
which we embed in the following C program, build and run.
<langsyntaxhighlight lang="c">/* gcc rc_find_unimplemented_tasksRosetta_Code_Find_unimplemented_tasks.c -o rc_find_unimplemented_tasksRosetta_Code_Find_unimplemented_tasks -lcurl -lwren -lm */
 
#include <stdio.h>
Line 2,979 ⟶ 3,862:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "rc_find_unimplemented_tasksRosetta_Code_Find_unimplemented_tasks.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
Line 2,995 ⟶ 3,878:
free(script);
return 0;
}</langsyntaxhighlight>
 
{{out}}
Manually updated to exclude this one :)
<pre>
Unimplemented 'full' tasks in Wren:
Chat server
Distributed programming
Joystick position
OLE automation
Retrieve and search chat history
Rosetta Code/Fix code tags
Rosetta Code/Rank languages by number of users
Rosetta Code/Rank languages by popularity
Send email
Window management
Yahoo! search interface
 
Unimplemented 'draft' tasks in Wren:
Continued fraction convergents
Greed
IPC via named pipe
IRC gateway
Recursive descent parser generator
Remote agent/Agent interface
Remote agent/Agent logic
Remote agent/Simulation
Robots
Rosetta Code/List authors of task descriptions
Rosetta Code/Run examples
Rosetta Code/Tasks without examples
Tetris
Uno (Card Game)
URL shortener
User defined pipe and redirection operators
Using the Meetup.com API
WiktionaryDumps to words
</pre>
 
=={{header|zkl}}==
Uses shared libraries YAJL and cURL.
<langsyntaxhighlight lang="zkl">var [const] YAJL=Import("zklYAJL")[0], CURL=Import("zklCurl");
 
fcn getTasks(language){
Line 3,055 ⟶ 3,910:
}
 
allTasks:=getTasks.future("Programming_Tasks"); // thread</langsyntaxhighlight>
<langsyntaxhighlight lang="zkl">language:="zkl";
tasks:=getTasks(language);
langTasks:=Dictionary(); tasks.pump(Void,langTasks.add.fp1(Void));
Line 3,062 ⟶ 3,917:
println("Found %d unimplemented tasks for %s:"
.fmt(unimplementedTasks.len(1),language));
unimplementedTasks.pump(Console.println);</langsyntaxhighlight>
{{out}}
<pre>
9,476

edits