HNHacker News
TopNewBestAskShowJobs

fantod

217 karma · joined September 29, 2020

submissionscomments
fantod··on Show HN: Array – A Better Python List
I don't really see how this is a reason not to carefully consider the type of an object when using truthiness.
fantod··on Show HN: Array – A Better Python List
For the basic sequence types (list, tuple, and range), len is definitely not expensive to compute. For custom types, it will depend on your implementation of __len__ (but then, computation of bool(...) will also depend on your implementation of __bool__).
fantod··on Show HN: Array – A Better Python List
If you know that "something" is a sequence, then is the idiomatic thing to do. The point is that any time you rely on truthiness of a value, you need to think (sometimes quite carefully) about what type of value you're dealing with.
fantod··on Show HN: Array – A Better Python List
To be fair, using "if something" in Python is pretty much always a good way to trip yourself up.
fantod··on Doing Symbolic Math with SymPy
Yeah, the Python language favors an imperative style due to the absence of features necessary for writing more functionally, like lambdas that can do more than return an expression, tail call optimization, and lexical scope. This last one, additionally, tends to make people use classes for essentially no other reason than that closures don't work natively.

> My favorite example is: ','.join(['a', 'b'])

I've always found the discrepancy between this example (instance method call), list(('a', 'b')) (technically a method call, but resembles a functional call), and str.lower('AB') (class method call) to be quite maddening.

fantod··on I almost quit caffeine in one year
How much coffee were you drinking? I have 1-2 cups a day (for many years) and always felt fine.
fantod··on More than 73% of American adults are overweight or obese
Unhealthy food can be hard to avoid.
fantod··on NumPy Illustrated: The Visual Guide to NumPy
You made me realize, I think of the brackets as saying "where". vec[2] is vec where the index is 2. vec[vec > 5] is vec where the entries of vec are greater than 5, etc.
fantod··on NumPy Illustrated: The Visual Guide to NumPy
Both are overloaded (__gt__ and __getitem__). My question to you is: How would expect this to be written (in Python)?
fantod··on Tribes of Programming (2017)
This lines up remarkably well with something I've thought about myself. People often argue about what the "best" first programming languages to learn is. I think it depends on what your goals or interests are:

1. Interested in math and computer science? Start with Scheme. 2. Want to be an engineer? Start with C. 3. Want to develop a product (or just general interest)? Learn Python.

These categories line up precisely with the article's three tribes: Mathematician/poet, hacker, and maker.

fantod··on Zoomquilt 2 (2007)
Why would that even be blocked?
fantod··on The Genius of RISC-V Microprocessors
Opening in private mode usually works for Medium link (never understood why they reward people who hide their cookies, but ok).
fantod··on Run More Stuff in Docker
Itamar Turner-Trauring's blog has a number of good articles on Docker best practices:

https://pythonspeed.com/docker/

fantod··on Run More Stuff in Docker
Yes, I understand that Docker caches layers. Like I said, if docker system prune is clearing a huge amount of space, it's like a large number of different images and containers that might not share layers. If you're build, running, starting, and stopping containers all day, you might not be terribly careful about exactly what you're doing each time. That's why system prune is so useful.
fantod··on Run More Stuff in Docker
So maybe I was quick to comment, but I glanced at the images I have sitting around and python:3.7 is 876MB. However, python:3.7-slim is 112MB (still nearly twice the size of the image you describe, though). But it's conceivable that many people running into limitations with the slim image would just opt for the full Python image instead.

Maybe a better example is the Tensorflow image, which is close to 4GB for the GPU version. It's also the kind of thing that would be a pain to rebuild from scratch if you wanted to find a way to save space.

fantod··on Run More Stuff in Docker
Agreed, there are many things to get right about using Docker. But if you're just deploying an app to a somewhere, does it really matter if the image is a bit bloated (within reason)?
fantod··on Run More Stuff in Docker
I mean it could just be very many containers that add up. And in many cases you'll have loads of images close to 1GB unless you go to great lengths to try and shrink them (e.g. anything that uses Python).
fantod··on Python at Scale: Strict Modules
If you're referring to the monkeypatching, I would generally try to avoid it unless but that doesn't mean I wouldn't ever do it. Not sure why you would do this in this example though.
fantod··on How the Python object system works
Yeah, these are great.
fantod··on How the Python object system works
This is great! There aren't enough references on Python internals, I find.

Not sure you're at all interested in going in this direction, but I (and likely many people) would be really interested in a similar explanation of NumPy internals.

fantod··on AI researcher Timnit Gebru resigns from Google
Sorry, I was referring to the assertion that "they wouldn't share the feedback on her paper".
fantod··on AI researcher Timnit Gebru resigns from Google
I think the logic is that the paper would need to be retracted, rectified, and then resubmitted. Since the submission deadline was already passed, resubmission would be impossible.
fantod··on AI researcher Timnit Gebru resigns from Google
From Dean's email:

"A cross functional team then reviewed the paper as part of our regular process and the authors were informed that it didn’t meet our bar for publication and were given feedback about why. It ignored too much relevant research — for example, it talked about the environmental impact of large models, but disregarded subsequent research showing much greater efficiencies. Similarly, it raised concerns about bias in language models, but didn’t take into account recent research to mitigate these issues."

Is it true that this information was not shared with her?

fantod··on ‘Extremely aggressive’ internet censorship spreads in the world’s democracies
Not every lockdown entails tracking of individuals.
fantod··on DeepMath Conference 2020 – Conference on the Mathematical Theory of DNN's
IIRC the number of hidden units required scales exponentially in the desired approximation error.
fantod··on 25 Years In Speech Technology and I still don’t talk to my computer
Agreed, I find this to be a great use case for voice assistants. Or on the occasion I feel like napping after lunch "Hey Siri, wake me up in an hour".
fantod··on When thebiglebow.ski is blocked by Facebook
I'm not a web developer but whenever this kind of thing happens I just wonder why there isn't a single standard library in every common web language to deal with this and if there is, why it's not being used more often.
fantod··on The unreasonable effectiveness of the Julia programming language
Really? My only experience with Julia was porting a simulation from Python and the speedup was incredible. Admittedly, that's an instance of numerical computing, but I would wonder why it was slow for you.
fantod··on Why I stopped reading HN (2010)
Why don't you just exclusively subscribe to the subreddits that interest you?
fantod··on Suicide Linux (2009)
Have you actually met a person from Europe? They play on stereotypes constantly.
← PreviousPage 3 of 4Next →