HNHacker News
TopNewBestAskShowJobs

eirki

45 karma · joined September 26, 2018

submissionscomments
eirki··on The different uses of Python type hints
The only exceptions I can think of is https://docs.python.org/3/library/typing.html#typing.ClassVa...
eirki··on The different uses of Python type hints
FastApi very recently added support for Annotated, and now recommends using that over default arguments.

https://fastapi.tiangolo.com/release-notes/#0950

eirki··on Automate your Python project with Makefile (2021)
Url: https://github.com/casey/just
eirki··on Pytest Tips and Tricks
I absolutely agree about fixtures-as-arguments thing. Ward does this a lot better, using default values for the fixture factory. There's a long issue on ideas to implement something like that as a pytest plugin (https://github.com/pytest-dev/pytest/issues/3834), but it seems the resulting plugin relies on something of a hack.
eirki··on The genetic history of Scandinavia from the Roman Iron Age to the present
Different time period, but definitely check out History of the Twentieth Century.

https://podcasts.apple.com/us/podcast/the-history-of-the-twe...

eirki··on How did I run that code again? Tools to help recall
I also switched to just recently. Nice and simple syntax, and a very satisfying verb:

  just push
  just test
eirki··on IPython 8.0
Also chiming in to say thanks for the good work! This looks like an amazing release - I practically jumped in excitement when I saw the fish style autocomplete.
eirki··on The Data Classes Decorator
Disabling mutation prevents you from changing attributes after instantiation, no?
eirki··on The Data Classes Decorator
I just wish I could disable the type coercion. E.g. 1 becomes "1" if the attribute is annotated str.
eirki··on Show HN: My proposal for a new keyboard layout
Does it not lack a proper æ?
eirki··on The Decline of Django
I think the comparison between VS Code and Chrome is spot on. Monoculture in the text editor/IDE space is a very real risk right now.
eirki··on It's weird that most of “Hacker” news is dominated by business news
If 10% are located in and around one location and the rest are spread around the world, then that would definitely count as 'heavily concentrated' in my book
eirki··on An Iraqi who saved Norway from oil (2009)
> For instance Australia has a lot more private wealth saved up than Norway. At a lower GINI coefficient as well!

This is demonstrably false: https://data.oecd.org/chart/6tTs

eirki··on Show HN: Heroku Alternative for Python/Django apps
This is my experience as well. $10 for each running process (server, worker, database) adds up very fast.
eirki··on Benefits of Not Using an IDE
Absolutely agree. The myriad of overlapping tools were the biggest problem for me when learning javascript.
eirki··on Julia: Faster than Fortran, cleaner than Numpy
Genuine question: Is Julia used for anything other than mathematics yet? Is there any sign of the Julia community expanding beyond science, maths, machine learning etc?
eirki··on Ward: Modern Test Framework for Python
And some linters will complain if there is a collision between the names of a parameter and a function.
eirki··on Ward: Modern Test Framework for Python
Absolutely love the idea of using default params to identify fixtures. That part of pytest has always rubbed me the wrong way.
eirki··on The Lives of Napoleon
Also: The Age of Napoleon. https://ageofnapoleon.com
eirki··on Beginner’s guide to mechanical keyboards
This is very good advice. It's often so tempting to get on that threadmill after making the first purchase.
eirki··on Best practices for writing SQL queries
> Avoid

  SELECT
    title,
    last_name,
    first_name
  FROM books
    LEFT JOIN authors
    ON books.author_id = authors.id

> Prefer

  SELECT
    b.title,
    a.last_name,
    a.first_name
  FROM books AS b
    LEFT JOIN authors AS a
    ON b.author_id = a.id
Couldn't disagree more. One letter abbreviations hurt readability IMO.
eirki··on WTF Python: Exploring and understanding Python through surprising snippets
It is also marginally faster, I think.
eirki··on Vivaldi 3.6 Introduces Two-Level Tab Stacks
Alternate anectdata: I switched to Vivaldi a year or two ago and have had no problems with crashes.
eirki··on Metal monolith found by helicopter crew in Utah desert
Reminds me of the "House of Special Purpose"

https://en.wikipedia.org/w/index.php?title=House_of_Special_...

eirki··on Structuring Your Project
Mypy sometimes uses init files to understand internal imports.
eirki··on A father knitted his baby’s first year of sleep pattern data into a blanket
There are a couple of apps out there! Although my experience was that I didn't really have a need for the data when all was said and done. Maybe I should have picked up knitting..
eirki··on It Shouldn't Be This Hard to Responsibly Fly a Drone
Not exactly. NIMBY "carries the connotation that such residents are only opposing the development because it is close to them and that they would tolerate or support it if it were built farther away." (Wikipedia)

Whereas drones, people just don't like them at all.

eirki··on Electric cars 'will not solve transport problem,' report warns
I agree with your second point (self-driving cars might make more efficient use of roads), but I don't see how cheaper taxis is going to reduce road congestion?
eirki··on Things to use in Python 3
Mypy uses the init files to resolve absolute imports.
eirki··on Still in love with Rust
Black (The uncompromising Python code formatter) is all the rage atm.

https://github.com/ambv/black

Page 1 of 2Next →