Nu map from imperative languages

The idea behind this table is to help you understand how Nu built-ins and plugins relate to imperative languages. We've tried to produce a map of programming-relevant Nu commands and what their equivalents are in other languages. Contributions are welcome.

Note: this table assumes Nu 0.43 or later.

NushellPythonKotlin (Java)C++Rust
appendlist.append, set.addaddpush_back, emplace_backpush, push_back
math avgstatistics.mean
calc, = mathmath operatorsmath operatorsmath operatorsmath operators
countlensize, lengthlengthlen
cpshutil.copy
datedatetime.date.todayjava.time.LocalDate.now
droplist[:-3]
dushutil.disk_usage
eachforforforfor
exitexitSystem.exit, kotlin.system.exitProcessexitexit
fetchurllib.request.urlopen
firstlist[:x]List[0], peekvector[0], topVec[0]
formatformatformatformatformat!
fromcsv, json, sqlite3
getdict["key"]Map["key"]map["key"]HashMap["key"], get, entry
group-byitertools.groupbygroupBygroup_by
headerskeys
helphelp
insertdict["key"] = val
is-emptyis None, is []isEmptyemptyis_empty
takelist[:x]&Vec[..x]
take untilitertools.takewhile
take whileitertools.takewhile
killos.kill
lastlist[-x:]&Vec[Vec.len()-1]
linessplit, splitlinessplitviews::splitsplit, split_whitespace, rsplit, lines
lsos.listdir
matchre.findallRegex.matchesregex_match
mergedict.append
mkdiros.mkdir
mvshutil.move
getlist[x]List[x]vector[x]Vec[x]
openopen
transposezip(*matrix)
posturllib.request.urlopen
prependdeque.appendleft
printprintprintlnprintfprintln!
psos.listdir('/proc')
pwdos.getcwd
rangerange.., until, downTo, stepiota..
reducefunctools.reducereducereducefold, rfold, scan
rejectdel
renameshutil.move
reversereversed, list.reversereverse, reversed, asReversedreverserev
rmos.remove
saveio.TextIOWrapper.write
select{k:dict[k] for k in keys}
shufflerandom.shuffle
sizelen
skiplist[x:]&Vec[x..],skip
skip untilitertools.dropwhile
skip whileitertools.dropwhileskip_while
sort-bysorted, list.sortsortedBy, sortedWith, Arrays.sort, Collections.sortsortsort
split rowstr.split{,lines}, re.splitsplitviews::splitsplit
strstr functionsString functionsstring functions&str, String functions
str joinstr.joinjoinToStringjoin
str trimstrip, rstrip, lstriptrim, trimStart, trimEndregextrim, trim*{start,end}, strip*{suffix,prefix}
sumsumsumreducesum
syssys
toimport csv, json, sqlite3
touchopen(path, 'a').close()
uniqsetSetsetHashSet
upsertdict["key"] = val
versionsys.version, sys.version_info
with-envos.environ
wherefilterfilterfilterfilter
whichshutil.which
wrap{ "key" : val }