News for hackers. Stuff that matters.

cknd

Re:Icecream – A little debugging library on Friday May 10, 2019 @10:40AM (#19878181)
Two recent discussions about related-though-not-identical Python debugging tools:

https://news.ycombinator.com/item?id=19717786

https://news.ycombinator.com/item?id=19772902

Re:Show HN: Debugging-Friendly Tracebacks for Python on Sunday April 28, 2019 @05:13PM (#19773723)
I always liked how this automatically hooks into the python installation via pip, but preferred another text format. Hm. So if you want to permanently replace python's crash message, you could put a file `sitecustomize.py` into your python path, with these contents for example:

    # in site-packages/sitecustomize.py:
    print('hello!')
    import sys; sys.excepthook = lambda a,b,c: print('<bomb emoji>')
    # or also:
    import stackprinter
    stackprinter.set_excepthook(style='darkbg')
(you can find the path by `python -c "import site; print(site.PREFIXES)" `)

It felt bit much to do that automatically on installation, but maybe it would be a good option to have

Re:PySnooper: Never use print for debugging again on Monday April 22, 2019 @03:41PM (#19722131)
One situation where I would have wanted a real debugger and couldn't use one was in crash reporting on remote systems (like, machine learning code running in some container somewhere, or on a headless box far from the network).

Since Python's built-in tracebacks are pretty minimal, the default crash logs don't offer much help other than a line number. I ended up writing a tool that prints tracebacks along with code context and local variables [i], sort of a souped up version of the built-in crash message. It's surprising how much that already helped in a few situations, makes me wonder why it isn't the default.

So, yes, more debuggers, but also abundant logging everywhere!

[i] https://github.com/cknd/stackprinter

Re:Montreal Is Leading the AI World Takeover on Sunday January 15, 2017 @08:17AM (#13403817)
yes, let's talk: clemens@<company domain>
Re:Montreal Is Leading the AI World Takeover on Sunday January 15, 2017 @06:57AM (#13403627)
By pure chance I know one exception to this ad-tech/e-commerce bias in Berlin: I'm at a Berlin-based company[0] working on DL and deep RL for industrial applications (think robots, optimisation and control).

[0] micropsi-industries.com/join_us