HNHacker News
TopNewBestAskShowJobs

matthiasl

403 karma · joined April 29, 2009

submissionscomments
matthiasl··on The humble USB cable is part of an electrical revolution
In addition to what 'stevek' wrote; the Europlug was designed so that it would fit many existing, incompatible European plugs.

One of the things that makes the European plugs incompatible is that they ahve different types of earthing. One example is Sweden versus Switzerland. In Sweden, the common socket has earth on the sides of the plug (see http://en.wikipedia.org/wiki/Schuko) whereas in Switzerland the earth is a pin (http://en.wikipedia.org/wiki/AC_power_plugs_and_sockets#Swis...).

By not having an earth, the Europlug fits both the Swiss and Swedish sockets.

matthiasl··on Why can a scam company raise $40 Million Series C + $76 Million Series B?
It looks like a class action lawsuit was filed against JustFab. The complaint starts like this:

   "Plaintiff Edna Betances-Harold, on behalf of herself and others similarly situated,
    brings this class action complaint against Defendant Just Fabulous, Inc, based on 
    its practice of deceptively marketing and billing consumers for unauthorized 
    charges relating to its retail website."
Does anyone know how that class action went, or how to find out?

Source: http://www.scambook.com/blog/2011/10/justfab-com-justfabulou...

matthiasl··on Groundwater Contamination May End the Gas-Fracking Boom
Hydrochloric acid is HCl. You write that it "decompose[s] to basic elements". Are you saying that HCl turns into H_2 and Cl_2, i.e. hydrogen gas and chlorine gas? Can you explain this reaction?
matthiasl··on Why I willingly handed over my credit card and PIN to a fraudster
About the PIN: your guess is right. The tone system for dialling numbers works like this: there are four "low" frequencies (697, 770, 852, 941 Hz) and four "high" frequencies (1209, 1336, 1477, 1633 Hz). Each key plays exactly one "low" and one "high" frequency, e.g. when you press "1", your phone plays 697 and 1209 Hz.

The telephone exchange listens for those tone combinations to know what number you're dialling. If you have an audio recording of a number being dialled, you can actually figure out the number just by listening to each tone separately and comparing it to the sound made by pressing keys on your own phone. Wouldn't surprise me if the fraudsters did just that, or maybe they used a "spectrum analysis" feature on a PC audio program.

matthiasl··on How to Almost Build an Engine With Only Parts From the Hardware Store [video]
As a sibling comment mentioned, it's possible there was a diode somewhere in the system.

Another possibility is that the motors in the slot cars had electromagnets for the stationary field instead of permanent magnets. That's what an ordinary power drill, especially one without electronic speed control, has. Such a motor will run pretty much the same on AC or DC. When running on AC, the rotor and stator both change their magnetic fields in perfect sync so the net effect is substantially the same as running to same motor on DC.

Wikipedia has an article on "Brushed DC electric motor" with a section on "wound stator". It doesn't specifically mention running the motor on AC, but there's enough there to show you what's going on.

matthiasl··on Why the war on drugs has been made redundant
This note from the US National Fire Data Center:

  http://www.usfa.fema.gov/downloads/pdf/tfrs/v11i4.pdf
suggests that a few hundred people die every year in the US because of fires started by people smoking in bed.
matthiasl··on Why are underground parking garages hot?
An interesting thing is that many subway systems recover some of the kinetic energy by converting it to something more useful than heat.

Some subways, for instance London's, are built with uphill slopes prior to stations, so that part of the kinetic energy is converted into potential energy.

Many subways use regenerative electrical braking for part of coming to a stop, i.e. the kinetic energy is partially converted to electric energy which is used by other trains on the network. Some subways increase the efficiency of that by having storage, for instance a large battery, in stations.

References: http://www.eenews.net/stories/1059982358

www.londonreconnections.com/2011/milestones-reached-on-the-jubilee-and-victoria-lines/

http://www.railway-energy.org/static/Regenerative_braking_in...

matthiasl··on German Parliament says: Stop Granting Software Patents
I like that idea too. The FFII (not known for their love of the patent system as used for software in some places) has proposed a more complex approach based on that idea, where there's a bounty system in place to act as a sort of garbage-collection mechanism to remove duplicate ideas:

http://eupat.ffii.org/07/p2parl/exam/

matthiasl··on Uber Stockholm throw a PR-tantrum when refused unfair advantages
I'm a local. This is the first time I've heard of Uber, so in a sense the PR has worked.

Looking at the 20 or so comments (in Swedish) below Uber's original press release/blog entry (http://blog.uber.com/2013/04/25/transportstyrelsen-forsoker-...), they're almost all opposed to part or all of Uber's post.

The biggest non-tabloid newspaper, DN, hasn't mentioned Uber at all. The next biggest, SvD, hasn't mentioned the current spat, but had an interview (a month ago) with Simon Breakwell from Uber. Choice quote:

Reporter: You've encountered resistance from taxi companies in some cities.

Simon: Right, but that's mostly in the USA. Before we enter a new market, we conduct a thorough investigation into the local rules and regulations to avoid nasty surprises. We've never encountered resistance based on Uber itself being illegal.

(Source: http://www.svd.se/naringsliv/branscher/handel-och-tjanster/h... I translated it by hand.)

matthiasl··on Super-cooling liquid cuts 97% off data centre cooling costs
I am not an expert in the field, but a quick look through the product pages at 3M suggests that the important difference is the boiling point. Novec boils at 49 degrees C, so for cooling electronics the primary mode of heat transfer will be the phase change. Fluorinert seems to boil at higher temperatures, 80 and > 200 degrees for the two variants I looked at.

They seem to be in the same family of products and several of their physical properties are very similar, so maybe they're just variants.

Here's a link to a page which has both families:

http://www.mgchemicals.com/products/cleaners/3m-fluids/

matthiasl··on Google is working on creating a new protocol named QUIC to replace UDP
SCTP is widely used for carrying signalling in mobile and fixed telephone networks. It is _the_ way of carrying SS7 over IP.

(Another angle on the same thing: it didn't get used much outside the thing it was originally designed for.)

matthiasl··on What strips vocals from audio when a 1/8' audio jack is partially unplugged?
Is "phase cancellation" a general term for situations where two signals cancel out each other?

(I'm rusty at this, but when I read 'phase', I think of a time difference between two signals. In this case, there's no time difference.)

matthiasl··on Why 0.1 Does Not Exist In Floating-Point
That was an interesting link, thanks. I liked other parts of the site too, for instance

http://speleotrove.com/decimal/

Any idea what decimal floating point is used for?

(I have little to no idea about CAD or financial software.

I can see that fixed-point decimal with two decimal places is useful for things where you want to be able to reason about rounding of cents.

I can also see that you'd want more than two decimal places for a lot of calculations, for instance computing interest.

But decimal floating point...what's specified in such a way that you need to use decimal floating point?

I checked the wikipedia decimal floating point page. Didn't see any concrete examples there either.)

matthiasl··on Erlang is a hoarder
I think two things are interesting here. 1: "when does Erlang GC a process' heap?" and 2: "where does Erlang keep a process' data?".

1: Erlang GCs a process' heap whenever that process' heap gets full, or when you call erlang:garbage_collect() explicitly.

2: Erlang stores most data associated with a process on the process heap, there's one such heap per erlang process. Binaries are a special case. If they're large (> 64 octets), the heap only contains a reference to the binary, the binary itself is stored in an area specifically for binaries.

1+2 can result in a lot of binary garbage left lying around. Here's how it can happen:

a) A process creates a relatively large amount of unused heap space. This could happen by temporarily using a large amount of heap, e.g. by calling binary_to_list() on a large-ish binary, doing something with the list then dropping it. For arguments' sake, let's say we made a heap (for one Erlang process) with 30M free.

b) Now the process moves on to a new phase: creating large but short-lived binaries. Let's say 1M each. Those binaries don't live on the heap, only a reference to them does. So they only consume 8 (?) octets on the heap.

c) If the references are the only thing using the heap, then you can make 4M of them before filling the process heap. But since they're 1M each, they'll eat 4T of the binary heap. i.e. you'll run out of memory.

As you found out, setting 'fullsweep_after' to 0 doesn't help, since a GC is never triggered. But explicitly calling erlang:garbage_collect() does.

You can investigate a bit more using tracing. erlang:trace/3 can generate a message whenever the target process is GCed (the garbage_collection entry in flaglist). If my guess is right, then you should see that your processes holding all the binaries are never (or rarely) GCed. Tracing the GC is cheap, you won't notice any performance difference if you only do it on a few processes.

The process_info BIF can also tell you quite a bit, e.g. the process heap size.

Disclaimer #1: my knowledge about the details above may be wrong or out of date. But the mechanism is known. I've seen it in embedded systems and handled it in similar ways to your approach.

Disclaimer #2: obviously I'm taking a guess. It's possible you've run into something else entirely. That's why I suggested some things to look at to confirm or reject my suspicion.

matthiasl··on Announcing Wolfram Alpha Pro
What do Hacker News users use it for? I use it to solve mathematics problems when my rusty skills fail me. Best example:

I needed to see what a pulse, f(t), specified as ten coordinates looked like after passing it through a transfer function:

            as^2 + bs + c
  H(s) =  ---------------------
          ds^3 + es^2 + gs + m
a,b,c,d,e,g,m are constants.

I haven't dealt with that sort of problem since university, about two decades ago. Reading a couple of wikipedia articles about transfer functions and laplace transforms reminded me of what needed doing, but I kept getting stuck in a thicket of terms.

I then tried feeding the problem to Wolfram Alpha. That worked for a simplified version of the problem, but I couldn't give it the full problem because Wolfram Alpha limits the query length.

I ended up installing a trial copy of Mathematica. That did exactly what I wanted. It was enormously satisfying, but Mathematica has a high price tag and I only need to do this sort of thing once every few years. Next time, I'll take a look at the price and be tempted.

But maybe Wolfram Alpha pro is enough of a step closer to Mathematica to deal with my next problem. That would be great.

(There are other ways to solve the above problem, e.g. with a Z transform. But doing it analytically was far more satisfying and gave me confidence in the result.)

matthiasl··on The Unintended Effects of Driverless Cars
If kids causing traffic jams was a real problem, why doesn't it already happen all the time on pedestrian crossings?
matthiasl··on Kickstarter project for $100 - 1 kW - stirling engine
According to wikipedia, the average loss on the power lines is 7%. Source:

https://en.wikipedia.org/wiki/Electric_power_transmission#Lo...

That's not what I'd call "huge".

matthiasl··on Why designers don’t like A/B testing
Is A/B testing a greedy algorithm?

I don't know much about A/B testing, nor have I done any. My first thought is: how do you avoid getting stuck on local maxima?

(The wikipedia article on A/B testing mentions A/B..Z testing and 'multivariant testing', which may be an answer to my question, but they don't seem to get much mention.)

matthiasl··on Erlang inventor: Why do we need modules and files?
His native language is English. He's just sloppy. He's been in Sweden for decades and speaks Swedish with a typical English accent.

Source 1: My opinion. I've met him many times.

Source 2: His thesis states that he started at the Ericsson CSLab in 1985. CSLab was in Sweden.

Source 3: This (http://www.cse.chalmers.se/~rjmh/Armstrong/bits.ps) set of slides states that he has a B.Sc. from UCL (London) from 1972 and started at CSLAb in 1986 (not 1985, seems the dates are a bit fluid).

matthiasl··on Tell HN: I'm writing an Erlang recipes book, are you interested?
Why is this a fundamental feature of message queues any more than of other things?

(you can make a data structure which makes memory explode, for instance lists:seq(1, 123456789123456), you can make a program which makes memory explode, for instance by growing the stack enough. Why is a message queue special?)

matthiasl··on Tell HN: I'm writing an Erlang recipes book, are you interested?
If you want a message queue bounded to length N, then make the messaging protocol such that the sending process sends up to N messages without an ack.
matthiasl··on We should stop running away from radiation
I've heard of depleted uranium, but depleted plutonium is new to me.

Googling a bit, I think you mean depleted uranium, but perhaps wrote 'plutonium' because one of the problems with depleted uranium is that it is (often?) contaminated with plutonium. Just guessing.

matthiasl··on Erlang/OTP R14B02 has been released.
R means release

14 is the major release number

B is the minor release 'number'. By convention, 'A' is not considered ready for production, whereas 'B' and later are.

02 is the 'patch level', i.e. an even more minor release number

This scheme, or at least the part up to the 'B', was used all over the place in Ericsson while I was there (a decade ago). I just pulled the battery off my phone to see if it was still used and it doesn't seem to be. One of my previous mobile phones had R1F on the sticker behind the battery...

matthiasl··on Google and Microsoft Cheat on Slow-Start. Should You?
Can anyone else repeat his experiment?

I tried repeating the experiment. I'm in Sweden, so, annoyingly, a request to google.com redirects to google.se. If I send my request directly to google.se, I get 9k response in 130ms and the initial window looks like 4 to me, i.e. I can't see anything unexpected happening.

I then tried repeating on Amazon EC2. I can't see anything unexpected there either, but the RTT from EC2 to google is only about 3ms, which means I can't assume that the ACKS don't get there.

(The original article author looks at how long the initial 3-way handshake takes and then assumes that all packets take that long, or, probably, half as long, i.e. he assumes that ACKS sent up to one RTT before a packet from google can't have arrived at google in time to affect that packet)

Can anyone else reproduce the experiment?

Other ideas: repeat from Sweden, but send a cookie so that I really get google.com. Repeat from EC2, but make sure I never send any ACKs after the three-way handshake. I'm not curious enough to do the latter, it's a fair bit of work.

matthiasl··on Erlang/OTP R14B is now out
Companies with telecom products are generally conservative about switching Erlang versions. Most of Corelatus' production systems run R11B-5. Quite a few still run R9C-2. There's no compelling reason to upgrade them, there are thousands of those systems in dozens of countries and most run billing systems. They typically run for years at a time and only get upgraded in conjunction with a larger system upgrade.

It's not like you sit there typical 'apt-get update' a couple of times a day to see if there's anything new you might want...

On the other hand, people who are new to the language generally like to use the very latest because it contains the most features. E.g. later versions have increasingly good SMP support, which may be important if you're working on something which has to scale across many cores, but it's completely irrelevant to me because our hardware only runs Erlang on one core.

My suggestion for a starting point: if you're just developing, follow the R14 sequence, i.e. every time a new one gets release, download it, compile and install from source. If you're ready to deploy now, use R13B04 and let others find the bugs in R14.

Potential biases: I work at Corelatus. I've worked for Ericsson. I maintain the Erlang FAQ.

matthiasl··on Should Bernie Madoff Have Charged 1% or 2% Fees?
As other commenters have pointed out, both here and on the blog itself, the blog post assumes that a dollar taken out in fees in 2010 is worth the same as a dollar taken out in 2160. Depending on how you want to look at that, it's either ignoring inflation or ignoring the possibility of investing the fees, or both.

If you start with the client's $300, deliver 10% return a year, take 1% in fees per year, reinvest the fees in your own fund, then after 150 years

  Client's fund: 123E+6
           Fees: 362E+6
Huh? How is it possible that the fees are more than the client's fund? It turns out that the fees Bernie puts in his own fund don't get hit with the 1% fee themselves, so they're getting a return of 10% per year instead of 9%. After about 75 years, that makes the fees fund come out ahead.

With 2% fees, the results after 150 years are

  Client:  31E+6
    Fees: 454E+6
I.e., Bernie makes more on a 2% fee than a 1% fee, reason is restored.

With a bit of luck, I haven't made a mistake. It'd be nice if someone confirmed or contradicted my numbers. Here's what I did:

  -module(bernie).
  -export([loop/5]).

  loop(Year, End_year, Capital, Fees, _Fee_percent) when Year == End_year ->
        io:fwrite("year: ~p Capital: ~g Fees: ~g\n", [Year, Capital, Fees]);
  loop(Year, End_year, Capital, Fees, Fee_percent) ->
        loop(Year + 1, End_year, Capital * (1.10 - Fee_percent), 
                Fees * 1.10 + Capital * Fee_percent, Fee_percent).
Edit: indented code to try and stop it from getting mangled.
matthiasl··on Invention of the day: A spokeless bicycle
On a normal wheel, the bearings travel a much shorter distance than the wheel.

On this wheel, the bearings travel the same distance as the wheel. That makes me wonder if the friction due to bearings is much larger in this type of wheel. I have no idea if that's an important factor or not.

(A normal wheel is, say, 700mm diameter and the bearing race maybe 20 or 30mm, so the bearing surfaces move 20 or 30 times more slowly than the bicycle. On this spokeless bicycle, the bearing surfaces move at about the same speed as the bicycle.)

← PreviousPage 3 of 3