Skip to content

u/evertrooftop

In this archive from Feb 2009 to Jun 2019

27
posts
543
comments
3
media
2k
score

I can definitely believe that for a bus to be better for the environment than a car, on average it will need to be filled with a certain amount of people. I also definitely believe that number needs to be higher than 1.

I find it hard to believe that this is true for a full bus though, so I would be curious where that line is.

2 points

In the past I always felt really mixed with Linux distro's running behind. For the most part, I want extreme stability and no BC over long periods of time, on the other hand... there's a select number of packages where I don't feel this way. Usually this ends up being just the runtime of the programming language I'm using.

So with Docker becoming widespread, I'm actually really happy because I can have it both again. Distro's can be as stable as they need to be. I don't care that they want to run PHP 5.4, because there's other PHP-based packages that they might want to run on exactly that version. I just run the latest PHP (or Node) in a docker container. Best of both worlds imho.

1 points
  • IP addresses are not stable (for phones)
  • IP addresses may be shared (think: multiple computers in a house or in a corporate network)
  • Cookies (sessions) might be be deleted.

If you're making some kind of public voting mechanism, then the best thing you can do is not worry too much about people voting multiple times. It really depends on the use-case what a good solution might be.

2 points

The autoloading part was nice, but not that much of an innovation. PEAR had done that, and a number of PSR-0 tools existed at the time to easily generate fast autoloaders. What composer did right was:

  • Release with packagist, a repository where everyone can upload regardless of the quality of the package. This was in contrast with existing package managers where you might had to go through a lengthy vetting process or alternatively, run your own channel (which was cumbersome).
  • A much, much better UX (in the cli, and composer.json).
  • Integrate deeply with Github instead of making people create archives and upload them.
12 points

Thanks!

I think given the option of returning an array or a generator, the generator really is the better choice because it's more inconvenient. If PSR-16 implementations return arrays, PSR-16 users might start to assume that all PSR-16 implementations will. A generator forces you to loop through it, which is a bit more cumbersome but is a better guarantee that users will use it correctly. It might also save a bit of memory =)

2 points

Very close to my original proposal from 2012. Glad to see that that was in the end considered the right approach =)

One thing I'd wonder though, why not add PHP 7 type hints? Seems like the right choice given that PHP 5.6 is on security-only updates and only new code will likely adopt this.

Regardless, I'm going to write a little sample implementation to see how easy this is. Looks great!

10 points

Although I'm not certain, I imagine that you do get a bit of a loss in speed. So it's a great choice when dealing with a lot of data, but when your dataset is small enough you might benefit again from regular arrays.

2 points

You're not just wrong, you're also being a complete jerk about it. I don't really understand this hyper aggressive response. Where does this come from? Do you think this is an acceptable way to communicate with people? Would you respond similarly if the article came from someone you see on a daily basis?

I can relate to being strongly inclined to point out errors after reading an article, but try to be a bit more civil. I'd like to think that you're just having a bad day, but a quick look at your comment history tells me that you're just a very angry person. I hope you're ok.

16 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.