A most harrowing collection of Julia WATs

Yes they are just functions that return expressions which are spliced into the AST. Dispatch works but only with literal types, not types of arguments at runtime.

That makes sense as to why I only got it to “work” with Int's, Float's, String, Symbol's and Expr's. Thanks. :slight_smile:

This is sort of obvious, but still tricky:

julia> r = typemin(Int):typemax(Int)
-9223372036854775808:9223372036854775807

julia> length(r)
0

julia> r[2] # WAT
-9223372036854775807

Related: Bounds-checking failure while indexing an empty `UnitRange` if there's an overflow · Issue #45389 · JuliaLang/julia · GitHub

6 Likes