927 karma · joined Mar 14, 2017 (9y ago) · 307 submissions
comment 9y ago · link · parent
More and more companies are insisting on customers signing binding arbitration clauses as a condition of doing business: car dealers, banks, airlines, you mention it. It's all very well to say, well, don't do business with them, when all the competition are doing the exact same thing. If you need, say, a new car, well, good luck getting one without signing most of your rights away, and this is no exaggeration.
Binding mandatory arbitration clauses mean that you cannot sue the company, and agree to accept the verdict of the arbitrator, for which there is no appeal, and who is generally hired by the company having the arbitration dispute and is therefore impartial /s.
I have read FTC field reports about vehicle warranty claims where one arbitration decision was so outlandish even the FTC wrote that it was irrational, and the vast majority were in favor of the dealer.
comment 9y ago · link · parent
Your argument dismisses as optimizations things that are critical to systems for which Erlang was designed - telecoms. They are not optimizations for Erlang - they are necessary features that permit "write once, run forever" style operation.
Keeping a connection open and available in a database pool is admirable, but not even remotely comparable to keeping a TCP socket open between two participants in a phone call, with RTP voice data flowing, and changing a function - at run time - in that very same process, without disrupting the voice data.
The Erlang-style hot code loading doesn't make an Erlang system more vulnerable to working with corrupted data by not killing the process. That's just incorrect. In any case, well-written Erlang code will self-terminate if it detects anomalies. And it's harder to corrupt data in Erlang because of its immutability, absence of global data, and process isolation.
Compare the rather ugly and unsafe Ruby code with the equivalent Erlang code (provided as a separate module):
-module(demo).
-export([run/0, foo/1]).
run() ->
lists:foreach(fun(N) -> foo(N) end, lists:seq(1, 10)).
foo(I) ->
io:format("~p\n", [I]).
What the Ruby code does is in no stretch of the imagination "mutable late binding". It is evaluating (and hence interpreting) static text, which happens to redefine a Ruby function, every time through the loop. That's equivalent to recompiling a piece of code in a loop.Where does this load new code?
You can eval code in practically any interpreter, from Perl to Python, and it's an unsafe and slow operation and not remotely the same as hot code loading in the Erlang sense.
The Erlang code is compiled, usually on another system, and the compiled BEAM code is copied to a live server, and loaded into memory into every running process that uses that module, simultaneously, without crashing or restarting any of the processes.
In fact, if there is a cluster of servers, and the replacement code (let's call the module "athana") is copied to the disks of all the servers in the cluster, it can be loaded into all processes running "athana" on all connected nodes of the cluster by entering this one line in the Erlang shell of any one of the production cluster nodes:
> nl(athana).
That's it.Please, let's stop this fruitless debate. It is obvious that we are not going to agree, and we are using the same phrases to mean completely different things.
comment 9y ago · link · parent
There are so many shoulds in the world that don't make it to dids, it reminds me of the joke about the salesman trying to sell farming improvement techniques and being turned down by the old farmer, who says, "Son, I don't farm half as good as I know how to already."
Unfortunately, I have not found the PyPI group as helpful as you have. Perhaps I have been looking in the wrong places.
comment 9y ago · link · parent
People who upload packages often leave organizations, who are then stuck with a package they can't update because the password went with the person, and the email reset link points to a now-defunct email address.
Petitioning the package management team is sometimes fruitless, forcing a needless new instance of typosquatting.
comment 9y ago · link · parent
I'm not sure where in your home you would fit that. A small swimming pool would easily hold that, but keeping the water clean and potable would be very difficult. I would guess you'd need to have a special water tank made, and to avoid detection or damage, it would probably need to be underground. How the water would stay drinkable is another challenge.
Just saying that the logistics around long-term survival appear to be daunting and expensive. Maybe those "crazy" survivalists are not so crazy after all.
comment 9y ago · link · parent
In the days leading up to Irma, it was already like the apocalypse. You couldn't get gasoline, water, plywood, or non-perishable goods for love or money. You couldn't drive away because the roads were jammed. Closer to the storm, you couldn't get to a shelter because they were full. Airports shut down. There was nowhere to run (or hide, really).
During the storm, once the winds got to 40 mph, you were on your own - no 911, no police, no fire department. If someone decided to brave the storm and break into your house, it was up to you to defend yourself.
After the storm, there was no power, many roads were impassable, no gasoline, no food, no water, no sanitation, no way to flush toilets without using precious water.
It was a relatively short, but terrifying preview of what a prolonged loss of electricity would do. I think Scientific American compared the power output of a major hurricane to one 10 megaton nuclear bomb explosion every 20 minutes.
If anyone wants to know what a post-apocalyptic world looks like, take an area hit by a major hurricane, remove FEMA, medical support, and law enforcement, and multiply that by a couple of orders of magnitude.
It's a lot more real when you've been an unwilling participant.
comment 9y ago · link · parent
Maybe. But I think with much greater difficulty. None of Java, C#, or Go has the built-in distributed processing capability of Erlang.
The last time I looked into it, WhatsApp's infrastructure consisted of 256 2-node clusters, each node of which was capable of supporting between one and two million concurrently open TCP sockets. The 2-node clusters were combined into (IIRC) 16 "islands", some of which were geographically remote, and each of which communicated with the other using a distribution protocol written by WhatsApp in Erlang.
comment 9y ago · link · parent
Please let me explain why this makes me raise an eyebrow.
Let's take just one thing: hot code loading.
When Erlang does hot code loading, it loads it into the currently running process. This means that any socket opened by that process stays open, and the connection is uninterrupted. The process doesn't stop running, or restart. In fact, the process is, for a short time, running both the old and the new code at the same time. When the process gets to the point of completing the recursive loop within which the old function was called, the new one gets switched in seamlessly and is called from there onwards. I know of no other language that has such mutable late binding, but I can't say they don't exist.
This is, I believe, entirely different from an interpreter loading new code into a different process (or restarting the current one) on detecting a new file. If you can assert that after loading new code from a file,
1. The process pid is unchanged (it's literally the same process), and 2. The process data state is unchanged (it's literally the same process memory) and 3. The process file handles and sockets are unchanged
maybe I could agree with your point of view.
comment 9y ago · link · parent
All these arguments - not just yours - are strawman arguments, because they avoid addressing my actual objection: there is virtually nothing in common between PHP and Erlang, other than them both being programming languages. The comparison is entirely fallacious.
The fact that PHP can survive crashes without affecting other sessions is either due to the process isolation that you get for free in modern operating systems, or using external technology like HHVM, which is nothing like the Erlang BEAM engine. To quote Robert Virding:
> Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.
Lest anyone think this to be arrogance, I'll quote Brian Acton:
> Erlang is a generally good and useful general purpose language. There was serious thought and consideration that went into its construction. As one example, we’ve seen great benefits in high concurrency situations. We’ve also seen the ability to maintain great uptime as part of its hot code loading capabilities.
Doubtless many high-volume messaging systems have been built. From my experience, it is also likely that the effort and defect density involved to do so was likely 4-5 times greater than it would have been to implement it in Erlang. This has been borne out by experiment[1] and the experience of many developers who have adopted Erlang after using other technologies.
This is not to claim that Erlang is better than everything else, or a panacea. Like anything created in an imperfect world, it has imperfections. But for someone who has written servers that require high reliability, robustness, concurrency, uptime, and maintainability, one could not do much better than Erlang.
Sadly, HN comment section is not the place to debate the finer details of competing language ecosystems, and much of this is in the realm of personal experience and opinion, so let me gracefully withdraw and thank you for your perspective.
[1]: https://www.researchgate.net/publication/221211369_Comparing...
comment 9y ago · link · parent
Comparing Erlang to PHP + transactional DB is regrettable.
Firstly, Erlang's "let it crash" philosophy, together with its sophisticated supervisor/worker framework, aims for resilience in the face of failure due to bugs or bad data. A PHP script hitting a database may be a better design for a simple web application, but it is in no way superior to the Erlang/OTP ecosystem for Erlang's primary use case: soft real-time, highly concurrent, resilient and robust systems. It cannot reasonably be compared to a scripting language + DB, nor does it make any sense to.
Secondly, Erlang is also able to work with transactional databases, from its built-in Mnesia DBMS to Postgres and more. A more appropriate comparison would be between Erlang + DB vs PHP + DB, and then I think you will agree that Erlang would generally fare better than PHP in that case.
WhatsApp was built almost entirely in Erlang + Mnesia. I honestly don't think they could have done it in PHP + Postgres.
Finally, claiming that Erlang didn't take off because it lacked the transactional semantics of PHP + DB does not compute, because I never saw any claim that Erlang offers transactional DB semantics (unless it happens to be using a transactional DB).
comment 9y ago · link · parent
I recall reading a very short book years ago, I think it was "The One-Minute Manager", and the biggest takeaway I got from that is that you have to adopt different styles according to people's motivation and skill (a 2x2 grid similar to [1]).
It appears "mentoring" (coaching) is appropriate for people who have skill but lack motivation or confidence. This definitely correlates with my experiences.
comment 9y ago · link · parent
One of them, as I understand it, is that in any significant software project, regardless of the volume and quality of the documentation, or quality of the code base, maintainers not involved in building the original project will not be able to build the "theory" correctly in their minds, and will consequently make changes that are clumsy or detrimental. (I'm summarizing, so some important aspects have been skipped).
I see this aspect of the paper as related to the "conceptual integrity" discussed in the Mythical Man-Month.
This paper has long been one of my favorites, and was first brought to my attention when I was reading (IIRC) one of Alistair Cockburn's books. Sadly, few of the people I shared it with found it interesting.
comment 9y ago · link · parent
It is the poster child for the "If the only tool you have is a hammer..." maxim.
Its appeal derives almost completely from its presence in probably every major browser, where it was placed for DOM manipulation and was stressed way past its design envelope over time, leading to the increasingly dystopian web development landscape we progressively inhabit.
If it is ultimately victorious, it will be in spite of its design, not because of it. Those of us who are old enough to remember will cringe at the pain we endured over the years because of the widely used Intel 808x architecture as it evolved (small/medium/large/huge memory models, and segment registers, anyone?), not because it had the greatest merit, but because of its market penetration.
History repeats itself.
comment 9y ago · link · parent
This is ridiculous from the point of view any professional developer. I know that this is your point, and I'm just amplifying it. I (and many other professionals I work with) know - and use on a daily basis - so many more than 1 language that it's sincerely baffling to grok a world that promotes "One language fits all". That's without even considering the parlous state of npm and its libraries.
comment 9y ago · link · parent
Code hot swapping can often trivially be done (by simply compiling and copying the fixed module, then 'l(module)' in the shell) if the module does not change the state record or break function signatures. I have used this countless times to fix a module function with no downtime. You don't always need the full code upgrade procedure, which is indeed far more onerous.
comment 9y ago · link · parent
10.000,40
which is exactly the opposite of the US based 10,000.40
So it's locale rather than language that determines this.comment 9y ago · link · parent
> In the end it is all about caveat emptor: is up to the customer to decide.
In a balanced world, where choices are relatively evenly spread, this may be true.
In a world where the number of harmful choices far exceed the number of healthful ones, and the harmful ones are much more profitable (and so promoted more heavily), free choice becomes a different proposition.
However much willpower, intelligence, and savviness we think we have, we get tripped up by our firmware defects, even when we know they are there and try to be wary[1].
Deliberately exposing ourselves to proven brain hacks and thinking we are immune and have real choices is ... inadvisable.
Anyone who is diabetic (or simply overweight) and tries to buy or eat food that is not harmful to the pancreas will appreciate how eternally vigilant one must be to avoid the cleverly hidden food label traps, and how choice is manipulated, cynically and incessantly, by the US food industry.
Extrapolate this to most US industries, and re-evaluating "choice" may be a depressing task.
[1]: Thinking: Fast and Slow, by Daniel Kahneman
EDIT: typo
comment 9y ago · link · parent
Erlang/Elixir work with immutable values, so when you call a function, assuming it's side-effect free, you always get the same result.
Add to that the fact that there are no global variables (outside of table-like things like ETS), and that you can jump on the running system in an Erlang/Elixir shell and call any exported function and immediately see the results, debugging becomes much, much easier. I can honestly say that I have not needed a stepping-style symbolic debugger since 2008.
And when you find and fix a bug, you can copy the fixed code file (.beam file) to the server, start a remote shell, and do this:
> l(my_module).
and the new code is running, with no perceptible perturbation to the system.There are also other tools like dbg that let you monitor calls to specific module/functions based on pattern matches. The representation of these pattern matches is powerful but not so pretty - but it gets the job done.
Nothing's a panacea, and Erlang/Elixir undoubtedly have their warts, but for the Erlang VM's use case - soft real-time, extremely robust, highly concurrent distributed systems - I believe they are peerless.
One of the warts may be that the ecosystem doesn't have a library for every possible scenario, but that's improving rapidly, and in many cases, some of these are trivial to write. On the plus side, the quality of code is generally pretty good.
It is very challenging to describe what a massive level of confidence a hybrid-functional, battle-tested language and environment like this affords a system designer.
So debugging in this environment is very different and hard to compare directly to a line-by-line stepping debugger. Even if such a tool may be available (and things change so quickly these days, I probably missed that), it's easier to do without it.
It's so difficult to convey the experience of using this ecosystem, one cannot do it justice in a HN comment. T be fair, there are so many mature tools in more heavily used ecosystems like (I suppose) Java, that some may give up on Erlang/Elixir prematurely if used to that level of tooling.
comment 9y ago · link · parent
Much kudos must go to Anders Hejlsberg, who wrote the compiler in assembly language, starting on it at age 20[1]. Hejlsberg went on to create Delphi, J++, C#, and TypeScript.
I still regard TP 1.0 as one of the best software products I've used, and feel it is a testament to brilliant, performant, compact software development - and to its developer.
comment 9y ago · link · parent
If they are objectively better for every single task, there will be metrics and studies that prove this objectively. Kindly cite these studies and metrics. I don't think they exist.
I refute the quoted statement with two words: headless servers. Oh, and REPLs. And CLIs embedded in so-called GUIs. In many cases, GUIs contain command-line emulators. Think of, say, Wireshark's filters, or any JavaScript console.
Maybe you are railing against text-mode displays, as opposed to terminal emulation programs that use graphics to emulate a text-mode display?
> Given a proper choice... No true Scotsman...?