basilisp-lang / basilisp

A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+
https://basilisp.readthedocs.io
Eclipse Public License 1.0
199 stars 4 forks source link

Missing core functions/macros #375

Open chrisrink10 opened 5 years ago

chrisrink10 commented 5 years ago

Vars

To Be Added

Function groups for which no specific ticket was yet filed and which still have not been added.

Chunking

chunk
chunk-append
chunk-buffer
chunk-cons
chunk-first
chunk-next
chunk-rest
chunked-seq?

Hashes

hash-combine
hash-ordered-coll
hash-unordered-coll
mix-collection-hash

Printing

print-ctor
print-dup
print-method
print-simple

Regex

re-groups
re-matcher

Structs

accessor
create-struct
defstruct
struct
struct-map

Unclassified

*allow-unresolved-vars*
*command-line-args*
*default-data-reader-fn*
*file*
*flush-on-newline*
*fn-loader*
*print-namespace-maps*
*read-eval*
*reader-resolver*
*source-path*
*suppress-read*
*verbose-defrecords*
-reset-methods
==
char-escape-string
char-name-string
comparator
compare
compile
find-keyword
fnil
inst-ms
inst-ms*
inst?
list*
memoize
num
rationalize
read-line
reader-conditional
reader-conditional?
run!
seque
simple-ident?
slurp
sorted?
spit
tagged-literal
tagged-literal?
test
unsigned-bit-shift-right
uri?
vector-of
with-precision

Clojure Specific

This section includes Vars which are probably Clojure (or implementation) specific which are likely not going to be added in Basilisp.

*clojure-version*
*compile-files*
*compile-path*
*compiler-options*
*math-context*
*unchecked-math*
*use-context-classloader*
*warn-on-reflection*
->ArrayChunk
->Eduction
->Vec
->VecNode
->VecSeqInst
PrintWriter-on
StackTraceElement->vec
Throwable->map
EMPTY-NODE
add-classpath
await1
bean
clojure-version
locking
method-sig
primitives-classnames
read+string
resultset-seq
with-loading-context

Added

Function groups which were added and filed as part of this ticket.

Associative (#404)

assoc-in
find
get-in
update-in

Atoms (#399)

reset-vals!
swap-vals!

Exceptions (#397)

*1
*2
*3
*e
ex-cause
ex-data
ex-message

Macroexpansion (#394)

macroexpand
macroexpand-1

Namespace (#405)

all-ns
find-ns
find-var
intern
ns-name
ns-unalias
ns-unmap
refer-clojure
remove-ns

Random (#402)

rand
rand-int
rand-nth
random-sample
shuffle

Strings (#401)

format
munge
namespace-munge
newline
printf
with-in-str

Vars (#405)

alter-var-root
pop-thread-bindings
push-thread-bindings
thread-bound?
var-get
var-set

Filed in Other Tickets

Function groups for which a separate, independent ticket was filed.

Agents (filed as #413)

*agent*
add-watch
agent
agent-error
agent-errors
await
await-for
clear-agent-errors
error-handler
error-mode
get-validator
release-pending-sends
remove-watch
restart-agent
send
send-off
send-via
set-agent-send-executor!
set-agent-send-off-executor!
set-error-handler!
set-error-mode!
set-validator!
shutdown-agents

Arrays (filed as #414)

aclone
aget
alength
amap
areduce
aset
aset-boolean
aset-byte
aset-char
aset-double
aset-float
aset-int
aset-long
aset-short
boolean-array
byte-array
char-array
double-array
float-array
int-array
into-array
long-array
make-array
object-array
short-array
to-array
to-array-2d

Collection functions (filed as #415)

butlast
counted?
dedupe
distinct
empty
empty?
flatten
fnext
frequencies
nfirst
nnext
not-empty
peek
pop
replace
reverse
reversible?
rseq
rsubseq
sequence
sequential?
subseq
subvec
zipmap

Control Structures (filed as #430)

*assert*
..
assert
case
doall
dorun
doseq
dotimes
doto
for
when-first
while
with-open

Data Structures (filed as #416)

array-map
sorted-map
sorted-map-by
sorted-set
sorted-set-by

def-like constructs (filed as #417)

declare
definline
defn-
defonce

Futures (filed as #418)

future
future-call
future-cancel
future-cancelled?
future-done?
future?
pcalls
pmap
pvalues

Hierarchies (and Types) (filed as #419)

ancestors
bases
cast
class
derive
descendants
gen-class
isa?
make-hierarchy
parents
subs
supers
type
underive

Higher Order Functions (filed as #420)

every-pred
filterv
interleave
keep
keep-indexed
mapv
max-key
merge-with
min-key
partition-all
reduce-kv
some-fn
sort-by
trampoline

Meta (filed as #421)

alter-meta!
reset-meta!
vary-meta

Multimethods (filed as #419)

prefer-method
prefers

Namespace (filed as #422)

load
load-file
load-reader
load-string
loaded-libs
requiring-resolve
use

Primitives (filed as #423)

bigdec
bigint
biginteger
boolean
booleans
byte
bytes
char
char?
chars
doubles
float
floats
int
ints
long
longs
short
shorts

Promises (filed as #424)

deliver
force
promise

Protocols (filed as #389)

defprotocol
extend
extend-protocol
extend-type
extenders
extends?
find-protocol-method
find-protocol-impl
satisfies?

Proxies (filed as #425)

construct-proxy
get-proxy-class
init-proxy
proxy
proxy-call-with-super
proxy-mappings
proxy-name
proxy-super
reify
update-proxy

Refs (filed as #129)

alter
commute
dosync
ensure
io!
ref
ref-history-count
ref-max-history
ref-min-history
ref-set
sync

Seqs (filed as #429)

enumeration-seq
file-seq
iterator-seq
lazy-cat
line-seq
take-last
tree-seq
xml-seq

Taps (filed as #428)

add-tap
remove-tap
tap>

Transducer and Reducing (filed as #128)

cat
completing
eduction
ensure-reduced
halt-when
reduced
reduced?
reductions
transduce
unreduced

Transient Data Structures (filed as #144)

assoc!
conj!
disj!
dissoc!
persistent!
pop!
transient

Unchecked Arithmetic (filed as #427)

unchecked-add
unchecked-add-int
unchecked-byte
unchecked-char
unchecked-dec
unchecked-dec-int
unchecked-divide-int
unchecked-double
unchecked-float
unchecked-inc
unchecked-inc-int
unchecked-int
unchecked-long
unchecked-multiply
unchecked-multiply-int
unchecked-negate
unchecked-negate-int
unchecked-remainder-int
unchecked-short
unchecked-subtract
unchecked-subtract-int

Vars (filed as #422)

bound-fn
bound-fn*
get-thread-bindings
with-bindings
with-bindings*
with-local-vars
with-redefs
with-redefs-fn

Volatiles (filed as #426)

volatile!
volatile?
vreset!
vswap!

Producing the Var List

clojure.core public vars: (into #{} (keys (ns-publics 'clojure.core)))

basilisp.core public vars:

(require '[basilisp.set :as set] '[basilisp.string :as str])
(def clojure-publics ...)
(def basilisp-publics (set (keys (ns-publics (the-ns 'basilisp.core)))))
(def missing-publics (set/difference clojure-publics basilisp-publics))
(print (str/join \newline missing-publics))
Produces this list:
(quote cat)
(quote decimal?)
(quote if-some)
(quote instance?)
(quote ns-unmap)
*1
*2
*3
*agent*
*allow-unresolved-vars*
*assert*
*clojure-version*
*command-line-args*
*compile-files*
*compile-path*
*compiler-options*
*default-data-reader-fn*
*e
*file*
*flush-on-newline*
*fn-loader*
*math-context*
*print-namespace-maps*
*read-eval*
*reader-resolver*
*source-path*
*suppress-read*
*unchecked-math*
*use-context-classloader*
*verbose-defrecords*
*warn-on-reflection*
->ArrayChunk
->Eduction
->Vec
->VecNode
->VecSeq
-cache-protocol-fn
-reset-methods
..
==
EMPTY-NODE
Inst
PrintWriter-on
StackTraceElement->vec
Throwable->map
accessor
aclone
add-classpath
add-tap
add-watch
agent
agent-error
agent-errors
aget
alength
alias
all-ns
alter
alter-meta!
alter-var-root
amap
ancestors
areduce
array-map
aset
aset-boolean
aset-byte
aset-char
aset-double
aset-float
aset-int
aset-long
aset-short
assert
assoc!
assoc-in
await
await-for
await1
bases
bean
bigdec
bigint
biginteger
boolean
boolean-array
booleans
bound-fn
bound-fn*
bounded-count
butlast
byte
byte-array
bytes
case
cast
char
char-array
char-escape-string
char-name-string
char?
chars
chunk
chunk-append
chunk-buffer
chunk-cons
chunk-first
chunk-next
chunk-rest
chunked-seq?
class
clear-agent-errors
clojure-version
commute
comparator
compare
compile
completing
conj!
construct-proxy
counted?
create-struct
declare
dedupe
definline
defn-
defonce
defprotocol
defstruct
deliver
derive
descendants
disj!
dissoc!
distinct
doall
dorun
doseq
dosync
dotimes
doto
double-array
doubles
eduction
empty
empty?
ensure
ensure-reduced
enumeration-seq
error-handler
error-mode
every-pred
ex-cause
ex-data
ex-message
extend
extend-protocol
extend-type
extenders
extends?
file-seq
filterv
find
find-keyword
find-ns
find-protocol-method
find-protocol-impl
find-var
flatten
float
float-array
floats
fnext
fnil
for
force
format
frequencies
future
future-call
future-cancel
future-cancelled?
future-done?
future?
gen-class
get-in
get-proxy-class
get-thread-bindings
get-validator
halt-when
hash-combine
hash-ordered-coll
hash-unordered-coll
indexed?
init-proxy
inst-ms
inst-ms*
inst?
int
int-array
interleave
intern
into-array
ints
io!
isa?
iterator-seq
keep
keep-indexed
lazy-cat
letfn
line-seq
list*
load
load-file
load-reader
load-string
loaded-libs
locking
long
long-array
longs
make-array
make-hierarchy
mapv
max-key
memfn
memoize
merge-with
method-sig
min-key
mix-collection-hash
munge
namespace-munge
newline
nfirst
nnext
not-empty
ns-name
ns-unalias
num
object-array
parents
partition-all
pcalls
peek
persistent!
pmap
pop
pop!
pop-thread-bindings
prefer-method
prefers
primitives-classnames
print-ctor
print-dup
print-method
print-simple
printf
promise
proxy
proxy-call-with-super
proxy-mappings
proxy-name
proxy-super
push-thread-bindings
pvalues
rand
rand-int
rand-nth
random-sample
rationalize
re-groups
re-matcher
read+string
read-line
reader-conditional
reader-conditional?
reduce-kv
reduced
reduced?
reductions
ref
ref-history-count
ref-max-history
ref-min-history
ref-set
refer-clojure
reify
release-pending-sends
remove-ns
remove-tap
remove-watch
replace
replicate
requiring-resolve
reset-meta!
reset-vals!
restart-agent
resultset-seq
reverse
reversible?
rseq
rsubseq
run!
satisfies?
send
send-off
send-via
seque
sequence
sequential?
set-agent-send-executor!
set-agent-send-off-executor!
set-error-handler!
set-error-mode!
set-validator!
short
short-array
shorts
shuffle
shutdown-agents
simple-ident?
slurp
some-fn
sort-by
sorted-map
sorted-map-by
sorted-set
sorted-set-by
sorted?
spit
struct
struct-map
subs
subseq
subvec
supers
swap-vals!
sync
tagged-literal
tagged-literal?
take-last
tap>
test
thread-bound?
to-array
to-array-2d
trampoline
transduce
transient
tree-seq
type
unchecked-add
unchecked-add-int
unchecked-byte
unchecked-char
unchecked-dec
unchecked-dec-int
unchecked-divide-int
unchecked-double
unchecked-float
unchecked-inc
unchecked-inc-int
unchecked-int
unchecked-long
unchecked-multiply
unchecked-multiply-int
unchecked-negate
unchecked-negate-int
unchecked-remainder-int
unchecked-short
unchecked-subtract
unchecked-subtract-int
underive
unreduced
unsigned-bit-shift-right
update-in
update-proxy
uri?
use
var-get
var-set
vary-meta
vector-of
volatile!
volatile?
vreset!
vswap!
when-first
while
with-bindings
with-bindings*
with-in-str
with-loading-context
with-local-vars
with-open
with-precision
with-redefs
with-redefs-fn
xml-seq
zipmap
chrisrink10 commented 3 years ago

Updated list:

*'
*agent*
*allow-unresolved-vars*
*clojure-version*
*command-line-args*
*compile-files*
*compile-path*
*default-data-reader-fn*
*file*
*flush-on-newline*
*fn-loader*
*math-context*
*print-namespace-maps*
*read-eval*
*reader-resolver*
*source-path*
*suppress-read*
*unchecked-math*
*use-context-classloader*
*verbose-defrecords*
*warn-on-reflection*
+'
-'
->ArrayChunk
->Vec
->VecNode
->VecSeq
-cache-protocol-fn
-reset-methods
==
EMPTY-NODE
Inst
PrintWriter-on
StackTraceElement->vec
Throwable->map
accessor
add-classpath
agent
agent-error
agent-errors
alias
alter
array-map
aset-boolean
aset-byte
aset-char
aset-double
aset-float
aset-int
aset-long
aset-short
await
await-for
await1
bean
boolean-array
bound?
byte-array
char-array
char-escape-string
char-name-string
chunk
chunk-append
chunk-buffer
chunk-cons
chunk-first
chunk-next
chunk-rest
chunked-seq?
clear-agent-errors
clojure-version
commute
comparator
compile
construct-proxy
create-struct
dec'
definline
defstruct
dosync
double-array
ensure
enumeration-seq
error-handler
error-mode
find-keyword
find-protocol-impl
find-protocol-method
float-array
fnext
fnil
gen-class
get-proxy-class
hash-combine
hash-ordered-coll
hash-unordered-coll
inc'
init-proxy
inst-ms
inst-ms*
inst?
int-array
io!
iterator-seq
line-seq
list*
locking
long-array
memoize
merge-with
method-sig
mix-collection-hash
num
primitives-classnames
print-ctor
print-dup
print-method
print-simple
proxy
proxy-call-with-super
proxy-mappings
proxy-name
proxy-super
rationalize
re-groups
re-matcher
read+string
read-line
reader-conditional
reader-conditional?
reductions
ref
ref-history-count
ref-max-history
ref-min-history
ref-set
release-pending-sends
replicate
restart-agent
resultset-seq
rsubseq
run!
send
send-off
send-via
seque
set-agent-send-executor!
set-agent-send-off-executor!
set-error-handler!
set-error-mode!
short-array
shutdown-agents
simple-ident?
sorted-map
sorted-map-by
sorted-set
sorted-set-by
sorted?
struct
struct-map
subseq
sync
tagged-literal
tagged-literal?
test
unchecked-remainder-int
unsigned-bit-shift-right
update-proxy
uri?
vector-of
with-loading-context
with-local-vars
with-precision
xml-seq