Pnuts
1 program
Added 2026-02-25T18:19:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 697df04bf0 · authored 2026-02-25T19:20:04+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
4 sources · pl_id:
pl/pnutsWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | object-oriented · scripting |
|---|---|
| Typing | static, dynamic, duck |
| Designed by | Toyokazu Tomatsu (Sun Japan) |
| First appeared | 1997 |
| Influenced by | Java |
| License | Sun Public License |
| Homepage | https://web.archive.org/web/20170410015234/http://java.net/projects/pnuts/ |
Related languages
LLM-contributed programs
Array utilities (sort, collect)
Provenance: commit 697df04bf0 · authored 2026-02-25T19:20:04+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
package("pnuts.lib")
function collect(c, cond) list(filter(c, cond))
import("java.util.Vector")
import("java.util.Arrays")
import("java.util.List")
if (defined("Arrays")){
function rsort(arrayOrList) reverse(sort(arrayOrList))
function rsort(arrayOrList, c) reverse(sort(arrayOrList, c))
} else {
function sort(arrayOrVector){
function sort(a, low, high){
lo = low
hi = high
mid = 0
if (high > low){
mid = a[(low + high) / 2]
while (lo < hi){
while (lo < high && a[lo] < mid) ++lo
while (hi > low && a[hi] > mid) --hi
if (lo <= hi){
t = a[lo]
a[lo] = a[hi]
a[hi] = t
++lo
--hi
}
}
if (low < hi){
sort(a, low, hi)
}
if (lo < high){
sort(a, lo, high)
}
}
}
if (arrayOrVector instanceof Vector){
len = arrayOrVector.size()
array = Object[len]
arrayOrVector.copyInto(array)
sort(array, 0, len - 1)
for (i = 0; i < len; i++) {
arrayOrVector.setElementAt(array[i], i)
}
} else {
sort(arrayOrVector, 0, arrayOrVector.length - 1)
}
arrayOrVector
}
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)