HN user

nitroll

49 karma
Posts0
Comments32
View on HN
No posts found.

Because you can see their usage as a series of "points" linked to exactly one other point, that forms a "line", as opposed to other systems where you could have more of a graph or tree.

Yeah, because it's not like we don't appropriate words all over the place anyway, and reuse words for all kinds of similar and dissimilar purposes.

Using "breakpoints" to describe the /points/ where the layout /breaks/ over is not a new term and quite well understood when talking design / layout.

https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layou...

https://www.w3schools.com/css/css_rwd_mediaqueries.asp

SICP in Python 6 years ago

It does make sense to evaluate the default value for the parameter at the point of definition for serveral reasons. First of all, the default value does not have to be a literal value, and if you wanted it to be evaluated at call time the function would need to capture all of the default values in a closure.

  default = 10
  def foo(x=default):
      return x
  default = 20
  assert foo() == 10
I think tat makes a lot of sense.

It could also be that the default value is a more ocmplex expression, we could use a function to generate a default argument.

  def foo(x=create_default(y, z))
By evaluating it at definition time we only have to evaluate the expression once and not have this weird lazy expression.

And yes it is used, for example the fastapi Dependency Injection system has been build quite cleverly using the ability to construct default values

https://fastapi.tiangolo.com/tutorial/query-params-str-valid...

Yes it is one of those things you just have to learn, but there are tons of stuff like that in most programming languages.

I think the importance is the orthogonality of the features. Eg. having so many ways to do string formatting or now multiple ways of doing assigments are not ortogonal and thus can be seen as cluttering.

python3 -m pip install foo

It also works for python2. I try to avoid using python tools that installs their own scripts and go for calling the module through python. This also works for python3/2 -m venv venv

Portals main mechanic is movement, portals are created to enable new venues of movement. If portals were simply point at somewhere and click to teleport there the game would hardly be portal anymore and probably not fun at all.

I hate when I code python and refactor stuff, moving stuff around and such, that I cant just copy/clip around and then do a final 'indent all my work correctly' like I can in a language like lisp.

I am kind of developing a grudge against whitespace sensitive languages. Not because it forces the programmer to indent properly, but because it disables my editors abilities to do it for me.

I totally agree. When you release bi-annually anyway, dont really care about how much breakage a Major release introduces, totally ignore minor versions and with patch versions being more or less insignificant, why not just go with $year.$month