Hacker News new | past | comments | ask | show | jobs | submit | more another-cuppa's comments login

Pipenv is hopelessly slow. It's a shame. Remember when git first came out and it changed the way we worked because it was so quick to commit now? (I fully expect that most git users here don't remember that, actually). There is no going back. I will not use slow tools. My tools need to be at the very least as fast as me.


> Pipenv is hopelessly slow.

Interesting, this has never been a problem for me. I've built some large tools and while it isn't fast, it's always completed in a few minutes.


A few minutes??! That sounds very slow.


To be clear: with few deps it's very fast for me, it's just lager projects with LOTS of non-trivial deps where it can slow up.


What OS?


Mid-2015 MacBook Pro running the newest OS


It is abundantly clear that the pipenv developers use MacOS so I wonder if it's an OS dependent thing.


my current project is at 16 dependencies atm and ... its really not as bad as you make it sound.

    pipenv lock  5.65s user 0.29s system 77% cpu 7.639 total
i think 7.6 seconds is fine for an operation that you'd rarely do

it would probably take ages at work though. just opening a WSL terminal takes several seconds there, which is predictably instantaneous (<100ms) on fedora linux at home


SSD vs HDD may be?


B-trees are really beautiful. I also like the Aho-Corasick algorithm as used by fgrep. I actually started to reinvent this algorithm myself before finding out it was already done. It's essentially a way to add links to a trie such that you can find all occurrences of multiple substrings within a larger string with one pass through the larger string.


K-means is not an algorithm, it's a heuristic for an Np-hard problem.


It is absolutely an algorithm in the sense of "a set of rules to be followed". I think you mean that it doesn't guarantee an optimal solution. That just means it's a heuristic algorithm, same as simulated annealing is a heuristic algorithm for solving optimisation problems.


Nope. An algorithm has to be effective. You can find pathological cases for k-means such that it will never converge on anything useful. So if you set your termination case to be convergence it will never terminate and if you don't then it will never be effective.


I think you might be in the minority in this opinion. Many algorithms have pathological cases but are still considered algorithms


Minority? This is directly from Knuth.


Knuth defines effectiveness as: "... all of the operations to be performed in the algorithm must be sufficiently basic that they can in principle be done exactly and in a finite length of time by a man using paper and pencil."

K-means and other heuristic algorithms fit that description.


BogoSort is an algorithm. Not a very good algorithm, but an algorithm nevertheless.


No it absolutely is not.

The lack of fundamental computer science knowledge in this thread is alarming.


Negative 2 points on a post saying that a computational method that possibly never terminates is not an algorithm... Oh dear...


It never terminates with probability 0.


As far as I can tell you're only arguing against poor implementations of K-means. If you demand that the score strictly improves at each iteration then the algorithm must terminate.


And how do you "demand that the score strictly improves"? It's an NP-hard problem.


K-means implementations generally terminate once there's an iteration where the score doesn't improve. This happens when there is convergence to a local minimum or - less likely - the state hops between two nearby local minima with the same score. But it will terminate on something, and most of the time that something will be pretty good.

I saw your mention of Knuth elsewhere, I looked it up and he demanded that

> An algorithm must always terminate after a finite number of steps ... a very finite number, a reasonable number

This is a pretty niche characterization and almost certainly not what the original post was asking for. However, I concur that there is no guarantee on how quickly K-means terminates or on how good the output will be,. But... if you're going to be that strict about it you would even have to rule out the Simplex Algorithm, which everyone I've ever spoken to thinks of as an algorithm.


In that sense kmeans may be better referred to as a 'computational method' rather than an algorithm.


Indeed.


Isn't a method that gives an approximate or best-fit estimate to a problem still an algorithm, if it terminates?


No. You can't prove that k-means does anything useful.


Is the definition of "algorithm" that you're using here useful?


It's one of the most fundamental concepts in computer science and underpins decades of research. You can decide if it's useful.


This isn't a classroom, and your pedantry isn't adding anything useful to the conversation. We all understand these pedantic quibbles you're arguing about... and what the community is more or less collectively saying is "in this context, we don't care about the distinction between an 'algorithm' in the textbook sense, and a 'heuristic' in the textbook sense".


Nah. Most of them don't understand the difference. If you did you wouldn't can it pedantry.

I personally don't find heuristics beautiful. That's why I commented.


To be fair, you haven't explained at all clearly why you don't think k-means adheres to Knuth's notion of an algorithm.

Your objection seems to be

> You can find pathological cases for k-means such that it will never converge on anything useful

As has been pointed out more than once, a good implementation of k-means is guaranteed to terminate in a finite time. And whatever you mean by "useful" doesn't seem to appear in Knuth's definition of an algorithm.


Really? HN is probably the most feminised tech forum that's ever existed.


Indeed it is. And yet I wouldn't describe it as remotely feminized, only slightly less hostile to women than, say, Slashdot.

IMO, that says more about tech forums and the tech community than it does about HN.


What actually would HN be like if it were perfect in your eyes? What would tech be like?


decent.


Right. You have absolutely no idea.


It's only OK to parse something with regex if it was defined with regex. Far too often I see people wanting to match postcodes and things which are not defined by regex and your heuristic could break at any time.


What about postcodes makes heuristics break for regex but not a general parser? I'd assume if the format changed it'd break both all the same.


Did you mean to start the video half way through?


Why does it keep mentioning .so? Nobody refers to it like that. Just say dynamically link.


> Why would it be public domain?

Copyright is supposed to protect creative works. There is such a thing as a threshold of originality. There are database rights, but that is separate from copyright.


Some plants need a lot of water. Basil does, for example. But succulents in particular don't want much.


Succulents are easiest. Things like peace lillies are also classic. Anything you could get from a supermarket is probably fine.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: