Wat
Dev tools
python object inspector
SHOW HN2024
How HN took it
17 positive, 26 neutral or asking, 1 mixed, 10 critical, out of 54 comments about the project. Thread score +0.19.
Idea: 6 for, 3 againstDesign: 2 for, 2 againstPrivacy: 1 for, 3 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Useful, quick overview compared to help() and dir()
From 2 comments
help says too much, usually you'd like a quick overview slightly formatted and well classified, which is what wat seems to afford here
agumonkey on HNWaaat :D. This is so nice. I used to use python-ls[0] for similar, but something about it that I can't recall broke for me and it's no longer maintained. Adding to my debugging…
skeledrew on HN
Clever base64 insta-load snippet
From 2 comments
> If you want to quickly debug something, you can use this inspector without installing anything, in the same session. > Load it on the fly by pasting this snippet to your Python…
nikvdp on HNWaaat :D. This is so nice. I used to use python-ls[0] for similar, but something about it that I can't recall broke for me and it's no longer maintained. Adding to my debugging…
skeledrew on HN
Short no-parentheses syntax is handy in a REPL
From 2 comments
I think it makes a lot of sense in the context of a live interpreter. Wrapping and object in help() or dir() is an annoying set of movements vs. just pressing 5 keys with no…
enragedcacti on HNI love it
wnolens on HN
Objections
Base64 insta-load of executable code is a security concern
From 3 comments
Re: Insta-load Please don't do this. Exec'ing arbitrary, obfuscated code you just copied from the internet directly in a running environment is such a bad idea it shouldn't even…
wantsanagent on HNLooks like a great tool. Will start playing with it whenever I have to dive into an existing project again. One thing I'd like to note, though, is that most engineers (at least…
Aeveus on HNPip install allows arbitrary code execution.
jampekka on HN
Overloading the division operator is an odd choice
From 3 comments
This looks super useful, but I was wondering if I'm the only one bothered by this recent trend of overloading completely unrelated operators (here the `/` operator) in the name…
heyts on HNThis is interesting. I'm wondering what compelled the author to use the division magic method for arguments instead of the more intuitive and commonly used approach to passing…
languagehacker on HNI get the reasoning behind it, but the choice of the division operator is still a little weird. I believe it should be equally possible to overload the bitwise OR operator (|),…
jawns on HN
Requests
Allow plain import wat with identical usage
From 1 comment
> from wat import wat Given the cool nature of this project, I'm surprised they don't offer simply "import wat" with identical usage syntax. Thus inviting curious users to…
enriquto on HN
Jupyter widget for object exploration
From 2 comments
Waaat :D. This is so nice. I used to use python-ls[0] for similar, but something about it that I can't recall broke for me and it's no longer maintained. Adding to my debugging…
skeledrew on HNLooks great! And it would make for a great addition to Jupyter lab. I actually can't believe there is still no decent variable explorer bundled in
blackbear_ on HN
Questions
Why use division operator instead of a function call
From 2 comments
I'm normally a big fan of python operator overload hacks, but why are we doing `wat / foo` instead of just `wat(foo)` ?
Retr0id on HNThis is interesting. I'm wondering what compelled the author to use the division magic method for arguments instead of the more intuitive and commonly used approach to passing…
languagehacker on HN
Does the insta-load snippet run the same code as installing the package
From 1 comment
just so that it is clear for everyone, including newbies here, does the insta-load code snippet work like this: the author has encoded the wat module's source code into base64.…
fuzztester on HN
Alternatives named
icecream
From 1 comment
Looks like a fancy version of good old icecream. https://github.com/gruns/icecream If you never heard about it, scroll to the bottom to…
bobuk on HN
rich.inspect
From 1 comment
rich.inspect has been my go-to for this. Comes pre-installed in a vanilla Colab kernel too
blueboo on HN
dir and help built-ins
From 2 comments
It important to remind everyone that you can already do something similar via the build-in function help(). For example, if I run help({1}) I get the documentation for a set,…
alkh on HNand the dir() built-in Python function.
fuzztester on HN
snoop
From 2 comments
See snoop[0], which does just this. It also has an install function that registers it in builtins, making it universally available. [0] https://pypi.org/project/snoop/
skeledrew on HNWaaat :D. This is so nice. I used to use python-ls[0] for similar, but something about it that I can't recall broke for me and it's no longer maintained. Adding to my debugging…
skeledrew on HN
q module
From 1 comment
Check out the module “q”! It’s callable, its author talked about how great it would be to have a module level __call__ because the way it was made callable is super wonky.
scrollaway on HN