HNHacker News
TopNewBestAskShowJobs

asgard1024

1,234 karma · joined July 27, 2013

submissionscomments
asgard1024··on Scheme vs. Python (2011)
I don't want to get into this discussion, because, as I said, I disagree with these arguments; I just wanted to point out they exist and are valid.

Anyway, I already outlined the argument in another of my comments, where I talk about set theory and integrals - the "axiomatic" primitives are different bunch than "useful" primitives. So trying to keep language small may lead to different decisions based on which primitives you want to keep.

So for instance (as a simple example) map and filter can be built with recursion, but why bother with learning how to do it, if I can just call them from the standard library? (Or in case of Python, use generator comprehension.)

Another example would be complaint below, that Python doesn't have proper closures. Valid complaint or not, Python has classes, and you can pretty much build one from the other.

asgard1024··on Scheme vs. Python (2011)
> These are the people who don't know any better, arguing out of ignorance, not from some valid ground.

That's very unfair. Let's take Lisp-style macros. There are good arguments against macros in programming languages. For example, keeping the amount of primitives small and core language simple. I don't agree with these arguments (I am pro-macros), but it's not just ignorance.

> I do not see any extensibility features in Python, none at all.

Not sure what you mean, but macros are not the only way to extend a programming language.

One particularly common method is called "functions" (if you have ever coded in assembler, you will know what luxury that is). Then you have classes, operator overloading, metaclasses, decorators, native C interface, AST parser in the standard library..

Not sure what more, aside from macros, you could want regarding extensibility. Python is more extensible than C and Java, which are the most common programming languages in use.

asgard1024··on Scheme vs. Python (2011)
> The only reason Python passes as a language with good design

..because ability to compromise is a good design, in a sense.

I kinda agree about the scope though, but I don't think it's a big deal. Sometimes having a hierarchy is overrated, and two levels of names is good enough.

But you will find design mistakes in all languages. Every designer errs. Python doesn't actually have that much warts because the designer is quite conservative.

> Idk where to people get the idea that Common lisp is 'beatiful and elegant'

Maybe from the paper that introduced Lisp, of which CL is descendant? I am aware about CL's warts, but these are result of Lisp's success rather than its original design goals.

> Scheme's design (ideology if you want) is to play to pick features that synergize as to allow discard others as they can be expressed with the previous features/concepts

I understand. But the reason for that is that people consider it beautiful when you start from small subset of features. It doesn't however reduce the need to know the more practical concepts. Like in mathematics. The fact that we can build everything from set theory doesn't mean we don't need to know about integrals.

Some universities skip the basics (set theory) and teach only the practical concepts (integrals). Perfectly fine in my book.

> Now if you want to argue that nowadays the student needs to learn how to pipe software together

I have said it on HN before, it depends on your goals. If you're teaching future programmers/computer scientists, sure, starting from Scheme or even Lambda calculus is better. Because you can assume people will do the real work in other languages. But if you teach a general non-programmer audience to program (like scientists), why not teach them just one language, which they can use in practice?

asgard1024··on Scheme vs. Python (2011)
I already explained that below, but let me elaborate. (But beware I am not a big fan of Zen of Python, precisely because I think it's misunderstood.)

The thing is these rules do not really give much guidance on how to design a programming language. These don't hint whether or not the language should be functional, or should have small library, or should have classes, and bazillion other things that programming language designers tend to argue about.

We can pretty much agree on these rules. And that's the point, these rules are all about making tradeoffs.

asgard1024··on Scheme vs. Python (2011)
Heard about it recently, haven't used it, but certainly is an interesting project!
asgard1024··on Scheme vs. Python (2011)
What I mean is that Python tries hard to find a compromise solution between various ideologies. Whether or not that is an ideology I would leave up to Bertrand Russell; I think it isn't.

Regarding extensibility, again, there are people who argue against it and have an opposite opinion to Lispers. Python tries to find a middle ground, conservatively. It's not super extensible like Lisp or Forth, but still quite a lot compared to many mainstream languages.

asgard1024··on Scheme vs. Python (2011)
I would argue not. These paradigms actually encompass other models, and it that sense, they are pragmatic conservative choices (in a sense, "minimal").

You can program functionally in Python. It doesn't really gets in way of doing that, which cannot be said about functional languages, they are often designed to prevent you programming imperatively.

Dynamically typed languages can be understood as having only one type, so it's in a sense a type system that encompasses all the other type systems. For fans of typing, Python added optional type annotations, again, as a very conservative choice.

Interpreted - again, it's probably easier to write interpreter than compiler. Once you get into compiling, you have to make some more choices, which Python conservatively forfeits.

That is not to say that these choices aren't cultural (for example, most people are more familiar with infix notation, although even here there may be pragmatic reasons - the exactly right amount of parentheses). Just that it tries to encompass various tastes and be conservative about it.

asgard1024··on Scheme vs. Python (2011)
Python wasn't my first programming language. And I think I gave a fair chance to other languages. But there come these moments where you are like "oh, this would be really simple in imperative code". Ideology gets in the way; to claim the opposite is just kidding yourself.

I probably gave the most chance to Common Lisp. It's a very pragmatic language too, unfortunately (largely for historical reasons), the standard library didn't keep the pace. It's not just a matter of what you can do, it's also the design. Python standard libraries almost always put the user first and the purity second.

For instance, Python would never add versions of functions remove-if, remove-if-not, delete-if, delete-if-not. That's mathematical purity (in if vs. if-not) and letting the onus of choice on user (in delete-if vs. remove-if) instead of conservatively making reasonable default.

At the same time, Common Lisp library lacks things like function to strip whitespace from string; you can do it, but Python has it as a function. It's just hundreds of little things like these that make Python more pleasant to work with.

I genuinely want to like Lisp more than Python (I am learning Clojure about now, which is on par with Common Lisp when it comes to pragmatism). But sometimes it is just a little more frustrating, because of ideology and not putting user first when it comes to API design.

asgard1024··on Scheme vs. Python (2011)
I think what makes Python unique and successful as a programming language is a strict pragmatism (rejection of any ideology) and rather conservative choices in features to add (that is, don't add everything that someone suggest, wait until we can see it's a good idea and it cannot be readily composed from existing parts).

Scheme, OTOH, has some ideological choices. The whole notion of programmable programming language that comes with Lisp tradition (which includes s-expressions). The emphasis on teaching and small libraries. Attempt to somewhat model mathematics in numerical tower. These design choices, while interesting, are going against practicality.

I am big fan of mathematics, Common Lisp, Haskell. There is so much beauty and elegance. And yet, when I need to get something done quickly, I will just use Python because it drops the mathematical purity without prejudice, just like a physicist working on an impossible problem.

asgard1024··on Why Open Offices?
Actually, I have to correct myself - it looks like most estimates give PV panels EROEI somewhere above 6, which would mean about 15% of produced energy is needed for the production and maintenance of the panel itself. But even then it would probably be net gain.

Subsidies etc. are a different matter, because then you're talking about competing with other sources and the strawman argument "it costs more energy to produce than it saves" doesn't work.

asgard1024··on Why Open Offices?
> they think it gives them 'free' energy and they are being 'green', while ignoring completely the carbon footprint of making that panel in the first place

It's a little OT, but do you have some real data to back this up? This argument came up a lot in discussions about light bulbs and fluorescent lamps, but in reality cost of fluorescent lamp is around 1% of its lifetime energy consumption. I highly doubt that solar panels cost more energy to produce than 10% of their lifetime output, even in such poor conditions as England.

asgard1024··on Varoufakis reveals cloak and dagger 'Plan B' for Greece, awaits treason charges
I am genuinely curious - what would be a correct Plan B? I am not sure how could you have a Grexit without it being a coup.

Personally, I am not a big fan of central bank independence, as a concept. There is always some dependence, because institutions are staffed and constructed by humans, and I think proclaiming independence is a bit muddy in democracy. If Tsipras took control over Greek Central Bank, it would still have greater democratic legitimacy than the control Eurozone leaders have over ECB (the fact they have some I think can be seen from the fact that ECB didn't provide liquidity to Greece before the referendum - really independent CB in a monetary union would have to do that anyway and let the politicians face the consequences).

(I am really torn here, because, even though I wish Eurozone to succeed, sadly, the existence of EZ and ECB was not established in a democratic process, as it should.)

asgard1024··on Varoufakis reveals cloak and dagger 'Plan B' for Greece, awaits treason charges
It's sad to see them (Varoufakis/Tsipras) being crucified for this. Ironically, it was the Eurozone "leadership" that used threat of Grexit in negotiations, by not accepting any compromise. It only shows they have the "punish someone" mentality, at the cost of Eurozone's future.

I guess that's politics, damned if you do, damned if you don't. Couple days ago, Tsipras was criticized for not having plan B.

asgard1024··on Amazon Web Services revenue rises 81% year over year
> I'm trying to understand why large companies use AWS for their primary infrastructure.

Because they are corrupt? Could be? Large companies are basically centrally controlled economies, and we know how that turns out..

It seems to me that large companies live in a special bubble where they are willing to pay extra for everything. On the other hand, they also charge extra, so externally, it will mostly cancel out.

The winners of this scheme are probably the people involved in running (either directly or as shareholders) these large companies, because their salaries (and other bonuses) are artificially inflated compared to the rest of the society. The losers are probably the government and the taxpayer (i.e. the public), these can be easily made to pay extra but it's difficult for them to charge extra.

asgard1024··on Why I am pro-GPL
I sympathize with the author, even though I work at a corporation that doesn't like GPL.

I think big part why the GPL has been lately out of fashion is that many developers work for (big) companies, which of course (as correctly stated) benefit lot more from BSD than GPL.

These developers naturally want to use the great software at work they do or use as a hobby, so they are willing to compromise with the powers at be (business leadership) and release their software under a more permissive license (or pressure their peers working on OSS to release it under more permissive license).

Of course, if these developers acted really rationally, they would collectively rise up against such demands; but then they could just establish some sort of anarchist/libertarian/communist (depending on your leanings) commune where everything is fair and just.

So I think it's a lot of small pragmatic decisions that ultimately lead to irrational results.

asgard1024··on The euro is a disaster even for the countries that do everything right
I don't understand one thing. People keep saying that Milton Friedman "predicted" this. However, what exactly approach to macroeconomics did he prescribed to the political union? Specifically, how did he wanted to deal with regions that have different economic growth? As I understand it, he was opposed to strong government and fiscal policies. So how do you resolve these problems on national level, if you can't have monetary policy and you don't want to have fiscal policy? To me it seems that he didn't really have any better solution.
asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
There is something wrong with your thinking, but I can't quite put my finger on it. Let me try:

Either you assume a prior distribution of salaries or not. If you don't, then you don't know mean salary, and so group of any size will not tell you if you're anomaly. Because they can all be anomalous as well.

On the other hand, if you assume a prior distribution (which is pretty much what Bayesian statistics does), then even one sample will modify the prior, and you gain information (i.e. "suggestion that you're anomaly or not").

Of course more samples is always better, but if you can make conclusion from multiple samples, then you can make conclusion from one sample.

It seems to me that in the first case, you're saying we cannot assume any prior, but in the second case, you're doing exactly that - assuming that there is a mean - 1st moment of the prior distribution and maybe even other moments - which indicate whether an observation is anomaly or not.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> But people should not have the right to count someone else's money in public, which is what you were implying.

I actually wasn't; if you reread my comments, I advocated that the people should be able to share information about their own salary with anybody without fear. (Although you should be free to criticize other things publicly without fear as well, and that includes compensation of others.)

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> Maybe the other person is being vastly overpaid.

Maybe; but if you think like that, then no sample can give you that information. Because you won't get any absolute reference point either way. In any case, such situation is a good reason to talk about your salary.

So your argument is wrong; the sample size is not important (that doesn't mean it's useless, though!). Either you have some reference point, and then you can judge the fairness of the salary (even from one data point), or you don't have a reference point, and then no sample size will help you get it.

asgard1024··on PEP 0448 – Additional Unpacking Generalizations
I am aware of that, that's why I mention it (and I would add Perl and many Lisp-like languages to your list). I appreciate the path that Python took, though, because it keeps language small and orthogonal. There is lot of value in this approach, especially if you share code with someone outside of the project.

> There are 2 or 3 operator long things very much worth naming

I don't understand your example. But I am talking about functions that are part of the libraries (especially standard ones). How you refactor your code is a different matter.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> My point is that bad statistics is worse than nothing in this context.

Actually, even this point is wrong, IMHO. I can easily imagine situations where you get just one data point and correctly infer from it that you're underpaid.

One example is that someone who obviously less competent than you will reveal to you higher salary than you have.

Another example is that someone has access to information will tell you that your salary is low, and you have good reason to trust that person.

I understand that you as an employer naturally don't think that you are or ever will be biased in this way. But it still may happen in the wild.

In any case, I think it was already said, if you still think that bad statistics is worse than none, you should make the information publicly available. It's the similar thing as with rumors.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> The attitude that a company's payroll data is a company's privileged information, and the general public has no right to it?

Let me phrase it differently. I think people should have the right to count their money in public. So you should be able to say, publicly, "I am getting this amount of money from this guy".

So while you see this as an infringement of "rights of company to have private information", I see it as infringement of "individual rights to count money publicly". We have different valuations of these rights and that's why we disagree.

> But I am not an employee. Your strawman argument is irrelevant.

I think it comes down on whether or not you believe that you benefit from other people having information you already have or not.

> "Free speech" does not apply here, since it's a company's private information

Yeah, according to laws. The big question is if such arrangement is beneficial for the public. I don't think so, and we apparently disagree here.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> I think you misunderstand what free speech is

I think I understand it better than you. I am arguing about moral principles here, not law. That's a different level of discussion (you cannot meaningfully discuss legality if you don't recognize the moral principle from which you are starting).

And I think that free speech (that could be roughly called "right to criticize in public", because if the speech is not being critical, then no one cares) should apply to corporations and individuals too as subjects. The reason is I don't really care if I am getting screwed by government or not.

The idea of "government" that should be subject to free speech but not other institutions leads to contradictions, because what is government doesn't have a good definition. For example, if the institutions is government owned, then you can criticize it. If not, then you can't, even if it would be exact same institution. Or you can consider the opposite case, where the government is effectively owned by foreign multinational company. What then?

I therefore reject the notion that the ownership structure should determine what can be criticized. I believe everything that is unfair, or inefficient, should be possible subject of criticism, even in public, from anybody. Because that's how you actually improve institutions, governmental or not.

asgard1024··on PEP 0448 – Additional Unpacking Generalizations
Many years ago, I complained to myself that in Python something required two expressions instead of one. Later I understood - it is probably intentional.

I think there a design guideline for Python that says roughly if you can create an operator/function with a combination of 2 or 3 operators, then it probably is not worth adding. This keeps standard library relatively small and easy to memorize. Many other language keep adding various flavors of operators (and types, too) despite the fact you can easily build one from another.

asgard1024··on If Materialism Is True, the United States Is Probably Conscious (2014)
> Surely whomever you direct the question at will laugh at you and no one would take you seriously.

But, then, do you consider that the entity may actually lie about it? It may be psychopathic enough to say, "I am not conscious, that's ridiculous", and yet be conscious.

Another possibility is that it wouldn't understand words in the way we understand them. Asking a nation state "are you conscious?" may be like asking a child "do you have knee-jerk reflex?". How would you know without prior experience?

However, asking in a different manner, say like in a referendum in Greece, you can get a very emphatic response which hints at consciousness at national level.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
> If someone came to me and said "I did a self-selecting self-reporting survey of salaries, and it says I'm underpaid", I think I'd be more likely to fire them for incompetence than to give them a raise.

Even if besides them being wrong in this one thing, they would actually be competent and underpaid?

If the answer to the above question is no, why do you even have to elaborate. Then it doesn't actually matter at all if the employee complains rightly or wrongly! I have to conclude the answer has to be yes, then.

It's perfectly understandable that you, as a manager or employer, don't want to pay people for their merit if you don't have to. But it's not something you should be proud of.

asgard1024··on Ex-Googler says she exposed company-wide pay inequality with spreadsheet
I upvoted parent, not because I agree with him, but I deeply disagree with your attitude.

I think even internal criticism of companies should be considered free speech and protected as such. That doesn't mean that it should be released to the public, but employees should have the freedom to release the information if they decide so, just like whistleblowers.

> Why is it our business to see who makes what?

Of course it is your business (if you are an employee). Employee wages are determined by supply and demand, therefore, they depend on other's people wages. That aside though, any exposition of the way other employers treat other employees in similar position (such as discrimination) also should be your business, because it may affect behavior of your employer as well.

These are the reasons why we have free speech, to prevent people doing wrong things in secrecy, as to avoid collective moral correction to take place.

asgard1024··on The end of capitalism has begun
The important question is what you're trying to define. Are you trying to define existing system or some your ideal?

If you're trying to define existing system, I would disagree that exchange is voluntary here, unless you play with words and say people are free to die of hunger. (Also it's not clear what "private ownership of labor" means.)

If you're as capitalism designating some other ideal system (based on your values), for example anarchocapitalism, you should be aware that these always failed too, sometimes even more horribly than attempts for communism. But then anyway, why would you attempt to call this ideal "capitalism"?

This is actually the basic contradiction in your thinking. You say "the system we have is not really a capitalism", so the problems (that many people see) are not problems of capitalism. But then why do you want to call it capitalism, if not as the reference to what we have today?

asgard1024··on The end of capitalism has begun
I think you're wrong with the definition of capitalism. Capitalism is not necessarily free market and vice versa.

A historically accurate definition of capitalism (unlike communism for instance, capitalism was given name for the existing system and not for utopian ideal), I believe, would be that it is a system with two characteristics:

1. Most of means of production (capital) is privately owned.

2. Human labor is a market commodity.

I don't agree with the article that death of these things (and so capitalism) is coming, although I can certainly (being a leftist) imagine a free market system where neither of these conditions is true. For example, a system where large majority of economic production happens in democratically controlled worker cooperatives.

asgard1024··on Solving Every Sudoku Puzzle (2006)
It has been shown in 2012 that you need at least 17 digits to uniquely specify a Sudoku puzzle: http://www.math.ie/McGuire_V1.pdf

Their approach was quite close to solving every sudoku puzzle, although they traversed the space by the solutions.

← PreviousPage 10 of 22Next →